jotego / jtcores

FPGA cores compatible with multiple arcade game machines and KiCAD schematics of arcade games. Working on MiSTer FPGA/Analogue Pocket
https://patreon.com/jotego
GNU General Public License v3.0
240 stars 41 forks source link

riders: xmen colors for scroll A/B #760

Closed jotego closed 3 months ago

jotego commented 3 months ago

scroll A/B colors are completely messed up. The fixed layer seems ok.

jotego commented 3 months ago
    .lyra_pxl   ( { lyra_pxl[4+:4],lyra_pxl[11-:4],lyra_pxl[3:0]}  ),
    .lyrb_pxl   ( { lyrb_pxl[4+:4],lyrb_pxl[11-:4],lyrb_pxl[3:0]}  ),
K052109_CB_MEMBER(xmen_state::tile_callback)
{
    // (color & 0x02) is flip y handled internally by the 052109
    if (layer == 0)
        *color = m_layer_colorbase[layer] + ((*color & 0xf0) >> 4);
    else
        //*color = m_layer_colorbase[layer] + ((*color & 0x7c) >> 2);
        *color=m_layer_colorbase[layer]; // <- this reproduces the problem
}

Palette regions are assigned correctly:

but the color bits are not filled correctly for SCRA/SCRB

jotego commented 3 months ago

The color mux MMR bit was not correct in the RE information. Reported to Furrtek and implemented on MAME (PR done). Fixed in 21e74c2f