Gba Emu


Status
Not open for further replies.
So far as I can see, the whole thing about flashing a GBA bios is actually a misunderstanding by someone earlier in the thread (no idea who) because he talks about the GBA bios a lot.

I'm fairly sure he doesn't mention flashing...

Its just that people like to be overcomplicated - how much more interested (though less likely to try) would you be in an emu that attempted to replace the bios of the original machine while running than one that just emulated that bios in memory?
 
pip posted on Mar 4 2004 at 08:34 AM said:
Rico posted on Mar 3 2004 at 09:58 PM said:
Remember that any 5,6,7mb roms rounded up to 8mb could work if you used some sort of shrinker program to make them smaller...
No GBA game is 5, 6 or 7MB. Either they are 32Mbit (4MB), 64Mbit (8MB) or more rarely 128Mbit (16MB).
Contrary to popular belief, developers do not tweak their games to occupy exactly 8MB of space. As other people have pointed out, the rest of the ROM is just 0 repeated, which can be trimmed out to make the ROM smaller. But it still works. Yay!

I translated and summarised some stuff using Babelfish earlier in the thread... if no french speaker gets in with enf65's news first, I will use that.
 
Last edited by a moderator:
for now nothing new on yaronet but if some infos are out then I will translate ASAP
Babelfish sucks...since a lot of words arent translated because of mispelling.

see you :lol:
 
washo posted on Mar 7 2004 at 01:30 PM said:
Babelfish sucks...since a lot of words arent translated because of mispelling.
I know, but I can guess the real french spelling and look it up; usually I summarise the translation anyways.
 
Last edited by a moderator:
Does the author actually know there is such a large following of his project? IE does he know about this thread or does he just think the few french fellows cares? :)
 
Hoping that he knows about this.

To play Zone of the Enders: Fist of Mars on my GP32 would be HEAVENLY.

..Seeing as I can't be bothered to find my GBA and cartridge.
 
lizard808uk posted on Mar 4 2004 at 01:35 AM said:
Sorry to go a little off topic, but are there shrinker type stuff for SNES roms? Might be what I need to get Mario (hacked lunar magic version) and Phantasia working.(I have Googled it, but no success).

I think the GBA thing is a good concept, would other ARM based devices be able to be emulated in this way (if its a success)? Note I didnt mention N-gage. I was thinking of ARM powered PDAs.
I need a shrinker for snes roms, too. I really want to play SDW The legend continues, but it's 2 megs too big! :angry:


BTW, wasn't there a thread about Super Demo World somewhere? Can somebody give me a link (I already tried searching, but I didn't find anything)?
 
Last edited by a moderator:
As per my off-topic post, does anyone know where there is technical documentation and the like for the GBA (obviously unofficial)? Like on how the hardware registers work, how to parse GBA rom files, etc?

Not looking for source code as that can be found in the way of open-source emulators, but more on the documentation side.
 
what are you going to try? ;) something for the gp32?
hmm has someone posted a link to this thread in the gp32news forum?
perhaps someone should do it.
 
hmm has someone posted a link to this thread in the gp32news forum?
perhaps someone should do it.

already done : In fact I gave the gp32x main page link...
Maybe yaronet users will reg on gp32x....we will see...:)

see you :lol:
 
washo posted on Mar 7 2004 at 09:25 PM said:
what are you going to try?
Nothing, I'm just interested in the internals of the gp.. er, I mean GBA :)
 
Last edited by a moderator:
I really hope this'll work... Zodiac owners are getting really cocky about their upcoming GBA emulator. They brag that it will be full spped without sound. If this comes out... ohhh yeah

Oh sorry I got carried away :D
 
Efompor posted on Mar 8 2004 at 08:08 AM said:
I really hope this'll work... Zodiac owners are getting really cocky about their upcoming GBA emulator. They brag that it will be full spped without sound. If this comes out... ohhh yeah

Oh sorry I got carried away :D
Well as you said it has no sound and it only uses a small part of the zodiac screen (example: http://www.crimsonfire.com/firestorm/firestorm6.jpg ). Personally I cannot play games without sound so it is of no use to me. Not to mention the $20 price tag :)
 
Last edited by a moderator:
I guess that's a typo pip.

Just to make something clear on the memory front. The GBA has some memory AS WELL as the 8Mb ROM.

I think what the guy was saying about the BIOS was that he would have to write a clone of the GBA bios... This makes sense, as the GBA bios runs in supervisor mode, which completely blows this form of emulation out of the way. Rewriting the GBA bios has some other advantages too: for example the GBA bios includes a sound driver. If you can implement this sound driver in native GP32 code, you end up with extremely efficient sound emulation for all GBA games that use the built in sounddriver. However, making a GP32 native version of the GBA bios is quite a lot of work in itself.

So what has to be stored in the GP32s 8Mb RAM:
5-8Mb ROM (removing any trailing zeros. I guess unlikely to be less than 6Mb, as then develoipers more likely to trim the game for a cheaper cartridge)
500k (roughly) GBA RAM
Emulator code (no idea)

The point I am trying to make is that if you want to load a full 8Mb cartridge without trimming it down, its not enough to move the emulator code into the BIOS.
 
here is some news :
Salut tout le monde,

* Pour répondre à Washo :

Désolé si je poste pas tous les jours, mais j'ai pas internet chez moi, alors c'est pas toujours pratique.
Je pense que je vais faire un site internet pour mettre mes news, ce sera plus pratique.


* Pour répondre à tous ceux qui me idolatrent :

En fait mon émulateur est plus facile à programmer qu'un émulateur classique vu que j'ai pas besoin de désassembler chaque instruction, et contrairement aux idées reçues, configurer la MMU est assez simple, c'est juste que j'ai eu pas mal de doc à lire.


* Pour répondre à Orion_ :

Comment configurer la MMU : en gros il y a une table (deux en fait, suivant la taille des pages à déplacer) qui fait correspondre une adresse virtuelle à une adresse physique (Table Translating en anglais). Le plus embêtant c'est que les pages doivent être alignées en fonction de leur taille, mais une fois qu'on a compris, c'est pas difficile.

Comment reprendre le contrôle : avec les timers : j'utilise un timer qui se produit à la fin de chaque ligne du LCD (le LCD de la gba), ce qui me permet de mettre à jour VCOUNT, et de rafraichir l'écran, les touches, et tout le reste... Le problème c'est que certaines ROM désactivent les interruptions, j'ai eu le problème ce week-end mais il ma suffit de remplacer les instructions en question par des nop (mov r0, r0), et ça a marché. De toute façon les interruptions qui devraient arriver à cause de la GBA, c'est moi qui les émule, donc ça n'a rien à voir avec les vrai interruptions de la GBA.

c klr que la c 10x plus rapide que d'emuler le proc : je suis totalement d'accord, par contre faut pas oublier qu'il y a tout le reste à émuler, et je n'ai aucune idée de la puissance qu'il faut.


* Pour répondre à Superip74 :

Désolé, mais je ne connais pas du tout le hardware de la neogeo, ce qui est sûr c'est que la gp32 n'a pas le même processeur que la neogeo, donc le principe de mon émulateur ne s'applique pas à la neogeo.


* Concernant les news :

- Le problème que j'avais à cause des accès mémoire non alignés est résolu : il suffisait de désactiver "Memory Alignment Check" qui était dans je ne sais plus quel registre CP15.

- J'ai plus ou moins fini les modes 4 et 5 (le mode 4 n'affiche pas les sprites mais juste le BG2)

- J'ai modifié le bios de la gp32 pour intercepter les exceptions (undefined instruction, data abort et prefetch abort) et également les SWI. J'ai du faire super attention c'est déjà un peu risqué de reflasher son firmware, alors un firmware modifié par mes soins...
J'ai été un peu obligé de faire ça vu que pas mal de démos gba faisaient resetter la console, et je ne pouvais pas savoir à cause de quoi, donc maintenant j'ai un message qui m'indique l'adresse de l'erreur, le type d'erreur.
En particulier certains compilateur (goldroad par exemple) codent mal l'instruction LDR(S)(H) et STR(S)(H). Ca n'a aucun effet sur GBA, mais sur GP on obtient une "Undefined Instruction". J'ai un peu galérer pour trouver ce problème.
Une autre raison de devoir modifier le bios gp32 est la suivante :
Les roms GBA utilisent le bios GBA en faisant des instructions SWI #nn, or ces instructions font directement appel aux instructions SWI de la GP32. Voici donc l'idée : je modifie la rom GBA pour que toutes les instructions SWI #nn soient remplacées par SWI #nn+0x80, afin que les fonctions du bios gp32 soient comprises entre 0x0 et 0x7F (en fait il n'y en a que 23), et les instructions > 0x80 soient celles de la GBA. J'ai donc juste redirigé une instruction "BGT r0, #23" du bios gp32 pour intercepter les fonctions bios de la GBA.
Je suis pas particulièrement content de cette solution, mais j'ai pas trouvé mieux pour l'instant, alors si vous avez des idées...

- Si vous avez compris ce que je viens de dire, ça veut dire que les roms gba devront dans la plupart des cas être "patchées" pour fonctionner avec mon émulateur. Ca devrait pouvoir être fait automatiquement avec un logiciel, sauf si les roms sont un peu protégées (genre checksum) ou alors compressées. Ca veut aussi dire qu'il va falloir utiliser un firmware modifié (mais de toute façon c'était déjà obligatoire à partir du moment où vous vouliez charger des roms de plus de 4 Mo)

- Comme mon émulateur commence à émuler quelques petites demos, je pense que je vais sortir une première version très bientôt (cette semaine je pense)

- Je pense avoir à peu près tout dit.

@+


here the "translation:
hello everyone

to answer Washo :
sorry if I dont post every day but I dont have internet at home so it isnt very cool
I think I will make a website to put news on...It will be easier

to answer everyone thinking im a god:
in fact my emu is easier to dev than a classic emu since I dont have to decompile all the instructions and the MMU config is quite simple (instead of what poeple think)
I only needed a lot of docs

to answer _Orion:
How to config the MMU: there is 1 table (in fact 2 depending on the size you have to move) which make a link between a virtual address and a physical address(Table Translating). The most boring partis that the pages have to be aligned depending on their size but since you have understood that it is not hard
How to take back control: with timers
Im using a timer hapening at the end of each line from the GBA LCD. That allow me to update VCOUNT and to refresh the screen, buttons,everythink else
The Pb is that some roms kills interuption..I got the Pb this weekend but I ve only de replace those instructions by NOP et it worked
In fact interuptions hapening due to the GBA, I emulate them so it has nothing to do with GBA interuptions (the true ones)
it is really 10x faster than emulating the CPU..I agree but dont forget that you have to emul everything else and I dont know the power needed

to answer Superip:
sorry but I know nothing about NEOGEO...1 thing is sure : it is not the same CPU so my method cant be used

ABOUT THE NEWS :)
-The Pb I had due to mem acces unaligned is solved : just desactivated "Mem alignement check"which was in a CP15 register

-Mode 4 & 5 are nearly finished (M4 only shows BG2 not the sprites)

-I modded the GP32 BIOS in order to intercept execptions (undef instruction, data abort, prefetch abort) ans the SW1
I need to be very carefull since it already "hard" to reflash the BIOS....So guess about a modded one by myself...:p
I was obliged to do that since a lot of demos GBA reseted the GP32 ans I wasnt able to know why...So now I have a message indicating me the crash address, type...
Some compilators (goldroad for example) are badly coding LDR(S)(H) and STR(S)(H)...No effect with GBA but with the GP32 we get a "undef instruction"
It was hard to find out this Pb
Another reason to mod the GP32 BIOS:GBA roms are using the GBA BIOS calling SWI#nn but those instructions are directly calling GP32's SWI
Here is an idea : I mod the GBA rom so that all SWI #nn instructions are replaced with SWI#nn+0x80 so the GP32' BIOS fountion are between 0x00 and 0x7F 'in fact there is only 23) and the instructions > 0x80 are the GBA ones
I only redirected the BGT r0, #23" from the GP32 BIOS to intercept GBA's BIOS fonctions
Im not really happy by this method but nothing better for now so if someone have an idea.....:)

-I you understood what was written that means GBA roms will have to be patched to work with my emu. It should done auto by a soft except if roms are protected (CRC chk...) or compressed
So we will have to used a modded BIOS (but in fact it is already needed to play roms bigger than 4M)

-Because my emu can emuate some small demos I think I will release a beta very soon (could be this week)

-I think I said everything
@+

so here is a lot of cool news about the GBA emu
see you :lol:
 
wow... this sounds great :)
a version this week....
have to get somegba demos.. or emus.
The Page is a good idea. Should be a nice one.
hmm.. perhaps first commercial roms in a month.
 
Status
Not open for further replies.
Back
Top