diff --git a/src/mame/machine/xavix.cpp b/src/mame/machine/xavix.cpp index 89ba1683440..7228c8f7ddf 100644 --- a/src/mame/machine/xavix.cpp +++ b/src/mame/machine/xavix.cpp @@ -409,7 +409,9 @@ WRITE8_MEMBER(xavix_state::irq_source_w) void xavix_state::machine_start() { - + // card night expects RAM to be initialized to 0xff or it will show the pause menu over the startup graphics?! + // don't do this every reset or it breaks the baseball 2 secret mode toggle which flips a bit in RAM + std::fill_n(&m_mainram[0], 0x4000, 0xff); } void xavix_state::machine_reset() @@ -448,40 +450,13 @@ void xavix_state::machine_reset() m_soundregs[12] = 0; m_soundregs[13] = 0; - for (int i = 0; i < 3; i++) - m_multparams[i] = 0; - - for (int i = 0; i < 2; i++) - m_multresults[i] = 0; - - for (int i = 0; i < 2; i++) - { - m_spritefragment_dmaparam1[i] = 0; - m_spritefragment_dmaparam2[i] = 0; - } - - for (int i = 0; i < 8; i++) - { - m_tmap1_regs[i] = 0; - m_tmap2_regs[i] = 0; - } - - for (int i = 0; i < 3; i++) - { - m_txarray[i] = 0x00; - } - - for (int i = 0; i < 0x800; i++) - { - // taito nostalgia 1 never initializes the ram at 0x6400 but there's no condition on using it at present? - m_fragment_sprite[i] = 0x00; - } - - for (int i = 0; i < 0x4000; i++) - { - // card night expects RAM to be initialized to 0xff or it will show the pause menu over the startup graphics?! - m_mainram[i] = 0xff; - } + std::fill(std::begin(m_multparams), std::end(m_multparams), 0x00); + std::fill(std::begin(m_multresults), std::end(m_multresults), 0x00); + std::fill(std::begin(m_spritefragment_dmaparam1), std::end(m_spritefragment_dmaparam1), 0x00); + std::fill(std::begin(m_tmap1_regs), std::end(m_tmap1_regs), 0x00); + std::fill(std::begin(m_tmap2_regs), std::end(m_tmap2_regs), 0x00); + std::fill(std::begin(m_txarray), std::end(m_txarray), 0x00); + std::fill_n(&m_fragment_sprite[0], 0x800, 0x00); // taito nostalgia 1 never initializes the ram at 0x6400 but there's no condition on using it at present? m_lowbus->set_bank(0); } diff --git a/src/mame/video/xavix.cpp b/src/mame/video/xavix.cpp index f246100e249..f00f5ec701f 100644 --- a/src/mame/video/xavix.cpp +++ b/src/mame/video/xavix.cpp @@ -674,15 +674,19 @@ uint32_t xavix_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, if (m_arena_control & 0x01) { - // some games enable it with both regs as 00, which causes a problem - if (m_arena_start > m_arena_end) + /* Controls the clipping area (for all layers?) used for effect at start of Slap Fight and to add black borders in other cases + based on Slap Fight Tiger lives display (and reference videos) this is slightly offset as all status bar gfx must display + Monster Truck black bars are wider on the right hand side, but this matches with the area in which the tilemap is incorrectly rendered so seems to be intentional + Snowboard hides garbage sprites on the right hand side with this, confirming the right hand side offset + Taito Nostalgia 1 'Gladiator' portraits in demo mode are cut slightly due to the area specified, again the cut-off points for left and right are confirmed as correct on hardware + + some games enable it with both regs as 00, which causes a problem, likewise ping pong sets both to 0xff + but Slap Fight Tiger has both set to 0x82 at a time when everything should be clipped + */ + if (((m_arena_start != 0x00) && (m_arena_end != 0x00)) && ((m_arena_start != 0xff) && (m_arena_end != 0xff))) { - // controls the clipping area (for all layers?) used for effect at start of Slap Fight and to add black borders in other cases - // based on Slap Fight Tiger lives display (and reference videos) this is slightly offset as all gfx must display - // other games don't correct the offset so will display a tiny bit of extra space at times? - // (there is some tilemap draw-in on Monster Truck) - clip.max_x = m_arena_start + 1; - clip.min_x = m_arena_end - 2; + clip.max_x = m_arena_start - 3; + clip.min_x = m_arena_end - 1; if (clip.min_x < cliprect.min_x) clip.min_x = cliprect.min_x;