Shop OBEX P1 Docs P2 Docs Learn Events
Recommendations for suitable VGA driver? — Parallax Forums

Recommendations for suitable VGA driver?

I have a simple 32x15 text driver integrated into Tachyon as a "ROM" which I can load in at runtime from upper EEPROM. This works quite well plus I have big digit mode plus box drawing using those characters as bigxels. Now this all seems to work in V4 as well but I'd like to implement a higher res driver to give me 80x25 at least and while a color per character is nice it is probably too much of a memory hog so I would probably just go for tiles.

Since I implement the high level functions in Tachyon I only really need the PASM part as the ROM but there are so many existing drivers to choose from but what I would like is one that only uses one or two cogs, and no more than 4k for buffers and tables, so perhaps a hi-res text tile driver. I've used one of these before with Spin but I would welcome recommendations too.

btw, I'm also thinking about redoing the main serial receive console driver to use the same cog memory for buffers too and release the image's hub ram for more general use or for the VGA. I know that this will reduce my top receive speed a little due to the polling and handling hub requests but before I reinvent the wheel maybe someone has done that already?

Comments

  • To do 80 characters without a lot of cogs you're going to need a custom font which will eat at least 1K or so of Hub RAM. And doing even that with minimal color features in VGA will be tricky because of the signal frequencies. A few years ago I did some work on this and came up with a 40 column very featureful (extended font and both background and foreground color options) VGA driver using the ROM font, so it was very pretty and had a minimal Hub RAM footprint once started, but it took three cogs. Someone else got about the same functionality working in two cogs but the result was a lot less extendable. The problem is really that the P1 is only just barely capable of bit-banging VGA. The ROM font is 32 bits wide; to get 80 columns you're going to need an 8-bit font. That's a nontrivial 768 bytes of Hub RAM for the font. Then, at the lowest and slowest standard resolution, 640x480, the pixel frequency is 25 MHz so you need to swap in new characters at about 3 MHz, which at 80 MHz Prop clock and 4 clock cycles per instruction gives you about 6 instructions in the video driver inner loop and that's not counting Hub RAM access delays. The way I did it in my driver was to have odd and even line queues populated by drivers that did the messy font decoding and put raw bit patterns in place for the actual hardware driver cog to fetch and place. Chip wrote drivers that do a lot more columns which are in the OBEX, but they are poorly documented and depend on using a lot of cogs cleverly synchronized.
  • I have a simple 32x15 text driver integrated into Tachyon as a "ROM" which I can load in at runtime from upper EEPROM. This works quite well plus I have big digit mode plus box drawing using those characters as bigxels. Now this all seems to work in V4 as well but I'd like to implement a higher res driver to give me 80x25 at least and while a color per character is nice it is probably too much of a memory hog so I would probably just go for tiles.

    Since I implement the high level functions in Tachyon I only really need the PASM part as the ROM but there are so many existing drivers to choose from but what I would like is one that only uses one or two cogs, and no more than 4k for buffers and tables, so perhaps a hi-res text tile driver. I've used one of these before with Spin but I would welcome recommendations too.

    Take a look at this:
    https://github.com/konimaru/waitvid.2048/tree/master/POC/80x25 RAM
Sign In or Register to comment.