From 9272f9299cb6de7e398c6860f6504d801bd3da8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20A=2E=20A=CC=81lvarez?= Date: Sun, 29 May 2016 13:59:57 +0200 Subject: [PATCH] remove CNFGRAPI.h, add common CNFGGLOB.h for all variants --- Mini vMac.xcodeproj/project.pbxproj | 6 +- Mini vMac/CNFGGLOB.h | 95 +++++++++++++++++++++++++++++ Mini vMac/Emulator.m | 1 - Mini vMac/MYOSGLUE.m | 20 ++---- Mini vMac/MacII/CNFGGLOB.h | 91 ++------------------------- Mini vMac/MacII/CNFGRAPI.h | 33 ---------- Mini vMac/MacPlus4M/CNFGGLOB.h | 83 ++----------------------- Mini vMac/MacPlus4M/CNFGRAPI.h | 33 ---------- 8 files changed, 112 insertions(+), 250 deletions(-) create mode 100644 Mini vMac/CNFGGLOB.h delete mode 100644 Mini vMac/MacII/CNFGRAPI.h delete mode 100644 Mini vMac/MacPlus4M/CNFGRAPI.h diff --git a/Mini vMac.xcodeproj/project.pbxproj b/Mini vMac.xcodeproj/project.pbxproj index 513daaf..32b2427 100644 --- a/Mini vMac.xcodeproj/project.pbxproj +++ b/Mini vMac.xcodeproj/project.pbxproj @@ -155,7 +155,6 @@ 283422CE1CF8EF8C0088B634 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 283422D71CF8EFD80088B634 /* EmulatorProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EmulatorProtocol.h; sourceTree = ""; }; 283422E71CF8F1C80088B634 /* CNFGGLOB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNFGGLOB.h; sourceTree = ""; }; - 283422E81CF8F1C80088B634 /* CNFGRAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNFGRAPI.h; sourceTree = ""; }; 283422E91CF8F1C80088B634 /* EMCONFIG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EMCONFIG.h; sourceTree = ""; }; 283422F11CF8F5400088B634 /* Emulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Emulator.h; sourceTree = ""; }; 283422F21CF8F5400088B634 /* Emulator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Emulator.m; sourceTree = ""; }; @@ -222,7 +221,6 @@ 2834235E1CF9C0F10088B634 /* VIDEMDEV.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = VIDEMDEV.h; sourceTree = ""; }; 283423961CF9C4CB0088B634 /* MacII.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MacII.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 283423991CF9C5380088B634 /* CNFGGLOB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNFGGLOB.h; sourceTree = ""; }; - 2834239A1CF9C5380088B634 /* CNFGRAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNFGRAPI.h; sourceTree = ""; }; 2834239B1CF9C5380088B634 /* EMCONFIG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EMCONFIG.h; sourceTree = ""; }; 2834239C1CF9C5380088B634 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 283423E31CFA32800088B634 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; @@ -235,6 +233,7 @@ 28848B611CDE97D600B86C45 /* InsertDiskViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InsertDiskViewController.m; sourceTree = ""; }; 28848B631CDE97E900B86C45 /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = ""; }; 28848B641CDE97E900B86C45 /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = ""; }; + 289710B71CFB0DC70089D463 /* CNFGGLOB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNFGGLOB.h; sourceTree = ""; }; 28BA89741CE7315400A98104 /* KBKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KBKey.h; sourceTree = ""; }; 28BA89751CE7315400A98104 /* KBKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KBKey.m; sourceTree = ""; }; 28BA89761CE7315400A98104 /* KBKeyboardLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KBKeyboardLayout.h; sourceTree = ""; }; @@ -359,7 +358,6 @@ isa = PBXGroup; children = ( 283422E71CF8F1C80088B634 /* CNFGGLOB.h */, - 283422E81CF8F1C80088B634 /* CNFGRAPI.h */, 283422E91CF8F1C80088B634 /* EMCONFIG.h */, 283422CE1CF8EF8C0088B634 /* Info.plist */, 283423E31CFA32800088B634 /* Icon.png */, @@ -387,6 +385,7 @@ 283422F11CF8F5400088B634 /* Emulator.h */, 283422F21CF8F5400088B634 /* Emulator.m */, 28CE8ECB1CD4CDC500FE25A8 /* MYOSGLUE.m */, + 289710B71CFB0DC70089D463 /* CNFGGLOB.h */, ); name = Shared; sourceTree = ""; @@ -463,7 +462,6 @@ isa = PBXGroup; children = ( 283423991CF9C5380088B634 /* CNFGGLOB.h */, - 2834239A1CF9C5380088B634 /* CNFGRAPI.h */, 2834239B1CF9C5380088B634 /* EMCONFIG.h */, 2834239C1CF9C5380088B634 /* Info.plist */, 283423EC1CFA329C0088B634 /* Icon.png */, diff --git a/Mini vMac/CNFGGLOB.h b/Mini vMac/CNFGGLOB.h new file mode 100644 index 0000000..c1c22c3 --- /dev/null +++ b/Mini vMac/CNFGGLOB.h @@ -0,0 +1,95 @@ +#include +#include + +#define BigEndianUnaligned 0 +#define LittleEndianUnaligned 1 +#define MayInline inline +#define MayNotInline __attribute__((noinline)) +#define SmallGlobals 0 +#define cIncludeUnused 0 +#define UnusedParam(p) (void) p + +/* --- integer types ---- */ + +typedef uint8_t ui3b; +#define HaveRealui3b 1 + +typedef int8_t si3b; +#define HaveRealsi3b 1 + +typedef uint16_t ui4b; +#define HaveRealui4b 1 + +typedef int16_t si4b; +#define HaveRealsi4b 1 + +typedef uint32_t ui5b; +#define HaveRealui5b 1 + +typedef int32_t si5b; +#define HaveRealsi5b 1 + +#define HaveRealui6b 0 +#define HaveRealsi6b 0 + +/* --- integer representation types ---- */ + +typedef ui3b ui3r; +#define ui3beqr 1 + +typedef si3b si3r; +#define si3beqr 1 + +typedef ui4b ui4r; +#define ui4beqr 1 + +typedef si4b si4r; +#define si4beqr 1 + +typedef ui5b ui5r; +#define ui5beqr 1 + +typedef si5b si5r; +#define si5beqr 1 + +typedef int64_t si6r; +typedef int64_t si6b; +typedef uint64_t ui6r; +typedef uint64_t ui6b; +#define LIT64(a) a##ULL + +/* --- shared config for all variants ---- */ + +#define NeedIntlChars 1 +#define kStrAppName "Mini vMac" +#define kAppVariationStr "minivmac-3.4.0-ios" +#define kStrCopyrightYear "2016" +#define kMaintainerName "Jesús A. Álvarez" +#define kStrHomePage "https://namedfork.net/minivmac" +#define VarFullScreen 0 +#define WantInitFullScreen 0 +#define MayFullScreen 1 +#define WantInitMagnify 0 +#define WantInitRunInBackground 0 +#define NeedRequestInsertDisk 0 +#define NeedDoMoreCommandsMsg 0 +#define NeedDoAboutMsg 0 +#define UseControlKeys 0 +#define UseActvCode 0 +#define EnableDemoMsg 0 + +#define IncludePbufs 1 +#define NumPbufs 4 + +#define dbglog_HAVE 0 + +#define EnableMouseMotion 1 + +#define IncludeHostTextClipExchange 1 +#define IncludeSonyRawMode 1 +#define IncludeSonyGetName 1 +#define IncludeSonyNew 0 +#define IncludeSonyNameNew 0 + +#define EmLocalTalk 0 + diff --git a/Mini vMac/Emulator.m b/Mini vMac/Emulator.m index 9d18b54..2b900dc 100644 --- a/Mini vMac/Emulator.m +++ b/Mini vMac/Emulator.m @@ -7,7 +7,6 @@ // #import "Emulator.h" -#include "CNFGRAPI.h" #include "SYSDEPNS.h" #include "ENDIANAC.h" #include "MYOSGLUE.h" diff --git a/Mini vMac/MYOSGLUE.m b/Mini vMac/MYOSGLUE.m index def0c46..ae5ebcd 100644 --- a/Mini vMac/MYOSGLUE.m +++ b/Mini vMac/MYOSGLUE.m @@ -27,7 +27,6 @@ @import UIKit; @import AudioUnit; @import AudioToolbox; -#include "CNFGRAPI.h" #include "SYSDEPNS.h" #include "ENDIANAC.h" #include "MYOSGLUE.h" @@ -1526,11 +1525,6 @@ LOCALPROC ReserveAllocAll(void) { ReserveAllocOneBlock(&screencomparebuff, vMacScreenNumBytes, 5, trueblnr); -#if UseControlKeys - ReserveAllocOneBlock(&CntrlDisplayBuff, - vMacScreenNumBytes, 5, falseblnr); -#endif - #if MySoundEnabled ReserveAllocOneBlock((ui3p *)&TheSoundBuffer, dbhBufferSize, 5, falseblnr); @@ -1634,16 +1628,10 @@ LOCALFUNC blnr InitOSGLU(void) { #endif if (LoadInitialImages()) if (LoadMacRom()) -#if UseActvCode - if (ActvCodeInit()) -#endif -#if EmLocalTalk - if (InitLocalTalk()) -#endif - if (InitLocationDat()) { - InitKeyCodes(); - IsOk = trueblnr; - } + if (InitLocationDat()) { + InitKeyCodes(); + IsOk = trueblnr; + } } return IsOk; diff --git a/Mini vMac/MacII/CNFGGLOB.h b/Mini vMac/MacII/CNFGGLOB.h index 6dc2f89..590f321 100644 --- a/Mini vMac/MacII/CNFGGLOB.h +++ b/Mini vMac/MacII/CNFGGLOB.h @@ -1,86 +1,14 @@ -/* - Configuration options used by both platform specific - and platform independent code. +#define RomFileName "MacII.ROM" - This file is automatically generated by the build system, - which tries to know what options are valid in what - combinations. Avoid changing this file manually unless - you know what you're doing. -*/ - -#include - -#define BigEndianUnaligned 0 -#define LittleEndianUnaligned 1 -#define MayInline inline -#define MayNotInline __attribute__((noinline)) -#define SmallGlobals 0 -#define cIncludeUnused 0 -#define UnusedParam(p) (void) p - -/* --- integer types ---- */ - -typedef uint8_t ui3b; -#define HaveRealui3b 1 - -typedef int8_t si3b; -#define HaveRealsi3b 1 - -typedef uint16_t ui4b; -#define HaveRealui4b 1 - -typedef int16_t si4b; -#define HaveRealsi4b 1 - -typedef uint32_t ui5b; -#define HaveRealui5b 1 - -typedef int32_t si5b; -#define HaveRealsi5b 1 - -#define HaveRealui6b 0 -#define HaveRealsi6b 0 - -/* --- integer representation types ---- */ - -typedef ui3b ui3r; -#define ui3beqr 1 - -typedef si3b si3r; -#define si3beqr 1 - -typedef ui4b ui4r; -#define ui4beqr 1 - -typedef si4b si4r; -#define si4beqr 1 - -typedef ui5b ui5r; -#define ui5beqr 1 - -typedef si5b si5r; -#define si5beqr 1 - -typedef int64_t si6r; -typedef int64_t si6b; -typedef uint64_t ui6r; -typedef uint64_t ui6b; -#define LIT64(a) a##ULL - -/* capabilities provided by platform specific code */ +#define WantInitSpeedValue 2 +#define WantInitNotAutoSlow 0 +#define EnableAutoSlow 0 #define MySoundEnabled 0 - #define MySoundRecenterSilence 0 #define kLn2SoundSampSz 3 -#define dbglog_HAVE 0 - -#define NumDrives 6 -#define IncludeSonyRawMode 1 -#define IncludeSonyGetName 1 -#define IncludeSonyNew 0 -#define IncludeSonyNameNew 0 +#define NumDrives 8 #define vMacScreenHeight 768 #define vMacScreenWidth 1024 @@ -88,11 +16,4 @@ typedef uint64_t ui6b; #define kROM_Size 0x00040000 -#define IncludePbufs 1 -#define NumPbufs 4 - -#define EnableMouseMotion 1 - -#define IncludeHostTextClipExchange 1 -#define EnableAutoSlow 1 -#define EmLocalTalk 0 +#include "../CNFGGLOB.h" diff --git a/Mini vMac/MacII/CNFGRAPI.h b/Mini vMac/MacII/CNFGRAPI.h deleted file mode 100644 index 7d980d6..0000000 --- a/Mini vMac/MacII/CNFGRAPI.h +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#define MyAppIsBundle 1 -#define kMacCreatorSig 'MnvM' - -#define RomFileName "MacII.ROM" -#define EnableDragDrop 1 -#define EnableAltKeysMode 0 -#define SwapCommandControl 0 -#define VarFullScreen 1 -#define WantInitFullScreen 0 -#define MayFullScreen 1 -#define MayNotFullScreen 1 -#define WantInitMagnify 0 -#define EnableMagnify 0 -#define WantInitRunInBackground 0 -#define WantInitNotAutoSlow 1 -#define WantInitSpeedValue 2 -#define NeedRequestInsertDisk 0 -#define NeedDoMoreCommandsMsg 0 -#define NeedDoAboutMsg 0 -#define UseControlKeys 0 -#define UseActvCode 0 -#define EnableDemoMsg 0 - -/* version and other info to display to user */ - -#define NeedIntlChars 1 -#define kStrAppName "Mini vMac" -#define kAppVariationStr "minivmac-3.4.0-ios" -#define kStrCopyrightYear "2016" -#define kMaintainerName "Jesús A. Álvarez" -#define kStrHomePage "https://namedfork.net/minivmac" diff --git a/Mini vMac/MacPlus4M/CNFGGLOB.h b/Mini vMac/MacPlus4M/CNFGGLOB.h index 158f014..5d82767 100644 --- a/Mini vMac/MacPlus4M/CNFGGLOB.h +++ b/Mini vMac/MacPlus4M/CNFGGLOB.h @@ -1,80 +1,14 @@ -/* - Configuration options used by both platform specific - and platform independent code. +#define RomFileName "vMac.ROM" - This file is automatically generated by the build system, - which tries to know what options are valid in what - combinations. Avoid changing this file manually unless - you know what you're doing. -*/ - -#include - -#define BigEndianUnaligned 0 -#define LittleEndianUnaligned 1 -#define MayInline inline -#define MayNotInline __attribute__((noinline)) -#define SmallGlobals 0 -#define cIncludeUnused 0 -#define UnusedParam(p) (void) p - -/* --- integer types ---- */ - -typedef uint8_t ui3b; -#define HaveRealui3b 1 - -typedef int8_t si3b; -#define HaveRealsi3b 1 - -typedef uint16_t ui4b; -#define HaveRealui4b 1 - -typedef int16_t si4b; -#define HaveRealsi4b 1 - -typedef uint32_t ui5b; -#define HaveRealui5b 1 - -typedef int32_t si5b; -#define HaveRealsi5b 1 - -#define HaveRealui6b 0 -#define HaveRealsi6b 0 - -/* --- integer representation types ---- */ - -typedef ui3b ui3r; -#define ui3beqr 1 - -typedef si3b si3r; -#define si3beqr 1 - -typedef ui4b ui4r; -#define ui4beqr 1 - -typedef si4b si4r; -#define si4beqr 1 - -typedef ui5b ui5r; -#define ui5beqr 1 - -typedef si5b si5r; -#define si5beqr 1 - -/* capabilities provided by platform specific code */ +#define WantInitSpeedValue 2 +#define WantInitNotAutoSlow 0 +#define EnableAutoSlow 1 #define MySoundEnabled 1 - #define MySoundRecenterSilence 0 #define kLn2SoundSampSz 3 -#define dbglog_HAVE 0 - #define NumDrives 6 -#define IncludeSonyRawMode 1 -#define IncludeSonyGetName 1 -#define IncludeSonyNew 0 -#define IncludeSonyNameNew 0 #define vMacScreenHeight 342 #define vMacScreenWidth 512 @@ -82,11 +16,4 @@ typedef si5b si5r; #define kROM_Size 0x00020000 -#define IncludePbufs 1 -#define NumPbufs 4 - -#define EnableMouseMotion 1 - -#define IncludeHostTextClipExchange 1 -#define EnableAutoSlow 1 -#define EmLocalTalk 0 +#include "../CNFGGLOB.h" diff --git a/Mini vMac/MacPlus4M/CNFGRAPI.h b/Mini vMac/MacPlus4M/CNFGRAPI.h deleted file mode 100644 index a306789..0000000 --- a/Mini vMac/MacPlus4M/CNFGRAPI.h +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#define MyAppIsBundle 1 -#define kMacCreatorSig 'MnvM' - -#define RomFileName "vMac.ROM" -#define EnableDragDrop 1 -#define EnableAltKeysMode 0 -#define SwapCommandControl 0 -#define VarFullScreen 1 -#define WantInitFullScreen 0 -#define MayFullScreen 1 -#define MayNotFullScreen 1 -#define WantInitMagnify 0 -#define EnableMagnify 0 -#define WantInitRunInBackground 0 -#define WantInitNotAutoSlow 0 -#define WantInitSpeedValue 2 -#define NeedRequestInsertDisk 0 -#define NeedDoMoreCommandsMsg 0 -#define NeedDoAboutMsg 0 -#define UseControlKeys 0 -#define UseActvCode 0 -#define EnableDemoMsg 0 - -/* version and other info to display to user */ - -#define NeedIntlChars 1 -#define kStrAppName "Mini vMac" -#define kAppVariationStr "minivmac-3.4.0-ios" -#define kStrCopyrightYear "2016" -#define kMaintainerName "Jesús A. Álvarez" -#define kStrHomePage "https://namedfork.net/minivmac"