gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > UAE open source Amiga emulator

#74814 - Raventyr - Tue Mar 07, 2006 10:57 pm

http://www.freiburg.linux.de/~uae/

Please oh please, somebody make a DS port of UAE. Check out the Amiga specs in the link below, I beleive that the DS could handle it.


http://roger.trideja.com/amiga/

Scroll down the page for some game screenshots.

#74971 - TheChuckster - Thu Mar 09, 2006 3:32 am

Ouch. 32-bit processor.

#75054 - tepples - Thu Mar 09, 2006 9:18 pm

If the MC68000 makes the Amiga 32-bit then the Sega Genesis is 32-bit too.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#75169 - octopusfluff - Fri Mar 10, 2006 7:08 pm

tepples wrote:
If the MC68000 makes the Amiga 32-bit then the Sega Genesis is 32-bit too.

Tho, there's lots of things to focus on in a given platform to determine if it's "32-bit". CPU, bus widths, graphics color depths..

The 'x-bit' label in the console industry has historically been significantly useless for describing properties of the console itself, or comparing relative power.

In this instance, the MC68000 is a 16/32bit processor, but that specific model only allowed for a 16bit data bus, and a 24bit address bus. (Later models in the series could accomodate 32bit data and address buses)

So the MC68000 itself is a 32-bit processor.. That doesn't necessarily make the -system- a '32-bit' platform.

#75183 - Raventyr - Fri Mar 10, 2006 9:22 pm

So in theory its possible right ?

#75185 - octopusfluff - Fri Mar 10, 2006 9:39 pm

Raventyr wrote:
So in theory its possible right ?


In theory, sure. Theory can encompass a lot of things, tho. Whether it's practical or not requires a judgement call from someone intimately familiar with both the host and target platform.

Really, you'll just have to wait until someone interested in doing it decides to try it.

#75220 - Darkflame - Sat Mar 11, 2006 1:53 am

Yeah..but if it ever happens, let me know, Id love to play the Mercenary sequals on it ;)
(Damocles, Dion)

#75267 - GPFerror - Sat Mar 11, 2006 5:44 pm

tried to do a quick port today of the dreamcast version of UAE4ALL

its almost compiled, but gets to linking stage and

Code:
linking uae4ds.elf
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(timer.o): In function `_gettimeofday_r':
: warning:
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(signalr.o): In function `_kill_r':
: warning:
c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: address 0x2a8e950 of uae4ds.elf section .bss is not within region ewram make: *** [uae4ds.elf] Error 1



So its using to much memory Im not sure how much over it is though and whether it can be reduced for the ds or not.

Troy(GPF)
http://gpf.dcemu.co.uk

#75335 - wintermute - Sun Mar 12, 2006 6:42 am

almost 7 megs, ouch
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#75342 - GPFerror - Sun Mar 12, 2006 7:54 am

wintermute wrote:
almost 7 megs, ouch


yeah just for my knowledge how do I look at that error message and figure out that?

Also could I switch my link script from ds_arm9.specs to ds_cart.specs and use the memory of a flashcard to get around this error.

I tried that but was running into problems with it saying

Code:
linking uae4ds.elf
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(timer.o): In function `_gettimeofday_r':
: warning:
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(signalr.o): In function `_kill_r':
: warning:
c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: error: no memory region specified for loadable section `.itcm'
make: *** [uae4ds.elf] Error 1


So I tried to edit the ds_cart.ld file and add the .itcm section from the ds_arm9.ld file and a tried changing a couple of other readonly sections to use the rom memory as well.

but in the end I couldnt get past this error

Code:
linking uae4ds.elf
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(timer.o): In function `_gettimeofday_r':
: warning:
c:/dev/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(signalr.o): In function `_kill_r':
: warning:
c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: address 0x382dc44 of uae4ds.elf section .data is not within region iwram
c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: address 0x940c74 of uae4ds.elf section .bss is not within region iwram
make: *** [uae4ds.elf] Error 1


here is the ds_cart.ld script i ended with maybe someone can fix it or I can just give up :)

http://www.rafb.net/paste/results/xFoeG389.nln.html

Thanks,
Troy(GPF)
http://gpf.dcemu.co.uk

#75361 - Raventyr - Sun Mar 12, 2006 3:38 pm

I'm no programmer, but didn't the amiga 500 only have 512k of memory ?

#75365 - sonny_jim - Sun Mar 12, 2006 4:03 pm

Well yes, but think about it:

It's an emulation. It'll need enough memory to hold the code to convert amiga software to the ds and have 512k for the emulated amiga ram, plus other emulated bits and bobs (I'm guessing even stuff like floppy emulation and video will take up more room as well)

Not to sound like a total arse, but you were given a brain, use it.

#75367 - tepples - Sun Mar 12, 2006 4:10 pm

I'm guessing that the rest consists of emulator code, video memory, caches of bitmaps converted to native format, etc.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#75379 - wintermute - Sun Mar 12, 2006 4:54 pm

GPFerror wrote:
wintermute wrote:
almost 7 megs, ouch


yeah just for my knowledge how do I look at that error message and figure out that?


This portion of the error.

Code:

c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: address 0x2a8e950 of uae4ds.elf section .bss is not within region ewram


0x2a8e950 - 0x2400000 = 0x68e950 = 6875472 = ~6.56megs

Quote:

Also could I switch my link script from ds_arm9.specs to ds_cart.specs and use the memory of a flashcard to get around this error.


no, the ds_cart linkscript is for arm7.

I'm doing some work on a loader/linkscript combination which will allow for this scenario. It's a bit tricky though.

Quote:

So I tried to edit the ds_cart.ld file and add the .itcm section from the ds_arm9.ld file and a tried changing a couple of other readonly sections to use the rom memory as well.


The arm7 doesn't have itcm.

Quote:

http://www.rafb.net/paste/results/xFoeG389.nln.html


pasting links to rafb in here is useless they're not permanent. In any case the ds_cart.ld script is for arm7.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#75421 - Darkflame - Sun Mar 12, 2006 8:50 pm

tepples wrote:
I'm guessing that the rest consists of emulator code, video memory, caches of bitmaps converted to native format, etc.


Given the size of a single DS screen couldn't video memory be reduced a lot?

How much processing power would be spare in all this? Could on-the-fly compression be used?
(I mean, a extremely simply one that says colour x 16 pixels, rather then lists the colour 16 times to make 16 dots)

I am very ignorant of the way Amiga's though, these are just random ideas.

#75424 - tepples - Sun Mar 12, 2006 9:07 pm

Darkflame wrote:
tepples wrote:
I'm guessing that the rest consists of emulator code, video memory, caches of bitmaps converted to native format, etc.

Given the size of a single DS screen couldn't video memory be reduced a lot?

Not if the Amiga programs being emulated expect to be able to write to a given size screen.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#75477 - GPFerror - Mon Mar 13, 2006 6:42 am

wintermute wrote:
GPFerror wrote:
wintermute wrote:
almost 7 megs, ouch


yeah just for my knowledge how do I look at that error message and figure out that?


This portion of the error.

Code:

c:\dev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\bin\ld.exe: address 0x2a8e950 of uae4ds.elf section .bss is not within region ewram


0x2a8e950 - 0x2400000 = 0x68e950 = 6875472 = ~6.56megs


thanks iv been wondering how to do that for awhile now.


wintermute wrote:
GPFerror wrote:

Also could I switch my link script from ds_arm9.specs to ds_cart.specs and use the memory of a flashcard to get around this error.


no, the ds_cart linkscript is for arm7.

I'm doing some work on a loader/linkscript combination which will allow for this scenario. It's a bit tricky though.


awesome news, look forward to it. Iv got a couple of ports that will hopefully compile in the future :)

thanks,
Troy(GPF)
http://gpf.dcemu.co.uk

#75496 - agentq - Mon Mar 13, 2006 2:56 pm

I doubt that UAE code compiles that large, it seems more likely that something is wrong with the build. Either a compiler error, or some large arrays or something.

ScummVM, even with 7 or 8 full game engines, doesn't come up as large as 6.56Mb.

#75580 - Durandle - Tue Mar 14, 2006 10:17 am

Correct me if I'm wrong but didn't the Amiga have dedicated chips for just about everything, which is why they were quite good for games at the time? I wouldn't think the DS is powerful enough to emulate all the hardware needed to run stuff - but I'd love to be proved wrong.

#75610 - GPFerror - Tue Mar 14, 2006 5:14 pm

agentq wrote:
I doubt that UAE code compiles that large, it seems more likely that something is wrong with the build. Either a compiler error, or some large arrays or something.

ScummVM, even with 7 or 8 full game engines, doesn't come up as large as 6.56Mb.


Yeah its probably a large array, I guess. I havent really looked at the code, except enough to change things that i know have to be changed mainly filesystem stuff. and fix compile errors, so your guess is as good as mine as to whats taking up so much space. Would be glad to share what i did if someone else wants to attempt to fix the problem.

Troy(GPF)
http://gpf.dcemu.co.uk

#75647 - stan - Tue Mar 14, 2006 10:35 pm

UAE requires a fairly powerful computer to run Amiga 500 games at normal speed (I guess something around 500 MHz at least). I really don't think it could be useful on DS. Maybe the simplest games could run, without sound...

#75663 - agentq - Wed Mar 15, 2006 12:33 am

Get gcc to spit out a map file, and then you'll be able to see where the big stuff is by looking through the file.

I'm using the following parameter passed to gcc to produce the file:
Code:
-Wl,-Map,map.txt

#75787 - GPFerror - Wed Mar 15, 2006 11:58 pm

agentq wrote:
Get gcc to spit out a map file, and then you'll be able to see where the big stuff is by looking through the file.

I'm using the following parameter passed to gcc to produce the file:
Code:
-Wl,-Map,map.txt


yeah i have that already, is there a way to sort it by size? Also im not exactly sure what im looking at :)

Troy(GPF)

#75789 - wintermute - Thu Mar 16, 2006 12:05 am

Code:

arm-elf-nm --size-sort <elf file>

_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#75790 - GPFerror - Thu Mar 16, 2006 12:30 am

wintermute wrote:
Code:

arm-elf-nm --size-sort <elf file>


the problem is the elf file hasn't been built yet.

ah ok Wintermute told me it can be used for object files as well

arm-elf-nm --size-sort *.o >out

Still this is just an exercise in futility, doubt that even if i can get it working it would run at an acceptable speed.

#75793 - Darkflame - Thu Mar 16, 2006 1:23 am

People did think Snes on the GBA was impossible.
And decent film playback on the DS was impratical.

I think its at least worth getting around the size problem, to a stage where speed/framerate can be tested.

THAT SAID...purhapes it is a good idea to not do things that cant be done, when theres things that certainly can be done in devlopment. (*cough*Frodo*cough*)

#75831 - Durandle - Thu Mar 16, 2006 10:19 am

Indeed, for example, having the SNESDS updated! :P Works so well it's a shame to see it stop being updated.

However, with some clever ARM ASM optimisation I'd imagine that UAE could get at least something like playable speeds... we won't now until its tried ^_^

#76928 - jarrydn - Sun Mar 26, 2006 9:26 am

You'd probably have a better chance at porting AROS, or running it over the top of DSLinux.

http://www.aros.org

Personally, I don't see any point in trying to get UAE to run on the DS. Don't forget, many of the Amiga games were pretty keyboard intense. Using the touchscreen for full-blown keyboard input would surely suck :P.

That, and all the custom chips that were used for handling the graphics and sound, and stuff like FDD emulation (as mentioned earlier) would take up too much memory/CPU.

#111160 - Lord Raptor - Mon Dec 04, 2006 3:53 pm

Any news about this ?

8 months passed. Maybe a miracle occured ? :)

#111161 - OOPMan - Mon Dec 04, 2006 4:06 pm

You would have heard about it if it did.

Try not to necropost :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#111479 - sniper - Wed Dec 06, 2006 11:45 pm

The Amiga 500 is not that powerful (68K@7mhz and 512kb/1MB RAM) but has some custom chips for Video/Audio FX and DMA/Floppy which are difficult to emulate and synchronize. I think UAE will not run in full speed without JIT and yes RAM is another problem...

Here is a amiga game database: http://hol.abime.net/1166

#111542 - Lord Raptor - Thu Dec 07, 2006 12:12 pm

DS has 4MB of RAM (but of course, not all of it is available), and on Amiga 500, 512KB was enough for 99% of the games...

In fact, Amiga 500 doesn't seem to be more powerful than the Sega Genesis/Megadrive.

Main CPU
Amiga : Motorola 68000 @7.19 MHz
Genesis : Motorola 68000 @7.6 MHz
Sound CPU
Amiga : Paula
Genesis : Zilog Z80 @3,58 MHz, Yamaha YM2612 FM @7.67 MHz, SN76489 PSG @3,58 MHz
Video CPU
Amiga : Denise/Agnus
Genesis : VDP 16 bits

That's why I wondered if it was possible to emulate Amiga on DS , as Genesis is emulated today...

#111551 - tepples - Thu Dec 07, 2006 5:12 pm

Lord Raptor wrote:
In fact, Amiga 500 doesn't seem to be more powerful than the Sega Genesis/Megadrive.

[snip]
Video CPU
Amiga : Denise/Agnus
Genesis : VDP 16 bits

AFAIK, "Denise/Agnus" is more powerful than the Sega video chip.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#111562 - sniper - Thu Dec 07, 2006 6:58 pm

Yes some stuff is not so easy to emulate like copperlists and sound dma.
Its possible but the problem is UAE want the most compatibility and that means - slow.

#111706 - Drood - Sat Dec 09, 2006 6:27 am

The original A500 had 512k ram, but the fact of the matter is, to do anything useful with an emulator you'd need to emulate at least one megabyte. Half meg ceased being useful by 1990.

And the Amiga is a LOT more complex than a Genesis. I could run a Genesis emulator on my old P166 WITH SOUND without issue. Full framerate in most cases.

I couldn't run UAE with sound at a playable state on my 800mhz system.

Without sound though, it was fine.

I'd love an emulator on the DS, if only to read old Grapevine magazines on the go.

#111892 - Methanoid - Mon Dec 11, 2006 1:18 pm

Why not try for the Atari ST first... the Amiga demands more power cos of the various custom chips (Paula for Sound, Agnus for graphics, a Blitter co-pro) but the ST is more basic and most games are pretty similar.

Then IF an ST port works look at AMiga next?