libmsx
C library for MSX
Loading...
Searching...
No Matches
A part of building blocks for inter-memory transfer, dedicated to Banked Memory access.

Building blocks for copying and transferring data between different types of memory devices. More...

+ Collaboration diagram for A part of building blocks for inter-memory transfer, dedicated to Banked Memory access.:

Files

file  bmem_rd.h
 Stream like access functions for Banked Memory.
 

Functions

bool bmem_is_opened (void)
 MSX Tests whether Banked Memory accessor is opened or not.
 
void bmem_open (bmemptr_t loc)
 MSX Open Banked Memory accessor.
 
void bmem_close (void)
 MSX Close Banked Memory accessor.
 
size_t bmem_avail (void)
 Return the size of remaining bytes in the current segment.
 
void bmem_ensure (void)
 Ensure the internal pointer points the current position.
 
const uint8_t * bmem_ptr (void)
 Get the internal pointer value of Banked Memory accessor.
 
void bmem_skip (size_t len)
 Advance the current position of Banked Memory accessor.
 
void bmem_next_segment (void)
 Switch to next segment.
 
void bmem_read_chunk (uint8_t *dst, size_t len)
 Read a chunk from Banked Memory.
 
uint8_t bmem_read_byte (void)
 Read an octet from Banked Memory.
 

Detailed Description

Building blocks for copying and transferring data between different types of memory devices.

#include <bmem_rd.h>

Function Documentation

◆ bmem_is_opened()

bool bmem_is_opened ( void  )

MSX Tests whether Banked Memory accessor is opened or not.

Returns
whether Banked Memory accessor is opened or not.

◆ bmem_open()

void bmem_open ( bmemptr_t  loc)

MSX Open Banked Memory accessor.

Parameters
locbase address.
Precondition
!bmem_is_opened()

◆ bmem_close()

void bmem_close ( void  )

MSX Close Banked Memory accessor.

Precondition
bmem_is_opened()

◆ bmem_avail()

size_t bmem_avail ( void  )

Return the size of remaining bytes in the current segment.

Returns
the size of remaining bytes in the current segment.
Precondition
bmem_is_opened()

◆ bmem_ensure()

void bmem_ensure ( void  )

Ensure the internal pointer points the current position.

Precondition
bmem_is_opened()

◆ bmem_ptr()

const uint8_t * bmem_ptr ( void  )

Get the internal pointer value of Banked Memory accessor.

Returns
the internal pointer value.
Precondition
bmem_is_opened()

◆ bmem_skip()

void bmem_skip ( size_t  len)

Advance the current position of Banked Memory accessor.

Parameters
lennumber of bytes.
Precondition
bmem_is_opened()

◆ bmem_next_segment()

void bmem_next_segment ( void  )

Switch to next segment.

Precondition
bmem_is_opened()

◆ bmem_read_chunk()

void bmem_read_chunk ( uint8_t *  dst,
size_t  len 
)

Read a chunk from Banked Memory.

Parameters
dstdestination base address.
lennumber of bytes to be copied.
Precondition
bmem_is_opened()

◆ bmem_read_byte()

uint8_t bmem_read_byte ( void  )

Read an octet from Banked Memory.

Returns
a value read from Banked Memory.
Precondition
bmem_is_opened()