more work towards internal MEGA65 DOS
This commit is contained in:
1 parent
fe00a07aeb
commit
de7ce30e03
5 files changed
+133
-24
No files matched your search
@@ -431,7 +431,7 @@ build/padding_64_KB:
|
|||||||
|
|
||||||
$(TARGET_M65_x) $(TARGET_M65_x_PXL): $(SEG_LIST_M65) build/padding_64_KB build/chargen_openroms.rom build/chargen_openroms.patched build/chargen_pxlfont.rom build/chargen_pxlfont.patched
|
$(TARGET_M65_x) $(TARGET_M65_x_PXL): $(SEG_LIST_M65) build/padding_64_KB build/chargen_openroms.rom build/chargen_openroms.patched build/chargen_pxlfont.rom build/chargen_pxlfont.patched
|
||||||
@echo
|
@echo
|
||||||
cat $(DIR_M65)/dos.seg_1 >> $(TARGET_M65_x)
|
cat $(DIR_M65)/dos.seg_1 > $(TARGET_M65_x)
|
||||||
cat $(DIR_M65)/kernal.seg_1 >> $(TARGET_M65_x)
|
cat $(DIR_M65)/kernal.seg_1 >> $(TARGET_M65_x)
|
||||||
cat $(DIR_M65)/basic.seg_1 >> $(TARGET_M65_x)
|
cat $(DIR_M65)/basic.seg_1 >> $(TARGET_M65_x)
|
||||||
cat $(DIR_M65)/basic.seg_0 >> $(TARGET_M65_x)
|
cat $(DIR_M65)/basic.seg_0 >> $(TARGET_M65_x)
|
||||||
@@ -440,7 +440,7 @@ $(TARGET_M65_x) $(TARGET_M65_x_PXL): $(SEG_LIST_M65) build/padding_64_KB build/c
|
|||||||
cat $(DIR_M65)/kernal.seg_0 >> $(TARGET_M65_x)
|
cat $(DIR_M65)/kernal.seg_0 >> $(TARGET_M65_x)
|
||||||
cat build/padding_64_KB >> $(TARGET_M65_x)
|
cat build/padding_64_KB >> $(TARGET_M65_x)
|
||||||
@echo
|
@echo
|
||||||
cat $(DIR_M65)/dos.seg_1 >> $(TARGET_M65_x_PXL)
|
cat $(DIR_M65)/dos.seg_1 > $(TARGET_M65_x_PXL)
|
||||||
cat $(DIR_M65)/kernal.seg_1 >> $(TARGET_M65_x_PXL)
|
cat $(DIR_M65)/kernal.seg_1 >> $(TARGET_M65_x_PXL)
|
||||||
cat $(DIR_M65)/basic.seg_1 >> $(TARGET_M65_x_PXL)
|
cat $(DIR_M65)/basic.seg_1 >> $(TARGET_M65_x_PXL)
|
||||||
cat $(DIR_M65)/basic.seg_0 >> $(TARGET_M65_x_PXL)
|
cat $(DIR_M65)/basic.seg_0 >> $(TARGET_M65_x_PXL)
|
||||||
|
|||||||
File renamed without changes.
@@ -6,8 +6,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Available memory maps:
|
// Available memory maps:
|
||||||
// - NORMAL - nothing mapped in
|
// - NORMAL - nothing mapped in
|
||||||
// - KERNAL_1 - for calling KERNAL_1 segment code
|
// - KERNAL_1 - for calling KERNAL_1 segment code
|
||||||
|
// - DOS_1 - for swiching to DOS context
|
||||||
|
// - NORMAL_from_DOS_1 - for switching bact from DOS context
|
||||||
|
|
||||||
|
|
||||||
map_NORMAL:
|
map_NORMAL:
|
||||||
@@ -19,6 +21,11 @@ map_NORMAL:
|
|||||||
phz
|
phz
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
|
map_NORMAL_common:
|
||||||
|
|
||||||
tax
|
tax
|
||||||
tay
|
tay
|
||||||
taz
|
taz
|
||||||
@@ -30,6 +37,10 @@ map_end:
|
|||||||
map
|
map
|
||||||
eom
|
eom
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
|
map_end_no_eom:
|
||||||
|
|
||||||
plz
|
plz
|
||||||
ply
|
ply
|
||||||
plx
|
plx
|
||||||
@@ -53,4 +64,37 @@ map_KERNAL_1:
|
|||||||
|
|
||||||
ldx #$42 // 0x4000 <- map 8KB from 0x20000
|
ldx #$42 // 0x4000 <- map 8KB from 0x20000
|
||||||
|
|
||||||
bne map_end
|
jmp_8 map_end
|
||||||
|
|
||||||
|
map_DOS_1:
|
||||||
|
|
||||||
|
php
|
||||||
|
pha
|
||||||
|
phx
|
||||||
|
phy
|
||||||
|
phz
|
||||||
|
|
||||||
|
lda #$C0
|
||||||
|
tab // from now on, zeropage starts from $C000
|
||||||
|
|
||||||
|
ldy #$00
|
||||||
|
taz #$81 // 0xC000 <- map 8KB (4KB useable) from $10000
|
||||||
|
|
||||||
|
tya
|
||||||
|
ldx #$C2 // 0x4000 <- map 16KB from 0x20000
|
||||||
|
|
||||||
|
map
|
||||||
|
jmp_8 map_end_no_eom // no EOM, we do not want interrupts within DOS!
|
||||||
|
|
||||||
|
map_NORMAL_from_DOS_1:
|
||||||
|
|
||||||
|
php
|
||||||
|
pha
|
||||||
|
phx
|
||||||
|
phy
|
||||||
|
phz
|
||||||
|
|
||||||
|
lda #$00
|
||||||
|
tba
|
||||||
|
|
||||||
|
jmp_8 map_NORMAL_common
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
|
||||||
// #LAYOUT# * * #IGNORE
|
|
||||||
|
|
||||||
//
|
|
||||||
// MEGA65 pseudo-IEC internal DOS support
|
|
||||||
//
|
|
||||||
|
|
||||||
.label VDOS_INIT = $4000
|
|
||||||
.label VDOS_HASUNIT = $4002
|
|
||||||
.label VDOS_ACPTR = $4004
|
|
||||||
.label VDOS_CIOUT = $4006
|
|
||||||
.label VDOS_LISTEN = $4008
|
|
||||||
.label VDOS_SECOND = $400A
|
|
||||||
.label VDOS_TALK = $400C
|
|
||||||
.label VDOS_TKSA = $400E
|
|
||||||
.label VDOS_UNTLK = $4010
|
|
||||||
.label VDOS_UNLSN = $4012
|
|
||||||
|
|
||||||
// XXX implement support
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
//
|
||||||
|
// MEGA65 pseudo-IEC internal DOS support
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
.label VDOS_INIT = $4000
|
||||||
|
.label VDOS_HASUNIT = $4002
|
||||||
|
.label VDOS_ACPTR = $4004
|
||||||
|
.label VDOS_CIOUT = $4006
|
||||||
|
.label VDOS_LISTEN = $4008
|
||||||
|
.label VDOS_SECOND = $400A
|
||||||
|
.label VDOS_TALK = $400C
|
||||||
|
.label VDOS_TKSA = $400E
|
||||||
|
.label VDOS_UNTLK = $4010
|
||||||
|
.label VDOS_UNLSN = $4012
|
||||||
|
|
||||||
|
|
||||||
|
// XXX connect this to core IEC implementation
|
||||||
|
|
||||||
|
|
||||||
|
m65dos_init:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_INIT
|
||||||
|
jmp_8 !+
|
||||||
|
|
||||||
|
m65dos_hasunit:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_HASUNIT
|
||||||
|
jmp_8 !+
|
||||||
|
|
||||||
|
m65dos_acptr:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_ACPTR
|
||||||
|
!:
|
||||||
|
jmp map_NORMAL_from_DOS_1 // try to make ACPTR slightly faster
|
||||||
|
|
||||||
|
m65dos_ciout:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_CIOUT
|
||||||
|
!:
|
||||||
|
jmp map_NORMAL_from_DOS_1 // try to make CIOUT slightly faster
|
||||||
|
|
||||||
|
m65dos_listen:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_LISTEN
|
||||||
|
jmp_8 !-
|
||||||
|
|
||||||
|
m65dos_second:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_SECOND
|
||||||
|
jmp_8 !-
|
||||||
|
|
||||||
|
m65dos_talk:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_TALK
|
||||||
|
jmp_8 !-
|
||||||
|
|
||||||
|
m65dos_tksa:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_TKSA
|
||||||
|
jmp_8 !-
|
||||||
|
|
||||||
|
m65dos_untlk:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_UNTLK
|
||||||
|
jmp_8 !-
|
||||||
|
|
||||||
|
m65dos_unlsn:
|
||||||
|
|
||||||
|
jsr map_DOS_1
|
||||||
|
jsr_ind VDOS_UNLSN
|
||||||
|
jmp_8 !-
|
||||||
Reference in new issue
Block a user