void SERDAT (uae_u16 w) { unsigned char z; if (!currprefs.use_serial) return; z = (unsigned char)(w&0xff); if (currprefs.serial_demand && !dtr) { if (!isbaeh) { write_log ("SERDAT: Baeh.. Your software needs SERIAL_ALWAYS to work properly.\n"); isbaeh=1; } return; } else { outbuf[outlast++] = z; if (outlast == sizeof outbuf) serial_flush_buffer(); } #if SERIALDEBUG > 2 write_log ("SERDAT: wrote 0x%04x\n", w); #endif serdat|=0x2000; /* Set TBE in the SERDATR ... */ intreq|=1; /* ... and in INTREQ register */ return; }
void CIA_vsync_handler () { if (ciaatodon) { ciaatod++; ciaatod &= 0xFFFFFF; ciaa_checkalarm (1); } doreadser = 1; serstat = -1; serial_flush_buffer(); }