|
|
|
|
@ -87,13 +87,16 @@ int main(void)
|
|
|
|
|
debug=mmc_init();
|
|
|
|
|
// }
|
|
|
|
|
debug = 2-debug;
|
|
|
|
|
char_to_sound(25);
|
|
|
|
|
|
|
|
|
|
debug = mmc_read_part(1, (unsigned char *) &length, 4);
|
|
|
|
|
debug = 1;
|
|
|
|
|
if(length==0){
|
|
|
|
|
debug = 2;
|
|
|
|
|
}
|
|
|
|
|
debug = (length>>24) & 0xff;
|
|
|
|
|
char_to_sound((length>>24) & 0xff);
|
|
|
|
|
mmc_read_part(0, (unsigned char *) &length, 4);
|
|
|
|
|
char_to_sound((length>>8) & 0xff);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
timer_init_tiny26();
|
|
|
|
|
@ -108,13 +111,22 @@ int main(void)
|
|
|
|
|
} // */
|
|
|
|
|
// debug = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void char_to_sound(uint8_t val){
|
|
|
|
|
uint8_t i,r,b, sound;
|
|
|
|
|
uint16_t a,to;
|
|
|
|
|
for(b=0; b<8; b++){
|
|
|
|
|
sound = (debug & 1)+1;
|
|
|
|
|
debug >>= 1;
|
|
|
|
|
if(val & 0x80){
|
|
|
|
|
sound = 16;
|
|
|
|
|
}else{
|
|
|
|
|
sound = 8;
|
|
|
|
|
}
|
|
|
|
|
val <<= 1;
|
|
|
|
|
for(to=0; to<3200; to++){
|
|
|
|
|
i += sound*8;
|
|
|
|
|
i += sound;
|
|
|
|
|
a = i<<8;
|
|
|
|
|
r=1;
|
|
|
|
|
while(r){
|
|
|
|
|
@ -127,7 +139,5 @@ int main(void)
|
|
|
|
|
r=ringbuf_put(&rb, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}// */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|