|
|
1.1 root 1: //
2: // nono
1.1.1.3 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
7: #pragma once
8:
9: #include "device.h"
1.1.1.3 root 10: #include <sys/time.h>
1.1 root 11:
12: class PlutoDevice
13: : public IODevice
14: {
1.1.1.3 root 15: using inherited = IODevice;
1.1 root 16: public:
17: PlutoDevice();
1.1.1.5 root 18: virtual ~PlutoDevice() override;
1.1 root 19:
1.1.1.4 root 20: void ResetHard() override;
21:
1.1.1.3 root 22: uint64 Read8(uint32 addr) override;
23: uint64 Read16(uint32 addr) override;
24: uint64 Read32(uint32 addr) override;
25: uint64 Write8(uint32 addr, uint32 data) override;
26: uint64 Write16(uint32 addr, uint32 data) override;
27: uint64 Peek8(uint32 addr) override;
1.1 root 28:
29: private:
1.1.1.3 root 30: // ROM
31: static const uint16 rom[];
32:
33: // ホストファイル起動
34: uint32 ROM_Load();
35:
36: // ベンチマーク
1.1 root 37: void write_8_benchmark(uint32 addr, uint32 data);
38: void benchmark_start(uint32 data);
39: void benchmark_end();
1.1.1.4 root 40: int m_count {};
41: int m_test_num {};
42: const char *m_test_name {};
43: int m_inst_len {};
44: int m_inst_cycle {};
45: int m_start_addr {};
1.1 root 46: timeval m_start {};
47: timeval m_total {};
48: };
1.1.1.6 ! root 49:
! 50: extern std::unique_ptr<PlutoDevice> gPluto;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.