mirror of
https://github.com/holub/mame
synced 2025-04-09 18:17:44 +03:00
lsi/m3: Fix floppy regression, add initial software list
New working software list additions ----------------------------------- M3 Utilities (Release 3) [Steve Hunt]
This commit is contained in:
parent
82229a145f
commit
29b1e6283b
20
hash/m3.xml
Normal file
20
hash/m3.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
|
||||
|
||||
<!-- license:CC0-1.0 -->
|
||||
|
||||
<softwarelist name="m3" description="LSI M-THREE disks">
|
||||
|
||||
<!-- bootable -->
|
||||
<software name="m3utils">
|
||||
<description>M3 Utilities (Release 3)</description>
|
||||
<year>198?</year>
|
||||
<publisher>LSI</publisher>
|
||||
<part name="flop1" interface="floppy_8">
|
||||
<dataarea name="flop" size="1617408">
|
||||
<rom name="m3_utils_cpm22_8ssds.mfm" size="1617408" crc="da1072a2" sha1="fa17616c90efda3e2ceeb06012183bbba3631d34" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
@ -31,14 +31,13 @@
|
||||
|
||||
TODO:
|
||||
- Initial PC is currently hacked to f000
|
||||
- Verify/fix floppy hookup (CPU needs to be overclocked?)
|
||||
- Verify/fix floppy hookup
|
||||
- Printer interface
|
||||
- Buzzer
|
||||
- Map the rest of the keys, verify existing keys
|
||||
- Switch FDC to 1 MHz for 5.25" drives
|
||||
|
||||
Notes:
|
||||
- No offical software available, but a custom version of CP/M
|
||||
- Y to boot from floppy, ESC to enter monitor, any other key to
|
||||
boot from IDE
|
||||
|
||||
@ -56,6 +55,7 @@
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
namespace {
|
||||
@ -126,7 +126,9 @@ private:
|
||||
void fdc_drq_w(int state);
|
||||
uint8_t fdc_data_r(offs_t offset);
|
||||
void fdc_data_w(offs_t offset, uint8_t data);
|
||||
bool m_nmi_taken = 0;
|
||||
|
||||
bool m_nmi_enabled = false;
|
||||
bool m_nmi_taken = false;
|
||||
};
|
||||
|
||||
|
||||
@ -451,8 +453,8 @@ void m3_state::fdc_intrq_w(int state)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
|
||||
m_nmi_taken = false;
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
}
|
||||
|
||||
m_ctc->trg1(state);
|
||||
@ -461,22 +463,25 @@ void m3_state::fdc_intrq_w(int state)
|
||||
void m3_state::fdc_drq_w(int state)
|
||||
{
|
||||
if (state)
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||
|
||||
if (state && !m_nmi_taken)
|
||||
{
|
||||
m_nmi_taken = true;
|
||||
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE);
|
||||
|
||||
if (m_nmi_enabled)
|
||||
{
|
||||
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||
|
||||
m_nmi_enabled = false;
|
||||
m_nmi_taken = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t m3_state::fdc_data_r(offs_t offset)
|
||||
{
|
||||
if ((m_fdc->drq_r() == 0) && m_nmi_taken)
|
||||
if (m_nmi_taken && m_fdc->drq_r() == 0)
|
||||
{
|
||||
// cpu tries to read data without drq, halt it and reset pc
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
m_maincpu->set_state_int(Z80_PC, m_maincpu->state_int(Z80_PC) - 2);
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
m_maincpu->retry_access();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -486,13 +491,10 @@ uint8_t m3_state::fdc_data_r(offs_t offset)
|
||||
|
||||
void m3_state::fdc_data_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if ((m_fdc->drq_r() == 0) && m_nmi_taken)
|
||||
if (m_nmi_taken && m_fdc->drq_r() == 0)
|
||||
{
|
||||
// cpu tries to write data without drq, halt it and reset pc
|
||||
m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
m_maincpu->set_state_int(Z80_PC, m_maincpu->state_int(Z80_PC) - 2);
|
||||
|
||||
return;
|
||||
m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
|
||||
m_maincpu->retry_access();
|
||||
}
|
||||
|
||||
m_fdc->data_w(data);
|
||||
@ -505,7 +507,7 @@ void m3_state::ppi2_pa_w(uint8_t data)
|
||||
// 7------- not used?
|
||||
// -6------ buzzer
|
||||
// --5----- not used?
|
||||
// ---4---- unknown (motor?)
|
||||
// ---4---- nmi enable
|
||||
// ----3--- unknown
|
||||
// -----2-- floppy side
|
||||
// ------10 drive select
|
||||
@ -521,6 +523,8 @@ void m3_state::ppi2_pa_w(uint8_t data)
|
||||
|
||||
if (floppy)
|
||||
floppy->ss_w(BIT(data, 2));
|
||||
|
||||
m_nmi_enabled = bool(BIT(~data, 4));
|
||||
}
|
||||
|
||||
uint8_t m3_state::ppi2_pb_r()
|
||||
@ -534,6 +538,7 @@ void m3_state::machine_start()
|
||||
save_item(NAME(m_kbd_col));
|
||||
save_item(NAME(m_kbd_row));
|
||||
save_item(NAME(m_kbd_data));
|
||||
save_item(NAME(m_nmi_enabled));
|
||||
save_item(NAME(m_nmi_taken));
|
||||
}
|
||||
|
||||
@ -541,13 +546,8 @@ void m3_state::machine_reset()
|
||||
{
|
||||
m_maincpu->set_pc(0xf000);
|
||||
|
||||
m_nmi_enabled = false;
|
||||
m_nmi_taken = false;
|
||||
|
||||
// floppy motor is always on
|
||||
if (m_floppy[0])
|
||||
m_floppy[0]->get_device()->mon_w(0);
|
||||
if (m_floppy[1])
|
||||
m_floppy[1]->get_device()->mon_w(0);
|
||||
}
|
||||
|
||||
|
||||
@ -582,7 +582,6 @@ static void m3_floppies(device_slot_interface &device)
|
||||
void m3_state::m3(machine_config &config)
|
||||
{
|
||||
Z80(config, m_maincpu, 4.9152_MHz_XTAL / 2);
|
||||
m_maincpu->set_clock_scale(1.2f); // needs to be overclocked or its too slow for the floppy
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &m3_state::mem_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &m3_state::io_map);
|
||||
m_maincpu->set_daisy_config(daisy_chain);
|
||||
@ -633,6 +632,8 @@ void m3_state::m3(machine_config &config)
|
||||
FLOPPY_CONNECTOR(config, "fdc:0", m3_floppies, "sa850", floppy_image_device::default_mfm_floppy_formats);
|
||||
FLOPPY_CONNECTOR(config, "fdc:1", m3_floppies, "sa850", floppy_image_device::default_mfm_floppy_formats);
|
||||
|
||||
SOFTWARE_LIST(config, "floppy_list").set_original("m3");
|
||||
|
||||
// keyboard
|
||||
I8035(config, m_kbdmcu, 6.144_MHz_XTAL);
|
||||
m_kbdmcu->set_addrmap(AS_PROGRAM, &m3_state::kbd_mem_map);
|
||||
|
Loading…
Reference in New Issue
Block a user