HTDV Component 1920x1080p Display :)
Baggers
Posts: 3,019
Here it is, the first 1080p bitmap display driver!
Yes, I know it's got dot crawl, which I'm assuming is to do with the slower clock speed of the emulator, or maybe Chip could shed some light on what's happening.
I used his Simple 1920x1080p Driver as a base, and modified it to feed it data from a bitmap.
HDTV_1920x1080p.zip
Edit: use the runme.bat to run it ( from PC ) assuming you have P2Prep, and P2Load in your path, if not, they are in my Wireworld demo. don't forget to edit the runme.bat to set your com port for p2prep.
Enjoy.
Baggers!
Yes, I know it's got dot crawl, which I'm assuming is to do with the slower clock speed of the emulator, or maybe Chip could shed some light on what's happening.
I used his Simple 1920x1080p Driver as a base, and modified it to feed it data from a bitmap.
HDTV_1920x1080p.zip
Edit: use the runme.bat to run it ( from PC ) assuming you have P2Prep, and P2Load in your path, if not, they are in my Wireworld demo. don't forget to edit the runme.bat to set your com port for p2prep.
Enjoy.
Baggers!
zip
538K
Comments
the SDRAM data should stay valid during the restart of the new program
I'm gonna start a C related thread...
(I was off-line May.8-24 due to wifey enforced vacation, so I only found it now)
So 1920x1080x30 == 60M pixels a second ... how is this done? This is on the FPGA dev boards? I was under the impression that the P2 is emulated at 60MHz on those systems, is the PLL on the P2 really capable of doing 1080p?
If I spring for a DE0 will I be able to play with this while we wait for the P2 to be refabbed?
Oh, and yes, we are only running at 60MHz while the P2 is expected to conservatively run at 160MHz.
On this one, Baggers is displaying a picture stored in the external SDRAM. The SDRAM is driven by one COG, the video display driver by another COG.
If you want to output some color bars, or something really basic, I think you can do that with just one COG. There is time during the video signal to do that.
It is only drawing a 4bit image, ie choice of 16 colours per pixel, as it's hard pushed to get data through fast enough at 60Mhz.
And it's one cog drawing the display, and one cog driving the SDRAM.
I have a DE0 board and have noticed some strange timing glitches while running my own software.
I haven't been able to quantify exactly what's going on but like you have put it down to the emulator.
One experiment was generating composite video without using the internal video function.
In between the sync pulses I am running a custom byte code interpreter and each snippet falls well short of the sync pulse window ,and yet I get intermittent glitches typical of timing overruns?
Even with the glitches I am doing a lot of stuff with 1Cog & 32K !
Cheers
Could it be because of multi-threaded hub delay slots being missed?
Nice space invaders display.
By the way, just out of curiosity, why did you generate a composite video, without the internal video functionality?
In my Prop2 Invaders I am not using the multi tasking mechanism, its all in 1 thread.
There are 2 reasons why I didn't use the internal video function.
1. Is my lack of knowledge of its modes and operation (No documentation)
2. I understand (possibly wrongly) that using the WAITVID instructions to generate the sync stuff would not allow me to do my stuff in between.
POLVID looks like what I need but without more info on the VID stuff I can't use it.
I am controlling the DAC's manually for video and sound!
It's a bit tricky but no major headaches yet!
It has been a great way of learning all the new Prop2 instructions anyway.
When I've got it up and running properly I'll post the source on the forum.
Cheers
Have you read those files yet?
Truth is, you can do a LOT while the video generator is writing out a scan line. Generally, it is possible to buffer up an entire scan line, leaving the CPU free to do other things while waitvid is writing it to the screen.
The video commands are double buffered, meaning you can set one up the moment you can, and it's buffered while the prior one is drawing. Break whatever you want done in to chunks, and issue the required waitvids as you need to. So long as they don't exceed the time of the last one, you are good to go.
Generally speaking, a scan line consists of a few waitvids, or maybe just one to do sync and a porch (border), then one for the scanline. The current emulation is so fast, you can often fill your scan line buffer before the beam even leaves the porch! That is true for a simple bitmap, meaning there is time to draw on the fly for simple things. If you need more time, you can double buffer the scan lines and be drawing into one, while the prior one is being rendered to the screen too.
I have been dissecting the NTSC driver demo this afternoon and I think I am starting to get a handle on it now.
I was a bit confused with WAITVID and thought it was like WAITCNT and froze while processing.
Its making sense now.
Now I can get some sleep....
Cheers
I wouldn't use it for a game, for example, except maybe the main menu page.