Re: [stella] a $16 question...

Subject: Re: [stella] a $16 question...
From: Greg Troutman <mor@xxxxxxx>
Date: Fri, 30 Jan 1998 18:34:03 -0800
Chris Wilkson - MCD wrote:
> 
> > > The info I have doesn't say anything about initialization.  Is this handled
> > > by software?  Ie. are the last few bytes of each 4K page identical...same
> > > RESET/SWI vectors, etc?  (This is what I think)  Or does the cartridge always
> > > powerup to the same 4K page?
> >
> > Random startup is not a big problem.  Besides the reset/swi vectors you
> > need to duplicate a bank-switch to get the game started:
> >
> >       org $x000
> >       sta $FFF9       ;switch to main startup bank, in this case $F000
> >
> > bankXcode:            ;in $F000, this is the actual game startup routine
> >       ...
> >
> >       org $xFFC       ;reset/swi vectors in case we start in this bank
> >       dc.w #$x000
> >       dc.w #$x000
> >
> > I think that's how it was actually done in Atari carts, but even if not
> > it should always work anyway through the magic of software ;)
> 
> This is what I thought.  Although it's just as easy to designate a startup pa
> page and force it during the powerup sequence.  With no extra parts required.
> But doing this only saves 12 bytes.  Not a huge gain with 16K on hand. :)

Or what if the cart startup is random (I think so) and an emulator
author decided to be truly accurate.  Then we'd write code that saved
the 12 bytes but couldn't easily be tested without defining a new spec
for the emulator guys to add ;)  From testing my games, though, I think
Stella always starts in the last bank of an image.  Not randomly.

--
mor@xxxxxxx
http://www.crl.com/~mor/

--
Stella list is Administered by krishna@xxxxxxxxxxxx <Glenn Saunders>
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/stella.html
+-shameless plugs-------------------------------------------------------+
| Stella documentary at http://www.primenet.com/~krishna                |
| Nick's VCS links via http://www.primenet.com/~nickb/atariprg.htm      |
| Write the best game, win framed autographs of famous Atari alumni!!   |
+-----------------------------------------------------------------------+

Current Thread