adapted SCREEN rioutine to MEGA65 native mode
This commit is contained in:
1 parent
e2cf83489f
commit
ad22140617
7 files changed
+67
-12
No files matched your search
@@ -73,6 +73,23 @@ print_sysinfo_banner:
|
||||
ldx #IDX__STR_SI_HDR_VID
|
||||
jsr print_packed_misc_str
|
||||
|
||||
jsr JSCREEN
|
||||
|
||||
phy
|
||||
lda #$00
|
||||
jsr print_integer
|
||||
|
||||
lda #$58
|
||||
jsr JCHROUT
|
||||
|
||||
ply
|
||||
tya
|
||||
tax
|
||||
lda #$00
|
||||
jsr print_integer
|
||||
|
||||
jsr print_space
|
||||
|
||||
ldx #IDX__STR_NTSC
|
||||
lda TVSFLG
|
||||
beq !+
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
.label JCHKIN = KERNAL_0.JCHKIN
|
||||
.label JCHRIN = KERNAL_0.JCHRIN
|
||||
.label JREADST = KERNAL_0.JREADST
|
||||
.label JSCREEN = KERNAL_0.JSCREEN
|
||||
.label SELDEV = KERNAL_0.SELDEV
|
||||
.label M65_ISMODE65 = KERNAL_0.M65_ISMODE65
|
||||
.label M65_SETWIN_XY = KERNAL_0.M65_SETWIN_XY
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
.label wait_x_bars = KERNAL_0.wait_x_bars
|
||||
.label viciv_unhide = KERNAL_0.viciv_unhide
|
||||
|
||||
.label m65_scrtab_txtwidth = KERNAL_0.m65_scrtab_txtwidth
|
||||
.label m65_scrtab_txtheight = KERNAL_0.m65_scrtab_txtheight
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
.label iec_set_idle = KERNAL_0.iec_set_idle
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
SCREEN:
|
||||
|
||||
#if !ROM_LAYOUT_M65
|
||||
|
||||
// There are only 2 sane ways to implement this routine,
|
||||
// I hope this one is different than what Commodore picked :)
|
||||
|
||||
@@ -22,3 +24,29 @@ SCREEN:
|
||||
ldx #40 // 40 rows
|
||||
|
||||
rts
|
||||
|
||||
#else
|
||||
|
||||
php
|
||||
jsr M65_ISMODE65
|
||||
bcc !+
|
||||
|
||||
plp
|
||||
|
||||
ldy #25 // 25 columns
|
||||
ldx #40 // 40 rows
|
||||
|
||||
rts
|
||||
!:
|
||||
plp
|
||||
pha
|
||||
ldy M65_SCRMODE
|
||||
|
||||
ldx m65_scrtab_txtwidth, y
|
||||
lda m65_scrtab_txtheight, y
|
||||
tay
|
||||
|
||||
pla
|
||||
rts
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
m65_scrtab_txtheight: // height of the text screen
|
||||
|
||||
.byte 25
|
||||
.byte 25
|
||||
.byte 50
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
m65_scrtab_txtwidth: // width of the text screen (logical width is always set to 80)
|
||||
|
||||
.byte 40
|
||||
.byte 80
|
||||
.byte 80
|
||||
@@ -8,18 +8,6 @@ m65_scrtab_vic_ctrlb: // parameters for VIC control register B
|
||||
.byte %10100000 // 80x25 + extended attributes
|
||||
.byte %10100100 // 80x50 + extended attributes
|
||||
|
||||
m65_scrtab_txtwidth: // width of the text screen (logical width is always set to 80)
|
||||
|
||||
.byte 40
|
||||
.byte 80
|
||||
.byte 80
|
||||
|
||||
m65_scrtab_txtheight: // height of the text screen
|
||||
|
||||
.byte 25
|
||||
.byte 25
|
||||
.byte 50
|
||||
|
||||
m65_scrtab_viewmax_lo: // maximum allowed viewport start - low byte
|
||||
|
||||
.byte $B0
|
||||
|
||||
Reference in new issue
Block a user