Commodore 128 Alive!

Commodore 128 => 128 programmers => Assembly => Topic started by: MIRKOSOFT on January 18, 2011, 11:59 AM

Title: VIC - total turn off ????
Post by: MIRKOSOFT on January 18, 2011, 11:59 AM
Hi!


I want to have so more free RAM in RAM 0 as is possible.
What I need not is VIC chip. So, I want totally turn of shadow registers, all affected addresses by VIC and turn off the screen.
Turn off screen is not problem.
But I don't know which addresses are affected and could to be free, also shadow registers turning off is for me not so sure...


Can anybody help me with the minimal code/call system routine to turn off all what is written above? Also, which addresses will be free, normally occupied by VIC?


Many many thanks.


Miro
Title: Re: VIC - total turn off ????
Post by: Hydrophilic on January 18, 2011, 12:41 PM
The VIC only uses $400~$7FF normally.  That's all you save.  Turn off KERNAL shadow registers is just

LDA #$FF
STA $D8

But it will get changed anytime BASIC issues a GRAPHIC command.  Also, unless you turn it off, the BASIC IRQ will steal cycles to update SPRITEs and the SID.  You can save CPU cycles buy disabling the BASIC IRQ.

LDA #$C0
STA $A04

To summarize, $d8 controls KERNAL updates to VIC and $A04 (bit 0) controls BASIC updates to VIC (and SID).
Title: Re: VIC - total turn off ????
Post by: MIRKOSOFT on January 18, 2011, 12:47 PM
OK, thanks.


I need not BASIC, sprites, I want to make my own IRQ... I need only SID - so here's Q:
This disabling has no effect if I create sound in assembler, yes?


Thank you.


Miro

Title: Re: VIC - total turn off ????
Post by: Hydrophilic on January 18, 2011, 02:51 PM
Correct.  The BASIC IRQ controls things like MOVSPR, SOUND, and PLAY.  If you turn it off, these commands will not work in BASIC, but you can use assembly to program VIC and SID like on the C64.  Have fun!
EhPortal 1.34 © 2025, WebDev