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

Author Topic: Snes emulators (Canoe, Snes9x) -- game problems and fixes  (Read 66469 times)

Robin64

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #40 on: February 15, 2018, 04:30:33 pm »
That solves some issues, but brings up others (rival CPU is now displayed top left on the lap counter)

I would say the version of the patch we have now is pretty good, given Canoe's shortcomings with this title, and we should move on to another game now. :)

I've been trying to solve Illusion of Gaia's problem myself actually, looking into how the SNES registers BG3 as a subscreen (lda #%00000100 sta $212D) and then enables subscreen color add/sub for translucency (lda #$02 sta $2130) and even found those in hex format in the ROM, but altering them did nothing. I wanted to disable translucency on BG3 for the menu screen, I thought it might solve the issue Canoe has. It does the image on the right instead of the one on the left.

« Last Edit: February 15, 2018, 05:14:24 pm by Robin64 »

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #41 on: February 15, 2018, 04:43:31 pm »

sluffy

  • Sr. Member
  • ****
  • Posts: 455
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #42 on: February 15, 2018, 06:39:28 pm »
Please rewind to Uniracers for a moment.
1[00] = ?, top-left??
1[70] = center, default
1[E0] = top-right
1[E1] = top-right??
1[EF] = top-right??
1[F0] = top-left??
1[FF] = top-left


012E29 = FF
012EF1 = FF
012D6A = FF
01304D = FF
013095 = FF
012FC9 = FF


Would you mind changing FF to 00,E1,EF,F0 for rival position testing? Want to uncover some Canoe pattern. So it does correctly respond to (1)FF (-1) when all values are shoved in. At some point, Canoe wraps it around too early but when...? This would be handy to know for other games with large sprites that roll off left side.

And saw message about Sink or Swim + old Zsnes build. Mwahaha.


Even better, snes9x 2010 has same bug
https://www.reddit.com/r/miniSNESmods/comments/79nfgc/snes9x2010_vs_canoe/


Can reproduce bug in bsnes by zapping irq routine. Scroll glitch. Geiger has bug too. Guessing H-DMA gremlin again *cough - Dragon Ball Z - cough*
« Last Edit: February 15, 2018, 07:16:37 pm by sluffy »

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #43 on: February 15, 2018, 07:51:30 pm »


And saw message about Sink or Swim + old Zsnes build. Mwahaha.


Oh, so you read the resetera thread too? It was me who posted that.

sluffy

  • Sr. Member
  • ****
  • Posts: 455
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #44 on: February 15, 2018, 09:27:25 pm »
Sink or Swim tester
http://s000.tinyupload.com/index.php?file_id=82830459963375190004


Short answer: fires irq 189. sets next irq 190. rti during 190. must fire irq 190 immediately again, which Canoe/Geiger do not. Water scroll bug.


Alternate test patch:
http://s000.tinyupload.com/index.php?file_id=06496837685797191982
(in case emu runs little too fast, or way too slow)


F1 Grand Prix suffers same problem. Will wait on working SOS first before rewiring that one. Illusion of Gaia ... looking next. So cursor hides whatever text is selected beneath (highlighted option 1-4)?
« Last Edit: February 15, 2018, 11:04:09 pm by sluffy »

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #45 on: February 15, 2018, 11:15:11 pm »
Sink or Swim tester
http://s000.tinyupload.com/index.php?file_id=82830459963375190004


Short answer: fires irq 189. sets next irq 190. rti during 190. must fire irq 190 immediately again, which Canoe/Geiger do not. Water scroll bug.


Alternate test patch:
http://s000.tinyupload.com/index.php?file_id=06496837685797191982
(in case emu runs little too fast, or way too slow)


F1 Grand Prix suffers same problem. Will wait on working SOS first before rewiring that one. Illusion of Gaia ... looking next. So cursor hides whatever text is selected beneath (highlighted option 1-4)?

Demi from resetera tested your first usa patch and said the same issue happened. He is going to test the 2nd patch next.
This is the issue that happens in the game:
https://www.youtube.com/watch?v=GuhoozSPRNw

It's not that the water rises, it's that when you use a bomb, everything on the screen gets weird.

As for Illusion of Gaia. The game doesn't even natively run in Canoe. You have to patch the game with this patch for it to even work:
https://drive.google.com/file/d/1cPHkJCaNhLYBIx11aBVKJu7dOSPOf8oE/view

Once you patch it, the game works perfectly, except for that menu issue that only happens there.
« Last Edit: February 15, 2018, 11:26:46 pm by reyvgm »

sluffy

  • Sr. Member
  • ****
  • Posts: 455
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #46 on: February 15, 2018, 11:26:46 pm »
Patch disables FastRom access; forces SlowRom. Funny how I can't get either mode to trigger Canoe freeze in emus. Curious what Quintet trick is being used on rom access times that.

Really hoping SOS gets fixed by #2. Geiger and Canoe video show very similar problem. But Canoe timing is still a mystery to me -- sometimes Geiger slow and other times acts like FastRom+.

Illusion of Gaia again. Main layer = bg1, map screen. That has priority being on top. Color math blends bottom bg3 layer together. HDMA changes window setting 2126-2127 (pseudo-cursor). I think it makes bg3 go on top of map layer, showing solid black + text. bg3 priority 1 flag is set. Anyone's guess why Canoe only shows black and no text.


Quote
It's not that the water rises, it's that when you use a bomb, everything on the screen gets weird.

Yep. Geiger shows this weird behavior (after using bomb). Activates some extra h-dma (probably forgets to turn it off). Supposed to draw status bar but irq never fires because of tight back-to-back irq timing. Which is supposed to make scrolling work again.

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #47 on: February 15, 2018, 11:39:22 pm »
Hopefully Robin and Darkakuma can test all of this by tomorrow.

Here's another issue that happens with Mario's Time Machine. It happens in Canoe and also in SNES9X. Start the game, press "L" or "R" to open the time machine, and press "A" to go to a surfing minigame. If you notice, whenever you get close to a mushroom (or a spike), it disappears. In real hardware it doesnt't disappear because you need to collect the mushrooms to warp in time.
« Last Edit: February 16, 2018, 12:47:53 am by reyvgm »

DarkAkuma

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #48 on: February 16, 2018, 12:45:45 am »
Patch disables FastRom access; forces SlowRom.

Yea. It's the SlowROM Check Fix from ucon64, turned into a patch. I added that SlowROM detection/fix to my sfrom Tool too, but the patches are still out there as generic "canoe fix"es.

This does remind me though. One day a fix for ActRaiser2 on canoe randomly surfaced on one of the lists, with zero explanation of what it is/does to make it work.

Quote
Find the Hexadecimal value 0A42000D4201, replace 01 with 00 which will give you 0A42000D4200 and the game will work!

Any idea? Would love to finally know WTF it is. =)

It was adapted to a few other games, but only those with exact hex matches to described bytes.

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #49 on: February 16, 2018, 12:48:06 am »
Sink or Swim 2nd patch tested by Demi and he reports that the game works as it should now. So I guess your 2nd patch is the real deal :)

therourke

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #50 on: February 16, 2018, 06:17:00 am »
Just wanted to drop in and say thanks for all the work on Canoe patches! Really appreciated.

There are a few issues I know of that I've not seen mentioned yet:

- Front Mission: Gun Hazard - cart saves do not work in Canoe. Upon game reset they are deleted. Somebody mentioned it might be a leftover piracy measure for the cart.
- Lemmings: the cursor flickers constantly in Canoe. Minor glitch, but very annoying and probably easy to solve.
- Micro Machines 2: constant engine sound in game.
- Little Magic: game either doesn't load or only gets to menu before it crashes
- Space Megaforce: Bass sound in music 'pops' at high level
- Toddlers: Music pops similar to SMF above
- Super Family Tennis: game menu is broken
- Rendering Ranger R2: black screen on load
- Cho Aniki: Bakuretsu Ranto Hen: Some minor graphical glitches when carrying out 'special move'
« Last Edit: February 16, 2018, 10:40:50 am by therourke »

matt!

  • Jr. Member
  • **
  • Posts: 74
  • JUS4QIX
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #51 on: February 16, 2018, 09:06:48 am »
This does remind me though. One day a fix for ActRaiser2 on canoe randomly surfaced on one of the lists, with zero explanation of what it is/does to make it work.

Any idea? Would love to finally know WTF it is. =)

It was adapted to a few other games, but only those with exact hex matches to described bytes.
http://6502.org/tutorials/65c816opcodes.html

This is a nice overview of SNES opcodes. Look up the first pair of digits, they will Translate to an opcodes. It might take arguments, that means the next pair or two pair of digits. This is disassembling.
« Last Edit: February 16, 2018, 09:19:24 am by matt! »

sluffy

  • Sr. Member
  • ****
  • Posts: 455
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #52 on: February 16, 2018, 10:08:49 am »
Thanks everyone. At least we keep making progress, and can "apply" what we learn about Canoe for other bugs.


Sink or Swim -- yes! This suggests Canoe runs at same "slow cycles" speed as Geiger. But VBlank triggers sooner on ~224 and HBlank also (maybe 0.25-0.50 scanline early). Going to get writeup on this after F1 Grand Prix and move on. Helps explain Cacoma Canoe error.


ActRaiser 2 is another slowrom variant.
Code: [Select]
e3e0
0A42 00 0D42 01
0A42 00 0D42 00

80e2eb lda $80e302,x [80e3e0] A:4200 X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 166 F: 0
80e2ef bmi $e300     [80e300] A:420a X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 166 F: 0
80e2f1 tay                    A:420a X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 182 F: 0
80e2f2 sep #$20               A:420a X:00de Y:420a S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 196 F: 0

80e2f4 lda $80e304,x [80e3e2] A:420a X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 258 F: 0
80e2f8 sta $0000,y   [81420a] A:4200 X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIZC V: 15 H: 258 F: 0
80e2fb inx                    A:4200 X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIZC V: 15 H: 294 F: 0
80e2fc inx                    A:4200 X:00df Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 308 F: 0
80e2fd inx                    A:4200 X:00e0 Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 322 F: 0
80e2fe bra $e2e9     [80e2e9] A:4200 X:00e1 Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 336 F: 0

Writes 420a = 00 (irq timer), 420d = 00 (slowrom). Still want to find specific "copier protection" algorithm.


Buffet is so big right now. And have some sidework to take care of too. Will manage somehow.

MMX2 slowdown ...... going to whip up quick FastRom patch later and see what it does. ^^


And if you can find emus that show Canoe errors, please mention which emu reproduces. Would require less nagging on me for testing. ;)


Sink or Swim - dual patch
http://s000.tinyupload.com/index.php?file_id=89749534021598941660

And writeup coming post 1.
« Last Edit: February 16, 2018, 11:06:52 am by sluffy »

DarkAkuma

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #53 on: February 16, 2018, 12:23:21 pm »
ActRaiser 2 is another slowrom variant.
Code: [Select]
e3e0
0A42 00 0D42 01
0A42 00 0D42 00

80e2eb lda $80e302,x [80e3e0] A:4200 X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 166 F: 0
80e2ef bmi $e300     [80e300] A:420a X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 166 F: 0
80e2f1 tay                    A:420a X:00de Y:4209 S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 182 F: 0
80e2f2 sep #$20               A:420a X:00de Y:420a S:01fb D:0000 DB:81 nvmxdIzC V: 15 H: 196 F: 0

80e2f4 lda $80e304,x [80e3e2] A:420a X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 258 F: 0
80e2f8 sta $0000,y   [81420a] A:4200 X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIZC V: 15 H: 258 F: 0
80e2fb inx                    A:4200 X:00de Y:420a S:01fb D:0000 DB:81 nvMxdIZC V: 15 H: 294 F: 0
80e2fc inx                    A:4200 X:00df Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 308 F: 0
80e2fd inx                    A:4200 X:00e0 Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 322 F: 0
80e2fe bra $e2e9     [80e2e9] A:4200 X:00e1 Y:420a S:01fb D:0000 DB:81 nvMxdIzC V: 15 H: 336 F: 0

Writes 420a = 00 (irq timer), 420d = 00 (slowrom). Still want to find specific "copier protection" algorithm.

Thanks. Nice to finally know. I suspected it might be that, but I don't know a thing about ASM. Just basic/intermediate ROM hacking.

MMX2 slowdown ...... going to whip up quick FastRom patch later and see what it does. ^^

MMX2 slowdown is just hardware limitations. Same as Marvelous. The SNESC hardware gets pushed to its limits when emulating certain special chips, and other demanding things like high res mode or pushing sprite limits at the same time as also using its low latency input mode.
« Last Edit: February 16, 2018, 01:58:00 pm by DarkAkuma »

matt!

  • Jr. Member
  • **
  • Posts: 74
  • JUS4QIX
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #54 on: February 16, 2018, 02:33:29 pm »
Speaking of MMX2 slowdown I'm interested in the Super Ghouls'n Ghosts patch that improved the performance of the game.

https://www.romhacking.net/hacks/3473/

Is there anywhere that explains it all?
« Last Edit: February 16, 2018, 03:14:05 pm by matt! »

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #55 on: February 16, 2018, 02:35:06 pm »
That has nothing to do with this thread? Sluffy wasn't even the one that released that patch.

matt!

  • Jr. Member
  • **
  • Posts: 74
  • JUS4QIX
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #56 on: February 16, 2018, 03:14:45 pm »
Sure, but maybe some lessons can be learned from it.

reyvgm

  • Hero Member
  • *****
  • Posts: 974
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #57 on: February 16, 2018, 03:16:49 pm »
Ah, with your edit now it makes more sense.

sluffy

  • Sr. Member
  • ****
  • Posts: 455
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #58 on: February 16, 2018, 06:54:33 pm »
F-1 Grand Prix (Japan) tester
http://s000.tinyupload.com/index.php?file_id=41608621621275274341

See HUD on right side.


Heard Rendering Ranger requires some precise cpu-apu timing to work correctly. Fix may not happen.

Writeup posted for Sink or Swim. Reupped writeup for Super Off Road (rhdn ate post). Writeup coming for F-1 Grand Prix.

Will check Mario since snes9x has error. :)


Source code to SGnG restoration would be great. But rainponcho is nowhere. Asked months ago about it but nothing. Looks like some hand-optimized stuff that could use some explaining, like busted Arcana.

And for IoG -- hijinking hdma to turn on bg3 on main layer briefly (instead of clip window) may work. Or not. Need test.
« Last Edit: February 16, 2018, 07:07:28 pm by sluffy »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6389
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Canoe official snes emulator -- problems and fixes
« Reply #59 on: February 16, 2018, 09:14:47 pm »
I do remember Sink or Swim being one of byuu's examples in his "why accuracy matters" article thing about common emulation problems.
Quote
Sir Howard Stringer, chief executive of Sony, on Christmas sales of the PS3:
"It's a little fortuitous that the Wii is running out of hardware."