Post by oziphantom on Jan 8, 2020 14:42:16 GMT
So after doing some battles to get the Screen looking somewhat normal, I think I'm up to the final boss
So in Z64K I get
and then on hardware I get
note the dark blue, note the black, note the light blue and the black get a single pixel height line for a 2~3 chars
So this is bitmap 40 col
The set up is two phase
first I put it into a 40x22 8x8 attributes with
initBitmap .proc
;set up 40 col bitmap
ldy #VDC40ColSetup.length-1
- ldx VDC40ColSetup.register,y
lda VDC40ColSetup.value,y
jsr writeVDCReg
dey
bpl -
!!ActiveScreen = #0
rts
;data to set the VDC to 40 col mode
VDC40ColSetup .block
;reg, value
_values := [(0,63),
(1,kScreenWidth),
(2,55),
(3,69),
(6,kScreenHeight),
(22,$89),
(25,215),
(27,0),
(34,63),
(35,52),
(20,>kVectors.Screen),
(21,<kVectors.Screen),
(12,>kVectors.Bitmap),
(13,<kVectors.Bitmap)
]
length = len(_values)
register .byte _values[:,0]
value .byte _values[:,1]
.bend
.pend
then I modify some more to get it into 8x2 attributes lda #1 ; value
ldx #9 ; register
jsr writeVDCReg
lda #159
ldx #4
jsr writeVDCReg
lda #100
ldx #6
jsr writeVDCReg
lda #131
ldx #7
jsr writeVDCReg
This is PAL.#WRITE_16IMMEDIATE_VDC #20,$2000 ; attributes are now at $2000
; first we set attributes to 00 so its clear
lda #00
ldx #24
jsr writeVDCReg ; set Fill operation DMA
#WRITE_16IMMEDIATE_VDC #18,$2000
lda #$35 ; make it white for now
ldx #31
jsr writeVDCReg ; set the value to write
lda #255
ldx #30
ldy #15 ; we need to do 4K
-
jsr writeVDCReg ; do 255 writes
dey
bpl -
#WRITE_16IMMEDIATE_VDC #12,$0000
; now we need to fill the bitmap
#WRITE_16IMMEDIATE_VDC #18,$0000 ; screen is now at $0000
lda #$00
ldx #31
jsr writeVDCReg ; set the value to write
lda #255
ldx #30
ldy #31 ; we need to do 8K
-
jsr writeVDCReg ; do 255 writes
dey
bpl -
using dma I set all 4K of attributes to the same single value, then I set the 8K of bitmap to be 00. The Dark blue up the top is from the text printing systems still writing attribute data. No idea where the 128 is getting black and the other dark blue from though. Any ideas on what else to try?