summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ymmu100.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ymmu100.cpp')
-rw-r--r--src/mame/drivers/ymmu100.cpp117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/mame/drivers/ymmu100.cpp b/src/mame/drivers/ymmu100.cpp
index e45ccbb1b06..830f24cb053 100644
--- a/src/mame/drivers/ymmu100.cpp
+++ b/src/mame/drivers/ymmu100.cpp
@@ -210,6 +210,7 @@ public:
{ }
void vl70(machine_config &config);
+ void mu50(machine_config &config);
void mu80(machine_config &config);
void mu100(machine_config &config);
@@ -361,6 +362,10 @@ private:
u16 pc_r_vl70();
void pf_w(u16 data);
void pg_w(u16 data);
+ void p6_w_mu50(u16 data);
+ u16 p6_r_mu50();
+ void pa_w_mu50(u16 data);
+ u16 pa_r_mu50();
float lightlevel(const u8 *src, const u8 *render);
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -369,6 +374,7 @@ private:
void mu100_map(address_map &map);
void mu80_iomap(address_map &map);
void mu80_map(address_map &map);
+ void mu50_iomap(address_map &map);
void vl70_iomap(address_map &map);
void vl70_map(address_map &map);
void swp30_map(address_map &map);
@@ -858,6 +864,7 @@ u16 mu100_state::p6_r_vl70()
void mu100_state::pa_w_vl70(u16 data)
{
+ printf("\n%02x to A\n", data);
cur_pa = data;
}
@@ -877,6 +884,50 @@ u16 mu100_state::pa_r_vl70()
return cur_pa;
}
+void mu100_state::p6_w_mu50(u16 data)
+{
+ data ^= P6_LCD_ENABLE;
+ if(!(cur_p6 & P6_LCD_ENABLE) && (data & P6_LCD_ENABLE)) {
+ if(!(cur_p6 & P6_LCD_RW)) {
+ if(cur_p6 & P6_LCD_RS)
+ m_lcd->data_write(cur_pa);
+ else
+ m_lcd->control_write(cur_pa);
+ }
+ }
+
+// if(!(cur_pa9 & 0x08) && (data & 0x08))
+// cur_ic32 = cur_pa;
+
+ cur_p6 = data;
+}
+
+u16 mu100_state::p6_r_mu50()
+{
+ return cur_p6;
+}
+
+void mu100_state::pa_w_mu50(u16 data)
+{
+ cur_pa = data;
+}
+
+u16 mu100_state::pa_r_mu50()
+{
+ if((cur_p6 & P6_LCD_ENABLE)) {
+ if(cur_p6 & P6_LCD_RW)
+ {
+ if(cur_p6 & P6_LCD_RS)
+ return m_lcd->data_read();
+ else
+ return m_lcd->control_read();
+ } else
+ return 0x00;
+ }
+
+ return cur_pa;
+}
+
void mu100_state::mu80_iomap(address_map &map)
{
map(h8_device::PORT_A, h8_device::PORT_A).rw(FUNC(mu100_state::pa_r_mu80), FUNC(mu100_state::pa_w_mu80));
@@ -891,6 +942,20 @@ void mu100_state::mu80_iomap(address_map &map)
map(h8_device::ADC_7, h8_device::ADC_7).r(FUNC(mu100_state::adc_zero_r)); // inputmod from the gate array
}
+void mu100_state::mu50_iomap(address_map &map)
+{
+ map(h8_device::PORT_6, h8_device::PORT_6).rw(FUNC(mu100_state::p6_r_mu50), FUNC(mu100_state::p6_w_mu50));
+ map(h8_device::PORT_A, h8_device::PORT_A).rw(FUNC(mu100_state::pa_r_mu50), FUNC(mu100_state::pa_w_mu50));
+ map(h8_device::ADC_0, h8_device::ADC_0).r(FUNC(mu100_state::adc_ar_r));
+ map(h8_device::ADC_1, h8_device::ADC_1).r(FUNC(mu100_state::adc_zero_r));
+ map(h8_device::ADC_2, h8_device::ADC_2).r(FUNC(mu100_state::adc_al_r));
+ map(h8_device::ADC_3, h8_device::ADC_3).r(FUNC(mu100_state::adc_zero_r));
+ map(h8_device::ADC_4, h8_device::ADC_4).r(FUNC(mu100_state::adc_midisw_r));
+ map(h8_device::ADC_5, h8_device::ADC_6).r(FUNC(mu100_state::adc_zero_r));
+ map(h8_device::ADC_6, h8_device::ADC_6).r(FUNC(mu100_state::adc_battery_r));
+ map(h8_device::ADC_7, h8_device::ADC_7).r(FUNC(mu100_state::adc_zero_r)); // inputmod from the gate array
+}
+
void mu100_state::vl70_iomap(address_map &map)
{
map(h8_device::PORT_6, h8_device::PORT_6).rw(FUNC(mu100_state::p6_r_vl70), FUNC(mu100_state::p6_w_vl70));
@@ -1011,6 +1076,46 @@ void mu100_state::mu80(machine_config &config)
m_mu80cpu->subdevice<h8_sci_device>("sci0")->tx_handler().set(mdout, FUNC(midi_port_device::write_txd));
}
+void mu100_state::mu50(machine_config &config)
+{
+ H83002(config, m_mu80cpu, 12_MHz_XTAL); // CPU type and speed are uncertain, but should be 3002 or 3003.
+ m_mu80cpu->set_addrmap(AS_PROGRAM, &mu100_state::mu80_map);
+ m_mu80cpu->set_addrmap(AS_IO, &mu100_state::mu50_iomap);
+
+ HD44780(config, m_lcd);
+ m_lcd->set_lcd_size(4, 20);
+
+ auto &screen = SCREEN(config, "screen", SCREEN_TYPE_LCD);
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate, asynchronous updating anyway */
+ screen.set_screen_update(FUNC(mu100_state::screen_update));
+ screen.set_size(900, 241);
+ screen.set_visarea(0, 899, 0, 240);
+
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ // In truth, dual swp-20
+ SWP30(config, m_swp30);
+ m_swp30->set_addrmap(0, &mu100_state::swp30_map);
+ m_swp30->add_route(0, "lspeaker", 1.0);
+ m_swp30->add_route(1, "rspeaker", 1.0);
+
+ MEG(config, m_meg);
+
+ auto &mdin_a(MIDI_PORT(config, "mdin_a"));
+ midiin_slot(mdin_a);
+ mdin_a.rxd_handler().set("mu80cpu:sci1", FUNC(h8_sci_device::rx_w));
+
+ auto &mdin_b(MIDI_PORT(config, "mdin_b"));
+ midiin_slot(mdin_b);
+ mdin_b.rxd_handler().set("mu80cpu:sci0", FUNC(h8_sci_device::rx_w));
+
+ auto &mdout(MIDI_PORT(config, "mdout"));
+ midiout_slot(mdout);
+ m_mu80cpu->subdevice<h8_sci_device>("sci0")->tx_handler().set(mdout, FUNC(midi_port_device::write_txd));
+}
+
void mu100_state::vl70(machine_config &config)
{
H83003(config, m_vl70cpu, 10_MHz_XTAL);
@@ -1100,6 +1205,17 @@ ROM_START( mu80 )
ROM_LOAD( "mu100-font.bin", 0x0000, 0x1000, BAD_DUMP CRC(a7d6c1d6) SHA1(9f0398d678bdf607cb34d83ee535f3b7fcc97c41) )
ROM_END
+ROM_START( mu50 )
+ ROM_REGION( 0x80000, "mu80cpu", 0 )
+ ROM_LOAD16_WORD_SWAP( "yamaha_mu50.bin", 0x000000, 0x080000, CRC(507168ad) SHA1(58c41f10d292cac35ef0e8f93029fbc4685df586) )
+
+ ROM_REGION( 0x1800000, "swp30", ROMREGION_ERASE00 )
+
+ ROM_REGION( 0x1000, "lcd", 0)
+ // Hand made, 3 characters unused
+ ROM_LOAD( "mu100-font.bin", 0x0000, 0x1000, BAD_DUMP CRC(a7d6c1d6) SHA1(9f0398d678bdf607cb34d83ee535f3b7fcc97c41) )
+ROM_END
+
ROM_START( vl70 )
ROM_REGION( 0x200000, "vl70cpu", 0 )
ROM_LOAD16_WORD_SWAP( "vl70m_v111_27c160.bin", 0x000000, 0x200000, CRC(efdba9f0) SHA1(cfa9fb7d2a991e4752393c9677e4ddcbe10866c7) )
@@ -1113,3 +1229,4 @@ CONS( 1997, mu100, 0, 0, mu100, mu100, mu100_state, empty_init, "Yamaha",
CONS( 1997, mu100r, mu100, 0, mu100, mu100, mu100r_state, empty_init, "Yamaha", "MU100 Rackable version", MACHINE_NOT_WORKING )
CONS( 1994, mu80, mu100, 0, mu80, mu100, mu100_state, empty_init, "Yamaha", "MU80", MACHINE_NOT_WORKING )
CONS( 1996, vl70, mu100, 0, vl70, vl70, mu100_state, empty_init, "Yamaha", "VL70-m", MACHINE_NOT_WORKING )
+CONS( 1995, mu50, mu100, 0, mu50, mu100, mu100_state, empty_init, "Yamaha", "MU50", MACHINE_NOT_WORKING )