Talk:SGA

From MultimediaWiki
Jump to navigation Jump to search

32x File Format

I disassembled the nt.bin and subload.bin, looks like most of the decoding is done on the 68k side, rather than the sh2 (32x) side.

I will document my curiosities here, for others to read.

Special Values in decoding

If the y tile size is 11 then special values are 01 and 03, otherwise its 04 and 02. Havent found where its used yet. But those values pop up all over the compressed data.

LAB_0289:
 move	#$0003,d3		;6390: 363C0003
 move	#$0001,d4		;6394: 383C0001
 cmpi.b	#$11,EXT_000D		;6398: 0C390011002018FF
 beq.s	LAB_028A		;63A0: 6708
 move	#$0002,d3		;63A2: 363C0002
 move	#$0004,d4		;63A6: 383C0004
LAB_028A:
 rts				;63AA: 4E75

Possible code book setup

I think this code here is setting up a code book, whats interesting that it seeks to a specific location. Plus there is a specific code book size.

adda.l	#$00003004,a0		;6010: D1FC00003004
movea.l	EXT_016B.w,a1		;6016: 2278AA66
adda.l	#$00003020,a1		;601A: D3FC00003020
move	#$1800,d0		;6020: 303C1800
bsr	LAB_0281		;6024: 610001EC