|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2020 [email protected]
4: //
5:
6: #include "vm_x68k.h"
7: #include "human68k.h"
8: #include "renderer.h"
9: #include "rp5c15.h"
10: #include "scheduler.h"
11: #include "x68kkbd.h"
12: #include "xiospace.h"
13:
14: //
15: // X68030 VM
16: //
17:
18: // コンストラクタ
19: VM_X68030::VM_X68030()
20: {
21: // デバイス (順序に注意)
22: // Scheduler (と BusErrDevice) は親コンストラクタで作成済み。
23: gMPU.reset(new MPU680x0Device(0xff0000));
24: gRAM.reset(new RAMDevice()); // required by XIOSpace
25: xiospace.reset(new XIOSpaceDevice());
26:
27: gKeyboard.reset(new X68030Keyboard());
28: gRenderer.reset(new X68030Renderer());
29:
30: // 割り当て
31: // 今は拡張メモリがないので、今は上位8ビット全領域がミラーになっている。
32: for (int i = 0; i < countof(::devtable); i++) {
33: ::devtable[i] = xiospace.get();
34: }
35: }
36:
37: // デストラクタ
38: VM_X68030::~VM_X68030()
39: {
40: }
41:
42: // X68030 の電源ボタンを押します。
43: void
44: VM_X68030::PowerButton()
45: {
46: // 電源 ボタン
47: // ON OFF->ON 電源オフ割り込みをネゲート?
48: // ON ON ->OFF 電源オフ割り込みをアサート?
49: // OFF OFF->ON 電源オン
50: // OFF ON ->OFF (通常はあり得ないはず)
51:
52: // ボタンの状態を更新して..
53: power_button = !power_button;
54:
55: // デバイスに指示
56: DevicePowerOn();
57: }
58:
59:
60: //
61: // RXZ .r .x .z human68k console emulator
62: //
63:
64: // コンストラクタ
65: VM_RXZ::VM_RXZ()
66: {
67: // デバイス (順序に注意)
68: // Scheduler (と BusErrDevice) は親コンストラクタで作成済み。
69: gMPU.reset(new MPU680x0Device(0));
70: gRAM.reset(new RAMDevice()); // required by Human68k
71: gRTC.reset(new RP5C15Device());
72: human68k.reset(new Human68k());
73: }
74:
75: // デストラクタ
76: VM_RXZ::~VM_RXZ()
77: {
78: }
79:
80: void
81: VM_RXZ::PowerButton()
82: {
83: // RXZ の電源ボタンは電源オンにしか使わない。
84: //
85: // 電源 ボタン
86: // ON PUSH (何も起きない)
87: // OFF PUSH 電源オン
88:
89: // デバイスに指示
90: DevicePowerOn();
91: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.