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 
19 namespace openmsx {
20 
21 class DeviceConfig;
22 
23 class WD33C93
24 {
25 public:
26  explicit WD33C93(const DeviceConfig& config);
27  ~WD33C93();
28 
29  void reset(bool scsireset);
30 
32  byte readCtrl();
33  byte peekAuxStatus() const;
34  byte peekCtrl() const;
35  void writeAdr(byte value);
36  void writeCtrl(byte value);
37 
38  template<typename Archive>
39  void serialize(Archive& ar, unsigned version);
40 
41 private:
42  void disconnect();
43  void execCmd(byte value);
44 
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 writeCtrl(byte value)
Definition: WD33C93.cc:268
byte readAuxStatus()
Definition: WD33C93.cc:330
void serialize(Archive &ar, unsigned version)
Definition: WD33C93.cc:483
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:33
void reset(bool scsireset)
Definition: WD33C93.cc:445
byte readCtrl()
Definition: WD33C93.cc:358
WD33C93(const DeviceConfig &config)
Definition: WD33C93.cc:107
byte peekAuxStatus() const
Definition: WD33C93.cc:426
byte peekCtrl() const
Definition: WD33C93.cc:431
void writeAdr(byte value)
Definition: WD33C93.cc:260