Language…
17 users online: caioskii, Chambo, Dark Prince,  Deeke, Ekimnoid, ForthRightMC, Fozymandias, Gorry, JezJitzu, LadiesMan217, Mischievous Marc, NewPointless, Rauf, Raychu2021,  Ringo, sinseiga, The_Uber_Camper - Guests: 263 - Bots: 255
Users: 64,795 (2,375 active)
Latest user: mathew

Anyway to hack a NES game to make it run on SNES?

I think someone told me that it is possible to port over a NES game to make it run on the SNES and I was interested in this process.

For example, I believe that SMW and Zelda 3 started their lives out as NES games, but as the SNES drew near Nintendo ported them over to the SNES platform.

While I'm not an expert on the processor of the NES vs the SNES. From what I understand, the two share many similarities. Doesn't the SNES have a NES 8-bit mode on it somewhere?

Another example is Super Mario All-Stars. Here we get to play the 4 Mario NES games on the SNES. My question is... how did Nintendo do this? Did they have to code Super Mario Bros 3 from scratch to make it run on the SNES or did they do kind of like a port?

I remember playing some game on my SD2SNES which said something like "NES hack" or something like that. When I played the game, it was like an NES game, but only running on the SNES. As if someone converted an NES game to make it compatible with the SNES.

Anyways if anyone knows any info on this, let me know.

Thanks


The 65c816 chip does have a processor bit for "emulation mode", which causes it to process opcodes the same way the NES does... but barely anything else on the system works with it. As far as I know, the SNES was originally intended to be backwards compatible, but that was probably scrapped at some point. Absolutely no SNES games use emulation mode past the first few opcodes on startup.

So, at least natively you're unlikely to get an NES game running on the SNES... but as it turns out, there actually is a (unliscensed) periphial for the SNES that lets you kinda play NES games on your SNES, though technically they don't run off the SNES itself, just a pseudo-NES built into the periphial.

But yeah, SMAS was a complete rewrite of the original games. 6502 assembly is pretty similar to 65c816 anyway so they really only had to read through the code and upgrade it a bit.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
I knew about the NES to SNES adapter, but the one that I have requires you to pass through audio directly to the TV.

I'll see if I can't find that game where its like an NES game but only running on the SNES.

I'm really interesting in the whole taking an NES game and then upgrading some of the code to make it compatible with the SNES.

There is this game engine called the NESmaker which allows you to create NES games. I want to know how hard it would be to upgrade the NES code and turn it into a SNES game. Why? Because I just love the SNES. I would assume you would need to completely redo the sound engine and such.
Quote
Anyway to hack a NES game to make it run on SNES?

This was actually done before by p4plus2. Refer to the following video:

https://youtu.be/YHyaTCuZRzM?t=307 around 5:30.

I've never done something like this before, so feel free to correct me, but I imagine there are a few details the hackers should be aware of when attempting this:

- All PPU writes on the NES will have to be rewritten for the SNES, as the registers are mapped and behaving differently.
- Game can run in mode 0 but isn't necessarily restricted to this (one can simply convert the 2bpp NES graphics to 4bpp SNES, for example)
- Sprites still remain 4bpp so you will have to deal with those eventually anyway, as BG modes don't affect sprites
- There's no NES sound engine for the SNES as far as I know. You'll either have to write one from scratch, rip an engine from another game, or use addmusic's engine. Addmusic engine sounds like the best solution as you will have access to custom music on this site.
- Running the port in emulation mode probably is useless, as the SNES is backward-compatible with the NES anyway. In fact, you could optimize the NES ROM to make use of the 'new' 65816 opcodes. For example, to push X and Y to the stack, you won't have to transfer them to A anymore (as you can only push A on the NES)
- There are certain NES mappers which utilize bankswitching to access more data, as the NES doesn't have 24-bit addressing. Such games would have to have their codes rewritten to allow usage of the 24-bit addressing of the SNES (as the SNES doesn't have bankswitching by default).

Quote
Another example is Super Mario All-Stars. Here we get to play the 4 Mario NES games on the SNES. My question is... how did Nintendo do this? Did they have to code Super Mario Bros 3 from scratch to make it run on the SNES or did they do kind of like a port?

As the disassembler of Super Mario All-Stars I can confirm (for SMB1 at least) that some codes from the NES are re-used. Some RAM addresses are a perfect match across both NES and SNES versions, e.g. $0660 in NES becomes $0660 on the SNES (thus $7E0660).

However, they also added a lot of new code mainly for the aesthetics. For example, podoboos on NES SMB1 don't have lava trails and splashes. On the SNES, they do. There's also code for windowing HDMA, DMA, setting up the SPC-700 engine, and so on.

You can conclude that porting an NES game to the SNES has a lot more manual work involved than you might think. If you really were to give this a try, I would try to stick with extremely simple (in the sense of NES mappers) NES ROMs.
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)


Originally posted by Ersanio
Quote
Anyway to hack a NES game to make it run on SNES?

This was actually done before by p4plus2. Refer to the following video:

https://youtu.be/YHyaTCuZRzM?t=307 around 5:30.

For what it's worth, that was also a rewrite. Some of the game had to be rewritten and optimized anyway due to needing it to run in RAM.

e: p4 corrected me that it is mostly original code, but with a number of tweaks to make it run on SNES (mostly PPU related).

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Hmm, I didn't think of the fact that this was run on RAM. I suppose it's "easier" to run it in the ROM though but still you'd still need to rewrite most (PPU) routines either way.
My blog. I could post stuff now and then

My Assembly for the SNES tutorial (it's actually finished now!)
Quote
You can conclude that porting an NES game to the SNES has a lot more manual work involved than you might think. If you really were to give this a try, I would try to stick with extremely simple (in the sense of NES mappers) NES ROMs.


The NES Maker program that's in the works in terms of development supports NES mapper 30 by default. Mapper 30 has bank switching. The engine uses this for animated tiles. Many emulators don't even support this mapper yet.

However, alternatively the engine also allows the use of NES Mapper 2, which is a pretty common mapper.
Wrecking crew was ported to snes aswell.