more work towards Mega65 console
This commit is contained in:
1 parent
ab5400b20c
commit
ab22c13fac
4 files changed
+32
-8
No files matched your search
@@ -16,10 +16,12 @@
|
||||
|
||||
.label VIC_XPOS = $D050
|
||||
|
||||
.label VIC_SCRNPTR = $D060 // 4 bytes
|
||||
.label VIC_COLPTR = $D064 // 2 bytes
|
||||
.label VIC_CHARSTEP = $D058 // 2 bytes - logical characters per line
|
||||
|
||||
.label VIC_CHARPTR = $D068 // 3 bytes
|
||||
.label VIC_SCRNPTR = $D060 // 4 bytes - pointer to start of screen memory
|
||||
.label VIC_COLPTR = $D064 // 2 bytes - pointer to start of color memory
|
||||
|
||||
.label VIC_CHARPTR = $D068 // 3 bytes - pointer to start of character generator
|
||||
|
||||
// MISC registers
|
||||
|
||||
|
||||
@@ -72,17 +72,17 @@ m65_clrwin_loop:
|
||||
|
||||
m65_clrwin_loop_next:
|
||||
|
||||
// Increment M65_LPNT_SCR and M65_LPNT_KERN by the row length
|
||||
// Increment M65_LPNT_SCR and M65_LPNT_KERN by the logical row length (always 80 = $50)
|
||||
|
||||
clc
|
||||
lda m65_scrtab_txtwidth, x
|
||||
lda #$50
|
||||
adc M65_LPNT_SCR+0
|
||||
sta M65_LPNT_SCR+0
|
||||
bcc !+
|
||||
inc M65_LPNT_SCR+1
|
||||
!:
|
||||
clc
|
||||
lda m65_scrtab_txtwidth, x
|
||||
lda #$50
|
||||
adc M65_LPNT_KERN+0
|
||||
sta M65_LPNT_KERN+0
|
||||
bcc !+
|
||||
|
||||
@@ -8,7 +8,7 @@ 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
|
||||
m65_scrtab_txtwidth: // width of the text screen (logical width is always set to 80)
|
||||
|
||||
.byte 40
|
||||
.byte 80
|
||||
@@ -19,3 +19,19 @@ m65_scrtab_txtheight: // height of the text screen
|
||||
.byte 25
|
||||
.byte 25
|
||||
.byte 50
|
||||
|
||||
m65_scrtab_rowoffset_lo: // row offsets - low bytes
|
||||
|
||||
.byte <(80 * 0), <(80 * 1), <(80 * 2), <(80 * 3), <(80 * 4), <(80 * 5), <(80 * 6), <(80 * 7), <(80 * 8), <(80 * 9)
|
||||
.byte <(80 * 10), <(80 * 11), <(80 * 12), <(80 * 13), <(80 * 14), <(80 * 15), <(80 * 16), <(80 * 17), <(80 * 18), <(80 * 19)
|
||||
.byte <(80 * 20), <(80 * 21), <(80 * 22), <(80 * 23), <(80 * 24), <(80 * 25), <(80 * 26), <(80 * 27), <(80 * 28), <(80 * 29)
|
||||
.byte <(80 * 30), <(80 * 31), <(80 * 32), <(80 * 33), <(80 * 34), <(80 * 35), <(80 * 36), <(80 * 37), <(80 * 38), <(80 * 39)
|
||||
.byte <(80 * 40), <(80 * 41), <(80 * 42), <(80 * 43), <(80 * 44), <(80 * 45), <(80 * 46), <(80 * 47), <(80 * 48), <(80 * 49)
|
||||
|
||||
m65_scrtab_rowoffset_hi: // row offsets - high bytes
|
||||
|
||||
.byte >(80 * 0), >(80 * 1), >(80 * 2), >(80 * 3), >(80 * 4), >(80 * 5), >(80 * 6), >(80 * 7), >(80 * 8), >(80 * 9)
|
||||
.byte >(80 * 10), >(80 * 11), >(80 * 12), >(80 * 13), >(80 * 14), >(80 * 15), >(80 * 16), >(80 * 17), >(80 * 18), >(80 * 19)
|
||||
.byte >(80 * 20), >(80 * 21), >(80 * 22), >(80 * 23), >(80 * 24), >(80 * 25), >(80 * 26), >(80 * 27), >(80 * 28), >(80 * 29)
|
||||
.byte >(80 * 30), >(80 * 31), >(80 * 32), >(80 * 33), >(80 * 34), >(80 * 35), >(80 * 36), >(80 * 37), >(80 * 38), >(80 * 39)
|
||||
.byte >(80 * 40), >(80 * 41), >(80 * 42), >(80 * 43), >(80 * 44), >(80 * 45), >(80 * 46), >(80 * 47), >(80 * 48), >(80 * 49)
|
||||
@@ -49,11 +49,17 @@ m65_scrmodeset_internal: // entry point for M65_MODE65
|
||||
lda m65_scrtab_vic_ctrlb,x
|
||||
sta VIC_CTRLB
|
||||
|
||||
// Set the logical row length to 80
|
||||
|
||||
ldx #$50
|
||||
stx VIC_CHARSTEP+0
|
||||
ldx #$00
|
||||
stx VIC_CHARSTEP+1
|
||||
|
||||
// Set the base screen addresses:
|
||||
// - in VIC_SCRNPTR and M65_SCRTXTBASE to $16000
|
||||
// - in VIC_COLPTR to $0000
|
||||
|
||||
ldx #$00
|
||||
stx VIC_COLPTR+0
|
||||
stx VIC_COLPTR+1
|
||||
stx VIC_SCRNPTR+0
|
||||
|
||||
Reference in new issue
Block a user