+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Difference Between NES and FDS
Pages: [1]
Author Topic: Difference Between NES and FDS  (Read 2 times)
Kagemusha
Guest
« on: January 11, 2009, 07:07:04 pm »

Well, I guess I'm interested in hacking the FDS now, but I wondering what's different about it from the NES. I imagine it's got to be pretty similar seeing as how I can play the games in FCEU. At least that's my assumption.

I'm going out on a limb here, but I'm gonna say the ASM language is the same and the FDS uses disks and the NES roms.

Edit: Ah well browsing the utilities has enlightened me a bit. Apparently the image can be broken down into parts. Is that something like PRG and CHR ROM? And what about expansion? I guess there's an FDS disk expander. Would it be in the same vein as NES ROM expansion?
« Last Edit: January 11, 2009, 07:21:06 pm by Pennywise »
Hamtaro126
Guest
« Reply #1 on: January 11, 2009, 07:51:21 pm »

Quote from: Pennywise on January 11, 2009, 07:07:04 pm
Well, I guess I'm interested in hacking the FDS now, but I wondering what's different about it from the NES.

The difference between the NES and the FDS: the FDS has a BIOS and it will handle 3 NMI routines, Scrolling is used by the built in scrolling counters in some games (DDP used the counters) and the IRQ has about a few addresses to handle the IRQ settings. And Disks are the media, Not ROMs in Cartridges

Quote from: Pennywise on January 11, 2009, 07:07:04 pm
I'm going out on a limb here, but I'm gonna say the ASM language is the same and the FDS uses disks and the NES roms.

It is the same old 6502. But unlike the NES with PRG-ROM and CHR-ROM, it reads disks for both PRG-RAM and CHR-RAM and operates from there after the needed stuff is loaded

Quote from: Pennywise on January 11, 2009, 07:07:04 pm
Ah well browsing the utilities has enlightened me a bit. Apparently the image can be broken down into parts. Is that something like PRG and CHR ROM? And what about expansion? I guess there's an FDS disk expander. Would it be in the same vein as NES ROM expansion?

It can be very easy to expand CHR and PRG, unlike the NES. You can use either Orbit2002's FDS expander from the Utilities section, or you can go to sm2.beneficii.net to get FDSINFO.

There is another FDS utility at kingmike.emuxhaven.net. But unlike FDSINFO it splits FDS files in two folders and also puts them together again.
Sliver X
Guest
« Reply #2 on: January 11, 2009, 07:55:30 pm »

Basically, the FDS is simply a floppy drive expansion, but has its own BIOS and auxillary sound hardware that grants an extra channel for music/SFX.

Since it's a glorified drive, it uses the Famicom's CPU and such. The primary difference is the media: An FDS disk can only be 128KB (64KB per side), and since there's no way to slap something like a mapper chip into a floppy the data is split into "files", which can be loaded into and out of RAM.

Some games even write to the disk itself as RAM, since a floppy is random access memory of sorts.

Anyway, somebody like Kingmike would be able to explain all this far better than me, but that's the gist of it.
Disch
Guest
« Reply #3 on: January 11, 2009, 08:04:18 pm »

The FDS was an addon unit that sat on top of the Famicom.  Think of like how Sega 32X sat on top of Sega Genesis to add functionality -- same idea.

Instead of taking cartridges, the FDS takes floppy disks.  1 side of 1 disk is roughly 64K, meaning a two sided disk can have 128K of data.  More than that would require several disks.  The biggest FDS game to my knowledge is 256K, being two 2-sided disks.

As for how it works -- it works exactly the same.. it simply runs games from a floppy disk instead of from a cartridge.  The FDS in a sense is a sort of mapper in that it adds some functionality similar to mappers (like ability to change between H and V mirroring, and an IRQ counter to aid with raster effects).

FDS has a BIOS which sits hardwired at $E000-FFFF.  This is filled with various disk read/write routines that FDS games can use, as well as some other common routines like joypad reading and such.  Since there is no PRG-ROM (because there's no cartridge), the FDS puts 32K of PRG-RAM at $6000-DFFF.  This can be general use RAM, but it's generally also where the program is loaded into.  Likewise there's no CHR-ROM, so the FDS provides the normal 8K of CHR-RAM at $0000-1FFF for the pattern tables.

Floppy disks are SLOW.  It takes over a hundred cycles to read a single byte from the disk.  This is why you get those wretched "Now Loading" screens in FDS games, it has to load data off the disk and put it in RAM at $6000-DFFF or put it in CHR-RAM.  Writing data is equally slow.

FDS disks are arranged in a sort of file system.  If you examine the .fds file format and look at some FDS files, you should be able to seperate the .fds file into several smaller files, each containing a header indicating where the FDS is going to load the data to, and how big the data is.  This can give you a good idea of how games are arranged.

Since floppy disks are writable, there's no need for SRAM since games can save files directly onto the floppy disk.

The RAM at $6000 is fixed -- so there's no swapping.  To load in different data the game has to read it off the disk (which requires a Now Loading screen).  NES/FC games don't have this problem as they can just do instantaneous bankswaps at will to gain access to more data.

That's really it.  Floppy disks and BIOS instead of a cartridge and mapper.  Also the FDS has an extra sound channel.

EDIT -- I type slow apparently, 2 responses before mine ;_;   oh well.

EDIT2 - just want to clarify:  $6000-DFFF is not the disk.  Access to the disk has to be done through FDS registers and is a huge pain in the ass (most games let the BIOS routines do it for them).  Data gets copied from the disk to the RAM at $6000-DFFF.  Changes to $6000 do not change the disk -- in order to change the actual disk the game would have to access the disk through those FDS regs or call BIOS routines to do that.
« Last Edit: January 11, 2009, 08:10:46 pm by Disch »
Kagemusha
Guest
« Reply #4 on: January 11, 2009, 08:13:01 pm »

Wow, that's really useful information. Since there's no documents for the FDS on here, perhaps a document could be made up from this. Especially for Disch's post. Maybe something like Disch explains the FDS.
creaothceann
Guest
« Reply #5 on: January 11, 2009, 08:38:41 pm »

What about this?

http://nesdev.parodius.com/#DocsFDS
Ryusui
Guest
« Reply #6 on: January 12, 2009, 12:00:21 am »

Quote from: Pennywise on January 11, 2009, 07:07:04 pm
Edit: Ah well browsing the utilities has enlightened me a bit. Apparently the image can be broken down into parts. Is that something like PRG and CHR ROM? And what about expansion? I guess there's an FDS disk expander. Would it be in the same vein as NES ROM expansion?

Ever tried dismantling an ISO or DS ROM? Same principle.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC