summaryrefslogtreecommitdiff
path: root/games/yae/patches/defaultromlocation.diff
blob: ee97a9bbb9e010775f826683841c85c7df31f18d (plain)
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
diff -Naur yae-0.7/disk2.c yae-0.7.patched/disk2.c
--- yae-0.7/disk2.c	2007-04-03 17:49:22.000000000 -0400
+++ yae-0.7.patched/disk2.c	2013-08-28 19:16:54.000000000 -0400
@@ -105,8 +105,9 @@
 	FILE	*f;
 
 	f = fopen( DiskROM, "rb" );
+	if(!f) f = fopen("/usr/share/yae/DISK.ROM", "rb");
 	if ( !f ) {
-	   fprintf( stderr, "Cannot read disk II boot rom %s\n", DiskROM );
+	   fprintf( stderr, "Cannot read disk II boot rom %s or /usr/share/yae/DISK.ROM\n", DiskROM );
 	   exit(1);
 	}
 	fread( boot_ROM, 1, 256, f );
diff -Naur yae-0.7/memory.c yae-0.7.patched/memory.c
--- yae-0.7/memory.c	2007-04-03 17:42:23.000000000 -0400
+++ yae-0.7.patched/memory.c	2013-08-28 19:18:13.000000000 -0400
@@ -88,10 +88,13 @@
 	   MainMemoryROM[i] = amp;
 	}
 
-	if (MachineType < APPLE_IIE)
-	   loadROMFile( Apple2ROM );
-	else
-	   loadROMFile( Apple2eROM );
+	if (MachineType < APPLE_IIE) {
+	   if(loadROMFile( Apple2ROM ) != 0)
+			loadROMFile("/usr/share/yae/APPLE2.ROM");
+	} else {
+	   if(loadROMFile( Apple2eROM ) != 0)
+			loadROMFile("/usr/share/yae/APPLE2E.ROM");
+	}
 
 	for( i = 0; i < 8; i++ ) {
 	   expansion_slot_read[i] = NULL;