News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Shining

Soundtrakker and SDCC

Started by Shining, 07:19, 15 September 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shining

Hi all,


I'm struggling with including a soundtrakker-tune into my sdcc-project. Playing the tune messes my C-Code and vice versa.


The music is compiled with soundtrakker 128 in raw-mode at 0x4000 (until 0x563A) and my C-Code starts at 0x6000.


I call the player using inline-assembler at 0x4003.


Is the soundtrakker-player using ram outside its compiled section ?
Do I have to push/pop registers by myself before calling the player ?


(I've testet with starkos, this seemed to work as expected. But my compositions were made using soundtrakker)
TGS is back

Download my productions at:
cpc.scifinet.org

arnoldemu

Quote from: Shining on 07:19, 15 September 14
Hi all,


I'm struggling with including a soundtrakker-tune into my sdcc-project. Playing the tune messes my C-Code and vice versa.


The music is compiled with soundtrakker 128 in raw-mode at 0x4000 (until 0x563A) and my C-Code starts at 0x6000.


I call the player using inline-assembler at 0x4003.


Is the soundtrakker-player using ram outside its compiled section ?
Do I have to push/pop registers by myself before calling the player ?


(I've testet with starkos, this seemed to work as expected. But my compositions were made using soundtrakker)
I don't think I've used soundtrakker with SDCC. But assume you need to push/pop registers before calling player.
I would also di/ei around the player too.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Shining

Thanks, push/pop did the job. Cause I'm calling the player within irq, also interrupts are disabled.


So my old tunes play fine in sdcc now  ;D .
TGS is back

Download my productions at:
cpc.scifinet.org

TFM

The soundtrakker player does EI's so you have to get rid of them by hand in case the interrupts are supposed to stay off!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Powered by SMFPacks Menu Editor Mod