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-2025 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 */
27#pragma once
28
29#ifndef OPLL_H_
30#define OPLL_H_
31
32#include <stdint.h>
33
65 void (* const write)(uint8_t reg, uint8_t value);
66};
67
75struct OPLL {
79 uint8_t slot;
86 uint8_t version;
90 const struct OPLL_Device * device;
91};
92
104uint8_t OPLL_inspect(uint8_t slot);
105
121uint8_t OPLL_find(struct OPLL * opll);
122
133void OPLL_enable(const struct OPLL * opll);
134
145void OPLL_disable(const struct OPLL * opll);
146
149#endif // OPLL_H_
const struct OPLL_Device * device
Pointer to device interface.
Definition opll.h:90
uint8_t version
Version/Identifier of the OPLL.
Definition opll.h:86
void(*const write)(uint8_t reg, uint8_t value)
MSX Function pointer to write data to a OPLL register.
Definition opll.h:65
uint8_t slot
Slot address of the OPLL.
Definition opll.h:79
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:75
Device interface for OPLL sound chip.
Definition opll.h:50