Shop OBEX P1 Docs P2 Docs Learn Events
P2Prep, and other Prop2 Display Drivers ( title change from Prop2 test card image ) - Page 2 — Parallax Forums

P2Prep, and other Prop2 Display Drivers ( title change from Prop2 test card image )

2

Comments

  • BaggersBaggers Posts: 3,019
    edited 2013-04-07 09:37
    Nothing to do with the render engine, but I had to have a little go at something yesterday, as I was wondering if it could be done.

    As it happens, doing it this way is only fast enough to do 73 pixels per scanline, but it is on one cog, whilst doing the TV driver also, and not using PIX.

    edit: so I scaled the screen to 64pixels wide, although on real Prop2 I will take it to 256.

    On real Prop this will have a fighting chance :D

    It also fits in DE0. :)

    test.zip
  • pedwardpedward Posts: 1,642
    edited 2013-04-07 11:03
    What is it supposed to do? I loaded it in to my DE0 and it doesn't seem to do anything.
  • ColeyColey Posts: 1,110
    edited 2013-04-07 11:22
    Nice work Jim, very impressive.

    Worked fine on my DE0.

    @pedward

    It's composite out on Dac0 of a rotating zooming map.

    Regards,

    Coley
  • BaggersBaggers Posts: 3,019
    edited 2013-04-07 11:23
    pedward, Do you have the add on board? and Composite on DAC0? it's a Snes Mode7 renderer.
  • pedwardpedward Posts: 1,642
    edited 2013-04-07 14:54
    I have it connected to VGA at the moment, your message didn't say anything about NTSC, so I was confused.
  • pedwardpedward Posts: 1,642
    edited 2013-04-07 15:00
    I see it now, my main display has a PIP mode and can display NTSC in a window, very good! BTW, p2load works under Wine too.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-07 15:58
    @pedward, Glad it works for you ;D



    @all, I have had a brain wave, at how awesome this chip is, and come up with a nice surprise for DE0 owners.
    A threaded composite TV driver, which heavily frees up the task, as the tv COG is running at 1/16th of the TASKS most of the time, freeing up oodles or prop goodness for you guys to play with.

    It's a 128x96 8bit (RGB:332) bitmap thus also leaving lots of RAM left, even on the DE0s

    So with only $3000 for the bitmap, and pretty much three threads available, with 15 out of 16 thread slots to play with, you have the option to code many things whilst also having a display to use. :)

    Edit: Updated and moved to first post.

    Let me know if you think it's useful?
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-07 17:41
    Sure will be as soon as I get time to try out the video - still have debugger and spin to do first;)
  • AribaAriba Posts: 2,690
    edited 2013-04-07 17:42
    I have done this too, and I have made the same "mistake" as you ;-)

    You really need to use POLVID before every WAITVID to give other tasks a chance to do their things. With a testcode like yours you don't notice that, but if do real code in other tasks (like a serial receive) you get strange results. The other tasks stall for the whole waitvid time. So instead of just a waitvid you need this:
    polvid  wc
      if_nc  jmp #$-1
             waitvid d,s
    
    The code looks not nice anymore with this, but it helps a lot. You can also call a subroutine which does the POLVID before every WAITVID that saves some instructions, and looks nicer, but is not as efficient.

    Andy
  • BaggersBaggers Posts: 3,019
    edited 2013-04-08 00:19
    Oh yeah, forgot about that, I remember reading about them too, and forgot to add them once the driver was done haha doh! thanks Andy :)

    @cluso99, yeah, don't try yet, get debugger and spin sorted first :P


    Edit: updated and put in first post! Thanks again to Andy :D
  • BaggersBaggers Posts: 3,019
    edited 2013-04-08 07:25
    Added JB_Sprites_DE0, which is a composite TV driver using one cog, for 128x96 8bit RGB:332 bitmap including 8 x 8x16 sprites ( note if you have too many on a line, it will wobble a little ) but you can do great things with the sprites as you will see in the demo.

    the sprites are 8bytes of image data and 8 bytes of mask data 16 times for each y line of the sprite ( you will see in the BMP file for the sprites. because it's done this way, you can do some nice things, like ghosting type sprites, again you will see in the demo.

    if you alter the BMP image, the sprite will be re-grabbed from the BMP when you use SEND.BAT
    also the source file is too big for PNut, so you will have to make your changes, then use SEND.BAT
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-08 07:45
    Hi Baggers.

    Nice Work!!!
  • BaggersBaggers Posts: 3,019
    edited 2013-04-08 08:34
    Thanks Sapieha :) I'm quite happy with how it turned out, especially for one cog :D and the fact it's mainly just on one thread too! and you can still do a lot with the other threads, although you can't use the INDA or INDB instructions, at least you have PTRB to play with though. :)

    It should help the DE0 users have some fun with graphics now also, and have cpu power left over to do something with it too.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-09 15:23
    Woohoo, I have a 512x192 16bit bitmap on composite :)

    Will tidy up how to get image to SDRAM, so it's simple, then upload source tomorrow :) I'm going to bed now, it's late!

    Thanks Chip!
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-04-09 15:31
    Well done!

    Looking forward to it. I'm working on another project, so I won't have much time for SDRAM for a week or so.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-10 02:06
    Added source for SDRAM display driver to first post, including a pic, for people who don't have DE2.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-10 02:16
    Hi Baggers.

    Functions nice on my DE2 and LCD TV
    > Only some picture flicking but very little
    Baggers wrote: »
    Added source for SDRAM display driver to first post, including a pic, for people who don't have DE2.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-10 02:26
    Thanks Sapieha :) I'll look into it, see if I can stop the flickering. ( by the way, is it left, edge, middle of screen or right edge? )
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-10 02:30
    Hi Baggers.

    Not that.

    It is some brighter horizontal lines (In background) that go from TOP to bottom of LCD picture --- Picture are sharp
    Baggers wrote: »
    Thanks Sapieha :) I'll look into it, see if I can stop the flickering. ( by the way, is it left, edge, middle of screen or right edge? )
  • BaggersBaggers Posts: 3,019
    edited 2013-04-10 02:33
    Can you get a pic or small video clip of it?
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-10 02:51
    Hi Baggers.

    I made simple mov --- but on it I don't see this.


    Baggers wrote: »
    Can you get a pic or small video clip of it?
  • BaggersBaggers Posts: 3,019
    edited 2013-04-10 03:48
    Ok, thanks for trying :)
  • ColeyColey Posts: 1,110
    edited 2013-04-10 03:48
    Nice work Jim, can't wait to see this on my newly ordered DE2 ;-)

    I think once P2 finally ships and we have real silicon it (DE2) will be useful on that other project we are doing ;-)

    Regards,

    Coley
  • BaggersBaggers Posts: 3,019
    edited 2013-04-10 05:09
    Cheers Coley, glad to see you've given into the pressure and ordered a DE2 :-)
  • BaggersBaggers Posts: 3,019
    edited 2013-04-13 13:38
    Added a Load binary to SDRAM :) see first post for example of how to get your data there.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-13 14:32
    Here are a couple of nice captures, and a photo of the actual video signal seen on a CRT TV.

    Edit: The monochrome one is a luma only capture to show detail. Notice the color artifacts on the capture card version that aren't there in the CRT photograph? The P2 signal quality is now excellent compare to the very best we could get with P1 and the coarse DAC used for video. The smoother video signal really makes the most of the old TV standards. On P1, it was the opposite. Capture card performed better with the sharper signals and ordinary TV's worse. This suggests to me that standard definition LCD TV's might not display this to full potential, the result looking a lot like the capture device.

    Can anyone take a photo on a standard definition LCD? I don't have one.
    720 x 540 - 209K
    720 x 540 - 352K
    1024 x 577 - 155K
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 15:55
    Updated first post with yet another one today :D

    VGA 1024x768 SDRAM driver :)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-18 18:33
    Got a pile of toys to play with this weekend!
  • ColeyColey Posts: 1,110
    edited 2013-04-19 11:41
    Baggers wrote: »

    P2 1024x768 16colour bitmap SDRAM driver
    HiResBitmaps.zip

    Surely you mean 16 bit Colour !!!! :lol:

    Looks great Jim, as always sterling work.

    Regards,

    Coley

    2013-04-19 19.43.50.jpg
    1024 x 768 - 120K
  • BaggersBaggers Posts: 3,019
    edited 2013-04-19 11:48
    Hahaha yeah, I meant 16bit colour! selling myself short there! :)

    Coley, thanks for posting a pic too!
Sign In or Register to comment.