-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXINAGA_Audio.c
106 lines (98 loc) · 2.22 KB
/
XINAGA_Audio.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include "Xinaga.h"
#if defined(__APPLE2__)
//#pragma code-name (push, "LOWCODE")
#endif
#if defined (__NES__)
#pragma code-name (push, "XINAGA_AUDIO")
#pragma rodata-name (push, "XINAGA_AUDIO")
//#pragma data-name (push, "XRAM")
//#pragma bss-name (push, "XRAM")
#endif
//void PlaySong(byte index)
//{
//index;
//}
//void StopSong(void)
//{
//}
//byte soundData[1];
//unsigned char rawData[1];
/*
byte soundData[64] = {
0, 1, 2, 3, 4, 5, 6, 7,
0, 1, 2, 3, 4, 5, 6, 7,
0, 1, 2, 3, 4, 95, 96, 7,
0, 1, 92, 3, 4, 5, 6, 7,
0, 1, 2, 32, 4, 255, 6, 7,
0, 1, 2, 3, 4, 5, 96, 7,
0, 91, 2, 3, 4, 35, 6, 7,
0, 1, 62, 3, 4, 25, 6, 7
};
unsigned char rawData[16*8] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
*/
//void MakeSound()
//{
/*
int x;
for (x = 0; x < 16*8; x++)
{
if (x & 32)
rawData[x] = 255;
else
rawData[x] = 0;
}
*/
//}
//void PlaySound(int length, int freq)
//{
//length;
//freq;
/*
#if defined (__APPLE2__)
int count;
int x, y, repeat;
byte* reg = (byte*) 0xC030;
byte* data = (byte*) 0x0;
MakeSound();
for (repeat = 0; repeat < length; ++repeat)
for (count = 0; count < 16*8; ++count)
{
byte temp = rawData[count];
for (x = 0; x < 8; ++x)
{
if(temp & 1)
{
--reg[0];
for (y = 0; y < freq; ++y);
}
else
{
//for (y = 0; y < freq; ++y);
}
temp = temp >> 1;
}
}
#endif
#if defined (__C64__)
length;
freq;
#endif
*/
//}