GameYob, a gameboy emulator for DS

Discussion in 'NDS - Emulation and Homebrew' started by Drenn, Feb 22, 2013.

  1. Drenn

    Drenn GBAtemp Advanced Fan

    Feb 22, 2013
    GameYob is an open-source Gameboy and Gameboy Color emulator, developed by me (Drenn), for the Nintendo DS. It has plenty of features that makes it a very complete application, like save states, mappable buttons, fast forwarding, rumble pak support and much more.
    GameYob does not run Gameboy Advance games and never will - see here or here for GBA emulators.

    See here for GameYob 3DS.

    GameYob v0.5.2: Newest stable release. The FAQ below applies to this version.
    GameYob Border Pack (last updated 26 Jan 2014): A collection of borders made by members of GBATemp! Extract to the root of your SD card.

    Known Issues (v0.5.2)
    - Having "autosaving" enabled (as it is by default) can cause lag in some games. You may want to disable this feature; if you do, you will need to exit out of the game before exiting GameYob itself, or you will lose your progress.
    - When running as a CIA on a New 3DS, the "touch" input gets spammed automatically. Adjust the "Key Config" settings to disable touch input.
    - The screen sometimes goes black after opening the menu or loading from a suspend state. Toggle the menu to fix it.

    Warning: Spoilers inside!
    Frequently Asked Questions

    How's the compatibility? What about Shantae?
    The vast majority of Gameboy and Gameboy Color games run at fullspeed, including fan-favorite Shantae, and beta versions of Resident Evil. Sound is also pretty good, with support for Pikachus's cry or Warlocked voiced effects, for example.

    How can I report a bug?
    The preferred method to report bugs is to open an issue on github, or just make a post here on gbatemp.

    How do I save?
    Whenever you save in-game, the save file (or SRAM) must be copied to the SD card. There are a few ways to do this:

    Method A) After saving in-game, press the X button (by default) to copy the SRAM to your SD. The "Exit" option also does this before exiting.
    Method B) Enable autosaving. The SRAM on the SD card will be updated automatically, but this can cause lag in some games which use SRAM as extra memory.

    It's highly recommended to at least try autosaving, for a more seamless experience. It's enabled by default as of v0.5.

    NOTE: There is a bug in the Robopon games which requires you to use save states.

    Are lameboy's save states compatible with gameyob?
    Hard saves (like .sav files) can be used between gameyob, lameboy, and most GB/GBC emulators. Save-states, on the other hand, are unique to each one of them, and could be used on other emulators if they shared the method of creating and loading saves. Lameboy save states are unusable on other emulators because it's source is closed and never was released to anyone.

    How do I set the default rom directory?
    Fill in the “rompath” option in gameyob.ini to the directory of your choosing. For example,
    Can I use the 3DS/DS fullscreen?
    Yes, GameYob supports scaling and filtering. Go to the [Display] tab of options and you can select scaling options such as "Aspect" and "Full", and enable or disable the scaling filter.

    Because I "cheated" by using both rendering engines to perform scaling, the bottom screen is always off when scaling is enabled.

    Can I use cheats?
    Gameshark and Game Genie codes are supported. In the [Settings] tab you can find the option "Manage Cheats". Gameyob supports BGB .CHT files, so you need to have them in your SD in order to access the option. They must be named identically to the rom, with the extension ".cht".

    Here's some places where you can start to look:
    Gameboy Cheat Files
    Gameboy Color Cheat Files
    How to Manually Create GameYob Cheat Files

    Can I use Cable Link features?
    Gameyob can use the ds's local wireless (sometimes called "nifi") for multiplayer functions. This feature is experimental, and only seems to work reliably with Tetris and Dr. Mario. Further improvements can be made, but they may be difficult to implement. Simply enable the "Wireless Link" option on both DS's to use link cable features.

    What does "GBC Bios" mean?
    If you have the corresponding "gbc_bios.bin" file in your ROM directory (you can find it on google), you can turn this option on to get colorized Gameboy games like you you would have if you were playing them on GBC hardware. The file's location can also be specified in “gameyob.ini”. A prime example is Metroid II: Return of Samus, which gets individual palettes for Samus, enemies and items instead of being monochromatic.

    You can also pick different palettes by pressing the directional pad and the AB buttons while the boot up "GAME BOY" logo is flashing.

    This is 100% optional and it has no affect on performance or emulation accuracy.

    How do I use Custom Borders?
    You need to have scaling off, and "Custom Borders" on. Then press "Select Border" in the menu to load the border. Press "Save Settings" for GameYob to auto-load the border next time.
    If you want to make your own border, be sure to save it as a 256x192, uncompressed, 15bpp bitmap image.

    What does "Detect GBA" mean?
    Certain games can detect if they're being played on a GBA: they use lighter palettes which are easier to see on a GBA, the Zelda Oracle games have a special "Advanced" shop, Shantae has features like a unique NPC in Bandit Town, a new dance and more. This option toggles that.

    What does "Sound Timing Fix" mean?
    This option makes sound emulation more accurate, while potentially using more power. Most notably it fixes Pikachu in Pokemon Yellow / Pinball, but it also makes many subtle improvements to other sound effects. Results are optimal when scaling is disabled, but this is not a requirement. It's recommended to leave this option on.

    If you experience slowdown when this option is enabled, be sure to disable the “Wait for Vblank” option in the debug settings.

    Is it Sudokuhax compatible?
    Yes, you can use the DSi's enhanced capabilities for full-speed in even the most intense games, and some crazy fast-forwarding. An installable CIA is also provided for hacked 3DS's.
    Last edited by Drenn, Feb 9, 2018
    Sirius64, ry755, Tarmfot and 68 others like this.
  2. Ammako

    Ammako GBAtemp Guru

    Dec 22, 2009
    Dang, now I'm going to want to deactivate the hblank option just to see what happens.
    Kurly, naved.islam14, N!ck and 7 others like this.
  3. XDel

    XDel Author of the Alien Breed Odamex Projekt.

    Jul 25, 2012
    United States
    Yes, NEVER tells us not to press the RED BUTTON!

    Will check this out, thanks for sharing your work!
  4. PJM

    PJM Advanced Member

    Apr 28, 2012
    I'm a fan of lameboy, but I'm disappointed that it's been abandoned, and that no source is available. If this is actively worked on, some missing features from lameboy are implemented, and the source is eventually released, I'd see no more need for lameboy.

    Will there be support for launching games via arguments on DSTwo? With lameboy when I choose a GBC game in BagPlug, it just loads the emulator, and I have to choose the game again from there.
    Ammako likes this.
  5. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    If you want to distinguish this program from lameboy almost instantaneously, please make your project open source.

    The DS has a really sad tradition of closed-source emulators, it would be awesome if your emulator didn't add to it. :)
  6. locolol

    locolol Member

    Sep 13, 2009
    Amazing! keep up the good work :yay: !
  7. Drenn

    Drenn GBAtemp Advanced Fan

    Feb 22, 2013
    I think I will. The main reason I started this was because I wanted to improve lameboy, but it was dead with no source... it'd be ironic if I didn't provide the source myself. What would you recommend for version control software / hosting sites? I've never had to make that decision before.

    It doesn't sound hard, but I don't have a DSTWO. What exactly would my emulator be receiving as arguments? Just argc=2 and argv[1] = filename?
    Ron likes this.
  8. Ron

    Ron somehow a weeb now.

    Dec 10, 2009
    Use GitHub or Google Code. Personally, I recommend GitHub, as it's much more developer friendly, and looks nicer too, and has a much larger community, however, you'll need to get acquainted with Git.
    Snailface likes this.
  9. Rydian

    Rydian Resident Furvert™

    Feb 4, 2010
    United States
    Cave Entrance, Watching Cyan Write Letters
    Github definitely seems to be the most popular. Projects are jumping off of sourceforge and such in droves to get to Github (since Git is apparantly the best source control stuff to come out since sliced bread).
  10. Normmatt

    Normmatt Former AKAIO Programmer

    Dec 14, 2004
    New Zealand
    Finally an open source Gameboy emulator for NDS. Is the cpu core coded in asm or C?
  11. Geren

    Geren GBAtemp Regular

    Aug 15, 2011
    Wow, I actually thought we would be stuck with lameboy forever given how the ds scene has been slowing down progressively in the last years. And open source to boot? you are a hero.
  12. WatchGintama

    WatchGintama GBAtemp Maniac

    Feb 22, 2009
    United States
    Finally, a new gameboy emulator for the DS. I've been waiting forever.
    thanks! :bow:
  13. pokefloote

    pokefloote GBAtemp Addict

    Mar 20, 2009
    United States
    I'm with everyone above, I have high hopes for this emulator. Especially with it becoming open sourced, things will get done much quicker with a bunch of brilliant minds working on it. :)
  14. Sicklyboy

    Sicklyboy ~I have crippling depression~

    Global Moderator
    Jul 15, 2009
    United States
    [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]
    Bookmarked. I'll have to check this out once I get my DSTWO set back up.

    Gonna clear and re-structure my microSD, need to update the FW, etc.
  15. Sora de Eclaune

    Sora de Eclaune Baby squirrel, you's a sexy motherfucker.

    Feb 15, 2011
    United States
    123 Fake Street
    This seems nice.

    Will consider it when this can play Shantae without stuttering when switching from menus to game.
  16. 2ndApex

    2ndApex GBAtemp Advanced Fan

    Jul 12, 2012
    United States
    Wow, I was literally just thinking about Lameboy today and when I saw this thread title on the front page I was almost praying that this wasn't a several year old bump. IDK where this sudden surge of DS homebrew is coming from but this is pretty awesome.

    Some quick suggestions you probably thought of already:
    -Redesigned menus from the atrocious Lameboy columns to NesDS/CATSFC style UIs
    -More GB palette options
    -Cheat support
    -NesDS-like gestures
    -NiFi Link cable support(?)
  17. BassAceGold

    BassAceGold Testicles

    Aug 14, 2006
    argv[0] is the path to the launched binary (path of the emulator binary) and argv[1] is the path to the file to launch. But you aren't specifically limited to just 2 arguments, you are free to add as many as you want if you don't feel like coding some options into a menu.

    If you are looking for a place to host code, I would suggest which supports Git or Mercurial (which ever you prefer), among many other features that Github may not provide for free that bitbucket does.
  18. Drenn

    Drenn GBAtemp Advanced Fan

    Feb 22, 2013
    I'm going to go with Github, thanks for the suggestions.
    C++, not that it uses many C++ features. I have a half-finished asm core which can fall back to the c++ core for unfinished instructions... I stopped because I wasn't convinced my hand-made assembly would be any better than the compiler. But I might as well finish, I think there's just the bit-manipulation opcodes remaining.
    Actually I kind of like lameboy's brutalist approach to menus. Fancy UIs aren't really my thing, plus it's really quick to throw in some temporary debugging options this way... I could probably at least get a font that's nicer to look at. Cheats, palettes, and wifi linking are definitely on my to-do list.
    Foxhounder and deshayzilla like this.
  19. Flame

    Flame Me > You

    GBAtemp Patron
    Flame is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 15, 2008
    nice work so far. keep it up
  20. Lilith Valentine

    Lilith Valentine GBATemp's Wolf-husky™ Always naughty

    Sep 13, 2009
    Many moons away
    Personally I was hoping someone would make a new GB/GBC emulator since Lameboy keeps dropping my Pokemon Red save for some reason.