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

Data types and functions for accessing banked memory. More...

#include <stdint.h>
#include <vmem.h>
+ Include dependency graph for bmem.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BMEM_H_
 

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).
 
uint8_t bmem_get (bmemptr_t src)
 Read byte from banked memory.
 
uint16_t bmem_get_u16 (bmemptr_t src)
 Read 16-bits value from banked memory.
 
void bmem_read (bmemptr_t src, void *dst, uint16_t len)
 Read byte sequence from banked memory.
 
void bmem_copy_to_vmem (bmemptr_t src, vmemptr_t dst, uint32_t len)
 Copy from banked memory to VRAM.
 
void bmem_bload_s (bmemptr_t src)
 Load a BSAVE formatted binary in banked memory into VRAM.
 

Detailed Description

Data types and functions for accessing banked memory.

Definition in file bmem.h.