don't click here

New Mega Drive emulator/Development environment on the way

Discussion in 'Engineering & Reverse Engineering' started by Nemesis, Feb 25, 2007.

Thread Status:
Not open for further replies.
  1. Nemesis

    Nemesis

    Tech Member
    No, I hadn't. Thanks for the link.
     
  2. drx

    drx

    mfw Researcher
    2,254
    351
    63
    :rolleyes:
    Ah, so that's the guy who gave me these. He finally released those then, good.

    I hate physics et al. Those sciences are so... imperfect =P
     
  3. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,380
    88
    28
    HoleNet!
    Sonic Worlds Next
    He already has reached godhood, remember?

    Anyways, this is looking to be very, very awesome. Hopefully the rendering code won't be strictly DirectX, so it can be ported to other OSes and/or devices. (And with nemesis mentioning things like customize and open source, this should hopefully be true. Hopefully.)
     
  4. Rail Road

    Rail Road

    Member
    128
    0
    16
    Are you going to add support for joysticks and controllers? I have a new controller that I like to play the classic genesis games on other emulators, like Kega and Gens.
     
  5. sebmal

    sebmal

    I am the man! Oldbie
    OH OH OH, before I forget! One feature I would absolutely LOVE to see in this is lightgun support ala ZSNES, where you can use the mouse to aim and shoot. AFAIK, It's not in any other Genesis emulator and it pisses me off because the Genesis version of Lethal Enforcers is way better than the SNES version.
     
  6. Sith

    Sith

    The molotov bitch Member
    True, I'm always willing to have another go on Yoshi's Safari with the mouse on Zsnes.
     
  7. Rika Chou

    Rika Chou

    Tech Member
    5,276
    170
    43
    Isn't Kega supposed to have Menacer/mouse support? It says it does in the ReadMe, but I've never tried it out.
     
  8. sebmal

    sebmal

    I am the man! Oldbie
    I've tried it, but seeing as it's more of a Super Scope (and the fact that I've never been able to get it to work) I don't think Lethal Enforcers supports it. I'm pretty sure the game only worked with the Justifier.
     
  9. Nemesis

    Nemesis

    Tech Member
    Rendering is currently performed through OpenGL, so that's portable anyway. Windows code is obviously used for the GUI, however this code is confined, and can be easily stripped out and replaced with whatever code is necessary for the target platform. No assumptions are made about endian order. Some assumptions are made about minimum sizes of certan native datatypes, but that's true of any program, and they are safe assumptions with any remotely modern hardware. All in all it should be fairly easy to port.

    Input devices aren't hard coded. It will be possible later in development to have a plugin which defines a new input device, be it a controller, lightgun, modem, link cable, etc. I'll probably add support for the Menacer and Justifier lightguns myself though, as part of adding external interrupt support to the VDP.

    Anyway I'm tidying up things for a first release. I hope to have a "teaser" build ready this weekend. I'm still undecided about whether to release the source with it, or hold off until a more complete build is ready. Some major areas of the code don't reflect my final design, and are merely temporary code or stub drivers. I'm doing some major refactoring right now to clean up the source, but some areas of it are still embarrassing quite frankly. Also, I don't have a clue what kind of disclamers/copyright/terms of use notes I should put with it. I'll see how much I get done this weekend and make my decision later. At any rate, I hope to have a compiled build up sometime over the next few days.
     
  10. Aurochs

    Aurochs

    Единый, могучий Советский Союз! Tech Member
    2,343
    0
    0
    Whatever catches my fancy
    I like this license myself.
    Code (Text):
    1. * Copyright (c) 1998, Regents of the University of California
    2. * All rights reserved.
    3. * Redistribution and use in source and binary forms, with or without
    4. * modification, are permitted provided that the following conditions are met:
    5. *
    6. *    * Redistributions of source code must retain the above copyright
    7. *      notice, this list of conditions and the following disclaimer.
    8. *    * Redistributions in binary form must reproduce the above copyright
    9. *      notice, this list of conditions and the following disclaimer in the
    10. *      documentation and/or other materials provided with the distribution.
    11. *    * Neither the name of the University of California, Berkeley nor the
    12. *      names of its contributors may be used to endorse or promote products
    13. *      derived from this software without specific prior written permission.
    14. *
    15. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY
    16. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    17. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    18. * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
    19. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    20. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    21. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    22. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    23. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    24. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    EDIT: I should stop posting now.
     
  11. Sith

    Sith

    The molotov bitch Member
    Can't wait to try it out.
    Wait with releasing your source code. You don't want shitty hacks of early code floating around cyberspace.
     
  12. Nemesis

    Nemesis

    Tech Member
    Ok, I guess now is as good a time as any for a first release. You can download the compiled binary from the following link:
    http://fileho.com/download/444c78102373/Exodus.rar.html

    I've decided not to release the source just yet, but it will be coming in the near future. Don't worry, this won't be one of those cases where a source release is promised but doesn't come for years, if at all. I will definitely be releasing the source for this emulator soon, probably with the next release.

    Anyway, as for what this emulator can do right now. Currently, it's barely a shadow of what it wll be. I wouldn't quite say the GUI has just been thrown together, but it wouldn't be far from the truth. I've been debugging through a command line console, so I haven't built the debugging tools like breakpoints and tracing into the GUI yet. Most of the TLC so far has gone into the M68000 core. It's reaching the point now where the CPU core is quite solid, and I can start looking at other areas, but up until this point that's where most of the time has gone. The last week and a half has mostly gone into the VDP, which literally didn't exist two weeks ago. Most of the glitches you'll encounter are likely to be graphics related, but I've spent a lot of time crunching bugs, so a lot of games should be playable. Some games (like the regular Sonic games) are virtually flawless.

    A note about speed. Currently, it doesn't matter how fast your machine is, this emulator will not run full speed. The timing code that regulates the speed of the system is only temporary, and currently it is effectively underclocking the system. That said, at this stage, this emulator will be considerably more CPU intensive than other emulators like Gens and Kega. This emulator is completely unoptimized, and the VDP in particular suffers for it. Don't expect this emulator to run well on your PIII 800. I would recommend a 2GHZ+ CPU in order to run this emulator. Exodus uses threads however, and will benefit greatly from a dual-core system. If you've got a Core2, you'll be laughing. If not, don't worry, the performance of this emulator will increase over time.

    Oh yeah, a note about input. I've hard-coded in a single 3 button controller into the emulator. In order to control the game, you have to have the "Image" subwindow selected (that'll make sence once you open the emulator). The controls are as follows:
    A = Z
    B = X
    C = C
    Start = V
    Up = I
    Down = K
    Left = J
    Right = L
    If you're wondering why the directional pad doesn't use the arrow keys, I was too lazy to look up the scancodes. Did I mention the interface was just thrown together?


    Anyway, I'm interested in hearing what games work and what games don't. I've been testing with a limited subset of roms, but my selection is reaching the point where most of the bugs in those games have been fixed. If some of you can list some games that are thoroughly screwed, that'll give me some good places to start for hunting more bugs. If you get a game that doesn't load at all and just leaves you sitting on a black screen, just try another one. I've put in test stubs to try and prevent games blocking while trying to interact with the sound chipsets, which don't exist yet. I've come across at least one game however that I won't be able to get booting until the Z80 is up and running. If a game locks up without displaying anything at all, it's probably doing some kind of test Exodus isn't faking out during the initialization of the sound.

    Oh, a couple of notes on the VDP, so you know what's a bug and what's simply not done yet:
    -Horizontal interrupts are implemented, but are unreliable in some cases due to timing issues. Things like water will not work correctly in the Sonic games, but it'll give it a go.
    -I've attempted to support sprite overflows/masking, but they're not working right. I haven't confirmed yet whether that's due to an error on my part, or incomplete documentation.
    -As previously mentioned, interlace modes and shadow/highlight mode are currently not supported.

    Anyway, I think that's about it so far. Enjoy.



    PS, Thanks for that license Aurochs, I'll probably modify it slightly and use it when I release the source.
     
  13. Hivebrain

    Hivebrain

    Administrator
    3,087
    216
    43
    53.4N, 1.5W
    Github
    Mirror please. I can't download from Fileho.
     
  14. Nemesis

    Nemesis

    Tech Member
  15. nineko

    nineko

    I am the Holy Cat Tech Member
    6,421
    585
    93
    italy
    Direct http mirror

    Nemesis, feel free to ask me to host whatever you want, I have free unlimited webspace and I would be glad to do that.
     
  16. Guess Who

    Guess Who

    It's a miracle! Oldbie
    4,296
    63
    28
    Oregon
    lol
    Even on a dual-core Turion 64 X2 the speed is craptacular, but otherwise the emulator seems very promising. Can't wait for a new release.
     
  17. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,380
    88
    28
    HoleNet!
    Sonic Worlds Next
    Tested a few ROMs...

    Pac-Man 2 - The New Adventures (U) [!], Prince of Persia 2 (Beta) [!] - Black screen, but loads a font into VRAM
    Zool (U) [!] - Black screen, loads nothing into VRAM
    Dynamite Headdy (UE) [c][!] - Works fairly well, except the falling backdrop from Scene 1-1 comes out rather messed up:
    [​IMG]
    and the black background of text boxes vanishes after you go to the next line:
    [​IMG]
    Zoom (JU) [!] - Runs, but exposes some visual glitches...
    [​IMG] [​IMG] [​IMG]
    Bug number 1: Shadows. You already covered that in your post. =P
    Bug number 2: Stretched images. The video output is stretched to cover the entire screen - this is not the case in Exodus. Hence, the wierd section on the right side of the screen. (The SEGA screen on Sonic 3D Blast does this as well)
    Zoop (U) [!] - "DEVELOPED FOR USE ONLY WITH NTSC GENESIS SYSTEMS" and nothing more.
    [​IMG] Hmm...
    Zoop (E) [!] - Nothing. Damn =P
    Sonic Spinball (U) (alt music) [!] - Same as Zoop (U) [!], except with graphic junk:
    [​IMG]
    Sonic Spinball (U) [!] - Worse! D:
    [​IMG]
    Sonic Spinball (Beta) - Runs! Holy moley. Except sprites appear on top of the HUD:
    [​IMG]
    Sonic 3D Blast (U) [!] - Shows the SEGA logo, then stops short of loading the Traveler Tales logo.
     
  18. Tweaker

    Tweaker

    Banned
    12,387
    3
    0
    I loaded up the latest build of Sonic 1 Megamix, and it seems to work a charm, save the lack of sprite limit on the title screen. The realtime debugging features are already extremely useful, limited as they are.
     
  19. Sazpaimon

    Sazpaimon

    Tech Member
    1,208
    0
    16
    If you want to send me the source I can try to compile this on OS X (Assuming you aren't taking advantage of Windows API)
     
  20. Nibble

    Nibble

    Oldbie
    Looks nice. Although, it seems to crash in Vista if I try to load a ROM. The Open dialog comes up for a second, but then everything closes.

    Running it as Administrator doesn't seem to help.
     
Thread Status:
Not open for further replies.