Homebrew Emulation GameYob, a gameboy emulator for DS

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
@RocketRobz do you know which source is used to build the version of gameyob that's included in twilight menu?
On a similar vein, 4d1xlaan -- are you able to or have you already put your build's source up somewhere (github, etc.) so that your, er, fork could be tracked for sake of not losing a what's frankly a pretty decent one-off fix to time / dead links?
 

4d1xlaan

Well-Known Member
Member
Joined
Apr 21, 2024
Messages
1,232
Trophies
0
XP
1,426
Country
United States
On a similar vein, 4d1xlaan -- are you able to or have you already put your build's source up somewhere (github, etc.) so that your, er, fork could be tracked for sake of not losing a what's frankly a pretty decent one-off fix to time / dead links?
no point, all you have to do is copy the bios loading code into main function, because the way gameyob does it right now bios loading only happens when you explicitly load a rom from the file chooser

arm9/source/main.cpp:
C++:
int main(int argc, char* argv[])
{
    REG_POWERCNT = POWER_ALL & ~(POWER_MATRIX | POWER_3D_CORE); // don't need 3D
    consoleDebugInit(DebugDevice_CONSOLE);

    defaultExceptionHandler();

    time(&rawTime);
    lastRawTime = rawTime;
    timerStart(0, ClockDivider_1024, TIMER_FREQ_1024(1), clockUpdater);

    /* Reset the EZ3in1 if present */
    if (!__dsimode) {
        sysSetCartOwner(BUS_OWNER_ARM9);

        GBA_BUS[0x0000] = 0xF0;
        GBA_BUS[0x1000] = 0xF0;
    }

    fifoSetValue32Handler(FIFO_USER_02, fifoValue32Handler, NULL);

    sharedData = (SharedData*)memUncached(malloc(sizeof(SharedData)));
    sharedData->scalingOn = false;
    sharedData->enableSleepMode = true;
    // It might make more sense to use "fifoSendAddress" here.
    // However there may have been something wrong with it in dsi mode.
    fifoSendValue32(FIFO_USER_03, ((u32)sharedData)&0x00ffffff);

    initInput();
    setMenuDefaults();
    readConfigFile();
    swiWaitForVBlank();
    swiWaitForVBlank();
    // initGFX is called in initializeGameboy, but I also call it from here to
    // set up the vblank handler asap.
    initGFX();

    consoleInitialized = false;

    if (argc >= 2) {
        char* filename = argv[1];

        if (!biosExists) {
            FILE* file;
            file = fopen("/_nds/TWiLightMenu/emulators/gbc_bios.bin", "rb");
            biosExists = file != NULL;
            if (biosExists) {
                fread(bios, 1, 0x900, file);
                fclose(file);
            }
        }

        loadRom(filename);
        updateScreens();
        initializeGameboyFirstTime();
    }
    else {
        selectRom();
    }

    runEmul();

    return 0;
}

a cleaner way to do this would be to put bios loading code into a separate function, and just call the function in both places instead of duplicating the code (or maybe do bios loading in loadRom() if possible?), but duplicating the code here was easier and the end result is the same. I would bet that compiler optimization recognizes it and makes up for it anyway
 
Last edited by 4d1xlaan,

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
no point, all you have to do is copy the bios loading code into main function, because the way gameyob does it right now bios loading only happens when you explicitly load a rom from the file chooser
Well, fair enough if its so trivial a fork would be overkill. Out of curiousity, would just making a (forgive me if I've got the github terminology wrong), pull request with the changes to the main repo would be more appropriate for this sort of thing?
 

4d1xlaan

Well-Known Member
Member
Joined
Apr 21, 2024
Messages
1,232
Trophies
0
XP
1,426
Country
United States
Well, fair enough if its so trivial a fork would be overkill. Out of curiousity, would just making a (forgive me if I've got the github terminology wrong), pull request with the changes to the main repo would be more appropriate for this sort of thing?
probably, but then you would have to choose between submitting it to the original gameyob, gameyob mavica, or ds-homebrew fork (I suspect this is what twilightmenu uses, but without confirmation I can't be sure)

I can't say I'm interested in using github and making a pull request, but this isn't my code anyway. if anyone wants to implement it or make a pull request themselves then they are welcome to

btw: do you have the same problems using the official 0.5.2 build? because it's also possible that my build environment is bad and that my build is bad because of it

https://github.com/Stewmath/GameYob/releases/download/v0.5.2/gameyob.zip

I wasn't able to find Infinity which you mentioned, all I can find is some 2001 proto and I don't know if that's the right one considering that the one you mentioned came out in recent years
 

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
probably, but then you would have to choose between submitting it to the original gameyob, gameyob mavica, or ds-homebrew fork (I suspect this is what twilightmenu uses, but without confirmation I can't be sure)

I can't say I'm interested in using github and making a pull request, but this isn't my code anyway. if anyone wants to implement it or make a pull request themselves then they are welcome to

btw: do you have the same problems using the official 0.5.2 build? because it's also possible that my build environment is bad and that my build is bad because of it

https://github.com/Stewmath/GameYob/releases/download/v0.5.2/gameyob.zip

I wasn't able to find Infinity which you mentioned, all I can find is some 2001 proto and I don't know if that's the right one considering that the one you mentioned came out in recent years
The Infinity I'm talking about is the one that came out recently, and does exist as either a bespoke gbc cart or a gb rom you can buy/download from them.

Admittedly I haven't checked against the official 0.5.2 build. I'll try it out when I find time
 

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
btw: do you have the same problems using the official 0.5.2 build? because it's also possible that my build environment is bad and that my build is bad because of it
Alright, so just tested the official 0.5.2 build, seems the sound timing issues are not there compared to your build. This is being done with Wait for Vblank set to off -- on your build, setting it on seems to introduce some extra throttling that seems to keep the sound speed in check at the cost of some games being too slow with it on sometimes. So I'd say yeah, something changed between the official build and what you've done.
 
Last edited by Joelgp83,

4d1xlaan

Well-Known Member
Member
Joined
Apr 21, 2024
Messages
1,232
Trophies
0
XP
1,426
Country
United States
Alright, so just tested the official 0.5.2 build, seems the sound timing issues are not there compared to your build. This is being done with Wait for Vblank set to off -- on your build, setting it on seems to introduce some extra throttling that seems to keep the sound speed in check at the cost of some games being too slow with it on sometimes. So I'd say yeah, something changed between the official build and what you've done.
yeah, the code is the same, the only thing that's different would be build environment. unfortunately that's very difficult to debug, and drenn didn't give documentation to know which exact version of every build tool that was used to build gameyob so I'm kind of working blind here
 

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
I forgot which one was used.
Also, if you're wanting to send a PR, send it to the DS-Homebrew fork.
Oh, Hi there RocketRobz! Two things:

1.) Just wanted to say thanks for Twilightmenu, I've gotten a heck of a kick out of it on my DS Phat. I've gotten more mileage out of my DS in the past two years than I did in the past decade, so kudos. :D

2.) The fork on DS-homebrew seems to be a fork of the Mavica build, which itself seems behind compared to whatever build you've included on twilight menu, since the mavica build has graphical glitches (i.e., flat shaded with bad outer lines instead of the gradient seen on real HW) in rendering the text boxes in Infinity, and whatever's included in current twilightmenu does alot better (the gradient is there, but coloring seems slightly off). Granted, nitpicking, but it was a relatively big difference I noticed when attempting to decide what build to, uh, "daily drive" for my GB/GBC on DS needs.
 

Joelgp83

Active Member
Newcomer
Joined
Apr 26, 2017
Messages
33
Trophies
0
Age
41
XP
453
Country
United States
the gameyob.nds in twilightmenu is from october 2020, so it cant be that new to be fair
Well, that's weird, as the timestamps for gameyob in the twilightmenu archive (this is before extraction) are showing from this year (sept 2024). I'm curious where you are looking to have got a date from oct 2020. Not trying to argue, just trying to get on teh same page in case I'm wildly off base here.
 

4d1xlaan

Well-Known Member
Member
Joined
Apr 21, 2024
Messages
1,232
Trophies
0
XP
1,426
Country
United States
Well, that's weird, as the timestamps for gameyob in the twilightmenu archive (this is before extraction) are showing from this year (sept 2024). I'm curious where you are looking to have got a date from oct 2020. Not trying to argue, just trying to get on teh same page in case I'm wildly off base here.
it's normal that the time stamp in the archive will be different, the way they're making the archive touches the files in a way where the os thinks the file was modified, so the files end up being all a similar time stamp (by a matter of seconds)

this is what you're looking for, and if you compare the checksums, this is the same file that's in the release archives

https://github.com/DS-Homebrew/TWiL...zfile/_nds/TWiLightMenu/emulators/gameyob.nds

I mixed up the dates btw, october 2020 is the 0.5.2 official release being reuploaded (which was originally from feb 2017). twilightmenu has something from may 2020 but we dont know what source was used to build it, all I know is that it's different from the 0.5.2 release
 

retro_tastic

Member
Newcomer
Joined
Aug 22, 2024
Messages
9
Trophies
0
Age
39
XP
27
Country
Czech Republic
Does anyone know what is the total input lag and sound latency of GameYob when compared to the original Game Boy Color hardware? Do you play rhythm games on it? Nintendo DS seems to be pretty baremetal, I guess the best scenario would be "scaling off" and using the DSi CPU speed?
 

Orionidis

Member
Newcomer
Joined
Dec 12, 2024
Messages
10
Trophies
0
Age
26
XP
14
Country
Greece
Um hi. Well how do i make gameyob use both gb and gbc bios? I mean is there a setting to change for it to display the original gb bios on original gb games and gbc bios on gbc games?
 

JuanMena

90's Kid, Old Skull Gamer & Artist
Member
Joined
Dec 17, 2019
Messages
5,425
Trophies
3
Age
31
Location
the 90's 💙
XP
14,188
Country
Mexico
Um hi. Well how do i make gameyob use both gb and gbc bios? I mean is there a setting to change for it to display the original gb bios on original gb games and gbc bios on gbc games?
Place both bios files in your roms folder.
Set the emulator to use bios files.

Edit: I swear I read Lameboy in the title of the thread 😗
 

Orionidis

Member
Newcomer
Joined
Dec 12, 2024
Messages
10
Trophies
0
Age
26
XP
14
Country
Greece
And is there a setting for it to change to do this?
Post automatically merged:

I want to know. I tried it a long time ago but it didnt work
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    @HUNTERFOX, I would use my piano keyboard more often if I could plug it into my PC or something.
    +1
  • K3Nv3 @ K3Nv3:
    Would my psychiatrists think I'm crazy if I walk in with ketchup and meth in my pockets
  • Sicklyboy @ Sicklyboy:
    Probably will think you're a ketchup user
  • K3Nv3 @ K3Nv3:
    Snortup
  • Xdqwerty @ Xdqwerty:
    Anyone here?
  • K3Nv3 @ K3Nv3:
    No one that you like is here check back later
    +1
  • Xdqwerty @ Xdqwerty:
    Boobs
  • kijetesantakalu042 @ kijetesantakalu042:
    I like you quail
    +1
  • Xdqwerty @ Xdqwerty:
    Good night
  • Sicklyboy @ Sicklyboy:
    made enchiladas tonight. came out decent. Not the best I've made, and half of the tortillas split open because I didn't warm them first smh, and I used jarred sauce rather than making my own. Still tasty though
  • K3Nv3 @ K3Nv3:
    Was this employed jarred or unemployed jarred
  • K3Nv3 @ K3Nv3:
    Coax still surprisingly goes for a decent amount $10 per 10feet
  • kijetesantakalu042 @ kijetesantakalu042:
    phonaesthetics
  • BigOnYa @ BigOnYa:
    Coax wire today is much better (RG6) than old school coax (RG58/59). Newer wire more expensive than the older wire.
  • BigOnYa @ BigOnYa:
    You can buy it at any length @homedepot wire cutting area cheaper than buying preformed cable, but you have to put on your own ends/ connectors.
  • K3Nv3 @ K3Nv3:
    I still like DTV but the wire wasn't long enough to reach the window still pick up 40 channels
    +1
  • BigOnYa @ BigOnYa:
    Yea me too, esp for local news, sports, or channel surfing. I get like 60 channels but there's like 15 shopping networks, and bunch other bs, religion, Hispanic, etc. I went thru and blocked most those on tv channel settings.
  • BigOnYa @ BigOnYa:
    There is 1 Hispanic channel I kept, sometimes they have soap operas on it, w scandalous clothed hotties, I just beat mute it.
  • K3Nv3 @ K3Nv3:
    Ah yes the Juan channel order 15 pairs of feet
  • K3Nv3 @ K3Nv3:
    I got this antenna but the damn thing has usb power right next to the coax plug and you can't actually extend it without usb extension the Pic makes the cable look longer than it actually is https://a.co/d/501IQf2
  • BigOnYa @ BigOnYa:
    Use a old phone/ USB charger block thing, plug into wall instead of tv usb. Use cheap extension cord if need.
  • K3Nv3 @ K3Nv3:
    You still need usb extension because coax end cord is the same length
    K3Nv3 @ K3Nv3: You still need usb extension because coax end cord is the same length