mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
fromanc4: Preliminary step towards 4-player link support (nw)
This commit is contained in:
parent
d781d7cf2e
commit
770f8b758d
@ -158,6 +158,12 @@ WRITE8_MEMBER(fromanc2_state::fromanc2_subcpu_rombank_w)
|
|||||||
membank("bank2")->set_entry((data & 0x0c) >> 2);
|
membank("bank2")->set_entry((data & 0x0c) >> 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// custom handler allowing byte-smeared writes
|
||||||
|
WRITE16_MEMBER(fromanc2_state::uart_w)
|
||||||
|
{
|
||||||
|
m_uart->ins8250_w(space, offset, data & 0xff);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
*
|
*
|
||||||
@ -257,8 +263,7 @@ static ADDRESS_MAP_START( fromanc4_main_map, AS_PROGRAM, 16, fromanc2_state )
|
|||||||
AM_RANGE(0xe30000, 0xe30013) AM_WRITENOP // ???
|
AM_RANGE(0xe30000, 0xe30013) AM_WRITENOP // ???
|
||||||
AM_RANGE(0xe40000, 0xe40013) AM_WRITENOP // ???
|
AM_RANGE(0xe40000, 0xe40013) AM_WRITENOP // ???
|
||||||
|
|
||||||
AM_RANGE(0xe50000, 0xe50009) AM_WRITENOP // EXT-COMM PORT ?
|
AM_RANGE(0xe50000, 0xe5000f) AM_DEVREAD8("uart", ns16550_device, ins8250_r, 0x00ff) AM_WRITE(uart_w) // EXT-COMM PORT ?
|
||||||
AM_RANGE(0xe5000c, 0xe5000d) AM_READNOP // EXT-COMM PORT ?
|
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
|
|
||||||
@ -624,11 +629,11 @@ MACHINE_CONFIG_END
|
|||||||
static MACHINE_CONFIG_START( fromanc4 )
|
static MACHINE_CONFIG_START( fromanc4 )
|
||||||
|
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", M68000,32000000/2) /* 16.00 MHz */
|
MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) /* 16.00 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(fromanc4_main_map)
|
MCFG_CPU_PROGRAM_MAP(fromanc4_main_map)
|
||||||
MCFG_CPU_VBLANK_INT_DRIVER("lscreen", fromanc2_state, fromanc2_interrupt)
|
MCFG_CPU_VBLANK_INT_DRIVER("lscreen", fromanc2_state, fromanc2_interrupt)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,32000000/4) /* 8.00 MHz */
|
MCFG_CPU_ADD("audiocpu", Z80, XTAL_32MHz/4) /* 8.00 MHz */
|
||||||
MCFG_CPU_PROGRAM_MAP(fromanc2_sound_map)
|
MCFG_CPU_PROGRAM_MAP(fromanc2_sound_map)
|
||||||
MCFG_CPU_IO_MAP(fromanc2_sound_io_map)
|
MCFG_CPU_IO_MAP(fromanc2_sound_io_map)
|
||||||
|
|
||||||
@ -636,6 +641,8 @@ static MACHINE_CONFIG_START( fromanc4 )
|
|||||||
|
|
||||||
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
|
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
|
||||||
|
|
||||||
|
MCFG_DEVICE_ADD("uart", NS16550, 2000000) // actual type is TL16C550CFN; clock unknown
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_GFXDECODE_ADD("gfxdecode", "lpalette", fromancr)
|
MCFG_GFXDECODE_ADD("gfxdecode", "lpalette", fromancr)
|
||||||
|
|
||||||
@ -812,4 +819,4 @@ DRIVER_INIT_MEMBER(fromanc2_state,fromanc4)
|
|||||||
|
|
||||||
GAME( 1995, fromanc2, 0, fromanc2, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Idol-Mahjong Final Romance 2 (Japan)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1995, fromanc2, 0, fromanc2, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Idol-Mahjong Final Romance 2 (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong Final Romance R (Japan)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1995, fromancr, 0, fromancr, fromanc2, fromanc2_state, fromanc2, ROT0, "Video System Co.", "Taisen Mahjong Final Romance R (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||||
GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong Final Romance 4 (Japan)", MACHINE_SUPPORTS_SAVE )
|
GAME( 1998, fromanc4, 0, fromanc4, fromanc4, fromanc2_state, fromanc4, ROT0, "Video System Co.", "Taisen Mahjong Final Romance 4 (Japan)", MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE )
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "machine/gen_latch.h"
|
#include "machine/gen_latch.h"
|
||||||
#include "machine/eepromser.h"
|
#include "machine/eepromser.h"
|
||||||
|
#include "machine/ins8250.h"
|
||||||
|
|
||||||
class fromanc2_state : public driver_device
|
class fromanc2_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -17,7 +18,8 @@ public:
|
|||||||
m_lpalette(*this, "lpalette"),
|
m_lpalette(*this, "lpalette"),
|
||||||
m_rpalette(*this, "rpalette"),
|
m_rpalette(*this, "rpalette"),
|
||||||
m_soundlatch(*this, "soundlatch"),
|
m_soundlatch(*this, "soundlatch"),
|
||||||
m_soundlatch2(*this, "soundlatch2") { }
|
m_soundlatch2(*this, "soundlatch2"),
|
||||||
|
m_uart(*this, "uart") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
std::unique_ptr<uint16_t[]> m_videoram[2][4];
|
std::unique_ptr<uint16_t[]> m_videoram[2][4];
|
||||||
@ -48,6 +50,7 @@ public:
|
|||||||
required_device<palette_device> m_rpalette;
|
required_device<palette_device> m_rpalette;
|
||||||
required_device<generic_latch_8_device> m_soundlatch;
|
required_device<generic_latch_8_device> m_soundlatch;
|
||||||
required_device<generic_latch_8_device> m_soundlatch2;
|
required_device<generic_latch_8_device> m_soundlatch2;
|
||||||
|
optional_device<ns16550_device> m_uart;
|
||||||
|
|
||||||
DECLARE_WRITE16_MEMBER(fromanc2_sndcmd_w);
|
DECLARE_WRITE16_MEMBER(fromanc2_sndcmd_w);
|
||||||
DECLARE_WRITE16_MEMBER(fromanc2_portselect_w);
|
DECLARE_WRITE16_MEMBER(fromanc2_portselect_w);
|
||||||
@ -62,6 +65,7 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(fromanc2_subcpu_nmi_clr);
|
DECLARE_WRITE8_MEMBER(fromanc2_subcpu_nmi_clr);
|
||||||
DECLARE_READ8_MEMBER(fromanc2_sndcpu_nmi_clr);
|
DECLARE_READ8_MEMBER(fromanc2_sndcpu_nmi_clr);
|
||||||
DECLARE_WRITE8_MEMBER(fromanc2_subcpu_rombank_w);
|
DECLARE_WRITE8_MEMBER(fromanc2_subcpu_rombank_w);
|
||||||
|
DECLARE_WRITE16_MEMBER(uart_w);
|
||||||
DECLARE_WRITE16_MEMBER(fromanc2_videoram_0_w);
|
DECLARE_WRITE16_MEMBER(fromanc2_videoram_0_w);
|
||||||
DECLARE_WRITE16_MEMBER(fromanc2_videoram_1_w);
|
DECLARE_WRITE16_MEMBER(fromanc2_videoram_1_w);
|
||||||
DECLARE_WRITE16_MEMBER(fromanc2_videoram_2_w);
|
DECLARE_WRITE16_MEMBER(fromanc2_videoram_2_w);
|
||||||
|
Loading…
Reference in New Issue
Block a user