Re: [stella] behold, i am become shiva, destroyer of kernals!

Subject: Re: [stella] behold, i am become shiva, destroyer of kernals!
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Fri, 12 Mar 2004 11:13:37 -0500
>Replacing a stack PUSH with a PULL fixes the problem?!

Yup, I said it was freaky.

The more I think of it, the more I think Kirk's discovered some weird Supercharger "feature".

- The problem does not appear with the Cuttle Cart 2.
- The problem does not appear with the emus.

If it's a Supercharger incident, then the most obvious problems would be:

- Accidental banswitching
- Accidentally writing to $F000 to $F0FF (Supercharger RAM)

We can eliminate accidental bankswitching since that would be expected to result in a really catastrophic error (crash).

I don't think he's accidentally writing to Supercharger RAM, at least not in a conventional way - Far as I can tell, he's not acessing $FFF8/9 (though he may be doing so accidentally) to enable writing. And that problem sequence that I isolated shouldn't be triggering a RAM write anyway.

The only "weird" thing it's doing is reading an "unreadable" TIA register. Which shouldn't be all that weird.

Just looking over that sequence again:

        pla ;Originally PLP                          ; 4 
        CPX slowBallYCoordFromBot+1           ; 3
        PHP                          ; 3 

CPX doesn't affect I D or V flags. So these will carry over into the next operations. Could that be messing things up for future compares? I don't think so since he's treating the flags properly (SEC).

Hey, wait a minute - Could setting the Interrupt flag on a Supercharger have some effect? That PLA could result in the I flag being set. Which of course normally has no effect. But maybe the Supercharger is special!

What if setting the Interrupt flag causes the Supercharger to check the addresses where interrupt vectors would be - Namely the top of ROM (But would that go as low as $FFF8/9?). This could be an unexpected side effect, or it could have been intended as a way to quickly access $FFF8/9 (?).

So hitting the Interrupt flag is causing the Supercharger to touch $FFF8/9 which is enabling writes to RAM. These writes could be happening any time later in the program. Which could definately result in all kinds of weirdness.

That is a pretty conveluted  theory, but it almost sounds plausible.

Any Supercharger experts in the house? If I have time, I'll run some experiments this week-end.



Archives (includes files) at
Unsub & more at

Current Thread