Hacking TempGBA: NDSGBA revival

Do GBA games make your nono parts happy?


  • Total voters
    429

gordillo

Well-Known Member
Member
Joined
Mar 10, 2007
Messages
285
Trophies
1
Age
33
Location
at school *BORED*
Website
Visit site
XP
273
Country
Canada
That set of games has indeed not been discussed in the thread yet.

Given your question, I can only assume that the Botai Boktai games refuse to load or crash immediately in NDSGBA. There's a Guru Meditation screen to assist me with supporting games that crash. Please test them in TempGBA beta 10. :)

ok i tried the patched verisions of each(http://gbatemp.net/threads/boktai-solar-sensor-patch-kit.245127/) and its the same output like this http://wiki.gbatemp.net/wiki/DSTWO_GBA_Emulator_Compatibility

wold you like me to anything else?
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Alright, so the code is a mess. If I want to support anything more, or optimise the core, I have to fully understand 10741 lines of low-level code (cpu_asm.c, mips_emit_new_count.h and mips_stub.S) with recursion and 10 levels of C macros with very few comments. I've tried to modify about a dozen things, and so far, all of my attempts (yes, all, without exception) resulted in an immediate Guru Meditation. Some of them were NULL accesses, some of them were invalid instruction exceptions (?!?!), yet more were unaligned instruction load exceptions (?!?!?!?).

If I want to have any luck, it appears that I have to rewrite the CPU emulation core (with comments to explain what the hell I'm doing, while writing it). I don't have months of free time to devote to this without some very generous donations to motivate me. Therefore, expect one last release soon, which may very well improve the two Golden Suns so that they barely run at 60 FPS, but not Mario Tennis or Doom II, I imagine.

As the code is open-source, you may of course all try to fix things up; however, you would have to be pretty knowledgeable, bored and masochistic to do that. You could also try porting another emulator core into gpSP, which may or may not be easier.
 

syrusch

Well-Known Member
Member
Joined
Oct 26, 2010
Messages
127
Trophies
1
Location
Lausanne
Website
www.stut.ch
XP
396
Country
Swaziland
One feature that i loved so much in BAGplug is the ability to have a picture of the game box and the title screen before playing a game. If you can add this feature on the emulator, it will be great.

Also another feature will be the full screen mode.
 

dudereno

Well-Known Member
Member
Joined
Dec 7, 2005
Messages
198
Trophies
0
XP
295
Country
United States
Just tried TempGBA (beta 10) for the first time. One of my fav games, Mario Pinball Land plays much more smoothly and with no sound distortion compared to NDSGBA. I don't know about saves / save state and general stability, as I only played for about 10 minutes. Excellent job, thanks for all your hard work.
 
  • Like
Reactions: Rydian

syrusch

Well-Known Member
Member
Joined
Oct 26, 2010
Messages
127
Trophies
1
Location
Lausanne
Website
www.stut.ch
XP
396
Country
Swaziland
@Nebuleon

I know that my english is bad but can you answer my post please.

Can you add the Box feature in TempGBA. BassAceGold BAGPlug has this feature, then i think it's easy to add it in GBATemp.

Anyway thanks for you work, when i have my paypal account refunded i can make a donation.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
at page 4 of this topic there is a to do list in the seccond post form that page.​
it says add a fullscreen aspect ratio on point 28.​
''28. Add a full screen (expanded) aspect ratio.''​
That presupposed someone (including me) could improve the core, and I couldn't. Scaling wrecks performance, and every single game would sound like your DS was underwater and next to a fan, if you full-screened it with the GBA emulation core was as it is now.

(Unlike the SNES emulator, which can extend notes as needed to synchronise with lag, the GBA emulator uses sound samples brought in using memory access, so I can't just invent samples to fill in during lag.)
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Alright. After a more serious look at it, I was able to adjust the recompiler so that games that constantly write new code to Internal Working RAM (IWRAM) and External Working RAM (EWRAM) re-compiled that code up until the next unconditional jump, at which point it goes to compile that new code, and so on. The current approach taken by gpSP tries to eagerly compile ALL the things and patch the native code so that it jumps between itself... even code that the game might not run. That approach is wasteful, because the next time new code is written, all of it is recompiled, because the native code patches have become incorrect.

Currently, I don't make use of this single-block compilation by flushing only the code that needs to be flushed when some of it is modified, but that will come soon. It just flushes everything, but that "everything" is less than before because it has lazily compiled what it actually needed.

That's the technical part of it.

Now, this adjustment has so far done the following:
* Sped up Mario Tennis Power Tour, from ~35 FPS in the tennis courts, to ~48 FPS. (The DSTwo's clock is at 396 MHz)
* Very slightly reduced audio crackling in battles in Golden Sun 2. FPS was reported as ~50 when crackling was frequent; now it's ~54. (The DSTwo's clock is at 396 MHz)
* Slowed down most other games by 50%, but emulation still goes to 60 FPS in normal mode. Fast-forwarding was ~195 FPS in Pokémon Emerald, now it is ~116 FPS. A similar trend is seen in all Mario Advance games. This needs to be adjusted.
 

ferret7463

Well-Known Member
Member
Joined
Sep 21, 2010
Messages
613
Trophies
1
Age
50
XP
618
Country
United States
" Slowed down most other games by 50%, but emulation still goes to 60 FPS in normal mode." I'm a little confused here (that is not much of an accomplishment.) does that mean we will "see" a slow down or lag in games that is not pokemon? :huh:
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
" Slowed down most other games by 50%, but emulation still goes to 60 FPS in normal mode." I'm a little confused here (that is not much of an accomplishment.) does that mean we will "see" a slow down or lag in games that is not pokemon? :huh:
That means I'm making progress for some games but a major regression for others. I need to look at the regressions while making sure the progress in other games isn't destroyed. (For the record, even Pokémon is slowed down. The "Pokémon all the way! Screw all the others!" thing was just for April Fool's:lol:)

My optimisations will need a lot of memory, so I may have to disable rewinding or reduce the number of steps for which it's effective. .
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
@Nebuleon

I know that my english is bad but can you answer my post please.

Can you add the Box feature in TempGBA. BassAceGold BAGPlug has this feature, then i think it's easy to add it in GBATemp
BAGPlug is intended to be a file manager. It doesn't have to tie up memory to keep track of emulation. I have 192 KB of memory at my disposal in TempGBA, and this figure drops steadily with each change I make*, so I can't really support box art - neither could I add the support libraries for popular image formats for box art, like JPEG and PNG.

_ _ _ _ _ _ _ _ _
* Funnily enough, after one of my changes, I experienced corruption of the images used for the GUI. It turns out an internal data structure was being allocated right on top of the GUI image memory, because memory had run out entirely! So I could see lines of alternating red and green pixels over the white background, black and white over the "Tools" menu icon, etc.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Beta 11, the Audio Edition, is now released.

The speed regression I noted with a lot of games has been fixed.

This release helps the Golden Sun games a lot, as well as Mario Tennis: Power Tour. Other games it helps are yet unknown, and some games may work worse than before, though I took great care to ensure that this doesn't happen. Please test your games and file bug reports! (Make sure you say at least which game you try, the frameskip setting you try, and the clock speed!) https://github.com/Nebuleon/TempGBA/issues

* Audio now doesn't crackle when using manual frame skipping. HOWEVER, with frame skipping 0, some games just crash if they're unable to render all frames!
* Audio is dampened when fast-forwarding, so that high amplitude changes don't cause loud pops.
* Dutch translation added/updated. Thanks Aeter!

Technical:
* Prepare the ARM-to-MIPS (GBA to DSTwo) code compiler for massive optimisations. Currently, branches into ROM or BIOS (read-only) code are hard-linked for efficiency, but branches into IWRAM and EWRAM (writable) code are resolved indirectly. As many instructions as possible are compiled at once in ROM, but only a few at a time are compiled at once in RAM. This will allow me to speed up a lot of games in a later beta.
* Translation gates in game_config.txt are no longer needed. They are still honoured if found, but due to the above change, their value has diminished. Whereas in beta 9 you would find a 40%+ improvement when using a well-placed translation gate, in beta 11 it has 5%- improvement.
 

LolGuyX

Well-Known Member
Newcomer
Joined
Oct 6, 2012
Messages
63
Trophies
0
XP
154
Country
Netherlands
''HOWEVER, with frame skipping 0, some games just crash if they're unable to render all frames!''
Does this mean that a game can randomly crash when paying at frameskip 0? like playing for 1 hour straight and then suddenly a crash kicks in?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    BakerMan @ BakerMan: damn