Zeropage copy of current mode's sync polarity

Discuss AutoVIDC by Paul Vernon
Post Reply
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Zeropage copy of current mode's sync polarity

Post by steve3000 » Tue May 14, 2013 10:33 pm

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

JonAbbott
Posts: 1736
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: Zeropage copy of current mode's sync polarity

Post by JonAbbott » Wed May 15, 2013 1:32 pm

Well spotted.

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

PaulV
Posts: 95
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: Zeropage copy of current mode's sync polarity

Post by PaulV » Wed May 15, 2013 1:44 pm

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

JonAbbott
Posts: 1736
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: Zeropage copy of current mode's sync polarity

Post by JonAbbott » Wed May 15, 2013 1:55 pm

Excellent, another potential issue closed :)

Post Reply