SegaXtreme

If I use the back screen as a way to plot a pixel.

In a H-BLANK interrupt, I set SCU timer 1 to a value of 159 and set the back screen to a particular color (black).

Then when the timer 1 interrupt is fired, I change the color value of the back screen. Then I disable the timer 1 interrupt.

I expect to see pixel plot. However, I'm seeing a lot of flickering (in hardware).

_line is incremented by pad left/right.

Code:
static void __unused
_vblank_out_handler(irq_mux_handle_t *irq_mux __unused)
{
        scu_timer_t0_value_set(110);
        scu_timer_line_enable(); /* Specific scanline */
}

static void __unused
_hblank_in_handler(void)
{
        if (!_set) {
                return;
        }

        _set = false;

        /* Write to VRAM */
        _back_screen[111] = COLOR_RGB555(31, 31, 31).raw;

        scu_timer_t1_value_set(_line);
}

static void __unused
_timer0_handler(void)
{
        _set = true;
}

static void __unused
_timer1_handler(void)
{
        _back_screen[111] = COLOR_RGB555(31,  0, 0).raw;
}
Top