libmsx
C library for MSX
Loading...
Searching...
No Matches
slot.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 */
50#pragma once
51
52#ifndef SLOT_H_
53#define SLOT_H_
54
55#include <stdbool.h>
56#include <stdint.h>
57#include <stddef.h>
58
72void slot_iterate(void (*callback)(uint8_t slot, void * arg), void * arg);
73
85int slot_bcmp(uint8_t slot, const void * addr, const void * s, size_t len);
86
103bool slot_is_read_only(uint8_t slot, void * addr);
104
111bool slot_is_MAIN_ROM(uint8_t slot);
112
119bool slot_is_SUB_ROM(uint8_t slot);
120
132bool slot_is_RAM(uint8_t slot);
133
140bool slot_is_internal_OPLL(uint8_t slot);
141
148bool slot_is_FMPAC(uint8_t slot);
149
156bool slot_is_OPLL(uint8_t slot);
157
164bool slot_is_SCC(uint8_t slot);
165
172bool slot_is_SCCPlus(uint8_t slot);
173
180bool slot_is_BDOS(uint8_t slot);
181
191bool slot_is_ROM_p1(uint8_t slot);
192
202bool slot_is_ROM_p2(uint8_t slot);
203
214bool slot_is_ROM(uint8_t slot);
215
218#endif // SLOT_H_
bool slot_is_BDOS(uint8_t slot)
MSX Inspects if the slot is a BDOS/FDC.
bool slot_is_SCCPlus(uint8_t slot)
MSX Inspects if the slot is a Konami SCC+.
void slot_iterate(void(*callback)(uint8_t slot, void *arg), void *arg)
MSX For each slot, invoke the given callback with the given arguments.
bool slot_is_ROM_p2(uint8_t slot)
MSX Inspects if the slot is a ROM starting at 0x8000.
bool slot_is_SCC(uint8_t slot)
MSX Inspects if the slot is a Konami SCC/SCC+.
bool slot_is_internal_OPLL(uint8_t slot)
MSX Inspects if the slot is the internal MSX-MUSIC.
bool slot_is_ROM_p1(uint8_t slot)
MSX Inspects if the slot is a ROM starting at 0x4000.
bool slot_is_MAIN_ROM(uint8_t slot)
MSX Inspects if the slot is MAIN ROM.
int slot_bcmp(uint8_t slot, const void *addr, const void *s, size_t len)
MSX Compare the byte sequence to the one present at the given address in the given slot.
bool slot_is_SUB_ROM(uint8_t slot)
MSX Inspects if the slot is SUB ROM.
bool slot_is_OPLL(uint8_t slot)
MSX Inspects if the slot is a MSX-MUSIC.
bool slot_is_RAM(uint8_t slot)
MSX Inspects if the slot is RAM.
bool slot_is_ROM(uint8_t slot)
MSX Inspects if the slot is a ROM starting at 0x4000 or 0x8000.
bool slot_is_read_only(uint8_t slot, void *addr)
MSX Tests whether a given memory address of the given slot is read-only.
bool slot_is_FMPAC(uint8_t slot)
MSX Inspects if the slot is the FMPAC.