Building blocks for copying and transferring data between different types of memory devices.
More...
|
file | vmem_rw.h |
| Stream like access functions for VRAM.
|
|
|
bool | vmem_is_opened (void) |
| MSX Tests whether VRAM accessor is opened or not.
|
|
void | vmem_open (vmemptr_t loc) |
| MSX Open VRAM accessor.
|
|
void | vmem_close (void) |
| MSX Close VRAM accessor.
|
|
void | vmem_dup (uint16_t offset, size_t len) |
| MSX Duplicate a byte sequence of VRAM starting from the specified offset to current position and later.
|
|
vmemptr_t | vmem_ptr (void) |
| Get current position of VRAM accessor.
|
|
void | vmem_skip (size_t len) |
| Advance the current position of VRAM accessor.
|
|
void | vmem_write_chunk (const uint8_t *src, uint16_t len) |
| Write a chunk to VRAM.
|
|
void | vmem_read_chunk (uint8_t *dst, uint16_t len) |
| Read a chunk from VRAM.
|
|
Building blocks for copying and transferring data between different types of memory devices.
#include <vmem_rw.h>
◆ vmem_is_opened()
bool vmem_is_opened |
( |
void |
| ) |
|
MSX
Tests whether VRAM accessor is opened or not.
- Returns
- whether VRAM accessor is opened or not.
◆ vmem_open()
MSX
Open VRAM accessor.
- Parameters
-
- Precondition
!vmem_is_opened()
◆ vmem_close()
◆ vmem_dup()
void vmem_dup |
( |
uint16_t |
offset, |
|
|
size_t |
len |
|
) |
| |
MSX
Duplicate a byte sequence of VRAM starting from the specified offset to current position and later.
A data in range of [p - offset, p - offset + len)
of VRAM will be copied to [p, p + len)
, where p
is current position. If both area overlaps, repetition is occur.
For example, if the byte in p-1
is X
, then vmem_dup(1, 3)
copies X
to p
, p+1
, p+2
and p
is increased by 3
.
- Parameters
-
offset | distance from the current position. |
len | length in bytes. |
- Precondition
vmem_is_opened()
◆ vmem_ptr()
Get current position of VRAM accessor.
- Returns
- current position.
- Precondition
- vmem_is_opened()
- Note
- internal use only.
◆ vmem_skip()
void vmem_skip |
( |
size_t |
len | ) |
|
Advance the current position of VRAM accessor.
- Parameters
-
- Precondition
- vmem_is_opened()
◆ vmem_write_chunk()
void vmem_write_chunk |
( |
const uint8_t * |
src, |
|
|
uint16_t |
len |
|
) |
| |
◆ vmem_read_chunk()
void vmem_read_chunk |
( |
uint8_t * |
dst, |
|
|
uint16_t |
len |
|
) |
| |