Starting to dig into City Connection arcade's inner workings for... reasons, and the MAME driver has a hook into the init to convert text character graphics because the color for text characters isn't set per character but per scanline.
MAME citycon.cppvoid citycon_state::init_citycon() { uint8_t *rom = memregion("gfx1")->base(); /* City Connection controls the text color code for each _scanline_, not for each character as happens in most games. To handle that conveniently, I convert the 2bpp char data into 5bpp, and create a virtual palette so characters can still be drawn in one pass. */ for (int i = 0x0fff; i >= 0; i--) { rom[3 * i] = rom[i]; rom[3 * i + 1] = 0; rom[3 * i + 2] = 0; int mask = rom[i] | (rom[i] << 4) | (rom[i] >> 4); if (i & 0x01) rom[3 * i + 1] |= mask & 0xf0; if (i & 0x02) rom[3 * i + 1] |= mask & 0x0f; if (i & 0x04) rom[3 * i + 2] |= mask & 0xf0; } }
made with @nex3's syntax highlighter
