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-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 */
22#pragma once
23
24#ifndef PSG_H
25#define PSG_H
26
27#include <stdint.h>
28
29#include "io.h"
30
41extern const uint8_t psg_reg_initial_vector[14];
42
46void psg_init(void);
47
53uint8_t psg_get(uint8_t reg);
54
61void psg_set(uint8_t reg, uint8_t val);
62
65#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.