|
Post by oziphantom on Nov 27, 2018 11:37:10 GMT
So here was me thinking that this would be easy..
I want to make the screen have 16 pixel high characters.
Given I'm PAL I set
reg value 4 19 5 0 6 12 7 16 9 15 23 16 And well when I set it from BASIC doing sys CDCC commands from data it worked. When I do it from asm, not so much, sometimes it is fine, sometimes it just rolls, in z64K it gives me a rolling half height screen.
Is the register change order critical? Do I need to set some registers and wait until something then change some more?
|
|
|
Post by oziphantom on Nov 27, 2018 13:39:26 GMT
Yes doing it in VBlank makes all the difference. Both Hardware and emulator.
|
|
|
Post by bjonte on Nov 28, 2018 14:39:42 GMT
I didn’t know this. What exactly needs to be done during vertical blanking?
|
|
|
Post by oziphantom on Nov 28, 2018 16:00:37 GMT
Exactly no idea, but if you run the code, you can get very mixed results. In BASIC it seemed to always work, but then when I was experimenting with it and changing one param at a time it would get messed up. It seems odd as you would expect it to "sort it self" once it hit next VBlank either way, but this is the VDC we are talking. Fails
ldy #size(VDCData.reg)-1 - ldx VDCData.reg,y lda VDCData.value,y jsr writeVDC__x dey bpl - ... VDCData .block reg .byte 4 , 5, 6, 7, 9,23 value .byte 19, 0,12,16,15,16 .bend
Works
lda #$20 ;wait until really in vblank - bit $d600 beq - ; wait while not in VBlank ldy #size(VDCData.reg)-1 - ldx VDCData.reg,y lda VDCData.value,y jsr writeVDC__x dey bpl - ... VDCData .block reg .byte 4 , 5, 6, 7, 9,23 value .byte 19, 0,12,16,15,16 .bend
|
|