Homebrew GameYob 3DS - GB/C emu

Idaho

Well-Known Member
Member
Joined
Oct 3, 2013
Messages
884
Trophies
1
Age
29
XP
1,412
Country
France
Here to report an issue I'm having with pokemon crystal:

The game runs flawlessly but sometimes when I open a menu or change from an area to another, the screen goes blank and I can't do anything, not a big problem for me as I save very often but still I think it might require investigation.

Thank you for your dedication to this project guys ;)
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,212
Trophies
2
XP
34,157
Country
Mexico
If I download one of the newest build CIAs, should I uninstall the older CIA first from my 3DS or can I simply install over the currently installed one?
 

MarkDarkness

Nocturnal
Member
Joined
Dec 17, 2009
Messages
1,403
Trophies
2
XP
3,215
Country
Poland
The scaling filter option is there, however apparently it doesn't work properly. Fixed now. Don't know why you'd need a clock though...?

Additionally, I re-implemented autosaving from the DS version, fixed a few misc things, and made a bunch of changes internally.

Download: https://www.dropbox.com/s/ms1kes4jhrb3meg/gameyob.zip?dl=0

EDIT: If you downloaded, please redownload. Had to make a few adjustments to rendering code.
Thank you, I'm going to test it tonight. :) The clock is just a nice feature to have, I guess... and since the code is already there in theory. Dunno how different the 3DS libraries are in relation to the DS ones to justify tinkering around with it, though.

One thing that I do still miss though is the line highlight when selecting games or a coloring of the currently selected ROM instead of just an asterisk. It does make a big difference when viewing conditions are not ideal (like the bus I'm playing in right now).
 
D

Deleted User

Guest
I just noticed the single screen option is doing the same as the "Game Screen" one (Top/Bottom).

Normal behavior?
Seems like it was intended, but honestly it doesn't really make sense to me. I'll probably stop that from happening.
Here to report an issue I'm having with pokemon crystal:

The game runs flawlessly but sometimes when I open a menu or change from an area to another, the screen goes blank and I can't do anything, not a big problem for me as I save very often but still I think it might require investigation.

Thank you for your dedication to this project guys ;)
Noted.
Thank you, I'm going to test it tonight. :) The clock is just a nice feature to have, I guess... and since the code is already there in theory. Dunno how different the 3DS libraries are in relation to the DS ones to justify tinkering around with it, though.

One thing that I do still miss though is the line highlight when selecting games or a coloring of the currently selected ROM instead of just an asterisk. It does make a big difference when viewing conditions are not ideal (like the bus I'm playing in right now).
I could probably add that back in, won't take too long.

EDIT: Okay, two changes made. I changed the single screen option into a pause on menu option, because honestly that was the only potentially useful thing single screen did. The menu is always hidden while playing anyway. I also added line highlighting to the file selector.

Download: https://www.dropbox.com/s/ms1kes4jhrb3meg/gameyob.zip?dl=0
 
  • Like
Reactions: zfreeman

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
EDIT: Okay, two changes made. I changed the single screen option into a pause on menu option, because honestly that was the only potentially useful thing single screen did. The menu is always hidden while playing anyway. I also added line highlighting to the file selector.

I only added the single screen option because someone was using a DS where one of the screens didn't work properly. I never got around to implementing the feature properly on a 3DS. I wouldn't worry about it though.
 
D

Deleted User

Guest
I only added the single screen option because someone was using a DS where one of the screens didn't work properly. I never got around to implementing the feature properly on a 3DS. I wouldn't worry about it though.

Ah, okay. I didn't want to have to mess with screen formats a bunch, since the ctrulib console changes the console screen format to single buffered RGB565, and it didn't really seem that useful to me anyway.

On another note, do you have any idea what in this commit might have broken any games? Specifically, Pokemon Pinball (MBC5).
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
Ah, okay. I didn't want to have to mess with screen formats a bunch, since the ctrulib console changes the console screen format to single buffered RGB565, and it didn't really seem that useful to me anyway.

On another note, do you have any idea what in this commit might have broken any games? Specifically, Pokemon Pinball (MBC5).
Crazy idea, but could it be something about the rumble feature?

It was in the middle of my overhaul so it could be any number of things. But I recall people saying it only crashed after hitting the bumper, or something like that...
 
D

Deleted User

Guest
Crazy idea, but could it be something about the rumble feature?

It was in the middle of my overhaul so it could be any number of things. But I recall people saying it only crashed after hitting the bumper, or something like that...

I did notice that the hasRumble function was using MBC instead of the actual mapper value, but fixing that didn't fix the issue. Also, from my further tests, it seems to happen for the most part at random.

EDIT: Oh, and it still happens with rumble turned off in the game's options.
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
I did notice that the hasRumble function was using MBC instead of the actual mapper value, but fixing that didn't fix the issue. Also, from my further tests, it seems to happen for the most part at random.

EDIT: Oh, and it still happens with rumble turned off in the game's options.

If it really is random then I'd suspect something is wrong with the interrupts. I'm grasping at straws though...
 
D

Deleted User

Guest
If it really is random then I'd suspect something is wrong with the interrupts. I'm grasping at straws though...

I'll take a look. In case I forgot to mention, what happens is the game locks up momentarily, sprites like the flippers disappearing, and it resets to the beginning of execution with a lot of graphical glitches. This only occurs during a pinball game.
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
I'll take a look. In case I forgot to mention, what happens is the game locks up momentarily, sprites like the flippers disappearing, and it resets to the beginning of execution with a lot of graphical glitches. This only occurs during a pinball game.

Yeah, what's happening is code execution somehow goes back to the very beginning. It forgets that it's running on a GBC, and thinks it's now running on a GB, which is the cause of the graphical glitches.
 
D

Deleted User

Guest
Yeah, what's happening is code execution somehow goes back to the very beginning. It forgets that it's running on a GBC, and thinks it's now running on a GB, which is the cause of the graphical glitches.

I put some debug into handleInterrupts to print IRQ information:
Code:
printf("Triggered IRQ %d, %hu\n", irqNo, isrVectors[irqNo]);
And when it happens, it prints this out:
Code:
Triggered IRQ -1, 65535
Seems like it might be interrupts after all?
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
I put some debug into handleInterrupts to print IRQ information:
Code:
printf("Triggered IRQ %d, %hu\n", irqNo, isrVectors[irqNo]);
And when it happens, it prints this out:
Code:
Triggered IRQ -1, 65535
Seems like it might be interrupts after all?

Oh boy. Now, if I understand correctly, this line
Code:
    int irqNo = __builtin_ffs(interruptTriggered) - 1;
is returning -1? And this can only happen if interruptTriggered is 0?
The culprit must be this:
Code:
        if(interruptTriggered) {
            /* Hack to fix Robocop 2 and LEGO Racers, possibly others. 
             * Interrupts can occur in the middle of an opcode. The result of 
             * this is that said opcode can read the resulting state - most 
             * importantly, it can read LY=144 before the vblank interrupt takes 
             * over. This is a decent approximation of that effect.
             * This has been known to break Megaman V boss intros, that's fixed 
             * by the "opTriggeredInterrupt" stuff.
             */
            if(!halt && !opTriggeredInterrupt)
                extraCycles += runOpcode(4);
            extraCycles += handleInterrupts(interruptTriggered);
            interruptTriggered = ioRam[0x0F] & ioRam[0xFF];
        }
interruptTriggered must be unset when it does that extra runOpcode call. This is indeed a weird hack... perhaps simply adding another interruptTriggered check before calling handleInterrupts will fix it?
 
  • Like
Reactions: zfreeman
D

Deleted User

Guest
Oh boy. Now, if I understand correctly, this line
Code:
    int irqNo = __builtin_ffs(interruptTriggered) - 1;
is returning -1? And this can only happen if interruptTriggered is 0?
The culprit must be this:
Code:
        if(interruptTriggered) {
            /* Hack to fix Robocop 2 and LEGO Racers, possibly others.
            * Interrupts can occur in the middle of an opcode. The result of
            * this is that said opcode can read the resulting state - most
            * importantly, it can read LY=144 before the vblank interrupt takes
            * over. This is a decent approximation of that effect.
            * This has been known to break Megaman V boss intros, that's fixed
            * by the "opTriggeredInterrupt" stuff.
            */
            if(!halt && !opTriggeredInterrupt)
                extraCycles += runOpcode(4);
            extraCycles += handleInterrupts(interruptTriggered);
            interruptTriggered = ioRam[0x0F] & ioRam[0xFF];
        }
interruptTriggered must be unset when it does that extra runOpcode call. This is indeed a weird hack... perhaps simply adding another interruptTriggered check before calling handleInterrupts will fix it?
That does indeed seem to fix it! At least, the save state I use to trigger it doesn't do so anymore. Thanks!

Oh, and to that guy who wanted a clock, I added and touched up the clock printing code from the DS version. Check the "Console Output" option.

Fixed Download: https://www.dropbox.com/s/ms1kes4jhrb3meg/gameyob.zip?dl=0

EDIT: Thinking about it... the problem probably started with that commit because of how interruptTriggered was changed to a global variable. Before, it wasn't able to be changed by runOpcode, I guess.
 

Smoker1

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
5,047
Trophies
1
Location
California
XP
6,074
Country
United States
What should the BIOS be named and where should they be placed?

Edit: I dont know where I put them, but hey, I got it to work. Also gbc_bios.bin works for the File Name.
Now just need to figure out how to get the Borders working.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Anybody here have a Xbox series S and a series X, is the performance difference noticeable? I...