Jump to content
IGNORED

The Space Invaders two-shots trick


Room 34

Recommended Posts

The thread about Warlords with two fireballs got me thinking... what's the deal with the "trick" in Space Invaders where you get two shots at a time if you hold down Game Reset when you turn the power on?

 

1. Is this a bug, or by design?

 

2. How is this done? And more importantly, if it can be done (by design) that you can have two shots at once, why is the "regular" version of the game limited to just one?

 

3. If it's a bug, why does it happen?

Link to comment
Share on other sites

I would guess that this is an intentional feature in the game. You'd likely have to program quite a bit to get two missiles in the first place, so having the effect happen "by accident" via a bug seems very unlikely.

 

As for how it's done, games can read the state of the VCS's switches and react to them appropriately, even the reset switch. I haven't actually looked at the code, but I'd guess that one of the first things Space Invaders does when it's turned on is check the reset switch, if it's pushed, then it loads you up with two missiles. If it's not pushed, then it's a regular game for you.

 

As for the reason why you don't get two shots by default, that's probably due to the original arcade game. The arcade games only gives you one shot, so they wanted to make the 2600 version as faithful as they could, so you only get one shot by default. I suppose they could have made it so that certain game modes gave you two shots, but Space Invaders already has so many game modes to scroll through that they probably figured doing the reset switch trick was easier.

 

--Zero

Link to comment
Share on other sites

The only code that seems to check for reset is in the area of F6C9:

 

 

LF6C9: INC    $ED     

      LDA    $ED     

      CMP    #$0F    

      BCC    LF6EE   

      LDA    SWCHB   

      LSR    A       

      LDA    #$0D    

      BCC    LF6DB   

      LDA    #$02    

LF6DB: STA    $ED     

 

I haven't figured out if this routine is used for the easter egg and for regular reset. Maybe a trace would help. :)

 

-Bry

Link to comment
Share on other sites

IIRC the test of whether there are 2 or 1 players comes just before the "missile active?" routine for both players, and just after the console switch test (so the result of the console switches gets jumbled into the second test). Once game select is pressed, the bug is cleared (since the game now correctly "knows" how many players are on the board at the same time). In hacks, you can manually set this bit...which I've done in SIdeluxe.

When frying, the game does not begin at the proper location (so this bit will be in an unknown state - usually always set to 1).

So the glitch appears because of the order that the routines execute.

Link to comment
Share on other sites

So in other words, player 1 gets to use both player 1 and player 2's missile register... what is interesting is that the horizontal positioning code is putting the "2nd" missile with the "wrong" player...

 

In a regular 2 player game, the "player 2" missile would be firing from the location of the second player graphics.. if this "glitch" weren't intentional wouldn't the horizontal positioning code keep putting the 2nd missile in the location of the (non-displayed) 2nd player each time it was fired? I am thinking the programmer would have to have made an exception for the missile to use the horPos of the Player 1... unless there is just another happy accident that causes this as well... :ponder:

Link to comment
Share on other sites

That's what I'm thinking. Why would the game allow a single player to use both missiles. I tried getting a debug version of MESS to see what the difference in memory is between a 2 shot and a 1 shot start-up, but the debug build is crashing. :( Do any of the other emulators allow you to see memory or set breakpoints?

 

-Bry

Link to comment
Share on other sites

That's what I'm thinking. Why would the game allow a single player to use both missiles. I tried getting a debug version of MESS to see what the difference in memory is between a 2 shot and a 1 shot start-up, but the debug build is crashing. :( Do any of the other emulators allow you to see memory or set breakpoints?

 

   -Bry

 

Hacking the game with HOM, you can change byte $0760 in the original game from $10 to $00 (simply erase the pixel). That will cause the (which player is shooting?) test to always register as the current player being checked...giving double-shots for every game selection.

Link to comment
Share on other sites

Ah, thanks.

 

I'm annoyed that several emulators that have debugger options do not include them (or all of them) by default (like MAME, MESS, Atari800Win+). Re-compiling MAME or MESS is a serious trial and error process. Doesn't anyone else use emulators to develop or hack??

 

-Bry

Link to comment
Share on other sites

Ah, thanks.

 

I'm annoyed that several emulators that have debugger options do not include them (or all of them) by default (like MAME, MESS, Atari800Win+). Re-compiling MAME or MESS is a serious trial and error process. Doesn't anyone else use emulators to develop or hack??

 

  -Bry

PCAE isn't as faithful an emulator as z26, but it does have a pretty sweet debugging tool that lets you step through code line by line and shows you memory contents etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...