2017-01-16 18:35:28 +00:00
|
|
|
#ifndef _BUS_H_
|
|
|
|
#define _BUS_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2017-01-18 23:57:09 +00:00
|
|
|
#include <stdbool.h>
|
2017-01-16 18:35:28 +00:00
|
|
|
|
2017-02-19 20:45:15 +00:00
|
|
|
#include "device.h"
|
|
|
|
|
2017-01-16 18:35:28 +00:00
|
|
|
#define RK65C02_BUS_SIZE 64*1024
|
|
|
|
|
|
|
|
struct bus_tag {
|
2017-02-19 20:45:15 +00:00
|
|
|
device_t *device_head;
|
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();
|
2017-01-16 21:55:42 +00:00
|
|
|
void bus_finish(bus_t *);
|
2017-01-18 23:57:09 +00:00
|
|
|
bool bus_load_file(bus_t *, uint16_t, const char *);
|
2017-02-02 11:06:41 +00:00
|
|
|
bool bus_load_buf(bus_t *, uint16_t, uint8_t *, uint16_t);
|
2017-01-16 18:35:28 +00:00
|
|
|
|
|
|
|
#endif /* _BUS_H_ */
|
|
|
|
|