X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fsms.c;h=9e80c98450fcf144664461df7a1457535bd36a31;hb=1c25c32c114f8cb76674287d2c85ee5677bfacf7;hp=a2351b0f45e9d7505f09717a54f28cc72ebf2287;hpb=7669591e0876778fc4f3977b145c012f2e3a12e9;p=picodrive.git diff --git a/pico/sms.c b/pico/sms.c index a2351b0..9e80c98 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -31,9 +31,12 @@ static unsigned char vdp_data_read(void) static unsigned char vdp_ctl_read(void) { - unsigned char d = Pico.video.pending_ints << 7; - Pico.video.pending = 0; - Pico.video.pending_ints = 0; + struct PicoVideo *pv = &Pico.video; + unsigned char d; + + d = pv->status | (pv->pending_ints << 7); + pv->pending = pv->pending_ints = 0; + pv->status = 0; elprintf(EL_SR, "VDP sr: %02x", d); return d;