Dreamcast's ARM CPU

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
BlackAura
DC Developer
DC Developer
Posts: 9951
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Dreamcast's ARM CPU

Post by BlackAura »

Couple of questions about the ARM CPU in the Dreamcast.

1 - What kind of CPU is it? I'm pretty sure it's from the same family as the Gameboy Advance's main CPU, but I'm not really sure what model it is.

2 - What clock speed does it run at? I've found the clock speed the AICA runs at, but I'm pretty sure that the ARM is not that fast. I thought it was somewhere around 20MHz

3 - Anyone know where I can find any emulators/simulators for it? Aside from trying to rip one out of a GBA emulator.

Basically, I want to try to code a couple of things on the ARM CPU, without worrying too much about how it interacts with the Dreamcast (for the moment), so I can see if it's fast enough, and get the basic program working first.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

I think you be the first to have a crack at that apart from the dsnes team best bet i think would be to ask them
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

1. The ARM processor is an ARM7, which I believe is the same as in the GBA
2. Not quite sure on the speed... But it is slow....
3. I dunno, a GBA emu would probably be the most likely place, but you could try a search on the net for one...
polochon
DCEmu Respected
DCEmu Respected
Posts: 221
Joined: Sun Feb 03, 2002 3:52 pm
Location: France
Has thanked: 0
Been thanked: 0
Contact:

Post by polochon »

Well I found that on this site : http://www.vortexonline.com/previews/dr ... part5.html


The Yamaha Connection

Sega went back to Yamaha, arguably one of the leaders in synthesized audio, and makers of the Saturn audio subsystem, to design the sound subsystem for the Dreamcast. Yamaha answered with a two ton gorilla of a sound board.


The audio subsystem in the Dreamcast is made up of two chips: the ARM7 (32-bit RISC) and a DSP. Together these two chips make up what's called the Yamaha AICA. Coupled with 2mb of sound RAM, the Dreamcast?s audio system is a force to be reckoned with.

ARM7

The ARM7 is at the core of AICA. It has a clock speed of 45mhz and a rating of 40mips (more then the SH-2 that is the main CPU of the Saturn). ARM7 was actually licensed by Yamaha from the British company Advanced RISC Machines. The specific version of the ARM7 is the ARM7TMDI, which was designed with music and effects in mind.


One very important feature the ARM7TMDI has is hardware ADPCM
compression. The CPU will never be burdened decompressing sounds. This means the Dreamcast can actually store eight megs of sound files in the two megs of sound ram it possesses, with out any quality loss.

DSP

The Dreamcast is the first console ever to feature a DSP (Digital Sound
Processor). This means that if a developer wants a certain scene to have the sounds of a large theater room, the Dreamcast can emulate it. Imagine how much this will add to your games (think Metal Gear Solid).
One thing that this doesn?t do, is provide Dolby Digital support. To do this, Sega would have had to license the decoder technology from Dolby Digital Labs, and put coaxial or optical outputs on the Dreamcast, which would raise the price of the system.


Unfortunately, gamers will have to wait until Dreamcast2 comes out before they get to enjoy their games in 5.1 audio. On the plus side, you can still listen in Dolby Surround.




So it's an ARM7TDMI :wink:

There's some technical reference manual here : http://www.arm.com/arm/TRMs?OpenDocument

I think this one is the more interesting :wink: :

http://www.arm.com/techdocs/5GVEYM/$Fil ... DMI_R4.zip

maybe there's also some infos on this site :http://www.arm.linux.org.uk/developer/

2) for the speed I don't really know but this part from this doc (http://hitmen.c02.at/hitdc/aica_v08.txt) said that :
// ----------------------------------------------------------------------------
// 0x28a8 - ARMClock - GUESS
+--------------+
| 31-8 | 7-0 |
| n/a | mhz |
+--------------+

mhz: sets the speed of the ARM7 CPU in MHz steps.
00 = 1 MHz, 24 = 25 MHz
don't try to overclock the ARM7 it may get burned or something.


// ----------------------------------------------------------------------------




3) maybe a pocket PC emu could help too, this one for example : http://www.zophar.net/ppc/snes.html
Le site sur l'?mulation dreamcast en fran?ais c'est http://www.dcreload.fr.st

oggy aka polochon ;)
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

SO if any of us had the skill perfect sound and speed emu's are not fiction but fact

8 meg compressed sounds like the way to go allowing larger romsets

hmmmm
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
polochon
DCEmu Respected
DCEmu Respected
Posts: 221
Joined: Sun Feb 03, 2002 3:52 pm
Location: France
Has thanked: 0
Been thanked: 0
Contact:

Post by polochon »

I do more investigation and I found that the gba had the type of cpu as the dreamcast .
see

http://www.goldroad.co.uk/downloads.html

My macro assembler for the ARM7DTMI, for more information on this item,visit the link on the main page


Also this links could help in ARM assembler programming :
http://www.heyrick.co.uk/assembler/index.html
Le site sur l'?mulation dreamcast en fran?ais c'est http://www.dcreload.fr.st

oggy aka polochon ;)
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

reaper2k2 wrote:SO if any of us had the skill perfect sound and speed emu's are not fiction but fact

8 meg compressed sounds like the way to go allowing larger romsets

hmmmm
Actually no, since the codec abilities are in reference to sound. Kind of like some systems can use compressed textures. It's still 2 megs of sound RAM. That and I don't believe ferrying the data across would be feasible. Kind of like how VRAM can't be used due to the piss-poor bus speeds.
No signature.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

well BLEEM GT2 was pretty dam good none of us come close to that skill so i would say there is much more power then we know

OR will ever find

dont know to you try but ill take your word on it
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Actually, I was wondering if I could use it to get a simple sound emulator running. I know that it's nowhere near fast enough to emulate a SNES's SPC700 (which is a CPU, sample player and DSP all in one), which is what the DreamSNES team tried, but I was thinking more along the lines of just the sound output part, and not for a system as complex as a SNES. Any kind of MP3 decoder, or anything like that, is probably a little too much for it to cope with.

After Googling for a bit, I've also come to the conclusion that it's probably a ARM7DTMI, as used in the GBA. 45MHz sounds like a lot more than I was expecting though. I seem to remember that it doesn't run at the same clock speed as the sound hardware itself.

Anyway, I thought it might be worth investigating. Even if I could only get it working at 11025Hz, it'd still leave more time for the SH-4 to emulate the main system. And if it's do-able for one sound system, it might be doable for others too.
polochon wrote:One very important feature the ARM7TMDI has is hardware ADPCM
compression. The CPU will never be burdened decompressing sounds. This means the Dreamcast can actually store eight megs of sound files in the two megs of sound ram it possesses, with out any quality loss.
I knew that - nxDoom actually compresses the sound effects when it loads them, but because they're 8-bit instead of 16-bit, you can only fit about 3.7MB of sounds in there. It's something more like 7.8MB if you're using 16-bit sound sources though.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

Well thats some good news 7.8 meg of space im not using!
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
mkjones
DCEmu Nutter
DCEmu Nutter
Posts: 945
Joined: Fri Jan 03, 2003 5:40 am
Location: Dead in the Water
Has thanked: 0
Been thanked: 0
Contact:

Post by mkjones »

OFF TOPIC BUT - anyone know what processor the PS2 runs? branding i mean?
Dust on the Dreamcast
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

The Emotion Engine is a custom MIPS
No signature.
mkjones
DCEmu Nutter
DCEmu Nutter
Posts: 945
Joined: Fri Jan 03, 2003 5:40 am
Location: Dead in the Water
Has thanked: 0
Been thanked: 0
Contact:

Post by mkjones »

The Emotion Engine is a custom MIPS
yeh i knew it was the Emotion, but did Sony make it? all on there own?
Dust on the Dreamcast
Sanchez
DCEmu Ex-Admin
DCEmu Ex-Admin
Posts: 1098
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by Sanchez »

It's a customized version of the MIPS R5900. The VUs (vector units) are custom I believe.
"This is worse than when the Raccoon got in the copier!"
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by reaper2k2 »

PS2 is a bit offtopic!
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Rand Linden
bleemcast! Creator
bleemcast! Creator
Posts: 882
Joined: Wed Oct 17, 2001 7:44 pm
Location: Los Angeles, CA
Has thanked: 0
Been thanked: 0
Contact:

Post by Rand Linden »

Using AICA for sound is definitely possible ;-)

... but it's a significant undertaking, and classifying it as "complicated" is a major understatement.

There are some MAJOR restrictions on what can be done with the hardware, and in addition, AICA runs on the G1 bus, so any amount of data transfer beyond minimal is pretty much out.

Also, there's no cache, and as such, all instructions run from memory -- which is SLOW.... as in SLOW SLOW SLOW.

Oh, and it's not an ARM7TDMI -- there's no Thumb and there's no Multiplier logic... there *may* be the Debug logic, but I'm not sure.

There is an embedded DSP to do all sorts of awesome stuff, but it's an order of magnitude more complicated than the rest of the AICA -- basically, it makes the ARM side of stuff look like a cakewalk.

As for the touted "compression" of 8Megs from 2Megs -- If you convert all your samples to 4bit, that means *at most* you can fit 4Meg samples in the 2Megs of RAM.

If your samples started out at 16bit, you're still only storing 4bits of the original 16bits -- sure, you're storing more samples, but at a major cost in quality. Yes, ADPCM filtering smooths out a lot of the noise, but it still isn't close to the same quality.

ADPCM is great for some things, but as a "generic" compression, no -- think "majorly low-resolution JPEG" and you'll have a good idea of what it's like.

All that being said, a sound system is definitely feasible -- it all depends on how much time you want to spend on it... If you're looking for a research project that'll suck huge amount of time and have little progress to show for it, this is the one.

Rand.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

I thought as much. I certainly didn't expect it to be very easy, but thought it might be worth investigating.

ADPCM does tend to sound terrible in some cases. Using it for sound effects in Doom was alright, since they were pretty terrible to begin with, but a lot of the sounds get kinda distorted. The only reason I used it there was because some mods had 3MB of sample data, and I couldn't be bothered keeping in in main RAM and transferring it across when needed. And that'd probably be too slow anyway.
mkjones
DCEmu Nutter
DCEmu Nutter
Posts: 945
Joined: Fri Jan 03, 2003 5:40 am
Location: Dead in the Water
Has thanked: 0
Been thanked: 0
Contact:

Post by mkjones »

It's a customized version of the MIPS R5900
Thanks for that, sorry about the off topic :oops:
Dust on the Dreamcast
Post Reply