2016-01-28 11:39:49 +00:00
|
|
|
struct CPU : Processor::V30MZ, Thread, IO {
|
2016-01-27 11:31:39 +00:00
|
|
|
static auto Enter() -> void;
|
|
|
|
|
|
|
|
auto main() -> void;
|
2016-01-28 11:39:49 +00:00
|
|
|
auto step(uint clocks) -> void;
|
|
|
|
|
|
|
|
auto wait(uint clocks = 1) -> void override;
|
|
|
|
auto read(uint20 addr) -> uint8 override;
|
|
|
|
auto write(uint20 addr, uint8 data) -> void override;
|
2016-01-30 06:40:35 +00:00
|
|
|
auto in(uint16 port) -> uint8 override;
|
|
|
|
auto out(uint16 port, uint8 data) -> void override;
|
2016-01-28 11:39:49 +00:00
|
|
|
|
2016-01-27 11:31:39 +00:00
|
|
|
auto power() -> void;
|
|
|
|
|
2016-01-28 11:39:49 +00:00
|
|
|
//memory.cpp
|
|
|
|
auto ramRead(uint16 addr) -> uint8;
|
|
|
|
auto ramWrite(uint16 addr, uint8 data) -> void;
|
|
|
|
|
2016-01-30 06:40:35 +00:00
|
|
|
auto portRead(uint16 addr) -> uint8 override;
|
|
|
|
auto portWrite(uint16 addr, uint8 data) -> void override;
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CPU cpu;
|