don't click here

So Mac Sonic Hacking.

Discussion in 'Engineering & Reverse Engineering' started by GT Koopa, Oct 9, 2009.

Thread Status:
Not open for further replies.
  1. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Just as what this thread says, Sonic hacking has been mainly a Windows based field with close to all of its programs under its tight grip. But recently I have been trying to research just how to edit Sonic 2 (as so far it is the only one I can build on a Mac) without all the fancy tools, but by editing the binary files. It is coming along fine, asking around and such. But now I wonder exacly how many of you use Mac (or another non Windows operating system) for hacking, despite how limited it is.


    Eventually I want to get a Windows computer again (last was a Windows 98 upgraded from a Windows 95, and it is disconnected/put away and full of viruses, not to mention the common usb flashdrive won't work right with it because it is so old) and I just might crack down and buy one, something I have been telling myself for years now and still haven't followed through with.
     
  2. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Until I got a Windows laptop to replace an expired Windows 7 beta, most of my hacks were done on Mac using either modified Xenowhirl tools or wine. This also includes early versions of the Sonic & Knuckles split disassembly.

    On a related note, in response to a problem GT Koopa was having earlier, here is a native Kosinksi (de)compressor for Mac OS X (and Linux) that runs from the command line. Just copy the GetFileSize.cpp, K-Compressor.cpp, and K-Decompressor.cpp from KENS (which you can get at Hacking-CulT) and compile all four C++ files together. I'll also make Nemesis, Enigma, and Saxman tools later.

    http://idisk.mac.com/pietro10-Public/kosmac.c
     
  3. Sonic Hachelle-Bee

    Sonic Hachelle-Bee

    Taking a Sand Shower Tech Member
    808
    201
    43
    Lyon, France
    Sonic 2 Long Version
    I have a Mac (a PPC one, it's getting old...). I'm editing Sonic 2 with the 2007 disassembly, and the "UPMEM" in hex. Someway, I linked the hex part with the disassembly so that I don't have to write 2 times my functions to build 2 different versions (one with the "UPMEM" and Knuckles, another without). I made my own Kosinski compressor/decompressor a while back, and found a way to do the graphics work easily with TileMolester.

    I eventually use Windows 98 (on VirtualPC) for the Nemesis format and SonED 2 for mappings. I wrote a bunch of scripts to relocate files, import/export palettes and graphics between TileMolester, SonED 2, and the disassembly. Overall, the work is quickly done without having to bother so much with hex editing.
     
  4. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    I have a Power Macintosh G4 (borrowed from TechServ) [dual 1.25 GHz] that I'm mainly using for Gens/GS PPC development. The first target OS for Gens/GS PPC is Ubuntu Linux, since that doesn't require rewriting the GUI. Once that's done, I will attempt to port it to MacOS X. :)

    Keep in mind that I'm also planning on writing many debugging plugins for Gens/GS, starting with an initial VDP debugger (GTK+ only) in Release 7.1.
     
  5. Dr. Kylstein

    Dr. Kylstein

    Member
    86
    0
    6
    I'm on Ubuntu. I've been using SonMapEd and SonEd2 in Wine (SonEd2 doesn't display properly though.) I've had to use my old XP box to assemble, because the build script won't run in Wine. I heard the tools can be built for Linux, but it's been easier to log into the other station than to figure that out.
     
  6. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D

    I already started it with m7 pre1, but I will get a fresh git repository tonight and start over. Note: until the PPC Linux port is ready, this will only run on Intel.
     
  7. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    All my hacking work in the past has been done on Windows, and all my tools to date have been Windows only. =P Now I'm starting to get to grips with Python I may well start writing future stuff in that, simply because it IS cross platform, though my main target platforms will be Linux and Windows with OS X as a distant third priority, honestly, because (a) I neither have nor want any modern Apple products so testing will be impossible for me to do and (b) I'm not sure if tools even exist to generate Mac Python binaries without using a Mac...
     
  8. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Is that even necessary? Mac OS X includes a Python interpreter. (Granted, it's probably outdated, but it's still there.)
     
  9. Epsilonsama

    Epsilonsama

    THE FASTEST TAPE ALIVE! Member
    690
    42
    28
    Earth
    I'm implying your project is open source so all you could do is let the users with a mac generate the binaries and all you have to do is post instructions of how to do it for the mac guys or ask someone with a mac to do it.
     
  10. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    Yeah, I'd be using binaries only, at least at first. =P For a start, the users would have to install wxwidgets as well as have the native Python runtimes - I'm not especially sure I want my first forrays into coding in the thing open =P

    This is certainly an option, if the app reaches a point I'm happy opening the code at, I must admit.
     
  11. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    OS X already includes wxWidgets. And Python.
     
  12. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,239
    972
    93
    Long-term happiness
    YES I KNOW OS X INCLUDES THE PYTHON RUNTIMES NOW =P

    Didn't know it included wxwidgets though. Still, I'd stick to binaries at least at first. We're kinda drifting off message a bit here though =P
     
  13. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    I think I tried that already long time ago. Didn't exactly work out or get it to work. Plus, right now the old computer is disconnected in the basement. With the blue tint screen problem it has (yes, I know I sound crazy or can't change monitor colors but it is real) the computer would be horrible for hacking visually. Any speck of red would be smeared into a giant red line covering the screen.
    --
    So I overheard that SonMapEd works in Wine. Is this true? Despite the fact I couldn't really get Wine to work either, what programs work in Wine?
     
  14. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Yes, though sometimes (at least for me for a built-from-source wine) the menus stop working, forcing you to force quit wine (or if you re-added open-x11 to Leopard, like I did, all of X11).

    (Edit: typo; sometimes I stop working)

    Also, SonMapEd and all the command line tools work in wine, and SonEd doesn't AFAIK. I haven't tried too many tools. So unless you want to use asmx (or intend to do S&K, whose disassembly doesn't work with asmx (and I've tried fixing it, too)), you can

    Code (Text):
    1. echo build.bat | wine cmd
     
  15. GT Koopa

    GT Koopa

    Member
    2,021
    18
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    I also still wish I could figure out how to turn the Sonic 2 mac build program into a Sonic 1 mac build program.

    I changed the names to Sonic 1 disassembly counterparts, and it didn't work. Is there a small thing I am missing?
     
  16. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Uh...couldn't you just use X11 on Mac OS X and not have to rewrite the GUI?
     
  17. LazloPsylus

    LazloPsylus

    Buried under SSRG Somewhere Tech Member
    154
    0
    0
    Academy City
    SSRG, world domination, a billion and one research projects...
    The "small thing" you're missing is that the Sonic 1 disassembly is not in the style that AS can reassemble. Instead, the Sonic 1 disassemblies are designed for assembly with ASM68K or SNASM68K, neither of which are cross-platform. I have heard that a cross-platform compiling library named asmx might be able to compile Sonic 1, though. You'll probably have to ask GerbilSoft about that, though

    EDIT: It looks like there is an AS disassembly of Sonic 1 after all. Don't know how I missed that.
     
  18. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    It's Hivebrain's old one, but here is a Mac-ready disassembly. Unsure if it works on PPC, you may need to recompile the tools yourselves :V.


    GTK+ on OS X X11 is incredibly broken (SDL context is not in the main window, etc.) and builds of Gens/GS can't be moved from machine to machine. As far as I can remember, the native GTK+ interface only works on Intel if you use the .framework, and when I tried to build it from source (for Synfig) I had to manually configure a few things and naturally it blew up in my face. A Cocoa port would only be desirable, though we can still use the SDL/OpenGL renderer.
     
  19. Spanner

    Spanner

    The Tool Member
    http://info.sonicretro.org/images/9/91/S1hive2005_AS.zip
    Shouldn't this work? :psyduck:
    Iron Sonic: Sonic 1: WTF Lame uses asmx, you can have a look at the source code to see how it was done.
     
Thread Status:
Not open for further replies.