diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c index 836ae154aae..45b92e55582 100644 --- a/src/mame/video/konamiic.c +++ b/src/mame/video/konamiic.c @@ -2270,6 +2270,11 @@ void K052109_set_RMRD_line(int state) K052109_RMRD_line = state; } +int K052109_get_RMRD_line(void) +{ + return K052109_RMRD_line; +} + void K052109_tilemap_update(void) { diff --git a/src/mame/video/konamiic.h b/src/mame/video/konamiic.h index 865a7a1380f..c71e9815ea7 100644 --- a/src/mame/video/konamiic.h +++ b/src/mame/video/konamiic.h @@ -75,6 +75,7 @@ WRITE16_HANDLER( K052109_word_w ); READ16_HANDLER( K052109_lsb_r ); WRITE16_HANDLER( K052109_lsb_w ); void K052109_set_RMRD_line(int state); +int K052109_get_RMRD_line(void); void K052109_tilemap_update(void); int K052109_is_IRQ_enabled(void); void K052109_set_layer_offsets(int layer, int dx, int dy); diff --git a/src/mame/video/tmnt.c b/src/mame/video/tmnt.c index 99ed1b47f0a..0ee20e4cbbe 100644 --- a/src/mame/video/tmnt.c +++ b/src/mame/video/tmnt.c @@ -10,6 +10,7 @@ static int prmrsocr_sprite_bank; static int sorted_layer[3]; static int dim_c,dim_v; /* ssriders, tmnt2 */ static int lastdim,lasten; +static int priorityflag; static tilemap *roz_tilemap; @@ -63,23 +64,15 @@ static void mia_tile_callback(int layer,int bank,int *code,int *color,int *flags static void cuebrick_tile_callback(int layer,int bank,int *code,int *color,int *flags,int *priority) { - /* HACK! - since konamiic.c calls here with layer=0 when reading the ROM, detect this - and return the proper value in 'code' */ - if ((cpu_getactivecpu() == 0) && ((activecpu_get_pc() & 0xffff0) == 0x002630)) - *code |= ((*color & 0xf) << 8); - /* normal access via the tilemap code */ - else - { - if (layer == 0) - { - *code |= ((*color & 0x01) << 8); - *color = layer_colorbase[layer] + ((*color & 0x80) >> 5) + ((*color & 0x10) >> 1); - } - else - { - *code |= ((*color & 0xf) << 8); - *color = layer_colorbase[layer] + ((*color & 0xe0) >> 5); - } + if ((K052109_get_RMRD_line() == CLEAR_LINE) && (layer == 0)) + { + *code |= ((*color & 0x01) << 8); + *color = layer_colorbase[layer] + ((*color & 0x80) >> 5) + ((*color & 0x10) >> 1); + } + else + { + *code |= ((*color & 0xf) << 8); + *color = layer_colorbase[layer] + ((*color & 0xe0) >> 5); } } @@ -355,7 +348,7 @@ WRITE16_HANDLER( tmnt_0a0000_w ) interrupt_enable_w(0,data & 0x20); /* bit 7 = enable char ROM reading through the video RAM */ - K052109_set_RMRD_line((data & 0x80) ? ASSERT_LINE : CLEAR_LINE); + K052109_set_RMRD_line(data & 0x80 ? ASSERT_LINE : CLEAR_LINE); /* other bits unused */ }