Weird SNES Glitches on Certain Games

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Weird SNES Glitches on Certain Games
by on (#157035)
Hey guys,

On my SNES console (, I'm getting weird glitches on certain games. For example, on Super Mario World, if Mario moves on the map, he disappears:

https://youtu.be/luyovVFl1wI

Here's a video of Pilotwings. The altitude seems to be kind of random (last two or three digits of it seem to be what you would expect for dropping altitude but the rest are definitely wrong!). Besides that it plays fine.

https://youtu.be/ohr8-LxeXkE

Any ideas? Would a certain chip be faulty?
Edit: It's the original North American SNES, not the Jr.

Thanks!
Re: Weird SNES Glitches on Certain Games
by on (#157038)
When Mario "disappears", are you able to still select the level?
Re: Weird SNES Glitches on Certain Games
by on (#157039)
Espozo wrote:
When Mario "disappears", are you able to still select the level?

I cannot, button presses don't do anything.

Also, if it helps it's the original North American SNES, not the Jr.
Re: Weird SNES Glitches on Certain Games
by on (#157058)
If I had to guess, this sounds like a bad RAM chip. Do you have any way of running the SNES Test Program?
Re: Weird SNES Glitches on Certain Games
by on (#157060)
adam_smasher wrote:
If I had to guess, this sounds like a bad RAM chip. Do you have any way of running the SNES Test Program?

I don't have a flash cart at the moment but I could figure out a way to get it on a cart. Thanks for the input!
Re: Weird SNES Glitches on Certain Games
by on (#157508)
I still haven't gotten a test cart yet, but I opened up the system to see if anything looks corroded, and besides from a bit of dirt it looks good. I also took a video of Pilotwings...the glitching follows an interesting pattern:

https://youtu.be/ohr8-LxeXkE

Is there a supply that sells SNES RAM chips, or do they have to be pulled from salvage systems?
Re: Weird SNES Glitches on Certain Games
by on (#157511)
Unfortunately, I'd suspect a bad CPU. :( I recently repaired a bunch of Nintendo Super System arcade motherboards (basically an SNES, with 3 slots and an extra processor to handle coin operation)... and some seemed completely dead, some would play some games and not others, and some had goofy glitches like yours... but the majority of problems ended up being bad CPUs. Over the last few months I've bought lots of SNES motherboards on ebay (hoping to get some CPUs to repair the NSS motherboards), and quite a few of them also had bad CPUs.

If you really want to get to the bottom of it, I'd definitely recommend the burn-in test cart... though it's probably just gonna tell you what you already know... it's broken (or it won't detect the problem and pass all the tests). To compare... I've only come across 4 bad PPU1s, 3 bad PPU2s, 1 bad APU, and no bad VRAMs or WRAMs.

Here's what 24 bad SNES CPUs looks like. :/

DogP
Re: Weird SNES Glitches on Certain Games
by on (#157531)
Yeesh. I'm surprised games would run so (sorta) well on a bad CPU, and here it seems like very specific addresses giving bad data, which is why I guessed RAM. But there was another big long thread on here of someone diagnosing their broken SNES and it was the CPU too (the whole stack subsystem was busted). I wonder if there's something about the S-CPU's physical composition that's causing them to start decaying rapidly all of a sudden...

Anyway, SnoopKatt, - regardless of if it's the CPU or the RAM, I'm pretty sure the only source for parts would be another SNES; the transplant operation would probably pretty tricky, too.
Re: Weird SNES Glitches on Certain Games
by on (#157546)
adam_smasher wrote:
Yeesh. I'm surprised games would run so (sorta) well on a bad CPU

The CPU is so integrated that it seems certain parts fail, causing weirdness, but still running. For example, one CPU had a bad DMA controller, which would play a lot of games fine, but for example F-Zero played weird. Another had a bad multiplier and divider, which again played lots of things fine, but the tracks on Mario Kart, F-Zero, etc got really crazy whenever you turned. Others probably had bad address lines or something, because a lot of games would run 100%, and the test cart would pass all tests... but some of the larger/more advanced games just wouldn't run at all.

I'm working on putting together a webpage with symptoms and failures that I've run across, so maybe it'll give an idea of what to expect from various failures. I'll probably try purposefully sabotaging some VRAM and WRAM (lifting/shorting pins, maybe removing and overvoltaging/ESD shocking and reinstalling) to get an idea what symptoms that'd specifically cause.

DogP
Re: Weird SNES Glitches on Certain Games
by on (#157548)
That's a bummer to hear :/ but thank you for sharing! When I'm able to get a replacement board, I'd be happy to send you the broken board for just shipping costs.

It's a shame new ASIC's are so expensive to make, it'd be great to make new CPU's :(
Re: Weird SNES Glitches on Certain Games
by on (#157551)
Perhaps the way forward is to get a working S-CPU, S-PPU1, S-PPU2, S-SMP, and S-DSP decapped, delayered, traced, and into an FPGA.
Re: Weird SNES Glitches on Certain Games
by on (#157552)
tepples wrote:
Perhaps the way forward is to get a working S-CPU, S-PPU1, S-PPU2, S-SMP, and S-DSP decapped, delayered, traced, and into an FPGA.

Kevtris wants to make a SNES core for his FPGA machine: http://atariage.com/forums/topic/242970 ... tem/page-1
So maybe that's the way to go in the future once all our CPU's die :p
Re: Weird SNES Glitches on Certain Games
by on (#157580)
Well...

Of course that probably fails to account for any still undocumented behavior yet, but it does seem to run well enough at least.
Re: Weird SNES Glitches on Certain Games
by on (#157582)
Sik wrote:
Well...

Of course that probably fails to account for any still undocumented behavior yet, but it does seem to run well enough at least.

Nice! Looks like it's still getting worked on too:
http://pgate1.at-ninja.jp/SNES_on_FPGA/

Hope it turns into something we can all use :)

I saw that Super Famicoms are actually cheaper to import than SNES's are to buy online and locally :p I read that the main differences are the RF adapter and the power supply; I have a 9V (center negative) power supply from a guitar pedal and I wouldn't use RF. From what it looks like they're pretty similar size wise too. Would a Super Famicom board fit in a SNES shell?
Re: Weird SNES Glitches on Certain Games
by on (#157583)
Terrifying about the CPUs.

Even though we have that very well emulated (can count the 'known-unknowns' on one hand), it's a necessary component for software-based reverse engineering of the rest of the chips. And that's the only kind of RE work I am capable of doing. And god knows the PPU needs a whole lot more RE work done.

> http://pgate1.at-ninja.jp/SNES_on_FPGA/
> Hope it turns into something we can all use :)

The author of that one is Japanese, so nobody's ever going to see the source for it.

> I saw that Super Famicoms are actually cheaper to import than SNES's are to buy online and locally

The last time I was in the market, you were looking at about $30-40 (shipped) either way. With outliers trying to get $50 out of you (local game shops, easy to haggle back down to $40.)

However, the AC adapter guys gouge the hell out of you. Asking $20 per adapter + $15 shipping per adapter. I'm just going to go the generic route.

Has this changed recently?
Re: Weird SNES Glitches on Certain Games
by on (#157584)
byuu wrote:
The last time I was in the market, you were looking at about $30-40 (shipped) either way. With outliers trying to get $50 out of you (local game shops, easy to haggle back down to $40.)

However, the AC adapter guys gouge the hell out of you. Asking $20 per adapter + $15 shipping per adapter. I'm just going to go the generic route.

Has this changed recently?

You're about right for the SNES, usually one in decent shape is around $40. I'm seeing the Super Famicom less than $30 shipped though! Local places have been from $65 to $80.
I've been seeing original adapters around $20 shipped which is still kinda crazy.
Re: Weird SNES Glitches on Certain Games
by on (#157597)
I have an old SNES that behaves oddly. The Mode 7 map in F-Zero is corrupted, so that you're driving on random terrain instead of track, and of course you rapidly run out of power and blow up. Super Mario Kart has no such issue, but the Mode 7 graphics at the victory podium (the fish and the congratulations) don't appear. Super Metroid doesn't display the map properly, and there are crucial powerups simply missing, making the game unwinnable. Yoshi's Island displays garbage background graphics, but is otherwise playable. Gradius III seems to work fine. My Super Everdrive doesn't work at all; it just displays an error message.

I haven't opened it up yet to take a look (I don't have the tool); I simply bought a new one. I was hoping it could be a leaky cap, because that sounds fixable, but now I'm wondering if there could be something wrong with the CPU...

SnoopKatt wrote:
It's a shame new ASIC's are so expensive to make, it'd be great to make new CPU's :(

How expensive would it be exactly? Would a "Structured ASIC" approach help, or is the likely spec mismatch too great? I've been wondering what it would take to make new Super FX chips for use in homebrew, and if S-CPUs have a noted tendency to fail, it would be great to be able to replace them with new units.

Any chance of warehoused chips still existing?

There wouldn't be any patent issues with cloning SNES components, would there? It's been well over 20 years since the system was released, but apparently at least one NES patent was issued in 1995, so...

tepples wrote:
Perhaps the way forward is to get a working S-CPU, S-PPU1, S-PPU2, S-SMP, and S-DSP decapped, delayered, traced, and into an FPGA.

How would an FPGA compare with a new ASIC in terms of user-friendliness, robustness and service lifetime?

I gather you're talking about whole-system replacement, which seems like a great long-term solution as it would remain possible for anyone to build Super Nintendos indefinitely as long as the hardware description file remained available. But is there no middle ground between throwing out your old busted SNES and, well, throwing out your old busted SNES?
Re: Weird SNES Glitches on Certain Games
by on (#157600)
Quote:
> http://pgate1.at-ninja.jp/SNES_on_FPGA/
> Hope it turns into something we can all use :)

The author of that one is Japanese, so nobody's ever going to see the source for it.

How about just sending him a Google translated email? The author even said that they looked on superfamicom.org for technical information, so they must be able to at least make out English, unless they where reading the one Japanese article on that website. Thinking about it, it really is fairly bizarre how little Japanese people seem to be involved in this sort of thing, especially considering this stuff came from Japan to begin with.

Anyway, with weird behaviors that people have been describing with their SNESs, has anyone ever thought of messing with BSNES or something to try and recreate the problem to tell you what's wrong, or is that just impractical? Speaking of BSNES, could you not just use that to copy the SNES's CPU onto an FPGA, or at least create something that acts exactly the same but is different internally?

(In fact, FPGAs seem to be a good way you could make a near %100 accurate handheld console, like the Sega Nomad, except not a brick.)
Re: Weird SNES Glitches on Certain Games
by on (#157602)
93143 wrote:
How expensive would it be exactly? Would a "Structured ASIC" approach help, or is the likely spec mismatch too great? I've been wondering what it would take to make new Super FX chips for use in homebrew, and if S-CPUs have a noted tendency to fail, it would be great to be able to replace them with new units.

I think a full replica would probably be somewhere in the 6 figures for just one tape-out from what I've read (but correct me if I'm wrong, as circumstances may be different for this, especially as it's pretty old). Chances are though that since it was a larger, older process it may be cheaper to do but it depends if someone wants to chop it open and scan it with an electron microscope or hook it up to a logic analyzer and read what it does. FPGA replication would just take a lot of research and time, but no actual large upfront cost for hardware.
Re: Weird SNES Glitches on Certain Games
by on (#157612)
Standard disclaimer that generalizations don't apply to everyone, so please save your PC outrage ;)

> How about just sending him a Google translated email?

I can write in better Japanese than Google generates, but yeah, no point.

It's a strong cultural divide. They never really had a strong OSS movement in Japan, so their software community is much like ours was around the mid-'90s (I know the FSF was around longer, but it didn't really pick up until the early '00s or so.)

> it really is fairly bizarre how little Japanese people seem to be involved in this sort of thing, especially considering this stuff came from Japan to begin with

Another cultural divide. They don't tend to care much about preservation. We almost lost the entire Satellaview history. And Japanese games have been dumped so infrequently that we are still finding instances of hacked ROMs (namely copier protections removed) even to this day.

Japan is about as different a culture from ours as is humanly possible. It's so extreme that you'd swear it was all intentionally set up to be as different as it could be, even though it clearly just happened to turn out that way (through isolation, etc.)

> Speaking of BSNES, could you not just use that to copy the SNES's CPU onto an FPGA, or at least create something that acts exactly the same but is different internally?

FPGAs don't work anything like C++ computer programs, so unfortunately not.

The info could help (and I'm sure the source will be referenced if anyone tries this), but it'd be a total rewrite.

Speaking for myself, the only way I'd ever use an FPGA SNES was if a real, working system was over $400 and I didn't have any working consoles myself anymore. And even then, only for the extreme games that need to avoid the latency overhead of a PC emulator. But, I'm still all for saving as many decks from total destruction as possible, so hopefully someone will make an FPGA CPU replacement some day.
Re: Weird SNES Glitches on Certain Games
by on (#157629)
(;゚ω゚)

Don't try to do anything weird, period. If anything, I'll just go contact him (in fact, he follows me back on Twitter =P I'm somewhat known in the circle over there). Not gonna ask about the source code but I'll ask him what he intends to do with the project itself.

By the way, the source code is in SFL, not VHDL or Verilog. Have fun.

PS: also, can we check if there's something in common with all these systems with these weird failures? For all we know it could be just a few bad batches of the chip.
Re: Weird SNES Glitches on Certain Games
by on (#157630)
byuu wrote:
> it really is fairly bizarre how little Japanese people seem to be involved in this sort of thing, especially considering this stuff came from Japan to begin with

Another cultural divide. They don't tend to care much about preservation. We almost lost the entire Satellaview history. And Japanese games have been dumped so infrequently that we are still finding instances of hacked ROMs (namely copier protections removed) even to this day.


Haha true, Square lost the FFVII source code XD

Sik wrote:
Don't try to do anything weird, period. If anything, I'll just go contact him (in fact, he follows me back on Twitter =P I'm somewhat known in the circle over there). Not gonna ask about the source code but I'll ask him what he intends to do with the project itself.

By the way, the source code is in SFL, not VHDL or Verilog. Have fun.

PS: also, can we check if there's something in common with all these systems with these weird failures? For all we know it could be just a few bad batches of the chip.


That would be great if you could contact him, thanks!

Hmm, DogP has a pretty good sample of broken chips, so first thing might be to decipher the date codes and see when they were made. Does anyone know what the numbers and letters mean below the 5a22 text?

Shame the similar 65C816 can't drop in (doesn't even have half the pins of the 5A22!), or that there isn't anything that is somewhat compatible.
Re: Weird SNES Glitches on Certain Games
by on (#157635)
Reminder that the date alone is not enough, you need to find out a way to check if they were manufactured in the same place too. I know Sega sourced their chips to multiple factories, I imagine Nintendo most likely did the same.
Re: Weird SNES Glitches on Certain Games
by on (#157637)
SnoopKatt wrote:
Would a Super Famicom board fit in a SNES shell?

I'm pretty sure the motherboards are the same between the two (though there are several versions of the board)... though yeah, the power connector is different, and maybe RF as well (never tried).

byuu wrote:
> I saw that Super Famicoms are actually cheaper to import than SNES's are to buy online and locally

The last time I was in the market, you were looking at about $30-40 (shipped) either way. With outliers trying to get $50 out of you (local game shops, easy to haggle back down to $40.)

SNES systems seem to have gone up quite a bit lately... I was trying to buy some to harvest CPUs from, but they were just too expensive. I ended up buying 10 working SFCs from Japan instead (along with quite a few broken SNES motherboards, with mixed results).

I bought from this seller (shipping is literally the "slow boat"... takes ~2 months by boat from the Port of Kawasaki):
Qty 10 @ $15.50 ea.: http://www.ebay.com/itm/161866714592
Qty 100 @ $12.00 ea.: http://www.ebay.com/itm/161848416229
Qty 1000 @ $9.50 ea. O_O : http://www.ebay.com/itm/161850146570

93143 wrote:
I have an old SNES that behaves oddly. The Mode 7 map in F-Zero is corrupted, so that you're driving on random terrain instead of track, and of course you rapidly run out of power and blow up. Super Mario Kart has no such issue, but the Mode 7 graphics at the victory podium (the fish and the congratulations) don't appear. Super Metroid doesn't display the map properly, and there are crucial powerups simply missing, making the game unwinnable. Yoshi's Island displays garbage background graphics, but is otherwise playable. Gradius III seems to work fine. My Super Everdrive doesn't work at all; it just displays an error message.

If you're able to, I'd recommend running the Burn-in cartridge to see what the self-test says. It does sound like a CPU problem IMO though.

SnoopKatt wrote:
Hmm, DogP has a pretty good sample of broken chips, so first thing might be to decipher the date codes and see when they were made. Does anyone know what the numbers and letters mean below the 5a22 text?

My sampling may be a bit biased, since a good chunk of those chips came from Nintendo Super System motherboards, which was probably fairly low production and short time span (especially compared to the SNES). I think every Super System motherboard I've come across had a Rev A CPU. A lot of the SNES motherboards also had Rev A, though quite a few also had the original (no marking). I've only had a few Rev B... though I haven't seen a bad Rev B yet. If you look at the pic of the 24 CPUs, 21 are Rev A.

I also wonder if the abundance of Super System failures are caused by arcade life, more than just age. For example, the SNES/SFC have a 7805 regulator to give clean regulated voltage to the board. The Super System runs directly off the +5V from an arcade switching power supply, which is on the other end of 5 feet of wire and several connectors, is user adjustable, drifts over time, etc. So, rather than a nice +5V regulated on the board, it could be getting 4.5V or 6.5V (nobody thinks to check/adjust the voltage unless it isn't working). And in the arcade, they were left on for 12+ hours every day. I know one guy that sent me his motherboard said his voltage was adjusted to 6.5V... his ended up only having a bad PPU1 (games played fine, but graphics were all blocky and had wrong colors).

DogP
Re: Weird SNES Glitches on Certain Games
by on (#157642)
DogP wrote:
I bought from this seller (shipping is literally the "slow boat"... takes ~2 months by boat from the Port of Kawasaki):
Qty 10 @ $15.50 ea.: http://www.ebay.com/itm/161866714592
Qty 100 @ $12.00 ea.: http://www.ebay.com/itm/161848416229
Qty 1000 @ $9.50 ea. O_O : http://www.ebay.com/itm/161850146570


Wish I had a use for 1000 Super Famicoms XD That's so cheap! I heard a lot of it is because they're not into the retro phase as much as everywhere else is at the moment (if I could count my NES scores from 15 years ago :p ), so they're exporting way more than selling locally. Maybe switching out the board with a rougher SFC will be the best way to get up and running again.

DogP wrote:
My sampling may be a bit biased, since a good chunk of those chips came from Nintendo Super System motherboards, which was probably fairly low production and short time span (especially compared to the SNES). I think every Super System motherboard I've come across had a Rev A CPU. A lot of the SNES motherboards also had Rev A, though quite a few also had the original (no marking). I've only had a few Rev B... though I haven't seen a bad Rev B yet. If you look at the pic of the 24 CPUs, 21 are Rev A.

I also wonder if the abundance of Super System failures are caused by arcade life, more than just age. For example, the SNES/SFC have a 7805 regulator to give clean regulated voltage to the board. The Super System runs directly off the +5V from an arcade switching power supply, which is on the other end of 5 feet of wire and several connectors, is user adjustable, drifts over time, etc. So, rather than a nice +5V regulated on the board, it could be getting 4.5V or 6.5V (nobody thinks to check/adjust the voltage unless it isn't working). And in the arcade, they were left on for 12+ hours every day. I know one guy that sent me his motherboard said his voltage was adjusted to 6.5V... his ended up only having a bad PPU1 (games played fine, but graphics were all blocky and had wrong colors).


True, forgot you mentioned they came out of arcade systems. Opens up a lot more variables.
For mine, while it did have a fair amount of usage back when it was newer (probably 2 hours a day?), after the N64 and Gamecube came out it wasn't used too much, so overall it probably didn't have as many hours compared to others. Definitely wasn't under the stress that yours were under, and storage conditions were always good (usually a cool, dry box/cabinet). I'll open mine up and see what CPU it has.
I know it's a bit rarer but I don't seem to be able to find any broken SNES Jr's nearly as easily. Has anyone heard of those dying?
Re: Weird SNES Glitches on Certain Games
by on (#157645)
SnoopKatt wrote:
I'll open mine up and see what CPU it has.

If you have The Lion King game, you don't have to: https://tcrf.net/The_Lion_King_(SNES)

SnoopKatt wrote:
I know it's a bit rarer but I don't seem to be able to find any broken SNES Jr's nearly as easily. Has anyone heard of those dying?

To be honest, I've seen plenty of SNESs before, but I've never seen a dead one in person. I've never even seen an SNES Jr. in person.
Re: Weird SNES Glitches on Certain Games
by on (#157653)
Espozo wrote:
If you have The Lion King game, you don't have to: https://tcrf.net/The_Lion_King_(SNES)

Neat! Thanks for the info. Unfortunately I don't have it :(

I popped it open and it's a Rev A
Attachment:
snes cpu.jpg
snes cpu.jpg [ 183.27 KiB | Viewed 2659 times ]

Attachment:
snes open.jpg
snes open.jpg [ 289.82 KiB | Viewed 2659 times ]
Re: Weird SNES Glitches on Certain Games
by on (#157655)
Wait a minute, I just told you to put a game into your broken SNES, didn't I... :lol:

Well, maybe it would have worked, considering is partially works. Does anyone actually know how you can detect CPU/PPU1/PPU2 version through software? I wonder what gets shown up on emulators.
Re: Weird SNES Glitches on Certain Games
by on (#157656)
Espozo wrote:
Wait a minute, I just told you to put a game into your broken SNES, didn't I... :lol:

Well, maybe it would have worked, considering is partially works. Does anyone actually know how you can detect CPU/PPU1/PPU2 version through software? I wonder what gets shown up on emulators.

No worries; it probably has a 50/50 shot of booting up :p
There is the SNES Burn-in Test Cart, but looking around even a repro is pretty expensive. I am thinking about buying INL's Kazzo + SNES board.
Re: Weird SNES Glitches on Certain Games
by on (#157657)
fullsnes wrote:
U1 100pin Nintendo, S-CPU A, 5A22-02, 2FF 7S ;CPU (ID=2 in 4210h)
U2 100pin Nintendo, S-PPU1, 5C77-01, 2EU 64 ;PPU1 (ID=1 in 213Eh)
U3 100pin Nintendo, S-PPU2 B, 5C78-03, 2EV 7G ;PPU2 (ID=3 in 213Fh)
Re: Weird SNES Glitches on Certain Games
by on (#157658)
Found this:

5A22-01:
http://www.alibaba.com/product-detail/- ... 49509.html

5A22-02:
http://www.alibaba.com/product-detail/5 ... 43811.html

Not sure if these guys are full of it, but it is interesting. Someone on AssemblerGames got some S-WRAM chips from alibaba:
http://assemblergames.com/l/threads/so- ... res.55716/

I sent them an inquiry about a 5A22-02, so if I can buy one (or a few) I will! I have access to a good reflow station so I could swap them out.

Edit: Someone possibly tried though from that thread:
Quote:
I tried getting my hand on spare SNES CPUS and did find some sellers who claimed to have them but they were mostly asking too high a price. Like I am going to pay 30 USD for a snes CPU when you can get a working spare console at that price.
One seller however offered them at 5$ If I purchase 10 or more but they insisted on Western Union for the payment and refused paypal. So yeah, red flag, I did not buy.


Another edit: Seems searching 5a22-01 or 5a22-02 will actually lead to a few different vendors! Hopefully they'll respond with a workable price :)

I ended up buying a Super Famicom from a guy on AssemblerGames. I'll probably just do a board swap, but if the Super Famicom is in ok condition I might just grind off the lockout tabs (so I can play NTSC-U games on it) and call it a day. I'll still see if I can get a replacement CPU for the old board though!
Re: Weird SNES Glitches on Certain Games
by on (#157755)
I emailed (what I thought were) a bunch of different companies and it appears that there's only two suppliers! One wants $40 per CPU and the other wants $74 per CPU! Guess I'm doing the board swap lol.
Re: Weird SNES Glitches on Certain Games
by on (#159206)
For those interested, I did a board swap with an inexpensive Super Famicom (Rev B CPU, yay!) I got from someone in Japan (DeChief on Assemblergames). The PCBs (not counting the back plate or jackss) seem to be completely identical. The only real electrical differences on the boards (as mentioned by others) were the DC jacks and the RF modulators. I left those since I could use a Sega Genesis Model 1 power adapter and I don't care about RF :p

The fit is almost perfect. As seen in the pictures, there's a slight shaping difference that I didn't notice until I installed the SNES PCB in the Super Famicom since one corner wouldn't fit. This can be easily fixed by just switching out the back plastic pieces though. But yeah, pretty painless and took 10-15 minutes!