1. Post #1
    technicolour's Avatar
    January 2008
    108 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Winner x 109Lua King x 77Funny x 2Lua Helper x 2Useful x 1Friendly x 1Disagree x 1Artistic x 1 (list)

  2. Post #2
    Gold Member
    Kogitsune's Avatar
    September 2005
    2,748 Posts
    I have to admit this is really cool. Is this pure ( gmod ) Lua or are there modules helping out?

  3. Post #3
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,944 Posts
    Wow! Very nice.
    Can't wait to see the progress.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 2 (list)

  4. Post #4
    technicolour's Avatar
    January 2008
    108 Posts
    I have to admit this is really cool. Is this pure ( gmod ) Lua or are there modules helping out?
    No modules here sir.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Lua King Lua King x 76Winner Winner x 2 (list)

  5. Post #5
    ForMod2013
    KnightVista's Avatar
    June 2009
    2,796 Posts
    I wanna play me some Pokemon.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 9 (list)

  6. Post #6
    c-unitV2's Avatar
    April 2011
    715 Posts
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 28Disagree Disagree x 2Informative Informative x 1 (list)

  7. Post #7
    jrj996's Avatar
    July 2009
    1,656 Posts
    He said pokemon, not an attempt at recreating pokemon for GMod.

    Well anyway, good job dude!
    Reply With Quote Edit / Delete Reply Windows XP United States Show Events Agree Agree x 11Dumb Dumb x 1 (list)

  8. Post #8
    Ask about my EBOLA fetish
    GameDev's Avatar
    February 2010
    12,354 Posts
    Now implement it into an arcade machine and the community will pay billions for it
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 9Funny Funny x 1 (list)

  9. Post #9
    thetree's Avatar
    February 2010
    41 Posts
    Hey Techni, been following this on wiremod.com and I have to say this is very impressive. Good job! :D
    Reply With Quote Edit / Delete Reply Windows Vista United Kingdom Show Events Agree Agree x 3 (list)

  10. Post #10
    Gold Member
    Divran's Avatar
    April 2008
    2,622 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 7 Sweden Show Events Friendly Friendly x 1 (list)

  11. Post #11
    SirCrest is my life, so is yours.
    Goz3rr's Avatar
    October 2009
    7,271 Posts
    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

  12. Post #12
    Jvs
    PENISCorp's First Employee
    Jvs's Avatar
    June 2009
    1,551 Posts
    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.
    Can't you just move the view instead of the whole player?
    Reply With Quote Edit / Delete Reply Windows XP Italy Show Events Agree Agree x 3 (list)

  13. Post #13
    amkoc's Avatar
    January 2011
    562 Posts
    Now make it load the Gameboy Camera rom and scare people.

    WHO ARE YOU RUNNING FROM?!?

  14. Post #14
    Osku1234's Avatar
    October 2010
    2,253 Posts
    INCEPTION
    Reply With Quote Edit / Delete Reply Windows XP Finland Show Events Dumb Dumb x 16Agree Agree x 1Funny Funny x 1 (list)

  15. Post #15
    Gold Member
    Divran's Avatar
    April 2008
    2,622 Posts
    Can't you just move the view instead of the whole player?
    Kind of defeats the purpose of drawing it 3d in the world.. except for other people watching, I guess.

    Save the player pos where he got in and teleport him there when he gets out? That sounds way to simple
    Could try that
    Reply With Quote Edit / Delete Reply Windows 7 Sweden Show Events Friendly Friendly x 1 (list)

  16. Post #16
    I'm a dumb whiny baby that just won't shut the hell up. Also, I love big hairy cock.
    Dennab
    December 2009
    1,960 Posts
    a game withing a game. Imagine playing bf3 in gmod.
    Reply With Quote Edit / Delete Reply Windows 7 Romania Show Events Agree Agree x 2 (list)

  17. Post #17
    Gold Member
    LuaStoned's Avatar
    September 2007
    1,349 Posts
    a game withing a game. Imagine playing bf3 in gmod.
    Imagine your fps < 10
    Reply With Quote Edit / Delete Reply Windows 7 Austria Show Events Lua King Lua King x 1 (list)

  18. Post #18
    Grocel's Avatar
    October 2008
    1,208 Posts
    Imagine your fps < 10
    It would be < 0.

    As for speed right now the core itself runs at the full 4mhz, although you may be concerned by my 15fps in the above screenshot that's because we're refreshing render target every target rather than merely updating pixels which have changed, furthermore we're displaying the entire 256 by 256 vram background tile map, rather than the 160 144 on the actual gameboy. Coupled with the fact that I'm on a slow 2mhz laptop core i3 means we're expecting some really playable gameplay, especially on high end systems.
    You still got a 2mhz laptop?
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Funny Funny x 13Agree Agree x 3Friendly Friendly x 1Lua Helper Lua Helper x 1 (list)

  19. Post #19
    Poesidan [GAG]'s Avatar
    October 2009
    1,640 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Agree Agree x 8Optimistic Optimistic x 1Dumb Dumb x 1 (list)

  20. Post #20
    Casual Bananas
    E X C L's Avatar
    February 2011
    1,709 Posts
    amazing.
    Reply With Quote Edit / Delete Reply Windows 7 Netherlands Show Events Agree Agree x 1 (list)

  21. Post #21
    CakeMaster7's Avatar
    October 2010
    11,744 Posts
    Impressive.

  22. Post #22
    Gold Member
    Divran's Avatar
    April 2008
    2,622 Posts
    I suggest you give it a new model like a console in a classic arcade.
    If someone has a model like this
    lying around somewhere, I guess I could make it work with that.
    Reply With Quote Edit / Delete Reply Windows 7 Sweden Show Events Friendly Friendly x 8Winner Winner x 2 (list)

  23. Post #23
    Gold Member
    Dennab
    March 2009
    2,716 Posts
    I'm impressed. Great job!

  24. Post #24
    technicolour's Avatar
    January 2008
    108 Posts
    We have our first homebrew rom running, it's all starting to fall into place. (Ignore the junk, that would all be out of view on a normal gameboy, just currently our one shows the full vram map as opposed to just the visible screen for debugging purposes)

    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Lua King Lua King x 22Winner Winner x 4 (list)

  25. Post #25
    gunguy765's Avatar
    April 2010
    1,811 Posts
    Keep up the good work
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 2 (list)

  26. Post #26
    FOXY BROWN
    Slade Xanthas's Avatar
    January 2007
    2,105 Posts
    holy shit

  27. Post #27
    Gold Member
    Hentie's Avatar
    May 2010
    2,128 Posts
    INCEPTION
    What's next? Gameboy homebrew that allows you to create a minigame in gameboy?
    A minigame inside a game inside a game?

    We have to go deeper.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 10Lua King Lua King x 1Funny Funny x 1 (list)

  28. Post #28
    freemmaann's Avatar
    January 2009
    1,133 Posts
    Pretty amazing. You also said you haven't done much in Lua, so even more so.

  29. Post #29
    Gold Member
    Loures's Avatar
    February 2009
    2,118 Posts
    You are loading ROMs from C right?

  30. Post #30
    Jvs
    PENISCorp's First Employee
    Jvs's Avatar
    June 2009
    1,551 Posts
    You are loading ROMs from C right?
    Plain pure Lua he said,no modules involved.

  31. Post #31
    OneWingedAngel8's Avatar
    January 2010
    1,012 Posts
    If someone has a model like this

    lying around somewhere, I guess I could make it work with that.

    I know there are a couple in a Left 4 dead 2 Custom campaign called Suicide blitz, so i guess you could use those.

  32. Post #32
    Wait... so if I write anything here, it's going to show up under my name?
    B!N4RY's Avatar
    December 2009
    7,092 Posts
    Sweet! Now I can play a video game inside of a video game!

    Anyways great work, looking forward to the release
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Agree Agree x 1 (list)

  33. Post #33
    Ask about my EBOLA fetish
    GameDev's Avatar
    February 2010
    12,354 Posts
    If someone has a model like this

    lying around somewhere, I guess I could make it work with that.
    I do. I'm not Meow Meow made one for me.


  34. Post #34
    MendozaMan's Avatar
    April 2007
    4,800 Posts
    Wow, this is amazing - reminds me of the stuff people do in Little Big Planet, only with more code

  35. Post #35
    Herr General's Avatar
    June 2007
    540 Posts
    Very cool.

  36. Post #36
    Gold Member
    Loures's Avatar
    February 2009
    2,118 Posts
    Playing the original pokemon game in GMod makes me very happy.

  37. Post #37
    Gold Member
    Divran's Avatar
    April 2008
    2,622 Posts
    I know there are a couple in a Left 4 dead 2 Custom campaign called Suicide blitz, so i guess you could use those.
    I don't have L4D or L4D2.

    I do. I'm not Meow Meow made one for me.

    But that's just a picture :C and it's got a TF2 logo on it
    Reply With Quote Edit / Delete Reply Windows 7 Sweden Show Events Agree Agree x 3 (list)

  38. Post #38
    Ask about my EBOLA fetish
    GameDev's Avatar
    February 2010
    12,354 Posts
    I don't have L4D or L4D2.



    But that's just a picture :C and it's got a TF2 logo on it
    Can be reskinned.

    If not, I could port over those L4D Models.

  39. Post #39
    Gold Member
    itak365's Avatar
    March 2009
    2,747 Posts
    http://www.garrysmod.org/downloads/?a=view&id=114771

    http://www.garrysmod.org/downloads/?a=view&id=103554

    The second one's actually fairly shitty, but either one would require reskins anyhow.

  40. Post #40
    technicolour's Avatar
    January 2008
    108 Posts
    Been chasing down bugs in the CPU lately, there's still several but all of the most critical ones have been ironed out. Started to add interrupts and GPU timing.

    Commercial games are starting to show life, here's Tetris with my bare-bones debugger on the side.

    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Winner Winner x 14Lua King Lua King x 1 (list)