MEGA65 native mode fixes

This commit is contained in:
FeralChild64 committed 2020-08-19 22:51:33 +02:00
1 parent 628b944721
commit 8b6b470417
6 files changed
+28 -27

No files matched your search

@@ -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
+1 -1
View File
@@ -13,7 +13,7 @@ chrout_screen:
#if ROM_LAYOUT_M65
jsr M65_ISMODE65
beq_16 m65_chrout_screen
bcc_16 m65_chrout_screen
#endif
+10 -10
View File
@@ -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
+2 -2
View File
@@ -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
!: