Hacking Theory on playing GBA games

Status
Not open for further replies.

joepie91

Active Member
OP
Newcomer
Joined
Dec 14, 2008
Messages
41
Trophies
0
XP
52
Country
Netherlands
I am not really into console modding (I generally do coding for Windows only) but wouldn't this method work to be able to play GBA games from Slot-1 cards?

Some people said that it took too much processing power for a DS to play GBA games. What if we let a PC do all the work? So we just throw a GBA rom into a converter of some kind (if somebody knows how the GBA rom filetype is built, that would help
smile.gif
) and then the converter makes a NDS rom from it? Which would basically be a real DS application, not just a loader and a rom, but a real NDS-format game. I am pretty sure there are computers that could handle this. If we get a creator of a Windows GBA emulator to work on this as well, interpreting the GBA rom would be easier, since the emulator programmers know how it works.

What are your views on this method?
 

Psyfira

Credit: 0ml. Insert tea to continue
Member
Joined
Dec 31, 2003
Messages
3,886
Trophies
0
Location
England
XP
270
Country
Sorry, it's just not possible. Two handheld games may look similar from where you're sitting, but in the back end it's completely impossible.
 

ZenZero

GBATEMP's regular arse.
Member
Joined
Mar 12, 2008
Messages
1,271
Trophies
0
Age
33
XP
664
Country
I see his theory, and i doubt it is impossible to do so - but to get it over 1 fps would be hard
 

iritegood

Well-Known Member
Member
Joined
May 15, 2007
Messages
759
Trophies
0
Website
Visit site
XP
273
Country
United States
This man is a genius.
How could nobody have thought of this before? What are you developers, retarded? Someone get this man an award!
 

joepie91

Active Member
OP
Newcomer
Joined
Dec 14, 2008
Messages
41
Trophies
0
XP
52
Country
Netherlands
Depravo said:
If this kind of conversion were possible then emulators would have never been invented.

I don't think so. Converting would take time, a LOT of time.
End users don't want to have to convert everything, plus they don't want to spend time on it.
Loading a game instantly in an emulator is just a lot easier, and is "converted" (by lack of a better word) on the fly, therefore not costing time to convert.

When nothing else is possible (provided you just use a Slot-2 card with no extra gadgets like EZFlash 3-in-1), people might be interested in this kind of solution.

As for the development part, I think coding an emulator is a lot easier (and faster) than coding a converter. Since an emulator just needs to read data, and "out it on the screen", so to say. A converter would have to compile it into a completely different format (.nds files are just compiled executables after all), which would be an additional step.

EDIT:
QUOTE(DanTheManMS @ Feb 11 2009, 09:45 PM) You're going to get stuck on the "decompile the GBA" game part. It's just not that simple.
If you just rip the code out of an existing GBA emulator (for the PC) you already have the hard part. Then you just need to make it write to a .nds file instead of "running" it.
 

DanTheManMS

aka Ricochet Otter
Member
Joined
Jun 2, 2007
Messages
4,453
Trophies
1
Age
34
Location
Georgia
XP
751
Country
United States
GBA emulators for the PC do not turn GBA games into Windows *.exe files (or any other OS's executable file type). That's why they're called emulators, not recompilers or converters. They convert nothing so you can't just use the emulation code.
 

Depravo

KALSARIKÄNNIT
Former Staff
Joined
Oct 13, 2008
Messages
5,359
Trophies
2
Location
Purgatory
XP
4,149
Country
United Kingdom
joepie91 said:
I don't think so. Converting would take time, a LOT of time.
End users don't want to have to convert everything, plus they don't want to spend time on it.

That's correct. They would simply go to their favourite torrent site and download a pre-converted version. Even if your theoretical conversion process took DAYS to convert a single game somebody, somewhere would be willing to do it and upload it. The point is if it could be done it would have been done already.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,188
Country
New Zealand
GBA games are ROMS and have no file system so you can never make an automated program to decompile a gba rom into individual files as you never know what is code and what is data, You could recode a gba game into a nds game but it'd have to be done manually and would require some major recoding. It'd probably be easier to use a gba emulator to rip out the gfx and recode it yourself, actually there is the probably about it, it would be easier.
 

joepie91

Active Member
OP
Newcomer
Joined
Dec 14, 2008
Messages
41
Trophies
0
XP
52
Country
Netherlands
DanTheManMS said:
GBA emulators for the PC do not turn GBA games into Windows *.exe files (or any other OS's executable file type). That's why they're called emulators, not recompilers or converters. They convert nothing so you can't just use the emulation code.
I know that. As I said, the interpreter would be done already (since it needs to interpret files in order to emulate them) and only the write-it-to-a-nds-file system should be coded.

Depravo said:
The point is if it could be done it would have been done already.
I don't believe in that. For everything there is a first person that does it. Maybe simply nobody took the time or nobody thought it would be worth the efforts (I mean, it's a huge project, will probably take months to complete with several developers, and you probably get little to no credit for it).
I "invented" several web-based systems as well, that nobody thought of, but proved to be really handy. Everyone could have the next great idea.

QUOTE(Normmatt @ Feb 12 2009, 01:25 AM)
GBA games are ROMS and have no file system so you can never make an automated program to decompile a gba rom into individual files as you never know what is code and what is data, You could recode a gba game into a nds game but it'd have to be done manually and would require some major recoding. It'd probably be easier to use a gba emulator to rip out the gfx and recode it yourself, actually there is the probably about it, it would be easier.
It's not about splitting into files (as far as I know nds files don't have a filesystem either, but I might be wrong) but about converting it from GBA to NDS. Since an emulator already splits data and code (otherwise it wouldn't be able to emulate anything) it is possible to do it.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,188
Country
New Zealand
joepie91 said:
DanTheManMS said:
GBA emulators for the PC do not turn GBA games into Windows *.exe files (or any other OS's executable file type). That's why they're called emulators, not recompilers or converters. They convert nothing so you can't just use the emulation code.
I know that. As I said, the interpreter would be done already (since it needs to interpret files in order to emulate them) and only the write-it-to-a-nds-file system should be coded.

Depravo said:
The point is if it could be done it would have been done already.
I don't believe in that. For everything there is a first person that does it. Maybe simply nobody took the time or nobody thought it would be worth the efforts (I mean, it's a huge project, will probably take months to complete with several developers, and you probably get little to no credit for it).
I "invented" several web-based systems as well, that nobody thought of, but proved to be really handy. Everyone could have the next great idea.

QUOTE(Normmatt @ Feb 12 2009, 01:25 AM)
GBA games are ROMS and have no file system so you can never make an automated program to decompile a gba rom into individual files as you never know what is code and what is data, You could recode a gba game into a nds game but it'd have to be done manually and would require some major recoding. It'd probably be easier to use a gba emulator to rip out the gfx and recode it yourself, actually there is the probably about it, it would be easier.
It's not about splitting into files (as far as I know nds files don't have a filesystem either, but I might be wrong) but about converting it from GBA to NDS. Since an emulator already splits data and code (otherwise it wouldn't be able to emulate anything) it is possible to do it.

NDs files DO have a filesystem, and read from the cart using SPI, wheres gba roms appear in ram all at once and can easily go from reading byte 08000008 to 083FFFFF this cannot easily be emulated on the nds not with a humble 4MB of ram. it would be way to slow.

Emulators don't split code from data the game does that, the emulator just runs the game's code. There is NO way to differentiate between code and data, without manually doing it yourself.
 

joepie91

Active Member
OP
Newcomer
Joined
Dec 14, 2008
Messages
41
Trophies
0
XP
52
Country
Netherlands
Normmatt said:
joepie91 said:
DanTheManMS said:
GBA emulators for the PC do not turn GBA games into Windows *.exe files (or any other OS's executable file type). That's why they're called emulators, not recompilers or converters. They convert nothing so you can't just use the emulation code.
I know that. As I said, the interpreter would be done already (since it needs to interpret files in order to emulate them) and only the write-it-to-a-nds-file system should be coded.

Depravo said:
The point is if it could be done it would have been done already.
I don't believe in that. For everything there is a first person that does it. Maybe simply nobody took the time or nobody thought it would be worth the efforts (I mean, it's a huge project, will probably take months to complete with several developers, and you probably get little to no credit for it).
I "invented" several web-based systems as well, that nobody thought of, but proved to be really handy. Everyone could have the next great idea.

QUOTE(Normmatt @ Feb 12 2009, 01:25 AM)
GBA games are ROMS and have no file system so you can never make an automated program to decompile a gba rom into individual files as you never know what is code and what is data, You could recode a gba game into a nds game but it'd have to be done manually and would require some major recoding. It'd probably be easier to use a gba emulator to rip out the gfx and recode it yourself, actually there is the probably about it, it would be easier.
It's not about splitting into files (as far as I know nds files don't have a filesystem either, but I might be wrong) but about converting it from GBA to NDS. Since an emulator already splits data and code (otherwise it wouldn't be able to emulate anything) it is possible to do it.

NDs files DO have a filesystem, and read from the cart using SPI, wheres gba roms appear in ram all at once and can easily go from reading byte 08000008 to 083FFFFF this cannot easily be emulated on the nds not with a humble 4MB of ram. it would be way to slow.

Emulators don't split code from data the game does that, the emulator just runs the game's code. There is NO way to differentiate between code and data, without manually doing it yourself.

Then wouldn't it just work to "catch" all data extracted by the game code? As in, just intercept it? Only problem I could think of, is that you might only be able to grab parts of games that you can play.
 

UltraMagnus

hic sunt dracones
Member
Joined
Aug 2, 2007
Messages
1,964
Trophies
0
Age
35
Location
Portsmouth
Website
Visit site
XP
220
Country
well, whilst it would be quite possible to take each machine code instruction in a GBA game, and convert it to instructions for the DS (in essence, this is what a emulator does), it is likely that the converted file would require as much power as an emulator to run.

this is in essence why a emulator takes a machine 8 times more powerful than the original to run. because for each machine code instruction required to execute on the original system, 8 are required on the emulated system to perform the original instruction.
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,188
Country
New Zealand
UltraMagnus said:
well, whilst it would be quite possible to take each machine code instruction in a GBA game, and convert it to instructions for the DS (in essence, this is what a emulator does), it is likely that the converted file would require as much power as an emulator to run.

this is in essence why a emulator takes a machine 8 times more powerful than the original to run. because for each machine code instruction required to execute on the original system, 8 are required on the emulated system to perform the original instruction.

WRONG!, the GBA and NDS run on an ARM7 and ARM9 respectively, the ARM9 is backwards compatible with the ARM7 code so the code will run fine it just needs updated to use the new registers etc of the nds. unlike the nds however the gba didn't have a centralised official SDK this means you can't do an automatic scan for what code you need to change and there are tooooooo many possible combinations of opcodes.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=4N-3vv4kzdk