FDS homebrew ?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Bregalad
Posts: 8008
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

FDS homebrew ?

Post by Bregalad » Sat Jan 23, 2010 4:58 am

Now that the Powerpak can play FDS games, with sounds, I wonder has anyone ever homebrewed a FDS demo taking advantage of it ?

Otherwise how hard would it be to make a FDS port of a NES game (assuming you have all the code and inner workings) ? That way it could have the benefit of automatic save and better music, at the exapanse of loading times (which are significantly shortened on the Power Pak BTW).
Useless, lumbering half-wits don't scare us.

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

Post by tepples » Sat Jan 23, 2010 7:06 am

Homebrew isn't supposed to rely on a library that most players won't have. GBA games rely on the GBA BIOS, but:
  • Enough users worldwide have the tools to run GBA games on authentic hardware.
  • Popular emulators do an acceptable job of high-level emulating the GBA BIOS when no BIOS file is available.
  • Emulator users dissatisfied with HLE can easily acquire a working GBA and a cheap CF adapter or flash linker to dump the GBA BIOS from hardware.
With FDS, on the other hand, most of your audience won't have access to an FDS RAM cart or to the tools to dump its BIOS. What emulators are known to high-level emulate the documented entry points in the FDS BIOS?

ccovell
Posts: 1018
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell » Sat Jan 23, 2010 7:35 am

They're not spectacular, but I made at least 3 programs that run on the FDS: A disk lister, Ai Senshi Nicol music player (with wave display) and conversion of my Stars demo (ho-hum, yeah, I know.)

http://www.disgruntleddesigner.com/chri ... l#rockoder
They were all tested on a real FDS RAM adaptor.

User avatar
Bregalad
Posts: 8008
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sat Jan 23, 2010 8:24 am

Thanks Ccovell, maybe it's not spectacular but it's infinitely better than nothing.
I like the music player, but I don't quite understand how the wave is displayed. Is it displayed vertically ? That would make sense, as the NES (so the FDS too !) can't display 64 sprites horizontally aligned.

It's too bad no emulator allow to switch disk like you could in real life (the once who comes the closest is Nintendulator where you can actually eject and instert disks, but only from a single .fds file). I'd probably have to somehow append your file with another .fds file and see what happens (I should find doccuments on the .fds format).

Another question : What multi-disk FDS games are arround ? VirtuaNES has support for up to 4 disks (all double sided) but it's always grayed out.


Homebrew isn't supposed to rely on a library that most players won't have. GBA games rely on the GBA BIOS, but:
Enough users worldwide have the tools to run GBA games on authentic hardware.
Popular emulators do an acceptable job of high-level emulating the GBA BIOS when no BIOS file is available.
Emulator users dissatisfied with HLE can easily acquire a working GBA and a cheap CF adapter or flash linker to dump the GBA BIOS from hardware.

With FDS, on the other hand, most of your audience won't have access to an FDS RAM cart or to the tools to dump its BIOS. What emulators are known to high-level emulate the documented entry points in the FDS BIOS?
I don't quite understand all that you said, but it looks you'd be strongly opposed against FDS homebrew. I agree that, before that the power pak came out, I would hever had the idea.

But now that it's there and can play FDS games, I think you can't say playing a game with a real powepak on a real NES isn't real hardware, huh ? I've just been enjoying the japanese verion of Castlevania 2 and find it quite supperior in the sound departement.
Okay you don't use a real RAM adapter and switch real disk, so it's ambiguous. But I did never mean to develop FDS exclusive software without owing a FDS myself, I meant that NES software could be ported to the FDS, with only differences in the audio and saving system (like Castlevania 2, Kid Icarus, etc...)

I can't even imagine how tremendously (does that word exist ?) expensive a FDS would be today, and FDS disks would be even much expensive.

I don't see how the BIOS could possibly be a problem, it's widely documented on the NESdev main page, and as you say yourself there have always been GB/GBC, GBA, DS, Playstaion, Commodore 64, PC, ... homebrew when all those consoles also have a proprietary BIOS.
Useless, lumbering half-wits don't scare us.

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

Post by tepples » Sat Jan 23, 2010 10:20 am

Bregalad wrote:I don't quite understand all that you said, but it looks you'd be strongly opposed against FDS homebrew. I agree that, before that the power pak came out, I would hever had the idea.

But now that it's there and can play FDS games, I think you can't say playing a game with a real powepak on a real NES isn't real hardware, huh ?
PowerPak is an authentic NES and a cloned mapper. Mappers are legally easy to clone, given that hardware patents expire after 20 years. But the FDS BIOS is software, and software copyrights don't expire. In order to sell clones of the IBM PC, Compaq had to have one team discover the behavior of each syscall and then have another team develop a clone without reference to the IBM PC BIOS disassembly.
I don't see how the BIOS could possibly be a problem, it's widely documented on the NESdev main page
If someone were to take the time to implement a freely redistributable clone of the FDS BIOS, I'd be in favor of FDS homebrew.

Which FDS games access the disk exclusively through the BIOS, and which use direct hardware access?

User avatar
Jeroen
Posts: 1048
Joined: Tue Jul 03, 2007 1:49 pm

Post by Jeroen » Sat Jan 23, 2010 10:38 am

Very few didnt use the bios. And the ones that didn't don't work on powerpak anyway iirc. (since they're directly trying to acces a disk that doesnt exist hehe )

User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Sat Jan 23, 2010 11:50 am

My emulator HLEd FDS disk loading because I couldn't get it working easily otherwise and it just seemed like the most simple thing to do. No game I ever tried loaded in any other way than to call the BIOS function that loads files.

I see no reason why anyone shouldn't make FDS homebrew if they want to do so. Actually the FDS and Disks are not expensive. Really for most players they are undesirable. Loading times, reliability issues, importing issues. So I think that keeps demand down and the FDS wasn't some total failure, so there is a good supply of FDS stuff.

With the nice FDS documents we have today you shouldn't have any problems making your own game that runs on FDS, or even making your own cross platform game like Castlevania where you have a Cart and FDS version.

User avatar
oRBIT2002
Posts: 632
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Post by oRBIT2002 » Sat Jan 23, 2010 11:57 am

Has the FDS Bios been completely reversed? The last information I read concerning this (quite awhile back) wasn't readable for mortals..

For homebrew FDS-stuff, feel free to check out my "FDSExplorer" tool for creating/editing disk-images:
http://www.anes.se/NESTools/
:)

User avatar
Bregalad
Posts: 8008
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sun Jan 24, 2010 3:44 am

OK thanks for the answers.
I think the BIOS is pretty good documented, and thanks oRBIT2002 for your tools, they seems they'd be usefull to me.
Actually the FDS and Disks are not expensive. Really for most players they are undesirable. Loading times, reliability issues, importing issues. So I think that keeps demand down and the FDS wasn't some total failure, so there is a good supply of FDS stuff.
Well maybe your are right, I haven't checked prices, but here only collectors have this kind of hardware, and they take a game at buying and selling stuff very expensive. I think it could be inexpensive if you import it from Japan, but then the port would be very expensive.
Not to mention I'd probably have trouble to insert the RAM adapter in a frontloader NES, even if I'd somehow get back the 60->72 pin converter from by bro in law.


If someone were to take the time to implement a freely redistributable clone of the FDS BIOS, I'd be in favor of FDS homebrew.
I don't know how you could do that. It seems MUCH more a violation of a copiright to write sofware identical to the original than to call routines of the original. And since the FDS BIOS lacks a jump table, all routines would have to be exactly the same # of bytes.

Honestly, the C64 scene has gone pretty far, and I think the Kernal is copyrighted too. That don't prevent people from makings calls to it - and even distribute fully commented disassembles of it. I don't know much about the other platforms tough - I just know I was able to make my own dump of the GBA bios easily using someone else's software - and it would seems this would increase the accuracy of emulators.

Back to my original problem : The main difference between the FDS and the cartridge is that in the FDS you load files into RAM, while in the cart you bankswitch banks of data.
With a cart you can bankswitch data as much as you like, but with the disk, you can only load data you really need for this level.

So it would be basically like that (it's just an exemple):
1) Cart
Bank #0 : Sound engine, all music & SFX data
Bank #1 : Map scrolling engine, map data
Bank #2 : Metatile data, graphics
Bank #3 : Text engine, text data
Bank #4 : ....
Bank #2^n-1 : Interrupt code, main game engine

2) FDS
$6000-$7FFF : SFX data, current level music
$8000-$affff : Current level map & metatile data
$b000-$dfff : Interrupt code, main game engine

So all it'd take for a NES cart to be able to be converted to FDS, is that the sum of the "current level data", plus what is resident in RAM, shouldn't exceed 32kb.
Useless, lumbering half-wits don't scare us.

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

Post by tepples » Sun Jan 24, 2010 6:54 am

The fixed entry point problem is solvable. I mentioned before how Apple solved it. But for its next platforms (Apple II ProDOS, Mac OS, and GS/OS), Apple went to numbered syscalls and jump tables, just as Nintendo later did with the GBA BIOS.
Bregalad wrote:Honestly, the C64 scene has gone pretty far, and I think the Kernal is copyrighted too. That don't prevent people from makings calls to it - and even distribute fully commented disassembles of it.
All this tells me is that Nintendo enforces its copyrights more vigorously than Commodore.
I just know I was able to make my own dump of the GBA bios easily using someone else's software
You probably ran Dark Fader's dumper with an authentic GBA and a copier. But most people who live in countries that use Latin, Greek, or Cyrillic letters don't have an FDS RAM cart and a copier.
2) FDS
$6000-$7FFF : SFX data, current level music
$8000-$affff : Current level map & metatile data
$b000-$dfff : Interrupt code, main game engine
Some of the SFX data would have to fit above $C000 due to limitations in the sample playback unit.
So all it'd take for a NES cart to be able to be converted to FDS, is that the sum of the "current level data", plus what is resident in RAM, shouldn't exceed 32kb.
Other things that have to work:
  • No ExGrafix.
  • Scanline counter has to be compatible with that of the FDS.
  • DPCM samples can't exceed 8 KiB.

User avatar
Xious
Posts: 189
Joined: Sun Oct 11, 2009 5:21 am
Location: Sol 3 in Mutter's Spiral
Contact:

Re: FDS homebrew ?

Post by Xious » Thu Mar 04, 2010 3:47 am

Bregalad wrote:Now that the Powerpak can play FDS games, with sounds, I wonder has anyone ever homebrewed a FDS demo taking advantage of it ?

Otherwise how hard would it be to make a FDS port of a NES game (assuming you have all the code and inner workings) ? That way it could have the benefit of automatic save and better music, at the exapanse of loading times (which are significantly shortened on the Power Pak BTW).
That would be exceptionally, wickedly cool!

For example, I would love to see an FDS version of Castlevania: Chorus of Mysteries (on top of the Akumajo Dracula FDS diskette) so that you can save three files and have continues.

(The FDS Castlevania, "Akumajo Densetsu" allows three save files like The Legend of Zelda and allows you to save and resume play from where you left off at a later time.)

The FDS also has its own sound chip, so it would be neat to see new games that make use of it, but if you want to run them on real HW, you'll have to figure out how to write to a disk from an image, which is something I brought up on the hardware forums a while back.

-Xious

User avatar
Bregalad
Posts: 8008
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Mon Mar 08, 2010 2:20 am



For example, I would love to see an FDS version of Castlevania: Chorus of Mysteries (on top of the Akumajo Dracula FDS diskette) so that you can save three files and have continues.
I just wanted to point that there IS infinite continues in Castlevania - they just whiped the save out, which wasn't really necessary since you can finish the game in ~45 minutes (for those who are good enough to kill Death, unlike me). No matter if I have saves or not I'll always be stuck at Death, the only way to pass it for me is to have savestates.


The FDS also has its own sound chip, so it would be neat to see new games that make use of it, but if you want to run them on real HW, you'll have to figure out how to write to a disk from an image, which is something I brought up on the hardware forums a while back.
You are right that if I use the sound hardware, it may act differently on the PowerPak that on a real FDS... so I'd have to buy a twin famicom or a working FDS + ask my 60->72 adaptater back from my bro in law + find a way to make the cart fit in my NES, and in all cases buy at least 1 disc and find a way to rewrite it, which sounds tedious, although I'd love to be able to do that.

Also how common are 72->60 adapters ? If I ever go trough the trouble to import a rare twin famicom, I'd be able to at least play games from my Power Pak in NTSC mode !
Useless, lumbering half-wits don't scare us.

User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Mon Mar 08, 2010 12:03 pm

They aren't that uncommon since alot of Famiclones are bundled with them when sold to westerners. However the adapters may need modification to run some games as well as to run the PowerPAK. I had a 72 -> 60 pin adapter that came with the HandyFami or some clone named like that.

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

Post by tepples » Mon Mar 08, 2010 12:19 pm

The FDS RAM cart lies flat on the Famicom. So either the NES needs to be an NTSC toploader or the adapter needs to be really long to clear the front of the NES.

User avatar
Memblers
Site Admin
Posts: 3890
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers » Mon Mar 08, 2010 3:50 pm

It would be cool if you could find a place to buy cheap disks to use for a release. I don't know where. The main advantages at gives to the games (save/load files and sound expansion) are also a couple main points of my Squeedo design.

Post Reply