AICA audio driver in the works
- Juan
- DCEmu Commie
- Posts: 3398
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sun Jun 15, 2003 11:47 pm
- Location: Montevideo
- Has thanked: 39 times
- Been thanked: 3 times
AICA audio driver in the works
Bouz announced that he's working on an AICA audio driver that will be able to process S3M stereo files directly through the sound chip. This should be an improvement to the way the KOS driver handles it, since it uses the main SH4 CPU to treat sound and the AICA co-processor for the balance.
You can get a demo for the driver (ELF file for dc-tool) at DC-France
Source: Dreamcast.es
You can get a demo for the driver (ELF file for dc-tool) at DC-France
Source: Dreamcast.es
- BlueCrab
- 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:
Re: AICA audio driver in the works
Not to put this down or anything, but there have been S3M players running on the ARM before. Granted, 2ndmix is the only thing that ever did such a thing to my knowledge (and sadly, the "source" to the S3M player in there is just a byte array of the ARM opcodes).
Still, its nice to see people trying out new ideas for how to do things on the Dreamcast. If only it were possible to do more interesting sound decoding on the ARM (like OGG). Sadly, I think that would be practically impossible (due to memory constraints (no room for the actual music after putting the decoder in the AICA's RAM), and the crappy bus that the ARM is on).
Still, its nice to see people trying out new ideas for how to do things on the Dreamcast. If only it were possible to do more interesting sound decoding on the ARM (like OGG). Sadly, I think that would be practically impossible (due to memory constraints (no room for the actual music after putting the decoder in the AICA's RAM), and the crappy bus that the ARM is on).
- Christuserloeser
- Moderator
- Posts: 5948
- Joined: Thu Aug 28, 2003 12:16 am
- Location: DCEvolution.net
- Has thanked: 10 times
- Been thanked: 0
- Contact:
Re: AICA audio driver in the works
While I agree with BlueCrab that OGG decompression would be fantastic to see at one point, I think that this is a freakin' sweet release, Bouz!
The only other homebrew that I know that use the AICA would be Neill Corlett's Beats of Rage port and thus OpenBoR:
https://openbor.svn.sourceforge.net/svn ... /dcsound.c
The only other homebrew that I know that use the AICA would be Neill Corlett's Beats of Rage port and thus OpenBoR:
https://openbor.svn.sourceforge.net/svn ... /dcsound.c
Insane homebrew collector.
- BlueCrab
- 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:
Re: AICA audio driver in the works
That code runs on the SH4, not the ARM.Christuserloeser wrote:The only other homebrew that I know that use the AICA would be Neill Corlett's Beats of Rage port and thus OpenBoR:
https://openbor.svn.sourceforge.net/svn ... /dcsound.c
- Christuserloeser
- Moderator
- Posts: 5948
- Joined: Thu Aug 28, 2003 12:16 am
- Location: DCEvolution.net
- Has thanked: 10 times
- Been thanked: 0
- Contact:
Re: AICA audio driver in the works
Hm, okay. - Actually, Beats of Rage uses the AICA's ADPCM decoder I think, not the ARM:
https://openbor.svn.sourceforge.net/svn ... soundmix.c
https://openbor.svn.sourceforge.net/svn ... soundmix.c
Insane homebrew collector.
- Quzar
- Dream Coder
- Posts: 7497
- Joined: Wed Jul 31, 2002 12:14 am
- Location: Miami, FL
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: AICA audio driver in the works
Everything that plays sound uses the aica... it's the only way to do it. The point is to run code other than what is in KOS to run on the arm.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
- PH3NOM
- DC Developer
- Posts: 576
- Joined: Fri Jun 18, 2010 9:29 pm
- Has thanked: 0
- Been thanked: 5 times
Re: AICA audio driver in the works
Good News!BlueCrab wrote:Not to put this down or anything, but there have been S3M players running on the ARM before. Granted, 2ndmix is the only thing that ever did such a thing to my knowledge (and sadly, the "source" to the S3M player in there is just a byte array of the ARM opcodes).
The source code was not lost, entirely!
I have released the source for compiling the S3M player, on the arm processor.
http://www.megaupload.com/?d=0DCD27IG
This is the same example included in kos:
kos\examples\dreamcast\2ndmix
However, the source code for the ARM program was not included,
instead only the compiled header.
There exists a non-compiling LibS3M:
kos-ports\libs3m
I have made a new makefile for the ARM code from LibS3M.
2ndmix\s3mplay\Makefile
This will build the ARM program, stream.drv
Use the custom version of 'bin2c' I have included
2ndmix\s3mplay\bin2c
to convert the stream.drv into s3mplay.h with this command:
bin2c stream.drv s3mplay.h s3mplay
-PH3NOM 2011
- RyoDC
- Mental DCEmu
- Posts: 366
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
Re: AICA audio driver in the works
Can someone please post code containing arm commands
How do I try to build a Dreamcast toolchain:
- PH3NOM
- DC Developer
- Posts: 576
- Joined: Fri Jun 18, 2010 9:29 pm
- Has thanked: 0
- Been thanked: 5 times
Re: AICA audio driver in the works
Research the web, there is a lot of information on ARM language.RyoDC wrote:Can someone please post code containing arm commands
I have been reviewing some information here:
http://simplemachines.it/doc/arm_inst.pdf
Somebody please correct me, this is based off of what I have learned from that document:
This code in c:
Code: Select all
int i=0;
for ( i=0; i<1000; i++ )
;
Code: Select all
__asm__ volatile (
"mov r0, #0;"
"mov r1, #1000;"
"loop:"
"add r0,r0,#1;"
"cmp r0,r1;"
"BLT loop;"
);
- RyoDC
- Mental DCEmu
- Posts: 366
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
Re: AICA audio driver in the works
Pretty typical architecture, in some ways reminds me sh-4.
About an asm code, I'm surprised, I always thought that key 'volatile' can be assigned only to variables, that don't need to be controlled by the program (can't be optimized as well).
And yeah, that symbol of quotes, that we must put before and after each command, it's so inconvenient.
About an asm code, I'm surprised, I always thought that key 'volatile' can be assigned only to variables, that don't need to be controlled by the program (can't be optimized as well).
And yeah, that symbol of quotes, that we must put before and after each command, it's so inconvenient.
How do I try to build a Dreamcast toolchain:
-
- DC Developer
- Posts: 142
- Joined: Thu Apr 03, 2008 7:01 am
- Has thanked: 0
- Been thanked: 4 times
- Contact:
Re: AICA audio driver in the works
The "volatile" flag is there to prevent the compiler from modifying the ASM (for optimization purposes).
- RyoDC
- Mental DCEmu
- Posts: 366
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
Re: AICA audio driver in the works
Omg is that now even possible
Well I know compilers optimizing lot of things now, even throwing away things that must not be thrown in any way, but even assembly...
P.S. Ayla, did you take my apologizes?
Well I know compilers optimizing lot of things now, even throwing away things that must not be thrown in any way, but even assembly...
P.S. Ayla, did you take my apologizes?
How do I try to build a Dreamcast toolchain:
-
- DC Developer
- Posts: 414
- Joined: Thu Aug 20, 2009 11:00 am
- Has thanked: 0
- Been thanked: 2 times
Re: AICA audio driver in the works
Inline assembly is a big pain; I've never cared for how it's handled. It's much better to put all your assembly into a separate .s/.S file - unless you NEED it to be inline, then you're stuck with sucky inline syntax. One of the biggest problems is that ALL inline assembly guides are ONLY x86. Just try to find a guide to inline assembly for SH, for example. You wind up digging through existing source to find examples which never are exactly what you need.
- RyoDC
- Mental DCEmu
- Posts: 366
- Joined: Wed Mar 30, 2011 12:13 pm
- Has thanked: 2 times
- Been thanked: 0
Re: AICA audio driver in the works
Hmm, I can recommend you to look through the WinCE docs, I've seen some help files containing sh4 inline assembly in there.
P.S. Another good tutorial http://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf
P.S. Another good tutorial http://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf
How do I try to build a Dreamcast toolchain:
-
- DC Developer
- Posts: 414
- Joined: Thu Aug 20, 2009 11:00 am
- Has thanked: 0
- Been thanked: 2 times
Re: AICA audio driver in the works
Thanks for the tip. I'll have to check it out.RyoDC wrote:Hmm, I can recommend you to look through the WinCE docs, I've seen some help files containing sh4 inline assembly in there.