Shop OBEX P1 Docs P2 Docs Learn Events
Looking for a low res text VGA/DVI driver — Parallax Forums

Looking for a low res text VGA/DVI driver

I’m searching for a text-based video driver for small (7 inch?) displays that can run under @ersmith Flex suite. Specifically I am looking for text that could be readable by older (ahem) eyes from a few feet away. Perhaps a 640x480 driver that supports 40x15 text (or something along those lines) but I’m not fussy. DVI, VGA... its all good.

Any pointers or suggestions? Unfortunately, writing such a beast from scratch is currently beyond my talents.

Comments

  • JRoark - Same here, but I am thinking for the PNut version 34S. It is much more user friendly and the code is easier to understand. Especially if you want to modify it, and everyone wants to do that.

    I would like both a 40 by 15 and a 50 by 24 screen layout VGA format - for our aging eyes

    See my recent post on P2 i/o Workbench for your demos. It includes a file for the original P1 Font (a classic in 16x32 resolution) - and a 32 Custom User font array, for all your special font characters.

    Let's do this.
  • roglohrogloh Posts: 5,787
    edited 2020-07-14 01:16
    If you enable double wide pixels, you can output 40 column text in my video driver. You can also provide arbitrary height fonts as well so both 15 or 24 rows of text is also doable with 480 lines. If you also wanted 16 pixels wide for even finer clarity per character the only way to do that in my driver would be to draw two 8 pixel wide characters next to each other with a custom font for that purpose (eg. use low 128 char range of 256 for leftmost 8 pixels, then high 128 char range for rightmost 8 pixels). You'd obviously need to manage putting bytes into the screen buffer yourself then, but it is certainly doable. It would also support 20 column text this way too. You'd need to give up half the font though.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-07-14 02:02
    My PASM driver which is based on Chip's original VGA driver is run-time configurable which means you can configure for 1920x1080x8 or 256x144x8 or whatever as well as the other timing and intensity, display buffers etc via your initialize routine at startup. I can even change the clock frequency at runtime and it resets itself to suit. The palette and other parameters reload every frame which makes viewing BMP files and videos much easier. There's also a Y scale parameter for repeating lines.

    The higher levels for drawing and text etc are in TAQOZ but to write the text render part of it in C or Spin should be easy enough.
  • As he mentioned above, Roger's driver can do 320x480 output, so that's certainly one option (and a good one if you want to mix text and graphics).

    The VGA text driver that comes with flexgui can handle 16x32 fonts (so a 40x15 text screen at 640x480) but it didn't have an example. I also see that the 640x480 demo had bit-rotted: sorry about that! I'll fix both of those issues in the next release, but for now here's a version where the 640x480 demo (basdemo.bas) defaults to a big font, and the 800x600 demo (demo.spin) to a small font.

    The more complete version of the driver is at https://github.com/totalspectrum/p2_vga_text. That has some additional tools and examples, e.g. a utility to convert Unix .bdf font files into .bin files. The font layout is pretty straightfoward: it's a 1 bit per pixel image, FONT_WIDTH*256 wide and FONT_HEIGHT high, with all 256 possible characters.

    The code is Spin 1 rather than Spin 2, but it shouldn't be hard to translate for those of you who need Spin 2.
    vga.zip 22.9K
  • Looks like I'm not the only one thinking this direction @PropGuy2 !

    Somehow I had missed the @ersmith driver, which is odd because I spend a lot of time crawling around in the FlexGUI distribution stuff.

    @rogloh's driver is what I'm currently trying to get my head around.

    @"Peter Jakacki" where can I find yours? Is the file you are referencing hereabouts?: https://www.dropbox.com/sh/n979flsb9rjoclo/AAC73TZs9oObw0jYCb2ORbsoa/more/code/1080p_TileDriver_Test1e.spin2?dl=0
Sign In or Register to comment.