1 /* 2 ** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com) 3 ** 4 ** 5 ** This program is free software; you can redistribute it and/or 6 ** modify it under the terms of version 2 of the GNU Library General 7 ** Public License as published by the Free Software Foundation. 8 ** 9 ** This program is distributed in the hope that it will be useful, 10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 ** Library General Public License for more details. To obtain a 13 ** copy of the GNU Library General Public License, write to the Free 14 ** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 ** 16 ** Any permitted reproduction of these routines, in whole or in part, 17 ** must bear this legend. 18 ** 19 ** 20 ** mmc5_snd.h 21 ** 22 ** Nintendo MMC5 sound emulation header 23 ** $Id: mmc5_snd.h,v 1.1 2003/04/08 20:53:01 ben Exp $ 24 */ 25 26 #ifndef _MMC5_SND_H_ 27 #define _MMC5_SND_H_ 28 29 #define MMC5_WRA0 0x5000 30 #define MMC5_WRA1 0x5001 31 #define MMC5_WRA2 0x5002 32 #define MMC5_WRA3 0x5003 33 #define MMC5_WRB0 0x5004 34 #define MMC5_WRB1 0x5005 35 #define MMC5_WRB2 0x5006 36 #define MMC5_WRB3 0x5007 37 #define MMC5_SMASK 0x5015 38 39 typedef struct mmc5rectangle_s 40 { 41 uint8 regs[4]; 42 43 boolean enabled; 44 45 int32 phaseacc; 46 int32 freq; 47 int32 output_vol; 48 boolean fixed_envelope; 49 boolean holdnote; 50 uint8 volume; 51 52 int32 env_phase; 53 int32 env_delay; 54 uint8 env_vol; 55 56 int vbl_length; 57 uint8 adder; 58 int duty_flip; 59 } mmc5rectangle_t; 60 61 62 #include "nes_apu.h" 63 64 extern apuext_t mmc5_ext; 65 66 #endif /* !_MMC5_SND_H_ */ 67 68 /* 69 ** $Log: mmc5_snd.h,v $ 70 ** Revision 1.1 2003/04/08 20:53:01 ben 71 ** Adding more files... 72 ** 73 ** Revision 1.2 2000/06/20 04:06:16 matt 74 ** migrated external sound definition to apu module 75 ** 76 ** Revision 1.1 2000/06/20 00:06:47 matt 77 ** initial revision 78 ** 79 */ 80