From 16be4100808e09a94e802adb58bc1c79e5eefd65 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Tue, 14 Mar 2017 19:07:57 +0900 Subject: libopna: enable register read --- libopna/opna.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libopna/opna.c') 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); -- cgit v1.2.3