Final Fantasy VII Field Script Debugger
Square's event script debugger from the field module of Final Fantasy VII.
| Game | Final Fantasy VII (USA), SCUS-94163 |
|---|---|
| Module | FIELD/FIELD.BIN |
Overview
The field module of Final Fantasy VII, FIELD/FIELD.BIN, contains the event debugger that Square used to follow the scripts of a room while they run. The debugger draws text windows over the field screen that show the script author and the name of the room, the Go, Stop and Step commands, the current actor and its position, and the script command being executed. In the retail game the code and its text remain in the module; however, the windows are never drawn.1
Every script command handler calls a trace routine, which reports the internal name of the command and its argument bytes. The internal names are short words such as mes, mjump and kawai. The module also holds the labels and error messages of the debugger, among them "Authr", "Word:", "Actor:", "RqLv", "Actor OFF", "Bad Event code!" and "Bad Event arg!".1
Windows
The debugger uses six text windows, which are records of 17Ah bytes each in a table at 800E0748h. When a room is loaded, the setup routine at 800D7F9Ch opens windows 1, 3, 4 and 5 and writes the author line, the room line and the Go, Stop, Step, Actor OFF and Info OFF rows into window 5. The same routine then marks each window as hidden, and because the draw routine skips any hidden window, nothing appears on the screen. The contents of each window are shown below.2
| Window | Contents |
|---|---|
| 1 | CTRL: and the party leader, with the actor rows of the leader and the B-R, R-G, G-B, OFFSET, SF and DP rows |
| 3 | WORD: and the script command being executed, with its argument bytes |
| 4 | ACTOR: and the entity, with its RqLv, TG, script line and position rows |
| 5 | AUTHR: and the script author, EVENT: and the room name, and the GO, STOP, STEP, ACTOR OFF and INFO OFF rows |
The routine at 800BC9FCh fills both window 1 and window 4. Its only call, at 800BB888h, passes window number 4, and window 1 therefore stays empty in the retail program.1
Switches
The retail program disables the debugger in three ways. The enable flags at 8009D820h and 80071E24h are written only by the room setup routine, which stores 0 to them at 800D8160h and 800D8158h. The window draw routine at 800D85FCh is never called, since no jal instruction, pointer or address load in FIELD.BIN or SCUS_941.63 refers to it. Finally, the room setup routine hides each window that it opens.1
A state byte at 80099FFCh controls script execution: 3 means that the scripts run and 4 means that they are stopped. A value of 5 selects step mode, in which a script command runs only when 80070788h is set; however, the retail program stores only 3 and 4 to this byte, so step mode is never entered.2
Operation
The debugger can be shown by making three changes in memory while the field module runs. The per-frame call at 800BA7A8h is changed from jal 800BC438h to jal 800D85FCh so that the windows are drawn every frame, the enable flags at 8009D820h and 80071E24h are set to 1, and the hide bytes of windows 1, 3, 4 and 5 (800E0A3Ah, 800E0D2Eh, 800E0EA8h and 800E1022h) are set to 0. Because each room load hides the windows again, and each return from battle reloads FIELD.BIN with the original call, the changes must be repeated after either event.12
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.3

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. 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.124

GameShark Codes
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.21
| Buttons | Action |
|---|---|
| Select + L2 | Show the windows |
| Select + R2 | Hide the windows |
| Select + L1 | Step mode (80099FFCh = 5) |
| Select + R1 | Run the scripts again (80099FFCh = 3) |
| 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.2
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.5
C00D85FE 3C02
800BA7AA 0C03
800BA7A8 617F
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
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.21
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.6

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
-
^ a b c d e f g h Final Fantasy VII (USA) disc 1, SCUS-94163, read 1 November 2026: FIELD/FIELD.BIN unpacked to 800A0000h, and SCUS_941.63.
-
^ a b c d e f g psx.wiki bench notes, Final Fantasy VII field module, 31 October and 1 November 2026.
-
^ psx.wiki bench, SCPH-5501, 31 October 2026, 16:26, room MDS5_3: photograph of the debugger windows on screen.
-
^ psx.wiki bench, SCPH-5501, 1 November 2026, 17:57, room MDS5_2: photograph of the four debugger windows on screen.
-
^ StationX emulator run, 1 November 2026: the list through the bench cart's cheat engine, with screen captures and memory dumps.
-
^ 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.