2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
.include "pce.inc"
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
; FIXME: implement selection of different video modes at runtime
|
|
|
|
HIRES = 1
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
.export vdc_init
|
2014-11-29 13:18:48 +00:00
|
|
|
|
|
|
|
vdc_init:
|
2015-08-29 13:58:57 +00:00
|
|
|
lda a: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 ; MAWR
|
|
|
|
VREG $0C, $1702 ; CRTC - VSR
|
|
|
|
VREG $0D, $00DF ; CRTC - VDS
|
|
|
|
VREG $0E, $000C ; CRTC - VDE
|
|
|
|
VREG $0F, $0000 ; DCR
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-07-15 11:18:12 +00:00
|
|
|
.if HIRES
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
VREG $0A, $0C02 ; CRTC - HSR
|
|
|
|
VREG $0B, $043C ; CRTC - HDS
|
|
|
|
lda #$06
|
|
|
|
sta VCE_CTRL
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-07-15 11:18:12 +00:00
|
|
|
.else
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
VREG $0A, $0202 ; CRTC - HSR
|
|
|
|
VREG $0B, $041F ; CRTC - HDS
|
|
|
|
lda #$04
|
|
|
|
sta VCE_CTRL
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-07-15 11:18:12 +00:00
|
|
|
.endif
|
2014-11-29 13:18:48 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
lda a:VDC_CTRL
|
|
|
|
rts
|