NTSC version of LFT's Turbulence demo
Wuerfel_21
Posts: 5,097
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)
- 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
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 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...
The conversion looks flawless to me...fantastic job to you and Linus (wonder if he still lurks occasionally)
Cheers,
Jesse
[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:
Happen to have a link to the original source or EEPROM?
http://linusakesson.net/scene/turbulence/index.php
Source is linked there, too, but beware that
Everytime I see that demo it just transports me back into the 80s 😍
I love it, and I feel a lot of the demo's I have viewed inspire me, and make me hope one day to be a quarter as good 😂