Homebrew The Truth behind GBA emulation

Status
Not open for further replies.

Extreme Coder

Well-Known Member
Member
Joined
Nov 25, 2005
Messages
937
Trophies
0
Age
30
Location
Cairo, Egypt
Website
Visit site
XP
346
Country
Egypt
I believe Exophase !

Just think about it again... 4 MB RAM thats not enough for even caching the stuff fast enough, so how do you want to process it at the same time ?


The new DS is rumored to have more RAM.
I stick with my statement. If the new DS doesn't have a slot2 then this is going to be very important.
If not, its a huge waste of time.
Even then, the new DS won't be released tomorrow. Atleast 2-3 years before that actually happens
wink.gif
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
As Exophase has stated the MPU is much slower than an MMU would be as you need to decode each instruction to understand what address it was trying to write to, The paging could possible be a problem i admit. If indeed that is a major problem you could always use a slot2 cart to run gba games in nds mode.

I won't pretend to know as much about the arm cpu's as Exophase because i don't but I still believe its possible.
 

TrolleyDave

Philosolosophising
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
As Exophase has stated the MPU is much slower than an MMU would be as you need to decode each instruction to understand what address it was trying to write to, The paging could possible be a problem i admit. If indeed that is a major problem you could always use a slot2 cart to run gba games in nds mode.

I won't pretend to know as much about the arm cpu's as Exophase because i don't but I still believe its possible.

I thought you said that you'd already seen this code running?
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
As Exophase has stated the MPU is much slower than an MMU would be as you need to decode each instruction to understand what address it was trying to write to, The paging could possible be a problem i admit. If indeed that is a major problem you could always use a slot2 cart to run gba games in nds mode.

I won't pretend to know as much about the arm cpu's as Exophase because i don't but I still believe its possible.


I thought you said that you'd already seen this code running?

I never said I'd seen it running, My friend told me he got it running and I trust him at his word.
 

TrolleyDave

Philosolosophising
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
As Exophase has stated the MPU is much slower than an MMU would be as you need to decode each instruction to understand what address it was trying to write to, The paging could possible be a problem i admit. If indeed that is a major problem you could always use a slot2 cart to run gba games in nds mode.

I won't pretend to know as much about the arm cpu's as Exophase because i don't but I still believe its possible.


I thought you said that you'd already seen this code running?

I never said I'd seen it running, My friend told me he got it running and I trust him at his word.

Ok my mistake, sorry about that.
 

foobar

Member
Newcomer
Joined
Nov 13, 2006
Messages
20
Trophies
1
XP
82
Country
Can we get slightly more detailed documentation on this? At least snippets of this proof-of-concept code? If the author is reluctant to release it, why not suggest that he tune the paging to thrash badly before releasing it. A demo small enough to fit in RAM without page evictions would work fine but commercial games would run terribly.

I'm skeptical that this can be done at all -- the DS doesn't have an MMU so it's not possible to do re-map addresses or trap memory access to cache misses. I'd be very interested in hearing details of exactly how this would work.
 

MadBob

Nostalgia ain't what it used to be!
Member
Joined
Nov 6, 2002
Messages
1,555
Trophies
2
Website
Visit site
XP
731
Country
A friend and fellow programmer has already created a proof-of-concept demo which can run commercial GBA games without sound but at full speed from the DS slot, Normmatt said.

The anonymous programmer is concerned about the implications of piracy so the concept demo will not be released, however it is now known to be possible, Normmatt said.


I actually flew to Mars last year, I did it in a rocket fueled by Jacobs cream crackers and my s.p.e.c.i.a.l. butter, I created said s.p.e.c.i.a.l. butter by milking venusian moon cows on my last trip there.

However because I don't want to piss the Americans off; and make N.A.S.A. redundant, I am going to offer no proof what-so-ever, nor am I ever going to tell anyone about it.
 

DarkLG

Wow One Shiny Ribbon!!!!
Member
Joined
Jun 21, 2007
Messages
1,401
Trophies
0
Age
31
Location
Indiana
XP
175
Country
United States
how would running gba games on a slot 1 card be possible it just aint it cant be and if it was wheres the proof?
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
Can we get slightly more detailed documentation on this? At least snippets of this proof-of-concept code? If the author is reluctant to release it, why not suggest that he tune the paging to thrash badly before releasing it. A demo small enough to fit in RAM without page evictions would work fine but commercial games would run terribly.

I'm skeptical that this can be done at all -- the DS doesn't have an MMU so it's not possible to do re-map addresses or trap memory access to cache misses. I'd be very interested in hearing details of exactly how this would work.

He isn't going to release it at all, I mainly did this post because i thought i could clear up some misunderstanding about gba emulation on the nds. Mainly that it is indeed possible weather it would run at full speed with sound is another question.

Not to mention i won't be naming my friend as this thread wasn't created to force him into showing proof, it was meant to give programmers an idea on how it could be done so that someone who cares less about piracy could release a working demo.
 

Maat

Active Member
Newcomer
Joined
Nov 5, 2006
Messages
33
Trophies
0
XP
99
Country
Brazil
What 's the difference between doing a dynarec emulator for the ds and using a hipervisor??
And don't say speed, i would like a more technical answer.
 

BinarySoup

Well-Known Member
Newcomer
Joined
Dec 23, 2007
Messages
84
Trophies
0
XP
208
Country
Can we get slightly more detailed documentation on this?  At least snippets of this proof-of-concept code?  If the author is reluctant to release it, why not suggest that he tune the paging to thrash badly before releasing it.  A demo small enough to fit in RAM without page evictions would work fine but commercial games would run terribly.

I'm skeptical that this can be done at all -- the DS doesn't have an MMU so it's not possible to do re-map addresses or trap memory access to cache misses.  I'd be very interested in hearing details of exactly how this would work.


He isn't going to release it at all, I mainly did this post because i thought i could clear up some misunderstanding about gba emulation on the nds. Mainly that it is indeed possible weather it would run at full speed with sound is another question.
Not to mention i won't be naming my friend as this thread wasn't created to force him into showing proof, it was meant to give programmers an idea on how it could be done so that someone who cares less about piracy could release a working demo.

Can I just ask WHY?

If you thought you could clear up any misunderstanding about whether GBA emulation / virtualisation didn't you ponder the possible reaction and confusion your post would create ie a front page listed 7 page discussion thread?

And if your friend is so concerned about piracy then why let other programmers know that this would be possible?

Perhaps you and your friend underestimated the overwhelming response such as claim would create?

I don't mean this post to flame and if it is felt as such then moderators please feel free to remove but I still have that ringing question in my head, why?


unsure.gif
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
As it turns out I misunderstood what my friend told me, He never actually had a working demo, just some theories on how it could be done. This thread was initially about how to possible implement a hypervisor and run gba roms from slot1 not what my so called friend had made.
 

cory1492

Well-Known Member
Member
Joined
Jun 23, 2005
Messages
1,497
Trophies
1
Location
Home, WhereElse?
XP
334
Country
Canada
what my so called friend had made.
rofl2.gif

I for one always knew it would be a possibility, but I'd not expect some/many games to run properly even using paged memory and some kind of instruction interpreter. Having 32MiB of RAM right on the proper bus will likely always be the best way to go about doing it, even if the end result is playing GBA in DS mode.

One dumb question, that I never bothered to look into... is the GBA bios available in DS mode or would that have to be emulated in some fashion as well?
 

Opium

PogoShell it to me ™
Former Staff
Joined
Dec 22, 2002
Messages
8,202
Trophies
0
Age
36
Location
Australia
Website
www.gbatemp.net
XP
1,163
Country
Australia
So it does seem there have been misunderstandings. This changes the original story a lot.

It is unfortunate that it played out like this, but these things happen. Sorry for the confusion caused by the front page story, at the moment is is not something that has been done but, it is simply one theory of how it might be achieved.

I'll update the story. Once again sorry for the muck-up.
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
what my so called friend had made.

rofl2.gif

I for one always knew it would be a possibility, but I'd not expect some/many games to run properly even using paged memory and some kind of instruction interpreter. Having 32MiB of RAM right on the proper bus will likely always be the best way to go about doing it, even if the end result is playing GBA in DS mode.

One dumb question, that I never bothered to look into... is the GBA bios available in DS mode or would that have to be emulated in some fashion as well?

The GBA bios isn't available in nds mode but you can have a custom bios running on the arm9 which would mean you could load up the gba bios assuming there isn't any problems relating to timing etc which would need to be recoded.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
The GBA bios isn't available in nds mode but you can have a custom bios running on the arm9 which would mean you could load up the gba bios assuming there isn't any problems relating to timing etc which would need to be recoded.

Unless DS games don't use their BIOS routines this would be a problem. The two aren't compatible with each other; you can't have one which is compatible with both because some of the SWI assignments have changed. If you load a custom BIOS to play GBA games then you can forget about playing DS games. I don't know what switching BIOSes is like but I imagine it's not such a painless procedure that you'd want to do it every time you decided to go between DS and GBA games.
 

Normmatt

Former AKAIO Programmer
OP
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,206
Country
New Zealand
The GBA bios isn't available in nds mode but you can have a custom bios running on the arm9 which would mean you could load up the gba bios assuming there isn't any problems relating to timing etc which would need to be recoded.

Unless DS games don't use their BIOS routines this would be a problem. The two aren't compatible with each other; you can't have one which is compatible with both because some of the SWI assignments have changed. If you load a custom BIOS to play GBA games then you can forget about playing DS games. I don't know what switching BIOSes is like but I imagine it's not such a painless procedure that you'd want to do it every time you decided to go between DS and GBA games.

iirc DSLinux uses a custom bios, It works by setting a custom arm9 bios address to 00000000 which gets reset to the default FFFF0000 on reset so there isn't any need to worry about breaking your nds.
 

Exophase

Active Member
Newcomer
Joined
Jan 22, 2008
Messages
39
Trophies
0
XP
244
Country
United States
The GBA bios isn't available in nds mode but you can have a custom bios running on the arm9 which would mean you could load up the gba bios assuming there isn't any problems relating to timing etc which would need to be recoded.

Unless DS games don't use their BIOS routines this would be a problem. The two aren't compatible with each other; you can't have one which is compatible with both because some of the SWI assignments have changed. If you load a custom BIOS to play GBA games then you can forget about playing DS games. I don't know what switching BIOSes is like but I imagine it's not such a painless procedure that you'd want to do it every time you decided to go between DS and GBA games.

iirc DSLinux uses a custom bios, It works by setting a custom arm9 bios address to 00000000 which gets reset to the default FFFF0000 on reset so there isn't any need to worry about breaking your nds.

You're right, I didn't notice that there was an option to switch between the two vector bases. Unfortunately this means giving up the first 16KB of ITCM for the GBA BIOS.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Jayro @ Jayro: Thanks for that bundle, I had the games already but got all the DLC for them for just $5. What a... +1