summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/mb87030.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/mb87030.h')
-rw-r--r--src/devices/machine/mb87030.h46
1 files changed, 29 insertions, 17 deletions
diff --git a/src/devices/machine/mb87030.h b/src/devices/machine/mb87030.h
index c4d113107cd..2040ecf1cd2 100644
--- a/src/devices/machine/mb87030.h
+++ b/src/devices/machine/mb87030.h
@@ -56,7 +56,7 @@ public:
void dma_w(uint8_t val);
void ctrl_write(uint32_t value, uint32_t mask) { scsi_bus->ctrl_w(scsi_refid, value, mask); scsi_ctrl_changed(); }
- uint32_t data_read() { return scsi_bus->data_r(); };
+ uint32_t data_read() { return scsi_bus->data_r(); }
protected:
mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -74,9 +74,9 @@ private:
constexpr static uint8_t SCTL_RESET_AND_DISABLE = 0x80;
constexpr static uint8_t SCMD_TERM_MODE = 0x01;
- constexpr static uint8_t SCMD_PRG_XFER = 0x02;
- constexpr static uint8_t SCMD_INTERCEPT_XFER = 0x04;
- constexpr static uint8_t SCMD_RST_OUT = 0x08;
+ constexpr static uint8_t SCMD_PRG_XFER = 0x04;
+ constexpr static uint8_t SCMD_INTERCEPT_XFER = 0x08;
+ constexpr static uint8_t SCMD_RST_OUT = 0x10;
constexpr static uint8_t SCMD_CMD_BUS_RELEASE = 0x00;
constexpr static uint8_t SCMD_CMD_SELECT = 0x20;
constexpr static uint8_t SCMD_CMD_RESET_ATN = 0x40;
@@ -128,6 +128,7 @@ private:
constexpr static uint8_t SERR_SHORT_PERIOD = 0x02;
constexpr static uint8_t SERR_PHASE_ERROR = 0x04;
constexpr static uint8_t SERR_TC_P_ERROR = 0x08;
+ constexpr static uint8_t SERR_XFER_OUT = 0x20; // MB89351/2 only
constexpr static uint8_t SERR_DATA_ERROR_SPC = 0x40;
constexpr static uint8_t SERR_DATA_ERROR_SCSI = 0x80;
@@ -135,6 +136,7 @@ private:
constexpr static uint8_t SDGC_DIAG_CD = 0x02;
constexpr static uint8_t SDGC_DIAG_MSG = 0x04;
constexpr static uint8_t SDGC_DIAG_BSY = 0x08;
+ constexpr static uint8_t SDGC_XFER_ENABLE = 0x20; // MB89351/2 only
constexpr static uint8_t SDGC_DIAG_ACK = 0x40;
constexpr static uint8_t SDGC_DIAG_REQ = 0x80;
@@ -151,30 +153,25 @@ private:
ArbitrationAssertBSY,
ArbitrationWait,
ArbitrationAssertSEL,
- ArbitrationDeAssertBSY,
SelectionWaitBusFree,
+ SelectionAssertID,
SelectionAssertSEL,
SelectionWaitBSY,
Selection,
TransferWaitReq,
TransferSendData,
- TransferSendDataDMAReq,
- TransferSendDataDMAResp,
TransferRecvData,
- TransferRecvDataDMAReq,
- TransferRecvDataDMAResp,
TransferSendAck,
TransferWaitDeassertREQ,
TransferDeassertACK
//TransferCommand,
} m_state;
- void update_ssts(void);
- void update_ints(void);
+ void update_ssts();
+ void update_ints();
- void scsi_disconnect_timeout(void);
- void scsi_command_complete(void);
- void scsi_disconnect(void);
+ void scsi_command_complete();
+ void scsi_disconnect();
void update_state(mb87030_device::State new_state, int delay = 0, int timeout = 0);
auto get_state_name(State state) const;
void scsi_set_ctrl(uint32_t val, uint32_t mask);
@@ -205,9 +202,6 @@ private:
uint32_t m_tc;
uint8_t m_exbf;
- uint8_t m_bus_data;
- uint8_t m_hdb;
- bool m_hdb_loaded;
bool m_send_atn_during_selection;
util::fifo <uint8_t, 8> m_fifo;
@@ -215,9 +209,27 @@ private:
uint32_t m_scsi_ctrl;
bool m_dma_transfer;
+ bool m_irq_state;
};
+class mb89351_device : public mb87030_device
+{
+public:
+ mb89351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void map(address_map &map) override;
+};
+
+class mb89352_device : public mb87030_device
+{
+public:
+ mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void map(address_map &map) override;
+};
DECLARE_DEVICE_TYPE(MB87030, mb87030_device)
+DECLARE_DEVICE_TYPE(MB89351, mb89351_device)
+DECLARE_DEVICE_TYPE(MB89352, mb89352_device)
#endif // MAME_MACHINE_MB87030_H