Camen Design Forum

MaSS1VE: The Master System Sonic 1 Visual Editor

append delete Kroc

The secret is revealed! For about a month and a half I've been working on the first level editor for Sonic the Hedgehog 1 for Master System / Game Gear.


Why? It didn't exist. Many tools exist for the 16-bit Sonic the Hedgehog, but I belong to the small, quiet group who will always prefer the 8-Bit Sonic 1; for what it lacked in big 16-bit graphics they made up with extra game-play, charm and memorable music. It surprised me that a level editor didn't already exist when there are so many for 16-bit Sonic.

This has been a highly technical, very difficult project to undertake. The 8-bit ROM is largely undocumented and working with the Master System data, compression and graphics with Visual Basic 6 has been a slow and methodical processes.

:: Project Goals

- To be an end-to-end visual editing tool for the ROM, exposing as many aspects as possible, not limited to: editing the palettes, sprite art, title / game over &c. screens / credits text
- To understand and document the original ROM
- To enable creativity in the community

:: Where Can I Download It?

Nowhere just yet, I'm still at a prototype stage right now. I can import the graphics and level data from the original ROM, manipulate the level layout and export to a new, playable ROM but there's still a very large amount of work needed to turn this into a usable product.

For the moment I won't be providing binaries or sources unless to anybody who can genuinely help with the coding / ROM decompiling & documentation. The source code is now available here:

Updates will be posted here, so you can follow the news and be first to know of a release by subscribing to this thread.

:: Help is Needed

If you're Googling and finding this thread, since you too are looking for a Sonic 1 Master System level editor, then I want to get it out to you as soon as possible, but help is needed:

There is no room in the 256 KB ROM to allow much (if any) editing of the graphics. Changes to the graphics might decrease the compression ratio causing the graphics to run out of ROM space. The solution is to port the original ROM to a 512 KB ROM. This involves editing the z80 assembly code so that the level data and graphics can be moved to different ROM banks where they will have more space to grow. If you can dabble with z80 assembly then you can help.

For ROM documentation and a list of other problems that need solving please see the Sonic Community Hacking Guide over at SonicRetro:

Reply RSS


append delete #1. Martijn

This I would’ve never guessed. I think most of us were stuck on ‘some kind of media editor’. But really nice to see this is the secret project!

append delete #2. Kroc

This I would’ve never guessed

Which is why I went with the 20-Questions game to announce it :)

append delete #3. Nikolai

This looks very nice, I especially love how tabs change their colour as level background changes. The rest of the UI is nice as well.

VB6 really is the king of GUI app development for Windows. It’s 15 years old, and is still supported even on newest versions of Windows! I really hope at least one guy at Microsoft is aware of the mistake they made with .NET.

append delete #4. Kroc

Two new screenshots showing the new borderless Metro-style UI



I really hope at least one guy at Microsoft is aware of the mistake they made with .NET.

Whilst the .NET language is fine, there is no doubt that .NET as a strategy has been the biggest waste of everybody's (Microsoft's / developers' / users') time. It's been 10 years of nothing but hurt for all parties. Honestly they should have just kept iterating on VB6, fixed up its limitations and it would have been the ultimate development environment.

append delete #5. Nikolai

Whilst the .NET language is fine, there is no doubt that .NET as a strategy has been the biggest waste of everybody's (Microsoft's / developers' / users') time. It's been 10 years of nothing but hurt for all parties. Honestly they should have just kept iterating on VB6, fixed up its limitations and it would have been the ultimate development environment.


My first days with computers were on a Pentium III machine running Windows 2000 in 2003, which I used to build some silly desktop apps in VB, and the year later I was on a software development course where we were taught how to build database backed application in both VB and ASP+VBScript. All of this stuff is easy to learn and use, and is a lot of fun to spend an afternoon or an evening on, messing around and trying to get stuff to work.

I’ve tried and learned a number of other languages since then, and I am yet to find one that makes developing software as easy and as fun as VB did. Perhaps me being 13 years old at the time was also a factor (ie. everything that the computer does as a result of something I told it to do is a miracle). I’m playing with Go for now, it is very simple in its design and the most reminiscent of VB in the way it lets me do this and that without following some crazy paradigm. I wish it had some GUI system built in, but given that Google is using it only for their servers, that’s not likely to happen.

:: @Nikolai added on 21 Jul ’13 · 10:22

Forgot to say, the last two screenshots look great. :)

append delete #6. Kroc

The source code is now available here: :)

append delete #7. Kroc

Just discovered the most amazing thing in the ROM whilst disassembling it -- an unused piece of music: an 8-bit rendition of Marble Zone!! Incredible. I'm finding more and more evidence that the game was scaled back from a 512K cart to a 256K cart mid-way through development.

append delete #8. nitrofurano

Kroc, please make sure that we can run your editor on GNU/Linux, whatever on Wine, recoded in Python, etc. - there are people like me that use GNU/Linux exclusively

append delete #9. Kroc

I understand that, but I don't know C/C++ and wouldn't enjoy doing this project if I had to learn them first. VB6 generally runs well in WINE because of its age and that it hasn't changed in the last 18 years. Once builds are available you can try it out and report back to me on compatibility, I'm willing to fix things for Linux/Mac users.

append delete #10. Kroc

I'm making great progress with the disassembly. I've finally discovered the routine that lays out the object sprites. Now I can get MaSS1VE to import the object sprites directly from the ROM and I don't have to hard code each and every object myself.

I've been debating for a while now if I should create my own Z80 assembler in VB6. It sounds insane, and it is, but I'm running up against major limitations of the assembler I'm using (WLA DX) both technical and syntactical.

Undertaking such a task obviously eats up time and puts MaSS1VE progress further back, but it should be best for the long run. Direct integration of the assembler with MaSS1VE will mean the possibility of baking code editing into the editor as well as possible pseudo emulation to allow a playtest-in-editor feature.

I had assumed an idea as mad as a Z80 assembler written in VB6 couldn't possibly already exist. I was wrong! This might help me make more rapid progress, I'm looking forward to seeing what I can do with this.

append delete #11. Penta Penguin

Hey Kroc, I was just gonna mention that I had just this minute found Marble Zone music in the game, but you already beat me to it by 2 months. I checked throughout that music segment and found no other unused music. A great find, indeed, so congrats for that, eh?

I haven't checked out MaSS1VE yet, but I will be sure to do so and let you know if there are any problems/bugs with it. I might also see what those unknown bytes do in the game from the level headers. I'll try to help as best I can.

~ Penta Penguin ~

append delete #12. Kroc

Hi Penta! Glad to hear from you.

You should know that the level header bytes are 99% known now, only one remains and that's dependent on the disassembly to work out what's happening with it -- it's used for flags during runtime, so has no known relevant value in a level header.

Don't worry about looking for bugs with MaSS1VE yet. I know just what needs doing and it's too early for bug hunting yet as it's waiting on further disassembly work. :)

If you've been looking at the sound driver, ValleyBell has done a full disassembly which I've put into my disassembly of the game: though I haven't integrated all of his comments on the sound driver yet, but if you're interested I could mail you his work. I've made immense progress with the game, large portions of the ROM are correctly labelled and commented now. If you'd like to help more, please refer to this as it's the most complete source of the game available.

append delete #13. Penta Penguin

Hey Kroc, I know it's been a while. I recently got back to Sonic 1 again, but I feel that I've found all the music & sound effect bytes, and I'm gonna discontinue looking for more stuff. I did however, find some unused sound effects in the game:

I will be sure to give you the map so you can add some of my findings onto your main map.

~ Penta Penguin ~

append delete #14. Kroc

Should any be wondering where this project has been going for the past year, I've been working on a new Z80 assembler to be able to assemble the Sonic 1 disassembly I've made. A new language / assembler is needed because existing assemblers are limited to a line-by-line scope and cannot handle a large, dynamic assembly without tedious amounts of high-maintenance. Project page:

Recently, the new assembler ("OZ80") was able to assemble Sonic 1, sans the dynamic / macro parts of the OZ80 code. This screenshot shows a comparison between the original Sonic1 ROM and a ROM produced by OZ80, demonstrating that OZ80 is assembling the ROM in-step, but not yet filling in the dynamic values (jump addresses).

In order to handle the dynamic parts of the assembling process, we need a virtual machine. At first I attempted designing my own syntax for one, but this was more effort than it was worth, so I opted to implement a Forth system (read about Forth here: )

Forth systems make good VMs because there are very simple to implement on just about any architecture. Here's a screenshot of SIXTH, my VB6-Forth-like, playing with the stack.

So the chain of turtles currently looks like:

*MaSS1VE > Sonic 1 disassembly > OZ80MANDIAS (assembler) > SIXTH (VM)*

Which is why MaSS1VE itself has not seen much work recently, but the overall picture is still being work on nearly daily. Once I have a working assembler, I can better probe the workings of the game, which allows me to implement the features of MaSS1VE.

A long way to go still...

append delete #15. tmyusuf

Game gear is awesome, it's sound quality is much better than the other.


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn