1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-06-01 05:41:27 +00:00
rk65c02/src/bus.h

32 lines
623 B
C
Raw Permalink Normal View History

2017-01-16 18:35:28 +00:00
#ifndef _BUS_H_
#define _BUS_H_
#include <stdint.h>
#include <stdbool.h>
2017-01-16 18:35:28 +00:00
#include "device.h"
2017-01-16 18:35:28 +00:00
#define RK65C02_BUS_SIZE 64*1024
struct bus_tag {
2017-02-20 11:31:26 +00:00
device_mapping_t *dm_head;
bool access_debug;
2017-01-16 18:35:28 +00:00
};
typedef struct bus_tag bus_t;
uint8_t bus_read_1(bus_t *, uint16_t);
void bus_write_1(bus_t *, uint16_t, uint8_t);
bus_t bus_init(void);
bus_t bus_init_with_default_devs(void);
void bus_finish(bus_t *);
bool bus_load_file(bus_t *, uint16_t, const char *);
bool bus_load_buf(bus_t *, uint16_t, uint8_t *, uint16_t);
2017-01-16 18:35:28 +00:00
void bus_device_add(bus_t *, device_t *, uint16_t);
void bus_device_dump(bus_t *);
2017-01-16 18:35:28 +00:00
#endif /* _BUS_H_ */