NTSC version of LFT's Turbulence demo

Wuerfel_21Wuerfel_21 Posts: 302
edited 2019-07-09 - 18:51:36 in Propeller 1
Hardware requirements:
- Audio on pins 10 and 11 (like Demoboard)
- Video on pins 12,13,14 (like Demoboard)
- Pins 0-7 not connected to anything that might get upset
- Pin 8 not connected to anything that doesn't mind being driven low all the time
- Load into EEPROM, not RAM
- If it comes up monochrome, reset and/or powercycle a couple times. Not sure why it isn't reliable.

So as it turns out, my board can't run @Linus Akesson 's Turbulence demo because the VGA port itself is on pins 0-7. (And I never seem to have a spare VGA monitor, they're all hooked up to my PCs...). So I spent the day digging through the source to make it work over NTSC. This is the result. I think 'll post the modified source code, instructions on how to fix Linus's homegrown tools and maybe even a version that loads from SPI RAM tomorrow. I'm so done with this for today. (incidentially, if you're reading this in 2030 and I haven't posted the source yet, PM me, lol)

Comments

  • Ahh, here's the source. The makefile doesn't have a "clean" target, so I had to manually filter out all the derived files, ugh. Please let me know if I left out one of the source files.

    Anyways, the meat of the NTSC code is in vga.s
    I suspect that the unreliability is due to the NTSC phase counters getting out of sync between the two video cogs.
    However, I did specifically account for this by having both cogs output a color with inverted phases and if the relevant DAC pin ever goes low during that check, both cogs are restarted. However, there seems to be some false positive somewhere :( However, there only seem to be two possible outcomes: no color and perfect color. None of the blue-and-red noise you get if the phase offset is only sortof right (try forcing the check to succeed to see what I mean).

    I do think it might work reliably on fully digital NTSC decoders, as they likely don't have to lock an actual PLL to the color burst.

    Also, to get PLASMA to work, you have to change line 205 of main.pl to
    append(_, [_ | Args], SysArgs),
    
    otherwise, it will silently fail. Wow, Prolog sure sucks.
    Fixed versions of the various custom build tools for turbulence are included in the attached source. pack.c needed to be fixed to switch stdout to binary mode on windows, otherwise the binaries get corrupted by LF-to-CRLF conversion. pack.c also has been modified to parse hex NTSC colors instead of base-4 RGB colors, for obvious reasons. Some of the tools also require the "err.h" file, which MinGW doesn't come with. I just wrote my own crappy replacement and changed some includes from <err.h> to "err.h".

    SPI RAM version some other time maybe...
  • Longtime fan of the demoscene in general...man, this still blows me away...this and discovering the YBox2 way back when was what got me into the Prop.
    The conversion looks flawless to me...fantastic job to you and Linus (wonder if he still lurks occasionally)

    Cheers,
    Jesse
    --
    WIP Spin drivers for various devices: LSM9DS1 IMU (SPI) | Newhaven 4x20 OLED (I2C) | MLX90621 (I2C) | SHT3x (I2C) | SSD1306 OLED (I2C; P1-SPIN, P2-SPIN2) | TCS3x7x (I2C) | MAX31856 (SPI) | BMP280 (I2C) | TMC2130 (SPI) | nRF24L01+ (SPI) | MLX90614 (I2C) | MAX9744 (I2C) | DS28CM00 (I2C) | TSL2591 (I2C) | CC1101 (SPI) | SX1231 (SPI)
  • Wuerfel_21Wuerfel_21 Posts: 302
    edited 2019-07-18 - 02:59:37
    I recently received a capture device, so here is a capture of the demo:
    [snip]

    Sorry for the bad quality, the capture device doesn't like the slightly wobbly hsync and there are also some skips that just aren't there in the file I uploaded and also some that are...

    EDIT: I tried some different software and different settings and got better quality:
Sign In or Register to comment.