/************************************************************************** * * Othello II v2.53 - 08/02/2004 * * Copyright (C) 2000-2004 François LEIBER * * This file is part of Othello II. * * Othello II 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 2 of the License, or * (at your option) any later version. * * Othello II 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, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * *************************************************************************/ INT_HANDLER Nouveau1 = NULL; ///////////////////////////////////////////////////////////////////////////////////////// // Joue une note de fréquence 'freq' pour une durée 'duree' (en centièmes de seconde) ///////////////////////////////////////////////////////////////////////////////////////// void beep(short freq, long duree) { long loop, maxloop = freq * duree / 50; short i, j = peekIO(0x60000E); if (Son == 0) return; freq = (HW2 ? 364000 : 278000) / freq; pokeIO(0x60000C, 6); for (loop = 0; loop < maxloop; loop++) { pokeIO(0x60000E, j ^= 0x03); for (i = 0; i <= freq; i--) i += 2; } pokeIO(0x60000E, j &= 0xFC); pokeIO(0x60000C, 0x8D); }