libmsx
C library for MSX
Loading...
Searching...
No Matches
Direct access to banked memory by switching page 2.

APIs for direct access to 16KiB segments of banked memory. More...

+ Collaboration diagram for Direct access to banked memory by switching page 2.:

Typedefs

typedef uint32_t bmemptr_t
 Type of an address of banked memory.
 

Functions

uint8_t bmem_bank_of (bmemptr_t loc)
 Returns the segment number corresponding to the specified address of the banked memory.
 
uint8_t bmem_get_bank (void) __naked
 Get the current segment number of banked memory at page 2 (0x8000..0xbfff).
 
void bmem_set_bank (uint8_t bank) __naked
 Expose a 16KiB segment of banked memory at page 2 (0x8000..0xbfff).
 

Detailed Description

APIs for direct access to 16KiB segments of banked memory.

Typedef Documentation

◆ bmemptr_t

typedef uint32_t bmemptr_t

Type of an address of banked memory.

Definition at line 74 of file bmem.h.

Function Documentation

◆ bmem_bank_of()

uint8_t bmem_bank_of ( bmemptr_t  loc)
inline

Returns the segment number corresponding to the specified address of the banked memory.

Returns
the segment number corresponding to loc.

Definition at line 82 of file bmem.h.

◆ bmem_get_bank()

uint8_t bmem_get_bank ( void  )

Get the current segment number of banked memory at page 2 (0x8000..0xbfff).

Returns
the current segment number.

◆ bmem_set_bank()

void bmem_set_bank ( uint8_t  bank)

Expose a 16KiB segment of banked memory at page 2 (0x8000..0xbfff).

Parameters
bankthe segment number.