SD card MOD S3M soundtrack player on PIC32

Show off your projects to others!
fulvio
Posts: 19
Joined: Tue Nov 29, 2011 5:16 am

Re: Amiga MOD soundtrack file player on PIC32

Post by fulvio » Fri Dec 02, 2011 11:17 pm

Getting the following with Board: UNO32 and the smallest MOD file "NTRONIC3.MOD.h"

Code: Select all

/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/bin/ld: Not enough space to allocate both stack and heap.  Reduce heap and/or stack size.
collect2: ld returned 1 exit status
This was compiling fine with the old upload mod32.zip

serveurperso
Posts: 36
Joined: Tue Sep 13, 2011 5:55 am
Location: Paris
Contact:

Re: Amiga MOD soundtrack file player on PIC32

Post by serveurperso » Sat Dec 03, 2011 12:25 am

lol RAM is full, just reduce the soundbuffer to 512 (now the default value) :D
(French user) English is not my native language, please forgive my mistakes.

fulvio
Posts: 19
Joined: Tue Nov 29, 2011 5:16 am

Re: Amiga MOD soundtrack file player on PIC32

Post by fulvio » Sat Dec 03, 2011 1:06 am

serveurperso wrote:lol RAM is full, just reduce the soundbuffer to 512 (now the default value) :D
Ouch! Thought that may be the case. I think SD Card functionality needs to be implemented at some point. :)

serveurperso
Posts: 36
Joined: Tue Sep 13, 2011 5:55 am
Location: Paris
Contact:

Re: Amiga MOD soundtrack file player on PIC32

Post by serveurperso » Sat Dec 03, 2011 8:56 am

.MOD with 8ch are uncommon (you have MUSHROOM.MOD in mods.zip), 16 are very very very uncommon (I never saw 16ch MOD, I have only one 32ch MOD on all my collection.),

#define MAXCHANNELS 16

it is possible to free a lot of RAM here (down to 8 or 4 ch), 90% of the ram is used by essentials arrays xxxxxxxxxx[MAXCHANNELS].
(French user) English is not my native language, please forgive my mistakes.

fulvio
Posts: 19
Joined: Tue Nov 29, 2011 5:16 am

Re: Amiga MOD soundtrack file player on PIC32

Post by fulvio » Sun Dec 04, 2011 12:03 pm

serveurperso wrote:.MOD with 8ch are uncommon (you have MUSHROOM.MOD in mods.zip), 16 are very very very uncommon (I never saw 16ch MOD, I have only one 32ch MOD on all my collection.),

#define MAXCHANNELS 16

it is possible to free a lot of RAM here (down to 8 or 4 ch), 90% of the ram is used by essentials arrays xxxxxxxxxx[MAXCHANNELS].
I changed MAXCHANNELS to be 16 and now they all compile fine.

How possible is it to integrate SD card functionality? You would obviously need to have a 3.3v SD Shield that is compatible with the chipKIT series.

So far I am incredibly grateful for what you have achieved. Good on you!

serveurperso
Posts: 36
Joined: Tue Sep 13, 2011 5:55 am
Location: Paris
Contact:

Re: Amiga MOD soundtrack file player on PIC32

Post by serveurperso » Sun Dec 04, 2011 7:48 pm

Hi, SDCard is just SPI ... I never use shields I prefer generic 2.54 pin breakout board + F/F black/red/yellow jumper wires :)

I ordered this last week (soon at home:) http://www.dfrobot.com/index.php?route= ... uct_id=163

Pascal
(French user) English is not my native language, please forgive my mistakes.

amiarts
Posts: 19
Joined: Sun Nov 27, 2011 11:05 am
Location: Dresden Germany
Contact:

Re: Amiga MOD soundtrack file player on PIC32

Post by amiarts » Wed Dec 07, 2011 1:18 am

At the latest there you are with the same problem that the SD Library read only the first 32 KB of a file.

I have belonged to myself just a few old MODs. Really cool!!!

Greeting René

fulvio
Posts: 19
Joined: Tue Nov 29, 2011 5:16 am

Re: Amiga MOD soundtrack file player on PIC32

Post by fulvio » Wed Dec 07, 2011 1:44 am

amiarts wrote:At the latest there you are with the same problem that the SD Library read only the first 32 KB of a file.

I have belonged to myself just a few old MODs. Really cool!!!

Greeting René
You've made a good point, unfortunately that is the case for SD Card shields as well. Also with Arduino clones that have SD card functionality built onboard like this one that I have:

http://www.jaycar.com.au/productView.as ... rm=KEYWORD

I wonder whether there's a way to allow more than 32KB of a file when accessed from SD.

fulvio
Posts: 19
Joined: Tue Nov 29, 2011 5:16 am

Re: Amiga MOD soundtrack file player on PIC32

Post by fulvio » Wed Dec 07, 2011 1:49 am

serveurperso wrote:Hi, SDCard is just SPI ... I never use shields I prefer generic 2.54 pin breakout board + F/F black/red/yellow jumper wires :)

I ordered this last week (soon at home:) http://www.dfrobot.com/index.php?route= ... uct_id=163

Pascal
Has your SDCard module arrived yet!? :)

amiarts
Posts: 19
Joined: Sun Nov 27, 2011 11:05 am
Location: Dresden Germany
Contact:

Re: Amiga MOD soundtrack file player on PIC32

Post by amiarts » Wed Dec 07, 2011 2:00 am

Nothing deals with the hardware. It is a software error which I have already described here in the forum.
http://www.chipkit.org/forum/viewtopic.php?f=7&t=587

Post Reply