psx.wiki

Final Fantasy VII Field Script Debugger: Difference between revisions

Revision as of 00:58, 2 November 2026
RemmyLee
(Final Fantasy VII: the two SCPH-5501 debugger photographs and the Uso capture, with their file pages)
Revision as of 17:52, 2 November 2026
xsp
(Edit games/final-fantasy-vii/field-script-debugger)
Line 2:Line 2:
title: Final Fantasy VII Field Script Debuggertitle: Final Fantasy VII Field Script Debugger
type: tooltype: tool
−summary: Square's event script debugger, left switched off in the field module of Final Fantasy VII.+summary: Square's event script debugger from the field module of Final Fantasy VII.
category: Final Fantasy VIIcategory: Final Fantasy VII
info: Game = Final Fantasy VII (USA), SCUS-94163info: Game = Final Fantasy VII (USA), SCUS-94163
Line 41:Line 41:
These changes were made on a SCPH-5501 on 31 October 2026 in room MDS5_3. The screen then showed AUTHR:AKIYAMA and EVENT:MDS5_3 in window 5 with the GO, STOP, STEP, ACTOR OFF and INFO OFF rows below them. Window 4 showed ACTOR:FURYOB with its RQLV, MAN, DIR and position rows (X FE32, Y FF34), and window 3 showed WORD:RET.[^run1]These changes were made on a SCPH-5501 on 31 October 2026 in room MDS5_3. The screen then showed AUTHR:AKIYAMA and EVENT:MDS5_3 in window 5 with the GO, STOP, STEP, ACTOR OFF and INFO OFF rows below them. Window 4 showed ACTOR:FURYOB with its RQLV, MAN, DIR and position rows (X FE32, Y FF34), and window 3 showed WORD:RET.[^run1]
−![The debugger windows on a SCPH-5501 in room MDS5_3.](/file/ff7-field-debugger-5501)+![Debugger Windows (SCPH-5501)](/file/ff7-field-debugger-5501)
−The text draw routine at 800D9C04h draws at most 344 character sprites in one frame, whereas the four windows together need about 400. Consequently, when window 1 is filled as well, the text is cut off: in the StationX emulator, window 5 stopped partway through its author line. A routine placed in the unused field pointer code at 800BC4D4h fills window 1 for the party leader, and a second one at 800BC538h skips spaces and extends the sprite buffers, so that the four windows need only 357 sprites. With both routines in place, a SCPH-5501 showed all four windows on 1 November 2026 in room MDS5_2, and window 1 read CTRL:CLOUD.[^bench][^run2]+The text draw routine at 800D9C04h draws at most 344 character sprites in one frame, whereas the four windows together need about 400. Consequently, when window 1 is filled as well, the text is cut off: in the StationX emulator, window 5 stopped partway through its author line. The field pointer routine at 800BC438h, which tests the Select button, is called only from 800BA7A8h, and the code that it calls at 800BC4D4h is therefore unused once that call is changed.
−![All four debugger windows on a SCPH-5501 in room MDS5_2.](/file/ff7-field-debugger-window-1-5501)+A routine placed at 800BC4D4h fills window 1 for the party leader and then draws the windows. A second routine at 800BC538h draws no sprite for a space and places each sprite beyond the 344th in one of 17 areas of memory: the rest of the field pointer code, three routines of FIELD.BIN and 13 routines of the main program. No call, jump, pointer word or address load in the main program or in the field, battle, world, menu and minigame modules refers to these areas, and they can therefore hold sprites. The four windows need at most 455 sprites, when window 3 shows its argument rows, and the areas give each of the two sprite buffers room for at least 127 sprites beyond the 344th. With an earlier version of the routines, a SCPH-5501 showed all four windows on 1 November 2026 in room MDS5_2, and window 1 read CTRL:CLOUD.[^d1][^bench][^run2]
+![Four Debugger Windows (SCPH-5501)](/file/ff7-field-debugger-window-1-5501)
+
## GameShark Codes## GameShark Codes
−The list below makes the same changes as a GameShark code. Its first line enables the list only while FIELD.BIN is in memory, and the remaining lines apply the changes every frame. The buttons that the list reads at 8009AC5Ch are shown below. The list is entered as one cheat.[^bench]+The debugger can be shown with either of two GameShark codes. List 1, of 22 lines, shows windows 3, 4 and 5, and lists 1A and 1B, of 213 and 24 lines, show all four windows. The buttons that both codes read at 8009AC5Ch are shown below. While either code is on, Select no longer shows the field pointer, because the frame call at 800BA7A8h no longer goes to the pointer routine.[^bench][^d1]
Table: Debugger buttonsTable: Debugger buttons
Line 61:Line 63:
| R2 | One script command in step mode || R2 | One script command in step mode |
+### List 1
+
+List 1 makes the three changes described in the first paragraph of Operation. Its first line enables the list only while FIELD.BIN is in memory, and the remaining lines apply the changes every frame. The list is entered as one cheat.[^bench]
+
In the StationX emulator on 1 November 2026, with the list run by the bench cart's cheat engine, Select + L2 showed the windows in room MDS5_2. In step mode each R2 advanced the actor window, from ACTOR:SAVEL0 to ACTOR:DIRECTR and then to ACTOR:CLOUD, and Select + R2 hid the windows again. The state byte read 5 after Select + L1 and 3 after Select + R1.[^sx]In the StationX emulator on 1 November 2026, with the list run by the bench cart's cheat engine, Select + L2 showed the windows in room MDS5_2. In step mode each R2 advanced the actor window, from ACTOR:SAVEL0 to ACTOR:DIRECTR and then to ACTOR:CLOUD, and Select + R2 hid the windows again. The state byte read 5 after Select + L1 and 3 after Select + R1.[^sx]
Line 88:Line 94:
``````
+### Lists 1A and 1B
+
+List 1A writes the two routines described under Operation into the field pointer code, changes the sprite limit test at 800D9C98h and the sprite store at 800D9E84h, and then changes the frame call at 800BA7A8h to jal 800BC4D4h. Each line of list 1A writes one halfword that differs from FIELD.BIN, and list 1A therefore has 213 lines. List 1B changes the retail frame call to a nop and contains the same window and button lines as list 1. Because list 1A writes only while the frame call is a nop, the routines are written in the frame after list 1B removes the retail call, and list 1A must therefore be entered as the first of the two cheats. After a return from battle, which reloads FIELD.BIN, the two lists repeat these steps.[^bench][^d1]
+
+On 2 November 2026 the two lists were run on a SCPH-5501 by the cheat engine of the StationX cartridge, which accepts up to 255 lines in one code. With a saved game in room MDS5_2, Select + L2 showed all four windows: window 1 read CTRL:CLOUD, window 5 read AUTHR:AKIYAMA with its five rows, window 4 read ACTOR:SAVELO and window 3 read WORD:RET with its five argument rows. After Select + L1 each R2 advanced the actor window, from DIRECTR to CLOUD and then to EARITH, and Select + R2 hid the windows until Select + L2 showed them again.[^run3]
+
+![Four Debugger Windows from Lists 1A and 1B (SCPH-5501)](/file/ff7-field-debugger-cart-5501)
+
+List 1A:
+
+```
+C00D85FE 3C02
+C00BA7AA 0000
+800BC4D4 FFE8
+800BC4D8 0010
+800BC4DA AFBF
+800BC4DC 0014
+800BC4DE AFA4
+800BC4E0 800A
+800BC4E2 3C08
+800BC4E4 D391
+800BC4E6 9109
+800BC4E8 00FF
+800BC4EA 340A
+800BC4EC 000B
+800BC4EE 112A
+800BC4F0 5821
+800BC4F2 0109
+800BC4F4 AD30
+800BC4F6 9165
+800BC4F8 C6DC
+800BC4FA 8D0C
+800BC4FC 0000
+800BC4FE 0000
+800BC500 0002
+800BC502 918C
+800BC504 0000
+800BC506 0000
+800BC508 682B
+800BC50A 00AC
+800BC50C 0003
+800BC50E 11A0
+800BC514 F27F
+800BC516 0C02
+800BC518 0001
+800BC51A 3404
+800BC51C 0014
+800BC51E 8FA4
+800BC520 617F
+800BC522 0C03
+800BC524 0000
+800BC526 0000
+800BC528 0010
+800BC52A 8FBF
+800BC52C 0000
+800BC530 0008
+800BC532 03E0
+800BC534 0018
+800BC536 27BD
+800BC53A 9141
+800BC53C 0020
+800BC53E 3403
+800BC540 0008
+800BC542 1423
+800BC544 0000
+800BC546 0000
+800BC548 0001
+800BC54A 254A
+800BC54C 0000
+800BC54E 9141
+800BC554 001E
+800BC556 1020
+800BC558 0000
+800BC55A 0000
+800BC55C 6715
+800BC55E 0803
+800BC560 0008
+800BC562 256B
+800BC564 0158
+800BC566 2841
+800BC568 0017
+800BC56A 1420
+800BC56C 800E
+800BC56E 3C03
+800BC570 1024
+800BC572 8463
+800BC574 800C
+800BC576 3C04
+800BC578 C5D8
+800BC57A 2484
+800BC57C 0002
+800BC57E 1060
+800BC580 0000
+800BC582 0000
+800BC584 0048
+800BC586 2484
+800BC588 0000
+800BC58A 8C85
+800BC58C 0004
+800BC58E 8C8E
+800BC590 000F
+800BC592 10A0
+800BC594 082A
+800BC596 0045
+800BC598 FFFB
+800BC59A 1020
+800BC59C 0008
+800BC59E 2484
+800BC5A0 2900
+800BC5A2 0002
+800BC5A4 2821
+800BC5A6 00AE
+800BC5A8 0002
+800BC5AA 1060
+800BC5AC 0000
+800BC5AE 0000
+800BC5B0 EA80
+800BC5B2 25CE
+800BC5B4 0300
+800BC5B6 3C03
+800BC5B8 0000
+800BC5BA ACA3
+800BC5BC 7580
+800BC5BE 3C03
+800BC5C0 8080
+800BC5C2 3463
+800BC5C4 0004
+800BC5C6 ACA3
+800BC5C8 6729
+800BC5CA 0803
+800BC5CC 0000
+800BC5CE 0000
+800BC5D0 67BD
+800BC5D2 0803
+800BC5D4 0000
+800BC5D6 0000
+800BC5D8 0190
+800BC5DA 0000
+800BC5DC B0F0
+800BC5DE 800B
+800BC5E0 01B2
+800BC5E2 0000
+800BC5E4 51D0
+800BC5E6 8004
+800BC5E8 01C6
+800BC5EA 0000
+800BC5EC 4B2C
+800BC5EE 8004
+800BC5F0 01D7
+800BC5F2 0000
+800BC5F4 8E14
+800BC5F6 8003
+800BC5F8 01E2
+800BC5FA 0000
+800BC5FC 4BEC
+800BC5FE 8003
+800BC600 01EA
+800BC602 0000
+800BC604 5EF0
+800BC606 8003
+800BC608 01F0
+800BC60A 0000
+800BC60C 0138
+800BC60E 8004
+800BC610 01F6
+800BC612 0000
+800BC614 1FDC
+800BC616 8003
+800BC618 0000
+800BC61A 0000
+800BC61C 0000
+800BC61E 0000
+800BC620 0167
+800BC622 0000
+800BC624 6C14
+800BC626 800D
+800BC628 0179
+800BC62A 0000
+800BC62C 898C
+800BC62E 800D
+800BC630 017C
+800BC632 0000
+800BC634 8C60
+800BC636 800D
+800BC638 01B3
+800BC63A 0000
+800BC63C 9F2C
+800BC63E 8003
+800BC640 01C6
+800BC642 0000
+800BC644 BA3C
+800BC646 8001
+800BC648 01D5
+800BC64A 0000
+800BC64C 98DC
+800BC64E 8003
+800BC650 01E0
+800BC652 0000
+800BC654 B670
+800BC656 8001
+800BC658 01EA
+800BC65A 0000
+800BC65C 81EC
+800BC65E 8003
+800BC660 01F0
+800BC662 0000
+800BC664 190C
+800BC666 8004
+800BC668 0000
+800BC66A 0000
+800BC66E 0000
+800D9C98 F14E
+800D9C9A 0802
+800D9C9C 0000
+800D9C9E 0000
+800D9E84 0821
+800D9E86 01C4
+800D9E88 000E
+800D9E8A A422
+800D9E8C 0000
+800D9E8E 0000
+800D9E92 0000
+800BA7A8 F135
+800BA7AA 0C02
+```
+
+List 1B:
+
+```
+C00D85FE 3C02
+D00BA7A8 F10E
+800BA7AA 0000
+D00BA7AA 0000
+800BA7A8 0000
+3009D820 0001
+30071E24 0001
+3009D824 0001
+D009AC5C 0101
+300E1022 0000
+D009AC5C 0102
+300E1022 0002
+C20E1022 0001
+800E0A3A 0000
+C20E1022 0001
+800E0D2E 0000
+C20E1022 0001
+800E0EA8 0000
+D009AC5C 0104
+30099FFC 0005
+D009AC5C 0108
+30099FFC 0003
+D009AC64 0002
+30070788 0001
+```
+
## References## References
Line 95:Line 356:
[^run2]: psx.wiki bench, SCPH-5501, 1 November 2026, 17:57, room MDS5_2: photograph of the four debugger windows on screen.[^run2]: psx.wiki bench, SCPH-5501, 1 November 2026, 17:57, room MDS5_2: photograph of the four debugger windows on screen.
[^sx]: StationX emulator run, 1 November 2026: the list through the bench cart's cheat engine, with screen captures and memory dumps.[^sx]: StationX emulator run, 1 November 2026: the list through the bench cart's cheat engine, with screen captures and memory dumps.
+[^run3]: psx.wiki bench, SCPH-5501, 2 November 2026, 09:50, room MDS5_2: lists 1A and 1B through the cheat engine of the StationX cartridge, build 7a20b1f-dirty-6AE89E7A, with photographs of the screen.