1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/pce/vdc.s
2018-08-30 11:48:46 +02:00

41 lines
966 B
ArmAsm

.export vdc_init
.include "pce.inc"
; FIXME: implement selection of different video modes at runtime
HIRES = 1
vdc_init:
lda VDC_CTRL
VREG $00, $0000 ; MAWR
VREG $01, $0000 ; MARR
VREG $05, $0000 ; CR
VREG $06, $0000 ; RCR
VREG $07, $0000 ; BXR
VREG $08, $0000 ; BYR
VREG $09, $0070 ; MWR
VREG $0C, $1702 ; CRTC - VSR
VREG $0D, $00DF ; CRTC - VDS
VREG $0E, $000C ; CRTC - VDE
VREG $0F, $0000 ; DCR
.if HIRES
VREG $0A, $0C02 ; CRTC - HSR
VREG $0B, $043C ; CRTC - HDS
lda #$06
sta VCE_CTRL
.else
VREG $0A, $0202 ; CRTC - HSR
VREG $0B, $041F ; CRTC - HDS
lda #$04
sta VCE_CTRL
.endif
lda VDC_CTRL
rts