Hacking TempGBA: NDSGBA revival

Do GBA games make your nono parts happy?


  • Total voters
    429

Hanafuda

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
4,493
Trophies
2
XP
6,958
Country
United States
Mario Tennis: Power Tour, CRC32 DA192D29?


And finally, what really makes the emulator much better for me is how fast it loads itself and games, how I can touch the screen to quickly get to a submenu in the Main Menu's grid, and how it can fast-forward with a key. A minor mention for my remapping of all the keys in SMA2: Mario World so I can do everything SNES-style: dash with Y (GBA B), jump with B (GBA A), spin-jump with A (GBA R ?!?!). That counts as enjoyment for me - what about you?
_ _ _ _ _ _ _ _ _


Hadn't gotten to any SMA games besides Yoshi's Island yet, but heck yea that will make Super Mario World much more enjoyable.

As for game compatibility not changing much, yes I'm seeing that with (for example) the GT Advance series. Display is screwed just as before. But those games weren't anything special anyway. Gameplay in Mario Kart and V-Rally 3, arguably the only driving games on GBA worth a damn, are both excellent with Beta 8. I haven't tried AstroBoy, Gunstar Heroes, or any Rockman/Megaman yet. Too busy watching Game of Thrones right now, then bed. Mañana.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Uh, I guess if people pick out like, three games? I haven't used either emulator enough to notice any sound differences, but if people pick a small number of games out (with segments you can get to easily), I don't mind doing a few comparisons.

I'd pick these games:
* Golden Sun (not 2, but 1), battle music at idle and perhaps the music of one of the starting towns. I pick this one because it's supposed to be a soundtrack game, and perhaps you can tell a difference with the noise channel that makes the sound for the flowing water in the starting towns.
* Pokémon Ruby/Sapphire/Emerald, battle music at idle and perhaps the music of Littleroot Town, the starting town. I pick this game for technical reasons: it uses the Game Boy classic channels more than other games and synchronises it with the PCM channels. An improvement, if any, would be surely noticed.
* Any game that has speech in it. I don't know of any.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
So I just reduced the storage space of some recompiler variables by 57 bytes, and it reduced the plugin size by 23552 bytes.

Some things are just far-fetched, man.

I'm also happy to announce that my low-level optimisations seem to be barely enough to make the battles in Golden Sun not pop the audio too much during battles, even when "Jenna casts Flare!". Perhaps it's worse in the later boss battles, though.
 

ferret7463

Well-Known Member
Member
Joined
Sep 21, 2010
Messages
613
Trophies
1
Age
50
XP
618
Country
United States
to me, the main thing that makes TEMPGBA more playable is the button remapping. MegaMan Games seem to run a little more smoother to me. I have a case of OCD and do tend to pick up tiny differences in things. :wacko:
 

Rydian

Resident Furvert™
Member
Joined
Feb 4, 2010
Messages
27,880
Trophies
0
Age
36
Location
Cave Entrance, Watching Cyan Write Letters
Website
rydian.net
XP
9,111
Country
United States
Recording folder (all the above files): http://www.mediafire.com/?rszuuwp1sza83
Everything is stereo as recorded this time, just in case one of the games wants to do stereo instead of mono by default.

All these were with the CPU at max, "4" for NDSGBA 1.21, "5" for TempGBA B8.

For NDSGBA 1.21, I recorded everything with the DSi at two clicks below max volume.

For TempGBA B8, I noticed that Pokemon Emerald was clipping just a little bit, but I didn't feel the need to lower the volume another notch. However, Golden Sun and Mortal Kombat were clipping so hard I had to lower it one more click in order to avoid additional distortions, so that's why the waveforms are relatively less intense for those two.

No waveform pics this time since there's no obvious differences between the two that I could tell while playing (other than TempGBA putting out way more powerful sound), and you're going to pull them up to examine in more detail anyways.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
TempGBA beta 9 is released. It has the following improvements:
* This version introduces saved-state version 1.0f. It is also backwards compatible with version 1.0e (betas 3-8) with sound desynchronisation when loaded. Save your SRAM (.sav) and reload from it if you want to resynchronise the sound after loading from a version 1.0e saved state.
* Resynchronise Pokémon Emerald's multi-channel music for real now.
* Add Guru Meditation screens for MIPS (DSTwo-side) and ARM7 (GBA-side) crashes. You may now report crashes that display these screens by taking photos of them, or reporting the top 2 lines and the registers accessed by the instruction ($NUMBER). See an example of this below.
* Add the year when displaying a saved state's timestamp.
* Minor technical improvements under the hood (way, way under the hood; like, if I was saying this about an improvement to a car, you could compare it to changing the type of a screw in a component inside a compartment of the engine for better airflow).

The MIPS Guru Meditation screen
When the DSTwo code has detected an exception, it will now display one of these glorious screens, known in some technical circles as Guru Meditation, on the Touch Screen:
null_dereference.jpg


For this screen, I simulated a NULL pointer dereference. It's trying to load from memory address ($2), which contains NULL. :)

For these MIPS crashes, the address (PC) of the instruction is displayed at the top, as well as the disassembly of the instruction that caused the exception in most cases.

To report a crash that is detected in this way and now shows a Guru Meditation error screen:
* either take a photo of the screen, like I did (highly recommended); or
* at least paste the exception number and type, the address, the disassembly of the instruction and the value of all the registers used by the instruction. Registers are preceded by $. The instruction above uses registers $3 and $2.
Then, after restarting TempGBA, you need to note down the exact version shown in Options/Version information (with Nebuleon/TempGBA commit deadbeef).
Code:
Exception 02: TLB load exception
at address 800E9DC8
lw $3, 0($2)
= lw $3, 0x0($2)
 
Registers:
2: 00000000
3: 80CF8DDC
 
Commit 683fb4f.

The GBA Guru Meditation screen
Some games crash with a jump to an unmapped memory address, such as the Classic NES games. You can now also report these kinds of crashes because they show a similar Guru Meditation screen on the Upper Screen.

The contents will be similar to this:
Code:
Guru Meditation
 
Jump to unmapped memory address 06B85650
at address 0300475C
 
The game has encountered an unrecoverable error.
Please restart the emulator to load another game.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Recording folder (all the above files): http://www.mediafire.com/?rszuuwp1sza83
Everything is stereo as recorded this time, just in case one of the games wants to do stereo instead of mono by default.

All these were with the CPU at max, "4" for NDSGBA 1.21, "5" for TempGBA B8.

For NDSGBA 1.21, I recorded everything with the DSi at two clicks below max volume.

For TempGBA B8, I noticed that Pokemon Emerald was clipping just a little bit, but I didn't feel the need to lower the volume another notch. However, Golden Sun and Mortal Kombat were clipping so hard I had to lower it one more click in order to avoid additional distortions, a) so that's why the waveforms are relatively less intense for those two.

No waveform pics this time since there's no obvious differences between the two that I could tell while playing (other than TempGBA putting out way more powerful sound), and you're going to pull them up to examine in more detail anyways.
a) I listened to them normalised to -1.5 dB anyway :)

b) I can't hear any difference between the two in Mortal Kombat. Can you?

c) Ouch, the pauses with NDSGBA in Golden Sun! Thankfully TempGBA is optimised just that little bit more so the music barely runs fine during most of a battle.

d) Pokémon Emerald... Seems to have way more stereo separation in your TempGBA file. Did you mistakenly record Emerald in mono with NDSGBA, or forget to set the option for mono in Emerald with TempGBA? Also it seems to have smoother Game Boy-style beeps in TempGBA.

Can someone listen closely to those files and tell me which of them sounds closer to a real GBA? (I have no GBA.) Particularly the Emeralds, which are much more different from each other than the other games.

As always, thanks for your testing!
 

Rydian

Resident Furvert™
Member
Joined
Feb 4, 2010
Messages
27,880
Trophies
0
Age
36
Location
Cave Entrance, Watching Cyan Write Letters
Website
rydian.net
XP
9,111
Country
United States
B - I didn't notice anything either.

C - Both have their skips at the point where the particles appear (and it's visible in the waveforms too), but with a second look TempGBA's not as bad at that point, and better at others too.

D - Whoops, yeah, looks like my TempGBA WAS in stereo! I already had a save in TempGBA for Emerald, so when I started a new game it inherited the settings I set with the old one...
TempGBA Fixed/Mono: http://www.mediafire.com/?h4daqxbod4jcidn

If you're wondering why I'm using mediafire instead of rydian.net, it's because modern browsers love to try to auto-play media files unless I set up apache to give certain headers via htaccess, and just uploading them to mediafire is easier for my lazy butt and stops people who want to hear from having to go through too many annoyances to save the files... but I also forget just how ad-laden mediafire is for people without ad blockers, so if I do another round of testing later I'll just set it up on my host, might as well at this point.

Anyways I kept the volume the same as the original, since from looking at the waveform, actual clipping is extremely minor, maybe two samples at a few peaks.
lookatthecutelittlesamples.png


I played the hell out of Emerald on my GBA SP, so much that the cart was chipped at the lower-left from being taken out and put in so many times, but listening to the analog recording on the PC gives much better sound than any portable's speakers give, which is why I've never made comparisons to how things sound out of handhelds (only other recordings played on the PC).

Also I no longer have my SP and games (mailed to my younger brother a while ago) to do an on-device comparison anyways.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
[...]

I played the hell out of Emerald on my GBA SP, so much that the cart was chipped at the lower-left from being taken out and put in so many times, but listening to the analog recording on the PC gives much better sound than any portable's speakers give, which is why I've never made comparisons to how things sound out of handhelds (only other recordings played on the PC).

Also I no longer have my SP and games (mailed to my younger brother a while ago) to do an on-device comparison anyways.
That's fair enough; I understand why the test would be unfair. I have access to a DS Lite, not a GBA, and I think the DS Lite has a better DAC and/or better speakers than the GBA, so that would also have been unfair. If I had a GBA, I would have put the GBA and the DS each near one ear to compare, like I did with the SNES.
 

Aeter

A walking contradiction
Member
Joined
Apr 1, 2009
Messages
942
Trophies
1
Age
36
Location
The lands of nether
XP
485
Country
Netherlands
I've finished the Dutch translation.
Do need to test it still for possible sentence length issues.
Will probably do that sometime tomorrow, if nothing else comes up.
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
Work on the core has started!

TempGBA beta 10 is available, with the following highly technical improvements:
* Collects performance statistics that are relatively inexpensive to collect, and displays them in a new menu at /Tools/Debugging. A rough measure of the complexity of a game's recompilation is available, as well as the number of frames emulated and the number of sound buffer underruns detected by the code. They're better known as "odd silences" or "crackling", and the code doesn't detect all of them, but it's a start!
* Some games with high amounts of "RAM bytes flushed" (See /Tools/Debugging/ARM-to-MIPS translation statistics to know what this is) have been helped by better MIPS caching behaviour; those would be Golden Sun, Golden Sun 2, Mario Tennis, etc. If a game has high amounts of RAM bytes flushed and it runs slowly, that means it's missing a translation gate entry in its game_config.txt section.

Unfortunately I'm not really able to determine with any accuracy where translation gates should go.
 
  • Like
Reactions: syrusch

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
So I more-or-less unofficially became a gpSP fork maintainer today after talking to Exophase, which is pretty interesting.

According to Exophase, the reasons he stopped coding on gpSP are that:
* no one who made a fork bothered to cooperate with him to get changes merged on platforms he was working on (PSP, GP2X and PC), which infuriated him;
* he became fed up with the code and how it turned out; and
* he didn't like how the guy behind gpSP Kai kept releasing half-baked features and Exophase himself would get flak and support requests from Kai users because the readme was still referencing his email.

As long as I can act as a maintainer of my fork, I can pretty much do anything, because he doesn't care about the code anymore (that also goes the other way: he doesn't care enough about the code to answer questions from users of forks, so as long as I answer requests from my users it's fine with him).

But I also got a source archive from him, which he says is highly experimental, containing lots of code he wanted to use but it didn't pan out for various reasons, so nothing in it should see the light of day immediately and I should pick the individual changes I want to use. I now have TWO change sets to merge. We also discussed the recompiler, and I have a few ideas to improve it.

2 members of the GCW Zero dev team also shed some light on the caching mechanism, and now I know that the DSTwo allows me to manipulate the cache at will because TempGBA runs in kernel-mode on the DSTwo (!). On the GCW Zero, applications run in user-mode, and cache flushes from user-mode have to go through a system call, so it's that much slower.
 

DiabloStorm

Anti-Semantic Bastard
Member
Joined
May 29, 2011
Messages
666
Trophies
1
Location
Charicific Valley
XP
517
Country
Japan
That's fair enough; I understand why the test would be unfair. I have access to a DS Lite, not a GBA, and I think the DS Lite has a better DAC and/or better speakers than the GBA, so that would also have been unfair. If I had a GBA, I would have put the GBA and the DS each near one ear to compare, like I did with the SNES.

The DSi supposedly has a better audio setup than earlier models as well, and it's what I use for testing as I have no older models either.


I have a GBA, GBA SP and Phat DS and pretty much every pokemon game except Emerald... Someone wanna explain a good standard for testing this to me in PM? I'd have to use some other game version though. (does it really matter? :P)
 

Deleted member 319809

MAH BOI/GURL
OP
Member
Joined
Dec 22, 2012
Messages
900
Trophies
0
XP
461
Country
Canada
im sorry if this was asked already, couldnt find it in any search
is there going to be any support for Botai 1 - 3?
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. :)
 

LeonardoFM

Well-Known Member
Member
Joined
Jan 23, 2012
Messages
152
Trophies
0
Age
35
Location
Rio de Janeiro
XP
142
Country
Brazil
There are two things about this emulator that interest me to no end:

First: To be able to use Y and B (instead of A and B) and X and A for the same effect. Because let's be honest, the DS buttons are to frail to be used in a horizontal way, to run and jump at the same time, for example.

Second: assuming the compatibility is as good as VBA-M, to be able to play the games in a 3DS. The DS is great, but the Analog-pad is essential for some diagonal moves, like in many RPGs.

The GBA mode of the DS Lite is awesome, but there's no way to switch thr buttons, Y and X being useless. It's a pity, lazy work by Nintendo.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1