libmsx
C library for MSX
Loading...
Searching...
No Matches
scc_buf.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 */
22#pragma once
23
24#ifndef SCC_BUF_H_
25#define SCC_BUF_H_
26
27#include <scc.h>
28
45struct SCC_buffer {
47 uint16_t fdr[5];
49 uint8_t volume[5];
51 uint8_t channel_mask;
52};
53
56 uint8_t updated;
58 int8_t waveform[5][32];
59};
60
67
73extern struct SCC_buffer scc_buffer;
74
80void SCC_init(void);
81
95void SCC_set_waveform(uint8_t ch, const int8_t waveform[32]);
96
112void SCC_stop(struct SCC * scc);
113
127void SCC_play(struct SCC * scc);
128
131#endif // SCC_BUF_H_
int8_t waveform[5][32]
Waveform for each of five channels.
Definition scc_buf.h:58
uint8_t updated
Update-bit for each of five channels.
Definition scc_buf.h:56
uint8_t channel_mask
Enable / Disable bit for each of the five channels.
Definition scc_buf.h:51
uint8_t volume[5]
Volume (0-15) for each of the five channels.
Definition scc_buf.h:49
uint16_t fdr[5]
Frequency division ratio for each of the five channels.
Definition scc_buf.h:47
void SCC_init(void)
MSX Initialize scc_buffer and internal waveform buffer.
struct SCC_wave_buffer scc_wave_buffer
MSX Buffer for SCC/SCC+ waveform registers.
void SCC_set_waveform(uint8_t ch, const int8_t waveform[32])
MSX Set waveform to the internal waveform buffer, for the specified channel.
void SCC_play(struct SCC *scc)
MSX Play sound on SCC/SCC+.
void SCC_stop(struct SCC *scc)
MSX Stop (Pause) playing sound on SCC/SCC+.
struct SCC_buffer scc_buffer
MSX Buffer for SCC/SCC+ registers (except for waveform registers).
SCC Handle.
Definition scc.h:106
Device interface for Konami SCC/SCC+ sound cartridge.