Finally starting a proper git repo for this stuff
This commit is contained in:
commit
1de3750e55
82 changed files with 618041 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
*.smc
|
||||
*.sfc
|
||||
*.srm
|
||||
*.sram
|
||||
*.usage
|
||||
how_bad_is_it.txt
|
154
all.asm
Executable file
154
all.asm
Executable file
|
@ -0,0 +1,154 @@
|
|||
hirom
|
||||
incsrc macros.asm
|
||||
incsrc constants.asm
|
||||
|
||||
org $C00000
|
||||
incsrc bank_C0.asm
|
||||
org $808000
|
||||
incsrc bank_80.asm
|
||||
org $C10000
|
||||
incsrc bank_C1.asm
|
||||
org $C20000
|
||||
incsrc bank_C2.asm
|
||||
org $C30000
|
||||
incsrc bank_C3.asm
|
||||
org $C40000
|
||||
incsrc bank_C4.asm
|
||||
org $C50000
|
||||
incsrc bank_C5.asm
|
||||
org $C60000
|
||||
incsrc bank_C6.asm
|
||||
org $C70000
|
||||
incsrc bank_C7.asm
|
||||
org $C80000
|
||||
incsrc bank_C8.asm
|
||||
org $C90000
|
||||
incsrc bank_C9.asm
|
||||
org $CA0000
|
||||
incsrc bank_CA.asm
|
||||
org $CB0000
|
||||
incsrc bank_CB.asm
|
||||
org $CC0000
|
||||
incsrc bank_CC.asm
|
||||
org $CD0000
|
||||
incsrc bank_CD.asm
|
||||
org $CE0000
|
||||
incsrc bank_CE.asm
|
||||
org $CF0000
|
||||
incsrc bank_CF.asm
|
||||
org $D00000
|
||||
incsrc bank_D0.asm
|
||||
org $D10000
|
||||
incsrc bank_D1.asm
|
||||
org $D20000
|
||||
incsrc bank_D2.asm
|
||||
org $D30000
|
||||
incsrc bank_D3.asm
|
||||
org $D40000
|
||||
incsrc bank_D4.asm
|
||||
org $D50000
|
||||
incsrc bank_D5.asm
|
||||
org $D60000
|
||||
incsrc bank_D6.asm
|
||||
org $D70000
|
||||
incsrc bank_D7.asm
|
||||
org $D80000
|
||||
incsrc bank_D8.asm
|
||||
org $D90000
|
||||
incsrc bank_D9.asm
|
||||
org $DA0000
|
||||
incsrc bank_DA.asm
|
||||
org $DB0000
|
||||
incsrc bank_DB.asm
|
||||
org $DC0000
|
||||
incsrc bank_DC.asm
|
||||
org $DD0000
|
||||
incsrc bank_DD.asm
|
||||
org $DE0000
|
||||
incsrc bank_DE.asm
|
||||
org $DF0000
|
||||
incsrc bank_DF.asm
|
||||
org $E00000
|
||||
incsrc bank_E0.asm
|
||||
org $E10000
|
||||
incsrc bank_E1.asm
|
||||
org $E20000
|
||||
incsrc bank_E2.asm
|
||||
org $E30000
|
||||
incsrc bank_E3.asm
|
||||
org $E40000
|
||||
incsrc bank_E4.asm
|
||||
org $E50000
|
||||
incsrc bank_E5.asm
|
||||
org $E60000
|
||||
incsrc bank_E6.asm
|
||||
org $E70000
|
||||
incsrc bank_E7.asm
|
||||
org $E80000
|
||||
incsrc bank_E8.asm
|
||||
org $E90000
|
||||
incsrc bank_E9.asm
|
||||
org $EA0000
|
||||
incsrc bank_EA.asm
|
||||
org $EB0000
|
||||
incsrc bank_EB.asm
|
||||
org $EC0000
|
||||
incsrc bank_EC.asm
|
||||
org $ED0000
|
||||
incsrc bank_ED.asm
|
||||
org $EE0000
|
||||
incsrc bank_EE.asm
|
||||
org $EF0000
|
||||
incsrc bank_EF.asm
|
||||
org $F00000
|
||||
incsrc bank_F0.asm
|
||||
org $F10000
|
||||
incsrc bank_F1.asm
|
||||
org $F20000
|
||||
incsrc bank_F2.asm
|
||||
org $F30000
|
||||
incsrc bank_F3.asm
|
||||
org $B38000
|
||||
incsrc bank_B3.asm
|
||||
org $F40000
|
||||
incsrc bank_F4.asm
|
||||
org $B48000
|
||||
incsrc bank_B4.asm
|
||||
org $F50000
|
||||
incsrc bank_F5.asm
|
||||
org $B58000
|
||||
incsrc bank_B5.asm
|
||||
org $F60000
|
||||
incsrc bank_F6.asm
|
||||
org $B68000
|
||||
incsrc bank_B6.asm
|
||||
org $F70000
|
||||
incsrc bank_F7.asm
|
||||
org $F80000
|
||||
incsrc bank_F8.asm
|
||||
org $B88000
|
||||
incsrc bank_B8.asm
|
||||
org $F90000
|
||||
incsrc bank_F9.asm
|
||||
org $B98000
|
||||
incsrc bank_B9.asm
|
||||
org $FA0000
|
||||
incsrc bank_FA.asm
|
||||
org $BA8000
|
||||
incsrc bank_BA.asm
|
||||
org $FB0000
|
||||
incsrc bank_FB.asm
|
||||
org $BB8000
|
||||
incsrc bank_BB.asm
|
||||
org $FC0000
|
||||
incsrc bank_FC.asm
|
||||
org $BC8000
|
||||
incsrc bank_BC.asm
|
||||
org $FD0000
|
||||
incsrc bank_FD.asm
|
||||
org $FE0000
|
||||
incsrc bank_FE.asm
|
||||
org $BE8000
|
||||
incsrc bank_BE.asm
|
||||
org $FF0000
|
||||
incsrc bank_FF.asm
|
12238
bank_80.asm
Executable file
12238
bank_80.asm
Executable file
File diff suppressed because it is too large
Load diff
14115
bank_B3.asm
Executable file
14115
bank_B3.asm
Executable file
File diff suppressed because it is too large
Load diff
9058
bank_B4.asm
Executable file
9058
bank_B4.asm
Executable file
File diff suppressed because it is too large
Load diff
12519
bank_B5.asm
Executable file
12519
bank_B5.asm
Executable file
File diff suppressed because it is too large
Load diff
12051
bank_B6.asm
Executable file
12051
bank_B6.asm
Executable file
File diff suppressed because it is too large
Load diff
12430
bank_B8.asm
Executable file
12430
bank_B8.asm
Executable file
File diff suppressed because it is too large
Load diff
7451
bank_B9.asm
Executable file
7451
bank_B9.asm
Executable file
File diff suppressed because it is too large
Load diff
6198
bank_BA.asm
Executable file
6198
bank_BA.asm
Executable file
File diff suppressed because it is too large
Load diff
9866
bank_BB.asm
Executable file
9866
bank_BB.asm
Executable file
File diff suppressed because it is too large
Load diff
4572
bank_BC.asm
Executable file
4572
bank_BC.asm
Executable file
File diff suppressed because it is too large
Load diff
10233
bank_BE.asm
Executable file
10233
bank_BE.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_C0.asm
Executable file
4096
bank_C0.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C1.asm
Executable file
8192
bank_C1.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C2.asm
Executable file
8192
bank_C2.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C3.asm
Executable file
8192
bank_C3.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C4.asm
Executable file
8192
bank_C4.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C5.asm
Executable file
8192
bank_C5.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C6.asm
Executable file
8192
bank_C6.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C7.asm
Executable file
8192
bank_C7.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C8.asm
Executable file
8192
bank_C8.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_C9.asm
Executable file
8192
bank_C9.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CA.asm
Executable file
8192
bank_CA.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CB.asm
Executable file
8192
bank_CB.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CC.asm
Executable file
8192
bank_CC.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CD.asm
Executable file
8192
bank_CD.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CE.asm
Executable file
8192
bank_CE.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_CF.asm
Executable file
8192
bank_CF.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D0.asm
Executable file
8192
bank_D0.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D1.asm
Executable file
8192
bank_D1.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D2.asm
Executable file
8192
bank_D2.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D3.asm
Executable file
8192
bank_D3.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D4.asm
Executable file
8192
bank_D4.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D5.asm
Executable file
8192
bank_D5.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D6.asm
Executable file
8192
bank_D6.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D7.asm
Executable file
8192
bank_D7.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D8.asm
Executable file
8192
bank_D8.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_D9.asm
Executable file
8192
bank_D9.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DA.asm
Executable file
8192
bank_DA.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DB.asm
Executable file
8192
bank_DB.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DC.asm
Executable file
8192
bank_DC.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DD.asm
Executable file
8192
bank_DD.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DE.asm
Executable file
8192
bank_DE.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_DF.asm
Executable file
8192
bank_DF.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E0.asm
Executable file
8192
bank_E0.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E1.asm
Executable file
8192
bank_E1.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E2.asm
Executable file
8192
bank_E2.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E3.asm
Executable file
8192
bank_E3.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E4.asm
Executable file
8192
bank_E4.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E5.asm
Executable file
8192
bank_E5.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E6.asm
Executable file
8192
bank_E6.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E7.asm
Executable file
8192
bank_E7.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_E8.asm
Executable file
8192
bank_E8.asm
Executable file
File diff suppressed because it is too large
Load diff
8196
bank_E9.asm
Executable file
8196
bank_E9.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_EA.asm
Executable file
8192
bank_EA.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_EB.asm
Executable file
8192
bank_EB.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_EC.asm
Executable file
8192
bank_EC.asm
Executable file
File diff suppressed because it is too large
Load diff
8205
bank_ED.asm
Executable file
8205
bank_ED.asm
Executable file
File diff suppressed because it is too large
Load diff
8617
bank_EE.asm
Executable file
8617
bank_EE.asm
Executable file
File diff suppressed because it is too large
Load diff
8504
bank_EF.asm
Executable file
8504
bank_EF.asm
Executable file
File diff suppressed because it is too large
Load diff
8277
bank_F0.asm
Executable file
8277
bank_F0.asm
Executable file
File diff suppressed because it is too large
Load diff
8299
bank_F1.asm
Executable file
8299
bank_F1.asm
Executable file
File diff suppressed because it is too large
Load diff
8276
bank_F2.asm
Executable file
8276
bank_F2.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_F3.asm
Executable file
4096
bank_F3.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_F4.asm
Executable file
4096
bank_F4.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_F5.asm
Executable file
4096
bank_F5.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_F6.asm
Executable file
4096
bank_F6.asm
Executable file
File diff suppressed because it is too large
Load diff
8192
bank_F7.asm
Executable file
8192
bank_F7.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_F8.asm
Executable file
4096
bank_F8.asm
Executable file
File diff suppressed because it is too large
Load diff
4099
bank_F9.asm
Executable file
4099
bank_F9.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_FA.asm
Executable file
4096
bank_FA.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_FB.asm
Executable file
4096
bank_FB.asm
Executable file
File diff suppressed because it is too large
Load diff
4096
bank_FC.asm
Executable file
4096
bank_FC.asm
Executable file
File diff suppressed because it is too large
Load diff
8302
bank_FD.asm
Executable file
8302
bank_FD.asm
Executable file
File diff suppressed because it is too large
Load diff
4097
bank_FE.asm
Executable file
4097
bank_FE.asm
Executable file
File diff suppressed because it is too large
Load diff
8256
bank_FF.asm
Executable file
8256
bank_FF.asm
Executable file
File diff suppressed because it is too large
Load diff
835
compression.asm
Normal file
835
compression.asm
Normal file
|
@ -0,0 +1,835 @@
|
|||
;Command set 1 jump table
|
||||
CODE_BB8000:
|
||||
NOP
|
||||
JMP CODE_BB8E2A
|
||||
|
||||
CODE_BB8004:
|
||||
NOP
|
||||
JMP CODE_BB8E96
|
||||
|
||||
CODE_BB8008:
|
||||
NOP
|
||||
JMP CODE_BB8EB4
|
||||
|
||||
CODE_BB800C:
|
||||
NOP
|
||||
JMP CODE_BB8EEB
|
||||
|
||||
CODE_BB8010:
|
||||
NOP
|
||||
JMP CODE_BB8F26
|
||||
|
||||
CODE_BB8014:
|
||||
NOP
|
||||
JMP CODE_BB8F53
|
||||
|
||||
CODE_BB8018:
|
||||
NOP
|
||||
JMP CODE_BB8F80
|
||||
|
||||
CODE_BB801C:
|
||||
NOP
|
||||
JMP CODE_BB8F9C
|
||||
|
||||
CODE_BB8020:
|
||||
NOP
|
||||
JMP CODE_BB8FAE
|
||||
|
||||
CODE_BB8024:
|
||||
NOP
|
||||
JMP CODE_BB8FC0
|
||||
|
||||
CODE_BB8028:
|
||||
NOP
|
||||
JMP CODE_BB8FFF
|
||||
|
||||
CODE_BB802C:
|
||||
NOP
|
||||
JMP CODE_BB9062
|
||||
|
||||
CODE_BB8030:
|
||||
NOP
|
||||
JMP CODE_BB90C9
|
||||
|
||||
CODE_BB8034:
|
||||
NOP
|
||||
JMP CODE_BB9138
|
||||
|
||||
CODE_BB8038:
|
||||
NOP
|
||||
JMP CODE_BB9150
|
||||
|
||||
CODE_BB803C:
|
||||
NOP
|
||||
JMP CODE_BB9176
|
||||
|
||||
;Command set 2 jump table
|
||||
CODE_BB8040:
|
||||
JMP CODE_BB8E6F
|
||||
|
||||
CODE_BB8043:
|
||||
NOP
|
||||
JMP CODE_BB8EAA
|
||||
|
||||
CODE_BB8047:
|
||||
NOP
|
||||
JMP CODE_BB8EDB
|
||||
|
||||
CODE_BB804B:
|
||||
NOP
|
||||
JMP CODE_BB8F01
|
||||
|
||||
CODE_BB804F:
|
||||
NOP
|
||||
JMP CODE_BB8F3B
|
||||
|
||||
CODE_BB8053:
|
||||
NOP
|
||||
JMP CODE_BB8F68
|
||||
|
||||
CODE_BB8057:
|
||||
NOP
|
||||
JMP CODE_BB8F8E
|
||||
|
||||
CODE_BB805B:
|
||||
NOP
|
||||
JMP CODE_BB8FA5
|
||||
|
||||
CODE_BB805F:
|
||||
NOP
|
||||
JMP CODE_BB8FB7
|
||||
|
||||
CODE_BB8063:
|
||||
NOP
|
||||
JMP CODE_BB8FDE
|
||||
|
||||
CODE_BB8067:
|
||||
NOP
|
||||
JMP CODE_BB9029
|
||||
|
||||
CODE_BB806B:
|
||||
NOP
|
||||
JMP CODE_BB9097
|
||||
|
||||
CODE_BB806F:
|
||||
NOP
|
||||
JMP CODE_BB90F2
|
||||
|
||||
CODE_BB8073:
|
||||
NOP
|
||||
JMP CODE_BB9144
|
||||
|
||||
CODE_BB8077:
|
||||
NOP
|
||||
JMP CODE_BB9163
|
||||
|
||||
CODE_BB807B:
|
||||
NOP
|
||||
JMP CODE_BB9190
|
||||
|
||||
|
||||
;$38 -- destination
|
||||
;$34 -- source
|
||||
;$32 -- run dma after upload (always #$FFFF so never)
|
||||
;The follow two tables map to the opposite intended nibbles.
|
||||
;$42 -- index >> 4 (look up table pointer, set low byte and read for value)
|
||||
; This table allow direct indexing of low nibbles
|
||||
;$46 -- (index & 0x0F) << 4 (look up table pointer, set low byte and read for value)
|
||||
; This table allow direct indexing of high nibbles
|
||||
;$4A -- command set starting at $BB8040
|
||||
;$4E -- command set starting at $BB8000
|
||||
;These are the 6 header bytes of compressed data
|
||||
;$52 -- fill byte 1
|
||||
;$53 -- fill byte 2
|
||||
;$56 -- direct byte 1
|
||||
;$57 -- direct byte 2
|
||||
;$54 -- direct word
|
||||
;Misc addresses
|
||||
;$3C -- operand 1 (usually count)
|
||||
;$3E -- operand 2 (usually offset)
|
||||
|
||||
;Extra notes
|
||||
;All commands are return addresses - 1 so RTS can be used
|
||||
|
||||
CODE_BB8D91: ;
|
||||
STA $38 ;\ Set decompression parameters
|
||||
LDA #$007F ; |
|
||||
STA $3A ; |
|
||||
STX $34 ; |
|
||||
STY $36 ; |
|
||||
BRA CODE_BB8DAE ;/
|
||||
;
|
||||
CODE_BB8D9E: ;
|
||||
TXA ;\ Set decompression parameters
|
||||
TYX ; |
|
||||
STA $34 ; |
|
||||
STX $36 ; |
|
||||
LDA #$0000 ; | Default destination $7F0000
|
||||
STA $38 ; |
|
||||
LDA #$007F ; |
|
||||
STA $3A ;/
|
||||
CODE_BB8DAE: ;
|
||||
LDA #$FFFF ;\ Disble auto DMA of data
|
||||
STA $32 ;/
|
||||
PHB ;\ Preserve call bank/Y
|
||||
PHY ;/
|
||||
LDA #$2100 ;\ Setup pointers to nibble look up tables
|
||||
STA $46 ; |
|
||||
LDA #$007E ; |
|
||||
STA $48 ; |
|
||||
STA $44 ; |
|
||||
LDA #$2000 ; |
|
||||
STA $42 ;/
|
||||
JSL CODE_BB91AF ; Generate nibble offset table at RAM $7E2000
|
||||
LDX $38 ; Load the decompression index
|
||||
LDY #$0001 ; Load the compression index
|
||||
LDA #$8001 ;\ Load default decompression function A 8001
|
||||
STA $4E ;/ The high byte will never change.
|
||||
LDA #$8040 ;\ Load default decompression function B 8040
|
||||
STA $4A ;/
|
||||
SEP #$20 ;
|
||||
LDA $3A ;\ Set the data bank to the destination bank
|
||||
PHA ; |
|
||||
PLB ;/
|
||||
LDA [$34],y ;\ Read fill byte 1
|
||||
STA $52 ; |
|
||||
INY ;/
|
||||
LDA [$34],y ;\ Read fill byte 2
|
||||
STA $53 ; |
|
||||
INY ;/
|
||||
LDA [$34],y ;\ Read direct byte 1
|
||||
STA $56 ; |
|
||||
INY ;/
|
||||
LDA [$34],y ;\ Read direct byte 2
|
||||
STA $57 ; |
|
||||
INY ;/
|
||||
REP #$20 ;\ Read direct word
|
||||
LDA [$34],y ; |
|
||||
STA $54 ;/
|
||||
LDY #$0027 ; Skip to compressed byte #$27
|
||||
STZ $3C ;\ Clear generic operand 1
|
||||
STZ $3E ;/ Clean generic operand 2
|
||||
SEP #$20 ; Return to 8 bit
|
||||
CODE_BB8E02: ;
|
||||
LDA [$34],y ;\ Read the first command byte
|
||||
INY ; |
|
||||
STA $46 ;/
|
||||
AND #$F0 ;\ Command = (byte & 0xF0) >> 2
|
||||
LSR A ; | Range $00-$3C
|
||||
LSR A ; |
|
||||
STA $4E ;/
|
||||
PEI ($4E) ;\ Push and execute command
|
||||
RTS ;/
|
||||
;
|
||||
CODE_BB8E10: ;
|
||||
LDA $46 ; Read next command byte
|
||||
AND #$0F ;\ Command = (byte & 0xF0) >> 2
|
||||
ASL A ; | Range $3F-$7B
|
||||
ASL A ; |
|
||||
ADC #$3F ;/
|
||||
STA $4A ;
|
||||
PEI ($4A) ;\ Push and execute command
|
||||
RTS ;/
|
||||
;
|
||||
CODE_BB8E1D: ;
|
||||
LDA $42 ; Read next command byte
|
||||
AND #$0F ;\ Command = (byte & 0xF0) >> 2
|
||||
ASL A ; | Range $3F-$7B
|
||||
ASL A ; |
|
||||
ADC #$3F ; |
|
||||
STA $4A ;/
|
||||
PEI ($4A) ;\ Push and execute command
|
||||
RTS ;/
|
||||
;
|
||||
CODE_BB8E2A: ;
|
||||
LDA $46 ;\ Read number of bytes to copy
|
||||
AND #$0F ; |
|
||||
BEQ CODE_BB8E40 ;/ If zero bytes, conclude decompression
|
||||
STA $3C ; Store number of bytes to copy
|
||||
CODE_BB8E32: ;
|
||||
LDA [$34],y ;\ Direct copy of up to 16 bytes
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8E32 ;/
|
||||
JMP CODE_BB8E02 ; Read new command
|
||||
;
|
||||
CODE_BB8E40: ;
|
||||
REP #$20 ;\ Restore 16 bit A, data bank and Y
|
||||
PLY ; |
|
||||
PLB ;/
|
||||
TXA ;\ Calculate the number of decompressed bytes (stored in X)
|
||||
SEC ; | X = X - destination (Where X as an operand is the destination offset)
|
||||
SBC $38 ; |
|
||||
TAX ;/
|
||||
LDA $32 ;\ Check if DMA should run
|
||||
BMI CODE_BB8E6E ;/
|
||||
LDA $58 ;\ This would be a be a DMA to VRAM
|
||||
STA $2116 ; | However $32 is a constant and will always be skipped (0xFFFF)
|
||||
LDA $38 ; |
|
||||
STA $4302 ; |
|
||||
LDA $3A ; |
|
||||
STA $4304 ; |
|
||||
STX $4305 ; |
|
||||
LDA #$1801 ; |
|
||||
STA $4300 ; |
|
||||
SEP #$20 ; |
|
||||
LDA #$01 ; |
|
||||
STA $420B ; |
|
||||
REP #$20 ;/
|
||||
CODE_BB8E6E: ;
|
||||
RTL ; Done with decompression
|
||||
;
|
||||
CODE_BB8E6F: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ;\ Store in nibble lookup tables
|
||||
STA $46 ;/
|
||||
LDA [$42] ;\ Load number of bytes to write
|
||||
BEQ CODE_BB8E40 ; | If zero bytes, conclude decompression
|
||||
STA $3C ;/ Store number of bytes to write
|
||||
CODE_BB8E7C: ;
|
||||
LDA [$46] ;\ operand2 = high byte
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ;\ Store in nibble lookup tables
|
||||
STA $46 ;/
|
||||
LDA $3E ; Load operand2
|
||||
ORA [$42] ;\ write operand2 | low nibble
|
||||
STA $0000,x ;/
|
||||
INX ;\ Continue until no there are no more bytes
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8E7C ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB8E96: ;
|
||||
LDA [$46] ;\ Load operand high nibble
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/
|
||||
LDA $3E ; Load operand high nibble
|
||||
ORA [$42] ;\ write high nibble | low nibble
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8EAA: ;
|
||||
LDA [$34],y ;\ Copy one byte from the compression stream
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8EB4: ;
|
||||
LDA [$46] ;\ Load operand high nibble into operand2
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ;\ Store in nibble lookup tables
|
||||
STA $46 ;/
|
||||
LDA $3E ; Load operand2
|
||||
ORA [$42] ;\ write operand2 | low nibble
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
LDA [$46] ;\ Load operand high nibble into operand2
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ; Store in low nibble lookup table
|
||||
LDA $3E ; Load operand2
|
||||
ORA [$42] ;\ write operand2 | low nibble
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8EDB: ;
|
||||
REP #$20 ;\ Copy one word from the compression stream
|
||||
LDA [$34],y ; |
|
||||
STA $0000,x ; |
|
||||
INY ; |
|
||||
INY ; |
|
||||
INX ; |
|
||||
INX ; |
|
||||
SEP #$20 ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8EEB: ;
|
||||
LDA $46 ;\ Load operand
|
||||
AND #$0F ; | Count = operand & 0x0F + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA [$34],y ;\ Load fill byte
|
||||
INY ;/
|
||||
CODE_BB8EF6: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8EF6 ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8F01: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ;\ Store in nibble lookup tables
|
||||
STA $46 ;/
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA [$46] ;\ Operand2 = high nibble
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/ Store low nibble look up
|
||||
LDA $3E ;\ Load operand2
|
||||
ORA [$42] ;/ fill byte = operand2 | low nibble
|
||||
CODE_BB8F1B: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8F1B ;/
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8F26: ;
|
||||
LDA $46 ;\ Load operand
|
||||
AND #$0F ; | Count = operand & 0x0F + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $52 ; Load fill byte 1
|
||||
CODE_BB8F30: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8F30 ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8F3B: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/ Store in low nibble lookup
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $52 ; Load fill byte 1
|
||||
CODE_BB8F48: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8F48 ;/
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8F53: ;
|
||||
LDA $46 ;\ Load operand
|
||||
AND #$0F ; | Count = (operand & 0x0F) + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $53 ; Load fill byte 2
|
||||
CODE_BB8F5D: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8F5D ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8F68: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/ Store in low nibble lookup
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $53 ; Load fill byte 2
|
||||
CODE_BB8F75: ;
|
||||
STA $0000,x ;\ Store and repeat with fill byte.
|
||||
INX ; |
|
||||
DEC $3C ; |
|
||||
BNE CODE_BB8F75 ;/
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8F80: ;
|
||||
REP #$20 ;\ Store direct word
|
||||
LDA $54 ; |
|
||||
STA $0000,x ; |
|
||||
INX ; |
|
||||
INX ; |
|
||||
SEP #$20 ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB8F8E: ;
|
||||
REP #$20 ;\ Store direct word
|
||||
LDA $54 ; |
|
||||
STA $0000,x ; |
|
||||
INX ; |
|
||||
INX ; |
|
||||
SEP #$20 ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8F9C: ;
|
||||
LDA $56 ;\ Store direct byte 1
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB8FA5: ;
|
||||
LDA $56 ;\ Store direct byte 1
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8FAE: ;
|
||||
LDA $57 ;\ Store direct byte 2
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB8FB7: ;
|
||||
LDA $57 ;\ Store direct byte 2
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8FC0: ;
|
||||
PHY ; Preserve compression index
|
||||
LDA $46 ; Load operand
|
||||
AND #$0F ;\ Offset = (operand & 0x0F) + 2
|
||||
ADC #$02 ; |
|
||||
STA $3E ;/
|
||||
REP #$20 ;\ Prepare to copy (1 word) from a previous point in decompressed data
|
||||
TXA ; | The new offset is stored in Y
|
||||
SEC ; | Y = X - offset
|
||||
SBC $3E ; |
|
||||
TAY ;/
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
STA $0000,x ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
SEP #$20 ; Return to 8 bit A
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB8FDE: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/
|
||||
LDA [$42] ;\ Offset = low nibble + 2
|
||||
ADC #$02 ; |
|
||||
STA $3E ;/
|
||||
PHY ; Preserve compression index
|
||||
REP #$20 ;\ Prepare to copy (1 word) from a previous point in decompressed data
|
||||
TXA ; | The new offset is stored in Y
|
||||
SEC ; | Y = X - offset
|
||||
SBC $3E ; |
|
||||
TAY ;/
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
STA $0000,x ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
SEP #$20 ; Return to 8 bit A
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB8FFF: ;
|
||||
LDA $46 ; Load next operand
|
||||
AND #$0F ;\ Count = (operand & 0x0F) + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
STA $3E ; |
|
||||
INY ;/
|
||||
PHY ; Preserve compression index
|
||||
REP #$20 ;\ Prepare to copy from a previous point in decompressed data
|
||||
TXA ; | The new offset is stored in Y
|
||||
SEC ; | Y = X - count - offset
|
||||
SBC $3C ; |
|
||||
SEC ; |
|
||||
SBC $3E ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB9019: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB9019 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB9029: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
STA $42 ;\ Store in nibble look up tables
|
||||
STA $46 ;/
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA [$46] ;\ Store high nibble in offset
|
||||
STA $3E ;/
|
||||
LDA [$34],y ;\ Load next operand and store in the low nibble lookup
|
||||
INY ; |
|
||||
STA $42 ;/
|
||||
LDA [$42] ;\ offset = low nibble | offset
|
||||
ORA $3E ; |
|
||||
STA $3E ;/
|
||||
PHY ; Preserve compression index
|
||||
REP #$20 ;\ Prepare to copy from a previous point in decompressed data
|
||||
TXA ; | The new offset is stored in Y
|
||||
SEC ; | Y = X - count - offset
|
||||
SBC $3C ; |
|
||||
SEC ; |
|
||||
SBC $3E ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB9052: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB9052 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E1D ; Run next command
|
||||
;
|
||||
CODE_BB9062: ;
|
||||
LDA $46 ; Load next operand
|
||||
AND #$0F ;\ Count = (operand & 0x0F) + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
XBA ;/ Store as high byte for the full operand
|
||||
LDA [$34],y ;\ Load next operand store in high byte look up
|
||||
INY ; |
|
||||
STA $46 ;/
|
||||
REP #$20 ; Switch to 16 bit A
|
||||
LSR A ;\ Offset = (operand >> 4) + 0x0103
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
CLC ; |
|
||||
ADC #$0103 ; |
|
||||
STA $40 ;/
|
||||
PHY ; Preserve compression index
|
||||
TXA ;\ Prepare to copy from a previous point in decompressed data
|
||||
SEC ; | Y = X - offset
|
||||
SBC $40 ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB9087: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB9087 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB9097: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/ Store in low nibble look up table
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $42 ;\ Copy the low nibble to the operand high byte
|
||||
AND #$0F ; |
|
||||
XBA ;/
|
||||
LDA [$34],y ;\ Load the operand low byte
|
||||
INY ;/
|
||||
REP #$20 ;\ Offset = operand + 0x0103
|
||||
ADC #$0103 ; |
|
||||
STA $40 ;/
|
||||
PHY ; Preserve compression index
|
||||
TXA ;\ Prepare to copy from a previous point in decompressed data
|
||||
SEC ; | Y = X - offset
|
||||
SBC $40 ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB90B9: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB90B9 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB90C9: ;
|
||||
LDA $46 ; Load next operand
|
||||
AND #$0F ;\ Count = (operand & 0x0F) + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
REP #$20 ;\ Read a big endian word for the offset
|
||||
LDA [$34],y ; |
|
||||
XBA ; |
|
||||
STA $40 ;/
|
||||
INY ;\ Increment the compression index
|
||||
INY ;/
|
||||
PHY ; Preserve compression index
|
||||
TXA ;\ Prepare to copy from a previous point in decompressed data
|
||||
SEC ; | Y = X - offset
|
||||
SBC $40 ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB90E2: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB90E2 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB90F2: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $42 ;/ Store in low nibble look up table
|
||||
LDA [$42] ;\ Count = low nibble + 3
|
||||
ADC #$03 ; |
|
||||
STA $3C ;/
|
||||
LDA $42 ;\ Copy as the operand high byte
|
||||
XBA ;/
|
||||
LDA [$34],y ;\ Load the operand low byte
|
||||
INY ;/
|
||||
REP #$20 ; Set A to 16 bit
|
||||
ASL A ;\ Offset = (operand << 4)
|
||||
ASL A ; |
|
||||
ASL A ; |
|
||||
ASL A ; |
|
||||
STA $40 ;/
|
||||
AND #$00FF ; Clear the high byte of the offset
|
||||
SEP #$20 ; Resume 8 bit A
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ;/
|
||||
PHY ; Preserve compression index
|
||||
STA $42 ; Store the operand in the low nibble look up table
|
||||
LDA [$42] ;\ Load low nibble
|
||||
REP #$20 ; |
|
||||
AND #$000F ;/
|
||||
ORA $40 ;\ offset = offset | low nibble
|
||||
STA $40 ;/
|
||||
TXA ;\ Prepare to copy from a previous point in decompressed data
|
||||
SEC ; | Y = X - offset
|
||||
SBC $40 ; |
|
||||
TAY ;/
|
||||
SEP #$20 ; Back to 8 bit A
|
||||
CODE_BB9128: ;
|
||||
LDA $0000,y ;\ Copy from previous data
|
||||
INY ; |
|
||||
STA $0000,x ; |
|
||||
INX ;/
|
||||
DEC $3C ;\ Copy count number of bytes
|
||||
BNE CODE_BB9128 ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E1D ; Run next command Run next command
|
||||
;
|
||||
CODE_BB9138: ;
|
||||
DEX ;\ Copy previous byte to the decompression stream
|
||||
LDA $0000,x ; |
|
||||
STA $0001,x ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB9144: ;
|
||||
DEX ;\ Copy previous byte to the decompression stream
|
||||
LDA $0000,x ; |
|
||||
STA $0001,x ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB9150: ;
|
||||
REP #$20 ;\ Copy the previous word to the decompression stream
|
||||
DEX ; |
|
||||
DEX ; | First go back two bytes
|
||||
LDA $0000,x ; |
|
||||
STA $0002,x ; |
|
||||
SEP #$20 ; |
|
||||
INX ; | Then jump ahead four bytes
|
||||
INX ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB9163: ;
|
||||
REP #$20 ;\ Copy the previous word to the decompression stream
|
||||
DEX ; |
|
||||
DEX ; | First go back two bytes
|
||||
LDA $0000,x ; |
|
||||
STA $0002,x ; |
|
||||
SEP #$20 ; |
|
||||
INX ; | Then jump ahead four bytes
|
||||
INX ; |
|
||||
INX ; |
|
||||
INX ;/
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB9176: ;
|
||||
PHY ; Preserve compression index
|
||||
LDA $46 ; Load next operand
|
||||
REP #$20 ; Set A to 16 bit
|
||||
AND #$000F ;\ Y = (operand << 1) + 7
|
||||
ASL A ; |
|
||||
ADC #$0007 ; |
|
||||
TAY ;/
|
||||
LDA [$34],y ;\ Copy word from compression stream to the decompression stream
|
||||
STA $0000,x ;/
|
||||
SEP #$20 ;\ Return to 8 bit A and increment the decompression index
|
||||
INX ; |
|
||||
INX ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E02 ; Run next command
|
||||
;
|
||||
CODE_BB9190: ;
|
||||
LDA [$34],y ;\ Load next operand
|
||||
INY ; |
|
||||
STA $46 ;/ Store to high nibble look up table
|
||||
REP #$20 ; Set A to 16 bit
|
||||
AND #$00F0 ;\ Operand = operand >> 3
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
LSR A ;/
|
||||
PHY ; Preserve compression index
|
||||
ADC #$0007 ;\ Y = operand + 7
|
||||
TAY ;/
|
||||
LDA [$34],y ;\ Copy word from compression stream to the decompression stream
|
||||
STA $0000,x ;/
|
||||
SEP #$20 ;\ Return to 8 bit A and increment the decompression index
|
||||
INX ; |
|
||||
INX ;/
|
||||
PLY ; Restore compression index
|
||||
JMP CODE_BB8E10 ; Run next command
|
||||
;
|
||||
CODE_BB91AF: ;
|
||||
LDY #$0100 ; Prepare to generate the high nibble table
|
||||
TDC ;\ Zero A and X and set 8 bit A
|
||||
TAX ; |
|
||||
SEP #$20 ;/
|
||||
CODE_BB91B6: ;
|
||||
STA $7E2100,x ;\ Store look up value (index & 0x0F) << 4
|
||||
CLC ; |
|
||||
ADC #$10 ; |
|
||||
AND #$F0 ;/
|
||||
INX ;\ Loop through all 256 values
|
||||
DEY ; |
|
||||
BNE CODE_BB91B6 ;/
|
||||
LDY #$0100 ; Prepare to generate the low nibble table
|
||||
LDX #$0000 ;
|
||||
CODE_BB91C9: ;
|
||||
TXA ;\ Store look up value (index >> 4)
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
LSR A ; |
|
||||
STA $7E2000,x ;/
|
||||
INX ;\ Loop through all 256 values
|
||||
DEY ; |
|
||||
BNE CODE_BB91C9 ;/
|
||||
REP #$20 ; Return to 16 bit A
|
||||
RTL ; Done
|
1
constants.asm
Normal file
1
constants.asm
Normal file
|
@ -0,0 +1 @@
|
|||
!null_pointer = $0000
|
11
macros.asm
Normal file
11
macros.asm
Normal file
|
@ -0,0 +1,11 @@
|
|||
macro offset(label, offset)
|
||||
?tmp:
|
||||
pushpc
|
||||
org ?tmp+<offset>
|
||||
<label>:
|
||||
pullpc
|
||||
endmacro
|
||||
|
||||
macro return(label)
|
||||
PEA <label>-1
|
||||
endmacro
|
19
todo.txt
Normal file
19
todo.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
bank_BB.asm:7379: CODE_BBC18A: JMP ($0002,x)
|
||||
bank_B5.asm:9296: CODE_B5E2B8: JMP ($0034)
|
||||
bank_B5.asm:9304: CODE_B5E2CC: JMP ($0034)
|
||||
bank_B5.asm:11142: CODE_B5F1BB: JMP ($0036)
|
||||
bank_B6.asm:7901: CODE_B6D549: JMP ($0052,x)
|
||||
bank_80.asm:1355: CODE_808EE7: JMP ($0032)
|
||||
bank_80.asm:386: CODE_808613: JMP ($0024)
|
||||
bank_80.asm:11450: CODE_80F3E3: JMP ($0020)
|
||||
bank_B4.asm:6670: CODE_B4BE60: JMP ($067D)
|
||||
bank_B9.asm:2766: CODE_B9D14C: JMP ($0026)
|
||||
bank_B9.asm:2806: CODE_B9D186: JMP ($0026)
|
||||
bank_B9.asm:2835: CODE_B9D1B2: JMP ($0026)
|
||||
bank_B9.asm:2886: CODE_B9D208: JMP ($0026)
|
||||
bank_B9.asm:2912: CODE_B9D231: JMP ($0026)
|
||||
|
||||
|
||||
|
||||
CODE_BBC18A
|
||||
DATA_BAB6A1
|
Loading…
Add table
Reference in a new issue