Sega Model2 Emulation Thread

Discussion in 'General Sega Discussion' started by biggestsonicfan, Jun 13, 2018.

  1. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    Greetings, if you're here, you might have some interest in ElSemi's Model2 emulator.

    We've had threads on this emulator on the past but it has not received an update since 2014, so I would like to "update" it with this little tutorial.

    For this tutorial, you will need the emulator linked above and DxWnd.

    1. Extract both the compressed emulator and DxWin to whatever directory you would like.
    2. In the extracted emulator folder, edit "EMULATOR.INI" with Notepad or the text editor of your choice.
    3. Under "[RomDirs]", put the location of your zipped ROM files, eg "Dir1=c:\Model2\roms".
    4. Edit "FullScreenWidth" and "FullScreenHeight" to your desired 4:3 resolution but 16:9 resolution sizes will also work but are not recommended.
      [​IMG]
    5. Save and exit EMULATOR.ini.
    6. Navigate to and run "DxWnd.exe" from the extracted DxWnd folder.
    7. Click "Edit" and "Add"
    8. Name the shortcut to the ROM you wish to load, EG "Fighting Vipers"
    9. For both "Path" and "Launch" navigate to your emulator's exe (32-bit or multicpu 64-bit) and type the ROM name after the exe, EG "C:\m2emulator\emulator_multicpu.exe fvipers"
      [​IMG]
    10. Click the "Try" button and your game should launch, if you get errors, exit out try going back to step 2 and changing your ROM directory.
    11. In the emulator, set the video resolution to "custom", then click "Switch to Fullscreen".
    12. You should now have a high definition, windowed version of the emulator, ready for video capture (directx/game capture does not work, you must capture the window itself) or streaming!
    It changes this: [​IMG]

    To this:
    [​IMG]



    This is the only known method to play The House of the Dead in fullscreen and windowed resolutions without recalibrating the gun for each resolution. The results are super crisp and I imagine you can tweak some of DxWnd's settings to crank a few more graphics enhancements for some of the other games but leaving as-is is recommended.

    I have been creating cheat codes for Model2 games, so if there are any requests, please let me know below and I will tell you if they can be done or not.
     
  2. Sir_mihael

    Sir_mihael

    DON'T TRUST THIS MAN Member
    This is great. I remember playing Sonic the Fighters on this Emulator, but the scaling options weren't too fantastic at the time - still, I was amazed that the game fully ran without any real issues (that I could spot).

    Although I'm more of an accuracy fanboy who's usually a sucker for sticking to Native res without upscales, I gotta admit some games really benefit from a HD buff! Nice tutorial.
     
  3. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    Trhough some LUA modification I did indeed find that the Model2 emulator under windowed circumstances does emulate at 1:1 scale. What is missing, however, is some way to render scanlines on the screen for a CRT effect.

    From the documentation
    Code (Text):
    1. int Video_CreateSurfaceFromFile(filename)
    2.     Loads a image file (.png) as surface
    3.     Returns a surface to use with ReleaseSurface and DrawSurface
    4.  
    5. Video_DrawSurface(surface,x,y)
    6.     Draws a surface to the given position
    7.  
    8. Video_ReleaseSurface(surface)
    9.     Release a loaded surface
    10.  
    11. Video_GetScreenSize()
    12.     Returns screen size (width,height) pair
    However I have yet to get anything but the Video_GetScreenSize() to draw anything on the screen.

    EDIT: I managed to create a scanline overlay for the emulator and it looked great! But it crashes the emulator after so many frames. I am not sure what the author intended to do with this function but I do not believe it was tested in the way I was using it, which goes to show another oversight perhaps on this emulator and why the MAME team needs to step up to the Model2 plate.
     
  4. Sir_mihael

    Sir_mihael

    DON'T TRUST THIS MAN Member
    Definitely agree, it would be great if Model 2 was added to either MAME or Retroarch's cores. I feel like I've definitely been spoiled by Retroarch's scanlines and CRT shaders recently.

    Still, you've convinced me to get back to playing some VF2 and Dynamite Cop - my Saturn (and discs) are slowly giving up the ghost :v:
     
  5. grap3fruitman

    grap3fruitman

    Oldbie Oldbie
    3,138
    2
    18
    I don't have any specific requests but anything you can find in the original model 2 version of 'Dead or Alive' would be fantastic. Debug, cheats, whatever. If you can find out how to change which character slot loads then you potentially load the boss, Raidou, who wasn't playable until the home versions.

    Also, that's the very original version of the game and longtime characters like Zack and Bayman are referred to internally by their proto names "Kelly" and "Gatsby" respectively. I'm hoping there's some other leftovers in there. Kelly did have an in-game model at one point and was in the original screens. I just don't have the technical knowledge to begin to dig for anything remotely technical. I have a proto discovery thread on FSD here for anyone curious: http://www.freestepdodge.com/threads/doa-prototype-discussion.726/
     
  6. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    As far as the investigation goes, these are my preliminary findings:

    The build date indicates 1996.10.22 and version 1.00 of the game, but there are traces of source files which date to December 4 1996.

    Debug functions remain in the game yet the debug menu itself (presumedly similar across all AM2's games) has been removed.

    No signs of Kelly or Gasby.
     
  7. grap3fruitman

    grap3fruitman

    Oldbie Oldbie
    3,138
    2
    18
    Interesting info. Thanks for looking for me. Yeah, I figured any leftovers realistically would be just filenames and miscellaneous text.
     
  8. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    Keep in mind we just discovered Honey's title card and RoboEgg player name in Sonic the Fighters that had no initial indications of existing in decodable text form. Assets may very well exist that I can't see yet. I will let you know once I have the cheat files ready if I can access anything new or exciting.
     
  9. saintminya

    saintminya

    Member Member
    I seriously appreciate this thread biggestsonicfan! I have never seen the Model 2 emu run so smoothly, in fact I just beat Sonic the Fighters for the first time due to this fix. Previously, I would always give up around stage 5 due to it being a choppy mess.
     
  10. grap3fruitman

    grap3fruitman

    Oldbie Oldbie
    3,138
    2
    18
    Works great. It's also possible to get widescreen support according to the readme but each game needs an individual Lua script file. It takes cheats too. I found the value for lifebars in DOA with Cheat Engine but I have to search for them manually each time and I'm not quite sure how to translate to the script. Trying to figure out how to stop the timer and change character slots. Any pointers? I'm no where technically proficient as most of you.
     
  11. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    House of the Dead prototype has been dumped

    [​IMG]

    What you see above you are Sega Flash EEPROMS (Do we have those documented anywhere?) owned by AndyGeezerServices.

    The ROM files have been dumped (BADDUMP until repair on some of the chips) and have been submitted to MAME, however, the example footage shows it being on the closed source m2emulator. Apparently, the service menu at this point did not have gun calibration, which is a limitation of the m2emulator.

    The missing files, along with probable overdumped information from other Model 2 games at the time, for Syndy, Mr. G, and maybe even Dredd may be located within them.

    Overall, I'm not sure what this means for the closed source emulator, which is I'm sure on it's last server legs. It is hard to say what this prototype may hold, even if it is released.

    EDIT: Closeup of the damaged Flash EEPROMs which require SMT reworking:
    [​IMG]
     
  12. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    The ROMs above, which are clearly labeled, have been added to MAME 0.202GIT and boy (edit: they are good!), are they as dumb as ever (EDIT: Actually, re-reading the picture of the EEPROMs in the above post, that is what they were, indeed named). In an attempt to mask the filenames of the true ROM set out in the wild, or simply laziness on the MAME team's part, it shows little to zero interest in ever actually emulating Model2 correctly.

    If you are interested in the attempted playthrough, here it is below:

    https://youtu.be/NrPsikwBGUE
     
  13. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    Giving this a bit of a bump as there is somewhat relevant news:

    Some prototype graphics have been released from the HotD prototype, as well as a a bit of code via egregiousguy. A podcast discussing the prototype has also been made available via the Website of the Dead.
    Dead or Alive has had progress in finding unused content as well, and my theory of "no way anyone will ever see this so why cut it" in the Model 2 era seems to be par for the course.

    And a slightly, well, I don't have another word other than interesting connection I have made with AndyGeezerServices, the owner of the HotD 'trade show' prototype, and ElSemi, contributor to MAME and Model2 emulator creator. ElSemi has created a Rail Chase 2 EEPROM which bypasses the drive board, which I presume connects the hardware/software to the motion-ride vehicle used in the unit.

    What does this mean? Well it could mean emulation of the drive board does not exist and there is a hard-coded bypass in the current emulator, which would mean inaccurate emulation for Rail Chase 2. It could also mean ElSemi is still in contact with people in the arcade/emulation scene, despite running his legitimate game porting studio (The one that originally ported Sonic CD and Jet Set Radio).

    It's a trying time for Model2 emulation currently, but I believe with the release of Fighting Vipers inside of Project Judge, there will be another spike in interest.
     
  14. grap3fruitman

    grap3fruitman

    Oldbie Oldbie
    3,138
    2
    18
    I'm still looking for someone looking to help me turn that into a reusable code or script. I tried myself, failed, and shut down. Also, Ryoga found debug mode: https://twitter.com/suddendesu/status/1051807096365244418 - Which I don't know how to activate in any fashion but it's there!
     
  15. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    I still don't fully understand the magic number pointer to a pointer referencing to generate proper Cheat Engine codes, and if video footage is provided of the cheats in action I might be able to reverse engineer them out of the ROM data for proper scripts but it's a lot of effort when the magic number is much more useful. I have to reference an old table created back in 2008 to use Cheat Engine properly with Sonic the Fighters on version 0.6 of the Model2 Emulator.

    This seems similar to what I was doing back in 2015 which as it turns out is just arbitrary code execution but with functional spaghetti code that funtions while the game runs. Other Model2 games have this as I stated before there are debug functions, but no menu which to activate the code like we see in Sonic the Fighters now. So while these could be documented for what they could possibly do, there's no reasonable way to get these functions working as intended.
     
  16. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    There's an interesting "Sega Model 2 UI" thread involving a program which has been seemingly removed from every download link I could find for hosting violations. Presumedly this is due to it not passing antivirus checks. The scripts in the thread, however, are very interesting, which add widescreen support for multiple games.
     
  17. grap3fruitman

    grap3fruitman

    Oldbie Oldbie
    3,138
    2
    18
    There's probably a better way to do it but I managed to get Raidou playable via script, here's the code:

    Code (Text):
    1. function p1boss(value)
    2.     I960_WriteWord(0x54fbe1,0xB);
    3. end
    4.  
    5. function p2boss(value)
    6.     I960_WriteWord(0x54fc39,0xB);
    7. end
    8.  
    9. Options =
    10. {
    11.     boss1cheat={name="P1 RAIDOU",values={"Off","On"},runfunc=p1boss},
    12.     boss2cheat={name="P2 RAIDOU",values={"Off","On"},runfunc=p2boss}
    13. }
    14.  
    You could replace 0B with anyone from this list for effect:
    Code (Text):
    1. 00 "Zack",
    2. 01 "Tina",
    3. 02 "Jann Lee",
    4. 03 "BETA TINA",
    5. 04 "Ryu Hayabusa",
    6. 05 "Kasumi",
    7. 06 "Gen-Fu",
    8. 07 "BETA CHAMPION",
    9. 08 "Bayman",
    10. 09 "BETA BLANK",
    11. 0A "BETA RAIDOU",
    12. 0B "Raidou",
    13. 0C "Lei-Fang",
    I'm not proficient enough to make the code a selectable list. -_-


    Interestingly enough, Raidou has an end-card with story as if he was intended to be unlockable in the arcade at one point.

     
  18. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    951
    6
    18
    Formerly Sonic the Fighters
    As it's probably rare these days, and I just got myself an EPROM dumper, I have dumped the Sega VS City Billboard System EPROM. The inside doesn't look like much, however.