Holy Girl Force Lakers 2 Technical Data

Apostrophe Hack

Like the first game, the engine for Lakers does not display the half-width apostrophe character(hex byte 27), as it uses that to indicate a call to a certain subroutine. Once again, we can change the value it checks for to an unused punctuation instead.


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

Incorrect graphic for Flying Ema in Database

There is an error in the original that displays the wrong graphic for Flying Ema in the Database. The command "0f 1d 03 00 00 00 1a 24 00 2b 86 00 ff 00 00 00 00" before the Flying Ema description needs changed to "0f 1a 03..."

Opening text typing

For the character bios in the intro, it "types" the character info pausing at predetermined points. When replacing the text with english, the pauses have to be manually repositioned.

	The "cursor" position is written to 1a64:009c, first one is 04d8, 0550, 05c8, 0640, 06b8
		[01f2] and [01f4] are used for something, a segment address it copies from the graphics plane and then copies back to the same spot?
	13ca:17df starts the text for Star Laker sets [009c] to 04d8, pushes two numbers (a,b) to the stack calls to 48cc to draws the text from column b to column a (range 0-14 or 15), pushes 03 and calls 4a2f to pause and flash the cursor, adds 78h to 9c whenever it hits the end of a line
		call 4b85 before to do the wipe fade in on the name and stats
	rest of the Lakers set 9c to 04b0, 0410 for Blade Knight
	13ca:1ab5 starts for Kungfu Laker, 1db3 for Judo Laker, 209e for Soul Laker, 239e for Bunny Laker, 26ca for Blade Knight
	Search "c7069c00" in L2_OPEN.EXE to find the locations, b8xxxx sets ax to the value, 50 pushes it to the stack, 33c0 clears ax (set to 0000), e8xxxx calls relative to the current instruction
	
	Star(17df-186f):	[9c]=04d8 (0,0) p (15,0) n (0,0) p (14,0) n (14,0) n (2,0) p (14,2) n (10,0)		[145 bytes]
		(e)Star:	[9c]=04b0 (0,0) p (15,0) n (0,0) p (14,0) n (14,0) n (c,0) p (14,c) n (f,0)			[145 bytes]
	Kungfu(1ab5-1b6d):	[9c]=04b0 (0,0) p (15,0) n (7,0) p (14,7) n (7,0) p (14,7) n (c,0) p (14,c) n (14,0) n (6,0)	[185 bytes]
		(e)Kungfu:	[9c]=04b0 (0,0) p (15,0) n (15,0) n (15,0) n (0,0) p (14,0) n (14,0) n (4,0) 					[141 bytes]
	Judo(1db3-1e56):	[9c]=04b0 (0,0) p (15,0) n (7,0) p (15,7) n (15,0) n (10,0) p (15,10) n (15,0) n (5,0)		[164 bytes]
		(e)Judo:	[9c]=04b0 (0,0) p (15,0) n (d,0) p (15,d) n (10,0) p (15,10) n (15,0) n (15,0) n (4,0)		[164 bytes]
	Soul(209e-2156):	[9c]=04b0 (0,0) p (14,0) n (b,0) p (14,b) n (f,0) p (14,f) n (a,0) p (14,a) n (14,0) n (b,0)	[185 bytes]	
		(e)Soul:	[9c]=04b0 (0,0) p (14,0) n (14,0) n (4,0) p (14,4) n (14,0) n (5,0) p (14,5) n (9,0)			[174 bytes]
	Bunny(239e-2441):	[9c]=04b0 (0,0) p (14,0) n (b,0) p (14,b) n (14,0) n (a,0) p (14,a) n (14,0) n (10,0)		[164 bytes]
		(e)Bunny:	[9c]=04b0 (0,0) p (14,0) n (14,0) n (0,0) p (14,0) n (3,0) p (14,3) n (14,0) n (5,0)		[162 bytes]
	Blade(26ca-2773):	[9c]=0410 (0,0) p (14,0) n (14,0) n (6,0) p (14,6) n (14,0) n (14,0) n (11,0) p [9c]=00a0 (14,0)	[169 bytes]
		(e)Blade:	[9c]=0410 (0,0) p (14,0) n (14,0) n (14,0) n (c,0) p (14,c) n (14,0) n (10,0) p [9c]=00a0 (11,0)	[169 bytes]
	

	[9c]=x:	c7 06 9c 00 xl xh (6 bytes)		
	(0,0):	33 c0 50 33 c0 50 e8 [48cc - address] 59 59 (11 bytes)
	(x,0):	b8 xl xh 50 33 c0 50 e8 [48cc - address] 59 59 (12 bytes)
	(x,y):	b8 xl xh 50 b8 yl yh 50 e8 [48cc - address] 59 59 (13 bytes)
	p:		b8 03 00 50 e8 [4a2f - address] 59 (8 bytes)
	n:		83 06 9c 00 78 (5 bytes)
	

ASM hacks in L2_OPEN.EXE


	STAR (19df-1a6f)
	original:	c7 06 9c 00 d8 04 33 c0 50 33 c0 50 e8 de 30 59 59 b8 03 00 50 e8 38 32 59 b8 15 00 50 33 c0 50 e8 ca 30 59 59 83 06 9c 00 78 33 c0 50 33 c0 50 e8 ba 30 59 59 b8 03 00 50 e8 14 32 59 b8 14 00 50 33 c0 50 e8 a6 30 59 59 83 06 9c 00 78 b8 14 00 50 33 c0 50 e8 95 30 59 59 83 06 9c 00 78 b8 02 00 50 33 c0 50 e8 84 30 59 59 b8 03 00 50 e8 de 31 59 b8 14 00 50 b8 02 00 50 e8 6f 30 59 59 83 06 9c 00 78 b8 10 00 50 33 c0 50 e8 5e 30 59 59  
	new:		c7 06 9c 00 d8 04 33 c0 50 33 c0 50 e8 de 30 59 59 b8 03 00 50 e8 38 32 59 b8 15 00 50 33 c0 50 e8 ca 30 59 59 83 06 9c 00 78 33 c0 50 33 c0 50 e8 ba 30 59 59 b8 03 00 50 e8 14 32 59 b8 14 00 50 33 c0 50 e8 a6 30 59 59 83 06 9c 00 78 b8 14 00 50 33 c0 50 e8 95 30 59 59 83 06 9c 00 78 b8 0c 00 50 33 c0 50 e8 84 30 59 59 b8 03 00 50 e8 de 31 59 b8 14 00 50 b8 0c 00 50 e8 6f 30 59 59 83 06 9c 00 78 b8 0f 00 50 33 c0 50 e8 5e 30 59 59  
	KUNGFU (1cb5-1d6d)
	original:	c7 06 9c 00 b0 04 33 c0 50 33 c0 50 e8 08 2e 59 59 b8 03 00 50 e8 62 2f 59 b8 15 00 50 33 c0 50 e8 f4 2d 59 59 83 06 9c 00 78 b8 07 00 50 33 c0 50 e8 e3 2d 59 59 b8 03 00 50 e8 3d 2f 59 b8 14 00 50 b8 07 00 50 e8 ce 2d 59 59 83 06 9c 00 78 b8 07 00 50 33 c0 50 e8 bd 2d 59 59 b8 03 00 50 e8 17 2f 59 b8 14 00 50 b8 07 00 50 e8 a8 2d 59 59 83 06 9c 00 78 b8 0c 00 50 33 c0 50 e8 97 2d 59 59 b8 03 00 50 e8 f1 2e 59 b8 14 00 50 b8 0c 00 50 e8 82 2d 59 59 83 06 9c 00 78 b8 14 00 50 33 c0 50 e8 71 2d 59 59 83 06 9c 00 78 b8 06 00 50 33 c0 50 e8 60 2d 59 59 
	new:		c7 06 9c 00 b0 04 33 c0 50 33 c0 50 e8 08 2e 59 59 b8 03 00 50 e8 62 2f 59 b8 15 00 50 33 c0 50 e8 f4 2d 59 59 83 06 9c 00 78 b8 15 00 50 33 c0 50 e8 e3 2d 59 59 83 06 9c 00 78 b8 15 00 50 33 c0 50 e8 d2 2d 59 59 83 06 9c 00 78 33 c0 50 33 c0 50 e8 c2 2d 59 59 b8 03 00 50 e8 1c 2f 59 59 b8 15 00 50 33 c0 50 e8 ad 2d 59 59 83 06 9c 00 78 b8 15 00 50 33 c0 50 e8 9c 2d 59 59 83 06 9c 00 78 b8 04 00 50 33 c0 50 e8 8b 2d 59 59 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 
	JUDO (1fb3-2056)
	original:	C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 0A 2B 59 59 B8 03 00 50 E8 64 2C 59 B8 15 00 50 33 C0 50 E8 F6 2A 59 59 83 06 9C 00 78 B8 07 00 50 33 C0 50 E8 E5 2A 59 59 B8 03 00 50 E8 3F 2C 59 B8 15 00 50 B8 07 00 50 E8 D0 2A 59 59 83 06 9C 00 78 B8 15 00 50 33 C0 50 E8 BF 2A 59 59 83 06 9C 00 78 B8 10 00 50 33 C0 50 E8 AE 2A 59 59 B8 03 00 50 E8 08 2C 59 B8 15 00 50 B8 10 00 50 E8 99 2A 59 59 83 06 9C 00 78 B8 15 00 50 33 C0 50 E8 88 2A 59 59 83 06 9C 00 78 B8 05 00 50 33 C0 50 E8 77 2A 59 59 
	new:		C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 0A 2B 59 59 B8 03 00 50 E8 64 2C 59 B8 15 00 50 33 C0 50 E8 F6 2A 59 59 83 06 9C 00 78 B8 0D 00 50 33 C0 50 E8 E5 2A 59 59 B8 03 00 50 E8 3F 2C 59 B8 15 00 50 B8 0D 00 50 E8 D0 2A 59 59 83 06 9C 00 78 B8 10 00 50 33 C0 50 E8 BF 2A 59 59 B8 03 00 50 E8 19 2C 59 B8 15 00 50 B8 10 00 50 E8 AA 2A 59 59 83 06 9C 00 78 B8 15 00 50 33 C0 50 E8 99 2A 59 59 83 06 9C 00 78 B8 15 00 50 33 C0 50 E8 88 2A 59 59 83 06 9C 00 78 B8 04 00 50 33 C0 50 E8 77 2A 59 59 
	SOUL (229e-2356)
	original:	C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 1F 28 59 59 B8 03 00 50 E8 79 29 59 B8 14 00 50 33 C0 50 E8 0B 28 59 59 83 06 9C 00 78 B8 0B 00 50 33 C0 50 E8 FA 27 59 59 B8 03 00 50 E8 54 29 59 B8 14 00 50 B8 0B 00 50 E8 E5 27 59 59 83 06 9C 00 78 B8 0F 00 50 33 C0 50 E8 D4 27 59 59 B8 03 00 50 E8 2E 29 59 B8 14 00 50 B8 0F 00 50 E8 BF 27 59 59 83 06 9C 00 78 B8 0A 00 50 33 C0 50 E8 AE 27 59 59 B8 03 00 50 E8 08 29 59 B8 14 00 50 B8 0A 00 50 E8 99 27 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 88 27 59 59 83 06 9C 00 78 B8 0B 00 50 33 C0 50 E8 77 27 59 59 
	new:		C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 1F 28 59 59 B8 03 00 50 E8 79 29 59 B8 14 00 50 33 C0 50 E8 0B 28 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 FA 27 59 59 83 06 9C 00 78 B8 04 00 50 33 C0 50 E8 E9 27 59 59 B8 03 00 50 E8 43 29 59 B8 14 00 50 B8 04 00 50 E8 D4 27 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 C3 27 59 59 83 06 9C 00 78 B8 05 00 50 33 C0 50 E8 B2 27 59 59 B8 03 00 50 E8 0C 29 59 B8 14 00 50 B8 05 00 50 E8 9D 27 59 59 83 06 9C 00 78 B8 09 00 50 33 C0 50 E8 8C 27 59 59 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 
	BUNNY (259e-2641)
	original:	C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 1F 25 59 59 B8 03 00 50 E8 79 26 59 B8 14 00 50 33 C0 50 E8 0B 25 59 59 83 06 9C 00 78 B8 0B 00 50 33 C0 50 E8 FA 24 59 59 B8 03 00 50 E8 54 26 59 B8 14 00 50 B8 0B 00 50 E8 E5 24 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 D4 24 59 59 83 06 9C 00 78 B8 0A 00 50 33 C0 50 E8 C3 24 59 59 B8 03 00 50 E8 1D 26 59 B8 14 00 50 B8 0A 00 50 E8 AE 24 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 9D 24 59 59 83 06 9C 00 78 B8 10 00 50 33 C0 50 E8 8C 24 59 59 
	new:		C7 06 9C 00 B0 04 33 C0 50 33 C0 50 E8 1F 25 59 59 B8 03 00 50 E8 79 26 59 B8 14 00 50 33 C0 50 E8 0B 25 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 FA 24 59 59 83 06 9C 00 78 33 C0 50 33 C0 50 E8 EA 24 59 59 B8 03 00 50 E8 44 26 59 B8 14 00 50 33 C0 50 E8 D6 24 59 59 83 06 9C 00 78 B8 03 00 50 33 C0 50 E8 C5 24 59 59 B8 03 00 50 E8 1F 26 59 B8 14 00 50 B8 03 00 50 E8 B0 24 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 9F 24 59 59 83 06 9C 00 78 B8 05 00 50 33 C0 50 E8 8E 24 59 59 90 90 
	BLADE (28ca-2973)
	original:	C7 06 9C 00 10 04 33 C0 50 33 C0 50 E8 F3 21 59 59 B8 03 00 50 E8 4D 23 59 B8 14 00 50 33 C0 50 E8 DF 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 CE 21 59 59 83 06 9C 00 78 B8 06 00 50 33 C0 50 E8 BD 21 59 59 B8 03 00 50 E8 17 23 59 B8 14 00 50 B8 06 00 50 E8 A8 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 97 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 86 21 59 59 83 06 9C 00 78 B8 11 00 50 33 C0 50 E8 75 21 59 59 B8 03 00 50 E8 CF 22 59 81 06 9C 00 A0 00 B8 14 00 50 33 C0 50 E8 5B 21 59 59 
	new:		C7 06 9C 00 10 04 33 C0 50 33 C0 50 E8 F3 21 59 59 B8 03 00 50 E8 4D 23 59 B8 14 00 50 33 C0 50 E8 DF 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 CE 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 BD 21 59 59 83 06 9C 00 78 B8 0C 00 50 33 C0 50 E8 AC 21 59 59 B8 03 00 50 E8 06 23 59 B8 14 00 50 B8 0C 00 50 E8 97 21 59 59 83 06 9C 00 78 B8 14 00 50 33 C0 50 E8 86 21 59 59 83 06 9C 00 78 B8 10 00 50 33 C0 50 E8 75 21 59 59 B8 03 00 50 E8 CF 22 59 81 06 9C 00 A0 00 B8 11 00 50 33 C0 50 E8 5B 21 59 59 
	

Game Files

Lakers 2 uses the same file types as the first game, with the game scripts and data in BIN files, but the internal format is different for the REI2.EXE executable. There is separate executable for the games opening cinematic, L2_OPEN.EXE. It uses the same OZM format for graphics as the first game, but also uses OLH files for animations.

	disk1
		BAT_000 - BAT_019.BIN	no text
		BATTLE.BIN 				no text
		ENDING.BIN
		GAME_END.BIN
		GAMEOVER.BIN
		OPENING.BIN
		REI2_CHR.BIN			
		REI2_MES.BIN
		SEXSCENE.BIN			no text
		SYSTEM.BIN
		VBATTLE.BIN				no text
	disk2
		no bin files
	disk3
		S01_002 - S01_010.BIN
		S02_001 - S02_009.BIN
		S03_001 - S03_004.BIN
		SEX_000 - SEX_001.BIN
		VBTL_001 - VBTL_002.BIN
	disk4
		S03_005 - S03_008.BIN
		S04_001 - S04_008.BIN
		S05_001 - S05_009.BIN
		SEX_002 - SEX_003.BIN
	disk5
		S06_001 - S06_009.BIN
		S07_001 - S07_007.BIN
		S08_001 - S08_006.BIN
		SEX_004 - SEX_006.BIN
	disk6
		S09_001 - S09_005.BIN
		S10_001 - S10_008.BIN
	disk7
		BAT_000 - BAT_019.BIN	same files as on disk 1
		EVN_000 - EVN_019.BIN
		GAMEOVER.BIN			same file as on disk 1
	disk8
		BANK_00 - BANK_05.BIN
		CHANGE.BIN
	

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. The script files can have data before the actual script starts so the first two bytes is a pointer to where the actual script starts. Similar to the first game, REI2_CHR.BIN contains the character, equipment, and attack data and REI2_MES.BIN has the various lines of battle dialog. The BAT_xx.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 yy zz Conditional jump jnz If the value at the memory address stored in variables xx and yy are equal, move read pointer to the address stored in variable zz.
01 xx yy zz Conditional jump jz If the value at the memory address stored in variables xx and yy are NOT equal , 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 variables xx and yy..., 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 variables xx and yy..., 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 variables xx and yy..., 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 variables xx and yy..., 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 xxxx yy zzzz aa bbbb cc dddd ee ff gg hhhh Draw transparent image? draw image with transparency at screen position x,y*8.
10 xx yyyy zz aa Draw text window Draws text window 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 zz aaaa bbbb cc ???
12 xx yyyy zz aa bb Draw window Draws image in a window and assigns the window index zz.
13 xx Clear window Clears window number xx and redraws what was behind it.
14 xx yy zz aa ???
15 xxxx yy zzzz ???
16 xx yyyy zz aa bbbb cccc dddd eeee ffff gg hh iiii jj kk ll ???
17 xx ??? Loads the BTLxx.BIN file at file index xxxx and begins the battle scenario.
18 ** Text mode Begins displaying text in the dialog box until the escape character "/E" is read. See the Text Format for more details.
19 xx yyyy zzzz aa bb cc dd ee (** 00) Menu text Display text at position (x*8,y), c= number of lines terminated by 00, used for menus and names in the the text boxes.
1A xx yy (...(yy*8 bytes)) Set menu attributes?
1B xxxx Load music Load music file at file index xxxx.
1C none ???
1D xx ???
1E none ???
1F xx yy Load script file Load script file at file index in variable xx and set pointer to position in variable yy.
20 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.
21 xxxx ???
22 xxxx yy aa bb cc dd ee ff gggg hh ii ???
23 xx yy ???
24 xx yy zz aaaa bb ???
25 xxxx yy zzzz aa bbbb cc dddd eeee ffff gggg ???
26 xx yyyy zz aaaa bb cccc ???
27 xxxx yy ???
28 xx ???
29 xxxx ???
2A xxxx yy zzzz aa bb cccc Draw image?
2B none ???
2C none ???
2D xxxx Start battle
2E none Load game screen
2F none Save game screen (xx*8*50h)+14h (i.e. 04 --> a14) becomes DI start position on write to vram, same subroutines as 24.
30 xx ???
31 xx ???
32 xxxx yyyy zz aa bb cc dd ee ffff gg hh ii jj kk ll mmmm nn oooo Scrolling image??
33 xx yy ???
34 xx yy ???
35 none ???
36 none ???
37 xx ???
38 none ???
39 none ??? database option at main menu?
3a none Sound enable Turn on sound.
3b none Sound disable Turn off sound.

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)

OZM Format

Details on the OZM and OLH image formats can be found on Kirinn B's github.

Back

Home