initial OPZ bring-up

even emulation is incomplete and one thing is making me tired...
This commit is contained in:
tildearrow 2022-04-06 22:56:06 -05:00
parent 9345576fc3
commit 530327383a
8 changed files with 876 additions and 5 deletions

View file

@ -270,6 +270,7 @@ bool opz_registers::write(uint16_t index, uint8_t data, uint32_t &channel, uint3
bool is_setting_preset = (bitfield(m_regdata[0x100 + (index & 0x1f)], 7) != 0);
if (is_setting_preset)
{
//printf("ISP\n");
if ((index & 0xe0) == 0xe0)
{
m_regdata[0x140 + (index & 0x1f)] = data;
@ -280,10 +281,14 @@ bool opz_registers::write(uint16_t index, uint8_t data, uint32_t &channel, uint3
}
// handle writes to the key on index
if ((index & 0xf8) == 0x20 && bitfield(index, 0, 3) == bitfield(m_regdata[0x08], 0, 3))
// note from tildearrow:
// - are you kidding? I have to write to this "load preset" register before keying on?
if ((index & 0xf8) == 0x20 /*&& bitfield(index, 0, 3) == bitfield(m_regdata[0x08], 0, 3)*/)
{
channel = bitfield(index, 0, 3);
opmask = ch_key_on(channel) ? 0xf : 0;
//printf("%d opmask is %d\n",opmask,channel);
// according to the TX81Z manual, the sync option causes the LFOs
// to reset at each note on