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

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

#### Jorpho

• Hero Member
• Posts: 4136
• The cat screams with the voice of a man.
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #60 on: February 16, 2018, 10:11:02 pm »
I do remember Sink or Swim being one of byuu's examples in his "why accuracy matters" article thing about common emulation problems.

Crikey, was that seven years ago already?
https://arstechnica.com/gaming/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator/

The other examples there were Timecop, Air Strike Patrol, and Jurassic Park.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

#### sluffy

• Hero Member
• Posts: 642
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #61 on: February 16, 2018, 10:13:02 pm »
Good article about some annoying hard games. Although byuu left out critical details on some, but gave some decent hints on what to search. Would've saved me some pain from bsnes debugging.

Mario's Time Machine tester (USA,Europe,Germany)
8846 = 35

That's it. Short answer: Uses PPU math registers 211B,211C (which I never knew about or its speed) and reads from 2136-2137. 2134-2136 = 24-bit math result. 2137 = latch h/v counters. This register returns OpenBus.

AD 36 21 = LDA \$2136

Canoe / Snes9x returns (21)xx. Supposed to be (xx)xx. Since 2136 returns xx. And OpenBus is now xx. For Mario surfing, it's 0000 or FFFF. Reading from 2135 = "glitch" averted. And now snes9x devs can go fix this problem.

And of course I grossly over-generalize technical explanation side. Like Sink or Swim. Surely IRQ firing is not simple "back-to-back" scanline talk. Probably some more erotic details with hdma, end of scanline, nmi fringe, or something creepy.

#### reyvgm

• Hero Member
• Posts: 1177
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #62 on: February 16, 2018, 11:48:00 pm »
Great! Hopefully someone is able to make a patch to test it out.

Overscan disable testers
- Hunt for Red October (USA): 80A6 = 00
- Tom and Jerry (USA): 80A6 = 00

- Super Ninja Boy (USA):
Code: [Select]
`\$00/EFB8 A9 04       LDA #\$04                A:00E0 X:FFFF Y:0000 D:0000 DB:00 S:01FF P:eNvMxdIzC\$00/EFBA 8D 33 21    STA \$2133  [\$00:2133]   A:0004 X:FFFF Y:0000 D:0000 DB:00 S:01FF P:envMxdIzC`
a9 00 8d 33 21:
6fb8
c15e
23c16
ff39e
1669d
813e
c165
11a58
11a68
2027f
2059d

Is that supposed to be a fix for those 3 games? I didn't see anyone talking about them, or even making patches to see if they fix the problems.

---

Oh, and about Soul Blazer. Maybe this info could help. In that volcano area, when you enter it the first time, the whole area is actually dark. Well not dark, but like under a shade as seen in the image below. The volcano is erupting lava balls, which fall all around you. You are supposed to find an item to protect you, once you do, that's when the ball that follows you creates that "light circle" around you which is actually a shield that protects you from fireballs. This is how it happens on real hardware.

There are other areas in the game where you need to find an item to make the ball around you shine light (just in the circle), or even to see hidden walls (which makes the walls disappear when the light circle passes over them). But in those areas, the game runs just fine in Canoe. It's only in the Volcano area that the effect is broken. Instead of the area being entirely dark (like when you first enter it), or having the light circle around you (like after finding the item), Canoe instead shows the whole area lit up. As if the light is no longer a circle, but the whole screen.
« Last Edit: February 17, 2018, 12:06:55 am by reyvgm »

#### Robin64

• Full Member
• Posts: 148
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #63 on: February 17, 2018, 07:11:05 am »
Can confirm that Tom and Jerry, Hunt for Red October, and Mario's Time Machine all work great in Canoe now.

#### matt!

• Full Member
• Posts: 141
• JUS4QIX
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #64 on: February 17, 2018, 07:31:50 am »
Is that supposed to be a fix for those 3 games? I didn't see anyone talking about them, or even making patches to see if they fix the problems.
The patches for the first two games are small, one byte changes at the end of  their respective lines.

The patch for the third is the bigger chunk of code.

#### Robin64

• Full Member
• Posts: 148
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #65 on: February 17, 2018, 07:43:01 am »
Super Ninja Boy also works now. Found 11 instances of A9 04 8D 33 21 and replaced them with A9 00 8D 33 21.

#### pimpinelephant

• Full Member
• Posts: 182
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #66 on: February 17, 2018, 09:46:39 am »
Super Ninja Boy also works now. Found 11 instances of A9 04 8D 33 21 and replaced them with A9 00 8D 33 21.

What exactly is the issue with Super Ninja Boy? I know that it's an overscan issue, but to what degree?

I modified the 11 offsets in a hex editor just as you said, created SFROMs with both the non-edited ROM as well as the edited ROM, and synced them both onto my Classic. They appear to be identical after a quick playtest of about 15 or so minutes. Is the overscan issue a persistent one, or only on certain screens?

I've never played Super Ninja Boy before, so I'm not sure what the game screen is supposed to look like, but both non-edited and edited appear fine to me, everything fits on the screen and looks the same with both. Although again, this was only after about 15 minutes of playing, so maybe the issue occurs on certain screens? I'm not exactly sure what I'm supposed to be looking for to be honest.

EDIT:

Alright, I figured out where the overscan issue occurs, at least in the limited amount of playtesting I did. The intro sequence/splash screen, when you first boot up the game before pressing start, does not display completely accurately within the display window. It appears as if it's slightly positioned upwards, revealing a noticeable black bar at the bottom of the screen. It's fairly easy to notice since that intro sequence/splash screen uses a pinkish background which really contrasts with the black.

I haven't played too much of the game though, so I have no idea if there are other overscan issues throughout the game. Either way, Sluffy's fix definitely appears to work and correct the overscan issues, at least from what I'm seeing.

I would also just like to take the time to really thank Sluffy. He's truly amazing and his efforts are very much appreciated! Thank you Sluffy for all of your hard work!
« Last Edit: February 17, 2018, 11:41:27 am by pimpinelephant »

#### sluffy

• Hero Member
• Posts: 642
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #67 on: February 17, 2018, 01:38:35 pm »
Super Ninja Boy toggles overscan all over place. Cutscene, dialog, menu, map, here/there. It's nuts!

Cool to hear reports coming in that nearly everything going okay. Took care of some banalities (writeups, regions). F-1 could use checker and that's off. Uniracers missing game pak error (no\$sns) solved -- sram wrap \$2000 mark. And no\$sns has vs split bug so that'll be fun to think through later since can verify on broken emu.

Kinda wonder if Gaia / Blazer are related. Both suffer h-dma problem but differing result. Have to play Blazer myself and inspect h-dma in working areas.

#### Robin64

• Full Member
• Posts: 148
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #68 on: February 17, 2018, 01:54:17 pm »
F-1 Grand Prix works now too. Here's before and after shots.

Before the patch, the HUD was not just corrupt, but it was also flickering. There was a thick line at the top of screen flickering too. Both of those things are gone now.

#### reyvgm

• Hero Member
• Posts: 1177
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #69 on: February 17, 2018, 03:38:14 pm »

Kinda wonder if Gaia / Blazer are related. Both suffer h-dma problem but differing result. Have to play Blazer myself and inspect h-dma in working areas.

Ok, I'll post two .srm saves of the game and how to get to the areas where the light circle is in effect:

Save 1 (https://www.sendspace.com/file/4wgfpt)
Once you load the save, enter the right portal. You'll be in a completely dark area, and the only light will be of a spirit circle, and a torch.

Save 2 (https://www.sendspace.com/file/qpa9s9)
Once you load the save, enter the left portal. You'll immediately see the spirit circle cause some sort of magnifying effect. Go down a bit to the area where there are spikes coming out of the walls, and you'll see the walls disappear when the spirit light passes over the wall.

------
Like I said in my post above, the area in the volcano is semi-dark. Once you get the needed item, the spirit circle will cast a light circle, which will protect you from the falling lava. When the lava falls in the light circle, it gets destroyed. However, with the save I sent you, the volcano is already sleeping. Do you need a save of that area BEFORE you find the necessary item, or a save while the volcano is shooting lava?

#### sluffy

• Hero Member
• Posts: 642
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #70 on: February 17, 2018, 03:45:21 pm »
I think those 2 saves will be enough for now. Thanks for speeding this up. Going to check this next.

Ys3 save tester (Usa)

70:8000 --> 70:0000 sram.

Awesome to hear F-1 is down. Same trick as Sink or Swim so lucky us.

#### reyvgm

• Hero Member
• Posts: 1177
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #71 on: February 17, 2018, 03:57:27 pm »
I think those 2 saves will be enough for now. Thanks for speeding this up. Going to check this next.

Ys3 save tester (Usa)

70:8000 --> 70:0000 sram.

Awesome to hear F-1 is down. Same trick as Sink or Swim so lucky us.

By the way, the Ys3 issue is more than just not being able to save correctly.

When you die, your character glitches out. And also, in Canoe, when you save and then try to load that save, it enables a menu that lets you choose later areas before you are even supposed to get there. Sort of like a debug level select. However, if you pick one of those areas, the game will glitch or crash.

The game does have a native debug menu though that lets you pick any area in the game. It's a cheat done with the 2nd controller:
https://gamefaqs.gamespot.com/snes/562845-ys-iii-wanderers-from-ys/cheats

#### pimpinelephant

• Full Member
• Posts: 182
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #72 on: February 17, 2018, 05:46:48 pm »
I think those 2 saves will be enough for now. Thanks for speeding this up. Going to check this next.

Ys3 save tester (Usa)

70:8000 --> 70:0000 sram.

Awesome to hear F-1 is down. Same trick as Sink or Swim so lucky us.

Hmm, that reminds me. There are a couple of games that have similar SRAM issues. Kirby's Dream Land 3 has this issue when used with it's proper preset ID, but I'm fairly certain that this is an issue with Canoe and not with the ROM itself.

The other is Front Mission: Gun Hazard. This might have been mentioned already in this thread now that I think about it. But oddly enough, Canoe wipes the SRAM once exiting the game.

#### sluffy

• Hero Member
• Posts: 642
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #73 on: February 17, 2018, 08:43:12 pm »
Have to learn lots more about windows and color blending for Blazer. Something odd is happening which I don't know enough about yet.

Gun Hazard - just double-verifying save bug happens with vanilla rom also?

FMGH is HiROM and there's basically only 1 region to save data, unlike Ys3 LoRom.

And I know. Kinda not so likely. Someone wants this Canoe tester

Mighty Morphin' Power Rangers: Fighting Edition (USA, Europe). Battle screen fix. IRQ dma setup + nmi interruption = ka-blam! Takes serious timing to not get beat up on hardware.

Gaia has bg1(top) + bg3(lower). Main layer is half-blended together with sub layer. Main is translucent layer; subscreen is always opaque, never translucent. Clip window1 says to cut out anything inside main at hdma time. By creating a hole in bg1, bg3(sub) is now visible. Canoe maybe takes this too literally and cuts out bg3(sub) also by accident = black bar. Or blends 0(main) ==> 0(sub).

Workaround in process now.
« Last Edit: February 17, 2018, 11:17:34 pm by sluffy »

#### Robin64

• Full Member
• Posts: 148
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #74 on: February 18, 2018, 03:43:48 am »
Before and after for Power Rangers Fighting Edition!

#### reyvgm

• Hero Member
• Posts: 1177
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #75 on: February 18, 2018, 04:13:15 am »
God damn, Sluffy is a god

Robin, what about Ys 3. Did it work?

#### Robin64

• Full Member
• Posts: 148
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #76 on: February 18, 2018, 04:21:07 am »
Ys 3 doesn't appear to work. When I saved, there were already 3 saves there all named "Underground Passage 6". So I saved over one of those, but when I reloaded the game I was back at the beginning doing the long intro bit.

#### reyvgm

• Hero Member
• Posts: 1177
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #77 on: February 18, 2018, 04:23:20 am »
I see. Thanks.

#### sluffy

• Hero Member
• Posts: 642
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #78 on: February 18, 2018, 05:49:12 pm »
D'oh! Yeah.. Ys 3's going to be twilight weirdness for awhile.

Gun Hazard ... wondering if Canoe is treating game as those "non-battery backed" sram games (heard a few exist).

Asking for Gaia cursor tester. Praying a bit my lessons in window theory works.

MMPR is pretty similar to Cacoma error. Except I think it runs DMA some bit faster than Geiger, whereas hardware should be slower than both seemingly. Have to re-check. Post writeup later later.

Micro Machines 2 engine sound ... does this infinite loop start after race is done? Or mid-game?

Also requesting a video or more screenshots of Cool World bug. It's clear when talking to thug that bg3h scroll is way off. But why he looks flattened? Does flicker start when balloon is opening or after text is visible?
--> Possible delay this. Found way to recreate bug in snes9x. SEI = prevent interrupts. Canoe fires anyway. Egad! How many games this could affect??

Taking off Cool World tester. Think something else is triggering bg3 wacky shifts.
« Last Edit: February 19, 2018, 02:52:50 pm by sluffy »

#### JackMonty

• Jr. Member
• Posts: 8
##### Re: Canoe official snes emulator -- problems and fixes
« Reply #79 on: February 19, 2018, 09:19:28 am »
A big thank you to everyone who is working on patches for the official canoe emulator - some real great stuff going on here!

I wanted to ask if anyone has tried Parodius Non-Sense Fantasy. I added the PAL version as well as using a PAL to NTSC Patch but it still sounds horrible (choppy sound). Does this stem from the fact canoe cannot handle some PAL games even if patched to NTSC?

Any hindsight would be welcomed!