Jump to content
IGNORED

Exit function triggerd on Air-Sea Battle


Al_Nafuur

Recommended Posts

 

@-^CrossBow^- reported on the ZPH stream yesterday, that "Air Sea Battle" is affected by the unintentional triggering of the exit function in demo mode as soon as the joystick is moved to the right.

 

As far as I can see in Stella SWCHB is written at $0177 in the ROM

grafik.thumb.png.3d1cb5eec2803a2e3f611a7d0f190d6a.png

The value written to SWCHB is the ZP RAM location $97 (which had the value $00 during my tests). The cartridge can not determine if it is a read or write to SWCHB so the value $00 is interpreted as the SWCHB state. So it looks like the Reset button is pressed for the exit function.

 

I don't know why SWCHB is written here ( 3 bits can be used as storage), but I am not sure if this is really necessary for this 2K game or if it is a bug or unnecessary code

 

I have hacked a test Version where the write is redirected to the origin ZP RAM location ($0097):

/Public ROMs/Classic Roms/NTSC/BY ALPHABET/A-G/Air-Sea Battle - Fix Target Fun.bin

 

It seems to work fine..

Link to comment
Share on other sites

It is mentioned in several places that "Combat" also uses SWCHB as extra storage. Anyway I remember that I had a look at the code a while ago, and those writes to the RIOT Port B didn't seem to have any real purpose in that game either.

 

These two games were in development while the 2600 console hardware design was still in flux, and maybe that's some leftover code that was needed in an early revision of the console. Or it was used to provide some reference signal in those pins that could be probed with a scope or other diagnostic/debugging device.

  • Like 1
Link to comment
Share on other sites

I only happened to discover this because the 2600 I was working on, was sent to me specifically due to issue with player 2's trigger being constantly active. Air Sea Battle made it easy to see the issue because as soon as I pressed reset to start the game, player 2 was constantly shooting. Replaced the 4050 to correct this. But yeah, since the controllers still control the cannons in demo mode, I quickly found out that pressing right on player 1's controller in demo would cause the the Plus cart to reset back to the plus cart menu.

 

So this is a known thing then already I take it and I just wasn't aware?

 

Link to comment
Share on other sites

1 hour ago, -^CrossBow^- said:

..., I quickly found out that pressing right on player 1's controller in demo would cause the the Plus cart to reset back to the plus cart menu.

 

So this is a known thing then already I take it and I just wasn't aware?

 

The PlusCart exit function is a feature which lets the user exit a game when he presses Reset and holds the joystick to the right (or presses the first paddle button) at the same time. This works fine with most of the games, but a few of the games cannot be exited, because they are not reading SWCHA and SWCHB during all game states. Some of the games are writing to SWCHA/SWCHB and thus might accidentally trigger the exit function.

 

With "Combat" and "Air Sea Battle" this is not a big issue, because the user is still able to play the game if he just don't moves the joystick to the right in demo mode. But very few games arn't playable with the PlusCart, because the exit function is being triggered during the game or when starting the game.

 

Link to comment
Share on other sites

20 minutes ago, Thomas Jentzsch said:

How about the option to disable the exit function?

I'd like to have that option, too. Perhaps a specific data string that could be scanned for upon ROM load that, if present, would disable the exit code? The downside though would be the extra bytes needed with some ROMs that may be completely full.

Link to comment
Share on other sites

41 minutes ago, Thomas Jentzsch said:

How about the option to disable the exit function?

 

17 minutes ago, Karl G said:

I'd like to have that option, too.

there have been several options discussed in this thread:

 

But I think the easiest solution is a switch in the "Setup" menu to disable the exit function (temporary or permanent).

 

 

17 minutes ago, Karl G said:

Perhaps a specific data string that could be scanned for upon ROM load that, if present, would disable the exit code? The downside though would be the extra bytes needed with some ROMs that may be completely full.

?

If we modify the ROMs we might as well make them compatible with the exit function.

 

Link to comment
Share on other sites

BTW, I had a quick look at the disassemblies of "Combat", "Air Sea Battle" and "Start Ship" and it doesn't seem to me that the bit stored into SWCHB is ever read back. The PAL versions of "Combat" and "Air Sea Battle" don't have that code at all. ("Star Ship" is NTSC only).

 

EDIT:

It looks like in all three games bit 4 of SWCHB is just set to "1" during gameplay and to "0" in attract mode, but the same info is also stored in a ram location which is what the code actually checks.

Edited by alex_79
  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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