*/
#include <memory.h>
#include <video.h>
+#include <dma_snd.h>
#include <config.h>
#include <interrupt.h>
return val;
}
-static void __attribute__((used)) dummy()
+void setup_audio(void)
{
- __asm__("iret");
-}
+ outport(IO_AUDIO_CTRL, AUDIO_4_NOISE | AUDIO_4_ON);
+ outport(IO_AUDIO_NOISE_CTRL, NOISE_RESET | NOISE_ENABLE | 0x2);
+ outport(IO_AUDIO4_VOL, 0x22);
-//__attribute__((naked)) void dummy_isr(void)
-//{
-// __asm__("push %ax\n\t"
-// "push %bx\n\t"
-// "popw %bp\n\t" /* HACK: directly pop bp again */
-// );
-//
-// //unsigned char val = inport(IO_BG_X);
-// //val++;
-//
-// //outport(IO_BG_X, val);
-// //outport(IO_INT_ACK, INT_VBLANK_START);
-// __asm__("pop %ax\n\t"
-// "pop %bx\n\t"
-// );
-//
-// __asm__("iret");
-//}
+}
void setup_ivec(void)
{
setup_ivec();
init_video();
+ setup_audio();
outport(IO_VIDEO_MODE, VMODE_16C_CHK | VMODE_CLEANINIT);
unsigned short base = 0x3000; /* screens pos */
unsigned short sprite_pos = base - (MAP_SIZE*2) - SPR_TABLE_SIZE;