initial support for MEGA65 screen control codes
This commit is contained in:
1 parent
175c40c512
commit
6542f64a59
5 files changed
+175
-4
No files matched your search
@@ -58,7 +58,7 @@ The following ROM features are currently missing:
|
|||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| C64 | DONE | |
|
| C64 | DONE | |
|
||||||
| C128 | DONE | |
|
| C128 | DONE | |
|
||||||
| Mega65 | NOT DONE | code should be complete, but is not tested yet |
|
| Mega65 | PARTIAL | code mostly complete, but not tested yet |
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ The following ROM features are currently missing:
|
|||||||
| :----------------: | :------: | :------------------------------------------------: |
|
| :----------------: | :------: | :------------------------------------------------: |
|
||||||
| VIC-II | DONE | |
|
| VIC-II | DONE | |
|
||||||
| 80 columns, VDC | NOT DONE | |
|
| 80 columns, VDC | NOT DONE | |
|
||||||
| 80 columns, Mega65 | NOT DONE | |
|
| 80 columns, Mega65 | PARTIAL | work-in-progreess, not useable yet |
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
@@ -121,6 +121,17 @@ The following ROM features are currently missing:
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## MEGA65 storage
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
| Driver | Status | Remarks |
|
||||||
|
| :----------------: | :------: | :-------------------------------------------------------------------------: |
|
||||||
|
| internal floppy | NOT DONE | try to reuse https://github.com/commanderx16/x16-rom/tree/master/dos |
|
||||||
|
| SD card access | NOT DONE | tryy to reuse https://github.com/commanderx16/x16-rom/tree/master/dos/fat32 |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## RS-232
|
## RS-232
|
||||||
|
|
||||||
* modems (telephone, WiFi)
|
* modems (telephone, WiFi)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
.label clrchn_reset = KERNAL_0.clrchn_reset
|
.label clrchn_reset = KERNAL_0.clrchn_reset
|
||||||
.label udtim_keyboard = KERNAL_0.udtim_keyboard
|
.label udtim_keyboard = KERNAL_0.udtim_keyboard
|
||||||
.label chrout_to_screen_code = KERNAL_0.chrout_to_screen_code
|
.label chrout_to_screen_code = KERNAL_0.chrout_to_screen_code
|
||||||
|
.label colour_codes = KERNAL_0.colour_codes
|
||||||
|
|
||||||
.label setup_irq_timer = KERNAL_0.setup_irq_timer
|
.label setup_irq_timer = KERNAL_0.setup_irq_timer
|
||||||
.label wait_x_bars = KERNAL_0.wait_x_bars
|
.label wait_x_bars = KERNAL_0.wait_x_bars
|
||||||
|
|||||||
@@ -93,4 +93,8 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
|||||||
|
|
||||||
// XXX continue the implementation - fix the cursor position
|
// XXX continue the implementation - fix the cursor position
|
||||||
|
|
||||||
|
m65_chrout_screen_done:
|
||||||
|
|
||||||
|
// XXX reenable cursor
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@@ -4,6 +4,126 @@
|
|||||||
|
|
||||||
m65_chrout_screen_control:
|
m65_chrout_screen_control:
|
||||||
|
|
||||||
// XXX provide implementation
|
txa
|
||||||
|
|
||||||
rts
|
m65_chrout_try_jumptable:
|
||||||
|
|
||||||
|
ldx #(__m65_chrout_screen_jumptable_codes_end - m65_chrout_screen_jumptable_codes - 1)
|
||||||
|
|
||||||
|
m65_chrout_try_jumptable_loop:
|
||||||
|
|
||||||
|
cpx #(__m65_chrout_screen_jumptable_quote_guard - m65_chrout_screen_jumptable_codes - 1)
|
||||||
|
bne m65_chrout_try_jumptable_loop_noquote
|
||||||
|
|
||||||
|
// Is this insert/quote mode?
|
||||||
|
|
||||||
|
tay
|
||||||
|
lda QTSW
|
||||||
|
ora INSRT
|
||||||
|
beq !+
|
||||||
|
tya
|
||||||
|
jmp m65_chrout_screen_quote
|
||||||
|
!:
|
||||||
|
tya
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
|
m65_chrout_try_jumptable_loop_noquote:
|
||||||
|
|
||||||
|
cmp m65_chrout_screen_jumptable_codes, x
|
||||||
|
bne !+
|
||||||
|
|
||||||
|
// Found, perform a jump to subroutine
|
||||||
|
|
||||||
|
txa
|
||||||
|
asl
|
||||||
|
tax
|
||||||
|
jmp (m65_chrout_screen_jumptable, x)
|
||||||
|
|
||||||
|
!:
|
||||||
|
dex
|
||||||
|
bpl m65_chrout_try_jumptable_loop
|
||||||
|
|
||||||
|
m65_chrout_try_COLOR:
|
||||||
|
|
||||||
|
ldx #$0F
|
||||||
|
|
||||||
|
m65_chrout_try_color_loop:
|
||||||
|
|
||||||
|
cmp colour_codes,x
|
||||||
|
bne !+
|
||||||
|
|
||||||
|
lda COLOR
|
||||||
|
and #$F0
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
txa
|
||||||
|
ora COLOR
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
jmp m65_chrout_screen_done
|
||||||
|
!:
|
||||||
|
dex
|
||||||
|
bpl m65_chrout_try_color_loop
|
||||||
|
|
||||||
|
// Unknown code, or key not requiring any handling
|
||||||
|
|
||||||
|
jmp m65_chrout_screen_done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// XXX: implement screen routines below:
|
||||||
|
|
||||||
|
m65_chrout_screen_quote:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_CLR:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_HOME:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_SHIFT_OFF:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_SHIFT_ON:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_TXT:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_GFX:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_RVS_OFF:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_RVS_ON:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_CRSR_RIGHT:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_CRSR_LEFT:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_CRSR_DOWN:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_CRSR_UP:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_INS:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_TAB:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_LINE_FEED:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_UNDERLINE_ON:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_UNDERLINE_OFF:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_FLASHING_ON:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_FLASHING_OFF:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_TAB_SET_CLR:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_ESC:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_BELL:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_STOP:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_DEL:
|
||||||
|
nop
|
||||||
|
m65_chrout_screen_RETURN:
|
||||||
|
jmp m65_chrout_screen_done
|
||||||
@@ -89,3 +89,38 @@ __m65_chrout_screen_jumptable_quote_guard:
|
|||||||
.byte KEY_RETURN
|
.byte KEY_RETURN
|
||||||
|
|
||||||
__m65_chrout_screen_jumptable_codes_end:
|
__m65_chrout_screen_jumptable_codes_end:
|
||||||
|
|
||||||
|
|
||||||
|
.const m65_chrout_list = List().add(
|
||||||
|
|
||||||
|
m65_chrout_screen_CLR,
|
||||||
|
m65_chrout_screen_HOME,
|
||||||
|
m65_chrout_screen_SHIFT_OFF,
|
||||||
|
m65_chrout_screen_SHIFT_ON,
|
||||||
|
m65_chrout_screen_TXT,
|
||||||
|
m65_chrout_screen_GFX,
|
||||||
|
m65_chrout_screen_RVS_OFF,
|
||||||
|
m65_chrout_screen_RVS_ON,
|
||||||
|
m65_chrout_screen_CRSR_RIGHT,
|
||||||
|
m65_chrout_screen_CRSR_LEFT,
|
||||||
|
m65_chrout_screen_CRSR_DOWN,
|
||||||
|
m65_chrout_screen_CRSR_UP,
|
||||||
|
m65_chrout_screen_INS,
|
||||||
|
m65_chrout_screen_TAB,
|
||||||
|
m65_chrout_screen_LINE_FEED,
|
||||||
|
m65_chrout_screen_UNDERLINE_ON,
|
||||||
|
m65_chrout_screen_UNDERLINE_OFF,
|
||||||
|
m65_chrout_screen_FLASHING_ON,
|
||||||
|
m65_chrout_screen_FLASHING_OFF,
|
||||||
|
m65_chrout_screen_TAB_SET_CLR,
|
||||||
|
m65_chrout_screen_ESC,
|
||||||
|
m65_chrout_screen_BELL,
|
||||||
|
m65_chrout_screen_STOP,
|
||||||
|
m65_chrout_screen_DEL,
|
||||||
|
m65_chrout_screen_RETURN
|
||||||
|
)
|
||||||
|
|
||||||
|
m65_chrout_screen_jumptable:
|
||||||
|
|
||||||
|
// Note: 65C02 has the page boundary vector bug fixed!
|
||||||
|
put_jumptable(m65_chrout_list)
|
||||||
Reference in new issue
Block a user