Dr. Robotnik's Mean Bean Machine Disassembly

Discussion in 'Engineering & Reverse Engineering' started by Esrael, Jul 24, 2021.

  1. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    This disassembly was generated with use of "Neto Assembler Editor v0.14a"
    This disassembly can generate two versions of the game. The U.S. version and the one found in Sonic Classics.
    To avoid some ROM hacks found on Internet, I have dumped two original Tec Toy carts to compare the final result.

    Dr. Robotnik's Mean Bean Machine disassembly

    If you found something wrong in my research (vars names, routines etc...), let me know, and I will fix and update the disassembly.

    Enjoy!

    Best regards.
    ------------------
    Neto
     
    Last edited: Jul 24, 2021
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    18,316
    409
    63
    Berkshire, England
    Learning Cymraeg
    Outstanding work. How long did this take you?
     
  3. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    About one month and a half, since the game is small in the code. And I have developed some tools to extract some know structures including a decompressor to Puyo Art. My original idea was to take the logic of the game to create a boss to Genocide City in Sonic Delta, but decided to get a full disassembly.
     
  4. LuigiXHero

    LuigiXHero

    Member
    34
    14
    8
    Sonic 1 Character Pak
    Ralakimus also made a mean bean machine disasm.

    And he wanted me to post his message along with it:
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,119
    304
    63
    Ooh, this looks hopeful. I wanted to do some MBM hacking for years.

    This might sound stupid though, but how do you split and build the disassembly? I'm only accustomed to the Sonic ones.
     
  6. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    Thanks, sure this will help. I will get his version to compare with my research and can see if there are no mistakes and can update.
     
  7. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,323
    223
    43
    Formerly Sonic the Fighters
    You are an absolute wizard and so valuable to the Sonic hacking/research community! Thank you for this and all your amazing contributions throughout the years! It really means a lot that you still do all this work!
     
  8. RadioTails

    RadioTails

    Member
    27
    12
    3
    What do you use to compile it? I'll take a look and see if I can add anything.

    That's cool he has uploaded.
     
  9. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    Mine version you can use Neto Assembler Editor with snasm68K selected in Editor Options.

    Best regards.
    ------------------
    Neto
     
  10. RadioTails

    RadioTails

    Member
    27
    12
    3
    So snasm68K won't work on 64 bit machines? if so, that kind of sucks. asm68k works fine on 64 bit machines.

    I presume you just open "Robotnik.asm" and then save and compile in the editor?

    Edit:
    0x00CE58.eni = Password Background Mappings
    0x06EB68.eni = High Scores Background Mappings
    0x06C7C2.eni = Main Menu Large Frame Mappings (one with SELECT A MODE text)
     
    Last edited: Jul 28, 2021
  11. Spanner

    Spanner

    The Tool Member
    3,309
    113
    43
    United Kingdom
    Sonic Hacking Contest
    It's not hard to convert a disassembly to use asm68k. I've had Esrael's disassemblies using it in the past fine with no problem.

    You should have your Assembler Editor to include other assembler options if people want to use those, such as a custom option where you can provide your own assembler commands to build.
     
  12. RadioTails

    RadioTails

    Member
    27
    12
    3
    Well when I try and compile Sonic 1 code using asm68k, it asks me to save the .asm (default "MainCode.asm) and then says "I/O error 123". Most likely doing something wrong.

    But yeah, it should be easy to convert the assembler to use asm68k. I'll take a look later on.
     
  13. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    Neto Assembler Editor already support custom compilers. This can be done adding the Complier directive to project file. When this directive is found, the Neto Assembler Editor will ignore the compiler selected in options and use this. To use a custom compiler with Neto Assembler Editor create a text file with "epr" extension (eg: Sonic2.epr ) and add your custom option. Eg: If you want to use a built.bat to compile Sonic 2. Create your project file with the following content:

    [Assembler]
    begin
    Compiler = build.bat
    Main = s2.asm
    end;

    The MainCode.asm is asked when you opened a file without a project loaded.

    Just open your asm as project file. The Neto Assembler Editor supports "asm" file as project or a "epr" file that have directives and some options to use with "Sonic Series Level Layout Editor".
     
    Last edited by a moderator: Aug 2, 2021
  14. RadioTails

    RadioTails

    Member
    27
    12
    3
    Maybe there are some advantages of using Snasm68K, but if you are using a 64bit Windows OS (which a lot of people would be on), I have converted it to Asm68k, which is compatible with 64-bit Windows. You can download the version here: https://www.mediafire.com/file/ch9xwbnt8wprvhv/dr_robotniks_mbm_asm68k.7z/file

    When compiling the Sonic Classics version, the sound doesn't work. That maybe worth looking at. Also, the TecToy version is most likely the Rev1 version (https://info.sonicretro.org/Sonic_Classics).

    You mentioned about a Puyo Decompressor? Any progress on that?
     
  15. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    I only wrote the decompressor (used to view some art), but if you want to try. The decompressor was added in an unreleased (until now version) of Esrael Neto Assembler Editor.

    https://www.neto-games.com.br/ferramentas/Neto_Asm_Editor_V0_14b.rar

    There are other improvements in this version:
    - Fixed an issue in Sonic Series Level Editor when saving level layouts;
    - Improved kosinski compressor;
    - Other minor issues fixed.
     
  16. RadioTails

    RadioTails

    Member
    27
    12
    3
    So I get this error message:
    [​IMG]

    Maybe I'm doing something wrong?

    I wouldn't call the decompression "Dr Robotnik" as that games uses Nemesis, Enigma, and Compile's own Mega Drive compression. From what I understand, it was used in Puyo Puyo, Puyo Puyo 2, MUSHA, and Dr. Robotnik's Mean Bean Machine (well the art that didn't need changing was keep with that compression). I would just call it "Compile" after the company. :)

    Also, Jap is actually a racial slur that was used against the Japanese during World War II, and is still offense to use (even in cases like this where it's talking about the Japan version of an item, not the race). I would recommend changing it "Sonic 1 JPN" or "Sonic 1 Japan".
     
  17. Esrael

    Esrael

    Neto Tech Member
    286
    213
    43
    Brazil, São Paulo, Guarulhos
    Neto Assembler Editor / Sonic 2 Delta / Neto MD-DOS
    I only tested decompressing from ROM. Fixed now.

    https://www.neto-games.com.br/ferramentas/Neto_Asm_Editor_V0_14c.rar

    Best regards:
    ----------------
    Neto