From e462f6a53992b55d05b5850d44272808e01bd426 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Fri, 20 Dec 2024 11:09:52 +0200 Subject: [PATCH 1/3] bus/rs232/teletex800: Add front panel layout. [Curt Coder] --- scripts/src/bus.lua | 8 ++ src/devices/bus/rs232/teletex800.cpp | 96 ++++++++++++--- src/emu/layout/teletex800.lay | 167 +++++++++++++++++++++++++++ 3 files changed, 252 insertions(+), 19 deletions(-) create mode 100644 src/emu/layout/teletex800.lay diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 6c7105a6e77..404c3093864 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -3372,6 +3372,14 @@ if (BUSES["RS232"]~=null) then MAME_DIR .. "src/devices/bus/rs232/xvd701.cpp", MAME_DIR .. "src/devices/bus/rs232/xvd701.h", } + + dependency { + { MAME_DIR .. "src/devices/bus/rs232/teletex800.cpp", GEN_DIR .. "emu/layout/teletex800.lh" }, + } + + custombuildtask { + layoutbuildtask("emu/layout", "teletex800"), + } end --------------------------------------------------- diff --git a/src/devices/bus/rs232/teletex800.cpp b/src/devices/bus/rs232/teletex800.cpp index e4af30a9dd7..46bac3bb5fd 100644 --- a/src/devices/bus/rs232/teletex800.cpp +++ b/src/devices/bus/rs232/teletex800.cpp @@ -10,27 +10,10 @@ #include "machine/z80ctc.h" #include "machine/z80daisy.h" #include "machine/z80sio.h" +#include "teletex800.lh" namespace { -ROM_START( teletex800 ) - ROM_REGION( 0x1000, "z80", 0 ) - ROM_LOAD( "ix44_ver1.1.u57", 0x0000, 0x1000, CRC(5c11b89c) SHA1(4911332709a8dcda12e72bcdf7a0acd58d65cbfd) ) -ROM_END - -static const z80_daisy_config z80_daisy_chain[] = -{ - { nullptr } -}; - -static void printer_devices(device_slot_interface &device) -{ - device.option_add("printer", SERIAL_PRINTER); -} - -static INPUT_PORTS_START( teletex800 ) -INPUT_PORTS_END - class teletex_800_device : public device_t, public device_rs232_port_interface { public: @@ -42,7 +25,21 @@ class teletex_800_device : public device_t, public device_rs232_port_interface m_sio(*this, "sio"), m_acia(*this, "acia"), m_pia(*this, "pia"), - m_pia_cp(*this, "pia_cp") + m_pia_cp(*this, "pia_cp"), + m_bat_led(*this, "bat_led"), + m_pr_led(*this, "pr_led"), + m_telex_led(*this, "telex_led"), + m_mem_led(*this, "mem_led"), + m_obs_led(*this, "obs_led"), + m_write_led(*this, "write_led"), + m_log_led(*this, "log_led"), + m_queue_led(*this, "queue_led"), + m_all_led(*this, "all_led"), + m_time_led(*this, "time_led"), + m_date_led(*this, "date_led"), + m_year_led(*this, "year_led"), + m_rx_digits(*this, "rx_digit%u", 0U), + m_tx_digits(*this, "tx_digit%u", 0U) { } @@ -54,6 +51,8 @@ class teletex_800_device : public device_t, public device_rs232_port_interface virtual void device_add_mconfig(machine_config &config) override { + config.set_default_layout(layout_teletex800); + // main board Z80(config, m_maincpu, XTAL(4'915'200)); m_maincpu->set_daisy_config(z80_daisy_chain); @@ -77,6 +76,24 @@ class teletex_800_device : public device_t, public device_rs232_port_interface } virtual void device_start() override + { + m_bat_led.resolve(); + m_pr_led.resolve(); + m_telex_led.resolve(); + m_mem_led.resolve(); + m_obs_led.resolve(); + m_write_led.resolve(); + m_log_led.resolve(); + m_queue_led.resolve(); + m_all_led.resolve(); + m_time_led.resolve(); + m_date_led.resolve(); + m_year_led.resolve(); + m_rx_digits.resolve(); + m_tx_digits.resolve(); + } + + virtual void device_reset() override { } @@ -88,6 +105,21 @@ class teletex_800_device : public device_t, public device_rs232_port_interface required_device m_pia; required_device m_pia_cp; + output_finder<> m_bat_led; + output_finder<> m_pr_led; + output_finder<> m_telex_led; + output_finder<> m_mem_led; + output_finder<> m_obs_led; + output_finder<> m_write_led; + output_finder<> m_log_led; + output_finder<> m_queue_led; + output_finder<> m_all_led; + output_finder<> m_time_led; + output_finder<> m_date_led; + output_finder<> m_year_led; + output_finder<2> m_rx_digits; + output_finder<2> m_tx_digits; + void program_map(address_map &map) { map(0x0000, 0x0fff).rom().region("z80", 0); @@ -96,6 +128,32 @@ class teletex_800_device : public device_t, public device_rs232_port_interface void io_map(address_map &map) { } + + constexpr static const z80_daisy_config z80_daisy_chain[] = + { + { nullptr } + }; + + static void printer_devices(device_slot_interface &device) + { + device.option_add("printer", SERIAL_PRINTER); + } + + INPUT_CHANGED_MEMBER( write ) { }; + INPUT_CHANGED_MEMBER( all ) { }; + INPUT_CHANGED_MEMBER( clock ) { }; + + static INPUT_PORTS_START( teletex800 ) + PORT_START("BTN") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("SKRIV") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(teletex_800_device::write), 0) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("ALLA") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(teletex_800_device::all), 0) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("KLOCK") PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(teletex_800_device::clock), 0) + INPUT_PORTS_END + + constexpr ROM_START( teletex800 ) + ROM_REGION( 0x1000, "z80", 0 ) + ROM_LOAD( "ix44_ver1.1.u57", 0x0000, 0x1000, CRC(5c11b89c) SHA1(4911332709a8dcda12e72bcdf7a0acd58d65cbfd) ) + ROM_END }; } // anonymous namespace diff --git a/src/emu/layout/teletex800.lay b/src/emu/layout/teletex800.lay new file mode 100644 index 00000000000..b34f144cb55 --- /dev/null +++ b/src/emu/layout/teletex800.lay @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2fa6bf1e0a2414c53fde29166f0e8ac302df74c2 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 20 Dec 2024 12:13:19 +0100 Subject: [PATCH 2/3] m7501: correct device name --- src/devices/cpu/m6502/m7501.cpp | 2 +- src/devices/cpu/m6502/xavix.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/devices/cpu/m6502/m7501.cpp b/src/devices/cpu/m6502/m7501.cpp index 59f62ed8046..30921d1664f 100644 --- a/src/devices/cpu/m6502/m7501.cpp +++ b/src/devices/cpu/m6502/m7501.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "m7501.h" -DEFINE_DEVICE_TYPE(M7501, m7501_device, "m7501", "M7501") +DEFINE_DEVICE_TYPE(M7501, m7501_device, "m7501", "MOS Technology 7501") m7501_device::m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : m6510_device(mconfig, M7501, tag, owner, clock) diff --git a/src/devices/cpu/m6502/xavix.cpp b/src/devices/cpu/m6502/xavix.cpp index c8f98a0e8f7..2a5392679ca 100644 --- a/src/devices/cpu/m6502/xavix.cpp +++ b/src/devices/cpu/m6502/xavix.cpp @@ -345,5 +345,4 @@ void xavix_device::state_string_export(const device_state_entry &entry, std::str - #include "cpu/m6502/xavix.hxx" From 50e81bdee7a5998ab1aad2fb142129edf43ad1f1 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 20 Dec 2024 13:49:21 +0100 Subject: [PATCH 3/3] dec8: let's make meikyuh a parent set --- src/mame/dataeast/dec8.cpp | 11 ++++++----- src/mame/tecfri/sauro.cpp | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mame/dataeast/dec8.cpp b/src/mame/dataeast/dec8.cpp index d92eb54bb4e..7b7a02806f1 100644 --- a/src/mame/dataeast/dec8.cpp +++ b/src/mame/dataeast/dec8.cpp @@ -28,15 +28,16 @@ Cobra Command (Japan) (c) 1988 Data East Corporation (6809) All games use a 6502 for sound (some are encrypted), all games except Cobracom and Oscar use an Intel 8751 for protection & coinage. -Meikyuu Hunter G was formerly known as Mazehunter. +Meikyuu Hunter G was formerly known as Mazehunter. It's a Japan-only modified +version of Ghostbusters, due to licensing restrictions. Emulation by Bryan McPhail, mish@tendril.co.uk Thanks to Jose Miguel Morales Farreras for Super Real Darwin information! TODO: - shackled continue after game over does not work, see MT0418. It's not that - big of an issue for user-wise, since credits add more health. For breywood, - it appears to work ok after the 1st level. + big of an issue user-wise, since credits add more health. For breywood, it + appears to work ok after the 1st level. - srdarwin 'double' sprites appearing from the top of the screen are clipped - strangely coloured butterfly on Garyo Retsuden water levels! - gondo 2nd coin doesn't work, probably due to hacked MCU ROM @@ -4036,8 +4037,8 @@ GAME( 1987, ghostb, 0, ghostb, ghostb, ghostb_state, empty_in GAME( 1987, ghostb2a, ghostb, ghostb, ghostb2a, ghostb_state, empty_init, ROT0, "Data East USA", "The Real Ghostbusters (US 2 Players)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, ghostb3, ghostb, ghostb, ghostb3, ghostb_state, empty_init, ROT0, "Data East USA", "The Real Ghostbusters (US 3 Players, revision 3B?)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, ghostb3a, ghostb, ghostb, ghostb3, ghostb_state, empty_init, ROT0, "Data East USA", "The Real Ghostbusters (US 3 Players, revision 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, meikyuh, ghostb, meikyuh, meikyuh, ghostb_state, empty_init, ROT0, "Data East Corporation", "Meikyuu Hunter G (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, meikyuhbl, ghostb, meikyuh, meikyuh, ghostb_state, init_meikyuhbl, ROT0, "bootleg", "Meikyuu Hunter G (Japan, bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, meikyuh, 0, meikyuh, meikyuh, ghostb_state, empty_init, ROT0, "Data East Corporation", "Meikyuu Hunter G (Japan)", MACHINE_SUPPORTS_SAVE ) // modified Ghostbusters +GAME( 1987, meikyuhbl, meikyuh, meikyuh, meikyuh, ghostb_state, init_meikyuhbl, ROT0, "bootleg", "Meikyuu Hunter G (Japan, bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, csilver, 0, csilver, csilver, csilver_state, empty_init, ROT0, "Data East Corporation", "Captain Silver (World)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, csilverj, csilver, csilver, csilverj, csilver_state, empty_init, ROT0, "Data East Corporation", "Captain Silver (Japan, revision 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, csilverja, csilver, csilver, csilver, csilver_state, empty_init, ROT0, "Data East Corporation", "Captain Silver (Japan, revision 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/tecfri/sauro.cpp b/src/mame/tecfri/sauro.cpp index f1b0dbef055..4f5574e414a 100644 --- a/src/mame/tecfri/sauro.cpp +++ b/src/mame/tecfri/sauro.cpp @@ -372,7 +372,7 @@ void sauro_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) if (flipy) { flipx = !flipx; - sx = (235 - sx) & 0xff; // The & 0xff is not 100% percent correct + sx = (235 - sx) & 0xff; // The & 0xff is not 100% correct sy = 240 - sy; } @@ -433,7 +433,7 @@ void trckydoc_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec { flipx = !flipx; flipy = !flipy; - sx = (235 - sx) & 0xff; // The & 0xff is not 100% percent correct + sx = (235 - sx) & 0xff; // The & 0xff is not 100% correct sy = 240 - sy; }