Holy Girl Force Lakers Technical Data

Apostrophe Hack

While the engine for Lakers supports half-width latin text natively, it does not interpret the apostrophe character(hex byte 27), as it uses that to indicate a call to a certain subroutine. Initially, I just used the grave accent instead, as I was not sure what that subroutine did or where it was used. After inserting the fully translated script with no apostrophes whatsoever, it looks like it was never actually used in-game, so I considered it safe to change the value it checks for to an unused punctuation instead.


		In REI.EXE, replace the value at address BC8A with the an unused punctuation such as "|" (hex 7C).
      

Game Files

Lakers 1 uses .BIN files to store the scripting and data used by the main REI.EXE program. It uses .OZM files for the images, with corresponding .RGB files for the palette.

BIN format

The BIN file extension is used for a couple different types of data files, be it scripting for the narrative portion or data for the battle scenes, and they do not all share the same format. Of note is the file CHAR.BIN, which contains the text for the attacks and shouts in battle, and has a unique layout. The BTLxx.BIN files are just data for the battles and contain no text to translate, so I ignored those. The rest of the files use the instruction bytecode in the table below. The way it handles jumps and pointers is not entirely straightforward, as it stores them in a table of variables and calls them by index, rather than including them in the jump command directly, and those same variables can be used elsewhere in the script for other purposes.

Opcode Parameters Function Notes
00 xx yyyy zz Conditional jump jnz If the value at the memory address stored in variable xx equals yyyy, move read pointer to the address stored in variable zz.
01 xx yyyy zz Conditional jump jz If the value at the memory address stored in variable xx does NOT equal yyyy, move read pointer to the address stored in variable zz.
02 xx yyyy zz Conditional jump jbe If the value at the memory address stored in variable xx ... yyyy, move read pointer to the address stored in variable zz.
03 xx yyyy zz Conditional jump jnb If the value at the memory address stored in variable xx ... yyyy, move read pointer to the address stored in variable zz.
04 xx yyyy zz Conditional jump jb If the value at the memory address stored in variable xx ... yyyy, move read pointer to the address stored in variable zz.
05 xx yyyy zz Conditional jump ja If the value at the memory address stored in variable xx ... yyyy, move read pointer to the address stored in variable zz.
06 xx Jump Move the read pointer to the address stored in variable xx.
07 xx yyyy Set variable Set variable xx to value yyyy.
08 xx yy Copy variable Copy variable yy to variable xx.
09 xx yy Add variable Add variable yy to variable xx.
0A xx yy Subtract variable Subtract variable yy from variable xx.
0B xx yy Multiply variable Multiply variable xx by variable yy.
0C xx yy Divide variable Divide variable xx by variable yy.
0D xx Increment variable Increase the value of variable xx by 1.
0E xx Decrement variable Decrease the value of variable xx by 1.
0F ** Text mode Begins displaying text in the dialog box until the escape character "/E" is read. See the Text Format for more details.
10 xx yyyy aa bb ** 00 Menu text Draws text at x position xx, y position yyyy*8, with a width of aa and a height of bb. Displays text ** until it reaces a terminating byte 00. Used for menu text and other places to draw text at an arbitrary screen position.
11 xx yyyy aa bb cc Draw menu window .
12 xx Clear window Clears window number xx and redraws what was behind it.
13 xxxx yyyy zz Draw image window Draws image in a window and assigns the window index zz.
14 xx yyyy zzzz aa Draw portrait image Draw character portrait image to position xx, yyyy*8. zzzz and aa indicate the character and expression?
15 xx Clear portrait .
16 xx (aa bb yyyy cc dd zz,...) Set menu parameters Sets the parameters for the menu options. xx is the number of options, with a 7-byte block of data for each menu option as follows:
17 xxxx Battle mode Loads the BTLxx.BIN file at file index xxxx and begins the battle scenario.
18 xx yy zz Save character variable Load character data block xx and store var zz at [18CB+yy].
19 xx yy zz Load character variable Copy character data block yy to [18B5]-[18EB] and set variable xx to [18CB+zz].
1A xxxx Load music Loads the music file at file index xxxx.
1B none Clear music Clears the loaded music file.
1C xx ???
1D none ???
1E xxxx Load script Load file index xxxx to the script location and move the pointer to the beginning.
1F none ???
20 aa bb cc dd xxxx yy Clear text?
21 xxxx yyyy Change to mode 2? changes window sizes, sets[02ca] to 0002 (H-scene mode?)
22 none Change to mode 0? reset window sizes, sets[02ca] to 0000
23 xx yy aa bb ???
24 xxxx aa bb cc dd ee ff gg Draw image Draw image with file index xxxx. aa bb*8 cc dd*8 ee ff*8 gg(=0xff) writing stuff to vram
25 xxxx yy zzzz Fade screen Shifts the palette values to fade screen to/from black.
26 xxxx Wait timer Waits for xxxx to count down to zero. If it is FFFF, it will instead wait until the player hits a button.
27 xxxx ???
28 none Draw text window?
29 none Clear text window?
2A xxxx aa bb cc dd ee ff yyyy gg zzzz Scrolling image
2B none ???
2C xx yy ???
2D xxxx ???
2E none Load saved game
2F xx ??? (xx*8*50h)+14h (i.e. 04 --> a14) becomes DI start position on write to vram, same subroutines as 24.
30 none ???
31 none ???
32 xx ???

Text Format

Opcode 0F is the dialog text command. It displays text in the dialog box until it runs into the escape sequence "/E". The list of special escape sequences used is as follows:

Sequence Effect
/E End of command
/CL Clear the dialog box
/CR Move to a new line(Carriage Return)
/HA Wait for user input before continuing(Halt)

CHAR.BIN Format

    

06 00 [address start of names section] BA 09 [address start of movelist] 43 17 [address start of array of addresses for speech portions]

0x14 bytes for name 00 name delimiter 01 current lvl ff remaining xp 82 hp max 50 mp max 03 ITM? 07 Move 46 41 69 69 69 69 stats:ATK,DEX,AMA,AMR,AMC,AMB 00 01 02 03 08 indexes for moves known 55 00 00 56 00 00 00 a6 00 b6 00 ???? 00 Turn start dialog 01 Hit dialog 02 Missed dialog? 03 KO dialog 36 01 ???? gets compared to [02a0]

move stats(0x21 bytes) 0x14 bytes name 00 name delimiter 00 Type: 0=phys 1=prc 2=brst 3=ray e7 ??? copy to DL, rol (2*[1918]), 01 Range 01 Span 96 Hit 50 Power 01 MP Cost: copy to [1941] 34 index for attack yell 02 00 18 00 ????

OZM Format

Details on the OZM image format can be found on Kirinn B's github.

Back

Home