Skip to content

Commit

Permalink
Tweaks after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
desertkun committed Nov 16, 2022
1 parent f3eb1c8 commit 90e1914
Show file tree
Hide file tree
Showing 13 changed files with 798 additions and 715 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "fusepb/libspectrum"]
path = fusepb/libspectrum
url = git://git.code.sf.net/p/fuse-for-macosx/libspectrum
url = https://github.com/speccytools/libspectrum.git
2 changes: 2 additions & 0 deletions fusepb/FuseX.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.bookmarks.document-scope</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
Expand Down
8 changes: 8 additions & 0 deletions fusepb/FuseX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
D15E8F94259F5C0C0006FC79 /* packets.c in Sources */ = {isa = PBXBuildFile; fileRef = D15E8F8F259F5C0B0006FC79 /* packets.c */; };
D15E8F95259F5C0C0006FC79 /* gdbserver.c in Sources */ = {isa = PBXBuildFile; fileRef = D15E8F91259F5C0B0006FC79 /* gdbserver.c */; };
D1DF6DD826F8077F004A4AB7 /* debug.png in Resources */ = {isa = PBXBuildFile; fileRef = D1DF6DD726F8077F004A4AB7 /* debug.png */; };
D1ECC73E2924069800147252 /* ttx2000s.c in Sources */ = {isa = PBXBuildFile; fileRef = D1ECC73D2924069800147252 /* ttx2000s.c */; };
/* End PBXBuildFile section */

/* Begin PBXBuildRule section */
Expand Down Expand Up @@ -744,6 +745,7 @@
B6FEA44B0444C2CC0013916D /* tc2068-0.rom */ = {isa = PBXFileReference; lastKnownFileType = file; name = "tc2068-0.rom"; path = "../roms/tc2068-0.rom"; sourceTree = SOURCE_ROOT; };
B6FEA44C0444C2CC0013916D /* tc2068-1.rom */ = {isa = PBXFileReference; lastKnownFileType = file; name = "tc2068-1.rom"; path = "../roms/tc2068-1.rom"; sourceTree = SOURCE_ROOT; };
B6FEA44F0444C3370013916D /* tc2068.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = tc2068.c; sourceTree = "<group>"; };
D12E7FEC29258CF400185E4D /* libspectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libspectrum.h; path = fusepb/libspectrum.h; sourceTree = "<group>"; };
D15E8F8C259F5C0B0006FC79 /* arch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arch.h; sourceTree = "<group>"; };
D15E8F8D259F5C0B0006FC79 /* gdbserver_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gdbserver_utils.c; sourceTree = "<group>"; };
D15E8F8E259F5C0B0006FC79 /* gdbserver_utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbserver_utils.h; sourceTree = "<group>"; };
Expand All @@ -753,6 +755,8 @@
D15E8F92259F5C0C0006FC79 /* gdbserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gdbserver.h; sourceTree = "<group>"; };
D1DA9AD7291EF817001911F7 /* FuseX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FuseX.entitlements; sourceTree = "<group>"; };
D1DF6DD726F8077F004A4AB7 /* debug.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = debug.png; sourceTree = "<group>"; };
D1ECC73C2924069800147252 /* ttx2000s.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttx2000s.h; sourceTree = "<group>"; };
D1ECC73D2924069800147252 /* ttx2000s.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttx2000s.c; sourceTree = "<group>"; };
F520C8BC038D022E01A804BA /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
F536B56503A0C275011517A0 /* utils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = utils.c; path = ../utils.c; sourceTree = SOURCE_ROOT; };
F541FB5E03B0B33401FF8235 /* scaler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = scaler.h; path = ../ui/scaler/scaler.h; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -921,6 +925,7 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
D12E7FEC29258CF400185E4D /* libspectrum.h */,
B6DCBB5D114FA0E700DC9A11 /* libspectrum */,
B63225E50C66B9D500BB081B /* compat */,
B68CB2BC03DD91D800A804BA /* debugger */,
Expand Down Expand Up @@ -1449,6 +1454,8 @@
B6E1F1AA14F653FB00600EB0 /* specdrum.h */,
B69BE5431660E04000C5D0CE /* spectranet.c */,
B69BE5441660E04000C5D0CE /* spectranet.h */,
D1ECC73D2924069800147252 /* ttx2000s.c */,
D1ECC73C2924069800147252 /* ttx2000s.h */,
B6AB429D0677466E007C50EF /* ula.c */,
B6AB429E0677466E007C50EF /* ula.h */,
B6D0E1041CFD549200202683 /* usource.c */,
Expand Down Expand Up @@ -1934,6 +1941,7 @@
B684A19E0E93A8CD00A5B097 /* event.c in Sources */,
B684A1A00E93A8D700A5B097 /* variable.c in Sources */,
B684A1A20E93A8FC00A5B097 /* file.c in Sources */,
D1ECC73E2924069800147252 /* ttx2000s.c in Sources */,
B69D8D501D6B388A0031BAFC /* trdos.c in Sources */,
B6374FA50F178298003CE6E2 /* timer.c in Sources */,
B6168CE91F0BC0AC008C99E6 /* buffer.c in Sources */,
Expand Down
5 changes: 4 additions & 1 deletion fusepb/controllers/FuseController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,10 @@ - (void)openFile:(const char *)filename

if( !filename ) return;

if( utils_read_file( filename, &file ) ) fuse_abort();
if( utils_read_file( filename, &file ) )
{
return;
}

if( libspectrum_identify_file( &type, filename, file.buffer, file.length ) ) {
utils_close_file( &file );
Expand Down
7 changes: 7 additions & 0 deletions fusepb/controllers/PreferencesController.m
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ - (IBAction)massStorageTypeClicked:(id)sender
settings_current.usource = 0;
settings_current.divmmc_enabled = 0;
settings_current.zxmmc_enabled = 0;
settings_current.ttx2000s = 0;

// Read mass storage type box and set text boxes appropriately
switch( [[massStorageType selectedCell] tag] ) {
Expand Down Expand Up @@ -431,6 +432,9 @@ - (IBAction)massStorageTypeClicked:(id)sender
case 14: // ZXMMC
settings_current.zxmmc_enabled = 1;
break;
case 15: // ttx2000s
settings_current.ttx2000s = 1;
break;
default: // WTF?
break;
}
Expand All @@ -449,6 +453,7 @@ - (IBAction)massStorageTypeClicked:(id)sender
[self setCurrentValue:settings_current.usource forKey:@"usource" inValues:currentValues];
[self setCurrentValue:settings_current.divmmc_enabled forKey:@"divmmc" inValues:currentValues];
[self setCurrentValue:settings_current.zxmmc_enabled forKey:@"zxmmc" inValues:currentValues];
[self setCurrentValue:settings_current.ttx2000s forKey:@"ttx2000s" inValues:currentValues];

[currentValues synchronize];
}
Expand Down Expand Up @@ -619,6 +624,8 @@ - (void)setMassStorageType
value = 13;
} else if ( settings_current.zxmmc_enabled ) {
value = 14;
} else if ( settings_current.ttx2000s ) {
value = 15;
}

[massStorageType selectCellWithTag:value];
Expand Down
9 changes: 9 additions & 0 deletions fusepb/generate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
$_ = << "CODE";
#include <stdint.h>

#ifndef WIN32_DLL
#define WIN32_DLL
#endif

typedef uint8_t libspectrum_byte;
typedef int8_t libspectrum_signed_byte;
typedef uint16_t libspectrum_word;
Expand Down Expand Up @@ -239,6 +243,10 @@
$_ = '';
while( <DATAFILE> ) {

# Remove comments and blank lines
s/#.*//;
s/\/\*.*?\*\///gs;

next if /^\s*$/; next if /^\s*#/;

my( $type, $name, $indexed ) = split;
Expand Down Expand Up @@ -278,6 +286,7 @@

# Remove comments and blank lines
s/#.*//;
s/\/\*.*?\*\///gs;
next if /^\s*$/;

# Skip which block types each accessor applies to
Expand Down
Loading

0 comments on commit 90e1914

Please sign in to comment.