1 #define VGL
2 #include <stdio.h>
3 #include <sound.h>
4 
5 unsigned char buffer[100];
6 unsigned char c;
7 unsigned char i;
8 extern unsigned int pos;
9 #asm
10 ._pos
11 	defw 0x0000
12 #endasm
13 
14 #define IOCTL_OTERM_PAUSE 0xc042	// defined in target's auto-generated h file
15 
main(void)16 void main(void) {
17 
18 	//ioctl(1, IOCTL_OTERM_PAUSE, 0);	// Switch off "pause after page is full". Also possible on compile time via OTERM_FLAGS when unsetting bit 6 (0x0040)
19 
20 	printf("Tritone!\n");
21 
22 	/*
23 	printf("Beeping...");
24 	bit_beep(100, 880);
25 	printf("!\n");
26 	*/
27 
28 	//bit_play("G8Ab4G8FEb4DC");
29 
30 	//song_synth();
31 
32 	/*
33 	for (i=0; i < 8 ; i++ ) {
34 		printf("bit_fx(%d)\n",i);
35 		bit_fx(i);
36 	}
37 	*/
38 
39 
40 
41 
42 	// Prepare HL to point to music data...
43 	#asm
44 		EXTERN asm_bit_play_tritone
45 
46 		ld hl, MUSICDATA
47 		push hl
48 	#endasm
49 
50 	// Play loop
51 	printf("play_tritone: Veeblefetzer");
52 	//printf("play_tritone: Beeper RockNRoll");
53 	//printf("play_tritone: Airwolf");
54 	while(1) {
55 		// Play one row
56 		#asm
57 		pop hl
58 		di
59 		call asm_bit_play_tritone
60 		ei
61 		push hl
62 		//ld (_pos), hl
63 		#endasm
64 
65 		// Time for UI
66 		printf(".");
67 		//printf("%04X ", pos);
68 
69 	}
70 
71 }
72 
73 #include "song_veeblefetzer.inc"
74 //#include "song_airwolf.inc"
75 //#include "song_rr.inc"
76 
77 #include "song_synth.inc"
78 
79