blob: c7382fa9ad0442bcd74dcf8a04542b77a51c8f81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// license:BSD-3-Clause
// copyright-holders:smf
#ifndef _LEGSCSI_H_
#define _LEGSCSI_H_
#pragma once
#include "bus/scsi/scsihle.h"
#define MCFG_LEGACY_SCSI_PORT(_tag) \
legacy_scsi_host_adapter::set_scsi_port(*device, "^" _tag);
class legacy_scsi_host_adapter : public device_t
{
public:
legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
static void set_scsi_port(device_t &device, const char *tag) { downcast<legacy_scsi_host_adapter &>(device).m_scsi_port.set_tag(tag); }
protected:
virtual void device_start();
void reset_bus();
bool select(int id);
void send_command(UINT8 *data, int bytes);
int get_length();
int get_phase();
void read_data(UINT8 *data, int bytes);
void write_data(UINT8 *data, int bytes);
UINT8 get_status();
private:
int m_selected;
scsihle_device *get_device(int id);
required_device<SCSI_PORT_DEVICE> m_scsi_port;
};
#endif
|