several Z80 fixes

This commit is contained in:
FeralChild64 committed 2021-01-31 10:27:45 +01:00
1 parent 6f1a80637e
commit fb8592dc5e
6 files changed
+34 -13

No files matched your search

+13 -2
View File
@@ -111,12 +111,12 @@ ZVM_cputest:
; Copy up to 512 bytes from buffer to target memory
inw BIOS_LOADCOUNT
inw BIOS_LOADCOUNT ; XXX workaround for DEW not handling N flag
@loop3:
dew BIOS_LOADCOUNT
beq @loop2 ; XXX why no BMI, without INW?
beq @loop2
lda [BIOS_IOBUFERPTR],z
sta [BIOS_LOADPTR],z
@@ -152,8 +152,19 @@ ZVM_cputest:
lda #$FF
sta [BIOS_LOADPTR],z ; $FF = CP/M simulation for CPU test
lda #$00
sta BIOS_LOADPTR+0
lda #$76 ; HALT
sta [BIOS_LOADPTR],z
inc BIOS_LOADPTR
lda #$FE
sta [BIOS_LOADPTR],z ; $FE = dummy
; Run the software
jsr PRIMM
!pet $0D, $0D, 0
ldz #$00 ; in case hypervisor modified it
jmp ZVM_next