Jump to content
IGNORED

Gyruss CAR and XEX patched.


Wilheim

Recommended Posts

Hi, all!

After a discussion in a FB Group, I noticed that the game Gyruss had 4 bugs:

1. In the CAR version, it shows different colors from the XEX version. At first I thought it was normal as if they were different version, but then I saw the machine code inside the ROM and realized that it had a bug, taking the wrong address.

2. In two player mode, both XEX and CAR versions shows the same pallete of colors from player 1. That means, for example, that if player 1 is on stage 2 and player 2 is on stage 1, player 2 will show the colors from stage 2.

3. In the XEX version, the chance stages are decreasing the number of ships each time you play the game. That is because it writes on the cartridge memory zone where it's supposed to be ROM.

4. In the XEX version, from time to time you get stucked at the end of a stage, so you have to lose a life in order to continue.

 

Well, I dug up into the machine code and I was able to patch them. Here's attached both XEX and CAR version of the game. It's supposed to be U1MB and VBXE friendly, so I will appreciate any feedback you can give me.

 

Best regards!

 

Gyruss patched v3.zip

  • Like 26
  • Thanks 8
Link to comment
Share on other sites

5 minutes ago, baktra said:

@Wilheim, would you disclose more technical details? The nature of the bugs, and how you fixed them?

Sure, no problem.

 

The bugs for the XEX version I noticed back in the 80s, when I was just only playing games. It was frustrating to me because I only had one chance to get a perfect score on the chance stages, every time I loaded the game.

 

When I bought a Gyruss cart from eBay, I noticed also that the colors where not correct and it changed from time to time almost randomly. I assumed that the cartridge version worked that way.

 

When I started using Altirra debugger, I tried to figure out why the XEX version was having that bug. I decided to trace a breakpoint to any write in the zone $8000-$bfff if there is any version. Using that, I found two LSR instructions in the memory zone mentioned. To fix this, I added a small portion of code that makes the same result without writing the ram cartridge zone and replaced the original code with two JSR to that routines. It worked!

 

Example of original code:

      LDA #$00

      LSR $9465,X

      ROR

Total bytes used: 6

 

 

Patched code (using a JSR in the middle so I don't move any byte further):

      LDA $9465,X

      AND #$01

      LSR

      ROR

Total bytes used:7. That's why I used a JSR.

 

To the players colors, I found the bug by analizing the colors routine from bug 1. I noticed that the colors were based on a fixed location ($A3), that represented the stage for player one. The location for player 2 stage was $A4. In order to fix that, I replaced the two bytes for the instruction (LDA $A3) to a PHA and PLA from previous routines and save the player stage for later use. That way, I was able to use the same number of bytes and use that for the cartridge version.

  • Like 15
Link to comment
Share on other sites

On 2/5/2020 at 5:17 PM, Wilheim said:

Example of original code:

      LDA #$00

      LSR $9465,X

      ROR

Total bytes used: 6

 

 

Patched code (using a JSR in the middle so I don't move any byte further):

      LDA $9465,X

      AND #$01

      LSR

      ROR

Total bytes used:7. That's why I used a JSR.

 

no need JSR

 

lda $9465,x
alr #$01
ror @
 

6 bytes

  • Like 2
  • Haha 1
  • Sad 1
Link to comment
Share on other sites

12 hours ago, xxl said:

 

no need JSR

 

lda $9465,x
alr #$01
ror @
 

6 bytes

Thank you for your suggestion. I prefer not to use illegal opcodes for the moment, and, fortunately, it doesn’t affect noticeably the performance. Moreover, I was able to use the $4000 address because the original cartridge game works on 16kb machines.

  • Like 4
Link to comment
Share on other sites

  • 3 months later...
On 2/5/2020 at 1:53 PM, Wilheim said:

4. In the XEX version, from time to time you get stucked at the end of a stage, so you have to lose a life in order to continue.

Thank you for that particular fix! :)

As a child in the early 90's I suffered exactly the same problem being very close to Earth, there were no enemies anymore after bonus stage, the music was looped, I had the only life and couldn't advance to next level. Damn, that was demotivating as I was so curious what happens reaching Earth. It cured me off Gyruss for quite a long time ;)

Edited by Jacques
  • Like 3
Link to comment
Share on other sites

I have a suggested addition for your patch (or at least for an alternate version). Change the colors for any "red" levels to something else. Why? Because the score text is red, and the display ends up looking way too monochrome on those levels. The Atari has a big enough palette to allow finding something else more suitable. Either that, or change the score panel text to something that doesn't conflict with any of the level colors.

[Note: Yeah, I could probably just do this myself; but since you've already got a handle on things, it'd probably be pretty simple for you to change.]

 

Edited by MrFish
Link to comment
Share on other sites

Another level that I thought was never really thought out well was the brown-colored level. The yellow that's used together with the brown is so close to the yellow used for enemy fire & other elements, that you end up with basically a two-color level. I like how the brown looks, otherwise, but either another color scheme could be done, or the shots & other elements could use a different color from any level color.

 

TBH, it makes me feel like this was, yet another, throw-together version for the Ataris from Parker Brothers (like Q-Bert, although not as bad as Q-Bert).

 

Link to comment
Share on other sites

1 hour ago, MrFish said:

What's so sacred about the original? It's not following the arcade or anything.

 

Sacred? Nothing, really.

Is something sacred about arcade? ;)

I think Atari version stands for itself, and the author had a vision how the levels should look like, so until it's named Gyruss reloaded, deluxe, 2020, etc. and more stuff is reworked, I'd find it odd to change the colour of certain level in a bugfix version, just because someone never liked it. Score panel is another story, it's not the artwork, it's an information / counter.

Edited by Jacques
Link to comment
Share on other sites

So, maybe turquoise would work for replacing the red levels, and purple would work for replacing the brown levels (or visa versa, whatever...).

 

Originals

 

323457999_red-scaled.thumb.png.d80e99b7626636c8f900d7065da3d4eb.png      1828082781_brown2-scaled.thumb.png.17711f946dd0ba01d18e9a132e0f5c66.png

 

 

Suggested Replacements

 

1377632980_turquoise-scaled.thumb.png.db59d75353f7ef2b782d23e139cf1ae4.png      1517722580_purple-scaled.thumb.png.a1556cc49af5dc7f25e80e061cd9143e.png

 

 

Alternatively, the red text could be replaced with turquoise, purple, or whatever; but that doesn't take care of the issue with the brown level.

 

805604413_red(turquoisescore)-scaled.thumb.png.99c41d938f3e80fa34c3f24f16425463.png

 

 

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

3 minutes ago, Jacques said:

I think Atari version stands for itself, and the uthor had a vision how the levels should look like, so until it's named Gyruss reloaded, deluxe, 2020, etc. and more stuff is reworked, I'd find it odd to change the colour of certain level in a bugfix version, because someone never liked it.

I said "or for an alternate version".

 

Link to comment
Share on other sites

15 minutes ago, Jacques said:

I think Atari version stands for itself, and the author had a vision how the levels should look like...

 

Yes, and I'm questioning that vision, or the lack thereof -- at least in the area of color choice on a few elements.

 

Edited by MrFish
Link to comment
Share on other sites

6 minutes ago, Jacques said:

That would be nice, if more thorough redesign could be made, like with Popeye and few other games.

What I'm talking about is quite minor, rather than a complete makeover. The graphics are done pretty well, for graphics 7 sized pixels.

 

But, since you bring up the subject, hi-res text is usually a nice improvement to add for something like this -- and adding the arcade font.

 

Edited by MrFish
  • Like 1
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...