News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Micro Machines SNES bugs fix  (Read 664 times)

Vag

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • GreekRoms
Micro Machines SNES bugs fix
« on: September 19, 2020, 09:59:14 am »
Hello everyone,
I'm translating Micro Machines for the SNES to Greek. I've done almost everything (I'd say more than 98%) and the result is nearly perfect. But I have discovered some bugs in the original game that also affect the translation and I'm thinking of creating a patch first, with all the bug fixes for the original game. Two of the bugs are minor and just need a tile editor, I can fix them easily. There is a bad bug that it shows garbage characters on screen, plus it moves the text by one character to the left. This needs asm knowledge. There is a fourth bug that also needs asm knowledge, but it doesn't really affect the original game - it happens, but you don't see it on screen (I'll explain below). Unfortunately, it affects the greek translation and I can't just ignore it.
The four bugs are:

1. On the splash screen, the first screen you see, there are two white lines below the logo. They were intended to be part of the logo. If you see the logo in a tile editor, you'll see that it has black shadow, but as the background is also black, you just don't see it. The two white lines are part of the shadow of the logo, but their tiles have a different palette and the black shadow appears white. It's unbelievable how they didn't fix that, it's the first thing you see when you start the game!

2. The shampoo bottle in the bathtub stages has some pixels that are transparent instead of yellow. As they are about 5-6 pixels only, most players don't notice it. But once you know it, it's very annoying (sorry I told you).

3. In Micro Machines, up to 4 players can play at the same time. If you only have one gamepad, two players can share it. If you have two gamepads, two players can have their own gamepad, or three or four players can share the gamepads. To see the bug, you have to have at least two gamepads and play with two players (Snes9X is set to have many gamepads by default).
To see the bug, you have to do this:
Have at least two gamepads connected.
Select TWO PLAYERS.
There are three players, ANNE, MIKE and WALTER, that if you select them, you will be asked this: "HANDICAP ANNE? NO"
After you select yes or no, you see some garbage tiles (graphics and/or letters) and the text that was on that line (the names of the chosen players) move one character to the left. If both players are from them three, the text moves to the left for a second time.
I have partially fixed this bug, without asm. What I managed to do, is to hide all the garbage tiles. To hide text that is already on screen, the game puts strings with spaces on top of the previous text. So I added strings with spaces everywhere that garbage could appear. This works, but the text still moves to the left.

4. When you select TWO PLAYERS, you see a screen where at first says PLAYER ONE, and after you select the first player, it says PLAYER TWO (at a different position). The string that says PLAYER ONE includes spaces that hide PLAYER TWO and the string that says PLAYER TWO includes spaces that hide PLAYER ONE. There is also a string with spaces that hides both. In the same way, there are strings for three players game and for four players game. As each screen is different, the strings are different as well. So, when you have selected TWO PLAYERS, there is one string with spaces that clears PLAYER ONE and PLAYER TWO. When you have selected THREE PLAYERS, there is another string with spaces that clears PLAYER ONE, PLAYER TWO and PLAYER THREE.
The bug is that when you have selected TWO PLAYERS, the string with spaces for three players shows as well.
In the original game, you don't see a difference, as a string with spaces appears on top of empty space. But it does, so it's a bug.
In the greek translation, the word PLAYER is replaced by a word with one more letter. The word PLAYER is just replaced by the player's name, when you select them (the players' names are all 6 characters long, ANNE has two spaces). To hide that 7th letter, I added one string with one space. It works as it's supposed to in three players game, but that space also shows in two players game and unfortunately it hides one letter of the name of the selected player. In four players game, the bug is not there.

Micro Machines for the SNES uses compression and there's a program you can use. Compression doesn't have to do with bugs 3 and 4, though. Is anyone interested? If yes, I could make a simple patch to make the fourth bug visible.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Micro Machines SNES bugs fix
« Reply #1 on: September 19, 2020, 11:28:12 pm »
I tried to reproduce bug #3 but I couldn't replicate the bug.
Do you have a picture of bug #3 and #4? Do you know if these bugs
occur in real hardware or bsnes?

Vag

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • GreekRoms
Re: Micro Machines SNES bugs fix
« Reply #2 on: September 20, 2020, 05:08:47 am »
Hello slidelljohn,
thanks for the reply. And OMG! It happens only on Snes9x! I was using ZSNES and Snes9x. I just tried BSNES and NO$SNS and I can't reproduce it. I really thought it had to do with the gamepads, as you see an extra screen if players have to share a gamepad. I disabled the second gamepad on Snes9x and the glitch remains.
Here are some screenshots anyway:





As for bug #4, here are some screenshots from the greek translation:
When you select THREE PLAYERS you see this:





There are strings with one space each that cover the 7th letter (the first 6 letters are covered by the player's name).

When you select TWO PLAYERS you see this:




Notice that the empty space is where the 7th letter was (for player one and player two).
This is not emulator specific :-}

The strings that contain spaces are:
The one for 3 players is at DBC5, its pointer is at D285 and is like this:
FE 05 0E 20 20 20 20 20 FE 0D 0E 20 20 20 20 20 FE 15 0E 20 20 20 20 20 FF
As I have added spaces for the 7th letters, it became:
FE 05 0E 20 20 20 20 20 20 FE 0D 0E 20 20 20 20 20 20 FE 15 0E 20 20 20 20 20 20 FE 0B 0D 20 FE 13 0D 20 FE 1B 0D 20 FF
Each string has three control characters at the beginning (FE 05 0E at the beginning of the first one). E.g. 05 0E positions the text. If you have FE (or FD in some other cases) before the FF byte, you really have another string, which can be at another position. So the modified string is really these six strings:
FE 05 0E 20 20 20 20 20 20
FE 0D 0E 20 20 20 20 20 20
FE 15 0E 20 20 20 20 20 20
FE 0B 0D 20
FE 13 0D 20
FE 1B 0D 20 FF

The equivalent string with spaces for two players doesn't show on three players.
The equivalent string with spaces for four players doesn't show on two players or three players.
It's the string with spaces for three players that shows on two players.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Micro Machines SNES bugs fix
« Reply #3 on: September 20, 2020, 01:44:34 pm »
Well that's one bug down. :D

Anytime you think you found a bug its always good to check if it
occurs on real hardware or one of the most accurate emulators.

Can you edit just one of the strings like how you would in your
translation but using original rom instead and show a picture of
the bug, the data, and pointer for the string? The patch would
also probable help.

I can see the bug with 2 players using H(0x48) instead of a space(0x20)


Do you need the H to move over to the right by 4 tiles on row 0x0D?
Do you have pointers for the names?

It looks like 2 and 3 players need their own string. Would that fix
it instead of them both sharing the same string?


update:
I might be able to write new code so you wouldn't need to add this:
FE 0B 0D 20
FE 13 0D 20
FE 1B 0D 20

I just need the pointers to the names so I can do a test. If I
cant write code for that then I can create a new string so player 2
and player 3 will have their own. I don't even need a patch or more
pictures just those pointers to the names.

September 20, 2020, 06:12:02 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I think I fixed your bug but I'm not sure since I don't have
a patch for it but here is the code.

original code for storing name on row 0x0D:
Code: [Select]
Disassembly:
$01/B942 20 7D A3    JSR $A37D  [$01:A37D]   A:0000 X:0000 Y:0087 D:0000 DB:01 S:01F8 P:envmxdiZcHC:0896 VC:092 00 FL:65527

Disassembly:
$01/A37D 08          PHP                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0044 VC:000 00 FL:65524
$01/A37E C2 30       REP #$30                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0060 VC:000 00 FL:65524
$01/A380 22 52 FD 00 JSL $00FD52[$00:FD52]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0068 VC:000 00 FL:65524
$01/A384 E2 20       SEP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0084 VC:000 00 FL:65524
$01/A386 A9 80       LDA #$80                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0092 VC:000 00 FL:65524
$01/A388 8D 15 21    STA $2115  [$01:2115]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0100 VC:000 00 FL:65524
$01/A38B C2 20       REP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0116 VC:000 00 FL:65524
$01/A38D AF CC 21 7E LDA $7E21CC[$7E:21CC]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0124 VC:000 00 FL:65524
$01/A391 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0132 VC:000 00 FL:65524
$01/A392 AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0140 VC:000 00 FL:65524
$01/A393 BF CE 21 7E LDA $7E21CE,x[$7E:22AE] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0148 VC:000 00 FL:65524
$01/A397 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0156 VC:000 00 FL:65524
$01/A398 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0164 VC:000 00 FL:65524
$01/A399 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0172 VC:000 00 FL:65524
$01/A39A 8D D6 00    STA $00D6  [$01:00D6]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0180 VC:000 00 FL:65524
$01/A39D BF D6 21 7E LDA $7E21D6,x[$7E:22B6] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0188 VC:000 00 FL:65524
$01/A3A1 29 F8 FF    AND #$FFF8              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0196 VC:000 00 FL:65524
$01/A3A4 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0204 VC:000 00 FL:65524
$01/A3A5 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0212 VC:000 00 FL:65524
$01/A3A6 18          CLC                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0220 VC:000 00 FL:65524
$01/A3A7 6D D6 00    ADC $00D6  [$01:00D6]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0228 VC:000 00 FL:65524
$01/A3AA 69 E0 00    ADC #$00E0              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0236 VC:000 00 FL:65524
$01/A3AD 69 00 40    ADC #$4000              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0244 VC:000 00 FL:65524
$01/A3B0 8D 16 21    STA $2116  [$01:2116]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0252 VC:000 00 FL:65524
$01/A3B3 AF 64 21 7E LDA $7E2164[$7E:2164]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0260 VC:000 00 FL:65524
$01/A3B7 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0268 VC:000 00 FL:65524
$01/A3B8 AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0276 VC:000 00 FL:65524
$01/A3B9 BF 80 21 7E LDA $7E2180,x[$7E:2260] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0284 VC:000 00 FL:65524
$01/A3BD 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0292 VC:000 00 FL:65524
$01/A3BE 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0300 VC:000 00 FL:65524
$01/A3BF 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0308 VC:000 00 FL:65524
$01/A3C0 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0316 VC:000 00 FL:65524
$01/A3C1 AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0324 VC:000 00 FL:65524
$01/A3C2 A0 05 00    LDY #$0005              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0332 VC:000 00 FL:65524
$01/A3C5 E2 20       SEP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0348 VC:000 00 FL:65524
$01/A3C7 BF 84 A7 01 LDA $01A784,x[$01:A864] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0356 VC:000 00 FL:65524
$01/A3CB C2 20       REP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0372 VC:000 00 FL:65524
$01/A3CD 29 3F 00    AND #$003F              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0380 VC:000 00 FL:65524
$01/A3D0 18          CLC                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0388 VC:000 00 FL:65524
$01/A3D1 69 00 02    ADC #$0200              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0396 VC:000 00 FL:65524
$01/A3D4 09 00 20    ORA #$2000              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0404 VC:000 00 FL:65524
$01/A3D7 8D 18 21    STA $2118  [$01:2118]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0412 VC:000 00 FL:65524
$01/A3DA E8          INX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0420 VC:000 00 FL:65524
$01/A3DB 88          DEY                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0428 VC:000 00 FL:65524
$01/A3DC 10 E7       BPL $E7    [$A3C5]      A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0436 VC:000 00 FL:65524
$01/A3DE 28          PLP                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0444 VC:000 00 FL:65524
$01/A3DF 60          RTS                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0452 VC:000 00 FL:65524


new code for storing name on row 0x0D:
Code: [Select]
Disassembly:
$01/B942 20 00 FF    JSR $FF00  [$01:FF00]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0460 VC:000 00 FL:65524

Disassembly:
$01/FF00 08          PHP                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0476 VC:000 00 FL:65524
$01/FF01 C2 30       REP #$30                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0492 VC:000 00 FL:65524
$01/FF03 22 52 FD 00 JSL $00FD52[$00:FD52]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0500 VC:000 00 FL:65524
$01/FF07 E2 20       SEP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0516 VC:000 00 FL:65524
$01/FF09 A9 80       LDA #$80                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0524 VC:000 00 FL:65524
$01/FF0B 8D 15 21    STA $2115  [$01:2115]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0532 VC:000 00 FL:65524
$01/FF0E C2 20       REP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0548 VC:000 00 FL:65524
$01/FF10 AF CC 21 7E LDA $7E21CC[$7E:21CC]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0556 VC:000 00 FL:65524
$01/FF14 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0564 VC:000 00 FL:65524
$01/FF15 AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0572 VC:000 00 FL:65524
$01/FF16 BF CE 21 7E LDA $7E21CE,x[$7E:22AE] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0580 VC:000 00 FL:65524
$01/FF1A 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0588 VC:000 00 FL:65524
$01/FF1B 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0596 VC:000 00 FL:65524
$01/FF1C 4A          LSR A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0604 VC:000 00 FL:65524
$01/FF1D 8D D6 00    STA $00D6  [$01:00D6]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0612 VC:000 00 FL:65524
$01/FF20 BF D6 21 7E LDA $7E21D6,x[$7E:22B6] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0620 VC:000 00 FL:65524
$01/FF24 29 F8 FF    AND #$FFF8              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0628 VC:000 00 FL:65524
$01/FF27 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0636 VC:000 00 FL:65524
$01/FF28 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0644 VC:000 00 FL:65524
$01/FF29 18          CLC                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0652 VC:000 00 FL:65524
$01/FF2A 6D D6 00    ADC $00D6  [$01:00D6]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0660 VC:000 00 FL:65524
$01/FF2D 69 E0 00    ADC #$00E0              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0668 VC:000 00 FL:65524
$01/FF30 69 00 40    ADC #$4000              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0676 VC:000 00 FL:65524
$01/FF33 8D 16 21    STA $2116  [$01:2116]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0684 VC:000 00 FL:65524
$01/FF36 AF 64 21 7E LDA $7E2164[$7E:2164]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0692 VC:000 00 FL:65524
$01/FF3A 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0700 VC:000 00 FL:65524
$01/FF3B AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0708 VC:000 00 FL:65524
$01/FF3C BF 80 21 7E LDA $7E2180,x[$7E:2260] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0716 VC:000 00 FL:65524
$01/FF40 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0724 VC:000 00 FL:65524
$01/FF41 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0732 VC:000 00 FL:65524
$01/FF42 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0740 VC:000 00 FL:65524
$01/FF43 0A          ASL A                   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0748 VC:000 00 FL:65524
$01/FF44 AA          TAX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0756 VC:000 00 FL:65524
$01/FF45 A0 05 00    LDY #$0005              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0764 VC:000 00 FL:65524
$01/FF48 E2 20       SEP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0780 VC:000 00 FL:65524
$01/FF4A BF 84 A7 01 LDA $01A784,x[$01:A864] A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0788 VC:000 00 FL:65524
$01/FF4E C2 20       REP #$20                A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envMxdizcHC:0804 VC:000 00 FL:65524
$01/FF50 29 3F 00    AND #$003F              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0812 VC:000 00 FL:65524
$01/FF53 18          CLC                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0820 VC:000 00 FL:65524
$01/FF54 69 00 02    ADC #$0200              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0828 VC:000 00 FL:65524
$01/FF57 09 00 20    ORA #$2000              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0836 VC:000 00 FL:65524
$01/FF5A 8D 18 21    STA $2118  [$01:2118]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0844 VC:000 00 FL:65524
$01/FF5D E8          INX                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0852 VC:000 00 FL:65524
$01/FF5E 88          DEY                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0860 VC:000 00 FL:65524
$01/FF5F 10 E7       BPL $E7    [$FF48]      A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0868 VC:000 00 FL:65524
$01/FF61 A9 20 22    LDA #$2220              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0876 VC:000 00 FL:65524
$01/FF64 8D 18 21    STA $2118  [$01:2118]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0884 VC:000 00 FL:65524
$01/FF67 28          PLP                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0892 VC:000 00 FL:65524
$01/FF68 60          RTS                     A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0900 VC:000 00 FL:65524

The code is all the same except for these 2 lines:
Code: [Select]
$01/FF61 A9 20 22    LDA #$2220              A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0876 VC:000 00 FL:65524
$01/FF64 8D 18 21    STA $2118  [$01:2118]   A:2002 X:00E0 Y:0086 D:0000 DB:01 S:01F2 P:envmxdizcHC:0884 VC:000 00 FL:65524

With this code you shouldn't need to add this to your string:
FE 0B 0D 20
FE 13 0D 20
FE 1B 0D 20

Here is the patch:
+bug+#4+fix.ips/file]http://www.mediafire.com/file/jw1x2yfjz4xldzl/Micro+Machines+(U)+[!]+bug+#4+fix.ips/file
« Last Edit: September 20, 2020, 07:27:48 pm by slidelljohn »

Vag

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • GreekRoms
Re: Micro Machines SNES bugs fix
« Reply #4 on: September 20, 2020, 03:01:48 pm »
Slidelljohn, thank you for your interest!

You modified your message but before you did, I had replied, but my reply wasn't published. This was my reply before I saw the change:

Well that's one bug down. :D
:-D
At least I partially fixed it, even though it's not really a bug. The extra spaces that cover the garbage tiles don't have any side effects on the other emulators, by the way.

Anytime you think you found a bug its always good to check if it
occurs on real hardware or one of the most accurate emulators.
Obviously, big mistake :-)
But in this case I really really thought it was a bug, because you see different things with each emulator (because of the connected gamepads). Also, I thought that Snes9x would be almost perfect after all these years; my last translation was 14 years ago.

Can you edit just one of the strings using original rom and show a picture of the bug, the data, and pointer for the string?
The modified string will be bigger than the original, so I have to move it somewhere else in the rom. The original string is at offset DBC5. The pointer is at offset D285 and its original value is C5DB. We'll move the string to offset F800. So please change the pointer from C5DB to 00F8 and put these values at offset F800:
FE 05 0E 58 58 58 58 58 58 FE 0D 0E 59 59 59 59 59 59 FE 15 0E 5A 5A 5A 5A 5A 5A FE 0B 0D 31 FE 13 0D 32 FE 1B 0D 33 FF
I changed the spaces to letters and numbers, so that we can see them on screen.
It is really a series of strings:
FE 05 0E 58 58 58 58 58 58 (string "XXXXXX" at position 050E)
FE 0D 0E 59 59 59 59 59 59 (string "YYYYYY" at position 0D0E)
FE 15 0E 5A 5A 5A 5A 5A 5A (string "ZZZZZZ" at position 150E)
FE 0B 0D 31 (string "1" at position 0B0D)
FE 13 0D 32 (string "2" at position 130D)
FE 1B 0D 33 (string "3" at position 1B0D)
FF
In the original game, only "XXXXXX", "YYYYYY" and "ZZZZZZ" would be there, I have added "1", "2" and "3", to hide the 7th letter.
Now when you select the first player you see this:

and when you select the second player you see this:


As this string is used in three player game as well (as it's supposed to be), here's how it looks there:
Before you select the first player:


After you select the first player (you see the first image for 1", then the second):



After you select the second player:



After you select the third player:


So, this string should be shown only at three players game and at two players game.


This is after your modified message:
Two and three (and four) players do have their own strings. The problem is that the string for three players also shows up on two players.
Also, I don't want H to move 4 tiles to the right. That would look OK on three players, but it wouldn't do what was supposed to do on two players, and the bug would still be there, really. They are not supposed to show on three players game at all.
The names are the only strings that are different than all the others. They are at offset A784 and they have fixed width, 6 characters each (they are together with their equivalent adjective). I don't have any pointers for them.
« Last Edit: September 20, 2020, 03:17:33 pm by Vag »

slidelljohn

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Micro Machines SNES bugs fix
« Reply #5 on: September 21, 2020, 11:44:36 am »
I had replied, but my reply wasn't published.
This is odd :o
1st time I have seen a delay in a post like this before. Even your
last post only showed up within the last few hours. I wonder what
caused the delay. I'm not sure whats going on with the post its very
strange but hopefully the patch I made works for you. :)

Vag

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
    • GreekRoms
Re: Micro Machines SNES bugs fix
« Reply #6 on: September 21, 2020, 01:40:05 pm »
Hello again slidelljohn,
thank you very much for this, you're great! You fixed the problem and now the greek translation is practically complete. The delay for my messages is because they need to be approved; I guess because I'm a new user at the forum; are yours published immediately?

If I'm not mistaken though, the bug remains, as the strings for three players appear on two players as well. I don't mind about it, but I'm not sure if including this in a patch with bug fixes makes sense, as the original version and the existing Spanish translation (I guess) don't have a problem, and the greek translation will include it anyway (I used address F880 instead of FF00, as FF00 was used for some translated text). As bug #3 isn't really a bug but inaccurate emulation by Snes9x, I'm not sure if the two first minor bugs deserve a patch, even if I include the partial fix for #3 that hides the garbage tiles.

To ensure the translation is perfect, I now have to play a lot and test it thoroughly. Your name will be mentioned of course, just when I release it, after some days :-)

By the way, Micro Machines has a lot of potential for hacking. I'm thinking of writing a names editor (for all versions and translations). By chance, I have found a byte that changes the camera position, so I may include a setting for it. Also, I think it's possible to create new players to replace the old ones (there may be space restrictions because of the compression, so they can't have too many details). It's lots of work, but not too hard. And if someone has plenty of time and patience for experimenting with a hex editor and has asm knowledge, a round editor could be possible. You can even see the outline of the different rounds in a hex editor just by looking at the (uncompressed) data. Some months ago, I wanted to teach my son programming, so we programmed a files extractor for old video games. We started with IFF files, then we added some more (RNC and VGM). When I started Micro Machines, I added the compressed files it uses (DIET). This means I must finish that program first - it works, but it needs polishing. So, the file extractor program, the translation and then the name editor. If you're interested in the round editor, I could send you more details :-)

slidelljohn

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Micro Machines SNES bugs fix
« Reply #7 on: September 21, 2020, 03:00:54 pm »
You're welcome Vag! :)  I'm glad I was able to help you. :woot!:

I figured it was something like needing to be approved.
Yes, mine are published immediately.

I don't really think it was a bug but I guess it just depends how someone looks at it.
I wouldn't include it in a bug patch but you could include the source when you upload
your translation if you like. If #1 and #2 are bugs and you fix them I think you should
create a separate patch for each one and upload them.

After you test it thoroughly and if everything works, when you you upload it and
mention my name for the assembly bug fix, can you mention it for my contributions
on for my profile? I only have a few contributions and most of them are for helping
other people with translations.

The other stuff your working on sounds interesting and its awesome that you are teaching
your son.

Thanks for offering to send me more details for the round editor but I don't really have
any interest in Micro Machines. I think it was my 1st time playing it. I just seen you were
almost finished with your translation and I thought I could help you. It was fun, I like
fixing bugs. If you run into any other problems I'll try to help if I can.
« Last Edit: September 21, 2020, 03:29:20 pm by slidelljohn »