Disassemble the BLUEMONS.GB debug ROM

This commit is contained in:
Rangi 2020-07-15 13:35:39 -04:00
parent 87f24a885d
commit 4b4ad9894e
25 changed files with 364 additions and 81 deletions

View file

@ -3,42 +3,66 @@
SECTION "rst0", ROM0[$0000]
rst $38
ds $08 - @, 0 ; unused
SECTION "rst8", ROM0[$0008]
rst $38
ds $10 - @, 0 ; unused
SECTION "rst10", ROM0[$0010]
rst $38
ds $18 - @, 0 ; unused
SECTION "rst18", ROM0[$0018]
rst $38
ds $20 - @, 0 ; unused
SECTION "rst20", ROM0[$0020]
rst $38
ds $28 - @, 0 ; unused
SECTION "rst28", ROM0[$0028]
rst $38
ds $30 - @, 0 ; unused
SECTION "rst30", ROM0[$0030]
rst $38
ds $38 - @, 0 ; unused
SECTION "rst38", ROM0[$0038]
rst $38
ds $40 - @, 0 ; unused
; Game Boy hardware interrupts
SECTION "vblank", ROM0[$0040]
jp VBlank
ds $48 - @, 0 ; unused
SECTION "lcd", ROM0[$0048]
rst $38
ds $50 - @, 0 ; unused
SECTION "timer", ROM0[$0050]
jp Timer
ds $58 - @, 0 ; unused
SECTION "serial", ROM0[$0058]
jp Serial
ds $60 - @, 0 ; unused
SECTION "joypad", ROM0[$0060]
reti
@ -54,4 +78,4 @@ Start::
; The Game Boy cartridge header data is patched over by rgbfix.
; This makes sure it doesn't get used for anything else.
ds $0150 - @, $00
ds $0150 - @

View file

@ -50,5 +50,15 @@ RunNPCMovementScript::
EndNPCMovementScript::
farjp _EndNPCMovementScript
EmptyFunc2::
DebugPressedOrHeldB::
IF DEF(_DEBUG)
ld a, [wd732]
bit 1, a
ret z
ldh a, [hJoyHeld]
bit BIT_B_BUTTON, a
ret nz
ldh a, [hJoyPressed]
bit BIT_B_BUTTON, a
ENDC
ret

View file

@ -2436,7 +2436,11 @@ CheckForUserInterruption::
jr z, .input
ldh a, [hJoy5]
IF DEF(_DEBUG)
and START | SELECT | A_BUTTON
ELSE
and START | A_BUTTON
ENDC
jr nz, .input
dec c

View file

@ -622,7 +622,11 @@ TextCommandJumpTable::
dw TextCommand_BOX ; TX_BOX
dw TextCommand_LOW ; TX_LOW
dw TextCommand_PROMPT_BUTTON ; TX_PROMPT_BUTTON
IF DEF(_DEBUG)
dw _ContTextNoPause ; TX_SCROLL
ELSE
dw TextCommand_SCROLL ; TX_SCROLL
ENDC
dw TextCommand_START_ASM ; TX_START_ASM
dw TextCommand_NUM ; TX_NUM
dw TextCommand_PAUSE ; TX_PAUSE

View file

@ -126,10 +126,15 @@ TalkToTrainer::
; checks if any trainers are seeing the player and wanting to fight
CheckFightingMapTrainers::
IF DEF(_DEBUG)
call DebugPressedOrHeldB
jr nz, .trainerNotEngaging
ENDC
call CheckForEngagingTrainers
ld a, [wSpriteIndex]
cp $ff
jr nz, .trainerEngaging
.trainerNotEngaging
xor a
ld [wSpriteIndex], a
ld [wTrainerHeaderFlagBit], a