libmsx
C library for MSX
Loading...
Searching...
No Matches
bmem_rd.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2024 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
17#ifndef BMEM_RD_H_
18#define BMEM_RD_H_
19
20#include "bmem.h"
21
22#include <stdbool.h>
23#include <stddef.h>
24#include <stdint.h>
25
41bool bmem_is_opened(void);
42
51
57void bmem_close(void);
58
66size_t bmem_avail(void);
67
73void bmem_ensure(void);
74
82const uint8_t * bmem_ptr(void);
83
91void bmem_skip(size_t len);
92
99
108void bmem_read_chunk(uint8_t * dst, size_t len);
109
117uint8_t bmem_read_byte(void);
118
121#endif // BMEM_RD_H_
Data types and functions for accessing banked memory.
uint32_t bmemptr_t
Type of an address of banked memory.
Definition bmem.h:74
void bmem_open(bmemptr_t loc)
MSX Open Banked Memory accessor.
void bmem_next_segment(void)
Switch to next segment.
const uint8_t * bmem_ptr(void)
Get the internal pointer value of Banked Memory accessor.
bool bmem_is_opened(void)
MSX Tests whether Banked Memory accessor is opened or not.
void bmem_skip(size_t len)
Advance the current position of Banked Memory accessor.
void bmem_ensure(void)
Ensure the internal pointer points the current position.
uint8_t bmem_read_byte(void)
Read an octet from Banked Memory.
size_t bmem_avail(void)
Return the size of remaining bytes in the current segment.
void bmem_close(void)
MSX Close Banked Memory accessor.
void bmem_read_chunk(uint8_t *dst, size_t len)
Read a chunk from Banked Memory.