Gameboy Emulator Release 2 (Now with sound)

Gameboy Emulator
Developed by Divran & Techni

Decided to get a proper release thread going with the new release.

**New Features:
***Sound (Forgive the ear-rape, it’s early days)
*50% to 100% speed improvement.
*GPU Optomised and many bugs fixed.
*CPU Bugs fixed, Pokemon Gold, Links Awakening run flawlessly (As do the majority of games now)

Planned Features:
*Save-states/Native saving
*Further optomisations
*Gameboy Colour support
*Multiplayer Syncing (Waiting on the 64KB tranfser update) (Yes you WILL be able to trade pokemon AND watch other people playing)
*Further improvements to sound
*Prop/Model
*Options Menu with customisable settings
Running native .rom files without conversion (If the binary reading bug is fixed :x)
Gameshark
**
Installation and Usage
:

Download from either:

http://www.garrysmod.org/img/?t=dll&id=126182

or SVN:

http://garryboy.googlecode.com/svn/trunk/GEM

Extract/Export the GEM folder into Addons.

To run gameboy rom files you unfortunately have to convert them into plain-text so gmod can read them first, here’s a quick exe to do just that, run it and follow the instructions:

http://dl.dropbox.com/u/31490251/Hexidecimal%20Converter.zip

Source code (For those on other operating systems with python installed):


import os
 
filename = raw_input("Drag and drop the file you want to convert")
 
filename = os.path.normpath(filename.strip().strip('\'\"'))
 
infile  = open(filename, 'rb')
outfile = open(filename + "_hex" + ".txt", 'wb')
 
for b in infile.read():
        outfile.write("%02X" % ord(b))
 
infile.close()
outfile.close()
 
print("Done!")
raw_input("Press enter to close.")


Put the resulting yourromnname.gb_hex.txt into \addons\GEM\data\gem_emulator\GBZ80

You can then run the file using the in-game menu. You use the emulator by spawning the entity from the entities tab and using the on-screen menus.

Gameboy roms will show up under GBZ80, 8080 is an older emulator that plays space invaders, best to ignore it as it sometimes crashes. Also, ignore nes.lua :S.

Games Confirmed to work with no issues:
Pokemon Red/Blue/Yellow
Pokemon Gold/Silver
Tetris
Metroid 2
The Legend of Zelda: Link’s Awakening

Games with issues:
Mario Six Gold Coins: Mario is invisible
Super Mario Land: Background doesn’t scroll

This is epic

It’s a game within a game.

Does it save?

Watching other people play would be so awesome!

[editline]29th October 2011[/editline]

Oh god the sound haha, what’s wrong with that? Sounds like you just have wrong frequencies.

Wow. I remember when we used to play GBA emulators on the school comps back in high school XD We could barely get them to run! Now we’re playing GBA emulators INSIDE of other games. Because why the **** not?

Someone run this demo on it:

i wonder what would happen,if it doesn’t crash.

Absolutely amazing.

Not yet but soon.

Sound is quite a challenge in Gmod as there are no sound digitisation capabilities. What I’m doing is pitching a couple of square waves but this obviously requires tuning to match the original gameboy, furthermore things like pitch and volume envelopes are not emulated yet, neither is the noise channel.

The Sample channel will never be emulatable but it’s rarely utilised by gameboy games.

Probably wouldn’t crash but it’d be glitchy, Demos utilise scanline-based rendering which is rarely used in actual games. I’ve opted to not emulate on a scanline level yet due to the large overhead but I will add an option for doing so on beefier computers sooner or later.

Bug: If you undo it while playing, your mouse gets stuck out of aiming. You cant get it back in without running lua via console to hide the cursor.

This is really neat.
So after you get everything working properly could we possibly apply this to a Gameboy model or something?

This looks sweet. I’m downloading. Question, does it come with games or do I have to download those on my own?
EDIT: Nevermind

you have to download those on your own you silly goose~

AWESOME :rock:

Is there a way to run this in SFM?

Now make another gameboy emulator for this emulator, so I’ll can play game boy while playing game boy while playing Garry’s mod.

oh the autism

I know this was totally necro’d but does it still function? did anyone continue it? I like this concept

EDIT: I just realized this wasn’t new…