1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-10-31 13:07:14 +00:00

Add the aforementioned read/write sig changes

oops
This commit is contained in:
Peter Evans 2018-01-02 16:26:11 -06:00
parent 834959c10a
commit e967e9a5c7
2 changed files with 13 additions and 4 deletions

9
include/apple2.mem.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef _APPLE2_MEM_H_
#define _APPLE2_MEM_H_
#include "vm_segment.h"
extern vm_8bit apple2_mem_read_bank(vm_segment *, size_t);
extern void apple2_mem_write_bank(vm_segment *, size_t, vm_8bit);
#endif

View File

@ -19,8 +19,8 @@ typedef struct vm_segment vm_segment;
*
* C is fun! Don't let anyone tell you otherwise.
*/
typedef vm_8bit (*vm_segment_read_fn)(vm_segment *, size_t);
typedef void (*vm_segment_write_fn)(vm_segment *, size_t, vm_8bit);
typedef vm_8bit (*vm_segment_read_fn)(vm_segment *, size_t, void *);
typedef void (*vm_segment_write_fn)(vm_segment *, size_t, vm_8bit, void *);
/*
* The bounds check is just some inline code to try and cut down on the
@ -55,9 +55,9 @@ struct vm_segment {
extern int vm_segment_copy(vm_segment *, vm_segment *, size_t, size_t, size_t);
extern int vm_segment_fread(vm_segment *, FILE *, size_t);
extern int vm_segment_read_map(vm_segment *, size_t, vm_segment_read_fn);
extern int vm_segment_read_map(vm_segment *, size_t, void *, vm_segment_read_fn);
extern int vm_segment_set(vm_segment *, size_t, vm_8bit);
extern int vm_segment_write_map(vm_segment *, size_t, vm_segment_write_fn);
extern int vm_segment_write_map(vm_segment *, size_t, void *, vm_segment_write_fn);
extern vm_8bit vm_segment_get(vm_segment *, size_t);
extern vm_segment *vm_segment_create(size_t);
extern void vm_segment_free(vm_segment *);