libmsx
C library for MSX
Loading...
Searching...
No Matches
vmem_rw.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 VMEM_RW_H_
18#define VMEM_RW_H_
19
20#include "vmem.h"
21
22#include <stdbool.h>
23
34// A part of building blocks for heterogeneous memory architechture, dedicated
35// to VRAM access.
36
42bool vmem_is_opened(void);
43
52
58void vmem_close(void);
59
76void vmem_dup(uint16_t offset, size_t len);
77
78// internal functions
79
90
98void vmem_skip(size_t len);
99
111void vmem_write_chunk(const uint8_t * src, uint16_t len);
112
124void vmem_read_chunk(uint8_t * dst, uint16_t len);
125
128#endif // VMEM_RW_H_
uint32_t vmemptr_t
Type for VRAM address.
Definition vmem.h:42
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 late...
void vmem_close(void)
MSX Close VRAM accessor.
void vmem_open(vmemptr_t loc)
MSX Open VRAM accessor.
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.
bool vmem_is_opened(void)
MSX Tests whether VRAM accessor is opened or not.
Data types and functions for VRAM access.