diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-20 23:46:17 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-20 23:46:17 -0500 |
commit | 9d032c9a1c0eca663c6877f5421957f50cb1eb79 (patch) | |
tree | 3626b074e0beece467318f41d35d42cb146d57e0 /sounds.c | |
parent | 8aec40856588437a20906a0820941382475344ec (diff) | |
download | taipan-9d032c9a1c0eca663c6877f5421957f50cb1eb79.tar.gz |
rewrite sound code in asm, shed 186 bytes
Diffstat (limited to 'sounds.c')
-rw-r--r-- | sounds.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,6 @@ +/* this file is no longer used. the sound code was rewritten in asm, + and lives in soundasm.s. This file is kept purely for reference. */ + /* Sounds for Taipan! Atari 800 port. Made by capturing the Apple II audio and taking wild guesses, @@ -13,7 +16,10 @@ #include <peekpoke.h> #include "sounds.h" -int sound_disabled = 0x06ff; +/* location we will look at, to see if sound is disabled. + 0 = enabled, 1 = disabled. If you change this here, + change it in newtitle.s also! */ +static int sound_disabled = 0x06ff; /* to build standalone xex that just plays the 3 sounds: cl65 -DTESTXEX -t atari -o sounds.xex sounds.c @@ -30,6 +36,7 @@ void jsleep(unsigned int j) { extern void __fastcall__ jsleep(unsigned int j); #endif +/* set volume 10, distortion 10 on audio channel 0 */ void init_sound(unsigned char audc1) { if(PEEK(sound_disabled)) return; @@ -39,6 +46,7 @@ void init_sound(unsigned char audc1) { POKEY_WRITE.audc1 = audc1; /* SOUND 0,x,audc1>>4,audc1&0x0f */ } +/* silence audio channel 0 */ void stop_sound(void) { POKEY_WRITE.audc1 = 0x00; /* SOUND 0,x,0,0 */ } |