From 623ca4b01f2db170c2273d5bc9c538be78d16c4c Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 22 Mar 2016 14:53:02 -0500 Subject: [PATCH] updated copyright www --- 16/16/src/inputest.c | 2 +- 16/16/src/lib/lib_head.c | 2 +- 16/16/src/lib/lib_head.h | 2 +- 16/16/src/lib/types.h | 2 +- src/16.c | 2 +- src/16.h | 2 +- src/bakapi.c | 2 +- src/bakapi.h | 2 +- src/emsdump.c | 2 +- src/exmmtest.c | 2 +- src/fmemtest.c | 154 +++++++++++++-------------- src/fontgfx.c | 2 +- src/fonttes0.c | 2 +- src/fonttest.c | 20 ++-- src/inputest.c | 2 +- src/lib/16_hc.c | 2 +- src/lib/16_hc.h | 2 +- src/lib/16_head.c | 2 +- src/lib/16_head.h | 2 +- src/lib/16_snd.c | 89 ++++++++-------- src/lib/16_snd.h | 82 +++++++------- src/lib/bakapee.c | 6 +- src/lib/bakapee.h | 2 +- src/lib/bitmap.c | 2 +- src/lib/bitmap.h | 2 +- src/lib/modex16/160x120.h | 2 +- src/lib/modex16/16planar.c | 2 +- src/lib/modex16/16planar.h | 2 +- src/lib/modex16/16render.c | 2 +- src/lib/modex16/16render.h | 2 +- src/lib/modex16/192x144.h | 2 +- src/lib/modex16/192x144_.h | 2 +- src/lib/modex16/256x192.h | 2 +- src/lib/modex16/320x200.h | 2 +- src/lib/modex16/320x240.h | 2 +- src/lib/planar.c | 2 +- src/lib/planar.h | 2 +- src/lib/types.h | 2 +- src/lib/wcpu/wcpu.c | 2 +- src/lib/wcpu/wcpu.h | 2 +- src/maptest.c | 96 ++++++++--------- src/maptest0.c | 120 ++++++++++----------- src/palettec.c | 2 +- src/palettel.c | 2 +- src/pcxtest.c | 2 +- src/pcxtest2.c | 2 +- src/planrpcx.c | 2 +- src/scroll.c | 2 +- src/sountest.c | 212 ++++++++++++++++++------------------- src/test.c | 2 +- src/test2.c | 2 +- src/vgmtest.c | 2 +- 52 files changed, 433 insertions(+), 434 deletions(-) diff --git a/16/16/src/inputest.c b/16/16/src/inputest.c index c12b19f1..fd8d3266 100755 --- a/16/16/src/inputest.c +++ b/16/16/src/inputest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 joncampbell123 * * This file is part of Project 16. * diff --git a/16/16/src/lib/lib_head.c b/16/16/src/lib/lib_head.c index 4ca25c9c..1c9b916c 100755 --- a/16/16/src/lib/lib_head.c +++ b/16/16/src/lib/lib_head.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 joncampbell123 * * This file is part of Project 16. * diff --git a/16/16/src/lib/lib_head.h b/16/16/src/lib/lib_head.h index cf50054d..0f26c1fc 100755 --- a/16/16/src/lib/lib_head.h +++ b/16/16/src/lib/lib_head.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 joncampbell123 * * This file is part of Project 16. * diff --git a/16/16/src/lib/types.h b/16/16/src/lib/types.h index 2055c20c..b0213bc8 100755 --- a/16/16/src/lib/types.h +++ b/16/16/src/lib/types.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 pngwen * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 andrius4669 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 joncampbell123 * * This file is part of Project 16. * diff --git a/src/16.c b/src/16.c index 5ee40aa9..10aad071 100755 --- a/src/16.c +++ b/src/16.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/16.h b/src/16.h index aa8528df..b12b1a7d 100755 --- a/src/16.h +++ b/src/16.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/bakapi.c b/src/bakapi.c index c1124f3b..eccaa355 100755 --- a/src/bakapi.c +++ b/src/bakapi.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/bakapi.h b/src/bakapi.h index 6e371573..635d3ee8 100755 --- a/src/bakapi.h +++ b/src/bakapi.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/emsdump.c b/src/emsdump.c index 39808b70..8be2c2c7 100755 --- a/src/emsdump.c +++ b/src/emsdump.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/exmmtest.c b/src/exmmtest.c index b752ef21..280cbf91 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/fmemtest.c b/src/fmemtest.c index 2cdbadd0..d666ac76 100755 --- a/src/fmemtest.c +++ b/src/fmemtest.c @@ -1,78 +1,78 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ -#include -#include "src/lib/16_head.h" -#include "src/lib/16_ca.h" -#include "src/lib/16_mm.h" -#include "src/lib/types.h" - -void +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ +#include +#include "src/lib/16_head.h" +#include "src/lib/16_ca.h" +#include "src/lib/16_mm.h" +#include "src/lib/types.h" + +void main(int argc, char *argv[]) -{ - int x=420; - int huge *ptr=&x; - int *ptr0=&x; - //void __based(__self) *pee; - memptr pee; - void __near *npee; - void __far *fpee; - void *dpee; - __segment segu; - //word csw=0,dsw=0,esw=0,ssw=0,ipw=0; - - _nheapgrow(); - _fheapgrow(); - _heapgrow(); - //ptr=&x; - printf("&main()=%Fp\n", *argv[0]); - printf("ptr0=%Fp\n", ptr0); - //printf("&ptr0=%Fp\n", &ptr0); - printf("*ptr0=%d\n", *ptr0); - printf("ptr=%Fp\n", ptr); - //printf("&ptr=%Fp\n", &ptr); - printf("*ptr=%d\n", *ptr); - printf("address of *ptr=%Fp\n", *ptr); - printf("&x=%Fp\n", &x); - printf("x=%d\n", x); - printf("\n"); - /*__asm - { - //lea csw,cs - //lds DS,dsw - //les ES,esw -// mov ss,ssw -// mov ip,ipw - }*/ - //printf("ip=%u\n", ipw); - //printf("ss=%u\n", ssw); - //printf("cs=%u\n", csw); - //printf("ds=%u\n", dsw); - //printf("es=%u\n", esw); - printf("memavl=%u\n", _memavl()); - printf("size of based pee~=%u %FP\n", _bmsize(segu, pee), pee); - printf("size of default pee~=%u %FP\n", _msize(dpee), dpee); - printf("size of near pee~=%u %FP\n", _nmsize(npee), npee); - printf("size of far pee~=%u %FP\n", _fmsize(fpee), fpee); - printf("pee=%Fp\n", pee); - printf("npee=%Fp\n", npee); - printf("&main()=%Fp\n", *argv[0]); -} +{ + int x=420; + int huge *ptr=&x; + int *ptr0=&x; + //void __based(__self) *pee; + memptr pee; + void __near *npee; + void __far *fpee; + void *dpee; + __segment segu; + //word csw=0,dsw=0,esw=0,ssw=0,ipw=0; + + _nheapgrow(); + _fheapgrow(); + _heapgrow(); + //ptr=&x; + printf("&main()=%Fp\n", *argv[0]); + printf("ptr0=%Fp\n", ptr0); + //printf("&ptr0=%Fp\n", &ptr0); + printf("*ptr0=%d\n", *ptr0); + printf("ptr=%Fp\n", ptr); + //printf("&ptr=%Fp\n", &ptr); + printf("*ptr=%d\n", *ptr); + printf("address of *ptr=%Fp\n", *ptr); + printf("&x=%Fp\n", &x); + printf("x=%d\n", x); + printf("\n"); + /*__asm + { + //lea csw,cs + //lds DS,dsw + //les ES,esw +// mov ss,ssw +// mov ip,ipw + }*/ + //printf("ip=%u\n", ipw); + //printf("ss=%u\n", ssw); + //printf("cs=%u\n", csw); + //printf("ds=%u\n", dsw); + //printf("es=%u\n", esw); + printf("memavl=%u\n", _memavl()); + printf("size of based pee~=%u %FP\n", _bmsize(segu, pee), pee); + printf("size of default pee~=%u %FP\n", _msize(dpee), dpee); + printf("size of near pee~=%u %FP\n", _nmsize(npee), npee); + printf("size of far pee~=%u %FP\n", _fmsize(fpee), fpee); + printf("pee=%Fp\n", pee); + printf("npee=%Fp\n", npee); + printf("&main()=%Fp\n", *argv[0]); +} diff --git a/src/fontgfx.c b/src/fontgfx.c index 37ec9421..3edf22d5 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/fonttes0.c b/src/fonttes0.c index 10832ae5..30229dae 100755 --- a/src/fonttes0.c +++ b/src/fonttes0.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/fonttest.c b/src/fonttest.c index 58dbce85..fcfd4d2d 100755 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -41,9 +41,9 @@ void main(int argc, char near *argv[]) } // printf("*argv[1]=%d\n", *argv[1]); - + printf("Font type: "); - gets(&ct); + gets(&ct); printf("Character: "); gets(&c); @@ -51,37 +51,37 @@ void main(int argc, char near *argv[]) if(ct!=1) switch(ct) { - case 48: + case 48: printf("type 0\n"); t=0; w=14; break; - case 49: + case 49: printf("type 1\n"); t=1; w=8; break; - case 50: + case 50: printf("type 2\n"); t=2; w=8; break; - case 51: + case 51: printf("type 3\n"); t=3; w=16; break; - default: + default: printf("type 3\n"); t=3; w=16; break; } else - { + { printf("type 3\n"); t=3; - w=16; + w=16; } diff --git a/src/inputest.c b/src/inputest.c index 03f7a331..f5a9e852 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index b3bafefa..316b86b9 100755 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index 6e947bee..86c6ff12 100755 --- a/src/lib/16_hc.h +++ b/src/lib/16_hc.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/16_head.c b/src/lib/16_head.c index d7de200f..656057fb 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/16_head.h b/src/lib/16_head.h index a3301f3f..3217ea2e 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/16_snd.c b/src/lib/16_snd.c index 47cab348..e85fdf9b 100755 --- a/src/lib/16_snd.c +++ b/src/lib/16_snd.c @@ -1,31 +1,30 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include "src/lib/16_snd.h" - -void opl2out(word reg, word data) +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include "src/lib/16_snd.h" + +void opl2out(word reg, word data) { - __asm + __asm { mov ax,reg mov dx,word ptr [ADLIB_FM_ADDRESS] @@ -43,12 +42,12 @@ void opl2out(word reg, word data) mov cx,36 @@3: in al,dx loop @@3 - } + } } -void opl3out(word reg, word data) +void opl3out(word reg, word data) { - __asm + __asm { mov ax,reg mov dx,word ptr [ADLIB_FM_ADDRESS] @@ -63,12 +62,12 @@ void opl3out(word reg, word data) mov cx,26 @@2: in al,dx loop @@2 - } + } } -void opl3exp(word data) +void opl3exp(word data) { - __asm + __asm { mov ax,data mov dx,word ptr [ADLIB_FM_ADDRESS] @@ -82,17 +81,17 @@ void opl3exp(word data) out dx,al mov cx,36 @@2: in al,dx - loop @@2 + loop @@2 } -} - +} + /* Function: FMResest ******************************************************* * * Description: quick and dirty sound card reset (zeros all * registers). * */ -void FMReset(void/*int percusiveMode*/) +void FMReset(void/*int percusiveMode*/) { int i; @@ -106,8 +105,8 @@ void FMReset(void/*int percusiveMode*/) opl2out(0xBD, 0x20); //FMSetPercusiveMode(percusiveMode); -} /* End of FMReset */ - +} /* End of FMReset */ + /* Function: FMKeyOff ******************************************************* * * Parameters: voice - which voice to turn off. @@ -115,7 +114,7 @@ void FMReset(void/*int percusiveMode*/) * Description: turns off the specified voice. * */ -void FMKeyOff(int voice) +void FMKeyOff(int voice) { int regNum; @@ -134,17 +133,17 @@ void FMKeyOff(int voice) * octave. * */ -void FMKeyOn(int voice, int freq, int octave) +void FMKeyOn(int voice, int freq, int octave) { int regNum, tmp; regNum = 0xA0 + voice % 11;//NUMVOICE; opl2out(regNum, freq & 0xff); regNum = 0xB0 + voice % 11;//NUMVOICE; - tmp = (freq >> 8) | (octave << 2) | 0x20; + tmp = (freq >> 8) | (octave << 2) | 0x20; opl2out(regNum, tmp); -} /* End of FMKeyOn */ - +} /* End of FMKeyOn */ + /* Function: FMSetVoice ***************************************************** * * Parameters: voiceNum - which voice to set. @@ -192,4 +191,4 @@ void FMSetVoice(int voiceNum, FMInstrument *ins){ /* set Feedback/Selectivity */ opCellNum = (byte)0xC0 + (byte)voiceNum; opl2out(opCellNum, ins->Feedback); -} /* End of FMSetVoice */ +} /* End of FMSetVoice */ diff --git a/src/lib/16_snd.h b/src/lib/16_snd.h index 3242e814..583077de 100755 --- a/src/lib/16_snd.h +++ b/src/lib/16_snd.h @@ -1,35 +1,35 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#ifndef __16_SND_H_ -#define __16_SND_H_ - -#include "src/lib/16_head.h" - +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef __16_SND_H_ +#define __16_SND_H_ + +#include "src/lib/16_head.h" + #define MIN_REGISTER 0x01 #define MAX_REGISTER 0xF5 #define ADLIB_FM_ADDRESS 0x388 /* adlib address/status register */ -#define ADLIB_FM_DATA 0x389 /* adlib data register */ - +#define ADLIB_FM_DATA 0x389 /* adlib data register */ + /* * FM Instrument definition for .SBI files - SoundBlaster instrument * - these are the important parts - we will skip the header, but since @@ -45,15 +45,15 @@ typedef struct{ byte WaveSelect[2]; /* output waveform distortion */ byte Feedback; /* feedback algorithm and strength */ } FMInstrument; - - -void opl2out(word reg, word data); -void opl3out(word reg, word data); -void opl3exp(word data); - -void FMReset(void/*int percusiveMode*/); -void FMKeyOff(int voice); -void FMKeyOn(int voice, int freq, int octave); -void FMSetVoice(int voiceNum, FMInstrument *ins); - -#endif /*__16_SND_H_*/ + + +void opl2out(word reg, word data); +void opl3out(word reg, word data); +void opl3exp(word data); + +void FMReset(void/*int percusiveMode*/); +void FMKeyOff(int voice); +void FMKeyOn(int voice, int freq, int octave); +void FMSetVoice(int voiceNum, FMInstrument *ins); + +#endif /*__16_SND_H_*/ diff --git a/src/lib/bakapee.c b/src/lib/bakapee.c index 1639f242..1626fd1d 100755 --- a/src/lib/bakapee.c +++ b/src/lib/bakapee.c @@ -1,10 +1,10 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as publipage->shed by + * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * @@ -13,7 +13,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You page->should have received a copy of the GNU General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see , or * write to the Free Software Foundation, Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/src/lib/bakapee.h b/src/lib/bakapee.h index 800e5777..c7f35266 100755 --- a/src/lib/bakapee.h +++ b/src/lib/bakapee.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index d4341169..43321733 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index fd112658..06570a9a 100755 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/160x120.h b/src/lib/modex16/160x120.h index 04253da6..735909ec 100755 --- a/src/lib/modex16/160x120.h +++ b/src/lib/modex16/160x120.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/16planar.c b/src/lib/modex16/16planar.c index c8d3b54e..f29c92d5 100755 --- a/src/lib/modex16/16planar.c +++ b/src/lib/modex16/16planar.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/16planar.h b/src/lib/modex16/16planar.h index bd47e088..51777811 100755 --- a/src/lib/modex16/16planar.h +++ b/src/lib/modex16/16planar.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/16render.c b/src/lib/modex16/16render.c index e3c6aec9..0399a777 100755 --- a/src/lib/modex16/16render.c +++ b/src/lib/modex16/16render.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/16render.h b/src/lib/modex16/16render.h index 23d507ac..308944c3 100755 --- a/src/lib/modex16/16render.h +++ b/src/lib/modex16/16render.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/192x144.h b/src/lib/modex16/192x144.h index 74800c06..69ccc81f 100755 --- a/src/lib/modex16/192x144.h +++ b/src/lib/modex16/192x144.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/192x144_.h b/src/lib/modex16/192x144_.h index a6f645e6..89221ad5 100755 --- a/src/lib/modex16/192x144_.h +++ b/src/lib/modex16/192x144_.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/256x192.h b/src/lib/modex16/256x192.h index d59ae701..2f946e61 100755 --- a/src/lib/modex16/256x192.h +++ b/src/lib/modex16/256x192.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/320x200.h b/src/lib/modex16/320x200.h index 9c1093e1..0a2d0a69 100755 --- a/src/lib/modex16/320x200.h +++ b/src/lib/modex16/320x200.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/modex16/320x240.h b/src/lib/modex16/320x240.h index abf4e0e0..5655254a 100755 --- a/src/lib/modex16/320x240.h +++ b/src/lib/modex16/320x240.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/planar.c b/src/lib/planar.c index c15c39c5..3fd1c5ed 100755 --- a/src/lib/planar.c +++ b/src/lib/planar.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/planar.h b/src/lib/planar.h index c4b67307..6e580665 100755 --- a/src/lib/planar.h +++ b/src/lib/planar.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/types.h b/src/lib/types.h index bb09ff19..c01eeef3 100755 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/wcpu/wcpu.c b/src/lib/wcpu/wcpu.c index ea76843a..a5cdd665 100755 --- a/src/lib/wcpu/wcpu.c +++ b/src/lib/wcpu/wcpu.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/lib/wcpu/wcpu.h b/src/lib/wcpu/wcpu.h index ba69b686..9409a8b0 100755 --- a/src/lib/wcpu/wcpu.h +++ b/src/lib/wcpu/wcpu.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/maptest.c b/src/maptest.c index 90996a9f..972d7db6 100755 --- a/src/maptest.c +++ b/src/maptest.c @@ -1,53 +1,53 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + #include "src/lib/mapread.h" - -#define DUMP -//#define DUMP_MAP - -void + +#define DUMP +//#define DUMP_MAP + +void main(int argc, char *argv[]) { - map_t map; - short i; - loadmap("data/test.map", &map); - #ifdef DUMP - fprintf(stdout, "map.width= %d\n", map.width); - fprintf(stdout, "map.height= %d\n", map.height); - #ifdef DUMP_MAP - for(i=0; i<(map.width*map.height); i++) - { - fprintf(stdout, "%04d[%02d]", i, map.data[i]); - if(i && !(i%map.width)) fprintf(stdout, "\n"); - } - fprintf(stdout, "\n"); - #endif - fprintf(stdout, "&main()=%Fp\n", *argv[0]); - fprintf(stdout, "&map==%Fp\n", &map); - fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); - fprintf(stdout, "&map.width==%Fp\n", map.width); + map_t map; + short i; + loadmap("data/test.map", &map); + #ifdef DUMP + fprintf(stdout, "map.width= %d\n", map.width); + fprintf(stdout, "map.height= %d\n", map.height); + #ifdef DUMP_MAP + for(i=0; i<(map.width*map.height); i++) + { + fprintf(stdout, "%04d[%02d]", i, map.data[i]); + if(i && !(i%map.width)) fprintf(stdout, "\n"); + } + fprintf(stdout, "\n"); + #endif + fprintf(stdout, "&main()=%Fp\n", *argv[0]); + fprintf(stdout, "&map==%Fp\n", &map); + fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); + fprintf(stdout, "&map.width==%Fp\n", map.width); fprintf(stdout, "&map.height==%Fp\n", map.height); - fprintf(stdout, "&map.data==%Fp\n", map.data); - #endif - fprintf(stdout, "okies~\n"); + fprintf(stdout, "&map.data==%Fp\n", map.data); + #endif + fprintf(stdout, "okies~\n"); } diff --git a/src/maptest0.c b/src/maptest0.c index e0350150..3a05abdd 100755 --- a/src/maptest0.c +++ b/src/maptest0.c @@ -1,65 +1,65 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include #include "src/lib/fmapread.h" - -#define DUMP -//#define DUMP_MAP - -void + +#define DUMP +//#define DUMP_MAP + +void main(int argc, char *argv[]) { - map_t map; - short i; - char *fmt = "Memory available = %u\n"; - char *fmt0 = "Largest Contiguous Block of Memory available = %u\n"; - - fprintf(stderr, fmt, _memavl()); - fprintf(stderr, fmt0, _memmax()); - fprintf(stderr, "Size of map var = %u\n", _msize(&map)); - fprintf(stderr, "program always crashes for some reason...."); - getch(); - - fprintf(stderr, "loading~\n\n"); - loadmap("data/tes0.map", &map); - fprintf(stderr, "\nokies~\n"); - #ifdef DUMP - fprintf(stdout, "map.width= %d\n", map.width); - fprintf(stdout, "map.height= %d\n", map.height); - #ifdef DUMP_MAP - for(i=0; i<(map.width*map.height); i++) - { - fprintf(stdout, "%04d[%02d]", i, map.data[i]); - if(i && !(i%map.width)) fprintf(stdout, "\n"); - } - fprintf(stdout, "\n"); - #endif - fprintf(stdout, "&main()=%Fp\n", *argv[0]); - fprintf(stdout, "&map==%Fp\n", &map); - fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); - fprintf(stdout, "&map.width==%Fp\n", map.width); + map_t map; + short i; + char *fmt = "Memory available = %u\n"; + char *fmt0 = "Largest Contiguous Block of Memory available = %u\n"; + + fprintf(stderr, fmt, _memavl()); + fprintf(stderr, fmt0, _memmax()); + fprintf(stderr, "Size of map var = %u\n", _msize(&map)); + fprintf(stderr, "program always crashes for some reason...."); + getch(); + + fprintf(stderr, "loading~\n\n"); + loadmap("data/tes0.map", &map); + fprintf(stderr, "\nokies~\n"); + #ifdef DUMP + fprintf(stdout, "map.width= %d\n", map.width); + fprintf(stdout, "map.height= %d\n", map.height); + #ifdef DUMP_MAP + for(i=0; i<(map.width*map.height); i++) + { + fprintf(stdout, "%04d[%02d]", i, map.data[i]); + if(i && !(i%map.width)) fprintf(stdout, "\n"); + } + fprintf(stdout, "\n"); + #endif + fprintf(stdout, "&main()=%Fp\n", *argv[0]); + fprintf(stdout, "&map==%Fp\n", &map); + fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); + fprintf(stdout, "&map.width==%Fp\n", map.width); fprintf(stdout, "&map.height==%Fp\n", map.height); - fprintf(stdout, "&map.data==%Fp\n", map.data); - #endif - fprintf(stdout, "okies~\n"); + fprintf(stdout, "&map.data==%Fp\n", map.data); + #endif + fprintf(stdout, "okies~\n"); } diff --git a/src/palettec.c b/src/palettec.c index ca9e5429..f1057dc0 100755 --- a/src/palettec.c +++ b/src/palettec.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/palettel.c b/src/palettel.c index 7ed33b84..a40bd3fd 100755 --- a/src/palettel.c +++ b/src/palettel.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/pcxtest.c b/src/pcxtest.c index f423b6a5..0392b5cb 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/pcxtest2.c b/src/pcxtest2.c index f5efc3c7..3b83c53d 100755 --- a/src/pcxtest2.c +++ b/src/pcxtest2.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/planrpcx.c b/src/planrpcx.c index ce44cb4d..9ed1096d 100755 --- a/src/planrpcx.c +++ b/src/planrpcx.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/scroll.c b/src/scroll.c index e7987762..7d68b45d 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/sountest.c b/src/sountest.c index 8fd5b025..5bcdccf6 100755 --- a/src/sountest.c +++ b/src/sountest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -18,40 +18,40 @@ * write to the Free Software Foundation, Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA. * - */ - -#include - -#include "src/lib/16_in.h" -//#include "src/lib/16_snd.h" -#include "src/lib/doslib/adlib.h" -#include "src/lib/doslib/8254.h" /* 8254 timer */ - -static unsigned int musical_scale[18] = { - 0x1B0, /* E */ - 0x1CA, /* F */ - 0x1E5, /* f# */ - 0x202, /* G */ - 0x220, /* G# */ - 0x241, /* A */ - 0x263, /* A# */ - 0x287, /* B */ - 0x2AE, /* C */ - - 0x2B0, /* E */ - 0x2CA, /* F */ - 0x2E5, /* f# */ - 0x302, /* G */ - 0x320, /* G# */ - 0x341, /* A */ - 0x363, /* A# */ - 0x387, /* B */ - 0x3AE, /* C */ -}; - + */ + +#include + +#include "src/lib/16_in.h" +//#include "src/lib/16_snd.h" +#include "src/lib/doslib/adlib.h" +#include "src/lib/doslib/8254.h" /* 8254 timer */ + +static unsigned int musical_scale[18] = { + 0x1B0, /* E */ + 0x1CA, /* F */ + 0x1E5, /* f# */ + 0x202, /* G */ + 0x220, /* G# */ + 0x241, /* A */ + 0x263, /* A# */ + 0x287, /* B */ + 0x2AE, /* C */ + + 0x2B0, /* E */ + 0x2CA, /* F */ + 0x2E5, /* f# */ + 0x302, /* G */ + 0x320, /* G# */ + 0x341, /* A */ + 0x363, /* A# */ + 0x387, /* B */ + 0x3AE, /* C */ +}; + void main(int argc, char near *argv[]) -{ - word i; +{ + word i; // static FMInstrument testInst = //{ //0x00, 0x01, /* modulator frequency multiple... 0x20 */ @@ -60,77 +60,77 @@ void main(int argc, char near *argv[]) //0x73, 0x73, /* modulator sustain/release... 0x80 */ //0x03, 0x00, /* output waveform distortion 0xE0 */ //0x36, /* feedback algorithm and strength 0xC0 */ -//}; - - 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"); +//}; + + 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"); adlib_fm[0].mod.key_on = 1; - //FMKeyOn(0, 0x106, 4); - } - else - { - adlib_fm[0].mod.key_on = 0; - //FMKeyOff(0); - } + //FMKeyOn(0, 0x106, 4); + } + else + { + adlib_fm[0].mod.key_on = 0; + //FMKeyOff(0); + } adlib_update_groupA0(0,&adlib_fm[0]); - } - printf("!\n"); - shutdown_adlib(); - IN_Shutdown(); -} + } + printf("!\n"); + shutdown_adlib(); + IN_Shutdown(); +} diff --git a/src/test.c b/src/test.c index 23b99826..df0af615 100755 --- a/src/test.c +++ b/src/test.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/test2.c b/src/test2.c index 94121e8a..8fa3a4e2 100755 --- a/src/test2.c +++ b/src/test2.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * diff --git a/src/vgmtest.c b/src/vgmtest.c index d1bc1a1e..49752222 100755 --- a/src/vgmtest.c +++ b/src/vgmtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * -- 2.39.5