Double buffering?

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2723
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Double buffering?

Post by tofro »

Peter wrote: Sun May 12, 2024 8:03 am
tofro wrote: Sun May 12, 2024 7:55 am Even if Peter says there isn't, here is a working example of how you can make the second screen usable in QDOS machine code programs.
I didn't say there isn't. Just that I can not remember - which is a difference over 50 ;)

I wonder how much room your procedure would leave for the actual code and data on an unexpanded QL...
Well, not a lot :) But that never was a target for the Magnetic Adventures - They wouldn't run on an unexpanded machine anyhow. The code is also relatively generous using unrolled loops for the copying for speed (after all, every single picture that is displayed in the adventures means saving and restoring the buffers)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
spkr
Brittle Membrane
Posts: 103
Joined: Tue May 04, 2021 6:52 pm

Re: Double buffering?

Post by spkr »

Hi chains,

Nice to see you working the QL ;). As far as my research goes, the vectors to deal with interrupts are pointing to addresses in ROM, which has a generic interrupt handler. This in turn also has hardcoded addresses, to for example the pointer location of the vblank interrupt handing. For JS this lies in the $28000 range, and for the Minerva ROM I believe it lies in the $38000 range. As such, since its hardcoded; you can either disable all interrupts and use the memory, and live without programmable interrupts (well, programmable vblank anyway); or isolate the memory needed for the interrupt (well vblank ;)), and work around the limitation.

In the case of Minerva the memory location does not collide with the 2nd screen buffer.

I chose to use the vblank interrupt as my demosystem handler, so I worked around the memory limitation thing.

Hope this helps. I'm cool to share the approach, similarly both Minerva and JsRom can this way be supported I believe by 'just' writing the interrupt handler vector to both jsrom and Minerva locations .

Long story summarized, you can trash the whole os and just use only the vblank vector pointer, and have your 2nd screen buffer (bar a few pixels ;)).

Kind regards
Wietze


Post Reply