serial interrupt

This commit is contained in:
yenatch 2013-08-28 01:24:52 -04:00
parent 8898f63fc7
commit faae0e1029

View File

@ -44,7 +44,7 @@ SECTION "timer",ROM0[$50] ; timer interrupt
jp Timer jp Timer
SECTION "serial",ROM0[$58] ; serial interrupt SECTION "serial",ROM0[$58] ; serial interrupt
jp Function6ef jp Serial
SECTION "joypad",ROM0[$60] ; joypad interrupt SECTION "joypad",ROM0[$60] ; joypad interrupt
jp JoypadInt jp JoypadInt
@ -633,20 +633,24 @@ Function6e3: ; 6e3
Function6ef: ; 6ef Serial: ; 6ef
push af push af
push bc push bc
push de push de
push hl push hl
ld a, [$ffc9] ld a, [$ffc9]
and a and a
jr nz, .asm_71c jr nz, .asm_71c
ld a, [$c2d4] ld a, [$c2d4]
bit 0, a bit 0, a
jr nz, .asm_721 jr nz, .asm_721
ld a, [$ffcb] ld a, [$ffcb]
inc a inc a
jr z, .asm_726 jr z, .asm_726
ld a, [rSB] ld a, [rSB]
ld [$ffce], a ld [$ffce], a
ld a, [$ffcd] ld a, [$ffcd]
@ -654,7 +658,8 @@ Function6ef: ; 6ef
ld a, [$ffcb] ld a, [$ffcb]
cp $2 cp $2
jr z, .asm_752 jr z, .asm_752
ld a, $0
ld a, $00
ld [rSC], a ld [rSC], a
ld a, $80 ld a, $80
ld [rSC], a ld [rSC], a
@ -688,7 +693,7 @@ Function6ef: ; 6ef
ld a, [rDIV] ld a, [rDIV]
bit 7, a bit 7, a
jr nz, .asm_73f jr nz, .asm_73f
ld a, $0 ld a, $00
ld [rSC], a ld [rSC], a
ld a, $80 ld a, $80
ld [rSC], a ld [rSC], a