Help - Search - Members - Calendar
Full Version: My new SMS/GG emulator project
1Emulation.Com > Other Systems > General Console
olaf
Well, I've embarked on a new emulation project. I was browsing the SMS Power message bored yesterday and I found the source code to a Sega Master System emulator written in Microsoft Visual Basic (my language of choice). I was just talking about the day before how I'd love to start working on a Sega Master System emulator -- it was fate. The source code I found was that of vbSMS written by John Casey ("brom" on SMS Power). It lacked an interface, required you to "drag 'n drop" ROM files to play them, lacked window sizing, and lacked many other things. You can download the source for yourself here or download a compiled version here to try it out (vbSMS -- not my emulator). Once I downloaded it, I immediately went to work.

First, I added a menu system to the window. After that I actually made the menu items usable -- such as the "load rom..." menu item. Now it had the ability to load ROM files with a regular Windows "Open" dialog. Added right after that was the ability to "close" the ROM being executed. Now that I could open and close ROMs, I felt it was time to be able to pause and reset (for some reason these weren't implemented yet, but I personally find them crucial to even a preliminary emulator).

Seeing that this was a Sega Master System emulator and knowing that the Sega Game Gear system is very similar -- I tried to load a Sega Game Gear game. It ran perfectly, but the palette was horrible (which is fine for right now, and I still have not fixed this) -- and the Start button wasn't implemented. I did a few minutes of research on the Sega Game Gear's hardware and added in support for its Start button. I also found that John Casey put in a lot of CPU activity alerts to learn more about how the CPU was working so he could fix things. The pop-ups were annoying me, so I removed them -- so I could just get to playing the games. Whilest enjoying just "playing the games", I got annoyed that I had to play in a tiny window -- so I added window sizing. After that, I hardcoded the palette files that came with vbSMS into the source code (why? I don't know, I just don't like emulators coming with a bunch of files -- I want them to just work in a single file or something). When all that was said and done, I added settings saving.

Now, why did I explain all this? I guess to announce my new project (which I'm really excited about -- I grew up on Sega Master System and I've wanted to work on a Sega Master System emulator for some times) and to give a little insight on how people pick up on open source projects (especially me). Below are some screen shots of my emulator in action (dubbed olafsms for now). I'm not sure when I'm going to publicly release this, but I'll keep everyone posted?



Sonic the Hedgehog (SMS)



Zillion (SMS) -- personally, one of my most favorite games ever.



Ghost House (SMS) -- my family played this so much when I was little.



Phantasy Star (SMS)



Ariel - the Little Mermaid (GG) -- this is how Game Gear games look right now. sad.gif
olaf
This just in -- I added support for border masking while executing in Sega Game Gear mode. Below are screenshots...



Ristar the Shooting Star -- in greyscale mode (makes Sega Game Gear games somewhat less harsh on the eyes)



Mortal Kombat 3 -- in normal f'd up palette mode
Gryph
Very cool, nice work. Keep us posted. SMS was a great system.
Robert
Very nice! Is it possible to get full screen (like HazeMD), or close to it?

Oh, and if you get Lemmings to work properly, please let me know. Thanks!
olaf
At the moment there isn't a full screen option (you couldn't even do double size before, but thanks to me window sizing is now possible), however, I definitely plan on adding it in the near future. Oh, and...

Robert
Hah, excellent! The only emulators I looked at have corrupted graphics on that screen.
olaf
Forgot to mention during all of this posting that vbSMS lacked sound support, however, SMS sound looks rather easy to implement.
olaf
Fixed border masking for the Sega Game Gear. I was accidentally cutting off 1 more column than I needed to on the left side.



Sonic Blast in grayscale mode.
retroK
Thanks olaf! Keep up the good work.
You should definately release this.
olaf
No, thank you, retroK, for paying attention to my project(s). I plan on releasing it when it gets a little more feature rich and when I decide if I'm going to stick with the name "olafsms" and other things. On that note, I just got done adding in support for control port #2 (this wasn't in vbSMS along with the Game Gear's Start button like I've said previously).



Bubble Bobble with 2 players cool.gif
Robert
I noticed this got posted on the emulation-4-ever news already.
olaf
At the request of Robert (and because i'm so f'n bored), I've added full screen support to olafsms. You can see it in action here (1280x1024), playing Alex Kidd in Miracle World.
Agozer
Excellent work there olaf. I will give this one a shot.
Robert
So will I - when (if) it gets a public release!
olaf
Just got around to finishing off full screen mode. Now, it is possible to specify if you want to use a different resolution for full screen mode. Below is a picture of the "configure full screen" window.



... and yes, olafsms will be publicly released in the near future. wink.gif
Robert
What naming convention is used for roms? Can it read zip files?
olaf
There isn't a naming convention required for the ROMs (personally, my ROMs are from the GoodSMS set). It can't read zip files just yet, but I plan on it having zip file support.
olaf
Well, I fixed full screen support earlier. For some reason, it would only allow resolution changing twice and then it would crap out. I'm also happy to announce that I've gotten state saving/loading to work (albeit in my own proprietary format). Below is a screenshot of me running Hang On/Safari Hunt in 320x240 full screen mode, yay?

Robert
Yay! You're doing very well with this! Keep up the good work. smile.gif
Mooney
This looks really cool! And on EFnet you told us about movie recording/saving, which sounds awesome! biggrin.gif Keep up the good work!
olaf
Another great announcement for the day: I've just finished adding in movie recording/playing! I thought ahead with file size in mind -- it will not record Sega Game Gear input data if it's not a Sega Game Gear game being played. It's only 1 byte per read, but, that can add up during a movie and I'm just trying to be efficient anyway. Hooray!

smile.gif

EDIT: You beat me to the announcement, Mooney. Poop.
olaf
Yet another work-in-progress showing! This time I've optimized the black and white palette that was originally distributed with vbSMS. Below are a few comparisons between emulator windows and palettes...

vs.

Look at the tops of the mountains, Sonic's contrast, and the floor.

vs.

Look at the flowers, mountains, and character clothing.

vs.

The real test... how... horrible.

vs.

A Sega Game Gear game... the actual palette is still wrong, but the optimized black and white palette makes a difference (makes games more tolerable to play with the horrible palette).
Haldrie
Looks like I better start collecting some roms for this when you release it. I am truly impressed. BTW, you said earlier about adding sound support but never said if you actually had or not.
Gryph
Jesus, you're doing stuff fast.
retroK
Thanks olaf for the amount of work you put in there.
L.S.D
The Lemmings screen do me in already!

I can't wait to use this tongue.gif

Keep it up, Olaf!
olaf
No, I have not added in sound. This will more than likely require the help of someone else, as sound is *absolutely* not my thing. I haven't asked anyone yet, but I know someone people who can. Let's not be disgruntled that sound support will be a little late! Also, I have added layer disabling, below are some screenshots of it in action.



No layers disabled.



The background layer disabled.



The sprite layer disabled.
retroK
Maybe you can simulate sound by putting in comic style speech balloons with e.g. bang, boom... j/k wink.gif
Mooney
Wow. Those are some amazing improvements! When are we gonna see a release? smile.gif
olaf
Well, I was unhappy with the way full screen mode looked (stretched graphics causing ugliness), so I fixed it. Now, when switched into full screen mode, olafsms will scale the screen properly in relation to the Sega Master System's original resolution (which most emulators do anyway, but I was having trouble with). I have also added in saving of screenshots and the option to switch into full screen mode when you load a ROM.

Last, but certainly not least, I've done some rather extensive work on how input is handled. I made it completely configurable (vbSMS was not configurable at all) and added a configuration window for it. In related news... I've added support for PC gamepad input! What's great about my method for this is, the buttons/directions are technically mapped to your keyboard configuration, and it also detects PC gamepads "on-the-fly". If for some reason you decide you don't want to play with the keyboard anymore (or some other off-the-wall situation), just plug in your PC gamepad without closing/restarting the emulator! Below are screenshots of the newly updated configuration windows.





Also, Mooney, I'm thinking about making a release pretty soon.
Robert
Wow, more real progress! I assume you can press Alt+Enter to toggle between window and full-screen on the fly?
olaf
Actually, the full screen toggling is done with the Esc key (like Project64, an emulator I use very often). Also, I just fixed background layer disabling (the column on the left won't show anymore when that layer is disabled. The difference can be seen below when compared to older screenshots.

olaf
Had to rename "olafsms" (even though it wasn't the final name anyway) to vbSMS+. A lot of people in the SMS emulation/gaming scene didn't like that I completely renamed the project and put my name in the emulator title. I can see where they wouldn't like that, and I don't want to make anyone mad at me. vbSMS+ makes a good mid-point in between renaming and not using the original name.
Robert
Has there been any further progress with this emulator?

Particularly in relation to getting the sound to work?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.