Re: [hatari-devel] Re: FPU options |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 30/10/2016 à 10:50, Eero Tamminen a écrit :
> Hi,
>
>> bCompatibleFPU is mapped to WinUAE's "fpu_strict" variable, which is
>> only used when JIT is enabled.
>
> Oh, so it's completely useless currently.
I also removed this option from gui-osx.
Also changed gui_osx_pause, added the "visualize" option, even if I do
not know what this option do.
Can you add my change to the repo ? See the diff file.
Jerome
diff -r 34bb77eec376 src/gui-osx/AlertHooks.m
--- a/src/gui-osx/AlertHooks.m Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/AlertHooks.m Sun Oct 30 12:44:28 2016 +0100
@@ -30,20 +30,20 @@
firstPv = [message rangeOfString:@"'"] ;
lastPv = [message rangeOfString:@"'" options:NSBackwardsSearch] ;
- if ((cantTOS.location == NSNotFound) || (firstPv.location==lastPv.location)) // traitement normal
+ if ((cantTOS.location == NSNotFound) || (firstPv.location==lastPv.location)) // TOS can be found
return ([NSApp myAlerte:NSInformationalAlertStyle Txt:nil firstB:localize(@"Ok") alternateB:localize(@"Cancel")
otherB:nil informativeTxt:message ] == NSAlertFirstButtonReturn
//NSAlertDefaultReturn
);
- else // traitement can not load
+ else // TOS can be found
return ([NSApp myAlerte:NSCriticalAlertStyle Txt:nil firstB:localize(@"Ok") alternateB:nil otherB:nil
informativeTxt:localize(@"Can not load TOS file:") ] == NSAlertFirstButtonReturn) ;
}
-/*-----------------------------------------------------------------------*/
-/*
- Displays a Cocoa alert with a choice (OK and Cancel buttons)
-*/
+/*----------------------------------------------------------------------*/
+/* Displays a Cocoa alert with a choice (OK and Cancel buttons) */
+/*----------------------------------------------------------------------*/
+
int HookedAlertQuery(const char* szMessage)
{
NSString *message ;
diff -r 34bb77eec376 src/gui-osx/Hatari.icns
Binary file src/gui-osx/Hatari.icns has changed
diff -r 34bb77eec376 src/gui-osx/PrefsController.h
--- a/src/gui-osx/PrefsController.h Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/PrefsController.h Sun Oct 30 12:44:28 2016 +0100
@@ -81,12 +81,12 @@
IBOutlet NSButton *cycleExactCPU; //bCycleExactCpu
IBOutlet NSButton *MMU_Emulation;
IBOutlet NSButton *adressSpace24; //bAddressSpace24
- __unsafe_unretained IBOutlet NSStepper *TTRAMSizeStepper;
- __unsafe_unretained IBOutlet NSTextField *TTRAMSizeValue;
- IBOutlet NSButton *CompatibleFPU;
+ IBOutlet NSStepper *TTRAMSizeStepper;
+ IBOutlet NSTextField *TTRAMSizeValue;
+ //IBOutlet NSButton *CompatibleFPU;
IBOutlet NSMatrix *FPUType;
- __unsafe_unretained IBOutlet NSButtonCell *bCell68060;
+ IBOutlet NSButtonCell *bCell68060;
// load/save state
IBOutlet NSPopUpButton *enableDSP;
diff -r 34bb77eec376 src/gui-osx/PrefsController.m
--- a/src/gui-osx/PrefsController.m Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/PrefsController.m Sun Oct 30 12:44:28 2016 +0100
@@ -33,8 +33,8 @@
#include "joy.h"
// Macros to transfer data between Cocoa controls and Hatari data structures
+// de l'affichage vers la structure (saveAllControls)
-// de l'affichage vers la structure (saveAllControls)
#define EXPORT_TEXTFIELD(mutablStrng, target) [mutablStrng getCString:target maxLength:sizeof((target))-1 encoding:NSASCIIStringEncoding]
#define EXPORT_NTEXTFIELD(nstextfield, target) target = [nstextfield intValue]
#define EXPORT_SWITCH(nsbutton, target) target = ([(nsbutton) state] == NSOnState)
@@ -53,7 +53,7 @@
#define INITIAL_DIR(dossier) [dossier length] < 2 ? @"~" : dossier
// Back up of the current configuration parameters
-//
+
CNF_PARAMS CurrentParams;
@@ -229,14 +229,13 @@
char szPath[FILENAME_MAX];
-
+// not used
- (IBAction)finished:(id)sender
{
//Main_RequestQuit(0) ;
}
/*-----------------------------------------------------------------------*/
-/* */
/* Helper method for Choose buttons */
/* Returns: TRUE is the user selected a path, FALSE if he/she aborted */
/*-----------------------------------------------------------------------*/
@@ -267,12 +266,10 @@
}
-//-----------------------------------------------------------------------*/
-//
-// Helper method to insert a floppy image
-// TODO: Add code to restrict to known file types
-//
-/*-----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+/* Helper method to insert a floppy image */
+/* TODO: Add code to restrict to known file types */
+/*----------------------------------------------------------------------*/
- (void)insertFloppyImageIntoDrive:(int)drive forTextField:(NSTextField*)floppyTextField
realPath:(NSMutableString *)realPath
@@ -298,87 +295,87 @@
return route.stringByDeletingLastPathComponent ;
}
-//
+/*----------------------------------------------------------------------*/
// Methods for all the "Choose" buttons
-//
+/*----------------------------------------------------------------------*/
- (IBAction)chooseCartridgeImage:(id)sender;
{
[self choosePathForControl: cartridgeImage chooseDirectories:NO defaultInitialDir:[self initial:cartridge] // cartridge
mutString:cartridge what:@[allC]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseDefaultImagesLocation:(id)sender
{
[self choosePathForControl: defaultImagesLocation chooseDirectories:YES defaultInitialDir:[self initial:imgeDir] // images location
mutString:imgeDir what:nil];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseFloppyImageA:(id)sender
{
- [self insertFloppyImageIntoDrive:0 forTextField:floppyImageA realPath:floppyA]; // floppy A
+ [self insertFloppyImageIntoDrive:0 forTextField:floppyImageA realPath:floppyA]; // floppy A
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseFloppyImageB:(id)sender
{
- [self insertFloppyImageIntoDrive:1 forTextField:floppyImageB realPath:floppyB]; // floppy B
+ [self insertFloppyImageIntoDrive:1 forTextField:floppyImageB realPath:floppyB]; // floppy B
}
-
-- (IBAction)chooseGemdosImage:(id)sender // directory for Gemdos
+/*----------------------------------------------------------------------*/
+- (IBAction)chooseGemdosImage:(id)sender // directory for Gemdos
{
- [self choosePathForControl: gemdosImage chooseDirectories:YES defaultInitialDir:INITIAL_DIR(gemdos) // gemdos
+ [self choosePathForControl: gemdosImage chooseDirectories:YES defaultInitialDir:INITIAL_DIR(gemdos) // gemdos
mutString:gemdos what:nil] ;
if (gemdos.length >2 ) [gemdosImage setStringValue:[NSApp pathUser:gemdos]] ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseHdImage:(id)sender
{
- [self choosePathForControl: hdImage chooseDirectories:NO defaultInitialDir:[self initial:hrdDisk] // HD image ?
+ [self choosePathForControl: hdImage chooseDirectories:NO defaultInitialDir:[self initial:hrdDisk] // HD image ?
mutString:hrdDisk what:@[@"img",@"hdv"]] ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseIdeMasterHdImage:(id)sender
{
[self choosePathForControl: ideMasterHdImage chooseDirectories:NO defaultInitialDir:[self initial:masterIDE] // IDE master
mutString:masterIDE what:@[@"hdv"]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseIdeSlaveHdImage:(id)sender
{
[self choosePathForControl: ideSlaveHdImage chooseDirectories:NO defaultInitialDir:[self initial:slaveIDE] // IDE slave
mutString:slaveIDE what:@[@"hdv"]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseKeyboardMappingFile:(id)sender
{
[self choosePathForControl: keyboardMappingFile chooseDirectories:NO defaultInitialDir:[self initial:keyboard] // keyboard mapping
mutString:keyboard what:@[@"txt",@"map"]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseMidiOutputFile:(id)sender
{
[self choosePathForControl: writeMidiToFile chooseDirectories:NO defaultInitialDir:[self initial:midiOut] // midi output
mutString:midiOut what:@[@"mid"]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)choosePrintToFile:(id)sender
{
[self choosePathForControl: printToFile chooseDirectories:NO defaultInitialDir:[self initial:printit] // print to file
mutString:printit what:@[@"prn"]];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseRS232InputFile:(id)sender
{
[self choosePathForControl: readRS232FromFile chooseDirectories:NO defaultInitialDir:[self initial:rs232In] // RS232 input
mutString:rs232In what:nil];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseRS232OutputFile:(id)sender
{
[self choosePathForControl: writeRS232ToFile chooseDirectories:NO defaultInitialDir:[self initial:rs232Out] // RS232 output
mutString:rs232Out what:nil];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)chooseTosImage:(id)sender;
{
[self choosePathForControl: tosImage chooseDirectories:NO defaultInitialDir:[self initial:TOS] // TOS image
@@ -386,10 +383,9 @@
}
-/*-----------------------------------------------------------------------*/
-/* */
-/* Methods for the "Eject" buttons */
-/*-----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+// Methods for the "Eject" buttons
+/*----------------------------------------------------------------------*/
- (IBAction)ejectFloppyA:(id)sender
{
Floppy_SetDiskFileNameNone(0);
@@ -398,7 +394,7 @@
floppyImageA.stringValue = @"" ;
floppyA.string = @"" ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)ejectFloppyB:(id)sender
{
Floppy_SetDiskFileNameNone(1);
@@ -407,7 +403,7 @@
floppyImageB.stringValue = @"" ;
floppyB.string = @"" ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)ejectGemdosImage:(id)sender
{
// Clear the control. Later. saveAllControls will set the ConfigureParams accordingly
@@ -415,7 +411,7 @@
gemdosImage.stringValue = @"" ;
gemdos.string = @"" ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)ejectHdImage:(id)sender
{
// Clear the control. Later. saveAllControls will set the ConfigureParams accordingly
@@ -423,7 +419,7 @@
hdImage.stringValue = @"" ;
hrdDisk.string = @"" ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)ejectIdeMasterHdImage:(id)sender
{
// Clear the control. Later. saveAllControls will set the ConfigureParams accordingly
@@ -431,7 +427,7 @@
ideMasterHdImage.stringValue = @"" ;
masterIDE.string = @"" ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)ejectIdeSlaveHdImage:(id)sender
{
// Clear the control. Later. saveAllControls will set the ConfigureParams accordingly
@@ -440,10 +436,9 @@
slaveIDE.string = @"" ;
}
-/*-----------------------------------------------------------------------*/
-/**
- * Methods for the "Load Config" button
- */
+/*----------------------------------------------------------------------*/
+/* Methods for the "Load Config" button */
+/*----------------------------------------------------------------------*/
- (IBAction)loadConfigFrom:(id)sender
{
@@ -456,17 +451,17 @@
opnPanel.canChooseDirectories = NO ;
opnPanel.canChooseFiles = YES ;
opnPanel.accessoryView = partage ;
-//10.5 ?
-// if ([opnPanel respondsToSelector:@selector(setDirectoryURL:)])
+ //10.5 ?
+ // if ([opnPanel respondsToSelector:@selector(setDirectoryURL:)])
{ opnPanel.directoryURL = [NSURL fileURLWithPath:ru isDirectory:YES] ;
opnPanel.nameFieldStringValue = @"hatari" ;
- btOk = [opnPanel runModal] == NSModalResponseOK; // Ok ?
+ btOk = [opnPanel runModal] == NSModalResponseOK; // Ok ?
}
-// 10.5 ?
-// else
-// btOk = [opnPanel runModalForDirectory:ru file:@"hatari"] == NSModalResponseOK; //NSOKButton ;
+ // 10.5 ?
+ // else
+ // btOk = [opnPanel runModalForDirectory:ru file:@"hatari"] == NSModalResponseOK; //NSOKButton ;
- if (!btOk) return ; // Cancel
+ if (!btOk) return ; // Cancel
lesURLs = opnPanel.URLs ;
if ((lesURLs == nil) || (lesURLs.count == 0))
@@ -474,36 +469,36 @@
[configNm setString:[[lesURLs objectAtIndex:0] path]] ;
- // Make a non-const C string out of it
+ // Make a non-const C string out of it
[configNm getCString:sConfigFileName maxLength:FILENAME_MAX encoding:NSASCIIStringEncoding];
- // Load the config into ConfigureParams
+ // Load the config into ConfigureParams
Configuration_Load(sConfigFileName);
- // Refresh all the controls to match ConfigureParams
+ // Refresh all the controls to match ConfigureParams
[self setAllControls];
}
-/**
- * Methods for the "Save Config" button (bottom preference window)
- */
+/*----------------------------------------------------------------------*/
+// Methods for the "Save Config" button (bottom preference window)
+/*----------------------------------------------------------------------*/
- (IBAction)saveConfigAs:(id)sender
{
-NSString *ru ;
-BOOL btOk ;
+ NSString *ru ;
+ BOOL btOk ;
ru = [NSString stringWithCString:(Paths_GetHatariHome()) encoding:NSASCIIStringEncoding] ;
savPanel.allowedFileTypes = @[@"cfg"] ;
savPanel.accessoryView = hartage ;
-//10.5
-// if ([savPanel respondsToSelector:@selector(setDirectoryURL:)])
+ //10.5
+ // if ([savPanel respondsToSelector:@selector(setDirectoryURL:)])
{ savPanel.directoryURL = [NSURL fileURLWithPath:ru isDirectory:YES] ; // Since OS X 10.6
savPanel.nameFieldStringValue = @"hatari" ;
btOk = [savPanel runModal] == NSModalResponseOK ; // Ok ?
}
-//10.5
-// else
-// btOk = [savPanel runModalForDirectory:ru file:@"hatari"] == NSModalResponseOK; //NSOKButton ; // avant 10.6
+ //10.5
+ // else
+ // btOk = [savPanel runModalForDirectory:ru file:@"hatari"] == NSModalResponseOK; //NSOKButton ; // avant 10.6
if (!btOk)
return ; // Cancel
@@ -515,34 +510,33 @@
[self saveAllControls] ; // Save the config from ConfigureParams
Configuration_Save(); // [self configSave:configNm] ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)aller:(id)sender
{
-NSString *defaultDirectory ;
+ NSString *defaultDirectory ;
defaultDirectory = [NSString stringWithCString:(Paths_GetHatariHome()) encoding:NSASCIIStringEncoding] ;
-// if ([opnPanel respondsToSelector:@selector(setDirectoryURL:)])
+ // if ([opnPanel respondsToSelector:@selector(setDirectoryURL:)])
opnPanel.directoryURL = [NSURL fileURLWithPath:defaultDirectory isDirectory:YES] ;
-// else
-// [opnPanel setDirectory:defaultDirectory] ;
+ // else
+ // [opnPanel setDirectory:defaultDirectory] ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)halle:(id)sender
{
-NSString *defaultDirectory ;
+ NSString *defaultDirectory ;
defaultDirectory = [NSString stringWithCString:(Paths_GetHatariHome()) encoding:NSASCIIStringEncoding] ;
-// if ([savPanel respondsToSelector:@selector(setDirectoryURL:)])
+ // if ([savPanel respondsToSelector:@selector(setDirectoryURL:)])
savPanel.directoryURL = [NSURL fileURLWithPath:defaultDirectory isDirectory:YES] ;
-// else
-// [savPanel setDirectory:defaultDirectory] ;
+ // else
+ // [savPanel setDirectory:defaultDirectory] ;
}
-/*-----------------------------------------------------------------------*/
-/*
- Commits and closes Ok button in preferences window
-*/
+/*----------------------------------------------------------------------*/
+//Commits and closes Ok button in preferences window
+/*----------------------------------------------------------------------*/
- (IBAction)commitAndClose:(id)sender
{
@@ -553,7 +547,7 @@
}
-
+/*----------------------------------------------------------------------*/
// Populate Joystick key dropdown
- (void)initKeysDropDown:(NSPopUpButton*)dropDown
@@ -570,11 +564,12 @@
}
-/*--------------------------------------------------------------------------*/
-/*Displays the Preferences dialog Ouverture de la fenêtre des préférences */
-/*--------------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+//Displays the Preferences dialog Ouverture de la fenêtre des préférences
+/*----------------------------------------------------------------------*/
- (IBAction)loadPrefs:(id)sender
{
+ //GuiOsx_Pause(true);
[configNm setString:[NSString stringWithCString:sConfigFileName encoding:NSASCIIStringEncoding]] ;
if (!bInitialized)
@@ -631,7 +626,7 @@
// M. Saro, 2013
//if(Ok button in preferences Windows)
- {
+ //{
// Check if change need reset
if (Change_DoNeedReset(&CurrentParams, &ConfigureParams))
{
@@ -645,18 +640,17 @@
}
else
Change_CopyChangedParamsToConfiguration(&CurrentParams, &ConfigureParams, false); //Apply config without reset
- }
+ //}
// else // not OK button
// {
// ConfigureParams = CurrentParams; //Restore backup params
// }
-
+
}
-/*-----------------------------------------------------------------------*/
-/*
- Updates the controls following a change in the joystick selection
-*/
+/*----------------------------------------------------------------------*/
+//Updates the controls following a change in the joystick selection
+/*----------------------------------------------------------------------*/
- (IBAction)changeViewedJoystick:(id)sender
{
// Save the pre-joystick controls, as we are about to change them
@@ -670,10 +664,9 @@
}
-/*-----------------------------------------------------------------------*/
-/*
- Initializes all controls, transfert des préférences dans la fenêtre
-*/
+/*----------------------------------------------------------------------*/
+//Initializes all controls, transfert des préférences dans la fenêtre
+/*----------------------------------------------------------------------*/
- (void)setAllControls
{
@@ -777,7 +770,7 @@
IMPORT_SWITCH(cycleExactCPU, ConfigureParams.System.bCycleExactCpu);
IMPORT_SWITCH(MMU_Emulation, ConfigureParams.System.bMMU);
IMPORT_SWITCH(adressSpace24, ConfigureParams.System.bAddressSpace24);
- //IMPORT_RADIO(FPUType, ConfigureParams.System.n_FPUType);
+
if (ConfigureParams.System.n_FPUType == FPU_NONE)
[FPUType selectCellWithTag:0];
else if (ConfigureParams.System.n_FPUType == FPU_68881)
@@ -786,14 +779,15 @@
[FPUType selectCellWithTag:2];
else if (ConfigureParams.System.n_FPUType == FPU_CPU)
[FPUType selectCellWithTag:3];
- IMPORT_SWITCH(CompatibleFPU, ConfigureParams.System.bCompatibleFPU);
+ //not needed anymore
+ //IMPORT_SWITCH(CompatibleFPU, ConfigureParams.System.bCompatibleFPU);
#endif
-
+
int i;
for (i = 0; i <= DLGSOUND_50KHZ-DLGSOUND_11KHZ; i++)
{
if (ConfigureParams.Sound.nPlaybackFreq > nSoundFreqs[i]-500
- && ConfigureParams.Sound.nPlaybackFreq < nSoundFreqs[i]+500)
+ && ConfigureParams.Sound.nPlaybackFreq < nSoundFreqs[i]+500)
{
[playbackQuality selectCellWithTag:(i)];
break;
@@ -857,9 +851,9 @@
}
-/*------------------------------------------------------------------------*/
-/* Updates the enabled states of controls who depend on other controls */
-/**************************************************************************/
+/*----------------------------------------------------------------------*/
+/* Updates the enabled states of controls who depend on other controls */
+/*----------------------------------------------------------------------*/
- (IBAction)updateEnabledStates:(id)sender
{
@@ -886,9 +880,9 @@
}
-/*-----------------------------------------------------------------------*/
-/* Updates the joystick controls to match the new joystick selection */
-/*************************************************************************/
+/*----------------------------------------------------------------------*/
+/* Updates the joystick controls to match the new joystick selection */
+/*----------------------------------------------------------------------*/
- (void)setJoystickControls
{
@@ -897,13 +891,13 @@
// Data validation: If the JoyID is out of bounds, correct it and, if set to use real joystick, change to disabled
if ( (ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoyId < 0)
- || (ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoyId >= cRealJoysticks) )
+ || (ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoyId >= cRealJoysticks) )
{
ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoyId = 0;
if (ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoystickMode == JOYSTICK_REALSTICK)
{
ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoystickMode = JOYSTICK_DISABLED;
- }
+ }
}
// Don't change the realJoystick dropdown if none is available (to keep "(None available)" selected)
@@ -922,8 +916,9 @@
}
-/*-----------------------------------------------------------------------*/
-/* Saves the setting for the joystick currently being viewed */
+/*----------------------------------------------------------------------*/
+// Saves the setting for the joystick currently being viewed
+/*----------------------------------------------------------------------*/
- (void)saveJoystickControls
{
EXPORT_RADIO(joystickMode, ConfigureParams.Joysticks.Joy[nCurrentJoystick].nJoystickMode);
@@ -937,8 +932,9 @@
}
-/*-----------------------------------------------------------------------*/
-/* Saves the settings for all controls */
+/*----------------------------------------------------------------------*/
+// Saves the settings for all controls
+/*----------------------------------------------------------------------*/
- (void)saveAllControls
{
// Export the preference controls into their vars
@@ -1031,7 +1027,6 @@
EXPORT_SWITCH(cycleExactCPU, ConfigureParams.System.bCycleExactCpu);
EXPORT_SWITCH(MMU_Emulation, ConfigureParams.System.bMMU);
EXPORT_SWITCH(adressSpace24, ConfigureParams.System.bAddressSpace24);
- //EXPORT_RADIO(FPUType, ConfigureParams.System.n_FPUType); //[[FPUType selectedCell] tag]
if(FPUType.selectedCell.tag == 0 )
ConfigureParams.System.n_FPUType = FPU_NONE;
else if(FPUType.selectedCell.tag == 1 )
@@ -1040,7 +1035,8 @@
ConfigureParams.System.n_FPUType = FPU_68882;
else if(FPUType.selectedCell.tag == 3 )
ConfigureParams.System.n_FPUType = FPU_CPU;
- EXPORT_SWITCH(CompatibleFPU, ConfigureParams.System.bCompatibleFPU);
+ //not needed anymore
+ //EXPORT_SWITCH(CompatibleFPU, ConfigureParams.System.bCompatibleFPU);
#endif
ConfigureParams.Sound.nPlaybackFreq = nSoundFreqs[[[playbackQuality selectedCell] tag]];
@@ -1109,6 +1105,7 @@
[self saveJoystickControls];
}
+/*----------------------------------------------------------------------*/
// Max Zoomed Adjust
- (IBAction) setWidth:(id)sender;
@@ -1117,12 +1114,14 @@
maxZoomedWidth.intValue = [sender intValue] ;
}
+/*----------------------------------------------------------------------*/
- (IBAction) setHeight:(id)sender;
{
NSLog(@"Change Max Zoom height: %d", [sender intValue]);
maxZoomedHeight.intValue = [sender intValue] ;
}
+/*----------------------------------------------------------------------*/
- (IBAction)setTTRAMSize:(id)sender
{
NSLog(@"Change TTRAMSize: %d", [sender intValue]);
@@ -1137,8 +1136,9 @@
prefs = [[PrefsController alloc] init];
return prefs;
-} // */
+}
+/*----------------------------------------------------------------------*/
- (void)awakeFromNib
{
cartridge = [NSMutableString stringWithCapacity:50] ; [cartridge setString:@""] ; [cartridge retain] ;
@@ -1163,7 +1163,7 @@
MMU_Emulation.enabled = true;
adressSpace24.enabled = true;
TTRAMSizeValue.enabled = true;
- CompatibleFPU.enabled = true;
+ //CompatibleFPU.enabled = true;
FPUType.enabled = true;
bCell68060.enabled = true;
#endif
diff -r 34bb77eec376 src/gui-osx/SDLMain.h
--- a/src/gui-osx/SDLMain.h Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/SDLMain.h Sun Oct 30 12:44:28 2016 +0100
@@ -10,9 +10,10 @@
#ifndef _SDLMain_h_
#define _SDLMain_h_
#import <Cocoa/Cocoa.h>
+#import "SDL.h"
-@interface HatariAppDelegate : NSObject // <NSApplicationDelegate>
+@interface HatariAppDelegate : NSObject // SDLApplication// NSObject // <NSApplicationDelegate>
{
IBOutlet NSMenuItem *beginCaptureAnim;
IBOutlet NSMenuItem *endCaptureAnim;
diff -r 34bb77eec376 src/gui-osx/SDLMain.m
--- a/src/gui-osx/SDLMain.m Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/SDLMain.m Sun Oct 30 12:44:28 2016 +0100
@@ -117,9 +117,9 @@
return TRUE;
}
-
+/*----------------------------------------------------------------------*/
// Called when the internal event loop has just started running
-//
+/*----------------------------------------------------------------------*/
- (void) applicationDidFinishLaunching: (NSNotification *) note
{
int status;
@@ -138,7 +138,9 @@
exit(status) ;
}
+/*----------------------------------------------------------------------*/
// Hatari Stuff
+/*----------------------------------------------------------------------*/
- (IBAction)prefsMenu:(id)sender
{
static int in_propdialog = 0;
@@ -155,36 +157,36 @@
[[PrefsController prefs] loadPrefs:sender];
} // */
-
+/*----------------------------------------------------------------------*/
- (IBAction)debugUI:(id)sender
{
DebugUI(REASON_USER);
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)warmReset:(id)sender
{
if ([NSApp myAlerte:NSInformationalAlertStyle Txt:localize(@"Warm reset!") firstB:localize(@"OK") alternateB:localize(@"Cancel")
otherB:nil informativeTxt:localize(@"Really reset the emulator?")] == NSAlertFirstButtonReturn )
Reset_Warm();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)coldReset:(id)sender
{
if ([NSApp myAlerte:NSInformationalAlertStyle Txt:localize(@"Cold reset") firstB:localize(@"OK") alternateB:localize(@"Cancel")
otherB:nil informativeTxt:localize(@"Really reset the emulator?")] == NSAlertFirstButtonReturn )
Reset_Cold();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)insertDiskA:(id)sender
{
[self insertDisk:0] ;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)insertDiskB:(id)sender
{
[self insertDisk:1] ;
}
-
+/*----------------------------------------------------------------------*/
- (void)insertDisk:(int)disque
{
NSString *aDisk ;
@@ -196,15 +198,15 @@
Floppy_SetDiskFileName(disque, szPath, NULL) ;
Floppy_InsertDiskIntoDrive(disque) ;
}
+/*----------------------------------------------------------------------*/
- (IBAction)quit:(id)sender
{
Main_RequestQuit(0) ;
}
-/*-----------------------------------------------------------------------*/
-/*
- Controls the enabled state of the menu items
- */
+/*----------------------------------------------------------------------*/
+/*Controls the enabled state of the menu items */
+/*----------------------------------------------------------------------*/
- (BOOL)validateMenuItem:(NSMenuItem*)item
{
if (item == beginCaptureAnim)
@@ -227,6 +229,8 @@
return YES;
}
+/*----------------------------------------------------------------------*/
+
- (NSString*)displayFileSelection:(const char*)pathInParams preferredFileName:(NSString*)preferredFileName allowedExtensions:(NSArray*)allowedExtensions
{
// BOOL test ;
@@ -261,17 +265,17 @@
return nil;
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)captureScreen:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(false);
ScreenSnapShot_SaveScreen();
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)captureAnimation:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(false);
if(!Avi_AreWeRecording()) {
NSString* path = [self displayFileSelection:ConfigureParams.Video.AviRecordFile preferredFileName:@"hatari.avi"
allowedExtensions:@[@"avi"]];
@@ -290,17 +294,17 @@
}
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)endCaptureAnimation:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(false);
Avi_StopRecording();
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)captureSound:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
NSString* path = [self displayFileSelection:ConfigureParams.Sound.szYMCaptureFileName preferredFileName:@"hatari.wav"
allowedExtensions:@[@"ym", @"wav"]];
if(path) {
@@ -309,17 +313,17 @@
}
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)endCaptureSound:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(false);
Sound_EndRecording();
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)saveMemorySnap:(id)sender
{
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
NSString* path = [self displayFileSelection:ConfigureParams.Memory.szMemoryCaptureFileName preferredFileName:@"hatari.sav"
allowedExtensions:@[@"sav"]];
@@ -330,7 +334,7 @@
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)restoreMemorySnap:(id)sender
{
NSString *directoryToOpen;
@@ -338,7 +342,7 @@
NSString *oldPath ;
NSString *newPath ;
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
// Get the path from the user settings
oldPath = [NSString stringWithCString:(ConfigureParams.Memory.szMemoryCaptureFileName) encoding:NSASCIIStringEncoding];
@@ -356,7 +360,7 @@
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)doFullScreen:(id)sender
{
// A call to Screen_EnterFullScreen() would be required, but this causes a crash when using
@@ -374,7 +378,7 @@
SDL_PushEvent((SDL_Event*)&event); // Send the F11 key release
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)help:(id)sender
{
NSString *the_help;
@@ -383,7 +387,7 @@
[[NSWorkspace sharedWorkspace] openFile:the_help];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)compat:(id)sender
{
NSString *the_help ;
@@ -392,11 +396,11 @@
[[NSWorkspace sharedWorkspace] openFile:the_help];
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)PauseMenu:(id)sender {
if(!emulationPaused)
{
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
emulationPaused=YES;
[pauseMenuItem setState:NSOnState];
}
@@ -407,7 +411,7 @@
[pauseMenuItem setState:NSOffState];
}
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)openConfig:(id)sender
{
BOOL applyChanges ;
@@ -421,7 +425,7 @@
// commit back to the configuration settings if choosing user confirm)
CurrentParams = ConfigureParams;
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
newCfg = [NSApp hopenfile:NO defoDir:nil defoFile:ConfigFile types:@[@"cfg"] ] ;
@@ -444,19 +448,19 @@
GuiOsx_Resume();
}
-
+/*----------------------------------------------------------------------*/
- (IBAction)saveConfig:(id)sender {
}
@end
-
+/*----------------------------------------------------------------------*/
static int IsRootCwd()
{
char buf[MAXPATHLEN];
char *cwd = getcwd(buf, sizeof (buf));
return (cwd && (strcmp(cwd, "/") == 0));
}
-
+/*----------------------------------------------------------------------*/
static int IsTenPointNineOrLater()
{
// OK for 10.9, but before ??
@@ -465,7 +469,7 @@
return r;
}
-
+/*----------------------------------------------------------------------*/
static int IsFinderLaunch(const int argc, char **argv)
{
/* -psn_XXX is passed if we are launched from Finder in 10.8 and earlier */
@@ -484,8 +488,9 @@
#ifdef main
# undef main
#endif
-
+/*----------------------------------------------------------------------*/
// Main entry point to executable - should *not* be SDL_main!
+/*----------------------------------------------------------------------*/
int main (int argc, char **argv)
{
// Copy the arguments into a global variable
diff -r 34bb77eec376 src/gui-osx/Shared.h
--- a/src/gui-osx/Shared.h Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/Shared.h Sun Oct 30 12:44:28 2016 +0100
@@ -36,7 +36,7 @@
void GuiOsx_ExportPathString(NSString* path, char* szTarget, size_t cchTarget);
// Pauses emulation and gets ready to use Cocoa UI
-void GuiOsx_Pause(void);
+void GuiOsx_Pause(bool);
// Switches back to emulation mode and resume emulation
void GuiOsx_Resume(void);
diff -r 34bb77eec376 src/gui-osx/Shared.m
--- a/src/gui-osx/Shared.m Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/Shared.m Sun Oct 30 12:44:28 2016 +0100
@@ -27,7 +27,7 @@
[window setDelegate:self];
// Change emulation and UI state
- GuiOsx_Pause();
+ GuiOsx_Pause(true);
// Run it as modal
[NSApp runModalForWindow:window];
@@ -52,9 +52,8 @@
@end
/*-----------------------------------------------------------------------*/
-/*
- Helper function to write the contents of a path as an NSString to a string
-*/
+/*Helper function to write the contents of a path as an NSString to a string*/
+/*----------------------------------------------------------------------*/
void GuiOsx_ExportPathString(NSString* path, char* szTarget, size_t cchTarget)
{
NSCAssert((szTarget), @"Target buffer must not be null.");
@@ -64,28 +63,28 @@
[path getCString:szTarget maxLength:cchTarget-1 encoding:NSASCIIStringEncoding] ;
}
-/*-----------------------------------------------------------------------*/
-/*
- Pauses emulation
-*/
-void GuiOsx_Pause(void)
+/*----------------------------------------------------------------------*/
+/*Pauses emulation */
+/* Added the visualize option for 2.0.0 */
+/*----------------------------------------------------------------------*/
+void GuiOsx_Pause(bool visualize)
{
// Pause emulation
- Main_PauseEmulation(true);
+ Main_PauseEmulation(visualize);
}
/*-----------------------------------------------------------------------*/
-/*
- Switches back to emulation mode
-*/
+/*Switches back to emulation mode */
+/*----------------------------------------------------------------------*/
void GuiOsx_Resume(void)
{
// Resume emulation
Main_UnPauseEmulation();
}
-//-----------------------------------------------------------------------------------------------------------
+/*----------------------------------------------------------------------*/
// Add global services. 6 methods
+/*----------------------------------------------------------------------*/
@implementation NSApplication (service)
@@ -96,7 +95,7 @@
return [self hopenfile:chooseDir defoDir:defoDir defoFile:defoFile types:types titre:nil] ;
}
-
+/*----------------------------------------------------------------------*/
- (NSString *)hopenfile:(BOOL)chooseDir defoDir:(NSString *)defoDir defoFile:(NSString *)defoFile types:(NSArray *)types titre:(NSString *)titre
{
NSOpenPanel *openPanel ;
@@ -128,13 +127,14 @@
return @"" ;
}
+/*----------------------------------------------------------------------*/
// Save file
//
- (NSString *)hsavefile:(BOOL)creatDir defoDir:(NSString *)defoDir defoFile:(NSString *)defoFile types:(NSArray *)types
{
return [self hsavefile:creatDir defoDir:defoDir defoFile:defoFile types:types titre:nil] ;
}
-
+/*----------------------------------------------------------------------*/
- (NSString *)hsavefile:(BOOL)creatDir defoDir:(NSString *)defoDir defoFile:(NSString *)defoFile types:(NSArray *)types titre:(NSString *)titre
{
NSSavePanel *savPanel ;
@@ -163,7 +163,7 @@
} ;
return @"" ;
}
-
+/*----------------------------------------------------------------------*/
// Returne localized path
//
- (NSString *)localpath:(NSString *)thepath :(NSFileManager *)afilemanager
@@ -189,7 +189,7 @@
NSFileManager *afilemanager = [NSFileManager defaultManager] ; // call "default manager"
return [self localpath:thepath :afilemanager] ;
}
-
+/*----------------------------------------------------------------------*/
// return a localized path related to user home directoryr ~/
//
- (NSString *)pathUser:(NSString *)thepath
@@ -204,7 +204,7 @@
return [NSString stringWithFormat:@"~%@", [apath substringFromIndex:here.length ]] ;
return apath;
}
-
+/*----------------------------------------------------------------------*/
// NSAlert available 10.3 to 10.9 ..... 10.11
//
- (NSInteger)myAlerte:(NSUInteger)style Txt:(NSString *)Txt firstB:(NSString *)firstB alternateB:(NSString *)alternateB
diff -r 34bb77eec376 src/gui-osx/en.lproj/SDLMain.xib
--- a/src/gui-osx/en.lproj/SDLMain.xib Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/en.lproj/SDLMain.xib Sun Oct 30 12:44:28 2016 +0100
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1060" identifier="macosx"/>
<development version="5100" identifier="xcode"/>
@@ -1423,16 +1423,6 @@
</column>
</cells>
</matrix>
- <button id="oZh-SZ-adv">
- <rect key="frame" x="12" y="8" width="97" height="45"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" alignment="left" enabled="NO" inset="2" id="VS5-yr-Yva">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <string key="title">Compatible
-but slower</string>
- <font key="font" metaFont="titleBar" size="12"/>
- </buttonCell>
- </button>
</subviews>
</view>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
@@ -2404,11 +2394,10 @@
</button>
</subviews>
</view>
- <point key="canvasLocation" x="139.5" y="230.5"/>
+ <point key="canvasLocation" x="227.5" y="-98.5"/>
</window>
<customObject id="329" userLabel="PrefsController" customClass="PrefsController">
<connections>
- <outlet property="CompatibleFPU" destination="oZh-SZ-adv" id="LG0-he-fcc"/>
<outlet property="FPUType" destination="n98-X2-Jwk" id="e7B-k3-XWJ"/>
<outlet property="FastBootPatch" destination="4718" id="4734"/>
<outlet property="HDWriteProtection" destination="4668" id="4681"/>
diff -r 34bb77eec376 src/gui-osx/fr.lproj/SDLMain.xib
--- a/src/gui-osx/fr.lproj/SDLMain.xib Sun Oct 30 11:38:27 2016 +0200
+++ b/src/gui-osx/fr.lproj/SDLMain.xib Sun Oct 30 12:44:28 2016 +0100
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1080" identifier="macosx"/>
<development version="5100" identifier="xcode"/>
@@ -1593,14 +1593,6 @@
</column>
</cells>
</matrix>
- <button id="Zwc-an-Vav">
- <rect key="frame" x="6" y="21" width="122" height="18"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="check" title="FPU Compatible" bezelStyle="regularSquare" imagePosition="left" enabled="NO" state="on" inset="2" id="Pbd-bC-3nj">
- <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
- <font key="font" metaFont="cellTitle"/>
- </buttonCell>
- </button>
</subviews>
</view>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
@@ -2404,7 +2396,6 @@
</window>
<customObject id="329" userLabel="PrefsController" customClass="PrefsController">
<connections>
- <outlet property="CompatibleFPU" destination="Zwc-an-Vav" id="rIU-S5-ATP"/>
<outlet property="FPUType" destination="0SB-uo-oFJ" id="JLl-zf-Nye"/>
<outlet property="FastBootPatch" destination="4718" id="4734"/>
<outlet property="HDWriteProtection" destination="4668" id="4681"/>
@@ -2432,6 +2423,7 @@
<outlet property="driveA_NumberOfHeads" destination="cai-Yf-vK1" id="1gq-NF-i0s"/>
<outlet property="driveB_NumberOfHeads" destination="o7J-Ow-mLW" id="irQ-SH-876"/>
<outlet property="enableAutoFire" destination="755" id="756"/>
+ <outlet property="enableDSP" destination="1222" id="m91-qF-rol"/>
<outlet property="enableDriveA" destination="pa1-9N-kti" id="3ol-CD-lNO"/>
<outlet property="enableDriveB" destination="Zpe-8h-6CF" id="QUk-Y8-ePr"/>
<outlet property="enableMidi" destination="365" id="578"/>