MEGA65 glue code for DOS finished
This commit is contained in:
1 parent
379eb746fe
commit
ece9dc8f6f
20 files changed
+277
-24
No files matched your search
@@ -0,0 +1,11 @@
|
||||
//
|
||||
// Memory locations for the DOS
|
||||
//
|
||||
|
||||
//
|
||||
// Page 0
|
||||
//
|
||||
|
||||
.label UNIT_SDCARD = $00
|
||||
.label UNIT_FLOPPY = $01
|
||||
.label UNIT_RAMDISK = $02
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
.word dos_INIT
|
||||
.word dos_CHKUNIT
|
||||
.word dos_SETUNIT
|
||||
.word dos_ACPTR
|
||||
.word dos_CIOUT
|
||||
.word dos_LISTEN
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
//
|
||||
// Unit number handling. For detailed description see 'm65dos_bridge.s' file
|
||||
//
|
||||
|
||||
|
||||
dos_CHKUNIT:
|
||||
|
||||
cmp UNIT_SDCARD
|
||||
beq dos_CHKUNIT_sdcard
|
||||
cmp UNIT_FLOPPY
|
||||
beq dos_CHKUNIT_floppy
|
||||
cmp UNIT_RAMDISK
|
||||
beq dos_CHKUNIT_ramdisk
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
dos_CHKUNIT_sdcard:
|
||||
|
||||
lda #$00
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
dos_CHKUNIT_floppy:
|
||||
|
||||
lda #$01
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
dos_CHKUNIT_ramdisk:
|
||||
|
||||
lda #$02
|
||||
|
||||
clc
|
||||
rts
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
//
|
||||
// Initializes DOS. For detailed description see 'm65dos_bridge.s' file
|
||||
//
|
||||
|
||||
dos_INIT:
|
||||
|
||||
lda #CONFIG_UNIT_SDCARD
|
||||
sta UNIT_SDCARD
|
||||
lda #CONFIG_UNIT_FLOPPY
|
||||
sta UNIT_FLOPPY
|
||||
lda #CONFIG_UNIT_RAMDISK
|
||||
sta UNIT_RAMDISK
|
||||
|
||||
// XXX initialize drivers, etc.
|
||||
|
||||
rts
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
//
|
||||
// Unit number handling. For detailed description see 'm65dos_bridge.s' file
|
||||
//
|
||||
|
||||
|
||||
dos_SETUNIT:
|
||||
|
||||
// XXX check if .X is valid
|
||||
|
||||
cmp #$00
|
||||
beq dos_SETUNIT_sdcard
|
||||
cmp #$01
|
||||
beq dos_SETUNIT_floppy
|
||||
cmp #$02
|
||||
beq dos_SETUNIT_ramdisk
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
dos_SETUNIT_sdcard:
|
||||
|
||||
stx UNIT_SDCARD
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
dos_SETUNIT_floppy:
|
||||
|
||||
stx UNIT_FLOPPY
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
dos_SETUNIT_ramdisk:
|
||||
|
||||
stx UNIT_RAMDISK
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
clc
|
||||
rts
|
||||
@@ -1,10 +1,6 @@
|
||||
|
||||
// Dummy implementations - XXX to be replaced with real ones
|
||||
|
||||
dos_INIT:
|
||||
nop
|
||||
dos_CHKUNIT:
|
||||
nop
|
||||
dos_ACPTR:
|
||||
nop
|
||||
dos_CIOUT:
|
||||
|
||||
Reference in new issue
Block a user