Can the STREAMER be stopped anytime?
potatohead
Posts: 10,261
in Propeller 2
I'm wondering for video related purposes. Thinking about using the timer interrupt to set timing and insure a solid frame no matter what happens with the pixels.
Ideally, it can be stopped and a steady, until next stream value, can be quickly written to the DACS.
Ideally, it can be stopped and a steady, until next stream value, can be quickly written to the DACS.
Comments
So yes you can do the porches & sync, then fire off a single 512 pixel line, which then releases the cog to do other things while those 512 pixels stream out at the NCO defined rate. I don't see why that can't be initiated from a timer interrupt, which could also handle the vertical blanking
In the code OzPropDev just posted you'll see there's a commented out 'waitx ##3150, which is where code can go to perform other functions while the streamer is doing its thing in the background
I'm sure there will be other modes, but we can already do this much.
That leaves the entire foreground processing for mouse cursors, text overlay, sprites etc.
Once that is done, the display happens no matter what the user does with the pixels.
That's a little wasteful of memory, but could be practical for NTSC/PAL monochrome, where memory is not pushed to the limits, and Colourburst handling is not needed (or done separately).
In many cases only partial, or a few scanline of buffer would be needed.
Or a user might just scan a region of HUB memory to serve as a tile or bitmap.
A few bits of standard code and constant data, including timing, define and display an empty frame. User is left with pixel clock, depth and source decisions much like we do on P1 now.
On P1, waitvid latched these critical events, making video work fairly easy and robust. Hot did a lot more. On this one, the timer interrupt gets us to the same basic place, IMHO, and I'm itching to write code... almost there.
Hub memory is all pixels, tiles and bitmaps as needed. Can be full on buffer, which is expensive, or tiles, sprites, or procedural graphics, all of which are much leaner, or can be, depending on what people actually do.
I kind of want to get to where we've got a thing others can drop pixel code into and go from there. Maybe supply a few known, can't miss options.
Would you do the porch/sync transitions as timed interrupts as well, to allow max foreground processing? Or would you use a version of the streamer to handle these in between active video, even though its overkill