emu2413: YM2423
This commit is contained in:
parent
63e7fa085a
commit
c34b790470
1
TODO.md
1
TODO.md
|
@ -1,6 +1,5 @@
|
||||||
# to-do for 0.6.3
|
# to-do for 0.6.3
|
||||||
|
|
||||||
- emu2413
|
|
||||||
- compress fonts further if possible
|
- compress fonts further if possible
|
||||||
- 9xxx for more chips
|
- 9xxx for more chips
|
||||||
|
|
||||||
|
|
22
extern/emu2413/emu2413.c
vendored
22
extern/emu2413/emu2413.c
vendored
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#define _PI_ 3.14159265358979323846264338327950288
|
#define _PI_ 3.14159265358979323846264338327950288
|
||||||
|
|
||||||
#define OPLL_TONE_NUM 3
|
#define OPLL_TONE_NUM 4
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
static uint8_t default_inst[OPLL_TONE_NUM][(16 + 3) * 8] = {{
|
static uint8_t default_inst[OPLL_TONE_NUM][(16 + 3) * 8] = {{
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0: User
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0: User
|
||||||
|
@ -92,6 +92,26 @@ static uint8_t default_inst[OPLL_TONE_NUM][(16 + 3) * 8] = {{
|
||||||
0x01,0x01,0x18,0x0f,0xdf,0xf8,0x6a,0x6d, // R: Bass Drum (identical to YM2413)
|
0x01,0x01,0x18,0x0f,0xdf,0xf8,0x6a,0x6d, // R: Bass Drum (identical to YM2413)
|
||||||
0x01,0x01,0x00,0x00,0xc8,0xd8,0xa7,0x68, // R: High-Hat(M) / Snare Drum(C) (identical to YM2413)
|
0x01,0x01,0x00,0x00,0xc8,0xd8,0xa7,0x68, // R: High-Hat(M) / Snare Drum(C) (identical to YM2413)
|
||||||
0x05,0x01,0x00,0x00,0xf8,0xaa,0x59,0x55, // R: Tom-tom(M) / Top Cymbal(C) (identical to YM2413)
|
0x05,0x01,0x00,0x00,0xf8,0xaa,0x59,0x55, // R: Tom-tom(M) / Top Cymbal(C) (identical to YM2413)
|
||||||
|
},{
|
||||||
|
/* YM2423, taken from ymfm */
|
||||||
|
0x61,0x61,0x1B,0x07,0x94,0x5F,0x10,0x06,
|
||||||
|
0x93,0xB1,0x51,0x04,0xF3,0xF2,0x70,0xFB,
|
||||||
|
0x41,0x21,0x11,0x85,0xF2,0xF2,0x70,0x75,
|
||||||
|
0x93,0xB2,0x28,0x07,0xF3,0xF2,0x70,0xB4,
|
||||||
|
0x72,0x31,0x97,0x05,0x51,0x6F,0x60,0x09,
|
||||||
|
0x13,0x30,0x18,0x06,0xF7,0xF4,0x50,0x85,
|
||||||
|
0x51,0x31,0x1C,0x07,0x51,0x71,0x20,0x26,
|
||||||
|
0x41,0xF4,0x1B,0x07,0x74,0x34,0x00,0x06,
|
||||||
|
0x50,0x30,0x4D,0x03,0x42,0x65,0x20,0x06,
|
||||||
|
0x40,0x20,0x10,0x85,0xF3,0xF5,0x20,0x04,
|
||||||
|
0x61,0x61,0x1B,0x07,0xC5,0x96,0xF3,0xF6,
|
||||||
|
0xF9,0xF1,0xDC,0x00,0xF5,0xF3,0x77,0xF2,
|
||||||
|
0x60,0xA2,0x91,0x03,0x94,0xC1,0xF7,0xF7,
|
||||||
|
0x30,0x30,0x17,0x06,0xF3,0xF1,0xB7,0xFC,
|
||||||
|
0x31,0x36,0x0D,0x05,0xF2,0xF4,0x27,0x9C,
|
||||||
|
0x01,0x01,0x18,0x0F,0xDF,0xF8,0x6A,0x6D,
|
||||||
|
0x01,0x01,0x00,0x00,0xC8,0xD8,0xA7,0x48,
|
||||||
|
0x05,0x01,0x00,0x00,0xF8,0xAA,0x59,0x55,
|
||||||
}};
|
}};
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
|
|
2
extern/emu2413/emu2413.h
vendored
2
extern/emu2413/emu2413.h
vendored
|
@ -9,7 +9,7 @@ extern "C" {
|
||||||
|
|
||||||
#define OPLL_DEBUG 0
|
#define OPLL_DEBUG 0
|
||||||
|
|
||||||
enum OPLL_TONE_ENUM { OPLL_2413_TONE = 0, OPLL_VRC7_TONE = 1, OPLL_281B_TONE = 2 };
|
enum OPLL_TONE_ENUM { OPLL_2413_TONE = 0, OPLL_VRC7_TONE = 1, OPLL_281B_TONE = 2, OPLL_2423_TONE = 3 };
|
||||||
|
|
||||||
/* voice data */
|
/* voice data */
|
||||||
typedef struct __OPLL_PATCH {
|
typedef struct __OPLL_PATCH {
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ int DivPlatformOPLL::getRegisterPoolSize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static const unsigned char nukedToEmuPatch[4]={
|
static const unsigned char nukedToEmuPatch[4]={
|
||||||
0, 2, 0 /* TODO */, 1
|
0, 2, 3, 1
|
||||||
};
|
};
|
||||||
|
|
||||||
void DivPlatformOPLL::reset() {
|
void DivPlatformOPLL::reset() {
|
||||||
|
@ -1042,7 +1042,7 @@ void DivPlatformOPLL::reset() {
|
||||||
if (selCore==1) {
|
if (selCore==1) {
|
||||||
OPLL_reset(fm_emu);
|
OPLL_reset(fm_emu);
|
||||||
OPLL_setChipType(fm_emu,vrc7?1:0);
|
OPLL_setChipType(fm_emu,vrc7?1:0);
|
||||||
OPLL_resetPatch(fm_emu,nukedToEmuPatch[patchSet&3]);
|
OPLL_resetPatch(fm_emu,vrc7?1:nukedToEmuPatch[patchSet&3]);
|
||||||
}
|
}
|
||||||
for (int i=0; i<11; i++) {
|
for (int i=0; i<11; i++) {
|
||||||
chan[i]=DivPlatformOPLL::Channel();
|
chan[i]=DivPlatformOPLL::Channel();
|
||||||
|
|
Loading…
Reference in a new issue