openMSX
WD33C93.hh
Go to the documentation of this file.
1/* Ported from:
2** Source: /cvsroot/bluemsx/blueMSX/Src/IoDevice/wd33c93.h,v
3** Revision: 1.6
4** Date: 2007/03/22 10:55:08
5**
6** More info: http://www.bluemsx.com
7**
8** Copyright (C) 2003-2007 Daniel Vik, Ricardo Bittencourt, white cat
9*/
10
11#ifndef WD33C93_HH
12#define WD33C93_HH
13
14#include "SCSI.hh"
15#include "SCSIDevice.hh"
16#include "AlignedBuffer.hh"
17#include <memory>
18
19namespace openmsx {
20
21class DeviceConfig;
22
24{
25public:
26 explicit WD33C93(const DeviceConfig& config);
27
28 void reset(bool scsireset);
29
30 [[nodiscard]] byte readAuxStatus();
31 [[nodiscard]] byte readCtrl();
32 [[nodiscard]] byte peekAuxStatus() const;
33 [[nodiscard]] byte peekCtrl() const;
34 void writeAdr(byte value);
35 void writeCtrl(byte value);
36
37 template<typename Archive>
38 void serialize(Archive& ar, unsigned version);
39
40private:
41 void disconnect();
42 void execCmd(byte value);
43
44private:
46 std::unique_ptr<SCSIDevice> dev[8];
47 unsigned bufIdx;
48 int counter;
49 unsigned blockCounter;
50 int tc;
51 SCSI::Phase phase;
52 byte myId;
53 byte targetId;
54 byte regs[32];
55 byte latch;
56 bool devBusy;
57};
58
59} // namespace openmsx
60
61#endif
void serialize(Archive &ar, unsigned version)
Definition: WD33C93.cc:458
byte peekCtrl() const
Definition: WD33C93.cc:408
void reset(bool scsireset)
Definition: WD33C93.cc:422
byte peekAuxStatus() const
Definition: WD33C93.cc:403
byte readCtrl()
Definition: WD33C93.cc:339
WD33C93(const DeviceConfig &config)
Definition: WD33C93.cc:107
byte readAuxStatus()
Definition: WD33C93.cc:312
void writeCtrl(byte value)
Definition: WD33C93.cc:253
void writeAdr(byte value)
Definition: WD33C93.cc:246
This file implemented 3 utility functions:
Definition: Autofire.cc:9