Gmod Gameboy and Intel 8080 emulators.

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

Release Notes:
Speed is still an issue but it should run at real time or close to real time at a decent frame rate on any modern processor.
It’ll work in MP kinda, everyone will run their own instance of the emulator with no syncing.
The GPU code is prone to glitches, unless it’s something major don’t report it.
Only MBC3, MBC1 and ROM games are supported and there’s no “bounds”, if a game makes a rom banking mistake that a real Gameboy would check for the emulation will likely fail and crash with the stack pointer or program counter overflowing.
Tetris and Pokemon are confirmed to be 100% working, at least at the start. If you find any MBC1, 3 or ROM games which glitch report it to me.
Rom files are currently stored in plain text hex (see below), no rom files are given away in the emulator. Once converted into plain text hex rom files should be stored in GEM/Data/GBZ80 for gameboy.
No saving currently.
Please do not upload this elsewhere.

If you have any issues, glitches or just general questions add me on steam: http://steamcommunity.com/id/fafasafaffagr/home/, please don’t contact me if you can’t get SVN to work or something.

Rom files are currently read in plain text hex because Lua’s binary reading support is incomplete and cannot load roms with the 0D0A character in. a plain text hex file is just that, with each byte being represented by two ASCII hexadecimal character in capitals with no other information. One method to convert to Plain Text Hex is to download the hex editor FlexHex, load the rom there, copy all the hex into NP++ and find replace the spaces. All rom files should be .txt. If someone would like to write a quick python script for the public to convert to plain text hex that’d be great, I’d do it but I’m hoping this is just a temporary measure until binary reading is fixed.

This is a project to completely and quickly emulate the Nintendo Gameboy entirely within GMod Lua (no modules) including multilayer syncing and maybe even sound. Currently we have the CPU Core almost 100% finished and it boasts greater compatibility than Visual Boy Advance. Interrupts, Timers, Timings, and the GPU are all about 99% complete now. Current focus is on optimisation.

The GPU emulates on a frame rather than Scanline basis, this can cause some video effects not to work properly (Like the scrolling in pokemon red’s start menu) and priorities are off too. These are both minior issues that shouldn’t effect gameplay.

Speed is about 40% in a Laptop’s 2Ghz Dual Core i3. I hope to get this up to 100%.

The project started off as a simple Intel 8080 Emulator, running the original Space Invaders.

I have to admit this is really cool. Is this pure ( gmod ) Lua or are there modules helping out?

Wow! Very nice.
Can’t wait to see the progress.

No modules here sir.

I wanna play me some Pokemon.

Well you are in luck!

He said pokemon, not an attempt at recreating pokemon for GMod.

Well anyway, good job dude!

Now implement it into an arcade machine and the community will pay billions for it

Hey Techni, been following this on wiremod.com and I have to say this is very impressive. Good job! :smiley:

I could add that the actual entity which the user interacts with is like less than 50% done. I should rewrite it all… it’s a bit of a mess right now.

There’s also a few details to be sorted out. For example: As you can see, when he uses the screen, he’s teleported in front of it and faces it, but that also makes him get stuck in the ground when he gets out. Don’t really know how I’ll fix that.

Save the player pos where he got in and teleport him there when he gets out? That sounds way to simple :v:

Can’t you just move the view instead of the whole player?

Now make it load the Gameboy Camera rom and scare people.

WHO ARE YOU RUNNING FROM?!?

INCEPTION

Kind of defeats the purpose of drawing it 3d in the world… except for other people watching, I guess.

Could try that

a game withing a game. Imagine playing bf3 in gmod.

Imagine your fps < 10 :suicide:

It would be < 0. :suicide:

You still got a 2mhz laptop? :v:

This would be a fun addition to RP, there would be arcades.

I suggest you give it a new model like a console in a classic arcade. If not, its fine. It would just be awesome enough to play it at all.

Great job! I’ll follow this until release.

amazing.