From: kub Date: Thu, 6 Feb 2025 20:50:44 +0000 (+0100) Subject: sms, minor fix for SC-3000 X-Git-Tag: v2.04~55 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876677934ed5184635af09909220290e7a07b588;p=picodrive.git sms, minor fix for SC-3000 --- diff --git a/pico/sms.c b/pico/sms.c index 6833cfdc..e12b9130 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -570,14 +570,18 @@ static void z80_sms_out(unsigned short a, unsigned char d) case 0xc1: if ((PicoIn.AHW & PAHW_SC) && (a & 0x2) && !(d & 0x80)) { // For SC-3000: 8255 control port. BSR mode used for printer and tape. + int b = (d>>1) & 0x7; + Pico.ms.io_sg &= ~(1<>1 == 4) { // tape out + if (b == 4) { // tape out tape_write(z80_cyclesDone(), d&1); - } else if (d>>1 == 5) { // !data + } else if (b == 5) { // !data if (!bit) { if (d&1) // start bit bit = 8; @@ -588,7 +592,7 @@ static void z80_sms_out(unsigned short a, unsigned char d) if (chr == 0xd) printf("\n"); } } - } else if (d>>1 == 6 && !(d&1)) // !reset + } else if (b == 6 && !(d&1)) // !reset bit = 0; } break;