2 Skelton for retropc emulator
4 Origin : Neko Project 2
5 Author : Takeda.Toshiya
18 #define SIG_TMS3631_ENVELOP1 0
19 #define SIG_TMS3631_ENVELOP2 1
20 #define SIG_TMS3631_DATAREG 2
21 #define SIG_TMS3631_MASKREG 3
23 class TMS3631 : public DEVICE
26 uint8_t envelop1, envelop2, datareg, maskreg;
35 uint32_t freq_table[64];
37 int volume_l, volume_r;
40 TMS3631(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
42 volume_l = volume_r = 1024;
43 set_device_name(_T("TMS3631 SSG"));
49 void write_signal(int id, uint32_t data, uint32_t mask);
50 void mix(int32_t* buffer, int cnt);
51 void set_volume(int ch, int decibel_l, int decibel_r);
52 void save_state(FILEIO* state_fio);
53 bool load_state(FILEIO* state_fio);
56 void initialize_sound(int rate, int volume);