32 ms·
How SNES emulators got a few pixels from complete perfection
- deleted 7y ago[deleted]
- lidHanteyk 7y agoIt is interesting to me how some systems are easier to emulate than others, and the ease of emulation seems to correlate somewhat with ease of programming model. The infamous example which comes to mind even far beyond the SNES is of course the Sega Saturn, while on the other end of the spectrum, Dolphin has support for multiple consoles at once.
- sprayk 7y agoDolphin has support for two consoles: Gamecube and Wii. It supports both of them because the architectures are extremely similar. I don't get what you mean by "ease of programming model". Saturn/Playstation/N64 were the first to have games programmed primarily in C with libraries provided by the system developers. This generation is harder to emulate simply because the system architectures contain more chips connected with wider buses running at much higher clock speeds. All of those factors make low level analysis, like with a logic analyzer, impractical. Another factor is the popularity of the system and level of interest in emulation of the system. The original XBox is a good example of this. Gamecube and PS2 have much more polished emulators because they have more titles that interest people, while little effort is spent on emulating the original Xbox (despite being essentially a PC) arguably due to the lack of exclusive titles to make it worth it.
- Polylactic_acid 7y agoNintendo consoles seem to always have the best emulators, likely due to being almost all exclusive games. Every nintendo console recently has had a working emulator before the end of the consoles life. I remember nintendo ds emulators adding support for games that had only just come out.
- thristian 7y agoThe other reason Nintendo consoles have the best emulators is because Nintendo generally avoids cutting-edge technology, or at least they prioritise "simple" and "cheap" over CPU and GPU performance. Apart from the latest consoles (the Wii U and the Switch), the worst-emulated Nintendo console is the Nintendo 64, which also had the strangest hardware (RAMBUS RAM, a general-purpose GPU, etc.)
- ridv 7y agoOn that note about the N64, there is a project (created by a friend of mine in college) that is looking to go down the cycle accurate route that the Byuu has gone down with higan. It's called CEN 64 and can be found at https://github.com/n64dev/cen64 https://github.com/n64dev/cen64 Lots of work that still needs to be done but it's quite impressive!
- delroth 7y agoCounting the GameCube and the Wii as two consoles is kind of cheating, the Wii is barely more than an overclocked GameCube with an irrelevant OS running on the side exposing some I/O through a fairly well defined I/O interface. The hardest part of emulating a Wii is emulating a GameCube. Dolphin is also nowhere close to the accuracy of emulators like bsnes. There are many games that plain don't boot, mysterious bugs that have resisted debugging for years and years (some game breaking, e.g. if you have too many characters unlocked you cannot finish Fire Emblem Radiant Dawn on Dolphin), etc.
- aidenn0 7y agoI played SNES games emulated on a 66MHz 486/DX2 using an emulator named "esnes". No sound[1] and translucency was more miss than hit, but good enough to play through the entirety of ChronoTrigger. It was pretty cool to play a current (if aging) system emulated on a PC. 1: Sound was eventually implemented, I don't remember if it was before or after I upgraded to a Pentium though.
- tomc1985 7y agoDid the same, with ZSNES running on Win95. Sound was disabled and I'd toggle layers on and off since transparency killed the framerate. Sometimes, when my parents weren't home, I'd copy my saves onto a floppy and boot the game up on the family Pentium 166 for sound and full FX. But I beat most of the game on my 486!
- RichiH 7y agoThe savegame support of ZSNES and the easy way to hex edit memory are still fond memories of mine.
- kingbirdy 7y agoIf you found this interesting, the author's website has a number of informative, in-depth articles about emulator development & console architectures: https://byuu.net/ https://byuu.net/
- TAForObvReasons 7y agoNintendo Switch Online subscription includes an "official" SNES emulator. How does it compare to BSNES, and would a decompilation of the emulator help with resolving the PPU issues?
- delroth 7y agoNintendo's emulators are usually equivalent to what the state of the art was 15-20 years ago. They have plenty of bugs, usually fixed with duct tape and game specific hacks. They are designed to run the set of games they sell and nothing else -- once you get out of what the QA team has explicitly tested, it's not uncommon to find unemulated or badly emulated hardware features.
- kingbirdy 7y agoWhile all of Nintendo's official emulators are afaik made internally, it's interesting to note that Sony used an existing open source emulator (PCSX ReARMed) for their Playstation Classic. https://arstechnica.com/gaming/2018/11/sony-using-open-source-emulator-for-playstation-classic-plug-and-play/ https://arstechnica.com/gaming/2018/11/sony-using-open-sourc...
- jldugger 7y ago> While all of Nintendo's official emulators are afaik made internally I believe the consensus is that the NES classics on GBA were done using an open source emulator. The emulator itself was liberally licensed and I think someone asked the author's thoughts and they were 'ya, that's half the purpose of the license. i don't care'
- derefr 7y agoAlso, when you think about it, if a game behaves differently when run in an emulator, as part of an emulator-and-ROM bundled software product released by Nintendo... then that behavior is just how that particular release of the game has been canonically chosen to behave. Any bugs in the emulation of a Virtual Console title, or a SNES Classic title, or a SNES Online title, are just "how that version of the game is." Much like any typos in a particular printing of a book are "just how that release of the book is." They're now part of the authorial intent of that release; part of the text. If you later ported that game, you'd seek to be bug-for-bug compatible with the bugs introduced by that emulator, because those bugs are what Nintendo released, and so those bugs are now, in part, what it means to play that game. Or, to put that another way: there's no real difference between a bug introduced by wrapping a game in an imperfect emulator, and a bug introduced during recompilation/porting/remastering of the game. Either way, you now have a new "variant" of the game with its own bugs, but one which is also a canonical, supported release of the game. Interestingly, sometimes—because of one of these slight variances—the fastest [and so preferred] version of a game to speedrun, is a Nintendo-sanctioned emulated (e.g. Virtual Console) release of the game. It says something important, I think, that these releases of the game aren't automatically shunned by the speedrunning community, the way that runs of the game under an arbitrary emulator on someone's PC would be; but rather are just treated as their own separate category-set, in the same way the speedrunning community differentiates different region releases, or version releases, or port/remaster releases.
- FillardMillmore 7y agoInteresting tangent from the article: >Today, SNES emulation is in a very good place. Barring unusual peripherals that are resistant to emulation (such as a light-sensor based golf club, an exercise bike, or a dial-up modem used to place real-money bets on live horse races in Japan), every officially licensed SNES title is fully playable I had to look up the 'dial-up modem' reference - apparently it's a Japan-only peripheral called the "Famicom Network System" that did in fact have software available that allowed for bets to be placed on live horse races. https://en.wikipedia.org/wiki/Family_Computer_Network_System https://en.wikipedia.org/wiki/Family_Computer_Network_System http://niwanetwork.org/wiki/JRA-PAT http://niwanetwork.org/wiki/JRA-PAT
- Zenbit_UX 7y agoNintendo had dial up modems and their own intranet in 37% of Japanese households in the mid 80s? How did I not know this was a thing.
- hkmurakami 7y agoSNES was 90s iirc?
- FillardMillmore 7y agoYes, I believe it was, but this peripheral and the software was (unless I read or interpreted incorrectly) designed for the original NES. (There is a note that there were remakes of the horse race betting software for SNES and Dreamcast)
- Zenbit_UX 7y agoNot the Famicom according to GPs wiki.
- gryson 7y ago>Nintendo had dial up modems and their own intranet in 37% of Japanese households in the mid 80s? That Wikipedia link says that the Famicom (NES) was in 37% of households. Nintendo only shipped 130,000 modems, a tiny percentage of the total Famicom units sold.
- userbinator 7y agoAnd so the final, most extreme approach, would be to expand upon our decapping efforts. We have 20x die scans, but the resolution is not enough to make out and reconstruct individual logic circuits from them, such as was done with the Visual 6502 project. That was done with the NES too: https://github.com/SourMesen/VisualNes https://github.com/SourMesen/VisualNes
- lukevp 7y agoI haven’t heard about this, thank you for the link!
- Cyberdog 7y ago> It combines both simulators into a single simulation and allows the simulation to run NES roms (albeit at roughly 1/1000th of the speed of a real NES) What is this emulator doing that causes it to emulate so slowly? Even if it's doing perfect emulation, are modern processors still so slow that they can't emulate a couple 35-year-old processors at something closer to real time?
- deleted 7y ago[deleted]
- zeta0134 7y agoVisual 6502 emulates the CPU not just at a logical level (performing equivalent instructions) but at a silicon level, simulating each transistor in the original chip at an electrical level as closely and as accurately as possible. This is far more intensive, as there's a whole bunch of state to maintain and thousands upon thousands of tiny components that need to remain in perfect sync. Of course the goal here is not to run the processor at anything resembling real-time speeds. Quite the opposite; the developers have created a marvelous way to slow down the components so that humans can observe each tiny step, which normally takes a fraction of a fraction of a fraction of a second on the physical chip.
- deleted 7y ago[deleted]
- 7y ago
- nullc 7y agoIt's sad that Nintendo doesn't seem to see this as an opportunity to earn free press and goodwill by simply releasing all the design documents, mask images, etc. The community is going to get there eventually without their help, but they could probably make it much faster and cheaper to get there. Doubly so because they sell products which almost certainly benefit from these open source emulation efforts.
- kingbirdy 7y agoNintendo is still actively selling SNES games via Nintendo Switch Online, and as far as I know rolls their own emulator(s) for this rather than using existing open source ones as Sony did for the PS Classic, so I doubt this will happen any time soon.
- 0x00000000 7y ago> using existing open source ones as Sony did for the PS Classic That’s interesting, I wonder if that is the case the for the PS1 emulator on the PS3/Vita used for the PlayStation Classics titles
- rossy 7y agoI think that's a proprietary in-house emulator known as POPS. The fact that Sony already had an in-house PlayStation emulator for the ARM-based Vita makes their decision to use something else for the PS Classic a bit strange.
- monocasa 7y agoI imagine some third party approached Sony with a "we'll do the work, take the risk, etc. You just give your blessing, tell us who do we need to contact for final approval to make sure the brand is being well represented, and where to send the royalty checks" kind of deal.
- danhor 7y agoWhilst the vita was an arm based system, it also included almost all of the psp hardware for backwards compatability. They simply reused pops from the psp, with no major changes, so it still ran on a mips system.
- geofft 7y agoThe linked story about Higan's NEC uPD772x emulation being used by Stephen Hawking is pretty amazing, both as a story in its own right and as a parable about the value of open source and code getting used in wildly different contexts from what it was originally designed for: https://www.sfchronicle.com/bayarea/article/The-Silicon-Valley-quest-to-preserve-Stephen-12759775.php https://www.sfchronicle.com/bayarea/article/The-Silicon-Vall...
- xwdv 7y agoCan original SNES hardware play ROMs somehow?
- montecarl 7y agoYes! These are called flash carts (short for cartridge). Here is a popular one for SNES: https://www.amazon.com/dp/B0052URJKM https://www.amazon.com/dp/B0052URJKM Many people who stream older console games on twitch seem to use them as well as people who like to play romhacks.
- 0xcde4c3db 7y agoBack when SNES was still current and flash memory chips were still relatively small and expensive, there were "copiers", which a few SNES enthusiasts still collect just like other vintage peripherals. These are larger devices that contain a floppy drive, DRAM, save RAM, and the necessary logic to provide the most common cartridge mappings. You would dump a cartridge to floppies and then load it into the DRAM to play it. Well-known models include the Game Doctor SF7 and Super Wild Card DX2.
- jldugger 7y agoAlso nintendo just straight up sold people carts you could flash with new games at Seven-Eleven: https://en.wikipedia.org/wiki/Nintendo_Power_(cartridge) https://en.wikipedia.org/wiki/Nintendo_Power_(cartridge)
- willis936 7y agoIf you’ve gone to a pop culture convention in the past few years you will also see reproduction cartridges (repro carts). The first one I saw was a legend of zelda ocarina of time master quest N64 cart, but there are new NES and SNES games that are being written from scratch and sold on repro carts. This wasn’t possible for N64 titles until relatively recently[1]. Interestingly, the method of cracking N64’s boot security sounds rather standard when compared to the 3DS and switch glitching[2][3]. 1. https://youtu.be/z5uOK0nR934 https://youtu.be/z5uOK0nR934 2. https://youtu.be/CzVZgdkzBn8 https://youtu.be/CzVZgdkzBn8 3. https://youtu.be/Ec4NgWRE8ik https://youtu.be/Ec4NgWRE8ik
- Razengan 7y agoI just want to say that some of the most fun I’ve ever had on the PC has been in a SNES emulator. The sheer variety, depth, hours of content, ease of accessibility, and great music has been nearly unmatched on most other platforms. I highly recommend anyone with an interest in games to grab a bunch of ROM packs (including Japanese exclusive games and fan translation hacks) and spend some of your quarantine on the SNES.
- smabie 7y agoEspecially Chrono Trigger! That game is amazing!
- scandinavegan 7y agoI really want it on the Switch! I played the emulated version on PC, and I know it's now available on both Steam (I heard that they fixed the broken early version) and mobile, but it would be very convenient to have it on the Switch. I read that due to licensing it's unlikely to show up in SNES Online, but I don't see why they don't release it as a separate game. They don't need to remaster or remake anything, just release it as is, and I'm sure it would sell well. I would anyway prefer the original with original graphics and soundtrack to a 3D remake or similar.
- scott_s 7y agoThe DS version is an excellent port - much better than the Final Fantasy ports to the GBA, because they didn't have to compromise on the resolution. It's selling for about $55 now. (Yes, I know this is quite different than having it on the Switch, but I mentioned it in case you have a DS and wasn't aware.)
- Razengan 7y agoChrono Trigger will always be one of my all-time favorite stories on any medium. A few other SNES recommendations from the top of my head: • EarthBound (aka Mother 2, another popular RPG with fun music. Combat may feel too grindy/frustrating though) • Super Gussun Oyoyo (Lemmings + Tetris) • Live A Live (RPG where you play characters from multiple timelines) • Pop'n TwinBee (shoot-em-up and platformer with very colorful graphics in a pastelly palette) • Terranigma (RPG spanning multiple eras) • Treasure of the Rudras (Japan-only RPG with fan translation) • Bomberman (hilarious couch PvP) • Pocky & Rocky (cute shoot-em-up with a Japanese folklore theme) • Yoshi's Island (one of the best platformers) There were a bunch of other obscure titles with unique gameplay mechanics that I can't recall the names of at the moment. Will have to comb my ROMs folder.
- ilaksh 7y agoOn the last extreme idea, it seems one thing to do for starters is to get the 100x magnification of the PPUs from someone and put it in the GitHub repo. Then anyone who has the ability to start converting that to VHDL or any sort of identification of components can start on part of it and contribute to the repo. With some started, it may be possible for less expert people who have a little bit of VHDL or whatever to contribute to some degree with expert supervision.
- byuu 7y agoHi all, thank you for sharing this article here! It is technically a "laymen's" version of https://byuu.org/articles/edge-of-emulation https://byuu.org/articles/edge-of-emulation (submitted here earlier), meant for a wider audience, but it does elaborate on some new discoveries such as the digital video output testing mode. In the off chance anyone is able to help with this, I've set up a Discord channel (#ars) for coordination here: https://discord.gg/Fx7TfKh https://discord.gg/Fx7TfKh Every member of the bsnes-emu project is on said server. Thanks so much!
- greggh 7y agoI'm sure the answer is no, but I emailed a few people at NERD (Nintendo European Research & Development). Asked the obvious question about the documentation even existing anymore, and if there were any possibilities of it ever being made public. You've probably done that already, but I figured it was worth a shot. I'll update if I actually get a response.
- NobodyNada 7y agoNintendo's official development manual is available at archive.org [0]. However, AFAICT it is rather low-quality and incomplete, and it pales in comparison to the wealth of documentation created by years of reverse-engineering effort from hobbyists like byuu. I imagine that the official documentation was leaked rather than publicly released. Nintendo wants to make money selling re-releases of classic games, so they are extremely unfriendly towards emulator developers. Just look at the all the propaganda on their corporate website: "The introduction of emulators created to play illegally copied Nintendo software represents the greatest threat to date to the intellectual property rights of video game developers [...] Such emulators have the potential to significantly damage a worldwide entertainment software industry which generates over $15 billion annually, and tens of thousands of jobs." [1] [0]: https://archive.org/details/SNESDevManual/mode/2up https://archive.org/details/SNESDevManual/mode/2up [1]: https://www.nintendo.com/corp/legal.jsp https://www.nintendo.com/corp/legal.jsp
- tgsovlerkhgsel 7y ago
- terrycody 7y agoAdmiration to those people like byuu write emulators with their devotion, if without them, we have no today's splendid retro culture.
- smprather 7y agoHas Nintendo released officially, or leaked, the RTL for any of the processors in the SNES? If someone could get their hands on that, then the emulation authors should be able to achieve perfection.
- smprather 7y agoLooks like some people are trying to re-create it at least. https://github.com/srg320/FpgaSnes https://github.com/srg320/FpgaSnes
- NobodyNada 7y agoAFAIK chips from this era were designed and layed out by hand, rather than with an HDL.
- knorker 7y agoError in the article: 32x32bit multiply (i.e. 2^64 bits) is not a "heat death of the universe" thing. It's a lot, yes. Not practical for these purposes. But there's a reason we don't use 64bit encryption. 64bit encryption is easily brute forced. If you want to keep it in a table, sure that's 18 exabytes (multiplied by element size in bytes), but that's before compression. I imagine multiply output compresses very well. And that's a lot of RAM. But not anywhere near "heat death of the universe" amounts. I bet FAANG easily have that much RAM. Each of them.
- jancsika 7y agoIs there any SNES emulator that runs on arm? I've got retroarch v1.3.6 on Stretch on aarch64. It has crashed with a "file not found" and "bus error" for bsnes. Higan segfaults when I try to run it.
- rm445 7y agoNot helpful to you except as an existence proof, but you can install Retropie on a Raspberry Pi and it will play SNES ROMs fine. I believe the emulator is a variant of SNES9x.
- th0ma5 7y agoI've been running it on a Fire stick 4k but in 32 bit mode
- nmz 7y agoretropie runs fine on some arm platforms. you can also use lakka. However the latest retroarch is 1.8.5, while the 1.3.6 version is from 2016, I would imagine nothing would work on Stretch, so I recommend an upgrade or any OS that isn't debian. If in doubt, gentoo always works, though its source based. https://retropie.org.uk/ https://retropie.org.uk/ http://www.lakka.tv/ http://www.lakka.tv/
- intellix 7y agoI'm sure that I was playing Zelda Link to the Past and Super Metroid without any problems about 20 years ago. What's changed since then? I thought this was already solved :) apologies for my ignorance