19 lines
No EOL
528 B
C
19 lines
No EOL
528 B
C
#ifndef ADDRESS_SPACE_H
|
|
#define ADDRESS_SPACE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
struct AddressSpace_s {
|
|
uint8_t *rom;
|
|
uint32_t romSize;
|
|
uint8_t *ram;
|
|
uint32_t ramSize;
|
|
};
|
|
|
|
typedef struct AddressSpace_s AddressSpace;
|
|
|
|
AddressSpace *create_address_space(const uint32_t romSize, const uint32_t ramSize);
|
|
int read_address_space(const AddressSpace *addressSpace, const uint32_t address, const int n, void *dest);
|
|
int write_address_space(const AddressSpace *addressSpace, const uint32_t address, const int n, void *src);
|
|
|
|
#endif |