Homebrew GameYob 3DS - GB/C emu

xantoz

Well-Known Member
Newcomer
Joined
Nov 28, 2014
Messages
73
Trophies
0
Age
33
XP
100
Country
So I found about two hacks that get rid of the tearing problems. Both of them however kill performance in some games; most notably Shantae, which runs between 45 and 56 fps, but also BADAPPLE.gbc but not when it's loaded as the first rom after bootup... strange.

The simpler of the two is to simply add a call to gfxFlushBuffers() before the call to gspWaitForVblank() in system_waitForVBlank()

like so:
Code:
void system_waitForVBlank() {
  gfxFlushBuffers();
  gspWaitForVBlank();
}

I also removed the gfxFlushBuffers() call from system_checkPolls() since it now seemed superfluous, but from what I can tell the presence/absence of this call doesn't seem to affect much.

I don't know whether this way of fixing this is a good idea (thus I call it a hack), I know little about the internals of GameYob, but the tearing looked very much like some flushing/waitForVBlank issue so on the attack I went.

EDIT:

The other hack, for posterity, was even more of a hack. It amounted to removing the call to gspWaitForVblank() from system_waitForVBlank(), essentially rendereing this an empty do-nothing function, and inserting it after the gfxSwapBuffers() call in gfxMySwapBuffers() instead. In this case I left the gfxFlushBuffers() call in system_checkPolls() alone.

EDIT2:
Noticing slowdowns in Kirbys Dreamland 2 too. More so for the first described method than the latter.
 

thenotoriousrod

Active Member
Newcomer
Joined
Nov 6, 2014
Messages
31
Trophies
0
Age
34
XP
90
Country
United States
This emulator is amazing! I just wanted to let you know that off the bat. Makes me very excited to see what comes next. Also, is there any chance of implementing 3d and perhaps scaling options?
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
This emulator is amazing! I just wanted to let you know that off the bat. Makes me very excited to see what comes next. Also, is there any chance of implementing 3d and perhaps scaling options?

Scaling to 2x (even unfiltered, actually preferably unfiltered) would be great, because as of now it's kinda, er, tiny. I might actually just take a shot at it myself once I get Cubic Ninja, but that might be a while.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Google says the vertical resolution of the gameboy is 144px, so doubled to 288, you'd lose some off the top and/or bottom of the 240px screen.

Ah, you're right. Well that kinda sucks, so the only option would be scaling to some weird resolution and filtering. Although in some games where the top 48 pixels doesn't occupy much (ie Kirby's Dreamland 2) it wouldn't hurt to double the size and shave it off.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,977
Trophies
2
XP
30,711
Country
United Kingdom
Yeah there's lots of room for configurable options - lose the top, lose the bottom, lose a bit of each, or scale & filter. I'm sure Drenn has it all planned out anyway.
 
  • Like
Reactions: Idaho

Melon__Bread

~It's A Magik~
Member
Joined
Dec 9, 2013
Messages
833
Trophies
0
Age
31
XP
938
Country
United States
Maybe I missed something, but are you able to use custom border like you can on the DS version.
If so, how do you go about doing that?


EDIT: After reading the backlog of this thread I have come to find out that is just a empty feature for the 3DS version.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Back working and compiling on the latest version of ctrulib and gcc. The only difference is that you need to add #include <stdlib.h> to config.cpp and 3dio.cpp for it to work, but other than that it's good.

EDIT: Actually it seems there's some issues in places. It occasionally freezes up (in the emulation, the menu is still fine) and white screens. But usually you can reset and it's all good. This could have just been there already though, so idk.
 

Idaho

Well-Known Member
Member
Joined
Oct 3, 2013
Messages
886
Trophies
1
Age
29
XP
1,434
Country
France
Nice homebrew here just tested it on my 3DS, pokémon runs quite fine, can't wait for more features to come :3
 

thenotoriousrod

Active Member
Newcomer
Joined
Nov 6, 2014
Messages
31
Trophies
0
Age
34
XP
90
Country
United States
Scaling to 2x (even unfiltered, actually preferably unfiltered) would be great, because as of now it's kinda, er, tiny. I might actually just take a shot at it myself once I get Cubic Ninja, but that might be a while.

I hate the fact not everyone can enjoy the joy of homebrew due to people out there who want to take advantage of the rarity of CN. But I guess that's how it is...anyway kudos to you for trying to further the project along. If I could I'd give everyone a free copy of CN especially those who actually wanted to contribute to the Homebrew scene. I wish I was knowledgable in programming or I'd develop homebrew myself!
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
I hate the fact not everyone can enjoy the joy of homebrew due to people out there who want to take advantage of the rarity of CN. But I guess that's how it is...anyway kudos to you for trying to further the project along. If I could I'd give everyone a free copy of CN especially those who actually wanted to contribute to the Homebrew scene. I wish I was knowledgable in programming or I'd develop homebrew myself!

I actually just got a sealed copy off Ebay for $30, which wasn't all that bad! While I might not be able to implement the scaling thing due to the reason stated above, I did actually manage to add support for 3DS/N3DS buttons in the config menu. Although at the moment it's awaiting Drenn's seal of approval to get pulled into the main GameYob repo. But it definitely works, and it works rather well. I actually only did it because it bothered me that I couldn't use the circle pad to move in Pokemon, so I just opened the code up and fixed it myself.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
Okay, all the builds should be working now, sorry that took so long. My motivation to work on this comes and goes. :/

One of these days I need to make my own versioning system to give every uncompleted project I've done a number. I'd probably be in the hundreds by now. My problem personally is I'm in the middle of one project, and then out of nowhere some shiny other idea comes along and I want to work on that instead. It kinda sucks. But I do know what you mean by lack of motivation though.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    HiradeGirl @ HiradeGirl: What.