-//};
-
- IN_Startup();
- //FMReset();
- //FMSetVoice(0, &testInst);
- if(!init_adlib())
- {
- printf("Cannot init library\n");
- exit(-5);
- }
-
- if (adlib_fm_voices > 9)
- printf("OPL3!\n");
-// vga_bios_set_80x50_text();
-
- memset(adlib_fm,0,sizeof(adlib_fm));
- memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));
- for (i=0;i < adlib_fm_voices;i++) {
- struct adlib_fm_operator *f;
- f = &adlib_fm[i].mod;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- f = &adlib_fm[i].car;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- }
-
- for (i=0;i < /*adlib_fm_voices*/1;i++) {
- struct adlib_fm_operator *f;
-
- f = &adlib_fm[i].mod;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 0;
- f->sustain_level = 7;
- f->release_rate = 7;
- f->f_number = musical_scale[i%18];
- f->octave = 4;
- f->key_on = 0;
-
- f = &adlib_fm[i].car;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 0;
- f->sustain_level = 7;
- f->release_rate = 7;
- f->f_number = 0;
- f->octave = 0;
- f->key_on = 0;
- }
-
- adlib_apply_all();
-
- printf("press Z! to noise\npress ESC to quit");
- printf("p");
- while(!IN_qb(1))
- {
- if(IN_qb(44))
- {
- printf("e");
+//};\r
+\r
+ IN_Startup();\r
+ //FMReset();\r
+ //FMSetVoice(0, &testInst);\r
+ if(!init_adlib())\r
+ {\r
+ Quit(gvar, "Cannot init library");\r
+ }\r
+\r
+ if (adlib_fm_voices > 9)\r
+ printf("OPL3!\n");\r
+// vga_bios_set_80x50_text();\r
+\r
+ memset(adlib_fm,0,sizeof(adlib_fm));\r
+ memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));\r
+ for (i=0;i < adlib_fm_voices;i++) {\r
+ struct adlib_fm_operator *f;\r
+ f = &adlib_fm[i].mod;\r
+ f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;\r
+ f = &adlib_fm[i].car;\r
+ f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;\r
+ }\r
+\r
+ for (i=0;i < /*adlib_fm_voices*/1;i++) {\r
+ struct adlib_fm_operator *f;\r
+\r
+ f = &adlib_fm[i].mod;\r
+ f->mod_multiple = 1;\r
+ f->total_level = 63 - 16;\r
+ f->attack_rate = 15;\r
+ f->decay_rate = 0;\r
+ f->sustain_level = 7;\r
+ f->release_rate = 7;\r
+ f->f_number = musical_scale[i%18];\r
+ f->octave = 4;\r
+ f->key_on = 0;\r
+\r
+ f = &adlib_fm[i].car;\r
+ f->mod_multiple = 1;\r
+ f->total_level = 63 - 16;\r
+ f->attack_rate = 15;\r
+ f->decay_rate = 0;\r
+ f->sustain_level = 7;\r
+ f->release_rate = 7;\r
+ f->f_number = 0;\r
+ f->octave = 0;\r
+ f->key_on = 0;\r
+ }\r
+\r
+ adlib_apply_all();\r
+\r
+ printf("press Z! to noise\npress ESC to quit");\r
+ printf("p");\r
+ while(!IN_qb(1))\r
+ {\r
+ if(IN_qb(44))\r
+ {\r
+ printf("e");\r