MEGA65 native mode fixes
This commit is contained in:
1 parent
628b944721
commit
8b6b470417
6 files changed
+28
-27
No files matched your search
@@ -32,7 +32,7 @@ cmd_go_syntax_error:
|
||||
// If in native mode - switch to C64 compatibilty
|
||||
|
||||
jsr M65_ISMODE65
|
||||
bne cmd_go_rts
|
||||
bcs cmd_go_rts
|
||||
|
||||
jsr helper_ask_if_sure
|
||||
bcs cmd_go_rts
|
||||
@@ -45,21 +45,12 @@ cmd_go_syntax_error:
|
||||
// If in C64 compatibility mode - switch to native mode
|
||||
|
||||
jsr M65_ISMODE65
|
||||
beq cmd_go_rts
|
||||
bcc cmd_go_rts
|
||||
|
||||
jsr helper_ask_if_sure
|
||||
bcs cmd_go_rts
|
||||
jsr M65_MODE65
|
||||
// XXX test code, replace by jmp do_clr
|
||||
|
||||
jsr do_clr
|
||||
|
||||
lda #$41
|
||||
jsr JCHROUT
|
||||
testx:
|
||||
jmp testx
|
||||
|
||||
|
||||
jmp do_clr
|
||||
!:
|
||||
jmp do_ILLEGAL_QUANTITY_error
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ cmd_sys:
|
||||
// Make sure we are in C64 compatibility mode
|
||||
|
||||
jsr M65_ISMODE65
|
||||
bne cmd_sys_nsys_common
|
||||
bcs cmd_sys_nsys_common
|
||||
jsr M65_MODE64
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
M65_ISMODE65: // checks if mode is native M65 one, BEQ = jump if native mode
|
||||
M65_ISMODE65: // checks if mode is native M65 one, BCC = jump if native mode
|
||||
|
||||
pha
|
||||
|
||||
@@ -14,6 +14,16 @@ M65_ISMODE65: // checks if mode is native M65 one, BEQ = jump if native mode
|
||||
bne !+
|
||||
lda M65_MAGICSTR+2
|
||||
cmp #$35 // '5'
|
||||
bne !+
|
||||
|
||||
// M65 native mode
|
||||
|
||||
clc
|
||||
pla
|
||||
rts
|
||||
!:
|
||||
// C64 compatibility mode
|
||||
|
||||
sec
|
||||
pla
|
||||
rts
|
||||
@@ -13,7 +13,7 @@ chrout_screen:
|
||||
#if ROM_LAYOUT_M65
|
||||
|
||||
jsr M65_ISMODE65
|
||||
beq_16 m65_chrout_screen
|
||||
bcc_16 m65_chrout_screen
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,35 +37,35 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
||||
phz
|
||||
ldz M65__TXTCOL
|
||||
|
||||
// Start from setting M65_SCRSEG to point colour memory (starts from $FF80000)
|
||||
// Start from setting M65_LPNT_SCR to point colour memory (starts from $FF80000)
|
||||
|
||||
lda #$0F
|
||||
sta M65_SCRSEG+3
|
||||
sta M65_LPNT_SCR+3
|
||||
lda #$F8
|
||||
sta M65_SCRSEG+2
|
||||
sta M65_LPNT_SCR+2
|
||||
|
||||
lda M65_COLVIEW+1
|
||||
sta M65_SCRSEG+1
|
||||
sta M65_LPNT_SCR+1
|
||||
lda M65_COLVIEW+0
|
||||
sta M65_SCRSEG+0
|
||||
sta M65_LPNT_SCR+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
|
||||
adc M65_LPNT_SCR+0
|
||||
sta M65_LPNT_SCR+0
|
||||
lda m65_scrtab_rowoffset_hi,y
|
||||
adc M65_SCRSEG+1
|
||||
sta M65_SCRSEG+1
|
||||
adc M65_LPNT_SCR+1
|
||||
sta M65_LPNT_SCR+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
|
||||
// Now change M65_LPNT_SCR to point to screen memory
|
||||
|
||||
// XXX deduplicate this part
|
||||
lda M65_SCRSEG+1
|
||||
|
||||
@@ -26,7 +26,7 @@ tape_screen_on_motor_off:
|
||||
#else
|
||||
|
||||
jsr M65_ISMODE65
|
||||
bne_16 screen_on // MEGA65 native mode does not have badlines, no need to enable/disable screen
|
||||
bcs_16 screen_on // MEGA65 native mode does not have badlines, no need to enable/disable screen
|
||||
rts
|
||||
|
||||
#endif
|
||||
@@ -52,7 +52,7 @@ tape_screen_off_motor_on:
|
||||
#else
|
||||
|
||||
jsr M65_ISMODE65
|
||||
beq !+ // MEGA65 native mode does not have badlines, no need to enable/disable screen
|
||||
bcs !+ // MEGA65 native mode does not have badlines, no need to enable/disable screen
|
||||
jsr screen_off
|
||||
!:
|
||||
|
||||
|
||||
Reference in new issue
Block a user