News:

11 March 2016 - Forum Rules

Main Menu

Converting FDS images to NES?

Started by firedropdl, January 07, 2018, 02:07:43 AM

Previous topic - Next topic

firedropdl

Hey everybody,

I'm running into some huge issues while trying to get FDS games running on a RetroPie system.  The two libretro cores they have for FDS are lr-nestopia and lr-fceumm.  From what I tested so far, I can get 100% of them to work with either one or the other or both.  That's not the issue.

The problem is that each of the emulator cores behave very differently when ejecting/inserting and flipping disks.  Nestopia doesn't give you any on-screen prompts that you're doing anything, so you have to just mash buttons until you luck into it.  Fceumm forces you to use L1 to flip disks and L2 to eject/insert a disk.  That's fine if you have a controller with shoulder buttons, but if you're using a NES style USB joystick you're completely out of luck running FDS games.


This program here allows you to auto-convert a very small number of them: http://www.romhacking.net/utilities/662/

I've been able to convert "All Night Nippon SMB (Untranslated)" and "Clu Clu Land" with it, although I haven't even tested that they work and I assume they won't because it also says I'd have to manually change the mapper it uses, which at this point I have no clue how to do.

Unfortunately, the above program will only convert games with a 32k PRG file and 8k CHR file.  This set of circumstances only seems to happen in 64kb FDS roms, which are probably 10% or less of the titles. 


Has anybody tried to convert the FDS titles to NES before?  Is it way too much effort? 

I know that it would be far easier to change the code on the emulation side, but I'm not a coder.  It hasn't been my experience that it's easy at all to get anybody on the RP team to change anything emulator wise either.  I figured I'd ask here about conversion while I asked over there about fixing the emulators to sync up their functions and always put on-screen prompts so you know what is happening and see if one thing is easier to do than the other in the end.  :)

Thanks!

Psyklax

As someone who's recently translated a bunch of FDS games, I'll bite on this one.

The problem with converting them is that the format is quite different. Regular ROM games are simple: if they don't use mappers, they just have the entire 24/40kb available for the NES to access, and if they do use them, the MMC switches parts of the ROM in and out using certain instructions.

FDS disks are just that: disks, with files like you'd get on a PC. Instead of one big ROM lump, you have different files. Plus there are two sides to store them on, and when the FDS was released it was quite a lot of storage (before MMUs made it redundant) and of course the innate ability to save.

The way the FDS works, it has a BIOS for loading from disks, unlike the NES which doesn't need one. Some games, like Mahjong, whose translation of mine I converted from ROM to disk, will just load the entire game into RAM at the beginning. Others, like Knight Lore, use both sides and have data for each level in different files, which are all transferred into RAM at the same point, overwriting each other. The files can be any size, and can be written to wherever you like in RAM.

This is very different from a ROM using bank switching. MMCs switch banks in certain specific amounts, and it happens instantly. Whereas a file could only be under a kilobyte, a bank has to be at least 4kb, usually more, and is a set size, so often you'll get wasted space.

Not to mention in all this that instructions in the games will point to different locations if you changed to a ROM. It could take a lot of reprogramming to make a larger FDS game work in ROM format, and require one of the more advanced mappers.

At which point you realise that every emulator can play them (even Everdrives can I think) so you wonder what's the point. :D

TL;DR - it's not as easy as you hope.

firedropdl

#2
Hey Psyklax,

Thanks for the informative reply.  I figured that this would probably be the answer I'd get, but the question needed to be asked.  I'm going to have to try to get the RP guys to fix the emulator situation on their end then.  Right now it's a mess and I won't even bother with it.  I just thought after somebody made the suggestion that I might be able to somehow take on this task on my own so the issue would be moot. 

But if you're telling me it's too much work for you to do, then there's no way that a n00b like me is going to figure it out.  :)

BTW, Psyklax.  You might want to make mention that your recent FDS translations use a headered rom.  I've added that info to all the other FDS translations.

I guess it's not super important since it looks like TOSEC has the exact roms you used.  The No-Intro situation is a lot more complex because they strip headers and there's two sets.  I didn't bother getting the No-Intro names for the roms you used since they're not all in No-Intro.  Looks like TOSEC didn't always agree with No-Intro in which version is considered good.


EDIT:  LOL.. nevermind.  I see you took out all the guesswork by making two separate patches and reference that in the readme.  Nice.

BTW... All Night Nippon SMB, Breeder and Knight Lore all work.  :)  I didn't patch or test Mahjong since I'm using the NES version you recently translated instead.

lancuster

I would love to see converted Aliens prototype onto NES. :happy:

Psyklax

Quote from: firedropdl on January 07, 2018, 04:23:27 AM
I see you took out all the guesswork by making two separate patches and reference that in the readme.  Nice.

You ought to have checked before your post. ;)

Also, I know you can get a bit obsessed with CRCs but remember that disk images (they're not ROMs) can have different CRCs for various reasons. The main one is because of the save data, but also different disks can have different write dates. So theoretically you could find two identical FDS disks still in the shrink wrap (as I said, theoretically ;) ) and they could have different CRCs because one was made a day later than the other.

In addition, when we talk of headers, don't forget that FDS files have two types of headers: ones used by the actual disks which have VERY IMPORTANT information stored within, and a totally pointless header which was added when people first started dumping disks. The latter can be removed, which is why I make two patches.

lancuster

"This type of FDS-image cannot be converted.". How to understand this? :(

KingMike

The ones that can be (somewhat) easily converted are those that don't need to be. They are the ones that were essentially re-releases of first-gen cart games.

Unless you already understand very well how NES and FDS programming works and want to spend lots of time re-writing code, you're not going to be able to convert the ones that actually need it.

Even Super Mario Bros. 2 (probably one of the "easier" ones that wasn't a cart re-release) didn't really get a proper fan conversion (to MMC3) until the mid 2000s (long after Nesticle, probably the reason people wanted a cart port in the late '90s, was dead).
"My watch says 30 chickens" Google, 2018

Psyklax

Quote from: KingMike on January 07, 2018, 10:42:31 PM
The ones that can be (somewhat) easily converted are those that don't need to be.

A more succinct explanation I can't think of. :)

I'm sure switching disks might seem like a hassle to you, but remember that you can load the game, make a save state, then never have to worry about loading it. :D

SCO

The only project i know that habitually consolidate data into another medium (ie, not no-cd hacks) is WHDLoad, and those guys are still introducing and fixing bugs on their installs.

However, i still exclusively use whdload. The convenience is much better.

firedropdl

Thanks for the replies.  It turns out things are going to go smooth on the FDS emulation side for the RetroPie, so this would be completely unnecessary.  One of the guys there suggested that I convert all the FDS games to NES and gave me a link to that tool.  I didn't think it would be possible at all, so I just wanted to verify that before I went back with more info (thanks Psyklax... I used a paraphrased version of your explanation without any mention of your particular hacks in it).

Like anywhere else, people over there are willing to help out if you show that you're not afraid to get your hands dirty yourself.  Rather than just say "duh... I don't think I can do that", I thought it would be better to get that from a pro's point of view first.  :)


EDIT:  It's actually funny that King Mike said what he did.  Before I even came here I did basically say that the only games that I think we can convert with that tool would be the black box NES games that came out with the system.

SCO

#10
There is actually one thing that bothers me about treating diskettes, and hd images like ROMs in emulators: they're writable, unless the 'copy-protect' cover is closed (it existed on the Amiga anyway).


This means that a dumb game, as part of its normal operation, might very self-modify (HOOK.EXE did this in dos to savegame and change settings 'in the executable') or just change things around in the disk (savegames etc).

Many games asked/created a dedicated save floppy for this, but many didn't.

This is a problem for emulator usability, because, besides the hassle of managing your own savegames location, it has the potential to change checksums of dumps when you play, making your 'romcenters' and dat files much less useful (for emu autoconfig among other things). I suggested something like a copy-on-write for RA already (and i already use it for dosbox on linux) to prevent this in a 'general' way (as a bonus, something like this can also play games from a zip, cd, dvd, blue-ray etc, and only copy stuff that needs to be written).

Thank god for whdload for the amiga and that most DOS games later than the 80's were hard-drive targeted so having a 'save diskette' is rather uncommon for them.

Something like this, will also be useful for later consoles with hard-drives later on. It's not a good idea to have a copy of a OS for every game, or to have your 30gb game change crc just because and something like a VFS with cow could prevent that sort of stuff.

julayla

Dang, that musts be hard to do. Because I really do like to see some of the exclusive FDS games converted to NES so I can play them on my Retropie, like Murusame Castle or Doki Doki Panic

firedropdl

I haven't tested Riddle of Mursame Castle yet, but the Doki Doki Panic FDS translation works on Retropie.

If FDS games aren't loading for you, remember you need the FDS bios and you can only use lr-nestopia or lr-fceumm.

Mattneil8

I would also like to see if Mursame Casle is possible. I know there are issues running it in Canoe due to it having two sides. I'm sure it's a lot of work to convert it though.

firedropdl

I just finished testing all of the FDS translations here on the RetroPie and they all work except for "Famicom Grand Prix II".  That game works, but the info at the bottom flickers the whole time.  This was an issue in NestopiaX on the XBox as well, so I will be working with the RP community at some point to see about this and some other games that were fixed in NestopiaX but have the same problems in lr-nestopia.

All other games work in lr-nestopia except for "19 Neunzehn", and "Lutter".  For those, at least now, you need to use lr-fceumm.

Here's a list of the translated FDS games I can confirm work in RetroPie:

19: Neunzehn
All Night Nippon Super Mario Bros.
Boxxle: Warehouse Evening of Tears
Breeder
Crystal Dragon
Dandy: The Resurrection of Zeuon
Deep Dungeon: The Heretic War
Deep Dungeon II: The Hero's Crest
Dirty Pair: Project Eden
Dream World Doki Doki Panic!
Eggerland
Electrician
Esper Dream
Famicom Grand Prix: F1 Race
Famicom Grand Prix II: 3D Hot Rally
Gall Force: Eternal Story
Ghost Manor
Ginga Denshou: Galaxy Odyssey
Gyruss
Ishido
Knight Lore
Knight Move
The Legend of Zelda
Lutter
Metroid
The Miracle of Almana
Mobile Police Patlabor
Monty on the Run
Puzzle Boys
The Return of the Mario Bros.
Riddle of Murasame Castle
Samurai Sword
Santa Claus' Toybox
Seiken Psychocalibur
Silviana
Sword of Kalin
Temple Labyrinth Dababa


Remember, if FDS isn't working for you, you need to put the FDS bios in the right place, with the right name.  A simple Google search of "FDS RetroPie" will give you the info you need.

Have fun.  :)

lancuster

firedropdl, can you explain what means in this post?
https://forums.nesdev.com/viewtopic.php?f=2&t=10916#p124265
I am noob in programming, but I want to learn to do some stuff.

firedropdl

Sorry lancuster.  That's all foreign language to me.  The only thing I know how to do with a rom is manually edit something in a hex editor if somebody is holding my hand the whole way through.  :)

Maybe somebody else here could give you some advice?