diff options
Diffstat (limited to 'libopna/opna.c')
-rw-r--r-- | libopna/opna.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopna/opna.c b/libopna/opna.c index fb9e24a..10155d0 100644 --- a/libopna/opna.c +++ b/libopna/opna.c @@ -17,6 +17,11 @@ void opna_writereg(struct opna *opna, unsigned reg, unsigned val) { opna_adpcm_writereg(&opna->adpcm, reg, val); } +unsigned opna_readreg(const struct opna *opna, unsigned reg) { + if (reg > 0xfu) return 0xff; + return opna_ssg_readreg(&opna->ssg, reg); +} + void opna_mix(struct opna *opna, int16_t *buf, unsigned samples) { opna_fm_mix(&opna->fm, buf, samples); opna_ssg_mix_55466(&opna->ssg, &opna->resampler, buf, samples); |