bus/msx/cart/scsi.cpp: Add support for MSX Computer Club Gouda MSX-SCSI Interface. (#11892)

This commit is contained in:
wilbertpol 2024-01-01 01:40:47 +00:00 committed by GitHub
parent c5e9052f10
commit 7a1c86c4d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 170 additions and 0 deletions

View file

@ -3778,6 +3778,55 @@ LZ93A13 (32 pin) - 8KB banks
</part>
</software>
<!-- Harddisk interfaces -->
<!-- No hardware, only an upgrade for the internal rom. -->
<software name="nov15966">
<description>MSX-SCSI Interface (Novaxis v1.59.66)</description>
<year>2019</year>
<publisher>Jurgen Kramer</publisher>
<info name="usage" value="Requires MSX-DOS2."/>
<part name="cart" interface="msx_cart">
<feature name="slot" value="gouda_scsi"/>
<dataarea name="rom" size="0x4000">
<rom name="nov15956.dat" size="0x4000" crc="f4091223" sha1="5fc9aaed426872dde95fd1d48c25e18532c9f266"/>
</dataarea>
</part>
</software>
<!-- No hardware, only an upgrade for the internal rom. -->
<software name="nov15965" cloneof="nov15966">
<description>MSX-SCSI Interface (Novaxis v1.59.65)</description>
<year>2019</year>
<publisher>Jurgen Kramer</publisher>
<info name="usage" value="Requires MSX-DOS2."/>
<part name="cart" interface="msx_cart">
<feature name="slot" value="gouda_scsi"/>
<dataarea name="rom" size="0x4000">
<rom name="nov15955.dat" size="0x4000" crc="8182020b" sha1="e4860092464094a41cb2e403280da831df81b221"/>
</dataarea>
</part>
</software>
<software name="nov15964" cloneof="nov15966">
<description>MSX-SCSI Interface (Novaxis v1.59.64)</description>
<year>1996</year>
<publisher>MSX Computer Club Gouda</publisher>
<info name="usage" value="Requires MSX-DOS2."/>
<part name="cart" interface="msx_cart">
<feature name="slot" value="gouda_scsi"/>
<dataarea name="rom" size="0x4000">
<rom name="nov15964.rom" size="0x4000" crc="ecf385f2" sha1="352ec8c99fe1397a88ecb3aee6dbb4d121c818e9"/>
</dataarea>
</part>
<part name="flop" interface="floppy_3_5">
<dataarea name="flop" size="737280">
<!-- This was created manually from a collection of files. Needs to be properly dumped. -->
<rom name="tools.dsk" size="737280" crc="c0eeb656" sha1="7bdfcf691c5c32d90cd02ae81d23be8a84abdeb4" status="baddump"/>
</dataarea>
</part>
</software>
<!-- Homebrew / Doujin software -->
<software name="moronslt" supported="partial">

View file

@ -1994,6 +1994,8 @@ if (BUSES["MSX_SLOT"]~=null) then
MAME_DIR .. "src/devices/bus/msx/cart/ram.h",
MAME_DIR .. "src/devices/bus/msx/cart/rtype.cpp",
MAME_DIR .. "src/devices/bus/msx/cart/rtype.h",
MAME_DIR .. "src/devices/bus/msx/cart/scsi.cpp",
MAME_DIR .. "src/devices/bus/msx/cart/scsi.h",
MAME_DIR .. "src/devices/bus/msx/cart/slotexpander.cpp",
MAME_DIR .. "src/devices/bus/msx/cart/slotexpander.h",
MAME_DIR .. "src/devices/bus/msx/cart/slotoptions.cpp",

View file

@ -33,6 +33,7 @@
#include "quickdisk.h"
#include "ram.h"
#include "rtype.h"
#include "scsi.h"
#include "slotexpander.h"
#include "slotoptions.h"
#include "softcard.h"
@ -63,6 +64,7 @@ void msx_cart(device_slot_interface &device, bool is_in_subslot)
device.option_add_internal(slotoptions::FS_SR021, MSX_CART_FS_SR021);
device.option_add_internal(slotoptions::FS_SR022, MSX_CART_FS_SR022);
device.option_add_internal(slotoptions::GAMEMASTER2, MSX_CART_GAMEMASTER2);
device.option_add_internal(slotoptions::GOUDA_SCSI, MSX_CART_GOUDA_SCSI);
device.option_add_internal(slotoptions::HALNOTE, MSX_CART_HALNOTE);
device.option_add_internal(slotoptions::HFOX, MSX_CART_HFOX);
device.option_add_internal(slotoptions::HOLY_QURAN, MSX_CART_HOLY_QURAN);

View file

@ -0,0 +1,103 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
#include "emu.h"
#include "scsi.h"
#include "bus/nscsi/devices.h"
#include "machine/nscsi_bus.h"
#include "machine/wd33c9x.h"
/*
Implementation of SCSI interface as it appeared in:
- MSX Computer Club Gouda MSX-SCSI Interface
Other known SCSI(-ish) interfaces:
ASCII HD Interface (SASI Interface)
B.E.R.T.
ESE MegaSCSI
- Came with SRAM on the cartridge (128/256/512/1024KB SRAM)
HSH SCSI Interface
MAK/Green/Sparrowsoft SCSI Interface
MK SCSI Interface
- Evolved into B.E.R.T. SCSI Interface.
*/
namespace
{
class msx_cart_gouda_scsi_device : public device_t, public msx_cart_interface
{
public:
msx_cart_gouda_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: device_t(mconfig, MSX_CART_GOUDA_SCSI, tag, owner, clock)
, msx_cart_interface(mconfig, *this)
, m_wd33c93a(*this, "scsi:6:wd33c93a")
{ }
virtual std::error_condition initialize_cartridge(std::string &message) override;
protected:
virtual void device_start() override { }
virtual void device_add_mconfig(machine_config &config) override;
private:
required_device<wd33c93a_device> m_wd33c93a;
void wd33c93a(device_t *device);
void reset_w(u8 data);
};
void msx_cart_gouda_scsi_device::wd33c93a(device_t *device)
{
device->set_clock(10'000'000);
}
void msx_cart_gouda_scsi_device::device_add_mconfig(machine_config &config)
{
NSCSI_BUS(config, "scsi", 0);
NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk", false);
NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false);
NSCSI_CONNECTOR(config, "scsi:6").option_set("wd33c93a", WD33C93A)
.machine_config([this] (device_t *device) { wd33c93a(device); });
}
std::error_condition msx_cart_gouda_scsi_device::initialize_cartridge(std::string &message)
{
if (!cart_rom_region())
{
message = "msx_cart_gouda_scsi_device: Required region 'rom' was not found.";
return image_error::INTERNAL;
}
if (cart_rom_region()->bytes() < 0x4000)
{
message = "msx_cart_gouda_scsi_device: Region 'rom' has unsupported size.";
return image_error::INVALIDLENGTH;
}
page(1)->install_rom(0x4000, 0x7fff, cart_rom_region()->base());
io_space().install_write_handler(0x34, 0x35, emu::rw_delegate(*m_wd33c93a, FUNC(wd33c93a_device::indir_w)));
io_space().install_read_handler(0x34, 0x35, emu::rw_delegate(*m_wd33c93a, FUNC(wd33c93a_device::indir_r)));
io_space().install_write_handler(0x36, 0x36, emu::rw_delegate(*this, FUNC(msx_cart_gouda_scsi_device::reset_w)));
return std::error_condition();
}
void msx_cart_gouda_scsi_device::reset_w(u8 data)
{
m_wd33c93a->reset_w(data);
}
} // anonymous namespace
DEFINE_DEVICE_TYPE_PRIVATE(MSX_CART_GOUDA_SCSI, msx_cart_interface, msx_cart_gouda_scsi_device, "msx_cart_gouda_scsi", "MSX Computer Club Gouda MSX-SCSI Interface")

View file

@ -0,0 +1,12 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
#ifndef MAME_BUS_MSX_CART_SCSI_H
#define MAME_BUS_MSX_CART_SCSI_H
#pragma once
#include "bus/msx/slot/cartridge.h"
DECLARE_DEVICE_TYPE(MSX_CART_GOUDA_SCSI, msx_cart_interface)
#endif // MAME_BUS_MSX_CART_SCSI_H

View file

@ -37,6 +37,7 @@ char const *const FMPAC = "fmpac";
char const *const FS_SR021 = "fs_sr021";
char const *const FS_SR022 = "fs_sr022";
char const *const GAMEMASTER2 = "gamemaster2";
char const *const GOUDA_SCSI = "gouda_scsi";
char const *const HALNOTE = "halnote";
char const *const HBI55 = "hbi55";
char const *const HFOX = "hfox";

View file

@ -40,6 +40,7 @@ extern char const *const FMPAC;
extern char const *const FS_SR021;
extern char const *const FS_SR022;
extern char const *const GAMEMASTER2;
extern char const *const GOUDA_SCSI;
extern char const *const HALNOTE;
extern char const *const HBI55;
extern char const *const HFOX;