|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2022 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // X68030 の ROM30 (SCSI ROM) エミュレーション
9: //
10:
11: #pragma once
12:
13: #include "rom.h"
14:
1.1.1.2 ! root 15: class MainbusDevice;
! 16: class SPCDevice;
1.1 root 17:
18: class ROM30EmuDevice : public ROMDevice
19: {
20: using inherited = ROMDevice;
21:
22: private:
23: // このデバイスの先頭アドレス
24: static const uint32 baseaddr = 0x00fc0000;
25:
26: // 謎の I/O 空間
27: static const uint32 ROMIO_BASE = 0xfc0080;
28: static const uint32 ROMIO_SCSI = (ROMIO_BASE + 0);
29: static const uint32 ROMIO_BOOT = (ROMIO_BASE + 4);
30:
31: public:
32: ROM30EmuDevice();
33: virtual ~ROM30EmuDevice() override;
34:
35: bool Init() override;
36:
37: uint64 Read32(uint32 addr) override;
38:
39: private:
40: uint32 SCSIBoot() const;
41: uint32 SCSIIOCS();
42: uint32 SCSI_S_INQUIRY(uint32);
43: uint32 SCSI_S_READEXT(uint32);
44: uint32 SCSI_S_TESTUNIT(uint32);
45: uint32 SCSI_S_READCAP(uint32);
46:
47: // SCSI IOCS コール名を返す
48: static std::string GetSCSICallName(uint number);
49:
1.1.1.2 ! root 50: MainbusDevice *mainbus {};
! 51: SPCDevice *spc {};
1.1 root 52:
53: static const char * const x68k_scsicall[0x40];
54: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.