1 /* 2 * autostart-prg.h - Handle autostart of program files 3 * 4 * Written by 5 * Christian Vogelgsang <chris@vogelgsang.org> 6 * 7 * This file is part of VICE, the Versatile Commodore Emulator. 8 * See README for copyright notice. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 23 * 02111-1307 USA. 24 * 25 */ 26 27 #ifndef VICE_AUTOSTART_PRG_H 28 #define VICE_AUTOSTART_PRG_H 29 30 #include "types.h" 31 #include "log.h" 32 #include "fileio.h" 33 34 struct autostart_prg_s { 35 uint8_t *data; 36 uint16_t start_addr; 37 uint32_t size; 38 }; 39 typedef struct autostart_prg_s autostart_prg_t; 40 41 #define AUTOSTART_PRG_MODE_VFS 0 42 #define AUTOSTART_PRG_MODE_INJECT 1 43 #define AUTOSTART_PRG_MODE_DISK 2 44 #define AUTOSTART_PRG_MODE_LAST 2 45 #define AUTOSTART_PRG_MODE_DEFAULT AUTOSTART_PRG_MODE_DISK 46 47 extern void autostart_prg_init(void); 48 extern void autostart_prg_shutdown(void); 49 50 extern int autostart_prg_with_virtual_fs(int unit, int drive, const char *file_name, 51 fileio_info_t *fh, log_t log); 52 extern int autostart_prg_with_ram_injection(const char *file_name, 53 fileio_info_t *fh, log_t log); 54 extern int autostart_prg_with_disk_image(int unit, int drive, const char *file_name, 55 fileio_info_t *fh, log_t log, 56 const char *image_name); 57 58 extern int autostart_prg_perform_injection(log_t log); 59 60 #endif 61