Shop OBEX P1 Docs P2 Docs Learn Events
32x24, 2 color 8x8 driver — Parallax Forums

32x24, 2 color 8x8 driver

potatoheadpotatohead Posts: 10,261
edited 2015-11-14 06:26 in Propeller 2
Something is funky with the screen addressing. I'll need to fix it, but I'm done for the night. Cheers!

It does show the streamer modes a little. Have fun!

It's character, or text mode, meaning you can write strings right to the display buffer, and it's got a small font.

[img][/img]

1632 x 1913 - 833K

Comments

  • Nice one potatohead, I'll have a look when I get home this evening :D
  • It works just fine. Got the hard stuff done! I'm having trouble specifying the screen address. I say $2000, and the thing ends up $2100 or something odd.

    Once you do put chars on the screen, everything is just fine. Displays all of 'em, in order, etc...

    I've done something late night that I'll probably see next time I look.

  • Hehehe! My P2 is spitting character out to a video display!! :) Blinky lights are good but text is better!!

    I must digest this and see if I understand any of it. This is totally usable for debuggering stuff!

    Good, job, Potatohead!
  • potatoheadpotatohead Posts: 10,261
    edited 2015-11-13 19:39
    Thanks! If you see what I am not understanding or just got wrong about the screen address, do tell.

    As you have found out, the sample text marks where it put the screen. I've also left some test code in. I'll remove it on my next pass.

    I've never been a fan of serial. I like char mode much better.

    It works by reading all the char values from the screen, then it fetches their pixels from the font, and it writes them into the scanline just before the streamer puts it on the screen.

    So the streamer is displaying the ones already done, while the COG is prepping the next scanline.

    The cool part is the hub ops interleave with what the streamer is doing nicely. At this low bitrate, there is a lot of time for the cog to use the hub. Eggbeater or turbine seems nice and fast compared to p1, which could not do this in one cog at 50mhz

    And no delicate hub access time hassles. Just do it. Now, I do wonder about some address combos. This driver does not seem to be maxing that out, but some more testing is needed to really understand. For me anyway...
  • STREAMERS MAKE MY BRAIN HURT!

    I've been pulling you program apart, taking out the test code and rearranging just so I can find out why it works so well when you subtract $88 from the screen buffer address. I haven't found anything that explains it.

    I did set up actual buffer space in hub for linerame and lineramo - you were just pointing to $900 and $920. I tried local instead of moving for your pointer loading. None of my changes made any positive difference.

    It's a fun detective project and is forcing me to read about streamers and learn how video stuff works, so it'should all good.

    It does work very well on my little 7" monitor. Once we find the glitch,it will be a handy debug tool.

    One puzzling question, when you go into dochar, you load up numchar with 28, why not 32 since you are doing 32 characters per line? It works but I don't see why.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-11-13 23:32
    I was not sure there was time for processing all the text. Look in hsync for another call to dochars. That one is written to do a few at a time as I was wanting to call it in various places to understand how much can be done at what times.

    Funny, I never did try all 32 in the main call. Might work. I will have some time tonight to poke at the screen issue and investigate the vsync issue we have all been having.

    Maybe it makes sense to expand it to 40 chars too. All fun, and thanks for the sleuthing.

    I'm puzzled on the screen address.


  • Ok, it seems my two calls to "dochars" was causing screen address trouble. Screen seems to work better now. Specify, $2000, $2001, etc... and it's right. You should be able to specify a screen, line buffer, etc.. and have it work.

    I went ahead and adjusted blanking and sync values. I think the blank lines are at the wrong blanking level... or the side borders are. See comments in the code. They are matched up now.

    Does this one display well for you?

    I didn't have any luck with the vsync. Need to use my scope.

  • It looks totally awesome on my little 7" LCD monitor!

    Time play with some API stuff!

    IMG_1875.JPG
    1280 x 960 - 466K
  • potatoheadpotatohead Posts: 10,261
    edited 2015-11-14 16:42
    Yeah. I agree with your other idea. This one was for debug, output purposes. It's based on Chip's original. Thanks for confirming the display. Your little screen is cool.

    Baggers is weaving modes and such into one driver. At some point, when that one gets rocking hard, this will need to be based off that one.

    As I have time, I'm also going to use this one as a base to fix whatever is going on in the vsync, because there is tearing there, and it's not gonna impact a modest display, but anything that wants to use most of the frame, or interlace is going to have issues on many screens. We gotta deal with that at some point. I'm a little stumped myself.

    The other little, minor thing is the timing beat with the colorburst. Chip indicated it's math precision that causes that. I want to improve the signal in that regard too. Right now, we can't do single pixel line art, or fine pitch dot patterns very well. All else is fantastic though! Of course. component and VGA are nuts now. All good! (well, we just gotta go mooch the component coefficients from the hot chip and get that done)

    Any of that can be merged with Baggers work, when it makes sense.



  • mindrobotsmindrobots Posts: 6,506
    edited 2015-11-14 16:41
    I'm waiting for Chip's RESI instruction - everytime I think of "resume on interrupt", my brain takes a pause and a little smile starts.....a resumable ISR has such wicked fun potential!! :)

    Thanks for putting a text mode together - this certainly has many great uses!
  • Yeah, cool beans on that one. Incremental tasks are very useful in a lot of contexts. With TV drivers, they come in very handy. Ever go look at Chip's original TV.spin for P1? It's got a set of tasks that get done every frame, and this resi instruction would have made that cake.

  • I gotta warm up my Github... That's where some of this P2 work is going.
  • I was going to suggest GitHub in my API thread but that is another point of contention on the forums.
  • Well, it's a non-issue really. I'll get around to putting useful things there, and others using it will do stuff that way. Others not using it will do things this way.

    Won't be hard to fetch code, use editor, do stuff. No worries here.

  • Hi,

    i've still got problems with my selfmade R2R ladder (at DE0).
    My R values are :
    8x 110 ohm
    7x 65 ohm
    and 130 ohm (to ground)
    is this correct ?

    problems.jpg
    640 x 480 - 71K
  • Here're 2 screenshots from my DSO
    maybe someone could have a look because i'm not the "video guru" :-)
    Blank.BMP
    Line100.BMP
  • Tharkun, I get the same picture you do when I try it on my 47" LG tv using the DAC on the DE2 and the P123. It works fine on my 7" lcd tv, I gave up on the big one. Since size matters in this case, i'm using the small scrren, it fits on my desk.
  • mindrobots wrote: »
    I'm waiting for Chip's RESI instruction - everytime I think of "resume on interrupt", my brain takes a pause and a little smile starts.....a resumable ISR has such wicked fun potential!! :)

    Thanks for putting a text mode together - this certainly has many great uses!

    No need to wait! It's just an alias. The FDS driver I wrote is already using that technique. The new alias will be nice, though (from a readability and documentation perspective).
  • I know it's an alias, I just haven't thought of a way to use it yet except with the "streamer empty" event. I thought it was a nice way to say "I'm lazy and can wait for the next release!" :)
  • SeairthSeairth Posts: 2,474
    edited 2015-11-15 14:06
    mindrobots wrote: »
    I know it's an alias, I just haven't thought of a way to use it yet except with the "streamer empty" event. I thought it was a nice way to say "I'm lazy and can wait for the next release!" :)

    Better yet, think "continuation". RESI will likely show up in every I/O driver that must maintain state across interrupt calls. Instead of storing/loading state and performing a lookup/jump every time the ISR is called, you can write the ISR in a linear fashion. It's much more concise, understandable, and faster!
  • Indeed. Without the Tasker, this really helps us to make better use of the cogs.

    Boy, that picture is strange. I'll have to feed this into my HDTV.

    You might try a monochrome one. Replace the colorburst with the sync level present there. I can modify a copy of this later, maybe late tonite.

Sign In or Register to comment.