From 7437dc4548a423981838e649390a580c7f4534e7 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sat, 22 Aug 2020 21:07:12 +0200 Subject: [PATCH] more work towards MEGA65 DOS support --- src/basic/board_m65/mega65_map_helpers.s | 2 +- src/kernal/board_m65/mega65_map_helpers.s | 12 +++++++----- src/kernal/iec_fast/m65dos_bridge.s | 2 +- src/kernal/init/fda3.ioinit.s | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/basic/board_m65/mega65_map_helpers.s b/src/basic/board_m65/mega65_map_helpers.s index 2ed00bff..0f0fa550 100644 --- a/src/basic/board_m65/mega65_map_helpers.s +++ b/src/basic/board_m65/mega65_map_helpers.s @@ -23,6 +23,6 @@ map_BASIC_1: taz lda #$20 - ldx #$C2 // 0x4000 <- map 16KB from 0x22000 + ldx #$C2 // $4000 <- map 16KB from $22000 jmp map_end diff --git a/src/kernal/board_m65/mega65_map_helpers.s b/src/kernal/board_m65/mega65_map_helpers.s index 2353b70e..cf2d69cc 100644 --- a/src/kernal/board_m65/mega65_map_helpers.s +++ b/src/kernal/board_m65/mega65_map_helpers.s @@ -62,7 +62,7 @@ map_KERNAL_1: tay taz - ldx #$42 // 0x4000 <- map 8KB from 0x20000 + ldx #$42 // $4000 <- map 8KB from $20000 jmp_8 map_end @@ -78,10 +78,12 @@ map_DOS_1: tab // from now on, zeropage starts from $C000 ldy #$00 - taz #$81 // 0xC000 <- map 8KB (4KB useable) from $10000 + lda #$41 + taz // $C000 <- map 8KB from $10000 - tya - ldx #$C2 // 0x4000 <- map 16KB from 0x20000 + // XXX what should be the value here?? + lda #$A0 + ldx #$C2 // $4000 <- map 16KB from ????? map jmp_8 map_end_no_eom // no EOM, we do not want interrupts within DOS! @@ -95,6 +97,6 @@ map_NORMAL_from_DOS_1: phz lda #$00 - tba + tab jmp_8 map_NORMAL_common diff --git a/src/kernal/iec_fast/m65dos_bridge.s b/src/kernal/iec_fast/m65dos_bridge.s index b429353a..be0a2754 100644 --- a/src/kernal/iec_fast/m65dos_bridge.s +++ b/src/kernal/iec_fast/m65dos_bridge.s @@ -24,7 +24,7 @@ m65dos_init: jsr map_DOS_1 - jsr_ind VDOS_INIT + // XXX do after memory mapping is correct: jsr_ind VDOS_INIT jmp_8 !+ m65dos_hasunit: diff --git a/src/kernal/init/fda3.ioinit.s b/src/kernal/init/fda3.ioinit.s index f6398b4d..69cef2cf 100644 --- a/src/kernal/init/fda3.ioinit.s +++ b/src/kernal/init/fda3.ioinit.s @@ -20,7 +20,8 @@ IOINIT: jsr map_KERNAL_1 jsr_ind VK1__IOINIT - jmp map_NORMAL + // End by initializing the MEGA65 internal DOS + jmp m65dos_init #else