@@ -349,7 +349,7 @@ void lastduel_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
349349{
350350 uint16_t const *const spriteram = m_spriteram->buffer ();
351351
352- for (int offs = 0x400 - 4 ; offs >= 0 ; offs -= 4 )
352+ for (int offs = m_spriteram-> length () - 4 ; offs >= 0 ; offs -= 4 )
353353 {
354354 int const attr = spriteram[offs + 1 ];
355355 if (pri_mask) // only madgear seems to have this
@@ -503,8 +503,8 @@ void lastduel_state::madgear_interrupt(int state)
503503void lastduel_state::lastduel_map (address_map &map)
504504{
505505 map (0x000000 , 0x05ffff ).rom ();
506- map (0xfc0000 , 0xfc0003 ). nopw () ; // written rarely
507- map (0xfc0800 , 0xfc0fff ).ram ().share (" spriteram" );
506+ map (0xfc0000 , 0xfc07ff ). mirror ( 0x003000 ). ram () ; // unused
507+ map (0xfc0800 , 0xfc0fff ).mirror ( 0x003000 ). ram ().share (" spriteram" );
508508 map (0xfc4000 , 0xfc4001 ).portr (" P1_P2" );
509509 map (0xfc4001 , 0xfc4001 ).w (FUNC (lastduel_state::flip_w));
510510 map (0xfc4002 , 0xfc4003 ).portr (" SYSTEM" );
@@ -522,7 +522,8 @@ void lastduel_state::lastduel_map(address_map &map)
522522void lastduel_state::madgear_map (address_map &map)
523523{
524524 map (0x000000 , 0x07ffff ).rom ();
525- map (0xfc1800 , 0xfc1fff ).ram ().share (" spriteram" );
525+ map (0xfc0000 , 0xfc07ff ).mirror (0x003000 ).ram (); // unused
526+ map (0xfc0800 , 0xfc0fff ).mirror (0x003000 ).ram ().share (" spriteram" );
526527 map (0xfc4000 , 0xfc4001 ).portr (" DSW1" );
527528 map (0xfc4001 , 0xfc4001 ).w (FUNC (lastduel_state::flip_w));
528529 map (0xfc4002 , 0xfc4003 ).portr (" DSW2" );
0 commit comments