1 /* rzx.h: .rzx files 2 Copyright (c) 2002-2003 Philip Kendall 3 4 $Id: rzx.h 4631 2012-01-19 22:43:24Z pak21 $ 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_RZX_H 27 #define FUSE_RZX_H 28 29 #ifdef HAVE_LIB_GLIB 30 #include <glib.h> 31 #endif /* #ifdef HAVE_LIB_GLIB */ 32 33 #include <libspectrum.h> 34 35 /* The offset used to get the count of instructions from the R register */ 36 extern int rzx_instructions_offset; 37 38 /* The number of bytes read via IN during the current frame */ 39 extern size_t rzx_in_count; 40 41 /* And the values of those bytes */ 42 extern libspectrum_byte *rzx_in_bytes; 43 44 /* How big is the above array? */ 45 extern size_t rzx_in_allocated; 46 47 /* Are we currently recording a .rzx file? */ 48 extern int rzx_recording; 49 50 /* Are we currently playing back a .rzx file? */ 51 extern int rzx_playback; 52 53 /* Is the .rzx file being recorded in competition mode? */ 54 extern int rzx_competition_mode; 55 56 /* The number of instructions in the current .rzx playback frame */ 57 extern size_t rzx_instruction_count; 58 59 /* The actual RZX data */ 60 extern libspectrum_rzx *rzx; 61 62 void rzx_init( void ); 63 64 int rzx_start_recording( const char *filename, int embed_snapshot ); 65 int rzx_stop_recording( void ); 66 67 int rzx_start_playback( const char *filename, int check_snapshot ); 68 int 69 rzx_start_playback_from_buffer( const unsigned char *buffer, size_t length ); 70 71 int rzx_stop_playback( int add_interrupt ); 72 73 int rzx_frame( void ); 74 75 int rzx_store_byte( libspectrum_byte value ); 76 77 int rzx_end( void ); 78 79 int rzx_rollback( void ); 80 81 int rzx_rollback_to( void ); 82 83 #endif /* #ifndef FUSE_RZX_H */ 84