aaronsgiles / ymfm

BSD-licensed Yamaha FM sound cores (OPM, OPN, OPL, and others)
BSD 3-Clause "New" or "Revised" License
265 stars 41 forks source link

OPNA: fixed reading ADPCM reg #34

Closed hyano closed 2 years ago

hyano commented 2 years ago

This patch is a part of fix I send in PR #31.

I splitted the following commit into 2 comits and it is for reading ADPCM register OPNA/ADPCM: fixed reading reg values and external data

In case of ADPCM register accessing, m_address is ORed with 0x100. Should be masked for range check.

void ymf288::write_address_hi(uint8_t data)
{
    // just set the address
    m_address = 0x100 | data;

P.S. For reading external data, I'll send with another PR.