1. shinyquagsire23

    OP shinyquagsire23 SALT/Sm4sh Leak Guy
    Member

    Joined:
    Nov 18, 2012
    Messages:
    1,970
    Country:
    United States
    Greets all,

    So I've been working on a thing for a while. I had originally abandoned the project because I thought it was unable to be done without the use of dynamic recompilation, however as it turns out it was in fact possible. I present my 3DS GBA Emulator: CitrAGB, a 3DS GBA emulator based on gpsp.

    [​IMG]
    [​IMG]

    As of now, compatibility is technically on-par with whatever gpsp's interpreter is able to handle, however, due to the nature of the port some games will not run or crash on particular parts. Flipping the screen to it's proper orientation did a bit of damage which might take a bit to get fixed up, and a lot of things still need implementation. But, on the plus side, many games that do run actually run fairly well, around 50% speed in optimal cases, or as low as 20% if the game uses extremely inefficient idle loops. In the future I also plan on hopefully porting gpsp's dynrec CPU to be able to work on the 3DS as well, once smea updated ninjhax to allow developers to set RAM pages executable. This will increase emulation speed dramatically.

    Controls:
    A, B, Start, Select, L, R, and the D/C-Pad all map out to their rightful GBA buttons. Y is bound to select, and X currently exits back to the homebrew menu

    Sauce Code:
    You can find the source code for CitrAGB on my GitHub here. Once again, this is very much a work in progress and extremely buggy, but the bugs will be fixed and the emulator refined with time. However, if you encounter bugs let me know the game name and when the bug occurs so I have games to test against while fixing bugs.

    Installation Instructions:

    For Ninjhax:
    First, grab the .3dsx here and rename it/place it in sd:/3ds/<name of .3dsx>. You can also grab the smdh here and give it the same name and place it in the same directory as the 3dsx. Next, download game_config.txt from here and a sample homebrew application here to make sure everything is set up right before you run regular GBA ROMs. The last thing you will need is gba_bios.bin. You can either dump this/find this online, or you can use Normatt's open source GBA bios here. A proper GBA bios dump is preferred, Normatt's bios has shown issues with some games. Once you have gba_bios.bin, place it either in the root of your SD card or in /gba.

    For CFW:
    Grab the .cia from here and place it anywhere on your SD card. Use a .cia manager such as FBI, BRM, or DevMen to install it. Next, download game_config.txt from here and a sample homebrew application here to make sure everything is set up right before you run regular GBA ROMs. The last thing you will need is gba_bios.bin. You can either dump this/find this online, or you can use Normatt's open source GBA bios here. A proper GBA bios dump is preferred, although Normatt's bios hasn't shown any issues as of yet. Once you have gba_bios.bin, place it either in the root of your SD card or in /gba.

    After downloading everything, your SD card structure should look something like this:
    game_config.txt
    gba_bios.bin
    demo.gba
    /3ds/<3dsx name>/<3dsx name>.3dsx
    (3dsx only)
    /3ds/<3dsx name>/<3dsx name>.smdh (3dsx only)

    Currently Known Bugs:
    • Any video issues which may arise
    Special Thanks
    Big thanks to Normatt, smea, yellows8 and plutoo for helping me get this working. Probably wouldn't have got anywhere in some places without your help. Special thanks to @aliaspider for pointing out a fix for .cia.
     
    Last edited by shinyquagsire23, Sep 20, 2015
  2. DarkKnightPT

    DarkKnightPT GBAtemp Regular
    Member

    Joined:
    May 18, 2014
    Messages:
    150
    Country:
    nice, I would like to test it out I really like gpsp, can you post a .cia version of it or 3ds please? Thanks
     
    supermalloch likes this.
  3. Guurak

    Guurak Newbie
    Newcomer

    Joined:
    Dec 5, 2011
    Messages:
    1
    Country:
    United States
    Does not work for me. I boot up the 3dsx file and 3/4 of the screen turns grey on both screens. Then it boots back to the system menu and restarts.
     
    LinkMain111 and Derfderk like this.
  4. shinyquagsire23

    OP shinyquagsire23 SALT/Sm4sh Leak Guy
    Member

    Joined:
    Nov 18, 2012
    Messages:
    1,970
    Country:
    United States
    Hm, can't say I've gotten that. Any particular 3DS/system version you're running on? Make sure you've copied the file correctly, it should be 1.2MB in size. On that note, I'll also try re-uploading the .3dsx as well.
     
  5. kane159

    kane159 GBAtemp Regular
    Member

    Joined:
    May 28, 2013
    Messages:
    197
    Country:
    Taiwan
    me too ,and when i tried to build from source it gaves me this error,donno whats wrong :/

     
  6. shinyquagsire23

    OP shinyquagsire23 SALT/Sm4sh Leak Guy
    Member

    Joined:
    Nov 18, 2012
    Messages:
    1,970
    Country:
    United States
    Shoot, I forgot a file. Pull the latest changes and try compiling now.
     
  7. kraan

    kraan Advanced Member
    Newcomer

    Joined:
    Dec 12, 2014
    Messages:
    84
    Country:
    Awesome, I'll be sure to test this out as soon as my copy of QN arrives. Great job.
     
  8. kane159

    kane159 GBAtemp Regular
    Member

    Joined:
    May 28, 2013
    Messages:
    197
    Country:
    Taiwan
    hummm same error here , maybe git just havent update the file yet, ill try it later
     
  9. Idaho

    Idaho GBAtemp Advanced Fan
    Member

    Joined:
    Oct 3, 2013
    Messages:
    827
    Country:
    France
    That's great, will we be able to also have it as .cia ? GBA emulation is one of the main goal in term on emulation on the 3DS, let's make it happen :3
     
  10. piratesephiroth

    piratesephiroth I wish I could read
    Member

    Joined:
    Sep 5, 2013
    Messages:
    3,414
    Country:
    Brazil
    I'm getting that same error.
     
  11. ChrisRX

    ChrisRX GBAtemp Fan
    Member

    Joined:
    Nov 8, 2006
    Messages:
    490
    Country:
    Margen67 likes this.
  12. Joshmas

    Joshmas Advanced Member
    Newcomer

    Joined:
    Dec 18, 2014
    Messages:
    71
    Country:
    Would anyone be able to post an updated .3dsx file im having issues compiling.
     
  13. shinyquagsire23

    OP shinyquagsire23 SALT/Sm4sh Leak Guy
    Member

    Joined:
    Nov 18, 2012
    Messages:
    1,970
    Country:
    United States
  14. Xenon Hacks

    Xenon Hacks GBAtemp Guru
    Member

    Joined:
    Nov 13, 2014
    Messages:
    7,413
    Country:
    United States
    Weird I dont even see it in HBL
    Whats the proper pathing for this?
     
  15. Chrisser_75

    Chrisser_75 GBAtemp Regular
    Member

    Joined:
    Dec 12, 2014
    Messages:
    264
    Country:
    Germany
    the .3dsx from here doesn't work. :(
    has someone a working "new" compiled .3dsx?
    #I'mAnoob
     
  16. Shadowtrance

    Shadowtrance GBAtemp Addict
    Member

    Joined:
    May 9, 2014
    Messages:
    2,493
    Country:
    Well copying the font1.c from hb menu got past that error with compiling, only to run into another one haha

    All fine until it gets here near the end...

     
  17. titegtnodI

    titegtnodI Advanced Member
    Newcomer

    Joined:
    Nov 25, 2014
    Messages:
    82
    Country:
    Canada

    Update libctru, gfxSetDoubleBuffering is in libctru\source\gfx.c.
     
  18. Xenon Hacks

    Xenon Hacks GBAtemp Guru
    Member

    Joined:
    Nov 13, 2014
    Messages:
    7,413
    Country:
    United States
    Yeah I get a cut in half black screen
     
  19. Shadowtrance

    Shadowtrance GBAtemp Addict
    Member

    Joined:
    May 9, 2014
    Messages:
    2,493
    Country:
    That seemed to have done the trick. :)

    Thought i was up to date, apparently not... haha
     

    Attached Files:

  20. DarkFlare69

    DarkFlare69 GBAtemp Guru
    Member

    Joined:
    Dec 8, 2014
    Messages:
    5,050
    Country:
    United States
    Where's the .smdh file? I don't like having homebrew applications that don't have a smdh file. I can make one for you if yoy want.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Emulator, CitrAGB, (WIP)