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: Thu, 11 Mar 2004 11:27:56 -0500
>?? Ugh, does anyone else think so?
>Or have any idea where to look?
>Is it only the supercharger RAM that's letting me do that, or what?

I don't think so. I thought for a bit that you might be accidentally writing to the Supercharger's RAM but I don't think that's the case.

Generally when something runs differently on the Supercharger than on z26 it's an initilisation problem or you're LDAing from somewhere that should be undefined that the Supercharger is giving different values than z26 (ie TIA registers)

There's always the possibility you've discovered a Kool-Aid Man type unemulated "feature" but I really don't think that's the case.

This does not look like a kernal timing issue. It looks like you still have a constant and correct # of scanlines.

It looks like you're having problems with a or some CMP(s):

- The ball quickly disappears off into the right edge of the screen and does not come back.
- The player sprites are repeated over and over
- Pterry's offset value seems incorrect (Pterry gets strated drawing from the wrong place in the sprite data)
- There's also a problem with the score offset

So the question is, are these all one bug or are there several bugs (ie: The score should have nothing to do with the main kernal except they both use RAM - Could some of your RAM be being corrupted? (ie: My initial thought with the stack))

Could your loop counter be getting munged? Though you're still getting the correct number of scanlines - Do you have a "main" loop counter that seeds a secondary loop counter that's get used for calcs and compares? There may be a problem there.


I think this was always a problem, however it didn't become noticeable until your code started to get bigger - After Pterry handling code you have an ALIGN to zero out the page until PterryExactPositioning. So that would have been all Zeros 





BTW the problem that Andrew pointed out with the score pointer initialisation IS a problem. The reason why it still works when it shouldn't is that in your score display loop you loop from SCORE_KERNAL_LENGTH to 1 instead of from SCORE_KERNAL_LENGTH-1 to 0. This isn't the big error (which may be something similar) but this could have led to page boundaries problems since when either player's score is 0 the index to the table will cross a page boundary. But since it's a score you're not trying to shove a lot into those scanlines so it's not a problem.

To fix this,

Change:

        adc #<Score0Graphic-1 ;add in the low byte of the graphic location

To:

        adc #<Score0Graphic ;add in the low byte of the graphic location

(In both places)

Change:

        ldx #SCORE_KERNAL_LENGTH

To:

        ldx #SCORE_KERNAL_LENGTH-1

And at the end of that loop, change:

        bne ScoreDisplayLoop    

To:

        bpl ScoreDisplayLoop    


Chris...

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread