mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
(nw) sorcerer : cp/m disk almost boots
This commit is contained in:
parent
577f198564
commit
ceabdcbe8d
@ -140,9 +140,9 @@ Exidy Sorcerer Video/Disk Unit:
|
||||
emulation done but it's all guesswork. The unit contains 2 dipswitch units
|
||||
(one has 4 switches and the other has 8), a 8 MHz crystal, 3 proms and a
|
||||
FD1793-B01 fdc. Going by the code, it would appear to place the Z-80 into
|
||||
WAIT while reading a sector. However, we don't get that far; it bombs out
|
||||
with Record Not Found. We need suitable disk images.
|
||||
To try it out: GO BF00 at the monitor prompt.
|
||||
WAIT while reading a sector. To try it out: GO BF00 at the monitor prompt.
|
||||
Currently the CP/M sign-on message appears, followed by lockup due to a
|
||||
fdc problem.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
@ -490,6 +490,7 @@ MACHINE_CONFIG_START(sorcerer_state::sorcererd)
|
||||
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(sorcerer_floppy_interface)
|
||||
|
||||
MCFG_DEVICE_ADD("fdc2", FD1793, 8_MHz_XTAL / 8) // confirmed clock
|
||||
MCFG_WD_FDC_FORCE_READY // should be able to get rid of this when fdc issue is fixed
|
||||
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, sorcerer_state, intrq_w))
|
||||
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, sorcerer_state, drq_w))
|
||||
MCFG_FLOPPY_DRIVE_ADD("fdc2:0", floppies, "525qd", floppy_image_device::default_floppy_formats)
|
||||
|
@ -104,6 +104,7 @@ private:
|
||||
bool m_wait;
|
||||
bool m_drq_off;
|
||||
bool m_intrq_off;
|
||||
uint8_t m_2c;
|
||||
uint8_t m_fe;
|
||||
uint8_t m_keyboard_line;
|
||||
const uint8_t *m_p_videoram;
|
||||
|
@ -154,6 +154,12 @@ WRITE_LINE_MEMBER(sorcerer_state::intrq_w)
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
|
||||
m_wait = false;
|
||||
}
|
||||
else
|
||||
if (BIT(m_2c, 0) && m_drq_off && !m_wait)
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
m_wait = true;
|
||||
}
|
||||
}
|
||||
|
||||
// The next byte from floppy is available. Enable CPU so it can get the byte.
|
||||
@ -165,6 +171,12 @@ WRITE_LINE_MEMBER(sorcerer_state::drq_w)
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
|
||||
m_wait = false;
|
||||
}
|
||||
else
|
||||
if (BIT(m_2c, 0) && m_intrq_off && !m_wait)
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
m_wait = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Port 2C control signals for the video/disk unit's floppy disks
|
||||
@ -173,20 +185,16 @@ WRITE_LINE_MEMBER(sorcerer_state::drq_w)
|
||||
// bit 0 = enable wait generator, bit 2 = drive 0 select, bit 5 = ??
|
||||
WRITE8_MEMBER(sorcerer_state::port_2c_w)
|
||||
{
|
||||
m_2c = data;
|
||||
|
||||
if (BIT(data, 0))
|
||||
{
|
||||
|
||||
if (m_drq_off && m_intrq_off)
|
||||
if (!m_wait && m_drq_off && m_intrq_off)
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
m_wait = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
|
||||
m_wait = false;
|
||||
}
|
||||
|
||||
floppy_image_device *floppy = nullptr;
|
||||
|
||||
@ -201,7 +209,7 @@ WRITE8_MEMBER(sorcerer_state::port_2c_w)
|
||||
floppy->ss_w(0); // assume side 0 ? // BIT(data, 4));
|
||||
}
|
||||
|
||||
m_fdc2->dden_w(1); // assume single density ? //!BIT(data, 0));
|
||||
m_fdc2->dden_w(0); // assume double density ? //!BIT(data, 0));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(sorcerer_state::port_fd_w)
|
||||
@ -455,6 +463,7 @@ void sorcerer_state::machine_reset()
|
||||
m_intrq_off = true;
|
||||
m_wait = false;
|
||||
m_fe = 0xff;
|
||||
m_2c = 0;
|
||||
port_fe_w(space, 0, 0, 0xff);
|
||||
|
||||
membank("boot")->set_entry(1);
|
||||
|
@ -375,7 +375,6 @@ WRITE8_MEMBER( trs80m3_state::port_f4_w )
|
||||
{
|
||||
if (BIT(data, 6))
|
||||
{
|
||||
|
||||
if (m_drq_off && m_intrq_off)
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
|
Loading…
Reference in New Issue
Block a user