libmsx
C library for MSX
Loading...
Searching...
No Matches

Inspect the slot mechanism of MSX. More...

+ Collaboration diagram for Slot inspection:

Functions

void slot_iterate (void(*callback)(uint8_t slot, void *arg), void *arg)
 MSX For each slot, invoke the given callback with the given arguments.
 
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_read_only (uint8_t slot, void *addr)
 MSX Tests whether a given memory address of the given slot is read-only.
 
bool slot_is_MAIN_ROM (uint8_t slot)
 MSX Inspects if the slot is MAIN ROM.
 
bool slot_is_SUB_ROM (uint8_t slot)
 MSX Inspects if the slot is SUB ROM.
 
bool slot_is_RAM (uint8_t slot)
 MSX Inspects if the slot is RAM.
 
bool slot_is_internal_OPLL (uint8_t slot)
 MSX Inspects if the slot is the internal MSX-MUSIC.
 
bool slot_is_FMPAC (uint8_t slot)
 MSX Inspects if the slot is the FMPAC.
 
bool slot_is_OPLL (uint8_t slot)
 MSX Inspects if the slot is a MSX-MUSIC.
 
bool slot_is_SCC (uint8_t slot)
 MSX Inspects if the slot is a Konami SCC/SCC+.
 
bool slot_is_SCCPlus (uint8_t slot)
 MSX Inspects if the slot is a Konami SCC+.
 
bool slot_is_BDOS (uint8_t slot)
 MSX Inspects if the slot is a BDOS/FDC.
 
bool slot_is_ROM_p1 (uint8_t slot)
 MSX Inspects if the slot is a ROM starting at 0x4000.
 
bool slot_is_ROM_p2 (uint8_t slot)
 MSX Inspects if the slot is a ROM starting at 0x8000.
 
bool slot_is_ROM (uint8_t slot)
 MSX Inspects if the slot is a ROM starting at 0x4000 or 0x8000.
 

Detailed Description

Inspect the slot mechanism of MSX.

Function Documentation

◆ slot_iterate()

void slot_iterate ( void(*)(uint8_t slot, void *arg)  callback,
void *  arg 
)

MSX For each slot, invoke the given callback with the given arguments.

Parameters
callbacka user defined callback function that takes slot and arg.
argargument to be passed to the callback.

◆ slot_bcmp()

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.

Parameters
slotslot address of the one compared to.
addraddress of the one compared to.
spointer to the byte sequence.
lenlength of the byte sequence.
Returns
0 if two byte sequence is same (or len was 0), otherwise non-zero value.

◆ slot_is_read_only()

bool slot_is_read_only ( uint8_t  slot,
void *  addr 
)

MSX Tests whether a given memory address of the given slot is read-only.

This tests, in exact, whether a value read from the address is differ from the value written before.

In other words, if it returns false, it means that the memory address is RAM or a typical R/W register. However, if it returns true, it does not necessarily mean that the memory address is read-only, but could be a write-only register, for example.

Parameters
slotslot address
addraddress
Returns
true if it seems not a RAM, false otherwise.

◆ slot_is_MAIN_ROM()

bool slot_is_MAIN_ROM ( uint8_t  slot)

MSX Inspects if the slot is MAIN ROM.

Parameters
slota slot address.
Returns
true if the slot is MAIN ROM.

◆ slot_is_SUB_ROM()

bool slot_is_SUB_ROM ( uint8_t  slot)

MSX Inspects if the slot is SUB ROM.

Parameters
slota slot address.
Returns
true if the slot is SUB ROM.

◆ slot_is_RAM()

bool slot_is_RAM ( uint8_t  slot)

MSX Inspects if the slot is RAM.

Parameters
slota slot address.
Returns
true if the slot is RAM.
Note
Since page 3 of the default internal RAM is always selected, this test only tests if the specified slot is the same as the slot selected on page 3 (0xC000.0xFFFF). However, maybe there is extra RAM in other slots.

◆ slot_is_internal_OPLL()

bool slot_is_internal_OPLL ( uint8_t  slot)

MSX Inspects if the slot is the internal MSX-MUSIC.

Parameters
slota slot address.
Returns
true if the slot is the internal MSX-MUSIC.

◆ slot_is_FMPAC()

bool slot_is_FMPAC ( uint8_t  slot)

MSX Inspects if the slot is the FMPAC.

Parameters
slota slot address.
Returns
true if the slot is the FMPAC.

◆ slot_is_OPLL()

bool slot_is_OPLL ( uint8_t  slot)

MSX Inspects if the slot is a MSX-MUSIC.

Parameters
slota slot address.
Returns
true if the slot is a MSX-MUSIC.

◆ slot_is_SCC()

bool slot_is_SCC ( uint8_t  slot)

MSX Inspects if the slot is a Konami SCC/SCC+.

Parameters
slota slot address.
Returns
true if the slot is a Konami SCC/SCC+.

◆ slot_is_SCCPlus()

bool slot_is_SCCPlus ( uint8_t  slot)

MSX Inspects if the slot is a Konami SCC+.

Parameters
slota slot address.
Returns
true if the slot is a Konami SCC+.

◆ slot_is_BDOS()

bool slot_is_BDOS ( uint8_t  slot)

MSX Inspects if the slot is a BDOS/FDC.

Parameters
slota slot address.
Returns
true if the slot is a BDOS/FDC.

◆ slot_is_ROM_p1()

bool slot_is_ROM_p1 ( uint8_t  slot)

MSX Inspects if the slot is a ROM starting at 0x4000.

Parameters
slota slot address.
Returns
true if the slot is a ROM starting at 0x4000.
Note
This test only tests if a ROM header exists at 0x4000 of the specified slot.

◆ slot_is_ROM_p2()

bool slot_is_ROM_p2 ( uint8_t  slot)

MSX Inspects if the slot is a ROM starting at 0x8000.

Parameters
slota slot address.
Returns
true if the slot is a ROM starting at 0x8000.
Note
This test only tests if a ROM header exists at 0x8000 of the specified slot.

◆ slot_is_ROM()

bool slot_is_ROM ( uint8_t  slot)

MSX Inspects if the slot is a ROM starting at 0x4000 or 0x8000.

Parameters
slota slot address.
Returns
true if the slot is a ROM starting at 0x4000 or 0x8000.
Note
This test only tests if a ROM header exists at 0x4000 or 0x8000 of the specified slot.