Skip to content

Commit 90e1914

Browse files
committed
Tweaks after merge
1 parent f3eb1c8 commit 90e1914

13 files changed

Lines changed: 798 additions & 715 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "fusepb/libspectrum"]
22
path = fusepb/libspectrum
3-
url = git://git.code.sf.net/p/fuse-for-macosx/libspectrum
3+
url = https://github.com/speccytools/libspectrum.git

fusepb/FuseX.entitlements

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<true/>
99
<key>com.apple.security.network.client</key>
1010
<true/>
11+
<key>com.apple.security.files.bookmarks.document-scope</key>
12+
<true/>
1113
<key>com.apple.security.network.server</key>
1214
<true/>
1315
</dict>

fusepb/FuseX.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
D15E8F94259F5C0C0006FC79 /* packets.c in Sources */ = {isa = PBXBuildFile; fileRef = D15E8F8F259F5C0B0006FC79 /* packets.c */; };
293293
D15E8F95259F5C0C0006FC79 /* gdbserver.c in Sources */ = {isa = PBXBuildFile; fileRef = D15E8F91259F5C0B0006FC79 /* gdbserver.c */; };
294294
D1DF6DD826F8077F004A4AB7 /* debug.png in Resources */ = {isa = PBXBuildFile; fileRef = D1DF6DD726F8077F004A4AB7 /* debug.png */; };
295+
D1ECC73E2924069800147252 /* ttx2000s.c in Sources */ = {isa = PBXBuildFile; fileRef = D1ECC73D2924069800147252 /* ttx2000s.c */; };
295296
/* End PBXBuildFile section */
296297

297298
/* Begin PBXBuildRule section */
@@ -744,6 +745,7 @@
744745
B6FEA44B0444C2CC0013916D /* tc2068-0.rom */ = {isa = PBXFileReference; lastKnownFileType = file; name = "tc2068-0.rom"; path = "../roms/tc2068-0.rom"; sourceTree = SOURCE_ROOT; };
745746
B6FEA44C0444C2CC0013916D /* tc2068-1.rom */ = {isa = PBXFileReference; lastKnownFileType = file; name = "tc2068-1.rom"; path = "../roms/tc2068-1.rom"; sourceTree = SOURCE_ROOT; };
746747
B6FEA44F0444C3370013916D /* tc2068.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tc2068.c; sourceTree = "<group>"; };
748+
D12E7FEC29258CF400185E4D /* libspectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libspectrum.h; path = fusepb/libspectrum.h; sourceTree = "<group>"; };
747749
D15E8F8C259F5C0B0006FC79 /* arch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arch.h; sourceTree = "<group>"; };
748750
D15E8F8D259F5C0B0006FC79 /* gdbserver_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gdbserver_utils.c; sourceTree = "<group>"; };
749751
D15E8F8E259F5C0B0006FC79 /* gdbserver_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbserver_utils.h; sourceTree = "<group>"; };
@@ -753,6 +755,8 @@
753755
D15E8F92259F5C0C0006FC79 /* gdbserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbserver.h; sourceTree = "<group>"; };
754756
D1DA9AD7291EF817001911F7 /* FuseX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FuseX.entitlements; sourceTree = "<group>"; };
755757
D1DF6DD726F8077F004A4AB7 /* debug.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = debug.png; sourceTree = "<group>"; };
758+
D1ECC73C2924069800147252 /* ttx2000s.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttx2000s.h; sourceTree = "<group>"; };
759+
D1ECC73D2924069800147252 /* ttx2000s.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttx2000s.c; sourceTree = "<group>"; };
756760
F520C8BC038D022E01A804BA /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
757761
F536B56503A0C275011517A0 /* utils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = utils.c; path = ../utils.c; sourceTree = SOURCE_ROOT; };
758762
F541FB5E03B0B33401FF8235 /* scaler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = scaler.h; path = ../ui/scaler/scaler.h; sourceTree = SOURCE_ROOT; };
@@ -921,6 +925,7 @@
921925
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
922926
isa = PBXGroup;
923927
children = (
928+
D12E7FEC29258CF400185E4D /* libspectrum.h */,
924929
B6DCBB5D114FA0E700DC9A11 /* libspectrum */,
925930
B63225E50C66B9D500BB081B /* compat */,
926931
B68CB2BC03DD91D800A804BA /* debugger */,
@@ -1449,6 +1454,8 @@
14491454
B6E1F1AA14F653FB00600EB0 /* specdrum.h */,
14501455
B69BE5431660E04000C5D0CE /* spectranet.c */,
14511456
B69BE5441660E04000C5D0CE /* spectranet.h */,
1457+
D1ECC73D2924069800147252 /* ttx2000s.c */,
1458+
D1ECC73C2924069800147252 /* ttx2000s.h */,
14521459
B6AB429D0677466E007C50EF /* ula.c */,
14531460
B6AB429E0677466E007C50EF /* ula.h */,
14541461
B6D0E1041CFD549200202683 /* usource.c */,
@@ -1934,6 +1941,7 @@
19341941
B684A19E0E93A8CD00A5B097 /* event.c in Sources */,
19351942
B684A1A00E93A8D700A5B097 /* variable.c in Sources */,
19361943
B684A1A20E93A8FC00A5B097 /* file.c in Sources */,
1944+
D1ECC73E2924069800147252 /* ttx2000s.c in Sources */,
19371945
B69D8D501D6B388A0031BAFC /* trdos.c in Sources */,
19381946
B6374FA50F178298003CE6E2 /* timer.c in Sources */,
19391947
B6168CE91F0BC0AC008C99E6 /* buffer.c in Sources */,

fusepb/controllers/FuseController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,10 @@ - (void)openFile:(const char *)filename
21282128

21292129
if( !filename ) return;
21302130

2131-
if( utils_read_file( filename, &file ) ) fuse_abort();
2131+
if( utils_read_file( filename, &file ) )
2132+
{
2133+
return;
2134+
}
21322135

21332136
if( libspectrum_identify_file( &type, filename, file.buffer, file.length ) ) {
21342137
utils_close_file( &file );

fusepb/controllers/PreferencesController.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ - (IBAction)massStorageTypeClicked:(id)sender
384384
settings_current.usource = 0;
385385
settings_current.divmmc_enabled = 0;
386386
settings_current.zxmmc_enabled = 0;
387+
settings_current.ttx2000s = 0;
387388

388389
// Read mass storage type box and set text boxes appropriately
389390
switch( [[massStorageType selectedCell] tag] ) {
@@ -431,6 +432,9 @@ - (IBAction)massStorageTypeClicked:(id)sender
431432
case 14: // ZXMMC
432433
settings_current.zxmmc_enabled = 1;
433434
break;
435+
case 15: // ttx2000s
436+
settings_current.ttx2000s = 1;
437+
break;
434438
default: // WTF?
435439
break;
436440
}
@@ -449,6 +453,7 @@ - (IBAction)massStorageTypeClicked:(id)sender
449453
[self setCurrentValue:settings_current.usource forKey:@"usource" inValues:currentValues];
450454
[self setCurrentValue:settings_current.divmmc_enabled forKey:@"divmmc" inValues:currentValues];
451455
[self setCurrentValue:settings_current.zxmmc_enabled forKey:@"zxmmc" inValues:currentValues];
456+
[self setCurrentValue:settings_current.ttx2000s forKey:@"ttx2000s" inValues:currentValues];
452457

453458
[currentValues synchronize];
454459
}
@@ -619,6 +624,8 @@ - (void)setMassStorageType
619624
value = 13;
620625
} else if ( settings_current.zxmmc_enabled ) {
621626
value = 14;
627+
} else if ( settings_current.ttx2000s ) {
628+
value = 15;
622629
}
623630

624631
[massStorageType selectCellWithTag:value];

fusepb/generate.pl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
$_ = << "CODE";
44
#include <stdint.h>
55

6+
#ifndef WIN32_DLL
7+
#define WIN32_DLL
8+
#endif
9+
610
typedef uint8_t libspectrum_byte;
711
typedef int8_t libspectrum_signed_byte;
812
typedef uint16_t libspectrum_word;
@@ -239,6 +243,10 @@
239243
$_ = '';
240244
while( <DATAFILE> ) {
241245

246+
# Remove comments and blank lines
247+
s/#.*//;
248+
s/\/\*.*?\*\///gs;
249+
242250
next if /^\s*$/; next if /^\s*#/;
243251

244252
my( $type, $name, $indexed ) = split;
@@ -278,6 +286,7 @@
278286

279287
# Remove comments and blank lines
280288
s/#.*//;
289+
s/\/\*.*?\*\///gs;
281290
next if /^\s*$/;
282291

283292
# Skip which block types each accessor applies to

0 commit comments

Comments
 (0)