openMSX
ide
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 <array>
18
#include <memory>
19
20
namespace
openmsx
{
21
22
class
DeviceConfig;
23
24
class
WD33C93
25
{
26
public
:
27
explicit
WD33C93
(
const
DeviceConfig
& config);
28
29
void
reset
(
bool
scsiReset);
30
31
[[nodiscard]] uint8_t
readAuxStatus
();
32
[[nodiscard]] uint8_t
readCtrl
();
33
[[nodiscard]] uint8_t
peekAuxStatus
()
const
;
34
[[nodiscard]] uint8_t
peekCtrl
()
const
;
35
void
writeAdr
(uint8_t value);
36
void
writeCtrl
(uint8_t value);
37
38
template
<
typename
Archive>
39
void
serialize
(Archive& ar,
unsigned
version);
40
41
private
:
42
void
disconnect();
43
void
execCmd(uint8_t value);
44
45
private
:
46
AlignedByteArray<SCSIDevice::BUFFER_SIZE>
buffer;
47
std::array<std::unique_ptr<SCSIDevice>, 8> dev;
48
unsigned
bufIdx;
49
unsigned
counter = 0;
50
unsigned
blockCounter = 0;
51
int
tc;
52
SCSI::Phase
phase;
53
uint8_t myId;
54
uint8_t targetId = 0;
55
std::array<uint8_t, 32> regs;
56
uint8_t latch;
57
bool
devBusy =
false
;
58
};
59
60
}
// namespace openmsx
61
62
#endif
AlignedBuffer.hh
SCSIDevice.hh
SCSI.hh
openmsx::AlignedByteArray
Definition
AlignedBuffer.hh:59
openmsx::DeviceConfig
Definition
DeviceConfig.hh:21
openmsx::WD33C93
Definition
WD33C93.hh:25
openmsx::WD33C93::serialize
void serialize(Archive &ar, unsigned version)
Definition
WD33C93.cc:455
openmsx::WD33C93::reset
void reset(bool scsiReset)
Definition
WD33C93.cc:419
openmsx::WD33C93::writeAdr
void writeAdr(uint8_t value)
Definition
WD33C93.cc:243
openmsx::WD33C93::peekCtrl
uint8_t peekCtrl() const
Definition
WD33C93.cc:405
openmsx::WD33C93::peekAuxStatus
uint8_t peekAuxStatus() const
Definition
WD33C93.cc:400
openmsx::WD33C93::writeCtrl
void writeCtrl(uint8_t value)
Definition
WD33C93.cc:250
openmsx::WD33C93::readCtrl
uint8_t readCtrl()
Definition
WD33C93.cc:336
openmsx::WD33C93::readAuxStatus
uint8_t readAuxStatus()
Definition
WD33C93.cc:309
openmsx::SCSI::Phase
Phase
Definition
SCSI.hh:99
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:9
Generated on Thu Mar 28 2024 21:13:12 for openMSX by
1.9.8