[FYI] VGA, 80xM, single cog, monochrome
kuroneko
Posts: 3,623
Another one for the monochrome driver collection. Fonts for 8x8 and 8x12 are included.
'' mailbox layout (80xM, monochrome) '' '' long[par][0]: screen: [!Z]:addr = 16:16 -> zero (accepted), 2n '' long[par][1]: font: size:*:addr = 8:8:16 -> zero (accepted), 2n '' long[par][2]: palette: [!Z]:fg:bg = 16:8:8 -> zero (accepted), optional colour '' long[par][3]: frame indicator
Comments
Best guess: you must be fetching the characters in the vblank of the preceeding lines; that was the only way I could think of that should work at 80Mhz, but I never had the time to implement it.
Or you are leaving at least one blank scan line between rows of text, which I had implemented but did not like due to not being able to have full block graphics.
update:
6 pixel wide font, rendered in an 8 pixel "timing window" might also work.
Sorry, can't help guessing
a 40x15 char version before with ROM font, here the font is 8 pixels wide so 80xM (different
M for 8x8 and 8x12 fonts I presume).
Most of the time pixel and system clock are not exactly in sync (e.g. 25.175MHz vs 80MHz) which is why one uses waitvid to block until the video data has been safely delivered. OTOH, with e.g. 20MHz and 40MHz said pixel clock has a stable relationship with the system clock, IOW one can predict when the data needs to be available which voids waitvid usage and nearly any normal insn will do instead (e.g. cmp colour, pixels). WHOP drivers are drivers which will only function at a specific system clock (e.g. 80MHz). While this may sound like a disadvantage, not using waitvid will give you more time where you need it (7+ cycles vs 4 cycles) and allows for drivers with more/better features. HTH
Where?
I see 640x480 @ 60Hz, which is nothing like 80MHz dot clock rate.
Can you share the core of the driver so we can learn how the magic is achieved in the 3,2 cpu cycles that are available pr pixel ?
CogSaver
Ah, I see, had the wrong end of the stick (wrong end of the PLL?). Partly because I've been working on high speed dot clocks myself and looking up lots of different VGA timings.
I had already given up on the 1 cog 80x60 char display with 8x8 font. It never appeared to me to use the B counter as a free "add char,font offset"
The other clever trick I see is reading 2 chars at a time from the frame buffer and using shifts + the fact that movs only uses the lower 9 bits of the value.
Again, thanks for sharing.
CogSaver
Using the B counter for the font offset addition is a very clever trick.
Well done !