Re: [stella] nop and wrap around

Subject: Re: [stella] nop and wrap around
From: danboris@xxxxxxxxxxxxxxxx (Dan Boris)
Date: Wed, 13 Jan 1999 07:58:32 -0500
> From owner-stella@xxxxxxxxxxx Tue Jan 12 18:39:09 1999
> X-Authentication-Warning: desmet owned process doing -bs
> To: stella@xxxxxxxxxxx
> Subject: [stella] nop and wrap around
> URL:
> Hexcode: 4B-69-73-73-5F-4D-65-5F-49-60-6D-5F-41-5F-47-65-65-6B
> MIME-Version: 1.0
> Sender: owner-stella@xxxxxxxxxxx
> Reply-To: stella@xxxxxxxxxxx
> X-Lines: 40
> Now that I've finished my last project, I've been thinking about my newest
> plans, and was wondering somethings.(The last one was that RAM-cart that
> was programable with a dos copy command.  Finally got it all working)  My
> newest will be a small embedded system connected to the atari.  It will
> have an LCD screen that allows the user to select a game from it's large
> ROM(and simultaniously display instructions while playing), load one from
> a pc via serial, load one from actual cart(and send to pc), setup
> bankswitching, and any other number of things that I can dream up along
> the way.
> But anyway, what I was trying to figure out.
> My original thoughts to run it would be that my system would be able to
> switch on and off the power to the VCS so that once a game was choosen, it
> would power cycle the VCS to play the new game.  But while working I came
> across an idea.  What if my system just swaped the rom while that last
> game was running?  What I was thinking is swapping it to a rom that is all
> nop's, and allowing the VCS to run those nops until it got to a certain
> address(startup vector?) which would cause some of my hardware to switch
> to the new game.  Or perhaps to a dummy program which would just display
> some text, or maybe a screen saver of some sort until the user selects the
> next game.  It's kinda like a bankswitch without having a software call to
> do it.
> Will this work?  Is there a common startup address(as in, is there a
> location in memory where the 6507 fetches the very first instruction upon
> startup?)? What is it?  Will the program counter in the 6507 wrap around
> from the max to the minimum address?

I am pretty sure that the program counter will wrap around when it hits the end of memory. The problem you might have with this scheme is that unless you bankswitch is synconized to the processor you risk causing the switch in the middle of a memory fetch cycle which would probably screw things up. The other problem is you are switching you temporary program out of memory and switching in the cart how do you read and jump to the reset vector for the new cart?

> Anybody have any ideas of how else to be able to get from a game running
> to another one when you have no control over how either program was
> written or where in it's execution it is?

The easiest way of doing this if you don't mind doing a slight modification to your 2600, is to simply attach a wire to the reset pin of the 6507 and pull it low with a transistor when you are ready to do a load. This will hold the processor in reset while you load the next game, then you can release the reset and the game will start properly. 

Dan Boris

Archives (includes files) at
Unsub & more at

Current Thread