trs80m3: model 4 can boot some floppies

This commit is contained in:
Robbbert 2021-04-04 03:00:56 +10:00
parent 0a687da2ae
commit c6c0f2f3ec
3 changed files with 27 additions and 13 deletions

View File

@ -57,14 +57,15 @@ Model 4P - is the same as Model 4 except:
To Do / Status:
--------------
trs80m3: works
MT 07903 - most floppies no longer boot
There's many DSK disks that are rejected by MAME - needs to be investigated.
trs80m4: works
will boot model 3 floppies, but not model 4 ones
MT 07903 - most floppies no longer boot
trs80m3: Works
trs80m4p: floppy not working, so machine is useless
trs80m4: Works
Need to check banking
trs80m4p: Floppy not working, so machine is useless.
In debugger g 402a, then pc=0;g and it will boot.
***************************************************************************/
@ -414,6 +415,8 @@ void trs80m3_state::model4(machine_config &config)
m_m4_bank->set_data_width(8);
m_m4_bank->set_addr_width(18);
m_m4_bank->set_stride(0x10000);
config.device_remove("quickload"); // removed because it crashes..
}
void trs80m3_state::model4p(machine_config &config)
@ -434,6 +437,7 @@ void trs80m3_state::model4p(machine_config &config)
m_m4p_bank->set_stride(0x10000);
config.device_remove("quickload");
config.device_remove("cassette");
}
void trs80m3_state::cp500(machine_config &config)

View File

@ -145,7 +145,7 @@ private:
optional_device<floppy_connector> m_floppy0;
optional_device<floppy_connector> m_floppy1;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cassette;
optional_device<cassette_image_device> m_cassette;
optional_ioport m_io_config;
required_ioport_array<8> m_io_keyboard;
optional_device<ram_device> m_mainram;

View File

@ -292,6 +292,7 @@ void trs80m3_state::port_e4_w(uint8_t data)
d7 1=enable disk INTRQ to generate NMI
d6 1=enable disk Motor Timeout to generate NMI */
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
m_nmi_mask = data;
}
@ -355,7 +356,8 @@ void trs80m3_state::port_ec_w(uint8_t data)
m_mode = (m_mode & 0xde) | (BIT(data, 2) ? 1 : 0) | (BIT(data, 3) ? 0x20 : 0);
m_cassette->change_state(( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR );
if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware
m_cassette->change_state(( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR );
m_port_ec = data & 0x7e;
}
@ -409,9 +411,13 @@ void trs80m3_state::port_ff_w(uint8_t data)
/* Cassette port
d1, d0 Cassette output */
static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 };
m_cassette->output(levels[data & 3]);
m_cassette_data &= ~0x80;
if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware
{
static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 };
m_cassette->output(levels[data & 3]);
m_cassette_data &= ~0x80;
}
m_speaker->level_w(!(BIT(data, 0)));
}
@ -558,8 +564,12 @@ void trs80m3_state::machine_start()
m_start_address = 0;
m_old_cassette_val = 0;
m_cassette_data_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(trs80m3_state::cassette_data_callback),this));
m_cassette_data_timer->adjust( attotime::zero, 0, attotime::from_hz(11025) );
if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware
{
m_cassette_data_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(trs80m3_state::cassette_data_callback),this));
m_cassette_data_timer->adjust( attotime::zero, 0, attotime::from_hz(11025) );
}
if (!(m_model4 & 6)) // Model 3 leave now
return;