Homebrew Emulation GameYob, a gameboy emulator for DS

Deleted member 319809

MAH BOI/GURL
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Edit: Misread a post. Whoops.

In any case, I'll watch this thread very closely. Your project is very interesting, even despite the fact that Lameboy may currently be better: it's open-source, so anyone can pitch in.

I'll see if I can help you with your optimisations, but right now I don't have a build environment set up.

Edit 2: First I'd need to know if you're going with GamBatte. If you are, then I'll look at it when you have switched over to it.
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
Edit: Misread a post. Whoops.

In any case, I'll watch this thread very closely. Your project is very interesting, even despite the fact that Lameboy may currently be better: it's open-source, so anyone can pitch in.

I'll see if I can help you with your optimisations, but right now I don't have a build environment set up.

Edit 2: First I'd need to know if you're going with GamBatte. If you are, then I'll look at it when you have switched over to it.
I have no intention of replacing the core with Gambatte's, if that's what you mean, but I might look at it to check the more problematic opcodes. However, if it helps for speed, I might still go with my half-finished assembly core. Which I could definitely use help with once I get it going again.

I have good news on the sound front, I seem to have fixed channel 3, which was the most problematic. Except that now, Pikachu has the power to hang the arm7 cpu with his voice alone... but I think I can fix that. I'll push the update once I have.
 

MarkDarkness

Nocturnal
Member
Joined
Dec 17, 2009
Messages
1,403
Trophies
2
XP
3,213
Country
Poland
Really glad to see this happening... thank you for the slew of updates and please keep them coming.

As a note, please do keep the menus Lameboy-style... I for one feel more at home with a no-frills approach.
 

Deleted member 319809

MAH BOI/GURL
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Do you aim for portability in this emulator, or for the highest level of DS (ARM7&9) optimisation at all costs? I'd say it's a shame to drop support for a PC version, but I suppose the needs of the many (on PC) are already served by the likes of VisualBoyAdvance, no$gmb, REW, etc.

Also, shall I suppose the core you want to improve is the one written in ARM assembly, not the portable one? Did you try 'gcc -O3 -fpeel-loops -mno-abicalls -fno-pic -finline (or -fno-inline) -fearly-inlining (or -fno-early-inlining)' with the portable core and fail to get satisfactory performance?
 

Janthran

Solarian
Member
Joined
Sep 17, 2011
Messages
3,777
Trophies
0
Location
The Pacific Northwet
XP
1,146
Country
United States
Do you aim for portability in this emulator, or for the highest level of DS (ARM7&9) optimisation at all costs? I'd say it's a shame to drop support for a PC version, but I suppose the needs of the many (on PC) are already served by the likes of VisualBoyAdvance, no$gmb, REW, etc.
Uh.. Why would you want a GB/C emulator written for DS on the PC? Can you even use emulators in emulators?
 

BassAceGold

Testicles
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Uh.. Why would you want a GB/C emulator written for DS on the PC? Can you even use emulators in emulators?
It wouldn't be running on an emulator on the PC, it would be compiled for the PC assuming the code is portable enough to compile for both platforms.
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
Do you aim for portability in this emulator, or for the highest level of DS (ARM7&9) optimisation at all costs? I'd say it's a shame to drop support for a PC version, but I suppose the needs of the many (on PC) are already served by the likes of VisualBoyAdvance, no$gmb, REW, etc.

Also, shall I suppose the core you want to improve is the one written in ARM assembly, not the portable one? Did you try 'gcc -O3 -fpeel-loops -mno-abicalls -fno-pic -finline (or -fno-inline) -fearly-inlining (or -fno-early-inlining)' with the portable core and fail to get satisfactory performance?
It was a shame to drop the PC version, but what I really want is a gameboy emulator optimized for the ds. Of course the pc version was useful for testing, but it got messy trying to keep them both compiling properly. So I didn't put the PC sources in the repository, I separated them completely.
I previously had the default flags, which included none of those (it did have -O2). I tried with them on (except -mno-abicalls which it didn't recognize) and fps remained constant in Shantae, and in fact Pokemon Yellow seemed to slow down...
The assembly core probably has more potential to run faster, so that's the one I'd rather optimize (but I haven't added it to github yet). I'll need to finish it and see how it compares. Maybe you should wait until then before doing much optimization.
 
  • Like
Reactions: Coto

RupeeClock

Colors 3D Snivy!
Member
Joined
May 15, 2008
Messages
6,497
Trophies
1
Age
34
Website
Visit site
XP
2,964
Country
You're doing very impressive work with this emulator, it already does play the Mega Man V boss intros correctly, and you've already sorted out the sound issues? Very cool.

I hope maybe at some point you can implement some more button mapping options, such as being able to use Y/B for B/A instead of B/A for B/A. It's a little more comfortable ya see.
I would imagine that's fairly low priority right now though, and that the emphasis is on getting the core working right.
 

Foxhounder

Banned!
Banned
Joined
Jan 20, 2013
Messages
102
Trophies
0
Age
31
XP
19
Country
United States
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.
Wifi linking? If you did that you would be my new God.
 

Foxhounder

Banned!
Banned
Joined
Jan 20, 2013
Messages
102
Trophies
0
Age
31
XP
19
Country
United States
Personally I was hoping someone would make a new GB/GBC emulator since Lameboy keeps dropping my Pokemon Red save for some reason.
Press Y to save after saving(or X). That said...

It would be awesome if the creator dropped that whole button svram crap and let it save itself without pushing any other buttons. I sometimes forget and lose a lot of data...
 

loco365

Well-Known Member
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
Press Y to save after saving(or X). That said...

It would be awesome if the creator dropped that whole button svram crap and let it save itself without pushing any other buttons. I sometimes forget and lose a lot of data...
I find myself spamming my X button from time to time.
 

jurassicplayer

Completionist Themer
Member
Joined
Mar 7, 2009
Messages
4,485
Trophies
1
Location
Pantsuland
Website
www.youtube.com
XP
2,911
Country
United States
It would be awesome if the creator dropped that whole button svram crap and let it save itself without pushing any other buttons. I sometimes forget and lose a lot of data...
But what if it happened that because you decided for autosaving the sram, you don't care about when you turn off your console and then midway of it saving the sram, you shut off your console and then lose everything on your microSD thanks to corrupting everything all for the convenience of possibly keeping your data slightly more up to date than it might have been, though it's likely that it wouldn't be anyways thanks to people just instantly shutting things off right after they see their game say that it has saved, and since auto saving sram would have to occur at some interval, there is a chance that you will still end up derping and it saves the sram before you actually decide to save and turn off the game, meaning you would have the save before the latest to work with some of the times and you would be better off saving a second time just to make sure that you aren't missing the window opportunity for saving. Or quite possibly the autosaving happens so frequently that these might be non-issues (assuming shit doesn't go bad during turning off a console while it is writing to your microSD), but then for every moment you play the game, it is constantly having to save the updated sram to your microSD shaving away write cycles and while there are many a plenty of write cycles now, you never know if someone will end up getting pissed that their microSD's seem to just somehow happen to be failing at a slightly faster rate than someone who is just using the microSD for other less taxing operations. Not to mention that somehow this would have to be put in the background that could be possibly used towards improvements towards speed or audio or video or other things ._.

But yeah, it would be nice to have autosaving.
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
You're doing very impressive work with this emulator, it already does play the Mega Man V boss intros correctly, and you've already sorted out the sound issues? Very cool.

I hope maybe at some point you can implement some more button mapping options, such as being able to use Y/B for B/A instead of B/A for B/A. It's a little more comfortable ya see.
I would imagine that's fairly low priority right now though, and that the emphasis is on getting the core working right.
Yeah I intend to make controls mostly remappable. In the meantime an option to use Y/B should be quick to make, however it won't save your preferences yet.
Press Y to save after saving(or X). That said...

It would be awesome if the creator dropped that whole button svram crap and let it save itself without pushing any other buttons. I sometimes forget and lose a lot of data...
I believe snemulDS saves automatically, though I'm not sure how it does this. Sram is used for more than just saving, for instance Wario Land 3 stores the level layout in there. So saving whenever something writes to sram would cause annoying pauses whenever a game writes to it for any purpose. I know pressing X is annoying, but I can't think of a better way.
 

windwakr

Well-Known Member
Member
Joined
Sep 13, 2009
Messages
502
Trophies
1
Website
windwakr.github.io
XP
1,792
Country
United States
The sound in the GBC bootstrap("BIOS") only seems always to play correctly the first time. A lot of the time when resetting or loading a new ROM, there will be no sound during the GB logo or it will play a short, low pitched tone immediately and nothing else.

Warlocked is missing PCM audio as soon as the game boots(should say "Warlocked", but is silent). Also, PCM audio only works in-game(when selecting/ordering around troops) when the music is turned on in the options. But it should work whether or not music is enabled. Tested with Vblank on/off and "BIOS" on/off.


While quickly switching back and forth between ROMs, I managed to get a Guru Meditation Error:
Code:
data abort!
 
pc: 020019D8 addr: 00001F41
 
r0: F1C00000  r8 : 0000DFF7
r1: 0205FFA8  r9 : 02259665
r2: 0227FC98  r10: 00004FEE
r3: 00000109  r11: 02259458
r4: 00000010  r12: 00000000
r5: 02259458  sp : 0B003C70
r6: FEC00000  lr : 02003D54
r7: 0224C028  pc : 020019E0
 
*some memory data I'm not going to bother to type out*
 

Drenn

Well-Known Member
OP
Member
Joined
Feb 22, 2013
Messages
574
Trophies
0
XP
696
Country
Canada
The sound in the GBC bootstrap("BIOS") only seems always to play correctly the first time. A lot of the time when resetting or loading a new ROM, there will be no sound during the GB logo or it will play a short, low pitched tone immediately and nothing else.

Warlocked is missing PCM audio as soon as the game boots(should say "Warlocked", but is silent). Also, PCM audio only works in-game(when selecting/ordering around troops) when the music is turned on in the options. But it should work whether or not music is enabled. Tested with Vblank on/off and "BIOS" on/off.


While quickly switching back and forth between ROMs, I managed to get a Guru Meditation Error:
Code:
data abort!
 
pc: 020019D8 addr: 00001F41
 
r0: F1C00000  r8 : 0000DFF7
r1: 0205FFA8  r9 : 02259665
r2: 0227FC98  r10: 00004FEE
r3: 00000109  r11: 02259458
r4: 00000010  r12: 00000000
r5: 02259458  sp : 0B003C70
r6: FEC00000  lr : 02003D54
r7: 0224C028  pc : 020019E0
 
*some memory data I'm not going to bother to type out*
As it turns out, the pc version didn't emulate the voices properly either. And the voices come from the noise channel... weird. You say the pcm audio works when music is on? It never works for me. What's the version you're using?
As for the crash, I tried opening every rom I had and nothing happened. Are you sure it wasn't the rom itself that caused the crash? I know of at least 2 that give guru meditation errors upon starting, Avenging Spirit and that Vietnamese bootleg of Pokemon Crystal.

Also minor update, B/Y buttons can be used for A/B now.
 

kineticUk

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
545
Trophies
1
Location
Inside
XP
1,008
Country
United Kingdom
I just wanted to add one thing...
That if you have the choice defo build off of "gambatte" as kinda benchmark to aim for future ("gambatte" equivalent on ds would be a dream). Stable, accurate ds s/gb/c would be so good, keep up the good work.
 

Mikesahhh

Mikes
Newcomer
Joined
Nov 4, 2012
Messages
77
Trophies
0
Age
36
XP
1,073
Country
This is awesome just tried out your GameYob and runs all the games i like to play at 60fps :) couple of nooby questions though
1. Is there state saving?
2. Is there a way to scale the Game Screen to 1.5x or Fullscreen like on lameboy? I got a 3ds XL and like the big screens =P
or if not for either then are these are these something you could implement?
 

Deleted member 319809

MAH BOI/GURL
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Replying inline in bold.
But what if it happened that because you decided for autosaving the sram, you don't care about when you turn off your console and then midway of it saving the sram, you shut off your console and then lose everything on your microSD thanks to corrupting everything,
Neb: What you would lose is up to one erase block, which is often 128 KB on flash chips.

all for the convenience of possibly keeping your data slightly more up to date than it might have been, though it's likely that it wouldn't be anyways thanks to people just instantly shutting things off right after they see their game say that it has saved,
Neb: It might as well be instant. At least on CATSFC, SNES emulator based on Snes9x, auto-saving SRAM happens before the next frame draws, and without slowing down the emulation that needs to be done to draw that frame. It would take 8 milliseconds or less. (My card is a Class 6 Sandisk.)

and since auto saving sram would have to occur at some interval, there is a chance that you will still end up derping and it saves the sram before you actually decide to save and turn off the game, meaning you would have the save before the latest to work with some of the times and you would be better off saving a second time just to make sure that you aren't missing the window opportunity for saving.
Neb: Not sure what you mean by that. Do you mean a saved state?

Or quite possibly the autosaving happens so frequently that these might be non-issues (assuming shit doesn't go bad during turning off a console while it is writing to your microSD), but then for every moment you play the game, it is constantly having to save the updated sram to your microSD shaving away write cycles and while there are many a plenty of write cycles now, you never know if someone will end up getting pissed that their microSD's seem to just somehow happen to be failing at a slightly faster rate than someone who is just using the microSD for other less taxing operations. Not to mention that somehow this would have to be put in the background that could be possibly used towards improvements towards speed or audio or video or other things ._.
Neb: Wear levelling on flash chip controllers is pretty awesome. It can reassign erase blocks to change where the files are currently located, even if you overwrite the same file a lot. With wear levelling, a 4 GB microSD's 32768 erase blocks can be used to store your saves, one at a time. It helps that your saves are less than 1 erase block at all times.
It would indeed be nice to have autosaving. :)

I believe snemulDS saves automatically, though I'm not sure how it does this.
At the end of a frame, if the SRAM has been modified, an autosave is triggered. In your case, if the SRAM is slow and isn't written fully in one frame, maybe have it so that: At the end of a frame, if the SRAM has been modified, defer autosaving until the first subsequent frame during which the SRAM is not modified.

Sram is used for more than just saving, for instance Wario Land 3 stores the level layout in there. So saving whenever something writes to sram would cause annoying pauses whenever a game writes to it for any purpose. I know pressing X is annoying, but I can't think of a better way.
To alleviate all those "microSD saving timing issues" which would cause corruption, maybe have a little microSD access icon on the Touch Screen whenever a microSD write is ongoing? It would also help by telling the user that a certain pause is caused by microSD access.

Also an autosave option, which would be on by default, but the user could see how often the microSD icon is brought up and disable autosaving for a game if s/he feels it's brought up too often.
 
  • Like
Reactions: Foxhounder

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Finally there are people here