Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Dec 20, 2024
2 parents c5cdf19 + 50e81bd commit 78e2dc7
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 28 deletions.
8 changes: 8 additions & 0 deletions scripts/src/bus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

---------------------------------------------------
Expand Down
96 changes: 77 additions & 19 deletions src/devices/bus/rs232/teletex800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
{
}

Expand All @@ -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);
Expand All @@ -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
{
}

Expand All @@ -88,6 +105,21 @@ class teletex_800_device : public device_t, public device_rs232_port_interface
required_device<pia6821_device> m_pia;
required_device<pia6821_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);
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/devices/cpu/m6502/m7501.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/devices/cpu/m6502/xavix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,5 +345,4 @@ void xavix_device::state_string_export(const device_state_entry &entry, std::str




#include "cpu/m6502/xavix.hxx"
167 changes: 167 additions & 0 deletions src/emu/layout/teletex800.lay
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<element name="panel">
<!--<image file="teletex800.png" />-->
</element>

<element name="button">
<rect>
<color red="0.25" green="0.25" blue="0.25" />
</rect>
</element>

<element name="red_led" defstate="0">
<disk state="0">
<color red="0.20" green="0.0" blue="0.0" />
</disk>
<disk state="1">
<color red="0.75" green="0.0" blue="0.0" />
</disk>
</element>

<element name="green_led" defstate="0">
<disk state="0">
<color red="0.0" green="0.20" blue="0.0" />
</disk>
<disk state="1">
<color red="0.0" green="0.75" blue="0.0" />
</disk>
</element>

<element name="digit" defstate="0">
<led7seg>
<color red="0.0" green="1.0" blue="0.0" />
</led7seg>
</element>

<element name="time_led" defstate="0">
<text state="0" string="TID">
<color red="0.0" green="0.20" blue="0.0" />
</text>
<text state="1" string="TID">
<color red="0.0" green="0.75" blue="0.0" />
</text>
</element>

<element name="date_led" defstate="0">
<text state="0" string="DAT">
<color red="0.0" green="0.20" blue="0.0" />
</text>
<text state="1" string="DAT">
<color red="0.0" green="0.75" blue="0.0" />
</text>
</element>

<element name="year_led" defstate="0">
<text state="0" string="ÅR">
<color red="0.0" green="0.20" blue="0.0" />
</text>
<text state="1" string="ÅR">
<color red="0.0" green="0.75" blue="0.0" />
</text>
</element>

<view name="Front panel">
<bounds x="0" y="0" width="810" height="473" />

<element ref="panel">
<bounds x="0" y="0" width="810" height="473" />
</element>

<!-- BATTERI DRIFT -->
<element name="bat_led" ref="red_led">
<bounds x="114" y="118" width="16" height="16" />
</element>

<!-- SKRIVAR FEL -->
<element name="pr_led" ref="red_led">
<bounds x="205" y="118" width="16" height="16" />
</element>

<!-- OKVITT TELEX -->
<element name="telex_led" ref="green_led">
<bounds x="298" y="118" width="16" height="16" />
</element>

<!-- MOTTAGNA -->
<element name="rx_digit0" ref="digit">
<bounds x="384" y="107" width="38" height="49" />
</element>

<element name="rx_digit1" ref="digit">
<bounds x="440" y="107" width="38" height="49" />
</element>

<!-- SEND KÖ -->
<element name="tx_digit0" ref="digit">
<bounds x="522" y="107" width="38" height="49" />
</element>

<element name="tx_digit1" ref="digit">
<bounds x="578" y="107" width="38" height="49" />
</element>

<!-- TID -->
<element name="time_led" ref="time_led">
<bounds x="658" y="99" width="29" height="14" />
</element>

<!-- DAT -->
<element name="date_led" ref="date_led">
<bounds x="659" y="123" width="29" height="14" />
</element>

<!-- ÅR -->
<element name="year_led" ref="year_led">
<bounds x="659" y="147" width="22" height="14" />
</element>

<!-- MINNES VARNING -->
<element name="mem_led" ref="red_led">
<bounds x="114" y="204" width="16" height="16" />
</element>

<!-- OBS -->
<element name="obs_led" ref="red_led">
<bounds x="205" y="204" width="16" height="16" />
</element>

<!-- SKRIV -->
<element name="write_led" ref="green_led">
<bounds x="298" y="204" width="16" height="16" />
</element>

<!-- LOG -->
<element name="log_led" ref="green_led">
<bounds x="388" y="204" width="16" height="16" />
</element>

<!---->
<element name="queue_led" ref="green_led">
<bounds x="479" y="204" width="16" height="16" />
</element>

<!-- ALLA -->
<element name="all_led" ref="green_led">
<bounds x="571" y="204" width="16" height="16" />
</element>

<!-- SKRIV -->
<element ref="button" inputtag="BTN" inputmask="0x01">
<bounds x="275" y="262" width="54" height="54" />
</element>

<!-- ALLA -->
<element ref="button" inputtag="BTN" inputmask="0x02">
<bounds x="556" y="261" width="54" height="54" />
</element>

<!-- KLOCK -->
<element ref="button" inputtag="BTN" inputmask="0x04">
<bounds x="648" y="263" width="54" height="54" />
</element>
</view>
</mamelayout>
11 changes: 6 additions & 5 deletions src/mame/dataeast/dec8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, [email protected]
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
Expand Down Expand Up @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions src/mame/tecfri/sauro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 78e2dc7

Please sign in to comment.