BIOS now attached to BOOTCPM command, fixed another screen editor bug

This commit is contained in:
FeralChild64 committed 2020-12-23 20:23:17 +01:00
1 parent 6935ece386
commit 94a699119a
10 files changed
+151 -34

No files matched your search

+7 -3
View File
@@ -277,18 +277,22 @@ Z80_instr_ED_5F: ; LD A,R
ora REG_IFF2
sta REG_F
clc
lda REG_R06 ; register R only simulates random numbers
bpl @1
sec
@1:
rol
eor VIC_RASTER
adc TIME+2
eor VIC_XPOS
sta REG_R06
and #%01111111
eor REG_R7 ; not 'ora', we want to reuse the 'garbage'
sta REG_A
bpl @1
bpl @2
+Z80_PUT_1_SF
@1:
@2:
+bne ZVM_next
+Z80_PUT_1_ZF
jmp ZVM_next
+3
View File
@@ -71,6 +71,9 @@ zvm_BIOS_00_BOOT: ; Cold start
dew REG_AF ; AF and SP have $FFFF value on start
dew REG_SP
lda TIME+2 ; give a little initial randomness to register R
sta REG_R06
; XXX load CPM3.SYS
; FALLTROUGH
+41 -23
View File
@@ -5,7 +5,47 @@
ZVM_entry:
; XXX mark that this is the first start of CP/M iin the lifecycle, display BIOS information
; Reset stack pointer - this routine will never return
ldx #$FF
txs
; Skip the IRQ processing, even if Kernal reenables it
sei
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
lda VIC_CTRLA
ora #%00100000
sta VIC_CTRLA
; Setup colours, print welcome message
lda #$00
sta VIC_EXTCOL
sta VIC_BGCOL0
jsr PRIMM
!byte KEY_GREEN, KEY_ESC, 'o', KEY_CLR, KEY_C65_SHIFT_ON, KEY_TXT, KEY_C65_SHIFT_OFF
!pet "Open ROMs MEGA65 BIOS for CP/M", $0D
!pet "Zilog Z80 to 45GS02 translator", $0D
!byte $0D,$0D
!byte 0
; XXX code is not ready to progress further
jsr PRIMM
!byte $0D
!pet "* Implementation not finished yet - system HALTED *"
!byte 0
@1
bra @1
jmp zvm_BIOS_00_BOOT
ZVM_store_next:
@@ -71,28 +111,6 @@ Z80_instr_FD: +ZVM_DISPATCH Z80_vectab_FD_0, Z80_vectab_FD_1 ;
;
; Not implemented yet - XXX implement them!
;
+41
View File
@@ -0,0 +1,41 @@
;; #IMPORT# KERNAL_0 = KERNAL_0_combined.sym
;; #IMPORT# KERNAL_C = KERNAL_C_combined.sym
;
; Definitions for calling MEGA65 segment KERNAL_0 routines from ZVM_1
;
;; #ALIAS# CHROUT = KERNAL_C.proxy_Z1_CHROUT
;; #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
PRIMM:
pla ; get low part of (string address-1)
sta PTR1
pla ; get high part of (string address-1)
sta PTR2
phy
+bra @2
@1:
jsr CHROUT ; output a string char
@2:
inc PTR1 ; advance the string pointer
bne @3
inc PTR2
@3:
ldy #$00
lda (PTR1), y ; get string char
bne @1 ; output and continue if not NUL
ply
lda PTR2
pha
lda PTR1
pha
rts