Shop OBEX P1 Docs P2 Docs Learn Events
NTSC version of LFT's Turbulence demo — Parallax Forums

NTSC version of LFT's Turbulence demo

Wuerfel_21Wuerfel_21 Posts: 5,052
edited 2019-07-09 18:51 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
  • Wuerfel_21Wuerfel_21 Posts: 5,052
    edited 2019-07-18 02:59
    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:
  • hinvhinv Posts: 1,255

    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

    • it needs Linus' custom assembler, which IIRC doesn't work anymore without a minor change to the source
    • all the C code for building the assets doesn't open files in binary mode that should be, so needs some fixing to work on windows
  • 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 😂

Sign In or Register to comment.