X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fsms.c;h=7dc796ef4bec9ebd1021228124c47ac97c3e9ba7;hb=4f2cdbf551ad1a7f487b65b4754cbf7983e80b8a;hp=1e1e748751e630362b31fae4cf5c0539137a2e0d;hpb=03065bb617aa86e7a4dfb943781fecb8db8836fb;p=picodrive.git diff --git a/pico/sms.c b/pico/sms.c index 1e1e748..7dc796e 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -1,10 +1,16 @@ +/* + * SMS emulation + * (C) notaz, 2009-2010 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ /* * TODO: * - start in a state as if BIOS ran * - remaining status flags (OVR/COL) * - RAM support in mapper * - region support - * - Pause button (NMI) * - SN76496 DAC-like usage * - H counter */ @@ -249,8 +255,16 @@ void PicoFrameMS(void) int skip = PicoSkipFrame; int lines_vis = 192; int hint; // Hint counter + int nmi; int y; + PsndStartFrame(); + + nmi = (PicoPad[0] >> 7) & 1; + if (!Pico.ms.nmi_state && nmi) + z80_nmi(); + Pico.ms.nmi_state = nmi; + PicoFrameStartMode4(); hint = pv->reg[0x0a];