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 

Loading Hirom on the Multi Game Hunter (MGH)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    ToToTEK.COM Forum Index -> Copiers and Hardware
View previous topic :: View next topic  
Author Message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Wed Dec 28, 2016 3:54 pm    Post subject: Loading Hirom on the Multi Game Hunter (MGH) Reply with quote

I've been tinkering with my MGH as I couldn't find much information about how to load some HiRom files on the SNES. Ucon64 is not able to convert those files properly, certainly due to lack of information from the authors.

First, there are a few things to know and some myths to debunk about the MGH.
There are at least 3 revisions of the device:
- The Dual Mode adapter DMA-01 with Genesis and Snes interface PLD
- The Dual Mode adapter DMA-11 with Genesis and Snes interface ASIC
- The SF Mode adapter DMA-02 with the Snes interface only

There are at least 2 revisions of the disk unit

There are 2 type of SNES adapter:
- The black pass-through, no CIC
- The grey with built in CIC and 2 PLD for HiRom support

Regarding the color...apart for the above mentioned adapter, the color has NOTHING to do with the type or revision of the machine.
One thing I know for a fact is that the first MGH production was the black unit, as I got my Supercom Pro1 in the early 90s from a guy who purchased it just when it got released.
As for many other copiers, manufacturers would sometimes change the case color during the product life cycle. I've seen some light grey SWCDX or Superdisk cases for example.

So color wise here are the 3 types of case color you can find on the MGH:

On this picture provided by Moddy, you can see the top left is all grey, even the bottom part, the top right is mixed and the bottom one is black.
Then there are lots of different official combinations with the black base and grey disk unit or vice versa.
Anyway, the most important elements to look for to know which revision you have is:
- Do you have both Genesis and Snes slot available on the bottom part?
- Do you see a trapdoor on this bottom part
- Do you have the grey or the black Snes adapter?
The trapdoor indicates it's an ASIC model, this trapdoor is for the RAM which is now detachable and upgradeable to 24M


Ok that's done...I found out quite a few interesting other things regarding this awkward machine but that's another topic, let's get back to the HiRom specifics.

So first, you can not load HiRom files without the HiRom adapter. I don't know if this adapter works both on the PLD and ASIC versions but I see no reason it shouldn't.

When it comes to LoRom, the MGH can run roms with a header or without; as long as the following format is respected:

SFxxxxxA.

-The file must not have any extension.
-It must starts with SF
-It must end with A,B,C or D if it spans over multiple disks
-xxxxx can be anything

When you try to dump a LoRom cart, no problem either.
When you check an HiRom cart on the other hand, the MGH can't properly determine the type or size, which means you simply can't dump a HiRom cart on the MGH.

To load a HiRom cart on the MGH you need to take a rom without header, split it into 32K chunks and join the even and odd files in 2 different files.
The HiRom roms on the MGH are interleaved on 2 different files, so even a 4 Mbits rom for instance will have 2 x 2 Mbits files.

This works for all types of HiRom roms up to 16 MBits. The 24M HiRom roms need a control file with the Swapper option activated apparently.
But more on that when I'll have upgraded my ram board...

I hex edited all types of HiRom and they all worked successfully on the MGH but it was a bit tedious as you can imagine.
So I made this little batch utility for those interested.



b3mgh.jpg
 Description:
 Filesize:  57.05 KB
 Viewed:  13256 Time(s)

b3mgh.jpg



IMG_20150329_120713.jpg
 Description:
 Filesize:  150.46 KB
 Viewed:  13257 Time(s)

IMG_20150329_120713.jpg



mghi.zip
 Description:

Download
 Filename:  mghi.zip
 Filesize:  14.43 KB
 Downloaded:  541 Time(s)



Last edited by Mystic_Merlin on Thu Dec 29, 2016 10:38 am; edited 1 time in total
Back to top
View user's profile Send private message
mrforever



Joined: 19 Nov 2007
Posts: 75

PostPosted: Thu Dec 29, 2016 7:56 am    Post subject: Reply with quote

Great worKs! My congrats mate
Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Thu Dec 29, 2016 10:44 am    Post subject: Reply with quote

mrforever wrote:
Great worKs! My congrats mate


Thanks Wink

I'm also looking for a 1:1 scan, or precise dimensions of the MD PCB if anyone has one on hand.
Back to top
View user's profile Send private message
irix



Joined: 06 Mar 2017
Posts: 2
Location: Netherlands

PostPosted: Mon Mar 06, 2017 3:24 pm    Post subject: Reply with quote

Cool!

I have the MGH with just the black SNES connector (with no chips inside at all). It has the ROM005 Eprom-chip inside as well as a few of those PLD chips (007, 006, 012, 004, 011, 002, 010)

Do you know what the empty slot is for on the other side of the board? There's a small holder for a DIP16 chip, it's empty. It's labeled U25.

Mainboard picture: http://i.imgur.com/1R41vtq.jpg

Are there any software updates available (it says update in the menu).

When I load up games they always look corrupted, like wrong colors, missing sprite, strange music. Any ideas?



photo_2017-03-06_16-21-13.jpg
 Description:
Corrupted game
 Filesize:  83.61 KB
 Viewed:  13126 Time(s)

photo_2017-03-06_16-21-13.jpg


Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Tue Mar 07, 2017 10:55 am    Post subject: Reply with quote

U25 could be for a CIC, you can trace it to see if it corresponds to the cartridge connector's pins for the CIC.

So you own a DMA-02, snes version only.
Interesting, it's missing the slot for the MD with U9 and U12. I don't have a pic of the MGH DMA-01 so I can't tell for sure but if U9 is not a PLD, it should be simple to add the MD functionality.
Can you send a pic of the bottom of the PCB?

Regarding the "upgrade" option, it's the DOS upgrade of the system. Here is v 2.2.
Put the SX files with the MGH file on a floppy and run it. You'll see a new icon TOOLS on the right of the screen
It provides swapper, goldfinger and game saver options.
The swapper is what I believe to be the function to interleave the adressing of the roms to load hi-roms.
Goldfinger is the game genie type of cheat code.
Saver is for the save state cartridge
Once the unit is unpowered the unit revert back to DOS 1.0

As for your issues it could be dirty contacts, check that the floppy drive units seats well on the main unit. Does the MGH screen displays fine?
If it does then it could be some ram issue, maybe the rom format. Try to load smaller games to see if the problem persists.



F-MGHD22.zip
 Description:

Download
 Filename:  F-MGHD22.zip
 Filesize:  12.03 KB
 Downloaded:  516 Time(s)

Back to top
View user's profile Send private message
irix



Joined: 06 Mar 2017
Posts: 2
Location: Netherlands

PostPosted: Tue Mar 07, 2017 11:09 am    Post subject: Reply with quote

It does have a Megadrive slot on top (or at least: there is a connector there)

When I dump a cartridge directly to ram and run it also ends up garbled most of the times. I tried for example Cannon Fodder, which I own the cartridge of, and some of the samples in the opening tune are wrong (like garbled sound). When I just run the cartridge from the menu it's normal.
So I guess it must be the ram then? And I already read that this was extremely difficult to replace?

I'll post some pictures of the rest later, it's been put back together already.
I don't have the Megadrive bottom connector by the way, only the SNES one.

I tried 9V and 12V, 12V gave slightly better results (the disk drive board states it needs 10V DC so 12 will do as well).
Back to top
View user's profile Send private message
dbjh



Joined: 02 Aug 2003
Posts: 167

PostPosted: Thu May 11, 2017 6:56 am    Post subject: Re: Loading Hirom on the Multi Game Hunter (MGH) Reply with quote

Mystic_Merlin wrote:
Ucon64 is not able to convert those files properly, certainly due to lack of information from the authors.

It depends on what you mean by properly. The format you described is the simplest interleaved format, which is used by the Game Doctor SF3 for 16 Mbit HiROM games. So, converting a file with -gd3 and then splitting it with -s would have produced the right data. However, you would have to remove the suffix of the two filenames and the header of the first file.
Today I submitted changes to CVS to add the options -mgh and -smgh specifically for this purpose. Please let me know if -mgh & -smgh do not work properly for HiROM games with sizes other than 16 Mbit.
Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Thu May 11, 2017 4:29 pm    Post subject: Reply with quote

dbjh wrote:
It depends on what you mean by properly. The format you described is the simplest interleaved format, which is used by the Game Doctor SF3 for 16 Mbit HiROM games. So, converting a file with -gd3 and then splitting it with -s would have produced the right data. However, you would have to remove the suffix of the two filenames and the header of the first file.
Today I submitted changes to CVS to add the options -mgh and -smgh specifically for this purpose. Please let me know if -mgh & -smgh do not work properly for HiROM games with sizes other than 16 Mbit.


Hello dbjh, first let me take this opportunity to thank you for that great tool that Ucon 64 is Wink
What I meant by "properly" is that the --mgd option which is supposed to work for the MGH, does not ouput the proper format for hirom games.

I'm currently traveling. When I get back I'll post some more documentation about the MGH I found in some BBS archives. Some features could be implemented in Ucon64.
For instance there's this .MGH file that is used along the ROM to add a long filename display or load 24M roms. You can have a look at Ucon1.41 in the meantime.
Here's what you can find in its doc:
Code:

=======================

[n]  Create MGH name file.

This command is one of use to Multi-Game Hunter (MGH) users.  It will create
a name file (.MGH) to accompany an image.  The title of the image will be
saved in the file, and the MGH will display the title when the filename is
selected.

On áetas with improper info, or if you prefer to use your own name, you can
insert your own name by following the filename with a name.

NOTE:  In order for the MGH to display the name of a Sega Genesis image,
       the image MUST be in Multi Game Doctor II (MGD2) format.

 i.e. uCON n cen-nhlf.smc NHL'94
      uCON n mdsonica.078 "Sonic 3"   <-- Notice the use of quotes to
                                          preserve spacing.


IV. Miscellaneous MGH notes

This section of the documentation has some notes that every MGH user should
know.  If you have anything to add, please let me know.

a. On the Super NES, the MGH will only load files divisible by a
   Megabit (131,072 bytes), regardless of format.
b. On the Sega Genesis, the MGH will load files of any length.
c. On the Super NES, filenames must start with the characters SF.
d. On the Sega Genesis, filenames must start with the characters MD.
e. On the Sega Genesis, files in MGD2 format must have an extension
   with 0 as the first character.  (As in .0xx)
f. On the Sega Genesis, files in SMD format must not have an extention.
g. On the Sega Genesis, there is a bug causing any filename that ends
   in S (such as MDxxxxxS.xxx) to load, but then reset to the MGH.
h. On the Sega Genesis, files must be in MGD2 format in order for a MGH
   name file to be displayed.


Another interesting feature that could be added to Ucon64 is the possiblity to send roms to the Double Pro Fighter. There is no source available but a couple of old DOS tools used to do it. The official one is MDL.exe that you can maybe find on this forum. But this is another topic so I'll open up a new thread for it.
Back to top
View user's profile Send private message
dbjh



Joined: 02 Aug 2003
Posts: 167

PostPosted: Fri May 12, 2017 3:15 am    Post subject: Reply with quote

Mystic_Merlin wrote:
Hello dbjh, first let me take this opportunity to thank you for that great tool that Ucon 64 is :wink:

Thank you very much :-) I have only made part of it. It is the result of code and contributions of quite a few people.

Mystic_Merlin wrote:
What I meant by "properly" is that the --mgd option which is supposed to work for the MGH, does not ouput the proper format for hirom games.

Indeed it does not. However, if you are in the position to compile the latest code in CVS you will be able to use -mgh which should. And -smgh (not -s) will split the file while producing filenames suitable for the MGH.

Mystic_Merlin wrote:
I'm currently traveling. When I get back I'll post some more documentation about the MGH I found in some BBS archives. Some features could be implemented in Ucon64.

Well, if it's worth the time investment for developing those features. BTW my impression of the information in BBS archives is that it is not trustworthy. So, if there is anything you would like to see in uCON64 my request is that you verify the information *and* are willing to test the features once they have been implemented.
One example of something I will not implement is I/O over USB to the UFOSD. The time investment for reverse engineering the existing transfer tool to implement that in uCON64 would he huge (for me) while not adding significant functionality (just copy the files to/from an SD card).

Mystic_Merlin wrote:
For instance there's this .MGH file that is used along the ROM to add a long filename display or load 24M roms. You can have a look at Ucon1.41 in the meantime.

Do I understand you correctly that a name file is required to load 24M files? Is the implementation of uCON 1.41 correct?

Mystic_Merlin wrote:
Another interesting feature that could be added to Ucon64 is the possiblity to send roms to the Double Pro Fighter. There is no source available but a couple of old DOS tools used to do it. The official one is MDL.exe that you can maybe find on this forum. But this is another topic so I'll open up a new thread for it.

If you open a new thread please let me know.
So, -xfig{s, c} do not work for the Double Pro Fighter... I don't want to give you false hope, but don't count on it. I don't own a Double Pro Fighter and "blindly" reverse engineering such a tool is a very time intensive task both for me and an owner of a Double Pro Fighter willing to test. At the time reverse engineering VGS took me about 3 weeks (as in about 21 days). It should take less time now. Of course, I am now getting a bit curious, so if MDL.exe turns out to be a small executable I will have a look at it.

[Edit]
I started looking for MDL.exe and then I found this page ;-) which mentions that it works with both uCON64 and MDL. Is there another configuration that does not work or is that information incorrect?
Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Fri May 12, 2017 12:52 pm    Post subject: Reply with quote

dbjh wrote:

Do I understand you correctly that a name file is required to load 24M files? Is the implementation of uCON 1.41 correct?


Correct. By the time Ucon1.41 was released, it didn't fully support those .MGH files, only the bare functionalities for SNES naming with the -n option as quoted in the doc.

.MGH files are more complex than .MGD text files. They are handled differently between SNES and MD.
I was working on it a few months ago but I was waiting on making and testing the MD cart interface to document it.
From what I remember on the SNES, you can generate 2 types of .MGH file:

- a 16B .MGH "naming" file. The first 8B is a header while the last 8B contains the long filename for the rom.
For example, if you have those 2 files on a floppy disk:
SFBOMBA
SFBOMBA.MGH
The full name SUPER BOMBERMAN will be displayed in yellow/green next to the rom name in yellow/red.
This feature is supported in Ucon1.41

- a bigger .MGH file used to load 24M roms. I came across one of those in an archive released for Muscle Bomber which I believe was the first 24M rom. There was a doc explaining how it was used in conjunction with the SWAPPER tool to run it on the MGH. There was also some explanation on how .MGH files are handled on the MD. Apparently you can select a font color changing specific bytes.
I'll post all that when I get back Wink

dbjh wrote:

If you open a new thread please let me know.
So, -xfig{s, c} do not work for the Double Pro Fighter... I don't want to give you false hope, but don't count on it. I don't own a Double Pro Fighter and "blindly" reverse engineering such a tool is a very time intensive task both for me and an owner of a Double Pro Fighter willing to test. At the time reverse engineering VGS took me about 3 weeks (as in about 21 days). It should take less time now. Of course, I am now getting a bit curious, so if MDL.exe turns out to be a small executable I will have a look at it.

[Edit]
I started looking for MDL.exe and then I found this page Wink which mentions that it works with both uCON64 and MDL. Is there another configuration that does not work or is that information incorrect?


Well it is mentionned "ucon64/SDL" and "MDL", meaning SDL (SNES) is pretty much similar to VGS hence supported by Ucon64. MDL (MD) is different and from memory, only 2-3 softwares supported sending to the MD side of the DPF.

I understand reverse engineering these softwares could be very time consuming. I was wondering if capturing data with a logic analyzer on the parallel port wouldn't be easier.
Unfortunately it seems that my DPF parallel adapter is no longer working properly, I might ask Tomy to send me a new PEEL to run some more tests.

On a final note, but that would be yet another thread Razz , I own a Gamars FC-301 and 2 late revisions of the ALMA F16 with bios 7.3. These machines also have a proprietary format to handle roms. Once I gathered enough information about it I'll forward them to you if it serves any purpose Wink
Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Sat Jun 03, 2017 12:11 pm    Post subject: Reply with quote

Following up on the MGH control / TAG files.
I chose to continue on this topic rather than creating a new one as it is somewhat related.

So here's the story. I came across an interesting archive from '94 by ClockWork Orange from ICS.
I believe he figured out, reverse engineering the SNES code on the MGH rom, that you could add what he called "MGH-Tag" files.
Those files are 32 bytes minimum and up to 512.

Their purpose is the following:
1- Add a 15 characters ASCII description to the corresponding game
2- Add some graphic characters for the description (useful for chinese or japanese since those character maps are not included in the rom)
2- Add some control files to load >16M games or some other special games.

So far I only tested the first function on the SNES as I have yet to get the MD adapter and upgrade my mem board.
This is very simple to make as all you need is a 32 bytes file like that:
Code:

4D 47 48 1A 00 00 00 00 00 00 00 00 00 00 00 00 MGH.............
47 61 6D 65 20 4E 61 6D 65 20 48 65 72 65 20 FF Game Name Here ÿ


The file needs to be saved as a .MGH file with the same exact name of the game you're loading, without the extension.
As for the example on the attached archive:
SFJOEMAC ---> Game name
SFJOEMAC.MGH ---> Tag Name

You can see what it looks like on the picture below.

Here's some deeper explanation of the format by ClockWork Orange that you'll find in the enclosed archive. It also come with some samples for SNES/MD along with some basic tools he made for Atari ST.

You'll also notice on the second text file he's mentioning there are 2 types of Hi-Rom adapters for the MGH. I posted a pic of mine on this thread. If you have another one, please post it.

MGH-TAG 1 wrote:
This is what Venus forgot to tell you about. The format (or even existance!)
of MGH-tag files. Tag files are available to you for 2 reasons. The first is
to allow you to run a 'special' game with some 'extra' code. The best example
is the first file that I knew of for Street Fighter 2 Turbo. This was a
2048 byte .MGH file that showed the title of the game next to the directory
entry, and allowed the MGH to load the game properly from 4 parts. (which the
MGH will not normally do). The second is probably the text which appears on
the screen. This is a nice touch that Venus didn't mention. I would guess that
the real reason behind this is that it allows Asian users to add in the games
title in proper Chinese characters (which the MGH does NOT have in ROM).
An MGH tag file should have the SAME name as the matching file, with the
file-extension '.MGH'.

SNES .MGH format:
dc.b 'MGH',$1a
dc.b $0F ;colour 1&2 - explained below
dc.b $FF ;colour 3&4...
dc.b 0
dc.b 0 ;0-means name ONLY, $C0 means CONTROL file
dc.b 0,0,0,0,0,0,0
dc.b 'Title of game ',$FF ;15 character string to display

bytes 32-512 are a 'graphic' that you can create if you'd rather display this
then text. This is useful to create a Chinese name for the game.

This is in essance what the header of the SNES .MGH file looks like. The .MGH
file is loaded at address $E00. With the control byte set, the MGH will look for
executable code at address $1000. The colour bytes are only used for the
graphic (if present) and NOT for the ASCII string that you use.


The Genesis side appears to REQUIRE that you 'draw' to the screen. The graphic
that you use will appear in the box at the bottom. You have 2 lines of 15,
8x8 cells available to you. A Genesis .MGH file should be 512 bytes long.

For example: If you wanted the letter 'A' to appear in the first position, and
you defined the cell as the 8 bytes:$18,$24,$42,$42,$7E,$42,$42,0, then you
create an .MGH file with the format:

dc.b 'MGH',0 ;$1a is not needed on the Genesis side...
dc.b $0F,$23 ;colour1=blue (background)
;colour2=white
;colour3=green
;colour4=light green
dcb.b 26,0 ;26 zeros follow...
byte32 dc.b $18,$24,$42,$42,$7E,$42,$42,0,0,0,0,0,0,0,0,0
bytes40-512 should be 0's

since there are 2 bit-planes you will see the letter 'A' in white.
For green: dc.b 0,0,0,0,0,0,0,0,$18,$24,$42,$42,$7E,$42,$42,0
For light green: dc.b $18,$24,$42,$42,$7E,$42,$42,0
dc.b $18,$24,$42,$42,$7E,$42,$42,0
or you can of course 'stripe' and mix and match your colours as you like

The available colours are:
0=dark blue, 1=dark red, 2=green, 3=light green, 4=black, 5=purple,
6=light blue, 7=dark grey, 8=light grey, 9=red, 10=green, 11=yellow
12=light blue, 13=purple, 14=light blue, 15=white

I do not have access to a good Z-80 disassembler, and am NOT able to hack the
Genesis side of the MGH ROM's. I don't know if the control byte works the
same way on the Genesis side or not. The control byte can be useful on SNES. I
have successfully split an 8Mbit game into 2 4Mbit halves, and successfully
loaded the game on the MGH at the PROPER addresses using an .MGH control file.
From what I have seen of the ROMs, a 'Software Extension' works in a similar
manner. (This is what the 'Execute' under Tools is for) I will be able in the
near future to write proper/useful software extensions for splitting/joining
files and anything else that appears useful. However the Mgh that I now use is
faulty, and will not allow me to upgrade the DOS in the machine, so I cannot
test these ideas.

It seems that there is no one out there who has taken an interest in
programming on the MGH. If you are interested and capable of creating useful
software on the MGH, I can be contacted on STampede BBS is Florida/USA
---------------------------------------------------------------------------
Atari users should be on the look-out for my MGH util which is nearing it's
first general release. My util will convert to and from: SNES-Game Doctor,
Super Magic Com (Wild card), and Pro Fighter formats. Genesis-Game Doctor,
Magic Drive, Binary. It also allows you to add and create IPS and Baseline
trainer patches (withOUT converting to SMC first!) Decode/Encode Game Genie/
Game Finger codes for SNES and Genesis (no GF on Genesis, but absolute are
useful for programmers) All file informations. Create/alter .MGH files.
Split/join files... All in a unique GEM interface, MultiTos complient.

Until then, get in touch! - ClockWork Orange/ICS

----------------------------------------------------------------------------
I'll include a couple of sample .MGH files in this archive for both machines
so you can see EXACTLY what I mean...

SFJOEMAC.MGH is for the SNES game 'Joe and Mac'
MDGNG.MGH is for the Genesis game Ghoul's and Ghosts

I am also including the Atari Tag-file program that I wrote awhile back. This
will create tag-files for SNES only... read the docs.


MGH-TAG 2 wrote:

All code and ideas by ClockWork Orange - April 1994

There had to be a better way to handle those odd files on the Multi
Game Hunter... this is one way.

This is a set of .MGH files that you need. In this archive are the
following:


SFSLAM_A.MGH - loads Muscle Bomber in PRO FIGHTER (unconverted) format
(24M HiRom) in 1,2,3,4,5,6... part files. The files should be named
as SFSLAM_A.024, SFSLAM_B.024, SFSLAM_C.024...
I tested the game as 2-12Mbit, 3-8Mbit, and 6-4Mbit
files in Super Pro Fighter format and it RAN ALL TIMES
This file can be easily modified to handle 'other' 24
Mbit HiRom files. (see below)

SFMETROA.MGH - loads Super Metroid in MGH format and RUNS! There is a
(24M Normal) catch though!!! You MUST use the OLD HiRom adapter,
the game will NOT run with the new 24Mbit HiRom adapter.
(Swapper should be turned OFF)

SFLESTER.MGH - This will load SMC/FIG/MGH files directly, in
(16M Normal/ multi-parts. We even converted a Pro Fighter game to
NON-MGH- 1Mbit+3Mbit+11Mbit and it loaded perfectly. This code
HiRom) will NOT load HiRom games > 16Mbit, it will NOT load
properly MGH HiRom games that are NOT=16Mbit (but we
don't need it for that anyways). The indicators for
Header, HiRom, and multi-part will show on the screen
when the file is loading (if detected).
This will allow you to load MGH files that are MORE
then 2-parts, or SMC files with a proper multi-load
header directly, or SWC/FIG HiRom files without needing
to convert them to MGD format.

If the game is without a header (ie: MGH format) then it will continue
to prompt you for "Next Disk and Press <A>", simply hit <B> when the
last file has loaded to play the game.

With these 3 files you will no longer need to convert ~any~ file that
you download!

Programming notes:
A program can be quickly and easily written for an end user to
generate the appropriate .MGH file needed. The program need only
modify the following for each gamefile:
start+$10=dirname, 15 bytes ;name that appears on directory
start+$200=filename, 11 bytes ;the games filename
start+$22B=gametitle, 28 bytes ;one screen line to show gamename
start+$24D=company, 28 bytes ;one screen line to show company

- Headers are detected by comparing the filesize with 512bytes odd, in
psuedo-code: and.l #$200,filesize, beq no_header... trainers work Smile
- HiRom is detected by either bit 4, of byte 3 being set (Wild
Card=$10), or by bit 7 of byte 4 (Fighter=$80). Therefore if the
header is incorrectly written, it will not be recognised.
- Multi-part is detected by bit 6 being set in byte 3 (SWC or FIG).
The program will increment the 7th byte of the filename, and seek the
file, if not found the user will be prompted for the next disk. The
LAST file should NOT mark the header-byte, which will cause loading
multi-part to cease.
- The multi function loader (SFLESTER.MGH) will ONLY load MGH HiRom
games that are 16Mbit properly!!! So it should NOT be used for MGH
HiRom format files.
- The MGH 24Mbit ASIC splits memory with the 3rd meg in between the 1st
and 2nd... this is why you need special loaders for 24Mbit games.
MGH HiRom games are read with SFFILE_A.008 at bank 0, and SFFILE_B.008
at bank $100, likewise normal games are read from bank $0-80, then
$100-180, then $80-100 (Metroid)
- The .MGH files do not use pre-determined file sizes, so they can be
split into different sizes (divisible by 8kbytes)

If you write a program that modifies these files then PLEASE don't
remove my name..... I've yet to get any greets in the console world!

~ClockWork Orange/ICS '94

Multi Game Hunter users with Atari computers will be happy to know
that my MGH util is going through it's final debugging and will be
released soon. The util is a completely windowed file convertor for
both SNES/Genesis with loads of extras including Game Genie, file
infos, splitting/joining, IPS, BSL, and MGH tag-files.

Watch for it!



20170602_174125.jpg
 Description:
 Filesize:  184.98 KB
 Viewed:  12928 Time(s)

20170602_174125.jpg



MGH-TAG.zip
 Description:

Download
 Filename:  MGH-TAG.zip
 Filesize:  10 KB
 Downloaded:  489 Time(s)

Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Mon Jun 12, 2017 11:17 am    Post subject: Reply with quote

Some more digging as I've been experimenting with that SFLESTER.MGH and thought I'd rather put that down before I forget about it.

2 corrections from the last post:

- what ClockWork Orange refers to as "the OLD HiRom adapter" (in MGH-TAG 2) is most certainly the first SNES passthrough adapter that contained no logic and actually was not able to load any HiRom game. That should have been striking me (thanks dbjh Wink) since Super Metroid is a LoRom game...
I still find odd that you can't use the new adapter but I'll try once I upgraded my ram board

- Those MGH-TAG files can be bigger than 512 Bytes as this SFLESTER.MGH proves it.
ClockWork Orange really worked his way through this machine as it looks like he's injecting code after the 512 Bytes.

Here is the name convention for MGH files on the SNES:
SFxxxxxA.008
"SF" or "MD" for SNES or Megadrive
"xxxxx" can be anything
"A","B","C"... if this is a multi-file game
".008", ".016"... is the file extension and indicates the game size. It's not mandatory but it's safer to have it.
If your Rom is a LoRom then the name can be as short as "SF" without any extension

The SFLESTER.MGH is very interesting for most 16M MGH owners, it's a multi function loader.
With this file as a sample, you can use any FIG or SMC rom, including HiRom.

All you need is to change the 15 bytes rom description here:
Code:
4D 47 48 1A 0F FF 00 C0 00 00 00 00 00 00 00 00 MGH..ÿ.À........
4C 65 73 74 65 72 20 74 68 65 20 55 6E 6C 69 FF Lester the Unliÿ


The filename it's referring to at 0x200:
Code:
53 46 4C 45 53 54 45 52 30 30 38 FE 02 0A F6 1C SFLESTER008þ..ö.


The 28 bytes description at 0x22B:
Code:
61 64 69 6E 67 F3 FE 02 0B FD 04 20 20 20 20 4C adingóþ..ý.    L
65 73 74 65 72 20 74 68 65 20 55 6E 6C 69 6B 65 ester the Unlike
6C 79 20 20 20 20 20 F3 FE 02 0D FD 04 20 20 20 ly     óþ..ý.   


The 28 bytes company name at 0x24D:
Code:
6C 79 20 20 20 20 20 F3 FE 02 0D FD 04 20 20 20 ly     óþ..ý.   
20 20 20 20 20 62 79 20 48 65 63 74 2F 44 54 4D      by Hect/DTM
43 20 20 20 20 20 20 20 20 F3 FE 09 17 FD 08 4D C        óþ..ý.M


It's a neat little hack as not only does it provide an easier way and flexibility to load roms but also it's the only copier I know able to display a 28 bytes description, or up to 56 with the company name.



MGH_CLCKWK2.jpg
 Description:
Here's what the MFL (Multi Function Loader) looks like from left to right, top to bottom:
- original loading screen
- MFL header less rom (this will work with LoRom but not HiRom)
- MFL headered HiRom
- MFL headered multi-file HiRom
 Filesize:  131.99 KB
 Viewed:  12866 Time(s)

MGH_CLCKWK2.jpg


Back to top
View user's profile Send private message
dbjh



Joined: 02 Aug 2003
Posts: 167

PostPosted: Sat Jun 17, 2017 2:52 pm    Post subject: Reply with quote

Thanks a lot for posting those screenshots. It makes things much clearer.
About the naming convention, it's actually (for SNES) SFxxxxxy[.0zz], based on the information you provided and posted in this thread, with [] meaning an optional part. x can be any character supported by the MGH, but so can y. Only when y is A will the MGH get in a multi-file state. And when it's in that state will the 8th character be interpreted. That's why you can have filenames like SFLESTER.008 with y being R. That is how I have implemented it in the latest WIP build of uCON64.
Talking about the WIP build: I ended up using slightly improved code of the original uCON for creating MGH name files. For SNES it matches what you posted here. --mgh and --smgh produce those files. For Genesis/Mega Drive it differs though. ClockWork Orange should have been more verbose (and less sloppy!) instead of only providing an example of displaying a single character, but even that differs from what the old uCON does. uCON added support for MGH name files for Genesis/Mega Drive with version 1.2. Several versions were released after that, admittedly in a short time frame. Regardless, I tend to trust working code more than documentation with errors :-P I don't think it helps much if I would try to explain what the code does in general terms, but the short version is: uCON specifies a character in two ranges of data, where the top half is specified in the first range and the bottom half in the second. See the loop that starts at line 512 here.
Back to top
View user's profile Send private message
Mystic_Merlin



Joined: 15 Oct 2007
Posts: 496
Location: Bangkok

PostPosted: Tue Jun 20, 2017 10:48 am    Post subject: Reply with quote

dbjh wrote:
Thanks a lot for posting those screenshots. It makes things much clearer.

Wink
dbjh wrote:
About the naming convention, it's actually (for SNES) SFxxxxxy[.0zz], based on the information you provided and posted in this thread, with [] meaning an optional part. x can be any character supported by the MGH, but so can y. Only when y is A will the MGH get in a multi-file state. And when it's in that state will the 8th character be interpreted. That's why you can have filenames like SFLESTER.008 with y being R. That is how I have implemented it in the latest WIP build of uCON64.

Correct! Tested on the last build and working.
dbjh wrote:

Talking about the WIP build: I ended up using slightly improved code of the original uCON for creating MGH name files. For SNES it matches what you posted here. --mgh and --smgh produce those files. For Genesis/Mega Drive it differs though. ClockWork Orange should have been more verbose (and less sloppy!) instead of only providing an example of displaying a single character, but even that differs from what the old uCON does. uCON added support for MGH name files for Genesis/Mega Drive with version 1.2. Several versions were released after that, admittedly in a short time frame. Regardless, I tend to trust working code more than documentation with errors Razz I don't think it helps much if I would try to explain what the code does in general terms, but the short version is: uCON specifies a character in two ranges of data, where the top half is specified in the first range and the bottom half in the second. See the loop that starts at line 512 here.

Nice work, we're getting there!

Coincidentally, a guy just posted a complete demo of both SNES and MD interfaces 3 days ago:
https://www.youtube.com/watch?v=Ab-BhxlJfBU
He must have been watching this space Razz
Back to top
View user's profile Send private message
Mgh



Joined: 16 Jul 2020
Posts: 3

PostPosted: Fri Jul 17, 2020 4:21 am    Post subject: Reply with quote

Mystic_Merlin wrote:

corrections from the last post:

- what ClockWork Orange refers to as "the OLD HiRom adapter" (in MGH-TAG 2) is most certainly the first SNES passthrough adapter that contained no logic and actually was not able to load any HiRom game. That should have been striking me (thanks dbjh Wink) since Super Metroid is a LoRom game...
I still find odd that you can't use the new adapter but I'll try once I upgraded my ram board



Hi. I recently bought a faulty mgh bundle that came with 2 grey SNES adaptors. One of the adaptors was a pass through and the other had one ic, from memory a gal chip. It was my hunch after reading all the great info You posted may I ad, that the adaptor with the ic is the old HiROM adaptor that clockwork was talking about. I managed to get my copier working briefly and tested a 16m HiROM game with both adaptors. The pass through didn’t display a thing but the adaptor with the gal played the game but with corrupted backgrounds. My hunch is that I have to first run the swapper program that you posted before running the riom to fix the backgrounds. Unfortunately my mgh is playing up again so I cannot test. If I manage to repair it I’ll report back with the results.
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 1, 2  Next
Page 1 of 2

 
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