summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/xmen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/xmen.cpp')
-rw-r--r--src/mame/drivers/xmen.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index 73d549da487..a886ff9bb40 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -8,13 +8,19 @@ driver by Nicola Salmoria
notes:
-the way the double screen works in xmen6p is not fully understood
+The way the double screen works in xmen6p is not fully understood.
-the board only has one of each gfx chip, the only additional chip not found
+One of the screens probably has a buffer to delay it by 1 frame. If you
+hardcode buffering to the right screen, the intro is synced correctly,
+but in-game is not. Buffer the left screen and then in-game is correct,
+but the intro is not.
+
+The board only has one of each gfx chip, the only additional chip not found
on the 2/4p board is 053253. This chip is also on Run n Gun which is
-likewise a 2 screen game
+likewise a 2 screen game.
***************************************************************************/
+
#include "emu.h"
#include "includes/xmen.h"
#include "includes/konamipt.h"
@@ -46,8 +52,10 @@ void xmen_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask)
/* bit 2 is data */
/* bit 3 is clock (active high) */
/* bit 4 is cs (active low) */
- /* bit 5 is enabled in IRQ3, disabled in IRQ5 (sprite DMA start?) */
ioport("EEPROMOUT")->write(data, 0xff);
+
+ /* bit 5 is enabled in IRQ3, disabled in IRQ5 (sprite DMA start?) */
+ /* bit 7 used in xmen6p to select other tilemap bank (see halfway level 5) */
m_xmen6p_tilemap_select = BIT(data, 7);
}
if (ACCESSING_BITS_8_15)
@@ -57,7 +65,7 @@ void xmen_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask)
/* bit 9 = enable char ROM reading through the video RAM */
/* bit 10 = sound irq, but with some kind of hold */
m_k052109->set_rmrd_line((data & 0x0200) ? ASSERT_LINE : CLEAR_LINE);
- if(data & 0x4) {
+ if(data & 0x400) {
logerror("tick!\n");
m_audiocpu->set_input_line(0, HOLD_LINE);
}
@@ -115,9 +123,9 @@ void xmen_state::_6p_main_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
map(0x080000, 0x0fffff).rom();
- map(0x100000, 0x100fff).ram().share("spriteramleft"); /* sprites (screen 1) */
+ map(0x100000, 0x100fff).ram().share("spriteram0"); // left screen
map(0x101000, 0x101fff).ram();
- map(0x102000, 0x102fff).ram().share("spriteramright"); /* sprites (screen 2) */
+ map(0x102000, 0x102fff).ram().share("spriteram1"); // right screen
map(0x103000, 0x103fff).ram(); /* 6p - a buffer? */
map(0x104000, 0x104fff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x108000, 0x108001).w(FUNC(xmen_state::eeprom_w));
@@ -131,7 +139,7 @@ void xmen_state::_6p_main_map(address_map &map)
map(0x10a00c, 0x10a00d).r(m_k053246, FUNC(k053247_device::k053246_r)); /* sprites */
map(0x110000, 0x113fff).ram(); /* main RAM */
/* map(0x18c000, 0x197fff).w("k052109", FUNC(k052109_device:write)).umask16(0x00ff).share("tilemapleft"); */
- map(0x18c000, 0x197fff).ram().share("tilemapleft"); /* left tilemap (p1,p2,p3 counters) */
+ map(0x18c000, 0x197fff).ram().share("tilemap0"); // left screen
map(0x18fa00, 0x18fa01).w(FUNC(xmen_state::xmen_18fa00_w));
/*
map(0x1ac000, 0x1af7ff).readonly();
@@ -143,7 +151,7 @@ void xmen_state::_6p_main_map(address_map &map)
map(0x1b4000, 0x1b77ff).readonly();
map(0x1b4000, 0x1b77ff).writeonly();
*/
- map(0x1ac000, 0x1b7fff).ram().share("tilemapright"); /* right tilemap */
+ map(0x1ac000, 0x1b7fff).ram().share("tilemap1"); // right screen
/* what are the regions below buffers? (used by hw or software?) */
/*
@@ -153,7 +161,7 @@ void xmen_state::_6p_main_map(address_map &map)
map(0x1d0000, 0x1d37ff).readonly();
map(0x1d0000, 0x1d37ff).writeonly();
*/
- map(0x1cc000, 0x1d7fff).ram().share("tilemapleftalt"); /* tilemap ? */
+ map(0x1cc000, 0x1d7fff).ram().share("tilemap2"); // left screen
/* whats the stuff below, buffers? */
/*
@@ -164,7 +172,7 @@ void xmen_state::_6p_main_map(address_map &map)
map(0x1f4000, 0x1f77ff).readonly();
map(0x1f4000, 0x1f77ff).writeonly();
*/
- map(0x1ec000, 0x1f7fff).ram().share("tilemaprightalt"); /* tilemap ? */
+ map(0x1ec000, 0x1f7fff).ram().share("tilemap3"); // right screen
}
@@ -276,9 +284,7 @@ void xmen_state::machine_start()
void xmen_state::machine_reset()
{
- int i;
-
- for (i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++)
{
m_layerpri[i] = 0;
m_layer_colorbase[i] = 0;
@@ -297,7 +303,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(xmen_state::xmen_scanline)
if(scanline == 0) // sprite DMA irq?
m_maincpu->set_input_line(5, HOLD_LINE);
-
}
void xmen_state::xmen(machine_config &config)