Shop OBEX P1 Docs P2 Docs Learn Events
From Hydra TVdriver to PropBOE VGA driver ? — Parallax Forums

From Hydra TVdriver to PropBOE VGA driver ?

laurent974laurent974 Posts: 77
edited 2018-11-07 14:43 in Propeller 1
I would like to port some games from Hydra to propeller BOE. The Pb is that Hydra heavy uses the tv driver and BOE has only VGA.
(For instance that one here to start : ftp://ftp.parallax.com/Hydra CD/2012-01-07/Hydra/demos/Remi_Veilleux/REM_tutorial_03_01_06/ )

After some pm with remi veilleux (who wrote some very nice tutorials for the hydra), the original parallax TV driver is modified to use the scanline per pixel rather than tiles.
Here is a diff between them : https://www.diffchecker.com/hp1XeGtF

Is there any VGA drivers that is doing the same and that could be adapted from ?

@macca or @kuroneko, you have wrote a lot of VGA drivers. Is there any one that could be used for that before i try to write my own and surely failed ?

Comments

  • Wuerfel_21Wuerfel_21 Posts: 4,351
    edited 2018-11-07 15:08
    TV Drivers generally can't be easily ported to VGA
    - Different color palette (6 bit RGB vs. HSV thingy): Requires changing all color values
    - Different horizontal scan rate (TV is 15kHz, VGA at least 31kHz): VGA needs data twice as fast, so unless the cog(s) that are outputting to the display are 50% unused, you have a problem.

    Luckily, the driver you linked to has that design pattern where some cogs render into a line buffer and another scans those out. The output cog doesn't seem to do a whole lot, so I think that one could be VGA-ified.

    EDIT: Also, you could just build the TV circuit on the BOE's breadbord. It's just three resistors and the RCA connector.
  • I did just a quick look at the sources you linked, and it seems that they are using a scanline buffer for TV output: there is one or more COGs that are rendering the tile and bitmap data in a single scanline buffer one row at a time (REM_gfx_engine_017.spin), synchronized to the TV driver scanline counter, then the REM_tv_017.spin code outputs that scanline buffer to the TV.

    If so, then all kuroneko's driver under the scanline folder are doing that (and all drivers for my game console are doing that, since are derived from kuroneko's work). You need to adapt them to use the scanline buffer and counter references used by the graphics engine, and of course you need to adapt the colors map. Also if I'm not wrong, Hydra uses a low resolution something like 160x120, that may be a problem because none of the drivers I know of supports that resolution, so you also need to adapt the vga driver to do a 4x scaling to output the standard 640x480 VGA resolution. The waitvid.320x240.driver.2048.spin code does that (from 320x240 to 640x480), maybe it could be adapted for that.

    Hope this helps.

    Best regards,
    Marco.
  • macca wrote: »
    Also if I'm not wrong, Hydra uses a low resolution something like 160x120
    You're thinking about the HEL driver, which is used in a few Hydra games. It outputs every line twice (to make a 240p signal the TV accepts) and has Spectrum-like attribute clash.

  • Wuerfel_21 wrote: »
    macca wrote: »
    Also if I'm not wrong, Hydra uses a low resolution something like 160x120
    You're thinking about the HEL driver, which is used in a few Hydra games. It outputs every line twice (to make a 240p signal the TV accepts) and has Spectrum-like attribute clash.

    Right, the REM driver seems to output 256x192, in that case waitvid.256x192.driver.2048.spin should be a good candidate since the resolution is the same, upscaled to 1024x768.

    Best regards,
    Marco.
  • laurent974laurent974 Posts: 77
    edited 2018-11-07 18:22
    Thank you very much. Now I know which one could be used I ll give it a try. even if it will lead to nowhere, I will learn a few things
Sign In or Register to comment.