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)
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.
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 .
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!