• Welcome to SCdev.org. Please log in.

Welcome to the new SCdev forums!

It’s possible or Not? GBA emulator running on iPlayer

Started by Darkchen, July 15, 2009, 02:44:22 AM

Previous topic - Next topic

Darkchen

iPlayer, a multi-media player on DS has been released for several days. A lot of people consider whether iPlayer could run a GBA emulator on DS. It is well know that running a GBA emulator on DS which is hard to be imaged before iPlayer release. Before iPlayer release people wish DS CPU is powerful enough to do that, but the CPU is not powerful enough to simulate GBA. Of course, Nintendo official have its solution, it is really not difficult to run GBA game on DS for official itself, but so far, it does not release any games fee paying downloading service yet, what is promised formerly. Further more, even though Nintendo official release GBA games downloading service, there will not be much too functions, such as screen shot, realtime save, frame skip, cheat and so on, what is included on common console emulators. PC emulator player should know these functions well.


Above all, I would like to introduce myself. I am not a professional programmer, but I am interested in programming.  I pay a lot of attention on iPlayer news recently, and sent a mail to iPlayer official site to ask the possibility if GBA emulator could be launched by iPlayer, but unfortunately, according their reply, due to the copyright problems, iPlayer official will not provide GBA emulator. Yet, iPlayer really attract me, so I have bought one for researching.


In fact, simulating GBA is not very difficult. The principle is simple, using powered arithmetic capability to simulate a console circumstance, is similar to PC paltform console simulators. So to simulate GBA by iPlayer, the onboard CPU is indispensable. For a better effect of GBA simulating, the frequency of iPlayer onboard CPU have to be 20 times to GBA CPU, at least. Analyzing the ability of hardware decoding such high resolution videos, I suppose the onboard CPU’s frequency is not lower than PSP’s at least, even higher. Unfortunately, I have no detailed data about iPlayer, so these are just my hypothesize.


Logical analyzing:


The hardware of GBA includes two CPUs, one is a 32bit RISC instruction sets CPU (ARM7TDMI), which frequency is 16.78MHz, another one is 8bit CISC instruction sets CPU, a 130KB RAM, a 2D graphics card, six channel sound card, four channel DMA, four timers and so on. If count the GBA game card 256KB RAM on, the GBA system totally have 386KB RAM.


Then what we need to do is to simulate the hardware mentioned before. We must use our own instruction to simulate the ARM7 instruction system. On average, to simulate one instruction, need ten operations. In a word, iPlayer’s CPU frequency must be ten times to GBA’s, besides other hardware of GBA, there need to be another ten times. So totally twenty times, the iPlayer’s frequency must be 340MHZ or higher, and there must be enough RAM. According to the ability of hardware decoding AVI video, I believe iPlayer’s frequency will not be lower than PSP’s CPU which is 330MHZ, and iPlayer’s SDRAM should be 16MB or more, so running GBA emulator by iPlayer becomes possible.


Before writing, I mailed iPlayer official site again, wanting a SDK. I hope official will notice my post.

kkan

NO .... it won't happen!

same with any other card SLOT 1 does not have direct access to the GBA hardware and that's the MAIN reason why other cards cannot do it either!

You won't be able to emulate it in the iplayer hardware either it just won't work mainly due to the no access to the above mentioned no access gba hardware from slot 1 ....

That and the DS only has 4mb of ram... the iplayer card has 16mb gba games are upto 256mbit in size 32mb ...  4mb+16mb = 20mb can you see where I'm comming from here?.... even before the off your 12mb short for 1 game already that's without the emulator space used to even try emulate the  processor chips.

nice theory but the gba hardware access problem will be your downfall!












rainman

No, he does not mean to emulate GBA by DS itself, but by iplayer, so I think there is no access problem. I also think iplayer has the ability to emulate GBA because of high resolution AVI video playing. I’m expecting it. :)


kkan

Quote from: rainman on July 15, 2009, 05:16:20 AM
No, he does not mean to emulate GBA by DS itself, but by iplayer, so I think there is no access problem. I also think iplayer has the ability to emulate GBA because of high resolution AVI video playing. I’m expecting it. :)






did you read whats written in my about NO ACCESS TO SLOT 2 ie GBA HARDWARE FROM SLOT 1 ??

or anything in my post for that matter like the 16mb ram in the iplayer +4 mb ram in the ds = 20mb etc etc?



Koji

GBA ARM7
DS ARM7 and ARM9

The processor and the vast majority of the hardware has not been the issue since most of it can be 1:1 mapped to DS counterparts. What can't be mapped (which isn't much... the 8mhz GBC color CPU and GBC sound chip, both of which are already fully emulated in Lameboy and other GB/C emulators. The ARM7 can easily handle anything the GBA requires while the ARM9 can handle anything that truly needs emulating). Everything else video wise could easily be mapped to DS counterparts with little to no slowdowns.

The big problem has always been the medium and/or ram depending on how you look at it. The GBA slot and medium are very fast, especially for nonsequential random reads and access time. The DS slot uses much slower medium that's a lot cheaper and stores much more data (which is why some DS games have load screens). The easiest (and cheapest solution) is to use RAM which is also very fast. Well the regular DS only has 4MB (32mb) which is much to smaller for GBA emulation. DSi has a more impressive 16MB, but part of that would have to be used for the emulator so it's more likely about 15MB free for games that could be emulated.

The vast majority of GBA games were under 32MB so when the DSi is fully hacked, there is potential for the smaller games, but the larger games would need to have some sort of pretty advanced caching system to handle the extra data... but that would surely lead to slowdowns at best, and random crashing at worst (since it's not full emulation, but mapping I'm not sure how easy it would be to "pause" GBA code to allow for data to be purged and fed back into ram)

Darkchen

Quote from: kkan on July 15, 2009, 03:51:21 AM
NO .... it won't happen!

same with any other card SLOT 1 does not have direct access to the GBA hardware and that's the MAIN reason why other cards cannot do it either!

You won't be able to emulate it in the iplayer hardware either it just won't work mainly due to the no access to the above mentioned no access gba hardware from slot 1 ....

That and the DS only has 4mb of ram... the iplayer card has 16mb gba games are upto 256mbit in size 32mb ...  4mb+16mb = 20mb can you see where I'm comming from here?.... even before the off your 12mb short for 1 game already that's without the emulator space used to even try emulate the  processor chips.

nice theory but the gba hardware access problem will be your downfall!







Thank you for reply.

You suppose there is only 16MB ram in iplayer, that's what I do not agree with. I have mailed to official site many times to discuss my idea, and I also have asked the hardware configuration parameters. They do told me there is 32MB ram in player cart, so the ram is enough to emulate it, is't it?

Whatever, if I' were lucky enough to get SDK, I would have a try.



kkan

Quote from: Darkchen on July 15, 2009, 09:45:57 PM
[

Thank you for reply.

You suppose there is only 16MB ram in iplayer, that's what I do not agree with. I have mailed to official site many times to discuss my idea, and I also have asked the hardware configuration parameters. They do told me there is 32MB ram in player cart, so the ram is enough to emulate it, is't it?

Whatever, if I' were lucky enough to get SDK, I would have a try.




I think your still missing the point unless the emulator uses exactly ZERO mb to run in then its still going to cut into/use the 32mb to a) store the program code and b) run the code .c) hold the rom in memory to run it!......making it (the 16mb or 32mb)  smaller as it uses up the memory available to it  .......

It STILL cannot access the GBA hardware directly from the SLOT 1 so everything would have to be tried to emulate in the SLOT 1 side and as above mentioned by Koji runs slower than SLOT 2 hardware!


rainman

hmm....

his mean's he maybe use other way to support GBA emu for DS