Sega Master System (SMS) to NES converter: is it possible?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

lancuster
Posts: 83
Joined: Thu Feb 18, 2016 3:20 am

Sega Master System (SMS) to NES converter: is it possible?

Post by lancuster » Wed May 09, 2018 1:01 am

On this console there were a lot of good games worthy of porting to other consoles (e.g. NES). I appeal to knowledgeable people. Is it possible the conversion of the games from this console? If no, why, how systems differ from each other?
See my hacks on Romhacking.net
I added level configs for 102 NES games in CaD Editor

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by tokumaru » Wed May 09, 2018 1:53 am

They're very different. The most obvious difference are the CPUs, but their graphical capabilities are very distinct as well. The 4 bits per pixel graphics give the SMS the edge on color, since each tile can use 16 colors (15 for sprites) as opposed to 4 colors (3 for sprites) on the NES. Differences are far too many, and it's kinda pointless to list them all since automatically translating games would be impossible (if you wanted anything playable). You could probably convert most games manually though, reimplementing the Z80 logic in 6502 and redesigning all the graphics, but that'd be an insane amount of work and the result would almost always look inferior to the original.

Another option that has been discussed before is implementing an entire Master System in the FPGA of a flash cart, and use the NES just for I/O. The graphical capabilities of the NES would still get in the way though, and the proposed solutions didn't turn out that good.

User avatar
nesrocks
Posts: 434
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by nesrocks » Wed May 09, 2018 5:55 am

Would the opposite be feasible? Generate a simple mapper 0 converter to sms?
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by FrankenGraphics » Wed May 09, 2018 6:10 am

If IP for some good SMS titles could be obtained, i don't think the effort is entirely futile. People still play the NES to some extent, while the SMS lacks the same popular status (i'm geographically biased, of course). But it'd still involve lots of work, not least making the graphics look good. Also possible, but about as much manual labour as drawing graphics for an all-new game.

There'd be possibilities expanding on the background music in pleasant ways.


I personally see less point in porting a NES title to SMS as you'd take a game from a system (relatively) many have and use, moving it to a less common system, but if the goal is to simply exercise your brain and have a bit of fun, i guess either would do.

I mean, there's a homebrew that plays mostly like simon's quest for the zx spectrum.
http://www.frankengraphics.com - personal NES blog

User avatar
nesrocks
Posts: 434
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by nesrocks » Wed May 09, 2018 6:40 am

In Brazil people love the sms. I think that the advantage of an automated port of games from the NES to SMS would be that you can then hack the games to have improved graphics (the songs would be a problem though). This is just theoretical anyway, I think that if a converter doesn't do a perfect job from a system to another, whatever systems they may be, then it's probably nothing more than a novelty.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by tokumaru » Wed May 09, 2018 7:24 am

nesrocks wrote:Would the opposite be feasible? Generate a simple mapper 0 converter to sms?
That'd be easier I guess, but still a challenge.

Automatic conversion of 6502 code to Z80 will definitely cause a hit in performance, but if it's a simpler game that has a lot of free time per frame, it might just work.

The background layout can also be a problem, as the Master System is hardwired to what the NES calls "1-screen mirroring". Manually converting a scrolling engine to 1-screen is possible, but doing it automatically is about story. This problem can be avoided if a game without scrolling is used (or if it scrolls horizontally with horizontal mirroring).

Another problem is tile count. The SMS has enough VRAM for 512 tiles, but the same memory is used for tile maps (and possibly sprite attributes, but I'm not sure), so you actually only have 440 tiles or so. The higher color count and the possibility to flip background tiles usually makes up for this, but again, these optimizations have to be done manually.

One more problem I foresee is the lack of hardware sprite flipping on the SMS. Every time a character turns around, new patterns have to be sent to VRAM, and if there are multiple copies of the same object (e.g. enemies) on screen that can face different directions, both versions of the sprite must be in VRAM at the same time, using twice as many tiles, and we'd already be short on tiles.

The SMS was more popular than the NES here in Brazil, but even then I think it makes little sense to do something like this, considering that the quality of the result will probably leave much to be desired.

There is someone doing a manual conversion of Mega Man 2 to the SMS though, and that's really cool, especially if the graphics do eventually receive an upgrade.
Last edited by tokumaru on Wed May 09, 2018 7:26 am, edited 1 time in total.

tepples
Posts: 21752
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by tepples » Wed May 09, 2018 7:26 am

Thank you for the opportunity to point out a few practical problems with the Master System compared to the NES.

Indexing is slow
A 3.6 MHz Z80 might be considered as fast as a 1 to 1.2 MHz 6502. It might keep pace with a 1.8 MHz 6502 at a few things: those where temporaries can go in the BCDEHL registers instead of zero page, limited 16-bit math using HL as an accumulator, and sequential access to large arrays. Things that require random access to the fields of a struct aren't one of them, such as enemy AI. It has an indexed addressing mode that adds a constant offset to the IX or IY register, but using it incurs a penalty of several cycles. (At least it's not as bad as 8080 and Game Boy's LR35902, which lack this mode entirely and thus require pointer arithmetic in software to change a pointer register to point to each field before accessing it.) The 6502 isn't the hottest at structs either, but at least it has an addressing mode suited to striped tables.

No hardware sprite flipping
In order to flip a sprite on Master System and Game Gear, the program must flip the CHR data in VRAM. This is somewhat mitigated by ability to write to VRAM outside vertical blanking. In addition, background-to-sprite priority is associated with each entry in the tile map rather than each sprite, meaning either all sprites or no sprites are behind a given tile.

No vertical scroll changes in split screen
Because the VDP latches the Y scroll at the screen top and maintains separate pointers for the rendering position and the VRAM data port, a game can't use anything like $2006 writes to change the vertical scroll position mid-screen. This means it can't scroll to a bottom status bar. Nor can it render roads with hills like those in Rad Racer without software-rendering the whole road like Road Rash does.

No deep bass
The SN76489 is missing 1/8 and 1/4 duty pulse waves, having only 1/2 duty. It is missing frequencies below about 110 Hz, meaning you lose the bottom octave of 2A03 pulse and the bottom two octaves of 2A03 triangle. Its noise is restricted to just three frequencies unless it takes its period from the (possibly silenced) third pulse channel, in which case it can play either noise at any frequency or the third pulse channel four octaves down at a quite thin-sounding 1/16 duty. But using noise period from pulse 3 starts to smack of SID where one channel has to do both the bass and the drums, and most games appear not to use this option.

No samples
The counterpart to $4011 (raw PCM playback) is more restricted, and there's no DPCM playback.

What you gain:
1. No need for a CIC key in each cartridge, as the BIOS uses a hardcoded string "TMR SEGA" to identify a properly connected cartridge. Instead, only a ROM and a mapper (if the game is bigger than 32K) are required.
2. More colors per tile.
3. No attribute bullcrap with 2-bit values controlling 16x16 pixel areas packed into a byte controlling a 32x32 pixel area.
4. Background tile flipping.
5. Easier to make forest-type things with some tree tiles appearing in front of the playfield. A background tile can cover half of a sprite without having to use the "impossible triangle" priority quirk that Super Mario Bros. 3 uses for sprouting powerups.
6. The 1/16 duty pulse for low (but thin) bass. The NES can't do this, though the Famicom with VRC6 can.
7. Writing to video memory during draw time, at a rate of a few bytes per line.
8. Far longer vblank (192 and 70 lines).
9. Ability to share most code between console (Master System) and handheld (Game Gear) versions of the same game, even if camera handling or some graphics need to be redone.

User avatar
Fisher
Posts: 989
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by Fisher » Wed May 09, 2018 6:14 pm

SMS is certainly a great console and probably we would have seem almost the same competition we saw at the 16-bit era if there wasn't for the exclusivity contracts made by Nintendo.

But I have my doubts if it really was the most sold 3rd gen console here in Brazil, since we had a big amount of NES clones that were cheaper and had lots of equally cheaper pirated stuff sold for it.

I'm not sure if it's possible to know the clone's market share back on the day.
Of course, SMS was sold officially for much more time here than any other 3rd gen console here and also had some great exclusive titles!
That makes me think who really was more popular...

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by tokumaru » Wed May 09, 2018 7:39 pm

I consider the SMS the winner of the 8-bit wars here in Brazil mainly because it was a unified brand. While there were a multitude of Famiclones to pick from, all of them had different names and cartridge designs that weren't always recognized as compatible, and the "Nintendo" brand was nowhere to be seen until the SNES arrived. The "Master System" brand was stronger in this sense, but I can't really say for sure if more people were playing Master System or NES games back in the day.

It really is a shame that Nintendo had that exclusivity contract back then, leaving the Master System with practically non-existent third-party support. That was absolutely dishonest, there was no way SEGA could compete against that. The console is very well designed and could certainly have given the NES a run for its money, had it been pushed towards its limits by multiple developers.

We did get a taste of what the system was capable of during the 16-bit era, with titles like Daffy Duck in Hollywood, Astérix and the Great Rescue and Deep Duck Trouble, which were well beyond the graphical capabilities of the NES. Can you imagine how far this system could've gone if the major game developers weren't running away from it due to Nintendo's scare tactics?

User avatar
Fisher
Posts: 989
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by Fisher » Thu May 10, 2018 1:28 pm

I just imagine how great famous franchises like Megaman, Ninja Turtles, SCAT, Ninja Gaiden, Battletoads and such popular games had a Master System version back in the day.
The later releases of games like Ninja Gaiden and Battletoads in Battlemaniacs sure show that could be an 8bit console war with potential to be as great as the 16bit one!!

User avatar
rainwarrior
Posts: 7676
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by rainwarrior » Thu May 10, 2018 1:34 pm

tokumaru wrote:We did get a taste of what the system was capable of during the 16-bit era, with titles like Daffy Duck in Hollywood, Astérix and the Great Rescue and Deep Duck Trouble, which were well beyond the graphical capabilities of the NES. Can you imagine how far this system could've gone if the major game developers weren't running away from it due to Nintendo's scare tactics?
Thanks for listing these, all three were interesting to look at. (I especially liked the soundtrack for Deep Duck Trouble.)

What do you mean about developers running away from it due to Nintendo? The SMS got new releases for a bit longer than the NES did, despite the Genesis already on the market for quite a while. (Maybe easy cross-development with the Game Gear helped stretch it out too?)

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by tokumaru » Thu May 10, 2018 2:43 pm

rainwarrior wrote:Thanks for listing these, all three were interesting to look at. (I especially liked the soundtrack for Deep Duck Trouble.)
They look great, don't they? Daffy Duck's butter-smooth scrolling and physics really show you don't need a lot of CPU power to deliver a fluid experience. Asterix's large and colorful sprites give the game a great 16-bit vibe. Deep Duck Trouble has a lot of what makes Genesis Disney games great (Quackshot, World of Illusion)... the background art is particularly impressive.
What do you mean about developers running away from it due to Nintendo? The SMS got new releases for a bit longer than the NES did, despite the Genesis already on the market for quite a while. (Maybe easy cross-development with the Game Gear helped stretch it out too?)
Yeah, "running away" probably wasn't the best expression to use here, I meant that developers were avoiding the system, not abandoning it. I guess that the success in Europe and South America motivated some developers to keep pushing SMS titles during a good chunk of the 16-bit era, but the 8-bit wars was already long over.

The Game Gear having achieved some success in North America certainly helped extending the Master System's life, since the only real differences between them are the smaller viewport and larger master palette on the GG, everything else is identical AFAIK.

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by Sumez » Fri May 11, 2018 1:55 am

Fisher wrote:I just imagine how great famous franchises like Megaman, Ninja Turtles, SCAT, Ninja Gaiden, Battletoads and such popular games had a Master System version back in the day.
The later releases of games like Ninja Gaiden and Battletoads in Battlemaniacs sure show that could be an 8bit console war with potential to be as great as the 16bit one!!
Wow, I had no idea there was a Master System Battletoads game! This actually looks better than the SNES version IMO, with a style closer to the original game.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by FrankenGraphics » Fri May 11, 2018 3:10 am

Deep Duck Trouble has a lot of what makes Genesis Disney games great (Quackshot, World of Illusion)... the background art is particularly impressive.
What i thought most impressive was the main character animation. Goes to show what you're able to do with a well designed character with actual personality embeded into its physical being.
http://www.frankengraphics.com - personal NES blog

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Sega Master System (SMS) to NES converter: is it possibl

Post by Sumez » Fri May 11, 2018 3:44 am

This is the first time I've heard Deep Duck Trouble described as great? It looks good for sure, but all I've heard is that it doesn't play well, so I've always avoided it. Was I wrong to do that?

Going by the immediate prequel, Lucky Dime Caper, which is usually the much more well regarded game, I'd say that one is terrible for sure. You spend more time fighting the controls and the actual level design in it.

Post Reply