bus/a2bus: More improvements for Orange Micro buffered Grappler+: [Vas Crabb, Golden Child]

* Fixed another bad bit in microcontroller ROM dump.
* Added rev A variant with 6 MHz microcontroller clock.
This commit is contained in:
Vas Crabb 2021-04-06 22:04:40 +10:00
parent 880f44cf29
commit b38799131b
5 changed files with 80 additions and 15 deletions

View File

@ -38,7 +38,7 @@ ROM_START(bufgrapplerplus)
// C6N40 B
// 95ROM08048
ROM_REGION(0x0400, "mcu", 0)
ROM_LOAD( "95rom08048.u10", 0x0000, 0x0400, CRC(c9c23486) SHA1(c3a9c0fc9bd0ae728ad2aaa50d98b41929ec4a17) BAD_DUMP )
ROM_LOAD( "95rom08048.u10", 0x0000, 0x0400, CRC(55990f67) SHA1(f0907cf02d8c5dbf1bfacb0d626f2231142f0ff7) )
ROM_END
@ -75,6 +75,7 @@ INPUT_PORTS_END
DEFINE_DEVICE_TYPE(A2BUS_GRAPPLERPLUS, a2bus_grapplerplus_device, "a2grapplerplus", "Orange Micro Grappler+ Printer Interface")
DEFINE_DEVICE_TYPE(A2BUS_BUFGRAPPLERPLUS, a2bus_buf_grapplerplus_device, "a2bufgrapplerplus", "Orange Micro Buffered Grappler+ Printer Interface")
DEFINE_DEVICE_TYPE(A2BUS_BUFGRAPPLERPLUSA, a2bus_buf_grapplerplus_reva_device, "a2bufgrapplerplusa", "Orange Micro Buffered Grappler+ (rev A) Printer Interface")
@ -490,7 +491,13 @@ TIMER_CALLBACK_MEMBER(a2bus_grapplerplus_device::update_strobe)
//==============================================================
a2bus_buf_grapplerplus_device::a2bus_buf_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) :
a2bus_grapplerplus_device_base(mconfig, A2BUS_BUFGRAPPLERPLUS, tag, owner, clock),
a2bus_buf_grapplerplus_device(mconfig, A2BUS_BUFGRAPPLERPLUS, tag, owner, clock)
{
}
a2bus_buf_grapplerplus_device::a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) :
a2bus_grapplerplus_device_base(mconfig, type, tag, owner, clock),
m_mcu(*this, "mcu"),
m_ram(),
m_ram_row(0xff00),
@ -533,19 +540,8 @@ tiny_rom_entry const *a2bus_buf_grapplerplus_device::device_rom_region() const
void a2bus_buf_grapplerplus_device::device_add_mconfig(machine_config &config)
{
a2bus_grapplerplus_device_base::device_add_mconfig(config);
m_printer_conn->ack_handler().set(FUNC(a2bus_buf_grapplerplus_device::buf_ack_w));
// 1982 schematics show MCU driven by 7M clock but some boards have a crystal next to the MCU
// P22 is tied high, pulling it low is used for some factory test mode
I8048(config, m_mcu, DERIVED_CLOCK(1, 1));
m_mcu->set_addrmap(AS_IO, &a2bus_buf_grapplerplus_device::mcu_io);
m_mcu->p2_out_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_p2_w));
m_mcu->t0_in_cb().set([this] () { return busy_in(); });
m_mcu->t1_in_cb().set([this] () { return m_buf_ack_latch; });
m_mcu->bus_in_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_bus_r));
m_mcu->bus_out_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_bus_w));
// 1982 schematics show MCU driven by 7M clock
device_add_mconfig(config, DERIVED_CLOCK(1, 1));
}
@ -592,6 +588,29 @@ void a2bus_buf_grapplerplus_device::device_reset()
//--------------------------------------------------
// helpers
//--------------------------------------------------
template <typename T>
void a2bus_buf_grapplerplus_device::device_add_mconfig(machine_config &config, T &&mcu_clock)
{
a2bus_grapplerplus_device_base::device_add_mconfig(config);
m_printer_conn->ack_handler().set(FUNC(a2bus_buf_grapplerplus_device::buf_ack_w));
// P22 is tied high, pulling it low is used for some factory test mode
I8048(config, m_mcu, std::forward<T>(mcu_clock));
m_mcu->set_addrmap(AS_IO, &a2bus_buf_grapplerplus_device::mcu_io);
m_mcu->p2_out_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_p2_w));
m_mcu->t0_in_cb().set([this] () { return busy_in(); });
m_mcu->t1_in_cb().set([this] () { return m_buf_ack_latch; });
m_mcu->bus_in_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_bus_r));
m_mcu->bus_out_cb().set(FUNC(a2bus_buf_grapplerplus_device::mcu_bus_w));
}
//--------------------------------------------------
// a2bus_grapplerplus_device_base implementation
//--------------------------------------------------
@ -790,3 +809,29 @@ void a2bus_buf_grapplerplus_device::clear_ibusy(void *ptr, s32 param)
LOG("IBUSY already clear\n");
}
}
//==============================================================
// Buffered Grappler+ rev A implementation
//==============================================================
a2bus_buf_grapplerplus_reva_device::a2bus_buf_grapplerplus_reva_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) :
a2bus_buf_grapplerplus_device(mconfig, A2BUS_BUFGRAPPLERPLUSA, tag, owner, clock)
{
}
//--------------------------------------------------
// device_t implementation
//--------------------------------------------------
void a2bus_buf_grapplerplus_reva_device::device_add_mconfig(machine_config &config)
{
// boards with 6 MHz clock crystal for MCU have been seen with both UVEPROM and mask ROM parts
// ORANGE MICRO INC., 1983
// ASSY NO, 72 BGP 00001 REV A
// PART NO. 95PCB00003
a2bus_buf_grapplerplus_device::device_add_mconfig(config, 6_MHz_XTAL);
}

View File

@ -164,6 +164,8 @@ public:
virtual u8 read_c0nx(u8 offset) override;
protected:
a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock);
// device_t implementation
virtual tiny_rom_entry const *device_rom_region() const override;
virtual void device_add_mconfig(machine_config &config) override;
@ -171,6 +173,9 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
// helpers
template <typename T> void device_add_mconfig(machine_config &config, T &&mcu_clock);
private:
// a2bus_grapplerplus_device_base implementation
virtual void data_latched(u8 data) override;
@ -202,7 +207,19 @@ private:
};
class a2bus_buf_grapplerplus_reva_device : public a2bus_buf_grapplerplus_device
{
public:
a2bus_buf_grapplerplus_reva_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
protected:
// device_t implementation
virtual void device_add_mconfig(machine_config &config) override;
};
DECLARE_DEVICE_TYPE(A2BUS_GRAPPLERPLUS, a2bus_grapplerplus_device)
DECLARE_DEVICE_TYPE(A2BUS_BUFGRAPPLERPLUS, a2bus_buf_grapplerplus_device)
DECLARE_DEVICE_TYPE(A2BUS_BUFGRAPPLERPLUSA, a2bus_buf_grapplerplus_reva_device)
#endif // MAME_BUS_A2BUS_GRAPPLERPLUS_H

View File

@ -1316,6 +1316,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("parallel", A2BUS_PIC); /* Apple II Parallel Interface Card */
device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */
device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */
device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */
device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */
device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */
device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */

View File

@ -4667,6 +4667,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("parallel", A2BUS_PIC); /* Apple II Parallel Interface Card */
device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */
device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */
device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */
device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */
device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */
device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */

View File

@ -4765,6 +4765,7 @@ static void apple2_cards(device_slot_interface &device)
device.option_add("parallel", A2BUS_PIC); /* Apple Parallel Interface Card */
device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */
device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */
device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */
device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */
device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */
device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */