#29476 - Wriggler - Sat Nov 20, 2004 10:37 pm
Hi guys,
I'm working on a project with another guy, and he's set up all the audio using the Krawall library and compiling it in HAM. I thought I'd try and be clever, and try to compile the thing in DevkitAdv. I don't think I realised what I was getting myself into!
I've changed the batch file which we use to make the project, and (after a while) it compiled in devkitadv. I'm not sure if I did it right though, so that could be messing things up.
Then I replaced the interrupt code with the assembler functions from dovotos tutorial (Day 4 part 2). Well, in fact I've only replaced the VBL one as I have no idea how to set up a timer 0 interrupt!
Anyways, the end result is a rom that compiles, but when I try to add the interrupts nothing happens at runtime. I'm left with a black screen.
Here's the first part of sound.c. I hope you can see what I'm trying to do. To be honest, I'm not entirely sure myself so any help would be greatly appreciated.
Thanks in advance.
Cheers,
Ben
I'm working on a project with another guy, and he's set up all the audio using the Krawall library and compiling it in HAM. I thought I'd try and be clever, and try to compile the thing in DevkitAdv. I don't think I realised what I was getting myself into!
I've changed the batch file which we use to make the project, and (after a while) it compiled in devkitadv. I'm not sure if I did it right though, so that could be messing things up.
Then I replaced the interrupt code with the assembler functions from dovotos tutorial (Day 4 part 2). Well, in fact I've only replaced the VBL one as I have no idea how to set up a timer 0 interrupt!
Anyways, the end result is a rom that compiles, but when I try to add the interrupts nothing happens at runtime. I'm left with a black screen.
Here's the first part of sound.c. I hope you can see what I'm trying to do. To be honest, I'm not entirely sure myself so any help would be greatly appreciated.
Thanks in advance.
Code: |
// Global var the intrHandler function. int gl_intr = 0; #define INT_TIMER1 0x0010 #define INT_TYPE_TIM1 4 #define INT_TYPE_VBL 0 /****************************************************************************** * Check on the krawall interrupt. ******************************************************************************/ void IrqVBlank(void) { gl_intr++; if (gl_intr == 2) { kramWorker(); gl_intr = 0; } } /****************************************************************************** * Initalise krawall. ******************************************************************************/ void initSound(void) { kragInit(KRAG_INIT_STEREO); //TODO: Replace these HAM interrupts //ham_StartIntHandler(INT_TYPE_TIM1,&kradInterrupt); //ham_StartIntHandler(INT_TYPE_VBL,&intrHandler); //Custom Krawall interrupt setup REG_DISPSTAT = (1<<3); IRQ_Set(1, IrqVBlank); } |
Cheers,
Ben