Fixes cuebrckj0102u5gre using a horrible hack. konamiic.c calls the tilemap callback for reading the ROM!?!? This is detected by reading the current PC and the proper value is returned.

This commit is contained in:
Zsolt Vasvari 2008-01-12 04:38:47 +00:00
parent c590cd8a56
commit d6166834f2

View File

@ -63,15 +63,23 @@ 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) static void cuebrick_tile_callback(int layer,int bank,int *code,int *color,int *flags,int *priority)
{ {
if (layer == 0) /* HACK! - since konamiic.c calls here with layer=0 when reading the ROM, detect this
{ and return the proper value in 'code' */
*code |= ((*color & 0x01) << 8); if ((cpu_getactivecpu() == 0) && ((activecpu_get_pc() & 0xffff0) == 0x002630))
*color = layer_colorbase[layer] + ((*color & 0x80) >> 5) + ((*color & 0x10) >> 1); *code |= ((*color & 0xf) << 8);
} /* normal access via the tilemap code */
else else
{ {
*code |= ((*color & 0xf) << 8); if (layer == 0)
*color = layer_colorbase[layer] + ((*color & 0xe0) >> 5); {
*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);
}
} }
} }