static void store_pa(tpi_context_t *tpi_context, BYTE byte) { if (byte != tpi_context->oldpa) { BYTE tmp = ~byte; ieee_is_dev = byte & 0x01; ieee_is_out = byte & 0x02; parallel_cpu_set_bus((BYTE)(ieee_is_out ? tpi_context->oldpb : 0xff)); if (ieee_is_out) { parallel_cpu_set_ndac(0); parallel_cpu_set_nrfd(0); parallel_cpu_set_dav((BYTE)(tmp & 0x10)); parallel_cpu_set_eoi((BYTE)(tmp & 0x20)); } else { parallel_cpu_set_nrfd((BYTE)(tmp & 0x80)); parallel_cpu_set_ndac((BYTE)(tmp & 0x40)); parallel_cpu_set_dav(0); parallel_cpu_set_eoi(0); } if (ieee_is_dev) { parallel_cpu_set_atn(0); } else { parallel_cpu_set_atn((BYTE)(tmp & 0x08)); } } }
static void store_prb(via_context_t *via_context, BYTE byte, BYTE myoldpb, WORD addr) { parallel_cpu_set_dav((BYTE)(!(byte & 0x01))); parallel_cpu_set_nrfd((BYTE)(!(byte & 0x02))); parallel_cpu_set_ndac((BYTE)(!(byte & 0x04))); }
static void undump_pa(tpi_context_t *tpi_context, BYTE byte) { BYTE tmp = ~byte; cia1_set_ieee_dir(machine_context.cia1, byte & 2); if (byte & 2) { parallel_cpu_set_ndac(0); parallel_cpu_set_nrfd(0); parallel_cpu_restore_atn((BYTE)(tmp & 0x08)); parallel_cpu_set_dav((BYTE)(tmp & 0x10)); parallel_cpu_set_eoi((BYTE)(tmp & 0x20)); } else { /* order is important */ parallel_cpu_set_nrfd((BYTE)(tmp & 0x80)); parallel_cpu_set_ndac((BYTE)(tmp & 0x40)); parallel_cpu_restore_atn(0); parallel_cpu_set_dav(0); parallel_cpu_set_eoi(0); } }
static void reset(tpi_context_t *tpi_context) { /* assuming input after reset */ parallel_cpu_set_atn(0); parallel_cpu_set_ndac(0); parallel_cpu_set_nrfd(0); parallel_cpu_set_dav(0); parallel_cpu_set_eoi(0); parallel_cpu_set_bus(0xff); cia1_set_ieee_dir(machine_context.cia1, 0); }
static void reset(tpi_context_t *tpi_context) { /* assuming input after reset */ parallel_cpu_set_atn(0); parallel_cpu_set_ndac(0); parallel_cpu_set_nrfd(0); parallel_cpu_set_dav(0); parallel_cpu_set_eoi(0); parallel_cpu_set_bus(0xff); ieee_is_dev = 1; ieee_is_out = 1; }
static void pia_set_ca2(int a) { parallel_cpu_set_ndac((BYTE)((a) ? 0 : 1)); }
static void reset(via_context_t *via_context) { parallel_cpu_set_dav(0); parallel_cpu_set_nrfd(0); parallel_cpu_set_ndac(0); }
static void undump_prb(via_context_t *via_context, BYTE byte) { parallel_cpu_set_dav((BYTE)(!(byte & 0x01))); parallel_cpu_set_nrfd((BYTE)(!(byte & 0x02))); parallel_cpu_set_ndac((BYTE)(!(byte & 0x04))); }