| 1 |
struct CPU : Processor::ARM, Thread, MMIO { |
| 2 |
uint8* iwram; |
| 3 |
uint8* ewram; |
| 4 |
#include "registers.hpp" |
| 5 |
#include "state.hpp" |
| 6 |
|
| 7 |
static void Enter(); |
| 8 |
void main(); |
| 9 |
void step(unsigned clocks); |
| 10 |
void sync_step(unsigned clocks); |
| 11 |
|
| 12 |
void bus_idle(uint32 addr); |
| 13 |
uint32 bus_read(uint32 addr, uint32 size); |
| 14 |
void bus_write(uint32 addr, uint32 size, uint32 word); |
| 15 |
|
| 16 |
void keypad_run(); |
| 17 |
void power(); |
| 18 |
|
| 19 |
uint8 read(uint32 addr); |
| 20 |
void write(uint32 addr, uint8 byte); |
| 21 |
|
| 22 |
uint32 iwram_read(uint32 addr, uint32 size); |
| 23 |
void iwram_write(uint32 addr, uint32 size, uint32 word); |
| 24 |
|
| 25 |
uint32 ewram_read(uint32 addr, uint32 size); |
| 26 |
void ewram_write(uint32 addr, uint32 size, uint32 word); |
| 27 |
|
| 28 |
void dma_run(); |
| 29 |
void dma_transfer(Registers::DMA &dma); |
| 30 |
void dma_vblank(); |
| 31 |
void dma_hblank(); |
| 32 |
void dma_hdma(); |
| 33 |
|
| 34 |
void timer_step(unsigned clocks); |
| 35 |
void timer_increment(unsigned n); |
| 36 |
void timer_fifo_run(unsigned n); |
| 37 |
|
| 38 |
void serialize(serializer&); |
| 39 |
CPU(); |
| 40 |
~CPU(); |
| 41 |
}; |
| 42 |
|
| 43 |
extern CPU cpu; |