1 /* Project 16 Source Code~
2 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
4 * This file is part of Project 16.
6 * Project 16 is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * Project 16 is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>, or
19 * write to the Free Software Foundation, Inc., 51 Franklin Street,
20 * Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "src/lib/16_snd.h"
26 void opl2out(word reg, word data)
31 mov dx,word ptr [ADLIB_FM_ADDRESS]
\r
49 void opl3out(word reg, word data)
54 mov dx,word ptr [ADLIB_FM_ADDRESS]
\r
69 void opl3exp(word data)
74 mov dx,word ptr [ADLIB_FM_ADDRESS]
\r
89 /* Function: FMResest *******************************************************
\r
91 * Description: quick and dirty sound card reset (zeros all
\r
95 void FMReset(void/*int percusiveMode*/)
99 /* zero all registers */
\r
100 for(i = MIN_REGISTER; i < MAX_REGISTER+1; i++) opl2out(i, 0);
\r
102 /* allow FM chips to control the waveform of each operator */
\r
103 opl2out(0x01, 0x20);
\r
105 /* set rhythm enabled (6 melodic voices, 5 percussive) */
\r
106 opl2out(0xBD, 0x20);
\r
108 //FMSetPercusiveMode(percusiveMode);
\r
109 } /* End of FMReset */