libmsx
C library for MSX
Loading...
Searching...
No Matches
psg.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 */
21#pragma once
22
23#ifndef PSG_H
24#define PSG_H
25
26#include <stdint.h>
27
28#include "io.h"
29
40extern const uint8_t psg_reg_initial_vector[14];
41
45void psg_init(void);
46
52uint8_t psg_get(uint8_t reg);
53
60void psg_set(uint8_t reg, uint8_t val);
61
64#endif
void psg_init(void)
MSX Initialize PSG registers R#0 to R#13 with psg_reg_initial_vector.
uint8_t psg_get(uint8_t reg)
MSX Read the PSG register value.
const uint8_t psg_reg_initial_vector[14]
Initial values for PSG registers R#0 to R#13.
void psg_set(uint8_t reg, uint8_t val)
MSX Write the PSG register value.
Definition of I/O ports.