more work on Z80 bringup
This commit is contained in:
1 parent
a9f3371772
commit
6f1a80637e
6 files changed
+30
-7
No files matched your search
@@ -38,6 +38,7 @@ Mon_Start:
|
||||
; ********
|
||||
|
||||
CLD
|
||||
CLI
|
||||
TSY
|
||||
STY SPH
|
||||
TSX
|
||||
|
||||
+17
-2
@@ -24,8 +24,7 @@ DBG_print_PC_opcode:
|
||||
!pet " opcode: ", 0
|
||||
|
||||
pla
|
||||
@1:
|
||||
beq @1
|
||||
+beq MONITOR
|
||||
jsr DBGINT_print_hex_byte
|
||||
|
||||
; FALLTROUGH
|
||||
@@ -57,6 +56,22 @@ DBG_print_hex:
|
||||
bra DBGINT_end
|
||||
|
||||
|
||||
DBG_print_LOADCOUNT:
|
||||
|
||||
php
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
phz
|
||||
|
||||
lda BIOS_LOADCOUNT+1
|
||||
jsr DBGINT_print_hex_byte
|
||||
lda BIOS_LOADCOUNT+0
|
||||
jsr DBGINT_print_hex_byte
|
||||
lda #$0D
|
||||
jsr CHROUT
|
||||
|
||||
bra DBGINT_end
|
||||
|
||||
|
||||
DBGINT_print_hex_byte:
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
Z80_instr_C3: ; JP nn
|
||||
|
||||
+Z80_FETCH_VIA_PC_INC
|
||||
jsr DBG_print_hex
|
||||
sta REG_PC+0
|
||||
+Z80_FETCH_VIA_PC_INC
|
||||
jsr DBG_print_hex
|
||||
sta REG_PC+1
|
||||
jmp ZVM_next
|
||||
|
||||
|
||||
+5
-4
@@ -14,10 +14,11 @@ ZVM: ; entry point
|
||||
; Skip the IRQ processing, even if Kernal reenables it
|
||||
|
||||
sei
|
||||
lda #<return_from_interrupt
|
||||
sta CINV+0
|
||||
lda #>return_from_interrupt
|
||||
sta CINV+1
|
||||
; XXX uncomment this when debugging is finished
|
||||
; lda #<return_from_interrupt
|
||||
; sta CINV+0
|
||||
; lda #>return_from_interrupt
|
||||
; sta CINV+1
|
||||
|
||||
; Make sure $C000-$CFFF ROM is mapped-in, we keep our proxies there
|
||||
; Also make sure the palette is taken from RAM
|
||||
|
||||
@@ -111,10 +111,12 @@ ZVM_cputest:
|
||||
|
||||
; Copy up to 512 bytes from buffer to target memory
|
||||
|
||||
inw BIOS_LOADCOUNT
|
||||
|
||||
@loop3:
|
||||
|
||||
dew BIOS_LOADCOUNT
|
||||
bmi @loop2
|
||||
beq @loop2 ; XXX why no BMI, without INW?
|
||||
|
||||
lda [BIOS_IOBUFERPTR],z
|
||||
sta [BIOS_LOADPTR],z
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
|
||||
;; #ALIAS# CHROUT = KERNAL_C.proxy_Z1_CHROUT
|
||||
|
||||
;; #ALIAS# MONITOR = KERNAL_0.MONITOR
|
||||
;; #ALIAS# return_from_interrupt = KERNAL_0.return_from_interrupt
|
||||
|
||||
|
||||
|
||||
; 'Print immediate', original implementation by Mike Barry, adapted to 65CE02, modified to preserve .Y
|
||||
; see http://www.6502.org/source/io/primm.htm
|
||||
|
||||
|
||||
Reference in new issue
Block a user