1 /* specplus3.h: Spectrum +2A/+3 specific routines 2 Copyright (c) 1999-2004 Philip Kendall 3 4 $Id: specplus3.h 4353 2011-04-06 00:28:47Z zubzero $ 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along 17 with this program; if not, write to the Free Software Foundation, Inc., 18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 20 Author contact information: 21 22 E-mail: philip-fuse@shadowmagic.org.uk 23 24 */ 25 26 #ifndef FUSE_SPECPLUS3_H 27 #define FUSE_SPECPLUS3_H 28 29 #include <libspectrum.h> 30 31 #include "machine.h" 32 #include "periph.h" 33 #include "peripherals/disk/fdd.h" 34 35 int specplus3_port_from_ula( libspectrum_word port ); 36 37 int specplus3_init( fuse_machine_info *machine ); 38 void specplus3_765_update_fdd( void ); 39 void specplus3_765_init( void ); 40 void specplus3_765_reset( void ); 41 42 int specplus3_plus2a_common_reset( void ); 43 void specplus3_fdc_reset( void ); 44 void specplus3_menu_items( void ); 45 int specplus3_shutdown( void ); 46 47 void specplus3_memoryport_write( libspectrum_word port, libspectrum_byte b ); 48 void specplus3_memoryport2_write( libspectrum_word port, libspectrum_byte b ); 49 50 libspectrum_byte specplus3_fdc_status( libspectrum_word port, int *attached ); 51 libspectrum_byte specplus3_fdc_read( libspectrum_word port, int *attached ); 52 void specplus3_fdc_write( libspectrum_word port, libspectrum_byte data ); 53 54 int specplus3_memory_map( void ); 55 56 typedef enum specplus3_drive_number { 57 SPECPLUS3_DRIVE_A = 0, /* First drive must be number zero */ 58 SPECPLUS3_DRIVE_B, 59 } specplus3_drive_number; 60 61 int specplus3_disk_insert( specplus3_drive_number which, const char *filename, 62 int autoload ); 63 int specplus3_disk_eject( specplus3_drive_number which ); 64 int specplus3_disk_save( specplus3_drive_number which, int saveas ); 65 int specplus3_disk_write( specplus3_drive_number which, const char *filename ); 66 int specplus3_disk_flip( specplus3_drive_number which, int flip ); 67 int specplus3_disk_writeprotect( specplus3_drive_number which, int wp ); 68 fdd_t *specplus3_get_fdd( specplus3_drive_number which ); 69 70 #endif /* #ifndef FUSE_SPECPLUS3_H */ 71