ToToTEK.COM Forum Index ToToTEK.COM
Help & Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FDS Questions
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    ToToTEK.COM Forum Index -> Copiers and Hardware
View previous topic :: View next topic  
Author Message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Wed Nov 15, 2006 6:19 am    Post subject: Reply with quote

OK, so it turns out the MGD1 is doing a couple things to muck up the images. First, it's adding a 3 byte header to the raw image. It's 00 00 XX, the XX I've seen be a few different values from 0x83 to 0x88. The other thing it's doing is adding padding 00s around different parts of the disk image. I'm not an FDS expert, but they appear in the FDS header (Nintendo's actual header), around the PRG data and around the CHR data names. I'm going to see if this is consistent and then write a tool to convert the MGD1 images into playable FDS images. The trick will be going the other way and making an image that the MGD1 can write properly that wasn't created by itself.

Edit: I discovered that the lower 4 bits of the 3rd byte in the MGD header signify how many files are on the disk. A value of 0x83 denotes 3 files on the disk, 0x88 means there are 8 files, etc. Right now my utility only handles games with 3 files, so I need to write something more generic and intelligent than can discover the file lengths and strip the padding where necessary. Time for bed, I'll work on the code tomorrow.
Back to top
View user's profile Send private message
rbudrick



Joined: 26 Mar 2004
Posts: 373

PostPosted: Wed Nov 15, 2006 5:11 pm    Post subject: Reply with quote

Madman, I sent you an email on how to convert from MGD to .fds format (from Kyuusaku's instructions he sent me a while ago). Go ahead and repost it here, when you get a chance, since it may be a couple days before I can check my hotmail again (they block it here at work).

-Rob

EDIT:

Quote:
Oh! Now I know why my images are not working when I record it! Rob, I think my FDSLoader cable has been working all this time. I was missing that valuable info! Can you send me that image? I will PM you. You are the man ROB!

-CFB


Oh yeah, I sent those blanks your way. If anyone else wants 'em, lemme know. Interestingly, the images will sometimes work when you record over an image that is longer. It may see some errors in some games and not boot correctly though, but more often than not, they still work. For example, before I knew to use blank images, when I dumped Doki Doki Panic, it told me to use a genuine Disk Writer machine like Japan used to have in the shops! Basically, there was some simple copy protection schemes on the disk. I haven't tested it yet, but I bet those would clear right up if I used a blank image.

But anyway, you don't want dirty images floating around the net, so be a good curator of history and make good dumps, k? Laughing

And yes. Yes I am the man. Wink
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Wed Nov 15, 2006 5:44 pm    Post subject: Reply with quote

The info you sent from Kyuusaku is not correct in this case. Either Tomy's software or the MGD1 is adding extra data to the images, they are not just binary dumps. I'd gather it's the MGD1 adding the data.
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Thu Nov 16, 2006 12:32 am    Post subject: Reply with quote

Alright, earlier today I finished my utility that converts images created with Tomy's MGDLinker tool into images useable by emulators. I'm still unsure of what is creating the extra data in the images, but it appears to be the MGD1 as it reacts differently to "trained" Famicom carts that are not actual disk games. I've spent the last few hours of my life working on a conversion utility that is probably useful to about 5 people in the world Smile
Back to top
View user's profile Send private message
rbudrick



Joined: 26 Mar 2004
Posts: 373

PostPosted: Thu Nov 16, 2006 1:51 am    Post subject: Reply with quote

HA HA! That's awesome, madman. The good thing is that now that it's made, you may wanna have them host it on Nesdev. I'm sure there's a good amount of people out there that would be glad to use it. I've been hoping someone would make one, but I didn't think it would come so soon! Well, soon for me, anyway, lol. It may even finally inspire an emulator author to support GD emulation. Hey, a guy can dream, huh? So, ummm, how about sending that baby my way? Very Happy

For those reading, here's what Kyuusaku originally told me:

Quote:
>>Also, is there any known way to take an A side and B side image from MGD1 to
make a real FDS image?

Quote:
>>>Of course, MGD1 format is just binary. Take the MGD1 file side.A, pad it to 65500 bytes, save, take file side.B, pad it to 65500 bytes, save, put the first 16 bytes of a 2 sided .fds file in "header.bin" and do this DOS command:

copy /b header.bin+side.a+side.b game.fds


I'll drop Kyuusaku a line and see what he says. I'm sure he'd be interested to see it.

-Rob
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Thu Nov 16, 2006 4:19 am    Post subject: Reply with quote

I'll need to talk to Tomy and make sure he's OK with his MGD Linker software being released to a wider audience and the schematic he drew up from his PC link cable. But, I see no problem with releasing my software/source code. I need to add a few things to it, but right now it works fine. I also need to figure out how to properly join 2 sided disks to make one image. I've dumped the first side of Gal's Dungeon and it loads fine, I just need to see if there are differences in how side 2 is laid out.

I can only assume the extra information was added because the MGD1 originally loaded SNES/MD/PC-E games off FDS disks and they needed a way to discern between the types to load them properly.
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Thu Nov 16, 2006 10:28 am    Post subject: Reply with quote

Another udpate. I dug out an old PC-E CD I got years ago and on it were some really old conversion utilities. One of which could convert MGD file types to a number of things, including "PC/FLYING EAGLE" which I have absolutely no idea about. At any rate, one particular conversion option was MGD -> MGD (PC link). I fed it a PC-E ROM in standard raw format and told it to convert it to a PC Link format. It added the exact header that I've been seeing, it even added FDS specific header information including the *NINTENDO-HVC*. My guess was correct that this has something to do with how the MGD1 handles files via the FDS connection. Instead of the usual FDS file structure, it has a series of files with the MULTI-GD naming convetion.
Back to top
View user's profile Send private message
Tomy
Site Admin


Joined: 02 Aug 2005
Posts: 414

PostPosted: Thu Nov 16, 2006 2:14 pm    Post subject: Reply with quote

madman,

I don't add any header or extra bytes for MGD1 dump software. It is original by BUNG.
And I need to tell you that sometimes even success dumped fds disk. Please read from the software edit box. If it say checksum error. Then it is bad dump. Please take care.
Back to top
View user's profile Send private message Send e-mail
rbudrick



Joined: 26 Mar 2004
Posts: 373

PostPosted: Thu Nov 16, 2006 3:01 pm    Post subject: Reply with quote

Quote:
I'll need to talk to Tomy and make sure he's OK with his MGD Linker software being released to a wider audience and the schematic he drew up from his PC link cable. But, I see no problem with releasing my software/source code


Right, that's what I meant, is your program, but it would also be good if Tomy was ok with his program being more public. It's probably best to wait for his new version, though.

Quote:
Another udpate. I dug out an old PC-E CD I got years ago and on it were some really old conversion utilities. One of which could convert MGD file types to a number of things, including "PC/FLYING EAGLE" which I have absolutely no idea about. At any rate, one particular conversion option was MGD -> MGD (PC link). I fed it a PC-E ROM in standard raw format and told it to convert it to a PC Link format. It added the exact header that I've been seeing, it even added FDS specific header information including the *NINTENDO-HVC*. My guess was correct that this has something to do with how the MGD1 handles files via the FDS connection. Instead of the usual FDS file structure, it has a series of files with the MULTI-GD naming convetion.


When you say PC-E, do you mean PC Engine? Like a Duo disc? I know the MGD could dump PC Engne roms, but were these utilities PCE specific, or did they specify they are for FDS?

So any idea what the difference between MGD and MGD PC Link formats are? I mean, doesn't MGD only dump one way (not sure why there's two MGD formats)? Maybe it was just the difference between FDS games and games for PCE. SNES, etc that are stored on FDS disks. What kind of PC-E rom did you feed it? Any idea who made these utilities?

Any other good stuff on there?

Oh, and do you plan to add merging disk sides to your utility you made?

-Rob
Back to top
View user's profile Send private message
kyuusaku



Joined: 26 Jul 2003
Posts: 941
Location: .ma.us

PostPosted: Thu Nov 16, 2006 6:01 pm    Post subject: Reply with quote

There are TWO MGD1 ROM formats. One which is for split disk images (first format), one is for intact ROM images (second format added when the 3.5" floppy was added, there is an entirely new disk BIOS inside)

The first format ("PC Link") requires FDS headers because the FDS is expected to read/write the disk. When the MGD1 writes disks, it uses the FDS BIOS to write the disk. When you read with the FDS adapter, it uses the BIOS to read. This stems back to the first GD which would act as a "passthrough" device until a GD disk (not normal FDS) was inserted.

I did not know MGD1 altered disk images, I don't know why it would as GD images already have the necessary data inside the Nintendo header. Perhaps it is "fixing" disks which aren't properly created (such as Venus and FFE disks)

Madman, the padding you are describing is perhaps adding "file" boundaries in the FDS image which is necessary for breaking the game into chunks which separate PRG from CHR.

BTW as I understand it, FDS games don't have distinct PRG/CHR boundaries since they all use CHR-RAM. The PRG/CHR descriptor in the FDS "files" seem to be constant load areas for the early cart->disk conversions (like FDS Tennis.)


Also to clarify:
-"Flying Eagle" is the Magic Super Griffin
-MGD1 CANNOT DUMP ANYTHING except FDS disks. It is probably possible to dump carts with new I/O hardware and custom software (ie new BIOS functions...) but that's a waste of time to even think about.
Back to top
View user's profile Send private message
rbudrick



Joined: 26 Mar 2004
Posts: 373

PostPosted: Thu Nov 16, 2006 6:09 pm    Post subject: Reply with quote

Thanks, Kyuusaku!

Madman, the best bet at this point is to dump disks with the MGD1 that are already dumped to fds format. That way, you can compare the differences and see how they are seperated and if anything else was added (or needs to be added). I sent you the .fds image I made of the New Tai Sang Co hack of Copy Master. That way, you can see a pirate-type game for comparison to any commercial .fds files you have. I have some other hacker programs for FDS too (Disk Hacker, etc.), if you want those.

-Rob
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Thu Nov 16, 2006 7:23 pm    Post subject: Reply with quote

Rob, it was just a generic MGD<->Flying Eagle conversion utility. I plan on adding the ability to do 2 sided disks to my utility today.

Kyuusaku and Tomy, I gathered that after looking at the utility, but thanks for clarifying! Here are the options the program has that lead me to that:
1 - MGD --> MGD (PC LINK)
2 - MGD --> PC/FLYING EAGLE
3 - MGD (PC LINK) --> MGD
4 - MGD (PC LINK) --> PC/FLYING EAGLE
5 - PC/FLYING EAGLE --> MGD
6 - PC/FLYING EAGLE --> MGD (PC LINK)

In short, what the MGD1 does to actual FDS images is add a 3 byte header, and write 2 bytes of padding before and after the filename headers for each file on the disk. I've compared the output of my utility to known, good FDS dumps and the files are the same. As usual, I'll keep everyone posted as I make progress.
Back to top
View user's profile Send private message
rbudrick



Joined: 26 Mar 2004
Posts: 373

PostPosted: Thu Nov 16, 2006 8:08 pm    Post subject: Reply with quote

Quote:
There are TWO MGD1 ROM formats. One which is for split disk images (first format), one is for intact ROM images (second format added when the 3.5" floppy was added, there is an entirely new disk BIOS inside)


Almost forgot...so the MGD1 came with two possible different BIOSes? Are these dumped anywhere? Can the newer one do everything the older one did? Is it possible to tell which one you have?

BTW, what port mode (EPP, ECP, other?) do you get the MGD to work in Madman and Tomy? Of course, I can't get either to work yet, lol. I wonder if it would work with a new parallel port card...which would be a total pain. Maybe I could get a PCMCIA card for my laptop, which can't natively do EPP at all...that might fix it to do so, which could be very useful for many old apps.

-Rob
Back to top
View user's profile Send private message
madman



Joined: 07 Jul 2006
Posts: 598

PostPosted: Thu Nov 16, 2006 8:23 pm    Post subject: Reply with quote

Well there's a BIOS in the MGD1 itself, mine is dated 1990 if I recall, perhaps 1991. If you open the 3.5" floppy drive connector (sits where the FDS ram adapter normally does), there's another BIOS in there, simply labelled "Floppy." I'd guess this BIOS takes precendece over the internal MGD1 BIOS for certain functions. This is probably the BIOS that understands the generic MGD1 binary format. Someone needs to make an english MGD1/2 page, maybe if I ever get some free time.

I'm using ECP mode right now.
Back to top
View user's profile Send private message
kyuusaku



Joined: 26 Jul 2003
Posts: 941
Location: .ma.us

PostPosted: Thu Nov 16, 2006 9:26 pm    Post subject: Reply with quote

The MGD1's internal BIOS is mapped somewhere such as $8000-DFFF while the FDS BIOS is mapped to $E000-FFFF. When you insert the 3.5" adapter, it maps itself to the FDS BIOS area since it is a replacement for the FDS RAM adapter.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ToToTEK.COM Forum Index -> Copiers and Hardware All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group