libmsx
C library for MSX
Loading...
Searching...
No Matches
opll.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2024 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
26#pragma once
27
28#ifndef OPLL_H_
29#define OPLL_H_
30
31#include <stdint.h>
32
64 void (* const write)(uint8_t reg, uint8_t value);
65};
66
74struct OPLL {
78 uint8_t slot;
85 uint8_t version;
89 const struct OPLL_Device * device;
90};
91
103uint8_t OPLL_inspect(uint8_t slot);
104
120uint8_t OPLL_find(struct OPLL * opll);
121
132void OPLL_enable(const struct OPLL * opll);
133
144void OPLL_disable(const struct OPLL * opll);
145
148#endif // OPLL_H_
const struct OPLL_Device * device
Pointer to device interface.
Definition opll.h:89
uint8_t version
Version/Identifier of the OPLL.
Definition opll.h:85
uint8_t slot
Slot address of the OPLL.
Definition opll.h:78
void OPLL_disable(const struct OPLL *opll)
MSX Disable OPLL sound chip.
uint8_t OPLL_find(struct OPLL *opll)
MSX Find OPLL sound chip.
uint8_t OPLL_inspect(uint8_t slot)
MSX Inspect whether OPLL is on the given slot.
void OPLL_enable(const struct OPLL *opll)
MSX Enable OPLL sound chip.
OPLL Handle.
Definition opll.h:74
Device interface for OPLL sound chip.
Definition opll.h:49
void(*const write)(uint8_t reg, uint8_t value)
MSX Function pointer to write data to a OPLL register.
Definition opll.h:64