Shop OBEX P1 Docs P2 Docs Learn Events
Is there a Color Text VGA Driver with possible High Resolution? — Parallax Forums

Is there a Color Text VGA Driver with possible High Resolution?

At the moment I am thinking about a high resolution but low memory text VGA output for a self hosted P2 system. To achieve low memory needs it must be text based and not bit mapped. But it would be good to have colour per letter.
Any chance to integrate this into Tachyon or to patch it's bit mapped driver?
Thanks in advance for some hints!
Christof

Comments

  • MaciekMaciek Posts: 668
    edited 2021-11-18 19:50

    Might this bo of some help ? It's for the tiny 240x240 display but I think Peter has that covered already as he mentioned somewhere, I can't exactly remember where I saw this mentioned, his VGA driver can go to the HDMI FullHD screen resolution with no problems. Another place to look for clues would be here, I suppose.
    I can't be sure as I haven't tried that myself. No time to play with Tachyon recently, which is unfortunate but in two weeks I'll be back to the playground, hopefully.

  • pik33pik33 Posts: 2,347

    There are several such drivers scattered over the forum, but you can also write your own, it is not very difficult task.

    The maximum resolution I managed to achieve is FullHD. The P2 can output more than that, I tried 2560x1440 which is the native resolution of my monitor but the monitor didn't accept it.

    A good example of using text based 1920x1080 VGA driver is a Tetris game you can find here: https://www.parallax.com/tetris/

  • I dont know if you consider this “high resolution”, but ERSmith has a very nice, stable VGA driver that does up to 1280x1024 with a small footprint. I use it on nearly every project. Its part of his standard Flex suite distribution. Very easy to interface with.

  • There's one in the P2 obex: https://github.com/parallaxinc/propeller/tree/master/libraries/community/p2/All/ansi_vgatext. It's been tested up to 1280x800, but could probably go higher with a sufficiently overclocked P2.

  • RaymanRayman Posts: 13,798
    edited 2021-11-18 23:05

    The details on my 1080p tile driver are here:
    https://forums.parallax.com/discussion/171133/1080p-tile-driver-p1-style/p1

    Uses 256 color palette and each tile can have it's own foreground and background...

    Uses 3 cogs to pull that off though...

    However, one of those cogs can do double duty and do P1 style graphics as well.

  • RaymanRayman Posts: 13,798

    After reading that, I remember that there are actually 4 8-bit colors per tile.
    So, it's like P1, but much better as you can use any of 256 colors for those 4 colors.
    It uses the original P1 font, but you can use different ones instead...

  • @"Christof Eb." said:
    At the moment I am thinking about a high resolution but low memory text VGA output for a self hosted P2 system. To achieve low memory needs it must be text based and not bit mapped. But it would be good to have colour per letter.
    Any chance to integrate this into Tachyon or to patch it's bit mapped driver?
    Thanks in advance for some hints!
    Christof

    You could look here...my single COG driver can go up to very high resolutions, I've had it as high as 1920x1200 (240x200 in the smallest 8x6 font) in monochrome or more realistically 1024x768 resolutions with colour (16 FG+BG colours supported per character, like VGA text modes). For coloured text you need a P2 CPU clock about 5x or higher than the pixel clock. Hub memory use then is dominated by screen size, as the driver and font overheads are probably only in the vicinity of 8kB, depending on the number of scan lines in the font you use. More advanced use of this driver is possible and you can mix text with graphics using different screen regions, and the driver can make use of external memory for graphics etc. Merging into Tachyon might be doable if it can spawn PASM based COG and once you understand the register structures to configure the display format you desire and you can get Tachyon to write characters and colours into hub memory that represents the screen. There is SPIN wrapper included which controls register structures in memory but it doesn't have to be used, in theory the setup could be done from any enviroment - in fact I've had it working under MicroPython myself.

    https://www.parallax.com/dvi-vga-text-driver-demo/

  • Many thanks to all of you! A lot of stuff to study.... Great!
    Christof

  • Hi,
    one other question:
    I have now learned, that early home computers like Apple II or Atari 800 had a split screen mode, which allowed to have a number of text lines as tiles combined with pixel graphics for the other lines. So let me ask, if this compromise is possible with P2 too?
    Many thanks, Christof

  • evanhevanh Posts: 15,126
    edited 2022-03-17 09:43
  • pik33pik33 Posts: 2,347
    edited 2022-03-17 11:39

    a number of text lines as tiles combined with pixel graphics

    My DL driver (still WIP) can do it - the player (Prop2Play, here: https://github.com/pik33/P2-retromachine/tree/main/Propeller/Tracker player psram ) uses this option. Most of the screen uses character mode, then there is an oscilloscope, which is 2x vzoomed 4bpp graphic mode, and then the last line is again text mode - its fine scrolling is also done by DL commands

    What I am now doing with the driver is adding PSRAM support to it. The PSRAM is already supported at the display list level, but it needs high level function to be usable (putpixel, etc)

    The known bug in the driver prevents it to switch from text mode to any graphic mode which is not 4 bpp. As it is known, I will patch it after I got PSRAM fully working. The patching is not trivial, one of the important timing variable should be computed on the fly (at every line) instead of being passed via driver's registers (at every frame) and the problem is - I have no cog ram for the code. I have free about a half of LUT, so maybe I can place some code there.

Sign In or Register to comment.