Page 1 of 1

Zeropage copy of current mode's sync polarity

Posted: Tue May 14, 2013 10:33 pm
by steve3000
Just to document this somewhere useful I'll post this here.

In my efforts to fix the wrap-around bug seen by the folks on stardot, I've made an interesting discovery. By complete accident I've discovered a zeropage location which appears to store the *current* Sync polarity setting! If I'm right, this could be really useful for AutoVIDC (and you'll be able to do away with my sync-polarity 'guess' routine).

The current mode's sync polarity is actually stored in unused bits 11&12 of the VIDC control register copy at &1584

Or if you read the just the byte itself (probably best?), it's the byte at &1585, bits 3&4... Mask: %00011000

At least I'm 99% confident that's what it is...

Steve

Re: Zeropage copy of current mode's sync polarity

Posted: Wed May 15, 2013 1:32 pm
by JonAbbott
Well spotted.

Would this need to be set by AutoVIDC when it's controlling 3rd parties?

Re: Zeropage copy of current mode's sync polarity

Posted: Wed May 15, 2013 1:44 pm
by PaulV
I've implemented a feature to grab the Sync. Polarity from ZP using this info just now and it does appear to be correct :D

In the next release of AutoVIDC simply passing -1 as the MODE into the AutoVIDC_ModeSyncPolarity SWI will retrieve the current value as stored by ZP.
JonAbbott wrote:Would this need to be set by AutoVIDC when it's controlling 3rd parties?
Jon, I don't think so. This is set in the MODE definitions itself and I believe RO3 moves a copy of the current control register into this ZP location.

With the WE Super VIDC Enhancer, all I do is derive the correct polarity for the MODE in question and send it to the WE board to then set the polarity in hardware. The correct Sync. Polarity information should already be present in the ZP location courtesy of RO itself :D

EDIT: My tests just now seem to confirm this.

Paul

Re: Zeropage copy of current mode's sync polarity

Posted: Wed May 15, 2013 1:55 pm
by JonAbbott
Excellent, another potential issue closed :)