2020-02-23 13:28:21 +00:00
|
|
|
; rst vectors (called through the rst instruction)
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst0", ROM0[$0000]
|
2020-02-23 13:28:21 +00:00
|
|
|
di
|
|
|
|
jp Start
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst8", ROM0[$0008] ; rst FarCall
|
2020-02-23 13:28:21 +00:00
|
|
|
jp FarCall_hl
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst10", ROM0[$0010] ; rst Bankswitch
|
2020-02-23 13:28:21 +00:00
|
|
|
ldh [hROMBank], a
|
|
|
|
ld [MBC3RomBank], a
|
|
|
|
ret
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst18", ROM0[$0018]
|
2020-02-23 13:28:21 +00:00
|
|
|
rst $38
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst20", ROM0[$0020]
|
2020-02-23 13:28:21 +00:00
|
|
|
rst $38
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst28", ROM0[$0028] ; rst JumpTable
|
2020-02-23 13:28:21 +00:00
|
|
|
push de
|
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
|
|
|
add hl, de
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
2020-02-23 19:11:54 +00:00
|
|
|
; SECTION "rst30", ROM0[$0030]
|
2020-02-23 13:28:21 +00:00
|
|
|
ld l, a
|
|
|
|
pop de
|
|
|
|
jp hl
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "rst38", ROM0[$0038]
|
2020-02-23 13:28:21 +00:00
|
|
|
rst $38
|
|
|
|
|
|
|
|
|
|
|
|
; Game Boy hardware interrupts
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "vblank", ROM0[$0040]
|
2020-02-23 13:28:21 +00:00
|
|
|
jp VBlank
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "lcd", ROM0[$0048]
|
2020-02-23 13:28:21 +00:00
|
|
|
jp LCD
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "timer", ROM0[$0050]
|
2020-02-23 13:28:21 +00:00
|
|
|
jp Timer
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "serial", ROM0[$0058]
|
2020-02-23 13:28:21 +00:00
|
|
|
jp Serial
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "joypad", ROM0[$0060]
|
2020-02-23 13:33:53 +00:00
|
|
|
jp Joypad
|
2020-02-23 13:28:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
; Game Boy cartridge header
|
|
|
|
|
2020-02-23 19:11:54 +00:00
|
|
|
SECTION "Header", ROM0[$0100]
|
2020-02-23 13:28:21 +00:00
|
|
|
|
|
|
|
Start::
|
|
|
|
nop
|
|
|
|
jp _Start
|
|
|
|
|
|
|
|
; The cartridge header data is filled in by rgbfix.
|
|
|
|
; This makes sure it doesn't get used.
|
2020-02-23 19:28:35 +00:00
|
|
|
ds $0150 - $0104
|