Okay, so I've been poring over the P1 manual, datasheet and counter addendum, in addition to reading and annotating 2 assembly language VGA drivers, and this is what I've found out.
1. The video generator (in VGA mode) is basically just a CTRA-driven thing that takes exactly what you give in a waitvid and writes it to outa (with the number of clocks needed to change
data set by vscl). This means that the generator can write potentially anything at any rate supported by the PLLA (it has to operate in a PLL mode).
2. Selecting the correct pixel clock and timing the sync lines falls to me, the programmer.
3. The counters are set by selecting the correct mode, FRQx and (optionally) PHSx. To operate as a normal oscillator (like a 555 or something), it must be set to either the PLL or the NCO
modes. To get the formula for the NCO mode, dig through the application note on the counters (for reference, the equation is: frequency in hertz = system frequency in hertz * FRQx /
Now, I know all that is old news to most of you (like, the absolute basics.), but as a newcomer to the Propeller, I had to spend time finding this info, and I just want it here for posterity for the next poor sod googling this.
After reading some documentation on VGA (timing tables) and the assembly drivers (the bitmap one included with the prop tool, which uses the video hardware, and a barebones one doing everything manually), I'm left with a few questions.
1. Are there predefined "modes" for VGA, or can I just pump pixels at my chosen resolution?
2. How do I pick a good pixel clock?
3. How do I know how much back/front porch and hblank and vblank to have? Do I need to translate the timings to cycles of the CTRA clock?
4. Which timings are important to get tight, and which can be more loose?
5. How do I set VSCL properly when doing h/vblank and porches? Looking through Chip's code, he does some fancy things with the VSCL register, and I'm very confused.
My goal is to be able to kind of make a driver for each of my projects' needs and resources. I know the premade ones are way better, but I still want to have the option in case I need to squeeze things. I'd appreciate any help on these topics, I've kind of hit a dead end on my understanding, and any pointers would be very welcome.