14-05-2022, 02:37 PM
(12-05-2022, 06:03 PM)Under4Mhz Wrote: How do I set the 256TC into 64 column mode?Here's a code snippet to set 64 x 16 screen mode :
Code:
crtc equ 0ch ;6545 control port
crtd equ 0dh ;6545 data port
;set up the 64*16 screen format
init64:
ld hl,d6545
ld b,16
lp6545:
ld a,b
dec a
out (crtc),a
ld a,(hl)
out (crtd),a
dec hl
djnz lp6545
ret
;--------------------------------------------------------------------------
;6545 (Video Driver Chip) DATA (data to set the 6545 to 64*16 screen format
;--------------------------------------------------------------------------
db 108-1 ;horizontal sync timing constant
db 64 ;number of displayed characters per line
db 81 ;horizontal sync position
db 55 ;horizontal and vertical sync width
db 19-1 ;vertical sync width
db 09 ;vertical sync timing constant
db 16 ;number of displayed rows per screen
db 17 ;vertical sync position
db 72 ;mode control constant
db 16-1 ;number of scan lines per character
db 20h+15 ;cursor mode and start line
db 15 ;cursor end line
dw 0 ;display start address relative to 0F000h
db 0 ;cursor position
d6545:
db 0