Author Topic: Saving GBA custom button arrangement  (Read 7223 times)

Peffse (OP)

  • *
  • Posts: 32
Saving GBA custom button arrangement
« on: July 16, 2011, 11:08:00 pm »
I've tried searching a bit but haven't found an answer... has anybody had luck saving custom button changes on the GBA emulator?
I like changing the A button to the Gemei's B and the B button to the Gemei's Y (it feels more comfortable) but it won't save this custom layout. I tried opening the cfg file in notepad to see if there were any changes I could make but it's either encoded or corrupted gibberish.

Kryptofacist

  • *
  • Posts: 217
Re: Saving GBA custom button arrangement
« Reply #1 on: July 17, 2011, 07:58:47 am »
Nobody has managed it yet. It is also a problem for me, as I like to change the save/load shortcuts to use select instead of start. That way I don't accidentally save or load when I quickly pause. I might PM Cex and ask him how hard it would be to tweak that.
"The problem with internet quotes and statistics is that often times, they're wrongfully believed to be real."
- Abraham Lincoln

cex

  • *
  • Posts: 144
Re: Saving GBA custom button arrangement
« Reply #2 on: July 18, 2011, 10:37:41 am »
Hello,

Modifying the simulator to include an option in the menu, or modify the save/load routines to include the key table in the config file is almost impossible without having access to the source code.

Anyway, if you always (or most of the times) desire the same key assignment, you can modify the default values for the keys in the GBA.SIM file.

FIRST OF ALL MAKE A COPY OF YOUR GBA.SIM FILE !!  (backup it, as I had no time to test this yet).

Using an hexadecimal editor go to address 0xBD4E4



At this address there are 14 values of 32-bit that are the default keys (the selected area in the image above).
The order is the one in the menu: UP, DOWN, LEFT, RIGHT, A, B, L, R, SELECT, START, VOL+, VOL-, SAVE, LOAD
The default values are (see possible keys below): UP, DOWN, LEFT, RIGHT, A, B, L, R, SELECT, START, UP+START, DOWN+START, LEFT+START, RIGHT+START

The possible values are (as they appear in the editor):
Code: [Select]
UP     00 00 10 00
DOWN   00 00 00 08
LEFT   00 00 00 10
RIGHT  00 00 04 00
A      00 00 00 80
B      00 10 00 00
X      00 00 01 00
Y      00 00 00 20
L      00 00 02 00
R      00 00 00 40
SELECT 00 40 00 00
START  80 00 00 00

For combinations just add the 2 desired values. For example, if I want to change the Save key to use SELECT+R, I'll go to the 13th value (defaults to 80 00 00 10)  and will change it for 00 40 00 40.

Just modify the 4-byte value you want to change.
Be carefull not to delete/add any byte, and always make sure you are in a 4-byte boundary to avoid modifying two values in the table.

Yes, this is a dirty hack, but is the easier way having into account that we don't have access to the source code.

Hope this helps.
Regards.

EDIT: Tested myself, and the table is the one for default values. So if you want to have these values on start-up you have to go to the menu and "load default values" and then use the menu "Exit" option so the are  loaded on next start-up.

This one uses B for "A key" and Y for "B key" as Peffse requested: http://www.sendspace.com/file/2tyufn

 

« Last Edit: July 18, 2011, 11:04:49 am by cex »

cex

  • *
  • Posts: 144
Re: Saving GBA custom button arrangement
« Reply #3 on: July 18, 2011, 11:14:34 am »
Well,
giving this a second thought (due to the fact that the modified .SIM required loading defaults), I wasted my time on previous post findings.

In all the gemei sources I have seen, the configuration is loaded on startup, and saved on "normal" exit.
I have tested right now, and all you have to do is going to the menu, setting your prefered keys, and exit using the Menu "exit" option. If you turn down the console you loose the settings for the next start-up.

So forget editing your GBA.SIM. Simply select your keys and Exit the emulator using the menu.
(Tested with Firmware 1.1 build 3 in case it makes any diference).

Anyway it was funny to search for the key table, and you can use the hack to make sure you don't destroy your settings if using "Loading default keys" option accidentally.

Regards.
« Last Edit: July 18, 2011, 11:24:37 am by cex »

Kryptofacist

  • *
  • Posts: 217
Re: Saving GBA custom button arrangement
« Reply #4 on: July 18, 2011, 12:46:48 pm »
Well, my key's won't save themselves. So I am trying the HEX method.

Oddly enough. I have different values between 0xBD4E4 and 0xBD51B than what is shown in your picture. I tried 2 different HEX editors to be sure.


Is there more than one available gba.sim? Cex's model is newer than mine, so perhaps there was a change?
"The problem with internet quotes and statistics is that often times, they're wrongfully believed to be real."
- Abraham Lincoln

cex

  • *
  • Posts: 144
Re: Saving GBA custom button arrangement
« Reply #5 on: July 18, 2011, 12:55:57 pm »
Mine says GBA 1.1

I have checked the config file and it saves the keys:



The order is A, B, L, R, SELECT, START, VOL+, VOL-, Save, Load (arrows don't seem to be saved, but who's going to change that anyway?
Valid values are the ones in the post above.

Check your emulator, I can upload mine if it is newer.

Also check that your GBA.cfg is not read only, or erase it, so a new one is created.

cex

  • *
  • Posts: 144
Re: Saving GBA custom button arrangement
« Reply #6 on: July 18, 2011, 01:16:39 pm »
Just in case this was relevant.
These are the emulator files included in my GA330 (Fashion model):

13/12/2010  09:55           756.528 CPS1.SIM
13/12/2010  09:55           562.432 CPS2.SIM
01/01/1980  00:00                96 gba.cfg
24/12/2010  15:00         1.121.552 gba.sim
25/12/2010  09:25         1.029.520 md.SIM
13/12/2010  10:04         1.699.246 MVS.sim
22/11/2010  10:08           887.120 NES.SIM

CPS 1 and 2 I have not tested (don't have ROMs).
GBA is v1.1
NES is v1.1
MD is 1.0
MVS is 1.1

Console has S/N: 4G 0301WH1032934 and was bought 30th of May at Dealextreme.
 
« Last Edit: July 18, 2011, 01:23:49 pm by cex »

Kryptofacist

  • *
  • Posts: 217
Re: Saving GBA custom button arrangement
« Reply #7 on: July 18, 2011, 01:23:57 pm »
My GBA emulator is v1.0.

I guess there was an update I missed or something. I would appreciate it greatly if you could upload yours. It sounds like there was a fix.

[edit]
My MVS is also v1.0. I haven't noticed any problems with it, but I would also like an upload of that.
« Last Edit: July 18, 2011, 01:27:13 pm by Kryptofacist »
"The problem with internet quotes and statistics is that often times, they're wrongfully believed to be real."
- Abraham Lincoln

cex

  • *
  • Posts: 144
Re: Saving GBA custom button arrangement
« Reply #8 on: July 18, 2011, 01:43:21 pm »
This explains the differences...

No problem with the uploads, I can't believe Gemei do not provide these on it's page.

GBA v1.1: http://www.sendspace.com/file/b3l7dq
MVS v 1.1: http://www.sendspace.com/file/hi2e7p

Enjoy.

Kryptofacist

  • *
  • Posts: 217
Re: Saving GBA custom button arrangement
« Reply #9 on: July 18, 2011, 01:52:26 pm »
Thank you so much!
I am putting these links on the Wiki.

[edit]
in-game saves work on GBA now. w00t!
« Last Edit: July 18, 2011, 02:07:31 pm by Kryptofacist »
"The problem with internet quotes and statistics is that often times, they're wrongfully believed to be real."
- Abraham Lincoln

djreisat

  • *
  • Posts: 14
Re: Saving GBA custom button arrangement
« Reply #10 on: July 27, 2011, 08:03:15 pm »
just wondering, how exactly do you update the emulator.  What I mean is do you just put the .cfg and .sim files in the game folder while leaving the existing GBA files in the game folder unchanged?  Thanks, just got my gemei don't want to ruin it early on  ;D

Peffse (OP)

  • *
  • Posts: 32
Re: Saving GBA custom button arrangement
« Reply #11 on: July 27, 2011, 09:21:21 pm »
Yup, don't touch the GBA files. Just replace the SIM and CFG.

Speaking of GBA 1.1 emulator. Is anybody having issues with it loading very old savestates? Ones that should have been overwritten?

Kryptofacist

  • *
  • Posts: 217
Re: Saving GBA custom button arrangement
« Reply #12 on: July 27, 2011, 09:33:26 pm »
Yup, don't touch the GBA files. Just replace the SIM and CFG.

Speaking of GBA 1.1 emulator. Is anybody having issues with it loading very old savestates? Ones that should have been overwritten?

I haven't used it much, but I haven't found that to be the case at all.
Have you double checked the save slot you are using? It's possible you saved to 2 different slots at some point and your newer save is in one you aren't set to.
"The problem with internet quotes and statistics is that often times, they're wrongfully believed to be real."
- Abraham Lincoln

Hagane023

  • *
  • Posts: 174
Re: Saving GBA custom button arrangement
« Reply #13 on: July 27, 2011, 10:11:14 pm »
When I put some more stuff on my memory card I noticed I now have a load of gba save states everywhere on it since I put the 1.1 gba .sim , guess a memory leak or something. But started to get strange things happening. For example pictures not matching the state. Thought it was a temp glitch, but went back to version 1.0 and it doesn't have that issue and save states being saved in correct folder. Gone back to 1.0 ais golden sun glitches really getting to me. I only use the memory card for gba and movies as I have goomba, Zion, zxa and smsadvance( until cex saved the day with his master attempt gg port. Haven't noticed a change with neogeo yet, but noticed an odd thing with cps1 willowje.zip wouldn't load until I put willow.zip in the game folder, but it wouldn't run from willow.zip . Hope another firmware update comes soon and cex sorts the pocketsnes emu with hi-res added. Anyone else getting anything strange as well?

djreisat

  • *
  • Posts: 14
Re: Saving GBA custom button arrangement
« Reply #14 on: July 27, 2011, 10:55:13 pm »
Yup, don't touch the GBA files. Just replace the SIM and CFG.

Speaking of GBA 1.1 emulator. Is anybody having issues with it loading very old savestates? Ones that should have been overwritten?

Excellent, thanks

Peffse (OP)

  • *
  • Posts: 32
Re: Saving GBA custom button arrangement
« Reply #15 on: July 27, 2011, 11:58:02 pm »
I haven't used it much, but I haven't found that to be the case at all.
Have you double checked the save slot you are using? It's possible you saved to 2 different slots at some point and your newer save is in one you aren't set to.
Oh, I'm quite sure it's all in the same slot. I only use slot 1.
I've had it do very very strange things. The picture displayed for the example (slot 9) doesn't match when I exit the game. When I open the game and load slot 1, it will be a very old save (one that I overwrote) BUT if I load a second time it will be correct.
It's happened to me for two different games, so I don't think it's an anomaly.

In fact, this sounds similar to my problem:
But started to get strange things happening. For example pictures not matching the state. Thought it was a temp glitch, but went back to version 1.0 and it doesn't have that issue and save states being saved in correct folder.

Hagane023

  • *
  • Posts: 174
Re: Saving GBA custom button arrangement
« Reply #16 on: July 28, 2011, 07:19:47 am »
It is to do with state 9. When you load it the first time it will load an old state, usually the one with the image before you enter the game, but if you load the same state again without exiting you will get the new slot. Only the gba emulator works like this. It only works a few times then the state dissapears, so back up with another number.  ;)

 

Post a new topic