/* * c64tpi.def - IEEE488 interface for the C64. * * Written by * André Fachat (a.fachat@physik.tu-chemnitz.de) * * This file is part of VICE, the Versatile Commodore Emulator. * See README for copyright notice. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA. * */ INCLUDES() { #include "parallel.h" #include "tpi.h" } RESET() { /* assuming input after reset */ par_set_atn(0); par_set_ndac(0); par_set_nrfd(0); par_set_dav(0); par_set_eoi(0); par_set_bus(0); } STORE_PA() { par_set_atn( b & 0x08 ); par_set_dav( b & 0x10 ); par_set_eoi( b & 0x20 ); par_set_ndac( b & 0x40 ); par_set_nrfd( b & 0x80 ); } STORE_PB() { par_set_bus( b ); } #define STORE_PC READ_PA() { b = par_atn ? 0 : 8; b += par_dav ? 0 : 16; b += par_eoi ? 0 : 32; b += par_ndac ? 0 : 64; b += par_nrfd ? 0 : 128; } READ_PB() { b = par_bus; } #define READ_PC