diff --git a/src/zvm_m65/zvm_bios.s b/src/zvm_m65/zvm_bios.s index f0924d6d..17cd7405 100644 --- a/src/zvm_m65/zvm_bios.s +++ b/src/zvm_m65/zvm_bios.s @@ -53,18 +53,42 @@ zvm_BIOS_00_BOOT: ; Cold start ; XXX !!! + ; XXX fetch RAM disk image + ; XXX close all the files, reset I/O, set screen mode + ; XXX clear memory + + ; Reset registers and internal emulation data + + ldz #$00 ; .Z is required to be 0 all the time + lda #$00 + tay +@1: + sta REG_AF, y + iny + cmp #(REG_IFF2+1) + bne @1 + + dew REG_AF ; AF and SP have $FFFF value on start + dew REG_SP + + ; XXX load CPM3.SYS + ; FALLTROUGH zvm_BIOS_01_WBOOT: ; Warm start zvm_BIOS_31_RESERV1: ; Reserved zvm_BIOS_32_RESERV2: ; Reserved - ; Reset BIOS vectors to point to bank 1 - - ; XXX setup VEC_MOVE_fetch, VEC_MOVE_store, VEC_DISKIO_store - ; XXX !!! + ; Select bank 1 as the default one + + jsr ZVM_set_bank_1 + + ; XXX put command processor in memory + + ; XXX setup VEC_MOVE_fetch, VEC_MOVE_store, VEC_DISKIO_store somewhere + zvm_BIOS_02_CONST: ; Check if input character available ; XXX !!! diff --git a/src/zvm_m65/zvm_core.s b/src/zvm_m65/zvm_core.s index 1e7cbe99..22a72078 100644 --- a/src/zvm_m65/zvm_core.s +++ b/src/zvm_m65/zvm_core.s @@ -5,27 +5,8 @@ ZVM_entry: - jsr ZVM_init - ; XXX fetch BDOS and Command Processor - jmp ZVM_next - -ZVM_init: - - ; Reset registers and internal data - - ldz #$00 ; .Z is required to be 0 all the time - lda #$00 - tay -@1: - sta REG_AF, y - iny - cmp #(REG_IFF2+1) - bne @1 - - ; XXX what is the initial SP value? - ; XXX clean memory - - jmp ZVM_set_bank_1 + ; XXX mark that this is the first start of CP/M iin the lifecycle, display BIOS information + jmp zvm_BIOS_00_BOOT ZVM_store_next: @@ -91,6 +72,24 @@ Z80_instr_FD: +ZVM_DISPATCH Z80_vectab_FD_0, Z80_vectab_FD_1 ; + + + + + + + + + + + + + + + + + +