Shadow registers of VIC

Started by MIRKOSOFT, January 24, 2010, 01:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!

I want to ask how to disable shadow registers of VIC?

I want to use real registers at $D000...

I think it's st. about IRQ, but don't know how.

Thanks for every help.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

SmallCleverDinosaur

Have a look in "Mapping the C128", page 69, address 216/$D8. In order to be able to access the VIC's register directly you have to disable BASIC's screen editor IRQ routine and you do that by storing the value 255/$FF in this register.

From "Mapping the C128":

You can turn off the screen-setup portion of the screen editor IRQ routine by storing the value 255/$FF here. This gives you direct control over the VIC chip register settings, but disables BASIC'S ability to change display modes.
Ignorance is a precious thing. Once lost, it can never be regained.

Hydrophilic

SmallCleverDinosaur got part of the answer.  However you can't always take CBM at face value.  While it is true BASIC's GRAPHIC command won't work after putting 255 into 216($d8), this is indirect.

$d8 controls the KERNAL/Editor portion of VIC-II IRQ.  When you store 255 here, KERNAL/Editor will no longer update screen mode registers of VIC.  This means BASIC's GRAPHIC command will not work.

However, this do not stop BASIC portion of VIC-II IRQ!  You do this by clearing bit 1 of $A04.  For example, POKE 2564, PEEK(2564) AND 254.  Unless you do this, BASIC will continue to update SPRITE positions of VIC-II registers and also respond to COLLISIONs (both sprite and light-pen).  Unfortunately, when you do this, BASIC updates to SID also stop working, so SOUND and PLAY will not work either.
I'm kupo for kupo nuts!