What's new

Porting an Emu

Do you approve the emulation of the SNES on the GBA?

  • Yes

    Votes: 9 81.8%
  • No

    Votes: 2 18.2%

  • Total voters
    11

neoak

Triforce of Something...
How hard could be to port a SNES emu, like Zsnes 1.337, to the GBA?. I know that the GBA can support even SuperFX Games like Starfox, C4 games like MegaMan X2 and 3 and the chip that has Mario Kart (Don't remember it's name). Now, using HAM 2.4, what problems can i encounter in the GBA, including the Screen Size. ???
 

Quvack

Member
Just coz the GBA can support games like that doesnt mean it could support them emulated. The GBA versions were written specifically written for the GBA.

Porting zsnes would be near impossible, as its mostly x86 asm, meaning its written to run on x86 processors, its not terribly portable im afraid.

Snes emulation will probably happen eventually on GBA's, but the speed would probably be unplayable.
 

Cyberman

Moderator
Moderator
neoak said:
How hard could be to port a SNES emu, like Zsnes 1.337, to the GBA?. I know that the GBA can support even SuperFX Games like Starfox, C4 games like MegaMan X2 and 3 and the chip that has Mario Kart (Don't remember it's name). Now, using HAM 2.4, what problems can i encounter in the GBA, including the Screen Size. ???

Well I suggest starting with something mostly written in C like SNES9x. You have the OPTION of using hand coded assembly modules. I think the GBA uses an ARM processor, not sure of the specific type because there are a number of variants. Likely it uses the ARM7 thumb processor which is a 16 bit bused 32 bit internal one. It's more code efficient is it's big advantage. Guarenteed that it won't be fast, but fast shouldn't be your first objective, working should :). You probably could redo the assembly code sections if you knew the ARM7 thumb instruction set well enough.

Now comes the more interesting question once you port it, then what will you do? If the GBA has < 8mb of memory internally you will be severly challenged for memory.

How do you plan on loading the SNES games? Format? I suppose you could cram them all into a single cartridge (like FF4, FF5, and FF6) with the Emulator. This would require a way to compile and install the games into a bootable ROM. You still have to deal with Saving game states etc. I'm not sure about sound emulation either. SNES had several sound options. There were also custom chips built into cartridges for affects and sound.

Depending on CART size for the GBA you might be able to cram a number of games into a single Cart. My Biggest concern would be save states. I suggest using an existing GBA emulator and working with tools for making carts tell you get a system that you can link everything together into the ROM cart for the GBA. Then you should be doing well. Also being able to save would be good too (grin). Since your hardware is custom you won't have to concern yourself about a lot of different PC machines to deal with OGL and DirectX.

Anyhow that's a start of what to think about. You do need a compilor that can target object code for the GBA and tools to compile cartridge images to load into a GBA emulator.

Cyb
 

decription

New member
Well, I'm not sure if it is possible at playable speeds. You need to use a very fast languge. Pascal might work. It may not be possbile in the way you're looking at it. It may have to be done on a game by game basis. It could still work well then. I mean look at bleemcast. It's incredible but it only supports 3 games or so. Give it a shot. Study up on documents on SNES tech specs and emulation. Also try to learn as much as you can about the GBA and its hardware. Good Luck. This is by no means an easy feat. But, look at ULTRA HLE. It proved impossible can be done.
 

zorbid

New member
The GBA pipes could be used too. Something tells me that the snes mode 7 should be much easier to emulate on gba than on pc...
 

linker

Emutalk Member
The most interesting thing is how would you port zsnes when it's fully written in asm. And, description,.... pascal?! on gameboy??
 

decription

New member
Sorry my bad. But pascal is pretty fast. I'm quite sorry I hope I didn't come off sounding like lightnight.
 

Doomulation

?????????????????????????
Pascal is also one of the most difficult languages to use.
And really...putting several emulators into one... that might require more cpu or at least size.

I wouldn't care. But then, i think it's unneccessary to do such. Well, it's what i think.
 

Cyberman

Moderator
Moderator
Doomulation said:
Pascal is also one of the most difficult languages to use.
And really...putting several emulators into one... that might require more cpu or at least size.

I wouldn't care. But then, i think it's unneccessary to do such. Well, it's what i think.

Pascal / Delphi isn't too bad really
The big differences are in how data is managed between Pascal and C

C passes pointers to structs implicitely whereas pascal copies the entire structure and passes that.
There are other subtle differences as well.

C is not a very elegant language
C++ is an improvement but one can get carried away in objectizing everything at times.

The most difficult languages are GML <general markup language not to be confused with XML which is a subset of it>, LISP because it really can loop indefinately and still get something done if everything was a list this would do it.
Prolog everything is a logical assertion and your data is your program.

There are other weird little languages.. but the one that is the most difficult to master is C++. C++ is simple yet there are so many ways you can consistantly screw up in it, that everyone who uses C++ should have Lint in there back pocket so they won't mess up something :)

That doesn't include the standard template library <STL> and all the things that you can do with those..

Cyb
 
OP
neoak

neoak

Triforce of Something...
For me, the most hard to learn language is Low level, like the one that the PS2 uses. Now, PC's languages, i say Perl and maybe Cg (No CGI, just "Cg").

About the emulator, all the calls have to be done in LLE, like Bleemcast. And then we find the buttons problem....
 

Top