Shop OBEX P1 Docs P2 Docs Learn Events
Driver First Attempt: FAIL — Parallax Forums

Driver First Attempt: FAIL

cbmeekscbmeeks Posts: 634
edited 2015-10-14 15:22 in Propeller 1
OK, this is a little frustrating. Just when I think I'm starting to understand, I have to give up in frustration.

Below is my driver (copied/modified from NTSC Template). My intent was to:

1) 256 pixels
2) 2 color mode (most examples seem to assume I want 4 color mode)
3) Alternate between black and red ($38) stripes.

I got the strips. But no color. It's always black/white/gray.

I am using 2560/256 resolution = 10 PLLA per pixel. 32 pixels per frame = 320.

What am I doing wrong??

Thanks.

https://gist.github.com/cbmeeks/a3d205c70b03cc225129



**UPDATE**

Wow. I found the holy-grail (for me) examples. I've been searching for obvious terms like "VCFG", etc. But when I searched for "Spectrum", I found this thread:

http://forums.parallax.com/discussion/94377/zx-spectrum-tv-driver

This is exactly what I've been looking for. This is encouraging news for me. :-D

Anyway, I will study his example to see where I went wrong. I don't want to just copy-n-paste because I won't learn anything.

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2015-10-15 21:12
    I'm not where I can help much, as I would need to run some code and interact some to debug this.

    Try changing one thing at a time. Like go from 4 color mode to two color mode. That should only require a VCFG and a VSCL change to get the WAITVID doing the right thing. Once that is working, adjust the screen pixel loop to account for less overall data being needed. It's a divide by two.

    Etc...

    When doing multiple changes, video drivers are hard to debug without a scope and investing time to setup data output routines to see what contains what.

    I have found it much simpler and faster to change a driver incrementally. Take the time to think up a scenario that always leaves a working display possible.

    On a quick look, I don't see that you've changed from 2 color mode to 4 color mode for things like the colorburst. If the driver works, and is just monochrome, that is very highly likely to be where the trouble is.

    You won't need 4 color mode to do a colorburst properly. It's only one "color" value. But you will need to adjust the waitvid to output the same thing for the same amount of time.

    An alternative when starting with a 4 color mode driver, which most of them are, is to switch into 2 color for your active pixel area, then back to 4 color when you leave the active area. This will preserve all the signal portions of the driver leaving you to figure out how you want to do pixels and colors in the active area.

    Finally, if you got your strips, that's not a complete fail. Blank screen / scrambled signal is a complete fail. What you got is near success. Stay positive. :)



  • Thanks for the remarks. You're right. Not a complaint failure.

    The ZX Spectrum driver I found here was really what I needed. That guy really commented it well and it's really starting to set in on how and why this stuff works.

    So I have a functioning driver now that is almost everything I need. So I can focus on iterating it in small steps.

    For example, I want to get this driver running on my scope and compare what I find with the ZX Spectrum ULA book from Chris Smith.

    Then I want to add PAL support, etc. But I'm not sure how I will test PAL support. lol

    I do have a cheapo PAL/NTSC converter but I haven't tested it yet.
  • cbmeekscbmeeks Posts: 634
    edited 2015-10-17 05:14
    Well, I'm excited now. I've been playing around with the ULA driver and I'm finding that while it is very nice, my scope doesn't match what I think the driver should be producing.

    Keep in mind, my oscilloscope skills are amateur at best.

    But it's pretty awesome to be able to (I assume) make changes to the driver and then check the scope to see how accurate my timings are!

    :-)

    https://dropbox.com/sh/p34xp05dkev00zj/AAB3GG0D-mBJ51wTQBoDvPSTa?dl=0

    https://dropbox.com/s/jq29r56dqnz4ckq/NewFile8.bmp?dl=0


Sign In or Register to comment.