mirror of
https://github.com/simonowen/apple1emu.git
synced 2024-06-08 07:29:34 +00:00
- fixed BBR, where bits 0-6 were jumping to BBS
- fixed resetting of key data on startup (1 byte out) - improved Shift-Esc to poke RET into main loop
This commit is contained in:
parent
2aa9957252
commit
400ebcf11b
|
@ -55,7 +55,7 @@ start: di
|
||||||
|
|
||||||
reset_loop: ld hl,0
|
reset_loop: ld hl,0
|
||||||
ld (dsp_data),hl ; display ready
|
ld (dsp_data),hl ; display ready
|
||||||
ld (kbd_ctrl),hl ; no key available
|
ld (kbd_data),hl ; no key available
|
||||||
|
|
||||||
ld hl,(m6502_reset) ; start from reset vector
|
ld hl,(m6502_reset) ; start from reset vector
|
||||||
ld (reg_pc),hl
|
ld (reg_pc),hl
|
||||||
|
@ -271,22 +271,26 @@ update_io:
|
||||||
in a,(status)
|
in a,(status)
|
||||||
and %00100000
|
and %00100000
|
||||||
jr nz,not_esc ; jump if Esc not pressed
|
jr nz,not_esc ; jump if Esc not pressed
|
||||||
still_esc: ld a,&f7
|
|
||||||
in a,(status)
|
|
||||||
and %00100000
|
|
||||||
jr z,still_esc ; wait until Esc released
|
|
||||||
|
|
||||||
call clear_file ; Esc cancels type-in mode
|
call clear_file ; Esc cancels type-in mode
|
||||||
|
|
||||||
ld a,&fe
|
ld a,&fe
|
||||||
in a,(keyboard)
|
in a,(keyboard)
|
||||||
rra
|
rra
|
||||||
ld a,&1b ; Esc character
|
jr c,not_reset ; unshifted gives chr
|
||||||
|
|
||||||
|
ld a,&c9 ; RET opcode
|
||||||
|
ld (main_loop),a ; return to reset on next instruction
|
||||||
|
not_reset:
|
||||||
jr c,got_key ; unshifted gives chr
|
jr c,got_key ; unshifted gives chr
|
||||||
|
|
||||||
ld a,&c9 ; RET
|
still_esc: ld a,&f7
|
||||||
ld (main_loop),a ; exit to reset at next instruction
|
in a,(status)
|
||||||
jr no_key
|
and %00100000
|
||||||
|
jr z,still_esc ; wait until Esc released
|
||||||
|
|
||||||
|
ld a,&1b ; Esc character
|
||||||
|
jr got_key
|
||||||
not_esc:
|
not_esc:
|
||||||
ld a,&7f
|
ld a,&7f
|
||||||
in a,(keyboard)
|
in a,(keyboard)
|
||||||
|
@ -682,19 +686,19 @@ i_bra: ld a,(de) ; unconditional branch [65C02]
|
||||||
jr i_branch
|
jr i_branch
|
||||||
|
|
||||||
i_bbr_0: ld a,%00000001 ; BBRn [65C02]
|
i_bbr_0: ld a,%00000001 ; BBRn [65C02]
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_1: ld a,%00000010
|
i_bbr_1: ld a,%00000010
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_2: ld a,%00000100
|
i_bbr_2: ld a,%00000100
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_3: ld a,%00001000
|
i_bbr_3: ld a,%00001000
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_4: ld a,%00010000
|
i_bbr_4: ld a,%00010000
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_5: ld a,%00100000
|
i_bbr_5: ld a,%00100000
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_6: ld a,%01000000
|
i_bbr_6: ld a,%01000000
|
||||||
jp i_bbs
|
jp i_bbr
|
||||||
i_bbr_7: ld a,%10000000
|
i_bbr_7: ld a,%10000000
|
||||||
i_bbr: ex de,hl
|
i_bbr: ex de,hl
|
||||||
ld e,(hl)
|
ld e,(hl)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user