static WRITE8_HANDLER( bankedram_w ) { if (rambank == 2) cbasebal_textram_w(offset,data); else if (rambank == 1) { if (offset < 0x800) paletteram_xxxxBBBBRRRRGGGG_le_w(offset,data); } else cbasebal_scrollram_w(offset,data); }
static WRITE8_HANDLER( bankedram_w ) { cbasebal_state *state = (cbasebal_state *)space->machine->driver_data; switch (state->rambank) { case 2: cbasebal_textram_w(space, offset, data); break; case 1: if (offset < 0x800) paletteram_xxxxBBBBRRRRGGGG_le_w(space, offset, data); break; default: cbasebal_scrollram_w(space, offset, data); break; } }