Merge pull request #188 from yenatch/split-common

recomment and split out a ton of common asm (bank 0)
This commit is contained in:
Bryan Bishop 2013-09-05 11:30:12 -07:00
commit 40b4c87db7
16 changed files with 7346 additions and 2969 deletions

View File

@ -23,99 +23,7 @@ FarCall EQU $08
Bankswitch EQU $10
JumpTable EQU $28
dwb: MACRO
dw \1
db \2
ENDM
dbw: MACRO
db \1
dw \2
ENDM
dn: MACRO
db \1 << 4 + \2
ENDM
dt: MACRO ; three-byte (big-endian)
db (\1 >> 16) & $ff
db (\1 >> 8) & $ff
db \1 & $ff
ENDM
bigdw: MACRO ; big-endian word
dw ((\1)/$100) + (((\1)&$ff)*$100)
ENDM
callab: MACRO ; address, bank
ld hl, \1
ld a, BANK(\1)
rst FarCall
ENDM
callba: MACRO ; bank, address
ld a, BANK(\1)
ld hl, \1
rst FarCall
ENDM
TX_RAM: MACRO
db 1
dw \1
ENDM
TX_FAR: MACRO
db $16
dw \1
db BANK(\1)
ENDM
RGB: MACRO
dw ((\3 << 10) | (\2 << 5) | (\1))
ENDM
note: MACRO
db \1
ENDM
; It's better to use *coord than FuncCoord.
FuncCoord: MACRO
Coord = $c4a0 + 20 * \2 + \1
ENDM
bccoord: MACRO
FuncCoord \1, \2
ld bc, Coord
ENDM
decoord: MACRO
FuncCoord \1, \2
ld de, Coord
ENDM
hlcoord: MACRO
FuncCoord \1, \2
ld hl, Coord
ENDM
; pic animations
frame: MACRO
db \1
db \2
ENDM
setrepeat: MACRO
db $fe
db \1
ENDM
dorepeat: MACRO
db $fd
db \1
ENDM
endanim: MACRO
db $ff
ENDM
INCLUDE "macros.asm"
NONE EQU 0

23
engine/delay.asm Normal file
View File

@ -0,0 +1,23 @@
DelayFrame: ; 45a
; Wait for one frame
ld a, 1
ld [VBlankOccurred], a
; Wait for the next VBlank, halting to conserve battery
.halt
halt ; rgbasm adds a nop after this instruction by default
ld a, [VBlankOccurred]
and a
jr nz, .halt
ret
; 468
DelayFrames: ; 468
; Wait c frames
call DelayFrame
dec c
jr nz, DelayFrames
ret
; 46f

55
engine/farcall.asm Normal file
View File

@ -0,0 +1,55 @@
FarCall_de: ; 2d54
; Call a:de.
; Preserves other registers.
ld [hBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
rst Bankswitch
call .de
jr ReturnFarCall
.de
push de
ret
; 2d63
FarCall_hl: ; 2d63
; Call a:hl.
; Preserves other registers.
ld [hBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
rst Bankswitch
call Function2d82
; 2d6e
ReturnFarCall: ; 2d6e
; We want to retain the contents of f.
; To do this, we can pop to bc instead of af.
ld a, b
ld [$cfb9], a
ld a, c
ld [$cfba], a
; Restore the working bank.
pop bc
ld a, b
rst Bankswitch
ld a, [$cfb9]
ld b, a
ld a, [$cfba]
ld c, a
ret
; 2d82
Function2d82: ; 2d82
jp [hl]
; 2d83

132
engine/game_time.asm Normal file
View File

@ -0,0 +1,132 @@
ResetGameTime: ; 208a
xor a
ld [GameTimeCap], a
ld [GameTimeHours], a
ld [GameTimeHours + 1], a
ld [GameTimeMinutes], a
ld [GameTimeSeconds], a
ld [GameTimeFrames], a
ret
; 209e
GameTimer: ; 209e
nop
ld a, [rSVBK]
push af
ld a, 1
ld [rSVBK], a
call UpdateGameTimer
pop af
ld [rSVBK], a
ret
; 20ad
UpdateGameTimer: ; 20ad
; Increment the game timer by one frame.
; The game timer is capped at 999:59:59.00.
; Don't update if game logic is paused.
ld a, [$c2cd]
and a
ret nz
; Is the timer paused?
ld hl, GameTimerPause
bit 0, [hl]
ret z
; Is the timer already capped?
ld hl, GameTimeCap
bit 0, [hl]
ret nz
; +1 frame
ld hl, GameTimeFrames
ld a, [hl]
inc a
cp 60 ; frames/second
jr nc, .second
ld [hl], a
ret
.second
xor a
ld [hl], a
; +1 second
ld hl, GameTimeSeconds
ld a, [hl]
inc a
cp 60 ; seconds/minute
jr nc, .minute
ld [hl], a
ret
.minute
xor a
ld [hl], a
; +1 minute
ld hl, GameTimeMinutes
ld a, [hl]
inc a
cp 60 ; minutes/hour
jr nc, .hour
ld [hl], a
ret
.hour
xor a
ld [hl], a
; +1 hour
ld a, [GameTimeHours]
ld h, a
ld a, [GameTimeHours + 1]
ld l, a
inc hl
; Cap the timer after 1000 hours.
ld a, h
cp 1000 / $100
jr c, .ok
ld a, l
cp 1000 % $100
jr c, .ok
ld hl, GameTimeCap
set 0, [hl]
ld a, 59 ; 999:59:59.00
ld [GameTimeMinutes], a
ld [GameTimeSeconds], a
ret
.ok
ld a, h
ld [GameTimeHours], a
ld a, l
ld [GameTimeHours + 1], a
ret
; 210f

683
engine/map_objects.asm Normal file
View File

@ -0,0 +1,683 @@
; Functions handling map objects.
GetSpritePalette: ; 17ff
push hl
push de
push bc
ld c, a
callba _GetSpritePalette
ld a, c
pop bc
pop de
pop hl
ret
; 180e
Function180e: ; 180e
push hl
push bc
ld hl, $d156
ld c, $1f
ld b, a
ld a, [hConnectionStripLength]
cp $0
jr z, .asm_182b
ld a, b
.asm_181d
cp [hl]
jr z, .asm_1830
inc hl
inc hl
dec c
jr nz, .asm_181d
ld a, [$d155]
scf
jr .asm_1833
.asm_182b
ld a, [$d155]
jr .asm_1833
.asm_1830
inc hl
xor a
ld a, [hl]
.asm_1833
pop bc
pop hl
ret
; 1836
Function1836: ; 1836
push de
push hl
ld b, a
ld a, [hROMBank]
push af
ld a, BANK(Function142a7)
rst Bankswitch
ld a, b
call Function142a7
ld c, a
pop de
ld a, d
rst Bankswitch
pop hl
pop de
ret
; 184a
Function184a: ; 184a
ld a, [StandingTile]
call GetTileCollision
ld b, a
ret
; 1852
Function1852: ; 1852
ld a, [StandingTile]
call GetTileCollision
sub 1
ret z
and a
ret
; 185d
GetTileCollision: ; 185d
; Get the collision type of tile a.
push de
push hl
ld hl, TileCollisionTable
ld e, a
ld d, 0
add hl, de
ld a, [hROMBank]
push af
ld a, BANK(TileCollisionTable)
rst Bankswitch
ld e, [hl]
pop af
rst Bankswitch
ld a, e
and $f ; lo nybble only
pop hl
pop de
ret
; 1875
Function1875: ; 1875
ld d, a
and $f0
cp $10
jr z, .asm_1882
cp $20
jr z, .asm_1888
scf
ret
.asm_1882
ld a, d
and 7
ret z
scf
ret
.asm_1888
ld a, d
and 7
ret z
scf
ret
; 188e
Function188e: ; 188e
cp $14
ret z
cp $1c
ret
; 1894
CheckCutTreeTile: ; 1894
cp $12
ret z
cp $1a
ret
; 189a
CheckHeadbuttTreeTile: ; 189a
cp $15
ret z
cp $1d
ret
; 18a0
CheckCounterTile: ; 18a0
cp $90
ret z
cp $98
ret
; 18a6
CheckPitTile: ; 18a6
cp $60
ret z
cp $68
ret
; 18ac
CheckIceTile: ; 18ac
cp $23
ret z
cp $2b
ret z
scf
ret
; 18b4
CheckWhirlpoolTile: ; 18b4
nop
cp $24
ret z
cp $2c
ret z
scf
ret
; 18bd
CheckWaterfallTile: ; 18bd
cp $33
ret z
cp $3b
ret
; 18c3
CheckStandingOnEntrance: ; 18c3
ld a, [StandingTile]
cp $71 ; door
ret z
cp $79
ret z
cp $7a ; stairs
ret z
cp $7b ; cave
ret
; 18d2
GetMapObject: ; 18d2
; Return the location of map object a in bc.
ld hl, MapObjects
ld bc, $10
call AddNTimes
ld b, h
ld c, l
ret
; 18de
Function18de: ; 18de
ld [hConnectionStripLength], a
call GetMapObject
ld hl, $0000
add hl, bc
ld a, [hl]
cp $ff
jr z, .asm_18f3
ld [hConnectedMapWidth], a
call Function1ae5
and a
ret
.asm_18f3
scf
ret
; 18f5
Function18f5: ; 18f5
ld hl, $0006
add hl, bc
ld a, [hl]
cp $ff
jr nz, .asm_1921
ld hl, $0007
add hl, bc
ld a, [hl]
cp $ff
jr z, .asm_191c
ld hl, .data_191e
ld a, [TimeOfDay]
add l
ld l, a
jr nc, .asm_1912
inc h
.asm_1912
ld a, [hl]
ld hl, $0007
add hl, bc
and [hl]
jr nz, .asm_191c
scf
ret
.asm_191c
and a
ret
.data_191e
db $1
db $2
db $4
.asm_1921
ld hl, $0006
add hl, bc
ld d, [hl]
ld hl, $0007
add hl, bc
ld e, [hl]
ld hl, hHours
ld a, d
cp e
jr z, .asm_1949
jr c, .asm_193f
ld a, [hl]
cp d
jr nc, .asm_1949
cp e
jr c, .asm_1949
jr z, .asm_1949
jr .asm_194b
.asm_193f
ld a, e
cp [hl]
jr c, .asm_194b
ld a, [hl]
cp d
jr nc, .asm_1949
jr .asm_194b
.asm_1949
and a
ret
.asm_194b
scf
ret
; 194d
Function194d: ; 194d
ld [hConnectionStripLength], a
call GetMapObject
call $40e7
ret
; 1956
Function1956: ; 1956
ld [hConnectionStripLength], a
call Function271e
ld a, [hConnectionStripLength]
call GetMapObject
ld a, $2
ld hl, $40e7
rst FarCall
ret
; 1967
Function1967: ; 1967
ld [hConnectionStripLength], a
call GetMapObject
ld hl, $0000
add hl, bc
ld a, [hl]
cp $ff
ret z
ld [hl], $ff
push af
call Function1985
pop af
call Function1ae5
callba Function4357
ret
; 1985
Function1985: ; 1985
ld hl, $d4cd
cp [hl]
jr z, .asm_1990
ld hl, $d4ce
cp [hl]
ret nz
.asm_1990
callba Function581f
ld a, $ff
ld [$d4cd], a
ld [$d4ce], a
ret
; 199f
Function199f: ; 199f
call Function1967
call Function2712
ret
; 19a6
Function19a6: ; 19a6
push hl
call GetMapObject
ld d, b
ld e, c
ld a, $ff
ld [de], a
inc de
pop hl
ld bc, $000f
call CopyBytes
ret
; 19b8
Function19b8: ; 19b8
call GetMapObject
ld hl, $0000
add hl, bc
ld a, [hl]
push af
ld [hl], $ff
inc hl
ld bc, $000f
xor a
call ByteFill
pop af
cp $ff
ret z
cp $d
ret nc
ld b, a
ld a, [$d4cd]
cp b
jr nz, .asm_19de
ld a, $ff
ld [$d4cd], a
.asm_19de
ld a, b
call Function1ae5
callba Function4357
ret
; 19e9
Function19e9: ; 19e9
ld [$c2e2], a
ld a, [hROMBank]
ld [$c2e3], a
ld a, l
ld [$c2e4], a
ld a, h
ld [$c2e5], a
ld a, [$c2e2]
call Function18de
ret c
ld hl, $0003
add hl, bc
ld [hl], $14
ld hl, $0009
add hl, bc
ld [hl], $0
ld hl, VramState
set 7, [hl]
and a
ret
; 1a13
Function1a13: ; 1a13
push bc
push de
ld hl, $d4d6
ld de, $0028
ld c, $d
.asm_1a1d
ld a, [hl]
and a
jr z, .asm_1a28
add hl, de
dec c
jr nz, .asm_1a1d
xor a
jr .asm_1a2c
.asm_1a28
ld a, $d
sub c
scf
.asm_1a2c
pop de
pop bc
ret
; 1a2f
Function1a2f: ; 1a2f
ld hl, $0003
add hl, bc
ld a, [hl]
cp $25
jr c, .asm_1a39
xor a
.asm_1a39
ld hl, Data4273
ld e, a
ld d, 0
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
ld a, [hl]
ret
; 1a47
Function1a47: ; 1a47
push bc
push de
ld e, a
ld d, 0
ld hl, Data4273 + 1
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
ld a, BANK(Data4273)
call GetFarByte
add a
add a
and $c
pop de
pop bc
ret
; 1a61
Function1a61: ; 1a61
ld l, a
ld a, [hROMBank]
push af
ld a, BANK(Data4273)
rst Bankswitch
ld a, l
push bc
call Function1a71
pop bc
pop af
rst Bankswitch
ret
; 1a71
Function1a71: ; 1a71
ld hl, $0003
add hl, de
ld [hl], a
push de
ld e, a
ld d, 0
ld hl, Data4273 + 1
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
ld b, h
ld c, l
pop de
ld a, [bc]
inc bc
rlca
rlca
and $c
ld hl, $0008
add hl, de
ld [hl], a
ld a, [bc]
inc bc
ld hl, $000b
add hl, de
ld [hl], a
ld a, [bc]
inc bc
ld hl, $0004
add hl, de
ld [hl], a
ld a, [bc]
inc bc
ld hl, $0005
add hl, de
ld [hl], a
ld a, [bc]
inc bc
ld hl, $0006
add hl, de
ld [hl], a
ret
; 1aae
Function1aae: ; 1aae
ld a, [hROMBank]
push af
ld a, [hli]
rst Bankswitch
ld a, [hli]
ld d, [hl]
ld hl, $001b
add hl, bc
add [hl]
ld e, a
ld a, d
adc $0
ld d, a
inc [hl]
ld a, [de]
ld h, a
pop af
rst Bankswitch
ld a, h
ret
; 1ac6
Function1ac6: ; 1ac6
ld hl, VramState
set 0, [hl]
ret
; 1acc
Function1acc: ; 1acc
ld hl, VramState
res 0, [hl]
ret
; 1ad2
Function1ad2: ; 1ad2
ld a, [VramState]
bit 0, a
ret z
callba Function55e0
callba Function5920
ret
; 1ae5
Function1ae5: ; 1ae5
ld bc, $0028
ld hl, $d4d6
call AddNTimes
ld b, h
ld c, l
ret
; 1af1
Function1af1: ; 1af1
ld hl, $0000
add hl, bc
ld a, [hl]
and a
ret
; 1af8
Function1af8: ; 1af8
push af
ld hl, $0008
add hl, bc
ld a, [hl]
and $f3
ld e, a
pop af
and $c
or e
ld [hl], a
ret
; 1b07
GetSpriteDirection: ; 1b07
ld hl, $0008
add hl, bc
ld a, [hl]
and $c
ret
; 1b0f

603
engine/menu.asm Normal file
View File

@ -0,0 +1,603 @@
; Functions used in displaying and handling menus.
LoadMenuDataHeader: ; 0x1d35
call Function1d3c
call Function1c00
ret
Function1d3c: ; 0x1d3c
ld de, $cf81
ld bc, $0010
call CopyBytes
ld a, [hROMBank]
ld [$cf8a], a
ret
; 0x1d4b
Function1d4b: ; 1d4b
ld [$cf88], a
ret
; 1d4f
Function1d4f: ; 1d4f
push hl
call Function1d58
pop hl
jp PrintText
; 1d57
Function1d57: ; 1d57
ret
; 1d58
Function1d58: ; 1d58
ld hl, MenuDataHeader_0x1d5f
call LoadMenuDataHeader
ret
; 1d5f
MenuDataHeader_0x1d5f: ; 1d5f
db $40 ; tile backup
db 12, 0 ; start coords
db 17, 19 ; end coords
dw VTiles0
db 0 ; default option
; 1d67
Function1d67: ; 1d67
call Function1d4f
call Function1c17
ret
; 1d6e
Function1d6e: ; 1d6e
ld hl, MenuDataHeader_0x1d75
call LoadMenuDataHeader
ret
; 1d75
MenuDataHeader_0x1d75: ; 1d75
db $40 ; tile backup
db 0, 0 ; start coords
db 17, 19 ; end coords
dw $0000
db 1 ; default option
; 1d7d
Function1d7d: ; 1d7d
call Function1c07
ret
; 1d81
Function1d81: ; 0x1d81
xor a
ld [hBGMapMode], a
call Function1cbb
call Function1ad2
call Function1c89
call Function321c
call Function1c66
ld a, [$cf91]
bit 7, a
jr z, .asm_1da7 ; 0x1d98 $d
call Function1c10
call Function1bc9
call Function1ff8
bit 1, a
jr z, .asm_1da9 ; 0x1da5 $2
.asm_1da7
scf
ret
.asm_1da9
and a
ret
; 0x1dab
Function1dab: ; 1dab
call LoadMenuDataHeader
call Function1d81
call Function1c17
ld a, [$cfa9]
ret
; 1db8
Function1db8: ; 0x1db8
push hl
push bc
push af
ld hl, $cf86
ld a, [hli]
ld h, [hl]
ld l, a
inc hl
inc hl
pop af
call GetNthString
ld d, h
ld e, l
call CopyName1
pop bc
pop hl
ret
; 0x1dcf
Function1dcf: ; 1dcf
ld bc, $0e07
Function1dd2: ; 1dd2
jr Function1dd9
Function1dd4: ; 1dd4
call LoadMenuDataHeader
jr Function1dfe
Function1dd9: ; 1dd9
push bc
ld hl, MenuDataHeader_0x1e1d
call Function1d3c
pop bc
ld a, b
cp $e
jr nz, .asm_1de9
ld a, $e
ld b, a
.asm_1de9
ld a, b
ld [$cf83], a
add $5
ld [$cf85], a
ld a, c
ld [$cf82], a
add $4
ld [$cf84], a
call Function1c00
Function1dfe: ; 1dfe
call Function1d81
push af
ld c, $f
call DelayFrames
call Function1c17
pop af
jr c, .asm_1e16
ld a, [$cfa9]
cp $2
jr z, .asm_1e16
and a
ret
.asm_1e16
ld a, $2
ld [$cfa9], a
scf
ret
; 1e1d
MenuDataHeader_0x1e1d: ; 1e1d
db $40 ; tile backup
db 5, 10 ; start coords
db 9, 15 ; end coords
dw MenuData2_0x1e25
db 1 ; default option
; 1e25
MenuData2_0x1e25: ; 1e25
db $c0 ; flags
db 2
db "YES@"
db "NO@"
; 1e2e
Function1e2e: ; 1e2e
call Function1e35
call Function1c00
ret
; 1e35
Function1e35: ; 1e35
push de
call Function1d3c
pop de
ld a, [$cf83]
ld h, a
ld a, [$cf85]
sub h
ld h, a
ld a, d
ld [$cf83], a
add h
ld [$cf85], a
ld a, [$cf82]
ld l, a
ld a, [$cf84]
sub l
ld l, a
ld a, e
ld [$cf82], a
add l
ld [$cf84], a
ret
; 1e5d
Function1e5d: ; 1e5d
call MenuFunc_1e7f
call MenuWriteText
call Function1eff
call Function1f23
call Function1bdd
call Function1ff8
ret
; 1e70
SetUpMenu: ; 1e70
call MenuFunc_1e7f ; ???
call MenuWriteText
call Function1eff ; set up selection pointer
ld hl, $cfa5
set 7, [hl]
ret
MenuFunc_1e7f: ; 0x1e7f
call Function1c66
call Function1ebd
call Function1ea6
call Function1cbb
ret
MenuWriteText: ; 0x1e8c
xor a
ld [hBGMapMode], a
call Function1ebd ; sort out the text
call Function1eda ; actually write it
call Function2e31
ld a, [hOAMUpdate]
push af
ld a, $1
ld [hOAMUpdate], a
call Function321c
pop af
ld [hOAMUpdate], a
ret
; 0x1ea6
Function1ea6: ; 1ea6
ld a, [$cf83]
ld c, a
ld a, [$cf85]
sub c
ld c, a
ld a, [$cf92]
add a
inc a
ld b, a
ld a, [$cf82]
add b
ld [$cf84], a
ret
; 1ebd
Function1ebd: ; 1ebd
ld hl, $cf93
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [$cf76]
and a
jr z, .asm_1ed3
ld b, a
ld c, $ff
.asm_1ecc
ld a, [hli]
cp c
jr nz, .asm_1ecc
dec b
jr nz, .asm_1ecc
.asm_1ed3
ld d, h
ld e, l
ld a, [hl]
ld [$cf92], a
ret
; 1eda
Function1eda: ; 1eda
call Function1cfd
ld bc, $002a
add hl, bc
.asm_1ee1
inc de
ld a, [de]
cp $ff
ret z
ld [MenuSelection], a
push de
push hl
ld d, h
ld e, l
ld hl, $cf95
call Function1efb
pop hl
ld de, $0028
add hl, de
pop de
jr .asm_1ee1
; 1efb
Function1efb: ; 1efb
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
; 1eff
Function1eff: ; 1eff
call Function1c10
ld hl, $cfa8
ld a, [$cf91]
bit 3, a
jr z, .asm_1f0e
set 3, [hl]
.asm_1f0e
ld a, [$cf91]
bit 2, a
jr z, .asm_1f19
set 5, [hl]
set 4, [hl]
.asm_1f19
ret
; 1f1a
Function1f1a: ; 1f1a
call Function1bd3
ld hl, $cfa8
and [hl]
jr Function1f2a
; 1f23
Function1f23: ; 1f23
xor a
ld [$cf73], a
call Function1bc9
; 1f2a
Function1f2a: ; 1f2a
bit 0, a
jr nz, .asm_1f52
bit 1, a
jr nz, .asm_1f6d
bit 3, a
jr nz, .asm_1f6d
bit 4, a
jr nz, .asm_1f44
bit 5, a
jr nz, .asm_1f4b
xor a
ld [$cf73], a
jr .asm_1f57
.asm_1f44
ld a, $10
ld [$cf73], a
jr .asm_1f57
.asm_1f4b
ld a, $20
ld [$cf73], a
jr .asm_1f57
.asm_1f52
ld a, $1
ld [$cf73], a
.asm_1f57
call Function1ebd
ld a, [$cfa9]
ld l, a
ld h, $0
add hl, de
ld a, [hl]
ld [MenuSelection], a
ld a, [$cfa9]
ld [$cf88], a
and a
ret
.asm_1f6d
ld a, $2
ld [$cf73], a
ld a, $ff
ld [MenuSelection], a
scf
ret
; 1f79
Function1f79: ; 1f79
push de
ld hl, $cf97
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [MenuSelection]
call GetNthString
ld d, h
ld e, l
pop hl
call PlaceString
ret
; 1f8d
Function1f8d: ; 1f8d
push de
ld a, [MenuSelection]
call Function1fb1
inc hl
inc hl
ld a, [hli]
ld d, [hl]
ld e, a
pop hl
call PlaceString
ret
; 1f9e
Function1f9e: ; 1f9e
call Function1fb1
inc hl
inc hl
ld a, [hli]
ld d, [hl]
ld e, a
ret
; 1fa7
Function1fa7: ; 1fa7
ld a, [MenuSelection]
call Function1fb1
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
; 1fb1
Function1fb1: ; 1fb1
ld e, a
ld d, $0
ld hl, $cf97
ld a, [hli]
ld h, [hl]
ld l, a
add hl, de
add hl, de
add hl, de
add hl, de
ret
; 1fbf
Function1fbf: ; 1fbf
ld hl, $cf71
call Function1ff0
ld hl, $cf81
call Function1ff0
ld hl, $cf91
call Function1ff0
ld hl, $cfa1
call Function1ff0
ld a, [rSVBK]
push af
ld a, $7
ld [rSVBK], a
xor a
ld hl, $dfff
ld [hld], a
ld [hld], a
ld a, l
ld [$cf71], a
ld a, h
ld [$cf72], a
pop af
ld [rSVBK], a
ret
; 1ff0
Function1ff0: ; 1ff0
ld bc, $0010
xor a
call ByteFill
ret
; 1ff8
Function1ff8: ; 1ff8
push af
and $3
jr z, .asm_2007
ld hl, $cf81
bit 3, [hl]
jr nz, .asm_2007
call PlayClickSFX
.asm_2007
pop af
ret
; 2009
PlayClickSFX: ; 2009
push de
ld de, SFX_READ_TEXT_2
call StartSFX
pop de
ret
; 0x2012
Function2012: ; 2012
call Function1d4f
call Functiona46
call Function1c07
ret
; 201c
Function201c: ; 201c
ld [hBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
rst Bankswitch
call PlaceString
pop af
rst Bankswitch
ret
; 202a
Function202a: ; 202a
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $400e
rst FarCall
ld a, [$cf88]
ret
; 2039
Function2039: ; 2039
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $4022
rst FarCall
ld a, [$cf88]
ret
; 2048
Function2048: ; 2048
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $403c
rst FarCall
ld a, [$cf88]
ret
; 2057
Function2057: ; 2057
ld a, [hROMBank]
push af
ld a, $21
rst Bankswitch
call $42db
pop af
rst Bankswitch
ret
; 2063

25
engine/rtc.asm Normal file
View File

@ -0,0 +1,25 @@
RTC: ; 46f
; update time and time-sensitive palettes
; rtc enabled?
ld a, [$c2ce]
cp 0
ret z
call UpdateTime
; obj update on?
ld a, [VramState]
bit 0, a ; obj update
ret z
TimeOfDayPals: ; 47e
callab _TimeOfDayPals
ret
; 485
UpdateTimePals: ; 485
callab _UpdateTimePals
ret
; 48c

22
engine/sine.asm Normal file
View File

@ -0,0 +1,22 @@
Cosine: ; 1b0f
; Return d * cos(a) in hl
add $10 ; 90 degrees
Sine: ; 1b11
; Return d * sin(a) in hl
; a is a signed 6-bit value.
ld e, a
ld a, [hROMBank]
push af
ld a, BANK(_Sine)
rst Bankswitch
call _Sine
pop af
rst Bankswitch
ret
; 1b1e

487
engine/video.asm Normal file
View File

@ -0,0 +1,487 @@
; Functions dealing with VRAM.
DMATransfer: ; 15d8
; Return carry if the transfer is completed.
ld a, [hDMATransfer]
and a
ret z
; Start transfer
ld [rHDMA5], a
; Execution is halted until the transfer is complete.
xor a
ld [hDMATransfer], a
scf
ret
; 15e3
UpdateBGMapBuffer: ; 15e3
; Copy [$ffdc] 16x8 tiles from BGMapBuffer
; to bg map addresses in BGMapBufferPtrs.
; [$ffdc] must be even since this is done in pairs.
; Return carry on success.
ld a, [hBGMapUpdate]
and a
ret z
ld a, [rVBK]
push af
ld [hSPBuffer], sp
ld hl, BGMapBufferPtrs
ld sp, hl
; We can now pop the addresses of affected spots on the BG Map
ld hl, BGMapPalBuffer
ld de, BGMapBuffer
.next
; Copy a pair of 16x8 blocks (one 16x16 block)
rept 2
; Get our BG Map address
pop bc
; Palettes
ld a, 1
ld [rVBK], a
ld a, [hli]
ld [bc], a
inc c
ld a, [hli]
ld [bc], a
dec c
; Tiles
ld a, 0
ld [rVBK], a
ld a, [de]
inc de
ld [bc], a
inc c
ld a, [de]
inc de
ld [bc], a
endr
; We've done 2 16x8 blocks
ld a, [$ffdc]
dec a
dec a
ld [$ffdc], a
jr nz, .next
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
pop af
ld [rVBK], a
xor a
ld [hBGMapUpdate], a
scf
ret
; 163a
WaitTop: ; 163a
; Wait until the top third of the BG Map is being updated.
ld a, [hBGMapMode]
and a
ret z
ld a, [hBGMapThird]
and a
jr z, .done
call DelayFrame
jr WaitTop
.done
xor a
ld [hBGMapMode], a
ret
; 164c
UpdateBGMap: ; 164c
; Update the BG Map, in thirds, from TileMap and AttrMap.
ld a, [hBGMapMode]
and a
ret z
; BG Map 0
dec a ; 1
jr z, .Tiles
dec a ; 2
jr z, .Attr
; BG Map 1
dec a
ld a, [hBGMapAddress]
ld l, a
ld a, [hBGMapAddress + 1]
ld h, a
push hl
xor a
ld [hBGMapAddress], a
ld a, VBGMap1 >> 8
ld [hBGMapAddress + 1], a
ld a, [hBGMapMode]
push af
cp 3
call z, .Tiles
pop af
cp 4
call z, .Attr
pop hl
ld a, l
ld [hBGMapAddress], a
ld a, h
ld [hBGMapAddress + 1], a
ret
.Attr
ld a, 1
ld [rVBK], a
ld hl, AttrMap
call .update
ld a, 0
ld [rVBK], a
ret
.Tiles
ld hl, TileMap
.update
ld [hSPBuffer], sp
; Which third?
ld a, [hBGMapThird]
and a ; 0
jr z, .top
dec a ; 1
jr z, .middle
; 2
THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
.bottom
ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld a, [hBGMapAddress]
ld l, a
ld de, 2 * THIRD_HEIGHT * BG_MAP_WIDTH
add hl, de
; Next time: top third
xor a
jr .start
.middle
ld de, THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld a, [hBGMapAddress]
ld l, a
ld de, THIRD_HEIGHT * BG_MAP_WIDTH
add hl, de
; Next time: bottom third
ld a, 2
jr .start
.top
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld a, [hBGMapAddress]
ld l, a
; Next time: middle third
ld a, 1
.start
; Which third to update next time
ld [hBGMapThird], a
; Rows of tiles in a third
ld a, SCREEN_HEIGHT / 3
; Discrepancy between TileMap and BGMap
ld bc, BG_MAP_WIDTH - (SCREEN_WIDTH - 1)
.row
; Copy a row of 20 tiles
rept SCREEN_WIDTH / 2 - 1
pop de
ld [hl], e
inc l
ld [hl], d
inc l
endr
pop de
ld [hl], e
inc l
ld [hl], d
add hl, bc
dec a
jr nz, .row
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret
; 170a
Serve1bppRequest: ; 170a
; Only call during the first fifth of VBlank
ld a, [Requested1bpp]
and a
ret z
; Back out if we're too far into VBlank
ld a, [rLY]
cp 144
ret c
cp 146
ret nc
; Copy [Requested1bpp] 1bpp tiles from [Requested1bppSource] to [Requested1bppDest]
ld [hSPBuffer], sp
; Source
ld hl, Requested1bppSource
ld a, [hli]
ld h, [hl]
ld l, a
ld sp, hl
; Destination
ld hl, Requested1bppDest
ld a, [hli]
ld h, [hl]
ld l, a
; # tiles to copy
ld a, [Requested1bpp]
ld b, a
xor a
ld [Requested1bpp], a
.next
rept 3
pop de
ld [hl], e
inc l
ld [hl], e
inc l
ld [hl], d
inc l
ld [hl], d
inc l
endr
pop de
ld [hl], e
inc l
ld [hl], e
inc l
ld [hl], d
inc l
ld [hl], d
inc hl
dec b
jr nz, .next
ld a, l
ld [Requested1bppDest], a
ld a, h
ld [Requested1bppDest + 1], a
ld [Requested1bppSource], sp
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret
; 1769
Serve2bppRequest: ; 1769
; Only call during the first fifth of VBlank
ld a, [Requested2bpp]
and a
ret z
; Back out if we're too far into VBlank
ld a, [rLY]
cp 144
ret c
cp 146
ret nc
jr _Serve2bppRequest
Serve2bppRequest@VBlank: ; 1778
ld a, [Requested2bpp]
and a
ret z
_Serve2bppRequest: ; 177d
; Copy [Requested2bpp] 2bpp tiles from [Requested2bppSource] to [Requested2bppDest]
ld [hSPBuffer], sp
; Source
ld hl, Requested2bppSource
ld a, [hli]
ld h, [hl]
ld l, a
ld sp, hl
; Destination
ld hl, Requested2bppDest
ld a, [hli]
ld h, [hl]
ld l, a
; # tiles to copy
ld a, [Requested2bpp]
ld b, a
xor a
ld [Requested2bpp], a
.next
rept 7
pop de
ld [hl], e
inc l
ld [hl], d
inc l
endr
pop de
ld [hl], e
inc l
ld [hl], d
inc hl
dec b
jr nz, .next
ld a, l
ld [Requested2bppDest], a
ld a, h
ld [Requested2bppDest + 1], a
ld [Requested2bppSource], sp
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret
; 17d3
AnimateTileset: ; 17d3
; Only call during the first fifth of VBlank
ld a, [$ffde]
and a
ret z
; Back out if we're too far into VBlank
ld a, [rLY]
cp 144
ret c
cp 151
ret nc
ld a, [hROMBank]
push af
ld a, BANK(_AnimateTileset)
rst Bankswitch
ld a, [rSVBK]
push af
ld a, 1
ld [rSVBK], a
ld a, [rVBK]
push af
ld a, 0
ld [rVBK], a
call _AnimateTileset
pop af
ld [rVBK], a
pop af
ld [rSVBK], a
pop af
rst Bankswitch
ret
; 17ff

17
interrupts.asm Normal file
View File

@ -0,0 +1,17 @@
; Game Boy hardware interrupts
SECTION "vblank",ROM0[$40]
jp VBlank
SECTION "lcd",ROM0[$48]
jp LCD
SECTION "timer",ROM0[$50]
jp Timer
SECTION "serial",ROM0[$58]
jp Serial
SECTION "joypad",ROM0[$60]
jp JoypadInt

443
items/marts.asm Normal file
View File

@ -0,0 +1,443 @@
Marts: ; 160a9
dw Mart0
dw Mart1
dw Mart2
dw Mart3
dw Mart4
dw Mart5
dw Mart6
dw Mart7
dw Mart8
dw Mart9
dw Mart10
dw Mart11
dw Mart12
dw Mart13
dw Mart14
dw Mart15
dw Mart16
dw Mart17
dw Mart18
dw Mart19
dw Mart20
dw Mart21
dw Mart22
dw Mart23
dw Mart24
dw Mart25
dw Mart26
dw Mart27
dw Mart28
dw Mart29
dw Mart30
dw Mart31
dw Mart32
dw Mart33
MartsEnd
; 160ed
Mart0: ; 160ed
db 4 ; # items
db POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db $ff
; 160f3
Mart1: ; 160f3
db 5 ; # items
db POKE_BALL
db POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db $ff
; 160fa
Mart2: ; 160fa
db 10 ; # items
db POKE_BALL
db POTION
db ESCAPE_ROPE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db X_DEFEND
db X_ATTACK
db X_SPEED
db FLOWER_MAIL
db $ff
; 16106
Mart3: ; 16106
db 9 ; # items
db CHARCOAL
db POKE_BALL
db POTION
db SUPER_POTION
db ESCAPE_ROPE
db REPEL
db ANTIDOTE
db PARLYZ_HEAL
db FLOWER_MAIL
db $ff
; 16111
Mart4: ; 16111
db 5 ; # items
db POTION
db SUPER_POTION
db HYPER_POTION
db FULL_HEAL
db REVIVE
db $ff
; 16118
Mart5: ; 16118
db 7 ; # items
db POTION
db SUPER_POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db $ff
; 16121
Mart6: ; 16121
db 8 ; # items
db POKE_BALL
db GREAT_BALL
db ESCAPE_ROPE
db REPEL
db REVIVE
db FULL_HEAL
db POKE_DOLL
db FLOWER_MAIL
db $ff
; 1612b
Mart7: ; 1612b
db 7 ; # items
db X_SPEED
db X_SPECIAL
db X_DEFEND
db X_ATTACK
db DIRE_HIT
db GUARD_SPEC
db X_ACCURACY
db $ff
; 16134
Mart8: ; 16134
db 5 ; # items
db PROTEIN
db IRON
db CARBOS
db CALCIUM
db HP_UP
db $ff
; 1613b
Mart9: ; 1613b
db 3 ; # items
db TM_41
db TM_48
db TM_33
db $ff
; 16140
Mart10: ; 16140
db 4 ; # items
db TM_41
db TM_48
db TM_33
db TM_02
db $ff
; 16146
Mart11: ; 16146
db 4 ; # items
db TM_41
db TM_48
db TM_33
db TM_08
db $ff
; 1614c
Mart12: ; 1614c
db 5 ; # items
db TM_41
db TM_48
db TM_33
db TM_02
db TM_08
db $ff
; 16153
Mart13: ; 16153
db 9 ; # items
db GREAT_BALL
db SUPER_POTION
db HYPER_POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db ICE_HEAL
db SUPER_REPEL
db SURF_MAIL
db $ff
; 1615e
Mart14: ; 1615e
db 10 ; # items
db POKE_BALL
db GREAT_BALL
db POTION
db SUPER_POTION
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db ICE_HEAL
db REVIVE
db $ff
; 1616a
Mart15: ; 1616a
db 4 ; # items
db TINYMUSHROOM
db SLOWPOKETAIL
db POKE_BALL
db POTION
db $ff
; 16170
Mart16: ; 16170
db 9 ; # items
db RAGECANDYBAR
db GREAT_BALL
db SUPER_POTION
db HYPER_POTION
db ANTIDOTE
db PARLYZ_HEAL
db SUPER_REPEL
db REVIVE
db FLOWER_MAIL
db $ff
; 1617b
Mart17: ; 1617b
db 9 ; # items
db GREAT_BALL
db ULTRA_BALL
db HYPER_POTION
db MAX_POTION
db FULL_HEAL
db REVIVE
db MAX_REPEL
db X_DEFEND
db X_ATTACK
db $ff
; 16186
Mart18: ; 16186
db 9 ; # items
db ULTRA_BALL
db HYPER_POTION
db FULL_HEAL
db REVIVE
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db FLOWER_MAIL
db $ff
; 16191
Mart19: ; 16191
db 7 ; # items
db GREAT_BALL
db SUPER_POTION
db SUPER_REPEL
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db $ff
; 1619a
Mart20: ; 1619a
db 9 ; # items
db GREAT_BALL
db ULTRA_BALL
db SUPER_POTION
db SUPER_REPEL
db FULL_HEAL
db X_DEFEND
db X_ATTACK
db DIRE_HIT
db SURF_MAIL
db $ff
; 161a5
Mart21: ; 161a5
db 8 ; # items
db GREAT_BALL
db POTION
db SUPER_POTION
db MAX_REPEL
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db $ff
; 161af
Mart22: ; 161af
db 8 ; # items
db ULTRA_BALL
db SUPER_POTION
db HYPER_POTION
db REVIVE
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
db LITEBLUEMAIL
db $ff
; 161b9
Mart23: ; 161b9
db 7 ; # items
db POTION
db SUPER_POTION
db HYPER_POTION
db MAX_POTION
db REVIVE
db SUPER_REPEL
db MAX_REPEL
db $ff
; 161c2
Mart24: ; 161c2
db 10 ; # items
db POKE_BALL
db GREAT_BALL
db ULTRA_BALL
db ESCAPE_ROPE
db FULL_HEAL
db ANTIDOTE
db BURN_HEAL
db ICE_HEAL
db AWAKENING
db PARLYZ_HEAL
db $ff
; 161ce
Mart25: ; 161ce
db 5 ; # items
db TM_10
db TM_11
db TM_17
db TM_18
db TM_37
db $ff
; 161d5
Mart26: ; 161d5
db 3 ; # items
db POKE_DOLL
db LOVELY_MAIL
db SURF_MAIL
db $ff
; 161da
Mart27: ; 161da
db 5 ; # items
db HP_UP
db PROTEIN
db IRON
db CARBOS
db CALCIUM
db $ff
; 161e1
Mart28: ; 161e1
db 7 ; # items
db X_ACCURACY
db GUARD_SPEC
db DIRE_HIT
db X_ATTACK
db X_DEFEND
db X_SPEED
db X_SPECIAL
db $ff
; 161ea
Mart29: ; 161ea
db 7 ; # items
db GREAT_BALL
db ULTRA_BALL
db SUPER_POTION
db HYPER_POTION
db FULL_HEAL
db MAX_REPEL
db FLOWER_MAIL
db $ff
; 161f3
Mart30: ; 161f3
db 8 ; # items
db GREAT_BALL
db ULTRA_BALL
db HYPER_POTION
db MAX_POTION
db FULL_HEAL
db X_ATTACK
db X_DEFEND
db FLOWER_MAIL
db $ff
; 161fd
Mart31: ; 161fd
db 6 ; # items
db POKE_DOLL
db FRESH_WATER
db SODA_POP
db LEMONADE
db REPEL
db PORTRAITMAIL
db $ff
; 16205
Mart32: ; 16205
db 7 ; # items
db ULTRA_BALL
db MAX_REPEL
db HYPER_POTION
db MAX_POTION
db FULL_RESTORE
db REVIVE
db FULL_HEAL
db $ff
; 1620e
Mart33: ; 1620e
db 4 ; # items
db ENERGYPOWDER
db ENERGY_ROOT
db HEAL_POWDER
db REVIVAL_HERB
db $ff
; 16214
DefaultMart: ; 16214
db 2 ; # items
db POKE_BALL
db POTION
db $ff
; 16218

95
macros.asm Normal file
View File

@ -0,0 +1,95 @@
; rgbds macros
dwb: MACRO
dw \1
db \2
ENDM
dbw: MACRO
db \1
dw \2
ENDM
dn: MACRO
db \1 << 4 + \2
ENDM
dt: MACRO ; three-byte (big-endian)
db (\1 >> 16) & $ff
db (\1 >> 8) & $ff
db \1 & $ff
ENDM
bigdw: MACRO ; big-endian word
dw ((\1)/$100) + (((\1)&$ff)*$100)
ENDM
callab: MACRO ; address, bank
ld hl, \1
ld a, BANK(\1)
rst FarCall
ENDM
callba: MACRO ; bank, address
ld a, BANK(\1)
ld hl, \1
rst FarCall
ENDM
TX_RAM: MACRO
db 1
dw \1
ENDM
TX_FAR: MACRO
db $16
dw \1
db BANK(\1)
ENDM
RGB: MACRO
dw ((\3 << 10) | (\2 << 5) | (\1))
ENDM
note: MACRO
db \1
ENDM
; It's better to use *coord than FuncCoord.
FuncCoord: MACRO
Coord = $c4a0 + 20 * \2 + \1
ENDM
bccoord: MACRO
FuncCoord \1, \2
ld bc, Coord
ENDM
decoord: MACRO
FuncCoord \1, \2
ld de, Coord
ENDM
hlcoord: MACRO
FuncCoord \1, \2
ld hl, Coord
ENDM
; pic animations
frame: MACRO
db \1
db \2
ENDM
setrepeat: MACRO
db $fe
db \1
ENDM
dorepeat: MACRO
db $fd
db \1
ENDM
endanim: MACRO
db $ff
ENDM

7462
main.asm

File diff suppressed because it is too large Load Diff

38
rst.asm Normal file
View File

@ -0,0 +1,38 @@
; rst vectors
SECTION "rst0",ROM0[0]
di
jp Start
SECTION "rst8",ROM0[FarCall]
jp FarCall_hl
SECTION "rst10",ROM0[Bankswitch]
ld [hROMBank], a
ld [MBC3RomBank], a
ret
SECTION "rst18",ROM0[$18]
rst $38
SECTION "rst20",ROM0[$20]
rst $38
SECTION "rst28",ROM0[JumpTable]
push de
ld e, a
ld d, 0
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
pop de
jp [hl]
; SECTION "rst30",ROM0[$30]
; rst30 is midst rst28
SECTION "rst38",ROM0[$38]
rst $38

93
trainers/dvs.asm Normal file
View File

@ -0,0 +1,93 @@
GetTrainerDVs: ; 270c4
; Return the DVs of OtherTrainerClass in bc
push hl
ld a, [OtherTrainerClass]
dec a
ld c, a
ld b, 0
ld hl, TrainerClassDVs
add hl, bc
add hl, bc
ld a, [hli]
ld b, a
ld c, [hl]
pop hl
ret
; 270d6
TrainerClassDVs: ; 270d6
; Atk Spd
; Def Spc
db $9A, $77 ; falkner
db $88, $88 ; bugsy
db $98, $88 ; whitney
db $98, $88 ; morty
db $98, $88 ; pryce
db $98, $88 ; jasmine
db $98, $88 ; chuck
db $7C, $DD ; clair
db $DD, $DD ; rival1
db $98, $88 ; pokemon prof
db $DC, $DD ; will
db $DC, $DD ; cal
db $DC, $DD ; bruno
db $7F, $DF ; karen
db $DC, $DD ; koga
db $DC, $DD ; champion
db $98, $88 ; brock
db $78, $88 ; misty
db $98, $88 ; lt surge
db $98, $88 ; scientist
db $78, $88 ; erika
db $98, $88 ; youngster
db $98, $88 ; schoolboy
db $98, $88 ; bird keeper
db $58, $88 ; lass
db $98, $88 ; janine
db $D8, $C8 ; cooltrainerm
db $7C, $C8 ; cooltrainerf
db $69, $C8 ; beauty
db $98, $88 ; pokemaniac
db $D8, $A8 ; gruntm
db $98, $88 ; gentleman
db $98, $88 ; skier
db $68, $88 ; teacher
db $7D, $87 ; sabrina
db $98, $88 ; bug catcher
db $98, $88 ; fisher
db $98, $88 ; swimmerm
db $78, $88 ; swimmerf
db $98, $88 ; sailor
db $98, $88 ; super nerd
db $98, $88 ; rival2
db $98, $88 ; guitarist
db $A8, $88 ; hiker
db $98, $88 ; biker
db $98, $88 ; blaine
db $98, $88 ; burglar
db $98, $88 ; firebreather
db $98, $88 ; juggler
db $98, $88 ; blackbelt
db $D8, $A8 ; executivem
db $98, $88 ; psychic
db $6A, $A8 ; picnicker
db $98, $88 ; camper
db $7E, $A8 ; executivef
db $98, $88 ; sage
db $78, $88 ; medium
db $98, $88 ; boarder
db $98, $88 ; pokefanm
db $68, $8A ; kimono girl
db $68, $A8 ; twins
db $6D, $88 ; pokefanf
db $FD, $DE ; red
db $9D, $DD ; blue
db $98, $88 ; officer
db $7E, $A8 ; gruntf
db $98, $88 ; mysticalman
; 2715c

View File

@ -860,7 +860,14 @@ TextDelayFrames: ; cfb2
VBlankOccurred: ; cfb3
ds 1
ds 8
PredefID: ; cfb4
ds 1
PredefTemp: ; cfb5
ds 2
PredefAddress: ; cfb7
ds 2
ds 3
GameTimerPause: ; cfbc
; bit 0