Virtual Console - Mega Drive/Genesis Rom Injection Guide

Discussion in 'Wii - Hacking' started by RadioShadow, Feb 24, 2009.

  1. RadioShadow
    OP

    Member RadioShadow GBAtemp Advanced Fan

    Joined:
    Aug 30, 2007
    Messages:
    525
    Location:
    UK
    Country:
    United Kingdom
    <div align="center"><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Virtual Console - Mega Drive/Genesis Rom Injection Guide - By RadioShadow<!--sizec--></span><!--/sizec--></div>

    <div align="center"><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo--><b>I TAKE NO RESPONSIBILITY IF THE WAD YOU EDITED BRICKS YOUR WII WHEN YOU INSTALL IT ONTO YOUR WII. PROCEED TO FOLLOWING THE GUIDE AT YOU OWN RISK!</b><!--sizec--></span><!--/sizec--></div>

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Required Files:<!--sizec--></span><!--/sizec-->
    - A Mega Drive/Genesis ROM in ".bin" format.
    - A Wii Virtual Console Sega Mega Drive/Genesis WAD (doesn't matter what region).
    - <a href="http://www.filefactory.com/file/af2d4h2/n/Mega_Drive_zip" target="_blank">These tools.</a>

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Stage 1 - Unpacking the WAD Files<!--sizec--></span><!--/sizec-->
    Warning: Spoilers inside!

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Stage 2 - Making the Image Files<!--sizec--></span><!--/sizec-->
    Warning: Spoilers inside!

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Stage 3 - Editing the Banner and Icon Files<!--sizec--></span><!--/sizec-->
    Warning: Spoilers inside!

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Stage 4 - Injecting the ROM and Save Banner Files<!--sizec--></span><!--/sizec-->
    Warning: Spoilers inside!

    <!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Stage 5 – Packing the WAD Files<!--sizec--></span><!--/sizec-->
    Warning: Spoilers inside!
     


  2. RadioShadow
    OP

    Member RadioShadow GBAtemp Advanced Fan

    Joined:
    Aug 30, 2007
    Messages:
    525
    Location:
    UK
    Country:
    United Kingdom
    I'm just putting some notes here. It might interest some. I also plan to update the guide at some point this month.


    Okay, there seems to be three different versions of the MD WAD:

    Version 1 [Sonic The Hedgehog]:
    - Analogue Stick doesn't work on Classic Controller/Gamecube.
    - Don't support PAL Component Fix.
    - Not all have 6 button controller support.
    - The Save Banner is called "banner_xx.wte" (xx = region)
    - In the "misc_ccf_zlib" folder is a file calleed "wii_vc.txt". The necessary text messages for the necessary languages.

    Version 2 [Streets of Rage 2] (the one this guide refers to):
    - Analogue Stick works on Classic Controller/Gamecube.
    - Supports PAL Component Fix.
    - All have 6 button controller support.
    - The Save Banner is now just called "banner.wte"
    - No "wii_vc.txt" file in the "misc_ccf_zlib" folder. The text message is in the emulator instead.
    - Some contain a "patch" file (may or may not have data in). If a certain rom is detected, then changes are made to the emulator (like skipping the checksum). An injected rom won't use the patch.

    Version 3 [Pulseman] (US/EU):
    - Analogue Stick works on Classic Controller/Gamecube.
    - Supports PAL Component Fix.
    - All have 6 button controller support.
    - In the config file, some contain an option to adjust the brightness.
    - In the config file, the volume can increased. Default is set to +6.5.
    - In the config file, Machine Country can be set to Japan, USA or Europe.
    - In the config file is a "console.machine_arch" option set to "md". No idea what this option does.
    - In the "misc_ccf_zlib" folder, there is a "comment" file. Contains the text for both lines which can easily be edited (before only the first line of text could be edited and the second line text was determined on what country was set in the config file). Seems to only support ASCII (let to try UNICODE).
    - In the "data_ccf" folder are three files: "emu_m68kbase.rso", "tsdevp.rso", "md.rso" & "se_vc.sel". No idea what they do but the "config" file says it is something to do with the "modules" (my guess is it modifies the emulator).
    - Also in the "data_ccf" is a "tsdevp.rso" file. No idea what it does but the config say it is something to do with the "snd.snddrv".


    I also managed to download "Columns III". This is the only "Version 2" WAD which has support to allow "5 Players". Pengo is the only other WAD that allows "4 Players" but only released on the Japan VC and I don't have the WAD.

    Anyway, if you want to use a game which supports 3-8 players (uses the 4 Player Multitap), then use "Columns III". In the "config" file you will notice these two options:
    -machine_md.use_4ptap="2"
    -nplayers="5"

    The first option tells the emulator which controller port the multitap is connected to. Put:
    - "1" for it to connect in Controller Port 1.
    - "2" for it to connect in Controller Port 2.
    - "3" for it to connect in Controller Port 1 and another one connected in Controller Port 2.

    The second option tells the emulator how many controllers are connected. The number can be between 1-8. If the number is between 5-8, then an option will be activated. By holding '-' on the Wii Remote during gameplay, it will allow you to select which Wii Remotes/Gamecube Controllers are connected to which Controller Port. This option is disabled if the number is between '1-4'.

    There are two types of Multitaps. The EA and SEGA. The emulator is set up to support the "SEGA" one, but this is comptaible with the EA supported games, so that won't be a problem.

    A list of Sega Multiplayer games can be found here if you want to try injecting some multiplayer games: http://www.digitpress.com/forum/showthread.php?p=1402263

    I did try "Double Dribble - Playoff Edition" which is a 8 Player game. The rom didn't work very well since as soon as a match started, the ball just bounced up and down and I couldn't move the players. However I was able to set up the game with 4 Wii Remotes and 4 Gamecube Controllers. So 8 players is possible. The Lost Vikings, which is a three player game, works perfectly. The game is surprisingly fun and I plan to record a video of it.


    Also I have found out in Version 2 of the WAD, you can add these options to the config file:

    console.brightness="87"
    console.machine_country="jp"

    The first option must be a number between 0-100. Useful if you need to adjust the brightness in a game.
    The second option can be:
    "jp" [Japan]
    "us" [USA]
    "eu" [Europe]

    This option is useful if you want to say run Streets of Rage in Japanese (title becomes Bare Knuckles) or play Bare Knuckle 3 without modifying the rom (only runs if the country is set to "jp") while keeping the correct "country" setting (in my case "us" so the Wii Buttons/Text that appear in the Emulator will still be in English and the correct TV setting).
     
  3. Dteyn

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    Country:
    Canada
    Thanks for the update, RadioShadow. It's very interesting to see the variations in MD WADs. I also noticed there are some more variables hidden inside the 00000001.app executable, viewing with a hex editor reveals a couple, but doesn't tell us what the options are or if they'll even work or not. I don't quite have time right now to go through and list them, but for instance starting at 0x14F7A8 in the Streets of Rage 2 emulator (00000001.app) you can see the following:

    CODE0014F7A8 8000 AFC4 8000 AFCC 2573 3A25 643A 2027 2573 2720 6661 696C 6564 0A00 6F75 7420 213D 204E 554C 4C00 ........%s:%d: '%s' failed..out != NULL.
    0014F7D0 616F 2E65 712E 7072 6561 6D70 0000 0000 616F 2E65 712E 6D6F 6465 0000 0000 0000 2573 3A25 643A 2075 ao.eq.preamp....ao.eq.mode......%s:%d: u
    0014F7F8 6E74 6572 6D69 6E61 7465 6420 7374 7269 6E67 0A00 2573 3A25 643A 2027 2573 2720 6661 696C 6564 0A00 nterminated string..%s:%d: '%s' failed..
    0014F820 7374 7220 213D 204E 554C 4C00 2573 3A25 643A 2073 796E 7461 7820 6572 726F 7220 6174 2065 6E64 206F str != NULL.%s:%d: syntax error at end o
    0014F848 6620 696E 7075 740A 0000 0000 2573 3A25 643A 2073 796E 7461 7820 6572 726F 7220 6265 666F 7265 2027 f input.....%s:%d: syntax error before '
    0014F870 2573 270A 0000 0000 2573 3A20 6E6F 7420 666F 756E 640A 0000 2573 3A20 6261 6420 6669 6C65 0A00 0000 %s'.....%s: not found...%s: bad file....
    0014F898 2573 3A25 643A 2027 2573 2720 6661 696C 6564 0A00 636F 6E73 6F6C 652E 6300 0000 6473 7420 213D 204E %s:%d: '%s' failed..console.c...dst != N
    0014F8C0 554C 4C00 0000 0000 636F 6E73 6F6C 6520 213D 204E 554C 4C00 636F 6E73 6F6C 652D 3E72 6566 5F63 6F75 ULL.....console != NULL.console->ref_cou
    0014F8E8 6E74 203E 2030 0000 636F 6E73 6F6C 652E 6272 6967 6874 6E65 7373 0000 6920 3E3D 2030 2026 2620 6920 nt > 0..console.brightness..i >= 0 && i
    0014F910 3C20 4E43 4F4E 5452 4F4C 4C45 5253 0000 636F 6E73 6F6C 652D 3E6D 6163 6869 6E65 2021 3D20 4E55 4C4C < NCONTROLLERS..console->machine != NULL
    0014F938 0000 0000 636F 6E73 6F6C 655F 6C6F 6164 0000 0000 636F 6E73 6F6C 652D 3E6D 6163 6869 6E65 203D 3D20 ....console_load....console->machine ==
    0014F960 4E55 4C4C 0000 0000 2573 3A20 6261 6420 6172 6368 0A00 0000 636F 6E73 6F6C 652E 6D61 6368 696E 655F NULL....%s: bad arch....console.machine_
    0014F988 636F 756E 7472 7900 736E 642E 6E65 732E 626F 6F73 7400 0000 736E 642E 7473 6465 762B 2E62 6F6F 7374 country.snd.nes.boost...snd.tsdev+.boost
    0014F9B0 0000 0000 736E 642E 736E 6464 7276 0000 6E70 6C61 7965 7273 0000 0000 6D61 6368 696E 655F 6D64 2E75 ....snd.snddrv..nplayers....machine_md.u
    0014F9D8 7365 5F34 7074 6170 0000 0000 636F 6E73 6F6C 652D 3E66 7265 657A 655F 636F 756E 7420 3E20 3000 0000 se_4ptap....console->freeze_count > 0...
    0014FA00 2573 3A25 643A 2027 2573 2720 6661 696C 6564 0A00 7069 6E20 213D 204E 554C 4C00 7069 6E2D 3E72 6566 %s:%d: '%s' failed..pin != NULL.pin->ref
    0014FA28 5F63 6F75 6E74 203E 2030 0000 0000 0000 6164 645F 6E76 635F 6765 745F 6300 0000 2573 3A20 6261 6420 _count > 0......add_nvc_get_c...%s: bad
    0014FA50 737A 0A00 8000 E160 8000 E17C 8000 E1A4 8000 E268 8000 E274 8000 E280 8000 E28C 8000 E2A8 8000 E2D0 sz.....`...|.......h...t................
    0014FA78 8000 E2FC 8000 E158 8000 E158 0000 0000 8000 E64C 8002 4404 8002 48B8 8002 48C0 8002 4A38 8002 4D34 .......X...X.......L..D...H...H...J8..M4
    0014FAA0 7369 7A65 6F66 2873 7472 7563 7420 6370 755F 6D36 386B 2920 3D20 3078 2578 0A00 2573 3A25 643A 2027 sizeof(struct cpu_m68k) = 0x%x..%s:%d: '
    0014FAC8 2573 2720 6661 696C 6564 0A00 6370 755F 6D36 386B 2E63 0000 6920 3E3D 2030 2026 2620 6920 3C3D 2032 %s' failed..cpu_m68k.c..i >= 0 && i
     
  4. RadioShadow
    OP

    Member RadioShadow GBAtemp Advanced Fan

    Joined:
    Aug 30, 2007
    Messages:
    525
    Location:
    UK
    Country:
    United Kingdom
    For those PAL users who want to run their games in 60Hz, it's now possible. Well only in NTSC and you can't run the Channel from a SD Card but it's better than nothing. Simply put this NAND loader can be injected into the WAD which will allow to set the channel so it always runs in NTSC! If using a Version 1 or 2 WAD, the country must be set to JP or US. Doesn't matter for Version 3. I plan on adding that task to the guide.

    Also I have discovered the Version 3 WAD loads the required language settings for the buttons/text for the Wii Menu, Reset, Operating Manual depend on the Wii's TV setting and Console Language selected:

    If NTSC is set (or forced):
    Japanese = Japanese
    English = English
    French = French
    German = English
    Spanish = Spanish
    Italian = English
    Dutch = English

    If PAL is set (or forced):
    Japanese = English
    English = English
    French = French
    German = German
    Spanish = Spanish
    Italian = Italian
    Dutch = Dutch

    Why SEGA couldn't just make it load the desire language the console has been set to is strange. Then the fact SEGA haven't bother about putting in a PAL60 settings is more strange.
     
  5. RadioShadow
    OP

    Member RadioShadow GBAtemp Advanced Fan

    Joined:
    Aug 30, 2007
    Messages:
    525
    Location:
    UK
    Country:
    United Kingdom
    Some more news to report! One which is sweet news!

    For WADs that have "save_sram="1", this means if a game saves data like Sonic 3 or Phantasy Star, it will save it correctly. Check out my notes below but to put it in a nutshell, resetting the game or pressing the "Power" button won't delete the sram data but if the Wii has no power complete, it will lose the sram data (which sucks if you have a power cut).

    // Use if game has a save feature.
    // The manual says "don't reset game while saving", "don't press the home button while saving" & "don't remove power lead while Wii is on".
    // So if the "Reset" button is pressed, SRAM data won't get deleted.
    // If the Wii's Power button is pressed, SRAM data won't get deleted.
    // If the Wii's AC adpater is removed or power connection gets cut off, the SPAM will get deleted (that is retarded).
    // If the game is reset while saving or the home button is pressed while save, the SRAM might not save correctly.
    // 0 = No SRAM Used
    // 1 = SRAM Used


    Phantasy Star for the Master (US/EU version) had the options in the config file to customise the controls! I was hoping a similar option would appear in the later WADs and I just downloaded Pengo (which for some silly reason I thought was released on the VC ages ago ^^') and Earthworm Jim 2 (Yes, the Japanese got it before the west) from the Japan Wii Shop Channel. To my delight, in the config files were options to modify the controls. Here's the data:

    // Earthworm Jim Config
    console.cl_bindings="up=U:down=D:left=L:right=R:+=S:y=A:b=B:a=C:l=X:x=Y:r=Z:zr=M:zl="
    console.core_bindings="up=U:down=D:left=L:right=R:+=S:a=A:1=B:2=C:b="
    console.disable_resetbutton="1"
    console.gc_bindings="up=U:down=D:left=L:right=R:start=S:b=A:a=B:x=C:l=X:y=Y:r=Z:z=M:c="
    console.machine_arch="md"
    console.machine_country="us"
    console.master_volume="+11.0"
    console.volume="10"
    modules="emu_m68kbase tsdevp md se_vc"
    romfile="EarthwormJim2_USA.SGD"
    snd.snddrv="tsdev+"

    // Pengo Config
    console.cl_bindings="up=U:down=D:left=L:right=R:+=S:y=A:b=B:a=C:l=X:x=Y:r=Z:zr=M:zl="
    console.core_bindings="up=U:down=D:left=L:right=R:+=S:a=A:1=B:2=C:b="
    console.gc_bindings="up=U:down=D:left=L:right=R:start=S:b=A:a=B:x=C:l=X:y=Y:r=Z:z=M:c="
    console.machine_arch="md"
    console.machine_country="jp"
    console.master_volume="+11.0"
    console.volume="10"
    machine_md.use_4ptap="2"
    modules="emu_m68kbase tsdevp md se_vc"
    nplayers="4"
    romfile="PepengaPengo.SGD"
    snd.snddrv="tsdev+"


    I know what most of these options do:

    "console.core_binding" = Button configuration for Wii Remote.
    "console.cl_bindings" = Button configuration for Classic Controller.
    "console.gc_bindings" = Button configuration for Gamecube Controller.
    "console.machine_arch" = Tells the emulator to run in Mega Drive "md" or Master System "sms" mode.
    "console.master_volume" = I think it acts like a volume boost.
    "console.volume" = Volume Control. Setting it to "0" turns the sound off.
    "console.machine_country" = Country mode to run the game in. "jp" = Japan, "us" = USA & "eu" = Europe. Earthworm Jim (Genesis) only runs in USA mode so that's why the country is set to "us".
    "machine_md.use_4ptap" = "1" = Mutlitap in Controller Port 1, "2" = Mutlitap in Controller Port 1 & "3" = Mutlitap in Controller Port 1 & 2 (Need to confirm).
    "nplayers" = Number of controllers connected/used. Let to see if 8 players can be done.
    "console.disable_resetbutton" = No idea. I think it has something to do with the controls.

    Keep in mind when modifying the controls that X Y Z and Mode button only work with games that support 6 buttons like Comix Zone and Streets of Rage 3. Most likely the future Mega Drive VC releases will use those settings too. Earthworm Jim 2 being most likely to be the first one for the US/EU release.
     
  6. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    Nice guide but for some reason it wont work for me.

    I follow the steps but here:

    Step 5:
    - Make a copy of the “.SGD” file name.
    - Rename the ROM file in the “Mega Drive” folder with that name (including its file type).
    - Then copy the ROM file to the “data_ccf_OUT” folder, overwriting the original.

    I´ve got a problem. I rename the file as instructed but it wont overwrite the one in the data_ccf_OUT folder... It wont change its format neither, it still stays .bin
     
  7. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    If anyone knows the solution, please answer.

    How do I change the roms .bin format into the needed .zlib format?

    This is the last "barricade" I must overcome.
     
  8. sr_corsario

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    Wooww very nice and detailed tutorial.

    Time ago i saw .rso files on a wii game... but dont remember wich one ... Metal slug anthology (with pod v3 files as well) or snk arcade classics (pod v4)? I think it was something like a file with a sound pack... not sure im senile xD
     
  9. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    I´ve made some progress here, as I am unable to convert the .bin file from the rom to the needed .zlib format, I´ve done the following.

    I used Autoinjectuwad to inject the game into a .wad

    Then I did all steps here except the one which will inject the rom in the wad and it works.

    In other words, I used the guide to change my banner and Icon to match the injected rom.
     
  10. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    I'm not sure, zlib is a wellknown compression method
    The strange thing is that by hexediting one those .zlib files, the format inside was very similar to usual genesis ROM format (the "SEGA" header with game title, region, etc), except it was preceded by another header (with the string "DON'T LOOK AT THIS FILE" or something similar)
     
  11. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    Very useful guide here. Helped me to get my games running.. Thanks.

    Only this wont work:

    Step 5:
    - Make a copy of the “.SGD” file name.
    - Rename the ROM file in the “Mega Drive” folder with that name (including its file type).
    - Then copy the ROM file to the “data_ccf_OUT” folder, overwriting the original.

    OP, do you know why?

    Would be nice if you´d answer.
     
  12. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    Be more precise, what "won't work" ?

    You need to keep the .zlib extension btw, I'm now sure ROM files are not compressed, those are exact .bin formatted ROM files, simply rename xxxxx.bin to xxxxxx.SGD.zlib
     
  13. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    @Jacobeian:

    When I copy the .SGD file name and rename the rom.bin with it, it stays .bin, it doesn´t change to .zlib

    Thus for it doesn´t overwrite the original .zlib file when I paste the name changed rom file into the "data_ccf_OUT" folder.

    I tried to rename the file as instructed, I tried using Win XP and OS X, didn´t work.

    I followed the tut exactly so I didnt mess up anywhere.
     
  14. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    you better start learning about Windows [​IMG]
    this is because the option that hides known file extension is activated, disable it through the folder display options in Windows Explorer
    then you can change the file extension, otherwise, the only thing you are doing is renaming xxxx.bin to xxxx.SGD.zlib.bin
     
  15. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    LOL true.

    I hate windows TBH,

    I had to install it via Bootcamp for some programs I use(usenet downloader and other stuff).

    I´m on a Mac Pro so I´m a windows n00b.

    Thanks for the hint, gonna check it out.
     
  16. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    Ok, the renaming part works now.

    Thanks for the help.

    BTW, I tried to inject the Metal Gear rom (MSX) because I really love the game, I used a MSX Aleste VC .wad to inject in but it doesnt work.

    Anyone here has some experience with MSX wad injection?
     
  17. G0dLiKe

    Member G0dLiKe who needs a title ;)

    Joined:
    Aug 2, 2009
    Messages:
    1,674
    Country:
    United States
    @OP:

    When I try to create a wad using the JPN Mega Drive Layout, the banner just appears fine but when I click onto it the screen where it shows you the year, how many players... is garbled up, the pic is garbled up and the text.

    Tried this several times. Any thoughts?
     
  18. StillBlue

    Newcomer StillBlue Member

    Joined:
    Sep 27, 2010
    Messages:
    10
    Country:
    United Kingdom
    I am just getting into this, and the guide is fantastic. However, what I am trying to achieve is to Inject Micro Machines Turbo Tournament, and although I have tried a number of wads, I always get just a black screen when I try to start the game.

    I have tried doing it with a hex editor and Auto Injectuwad Injector v3, but the same with both.

    I dont know if this is a case I am doing something wrong, or if nobody has had any success with Micro Machines TT.

    Any help would be fantastic.
     
  19. StillBlue

    Newcomer StillBlue Member

    Joined:
    Sep 27, 2010
    Messages:
    10
    Country:
    United Kingdom
  20. Slimmmmmm

    Member Slimmmmmm GBAtemp MoNkEeE

    Joined:
    Nov 1, 2007
    Messages:
    1,687
    Location:
    the land of lol
    Country:
    United Kingdom
    Would it not be easier using an emulator ?


    I read the guide at the top, the second post with all the info is intriguing, I wonder if ...

    "console.machine_arch" option set to "md". No idea what this option does.

    Means the inbuilt emus support more than just the MegaDrive "md", or if this means something else...hmm
     

Share This Page