1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
From: Alberto Garcia <agarcia@igalia.com>
Subject: Load the OpenSE BASIC ROM if the original ROMs are not found
Forwarded: http://sourceforge.net/mailarchive/message.php?msg_id=27674912
Index: fuse-emulator/machine.c
===================================================================
--- fuse-emulator.orig/machine.c
+++ fuse-emulator/machine.c
@@ -51,6 +51,7 @@
fuse_machine_info **machine_types = NULL; /* Array of available machines */
int machine_count = 0;
+int using_opense_rom = 0;
fuse_machine_info *machine_current = NULL; /* The currently selected machine */
static int machine_location; /* Where is the current machine in
@@ -297,6 +298,41 @@ machine_load_rom_bank_from_file( memory_
utils_file rom;
fd = utils_find_auxiliary_file( filename, UTILS_AUXILIARY_ROM );
+
+ if( fd == COMPAT_FILE_OPEN_FAILED ) {
+
+ if(! strcmp( filename, "48.rom" ) ||
+ ! strcmp( filename, "tc2048.rom" ) ||
+ ! strcmp( filename, "128-1.rom" ) ||
+ ! strcmp( filename, "plus2-1.rom" ) ||
+ ! strcmp( filename, "plus3-1.rom" ) ||
+ ! strcmp( filename, "plus3-3.rom" ) ) {
+
+ fd = utils_find_auxiliary_file( "opense.rom", UTILS_AUXILIARY_ROM );
+
+ if( fd != COMPAT_FILE_OPEN_FAILED && ! using_opense_rom ) {
+
+ extern int config_file_present;
+ using_opense_rom = 1;
+
+ if( ! config_file_present ) {
+ ui_error( UI_ERROR_INFO, "Original Spectrum ROM '%s' not found.\n"
+ "Using opense.rom instead.\n"
+ "See README.Debian for details.", filename );
+ }
+ }
+
+ } else if(! strcmp( filename, "128-0.rom" ) ||
+ ! strcmp( filename, "plus2-0.rom" ) ||
+ ! strcmp( filename, "plus3-0.rom" ) ||
+ ! strcmp( filename, "plus3-2.rom" ) ) {
+
+ fd = utils_find_auxiliary_file( "opense-stub.rom", UTILS_AUXILIARY_ROM );
+
+ }
+
+ }
+
if( fd == COMPAT_FILE_OPEN_FAILED ) {
ui_error( UI_ERROR_ERROR, "couldn't find ROM '%s' - See README.Debian for details", filename );
return 1;
Index: fuse-emulator/settings.pl
===================================================================
--- fuse-emulator.orig/settings.pl
+++ fuse-emulator/settings.pl
@@ -104,6 +104,7 @@ print hashline( __LINE__ ), << 'CODE';
/* The current settings of options, etc */
settings_info settings_current;
+int config_file_present = 0;
/* The default settings of options, etc */
settings_info settings_default = {
@@ -196,6 +197,8 @@ read_config_file( settings_info *setting
xmlFreeDoc( doc );
+ config_file_present = 1;
+
return 0;
}
Index: fuse-emulator/settings.c
===================================================================
--- fuse-emulator.orig/settings.c
+++ fuse-emulator/settings.c
@@ -65,6 +65,7 @@
/* The current settings of options, etc */
settings_info settings_current;
+int config_file_present = 0;
/* The default settings of options, etc */
settings_info settings_default = {
@@ -333,6 +334,8 @@ read_config_file( settings_info *setting
xmlFreeDoc( doc );
+ config_file_present = 1;
+
return 0;
}
|