Skip to content

Commit

Permalink
microsoft/jazz.cpp: Switch SCSI controller type back to NCR53CF94 and…
Browse files Browse the repository at this point in the history
… give it a faster clock

* machine/ncr53c90.cpp: Allow clock conversion register to be set to 0 (faster versions allow this)

* microsoft/mct_adr.cpp: Fix issue with DRQ on disabled channels also disabling other channels
  • Loading branch information
ajrhacker committed Jan 11, 2025
1 parent 04bdcc4 commit 0b2d291
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/devices/machine/ncr53c90.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ void ncr53c90_device::step(bool timeout)
reset_disconnect();

if (!(config & 0x40)) {
LOG("SCSI reset interrupt\n");
istatus |= I_SCSI_RESET;
check_irq();
}
Expand Down Expand Up @@ -802,9 +803,7 @@ void ncr53c90_device::bus_complete()

void ncr53c90_device::delay(int cycles)
{
if(!clock_conv)
return;
cycles *= clock_conv;
cycles *= clock_conv ? clock_conv : 8;
tm->adjust(clocks_to_attotime(cycles));
}

Expand Down
15 changes: 7 additions & 8 deletions src/mame/microsoft/jazz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Intel 82358 EISA Bus Controller
* Intel 82357 EISA Integrated System Peripheral (ISP)
* Intel 82352 x 2 EISA Bus Buffer (EBB)
* Emulex FAS216 SCSI controller
* Emulex FAS216 SCSI controller (similar to NCR 53CF94-2)
* 27C01 128k EPROM
* 28F020 256k flash memory
* NEC μPD31432 ARC address path ASIC
Expand Down Expand Up @@ -155,7 +155,7 @@ class jazz_state : public driver_device
required_device<ram_device> m_vram;
required_device<mct_adr_device> m_mct_adr;
required_device<nscsi_bus_device> m_scsibus;
required_device<ncr53c94_device> m_scsi;
required_device<ncr53cf94_device> m_scsi;
required_device<n82077aa_device> m_fdc;
required_device<mc146818_device> m_rtc;
required_device<nvram_device> m_nvram;
Expand Down Expand Up @@ -220,7 +220,7 @@ void jazz_state::mct_map(address_map &map)
map(0x80000000, 0x80000fff).m(m_mct_adr, FUNC(mct_adr_device::map));

map(0x80001000, 0x800010ff).m(m_net, FUNC(dp83932c_device::map)).umask32(0x0000ffff);
map(0x80002000, 0x8000200f).m(m_scsi, FUNC(ncr53c94_device::map));
map(0x80002000, 0x8000200f).m(m_scsi, FUNC(ncr53cf94_device::map));
map(0x80003000, 0x8000300f).m(m_fdc, FUNC(n82077aa_device::map));

// LE: only reads 4000
Expand Down Expand Up @@ -310,17 +310,16 @@ void jazz_state::jazz(machine_config &config)
NSCSI_CONNECTOR(config, "scsi:6", jazz_scsi_devices, "cdrom");

// scsi host adapter
// FIXME: refuses to POST with correct NCR53CF94 device
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53cf94", NCR53C94).clock(24_MHz_XTAL).machine_config(
NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53cf94", NCR53CF94).clock(40000000).machine_config(
[this] (device_t *device)
{
ncr53c94_device &adapter = downcast<ncr53c94_device &>(*device);
ncr53cf94_device &adapter = downcast<ncr53cf94_device &>(*device);

adapter.irq_handler_cb().set(m_mct_adr, FUNC(mct_adr_device::irq<5>));
adapter.drq_handler_cb().set(m_mct_adr, FUNC(mct_adr_device::drq<0>));

subdevice<mct_adr_device>(":mct_adr")->dma_r_cb<0>().set(adapter, FUNC(ncr53c94_device::dma_r));
subdevice<mct_adr_device>(":mct_adr")->dma_w_cb<0>().set(adapter, FUNC(ncr53c94_device::dma_w));
subdevice<mct_adr_device>(":mct_adr")->dma_r_cb<0>().set(adapter, FUNC(ncr53cf94_device::dma_r));
subdevice<mct_adr_device>(":mct_adr")->dma_w_cb<0>().set(adapter, FUNC(ncr53cf94_device::dma_w));
});

// floppy controller and drive
Expand Down
6 changes: 4 additions & 2 deletions src/mame/microsoft/mct_adr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ void mct_adr_device::device_start()

m_out_int_timer_asserted = false;
m_out_int_device_asserted = false;

std::fill(std::begin(m_drq_active), std::end(m_drq_active), false);
}

void mct_adr_device::device_reset()
Expand Down Expand Up @@ -262,11 +264,11 @@ TIMER_CALLBACK_MEMBER(mct_adr_device::dma_check)

// check channel enabled
if (!(m_dma_reg[(channel << 2) + REG_ENABLE] & DMA_ENABLE))
return;
continue;

// check transfer count
if (!m_dma_reg[(channel << 2) + REG_COUNT])
return;
continue;

u32 const address = translate_address(m_dma_reg[(channel << 2) + REG_ADDRESS]);

Expand Down

0 comments on commit 0b2d291

Please sign in to comment.