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-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 */
49#pragma once
50
51#ifndef SLOT_H_
52#define SLOT_H_
53
54#include <stdbool.h>
55#include <stdint.h>
56#include <stddef.h>
57
71void slot_iterate(void (*callback)(uint8_t slot, void * arg), void * arg);
72
84int slot_bcmp(uint8_t slot, const void * addr, const void * s, size_t len);
85
102bool slot_is_read_only(uint8_t slot, void * addr);
103
110bool slot_is_MAIN_ROM(uint8_t slot);
111
118bool slot_is_SUB_ROM(uint8_t slot);
119
131bool slot_is_RAM(uint8_t slot);
132
139bool slot_is_internal_OPLL(uint8_t slot);
140
147bool slot_is_FMPAC(uint8_t slot);
148
155bool slot_is_OPLL(uint8_t slot);
156
163bool slot_is_SCC(uint8_t slot);
164
171bool slot_is_SCCPlus(uint8_t slot);
172
179bool slot_is_BDOS(uint8_t slot);
180
190bool slot_is_ROM_p1(uint8_t slot);
191
201bool slot_is_ROM_p2(uint8_t slot);
202
213bool slot_is_ROM(uint8_t slot);
214
217#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.