1 // -*- C++ -*- 2 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. 3 // Copyright (C) 1999-2003 Forgotten 4 // Copyright (C) 2004 Forgotten and the VBA development team 5 6 // This program 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 2, or(at your option) 9 // any later version. 10 // 11 // This program 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 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software Foundation, 18 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20 #ifndef VBA_SOUND_H 21 #define VBA_SOUND_H 22 23 namespace MDFN_IEN_GBA 24 { 25 26 #define NR10 0x60 27 #define NR11 0x62 28 #define NR12 0x63 29 #define NR13 0x64 30 #define NR14 0x65 31 #define NR21 0x68 32 #define NR22 0x69 33 #define NR23 0x6c 34 #define NR24 0x6d 35 #define NR30 0x70 36 #define NR31 0x72 37 #define NR32 0x73 38 #define NR33 0x74 39 #define NR34 0x75 40 #define NR41 0x78 41 #define NR42 0x79 42 #define NR43 0x7c 43 #define NR44 0x7d 44 #define NR50 0x80 45 #define NR51 0x81 46 #define NR52 0x84 47 #define SGCNT0_H 0x82 48 #define FIFOA_L 0xa0 49 #define FIFOA_H 0xa2 50 #define FIFOB_L 0xa4 51 #define FIFOB_H 0xa6 52 53 extern void soundReset(); 54 extern void soundEvent(uint32, uint8); 55 extern void soundEvent(uint32, uint16); 56 extern void soundTimerOverflow(int); 57 58 int32 MDFNGBASOUND_Flush(int16 *SoundBuf, const int32 MaxSoundFrames); 59 void MDFNGBASOUND_Init(void) MDFN_COLD; 60 void MDFNGBASOUND_Kill(void) MDFN_COLD; 61 62 uint8 soundRead(uint32 address); 63 64 bool MDFNGBA_SetSoundRate(uint32 rate); 65 void MDFNGBASOUND_StateAction(StateMem* sm, const unsigned load, const bool data_only); 66 67 } 68 69 #endif // VBA_SOUND_H 70