work towards literal output for native MEGA65 mode
This commit is contained in:
1 parent
ee549361ab
commit
628b944721
4 files changed
+71
-4
No files matched your search
@@ -50,7 +50,16 @@ cmd_go_syntax_error:
|
|||||||
jsr helper_ask_if_sure
|
jsr helper_ask_if_sure
|
||||||
bcs cmd_go_rts
|
bcs cmd_go_rts
|
||||||
jsr M65_MODE65
|
jsr M65_MODE65
|
||||||
jmp do_clr
|
// XXX test code, replace by jmp do_clr
|
||||||
|
|
||||||
|
jsr do_clr
|
||||||
|
|
||||||
|
lda #$41
|
||||||
|
jsr JCHROUT
|
||||||
|
testx:
|
||||||
|
jmp testx
|
||||||
|
|
||||||
|
|
||||||
!:
|
!:
|
||||||
jmp do_ILLEGAL_QUANTITY_error
|
jmp do_ILLEGAL_QUANTITY_error
|
||||||
|
|
||||||
@@ -82,6 +91,8 @@ cmd_run:
|
|||||||
cmd_goto:
|
cmd_goto:
|
||||||
|
|
||||||
// GOTO requires line number
|
// GOTO requires line number
|
||||||
|
// XXX in case of no parameter, go to line 0 - checked with original ROMs
|
||||||
|
|
||||||
|
|
||||||
jsr fetch_line_number
|
jsr fetch_line_number
|
||||||
#if !ROM_LAYOUT_M65
|
#if !ROM_LAYOUT_M65
|
||||||
|
|||||||
@@ -32,9 +32,65 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
|||||||
|
|
||||||
tax // store screen code, we need .A for calculations
|
tax // store screen code, we need .A for calculations
|
||||||
|
|
||||||
// XXX continue the implementation
|
// Preserve .Z on stack, use it toi store screen columnt
|
||||||
|
|
||||||
|
phz
|
||||||
|
ldz M65__TXTCOL
|
||||||
|
|
||||||
|
// Start from setting M65_SCRSEG to point colour memory (starts from $FF80000)
|
||||||
|
|
||||||
|
lda #$0F
|
||||||
|
sta M65_SCRSEG+3
|
||||||
|
lda #$F8
|
||||||
|
sta M65_SCRSEG+2
|
||||||
|
|
||||||
|
lda M65_COLVIEW+1
|
||||||
|
sta M65_SCRSEG+1
|
||||||
|
lda M65_COLVIEW+0
|
||||||
|
sta M65_SCRSEG+0
|
||||||
|
|
||||||
|
// Add screen row to the address
|
||||||
|
|
||||||
|
ldy M65__TXTROW
|
||||||
|
clc
|
||||||
|
lda m65_scrtab_rowoffset_lo,y
|
||||||
|
adc M65_SCRSEG+0
|
||||||
|
sta M65_SCRSEG+0
|
||||||
|
lda m65_scrtab_rowoffset_hi,y
|
||||||
|
adc M65_SCRSEG+1
|
||||||
|
sta M65_SCRSEG+1
|
||||||
|
|
||||||
|
// Store the new color in screen memory
|
||||||
|
|
||||||
|
lda COLOR
|
||||||
|
sta_lp (M65_LPNT_SCR),z
|
||||||
|
|
||||||
|
// Now change M65_LPNT_SCRb to point to screen memory
|
||||||
|
|
||||||
|
// XXX deduplicate this part
|
||||||
|
lda M65_SCRSEG+1
|
||||||
|
sta M65_LPNT_SCR+3
|
||||||
|
lda M65_SCRSEG+0
|
||||||
|
sta M65_LPNT_SCR+2
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda M65_SCRBASE+0
|
||||||
|
adc M65_LPNT_SCR+0
|
||||||
|
sta M65_LPNT_SCR+0
|
||||||
|
lda M65_SCRBASE+1
|
||||||
|
adc M65_LPNT_SCR+1
|
||||||
|
sta M65_LPNT_SCR+1
|
||||||
|
|
||||||
|
// Store the new character in screen memory, restore .Z
|
||||||
|
|
||||||
|
txa
|
||||||
|
sta_lp (M65_LPNT_SCR),z
|
||||||
|
plz
|
||||||
|
|
||||||
|
// Increment screen column by 1
|
||||||
|
|
||||||
|
inc M65__TXTCOL
|
||||||
|
|
||||||
|
// XXX continue the implementation - fix the cursor position
|
||||||
|
|
||||||
rts
|
rts
|
||||||
@@ -23,7 +23,7 @@ m65_clrscr_takeover:
|
|||||||
// - M65_SCRVIEW, M65_COLVIEW
|
// - M65_SCRVIEW, M65_COLVIEW
|
||||||
// To clear the screen, two zeropage long pointers will be used, initialize them too
|
// To clear the screen, two zeropage long pointers will be used, initialize them too
|
||||||
// - M65_LPNT_SCR for screen memory
|
// - M65_LPNT_SCR for screen memory
|
||||||
// - M65_LPNT_KERN for colour memory (starts from $FF80000)
|
// - M65_LPNT_KERN for colour memory (starts from $FF80000) // XXX preserve this on stack, restore afterwards
|
||||||
|
|
||||||
sta M65_COLVIEW+0
|
sta M65_COLVIEW+0
|
||||||
sta M65_COLVIEW+1
|
sta M65_COLVIEW+1
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ M65_CLRWIN:
|
|||||||
|
|
||||||
// To clear the window, two zeropage long pointers will be used:
|
// To clear the window, two zeropage long pointers will be used:
|
||||||
// - M65_LPNT_SCR for screen memory
|
// - M65_LPNT_SCR for screen memory
|
||||||
// - M65_LPNT_KERN for colour memory (starts from $FF80000)
|
// - M65_LPNT_KERN for colour memory (starts from $FF80000) // XXX preserve this on stack, restore afterwards
|
||||||
|
|
||||||
// First initialize both pointers
|
// First initialize both pointers
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user