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 
28  void reset(bool scsireset);
29 
31  byte readCtrl();
32  byte peekAuxStatus() const;
33  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 
40 private:
41  void disconnect();
42  void execCmd(byte value);
43 
45  std::unique_ptr<SCSIDevice> dev[8];
46  unsigned bufIdx;
47  int counter;
48  unsigned blockCounter;
49  int tc;
50  SCSI::Phase phase;
51  byte myId;
52  byte targetId;
53  byte regs[32];
54  byte latch;
55  bool devBusy;
56 };
57 
58 } // namespace openmsx
59 
60 #endif
void writeCtrl(byte value)
Definition: WD33C93.cc:256
byte readAuxStatus()
Definition: WD33C93.cc:315
void serialize(Archive &ar, unsigned version)
Definition: WD33C93.cc:461
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
void reset(bool scsireset)
Definition: WD33C93.cc:425
byte readCtrl()
Definition: WD33C93.cc:342
byte peekCtrl() const
Definition: WD33C93.cc:411
WD33C93(const DeviceConfig &config)
Definition: WD33C93.cc:107
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void writeAdr(byte value)
Definition: WD33C93.cc:249
byte peekAuxStatus() const
Definition: WD33C93.cc:406