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 13:59, 2 November 2026
RemmyLee
(Final Fantasy VII debugger: lists 1A and 1B, which fill window 1 and show all four windows, with the StationX capture)
Line 43:Line 43:
![The debugger windows on a SCPH-5501 in room MDS5_3.](/file/ff7-field-debugger-5501)![The debugger windows on a SCPH-5501 in room MDS5_3.](/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. A routine placed at 800BC4D4h fills window 1 for the party leader and then draws the windows, 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]
![All four debugger windows on a SCPH-5501 in room MDS5_2.](/file/ff7-field-debugger-window-1-5501)![All four debugger windows on a SCPH-5501 in room MDS5_2.](/file/ff7-field-debugger-window-1-5501)
Line 49:Line 49:
## 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 132 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 61:
| 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 92:
``````
+### 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 132 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]
+
+In the StationX emulator on 1 November 2026, the two lists were run by a program that reads and writes memory in the same way as the bench cart's cheat engine. All four windows appeared in room MDS5_2: window 1 showed CTRL:CLOUD, window 5 showed AUTHR:AKIYAMA and EVENT:MDS5_2 with all five rows, window 4 showed ACTOR:SAVEL0 and window 3 showed WORD:RET.[^w1]
+
+![All four debugger windows from lists 1A and 1B in room MDS5_2 in the StationX emulator.](/file/ff7-field-debugger-four-windows-stationx)
+
+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 001B
+800BC556 1020
+800BC558 0000
+800BC55A 0000
+800BC55C 6715
+800BC55E 0803
+800BC560 0008
+800BC562 256B
+800BC564 0179
+800BC566 2841
+800BC568 0016
+800BC56A 1020
+800BC56C 0158
+800BC56E 2841
+800BC570 0012
+800BC572 1420
+800BC574 800E
+800BC576 3C03
+800BC578 1024
+800BC57A 8463
+800BC57C 2900
+800BC57E 0002
+800BC580 0005
+800BC582 1460
+800BC584 0000
+800BC586 0000
+800BC588 800C
+800BC58A 3C0E
+800BC58C B050
+800BC58E 25CE
+800BC590 0005
+800BC592 1000
+800BC594 2821
+800BC596 00AE
+800BC598 800C
+800BC59A 3C0E
+800BC59C 9CE0
+800BC59E 25CE
+800BC5A0 2821
+800BC5A2 00AE
+800BC5A4 1580
+800BC5A6 24A5
+800BC5A8 0300
+800BC5AA 3C03
+800BC5AC 0000
+800BC5AE ACA3
+800BC5B0 7580
+800BC5B2 3C03
+800BC5B4 8080
+800BC5B6 3463
+800BC5B8 0004
+800BC5BA ACA3
+800BC5BC 6729
+800BC5BE 0803
+800BC5C0 0000
+800BC5C2 0000
+800BC5C4 67BD
+800BC5C6 0803
+800BC5C8 0000
+800BC5CA 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 273:
[^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.
+[^w1]: StationX emulator run, 1 November 2026, 19:50: lists 1A and 1B through a program that applies codes as the bench cart's cheat engine does, with screen captures.