mirror of
https://github.com/jeremysrand/Apple2GSBuildPipeline.git
synced 2024-11-25 19:31:06 +00:00
Add a NDA and desktop target for the Merlin assembler
This commit is contained in:
parent
05f3fc3f65
commit
61d28aadac
@ -136,7 +136,7 @@ $(TARGETDIR)/$(PGM): $(BUILD_OBJS) $(ASM_SRCS)
|
||||
$(MERLIN_BIN) -V $(MERLIN_LIB) linkscript.s
|
||||
$(MV) $(PGM) $(TARGETDIR)/$(PGM)
|
||||
ifneq ($(REZ_OBJS),)
|
||||
$(CP) $(REZ_OBJS)/rsrc $(TARGETDIR)/$(PGM)/rsrc
|
||||
$(CP) $(REZ_OBJS)/..namedfork/rsrc $(TARGETDIR)/$(PGM)/..namedfork/rsrc
|
||||
endif
|
||||
$(CHTYP) -t $(FILETYPE) $(AUXTYPE) $(TARGETDIR)/$(PGM)
|
||||
|
||||
|
227
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist
vendored
Normal file
227
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>main.s</string>
|
||||
<string>linkscript.s</string>
|
||||
<string>main.rez</string>
|
||||
<string>Makefile</string>
|
||||
<string>make/config.txt</string>
|
||||
<string>make/createDiskImage</string>
|
||||
<string>make/head.mk</string>
|
||||
<string>make/launchEmulator</string>
|
||||
<string>make/orca-asm</string>
|
||||
<string>make/orca-cc</string>
|
||||
<string>make/orca-rez</string>
|
||||
<string>make/system601.2mg</string>
|
||||
<string>make/tail.mk</string>
|
||||
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
|
||||
</array>
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.s</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>main.s</string>
|
||||
</dict>
|
||||
<key>linkscript.s</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>linkscript.s</string>
|
||||
</dict>
|
||||
<key>main.rez</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>main.rez</string>
|
||||
</dict>
|
||||
<key>make/config.txt</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/config.txt</string>
|
||||
</dict>
|
||||
<key>make/createDiskImage</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/createDiskImage</string>
|
||||
</dict>
|
||||
<key>make/head.mk</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/head.mk</string>
|
||||
</dict>
|
||||
<key>make/launchEmulator</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/launchEmulator</string>
|
||||
</dict>
|
||||
<key>make/orca-asm</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-asm</string>
|
||||
</dict>
|
||||
<key>make/orca-cc</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-cc</string>
|
||||
</dict>
|
||||
<key>make/orca-rez</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-rez</string>
|
||||
</dict>
|
||||
<key>make/system601.2mg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/system601.2mg</string>
|
||||
</dict>
|
||||
<key>make/tail.mk</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/tail.mk</string>
|
||||
</dict>
|
||||
<key>Makefile</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>Makefile</string>
|
||||
</dict>
|
||||
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<array>
|
||||
<string>Supporting Files</string>
|
||||
</array>
|
||||
<key>Path</key>
|
||||
<string>___PACKAGENAME___.xcscheme</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
<key>Identifier</key>
|
||||
<string>com.halcyontouch.apple2gsMerlinDesktopApp</string>
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>com.apple.dt.unit.externalBuildSystem</string>
|
||||
</array>
|
||||
<key>Concrete</key>
|
||||
<true/>
|
||||
<key>Description</key>
|
||||
<string>This template creates an Apple IIgs Merlin code project to build desktop application. The project starts with a single assembly file which you can modify. You can also add more assembly files as you may like.</string>
|
||||
<key>Options</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
<string>RESOLUTIONMODE</string>
|
||||
<key>Name</key>
|
||||
<string>Desktop Resolution</string>
|
||||
<key>Description</key>
|
||||
<string>Specify 640x200 or 320x200 resolution desktop enviroment.</string>
|
||||
<key>Type</key>
|
||||
<string>popup</string>
|
||||
<key>Default</key>
|
||||
<string>640</string>
|
||||
<key>Values</key>
|
||||
<array>
|
||||
<string>640</string>
|
||||
<string>320</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Targets</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>TargetType</key>
|
||||
<string>Legacy</string>
|
||||
<key>TargetIdentifier</key>
|
||||
<string>com.apple.dt.cocoaLegacyTarget</string>
|
||||
<key>BuildToolPath</key>
|
||||
<string>___VARIABLE_buildToolPath___</string>
|
||||
<key>BuildToolArgsString</key>
|
||||
<string>-C ___PACKAGENAME___ $(ACTION)</string>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>OTHER_CFLAGS</key>
|
||||
<string></string>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>DEBUGGING_SYMBOLS</key>
|
||||
<string>YES</string>
|
||||
<key>GCC_GENERATE_DEBUGGING_SYMBOLS</key>
|
||||
<string>YES</string>
|
||||
<key>GCC_OPTIMIZATION_LEVEL</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>Release</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ProductType</key>
|
||||
<string>com.apple.product-type.tool</string>
|
||||
<key>TargetIdentifier</key>
|
||||
<string>com.apple.dt.commandLineToolTarget</string>
|
||||
<key>Name</key>
|
||||
<string>doNotBuild</string>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>PRODUCT_NAME</key>
|
||||
<string>doNotBuild</string>
|
||||
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
|
||||
<string>inline(X,Y)=""
|
||||
extended=double
|
||||
pascal=""</string>
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$GOLDEN_GATE/Libraries/ORCACDefs
|
||||
~/Library/GoldenGate/Libraries/ORCACDefs
|
||||
/Library/GoldenGate/Libraries/ORCACDefs
|
||||
~/GoldenGate/Libraries/ORCACDefs</string>
|
||||
</dict>
|
||||
<key>BuildPhases</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Sources</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Frameworks</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>CopyFiles</string>
|
||||
<key>DstPath</key>
|
||||
<string>/usr/share/man/man1/</string>
|
||||
<key>DstSubfolderSpec</key>
|
||||
<string>0</string>
|
||||
<key>RunOnlyForDeploymentPostprocessing</key>
|
||||
<string>YES</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
110
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/___PACKAGENAME___.xcscheme
vendored
Normal file
110
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/___PACKAGENAME___.xcscheme
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<PathRunnable
|
||||
runnableDebuggingMode = "0"
|
||||
FilePath = "/usr/bin/make">
|
||||
</PathRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "-C"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "$PROJECT_DIR/___PACKAGENAME___"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "execute"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
18
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/linkscript.s
vendored
Normal file
18
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/linkscript.s
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
*
|
||||
* ___FILENAME___
|
||||
* ___PROJECTNAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* ___COPYRIGHT___
|
||||
*
|
||||
|
||||
dsk ___PROJECTNAME___
|
||||
typ $B9
|
||||
xpl
|
||||
|
||||
asm main.s
|
||||
ds 0
|
||||
knd #$1100
|
||||
ali None
|
||||
LNA ___PROJECTNAME___.S16
|
||||
sna main
|
292
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/main.rez
vendored
Normal file
292
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/main.rez
vendored
Normal file
@ -0,0 +1,292 @@
|
||||
/*
|
||||
* ___FILENAME___
|
||||
* ___PROJECTNAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* ___COPYRIGHT___
|
||||
*/
|
||||
|
||||
|
||||
#include "types.rez"
|
||||
|
||||
|
||||
#define menuBar 1
|
||||
|
||||
#define appleMenu 3
|
||||
#define fileMenu 4
|
||||
#define editMenu 5
|
||||
|
||||
#define editUndo 250
|
||||
#define editCut 251
|
||||
#define editCopy 252
|
||||
#define editPaste 253
|
||||
#define editClear 254
|
||||
|
||||
#define fileNew 401
|
||||
#define fileOpen 402
|
||||
#define fileClose 255
|
||||
#define fileQuit 256
|
||||
|
||||
#define appleAbout 301
|
||||
|
||||
#define aboutAlertString 1
|
||||
|
||||
#define windowRes 1001
|
||||
|
||||
#define toolStartup 1
|
||||
|
||||
|
||||
resource rVersion (1) {
|
||||
{
|
||||
0, /* Major version number in BCD */
|
||||
1, /* Minor version number in BCD */
|
||||
0, /* Bug version number in BCD */
|
||||
development,/* Development phase */
|
||||
0 /* Release number */
|
||||
},
|
||||
verUS,
|
||||
"___PROJECTNAME___",
|
||||
"Copyright \$A9 ___YEAR___ ___FULLUSERNAME___"
|
||||
};
|
||||
|
||||
|
||||
resource rMenuBar (menuBar) {
|
||||
{
|
||||
appleMenu,
|
||||
fileMenu,
|
||||
editMenu
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
resource rMenu (appleMenu) {
|
||||
appleMenu,
|
||||
refIsResource * menuTitleRefShift
|
||||
+ refIsResource * itemRefShift
|
||||
+ fAllowCache,
|
||||
appleMenu,
|
||||
{
|
||||
appleAbout
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
resource rMenu (fileMenu) {
|
||||
fileMenu,
|
||||
refIsResource * menuTitleRefShift
|
||||
+ refIsResource * itemRefShift
|
||||
+ fAllowCache,
|
||||
fileMenu,
|
||||
{
|
||||
fileNew,
|
||||
fileOpen,
|
||||
fileClose,
|
||||
fileQuit
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
resource rMenu (editMenu) {
|
||||
editMenu,
|
||||
refIsResource * menuTitleRefShift
|
||||
+ refIsResource * itemRefShift
|
||||
+ fAllowCache,
|
||||
editMenu,
|
||||
{
|
||||
editUndo,
|
||||
editCut,
|
||||
editCopy,
|
||||
editPaste,
|
||||
editClear
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (editUndo) {
|
||||
editUndo,
|
||||
"Z", "z",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift
|
||||
+ fDivider,
|
||||
editUndo
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (editCut) {
|
||||
editCut,
|
||||
"X", "x",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
editCut
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (editCopy) {
|
||||
editCopy,
|
||||
"C", "c",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
editCopy
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (editPaste) {
|
||||
editPaste,
|
||||
"V", "v",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
editPaste
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (editClear) {
|
||||
editClear,
|
||||
"", "",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
editClear
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (fileNew) {
|
||||
fileNew,
|
||||
"N", "n",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
fileNew
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (fileOpen) {
|
||||
fileOpen,
|
||||
"O", "o",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift
|
||||
+ fDivider,
|
||||
fileOpen
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (fileClose) {
|
||||
fileClose,
|
||||
"W", "w",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift
|
||||
+ fDivider,
|
||||
fileClose
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (fileQuit) {
|
||||
fileQuit,
|
||||
"Q", "q",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift,
|
||||
fileQuit
|
||||
};
|
||||
|
||||
|
||||
resource rMenuItem (appleAbout) {
|
||||
appleAbout,
|
||||
"", "",
|
||||
0,
|
||||
refIsResource * itemTitleRefShift
|
||||
+ fDivider,
|
||||
appleAbout
|
||||
};
|
||||
|
||||
|
||||
resource rPString (appleMenu, noCrossBank) {"@"};
|
||||
resource rPString (fileMenu, noCrossBank) {" File "};
|
||||
resource rPString (editMenu, noCrossBank) {" Edit "};
|
||||
|
||||
resource rPString (editUndo, noCrossBank) {"Undo"};
|
||||
resource rPString (editCut, noCrossBank) {"Cut"};
|
||||
resource rPString (editCopy, noCrossBank) {"Copy"};
|
||||
resource rPString (editPaste, noCrossBank) {"Paste"};
|
||||
resource rPString (editClear, noCrossBank) {"Clear"};
|
||||
|
||||
resource rPString (fileNew, noCrossBank) {"New"};
|
||||
resource rPString (fileOpen, noCrossBank) {"Open"};
|
||||
resource rPString (fileClose, noCrossBank) {"Close"};
|
||||
resource rPString (fileQuit, noCrossBank) {"Quit"};
|
||||
|
||||
resource rPString (appleAbout, noCrossBank) {"About ___PROJECTNAME___..."};
|
||||
|
||||
|
||||
resource rAlertString (aboutAlertString) {
|
||||
"0" /* Custom size */
|
||||
#if DESKTOP_RES_MODE == 320
|
||||
"\$38\$00" /* Upper Y coordinate at 56 */
|
||||
"\$10\$00" /* Left X coordinate at 16 */
|
||||
"\$90\$00" /* Lower Y coorinate at 144 */
|
||||
"\$30\$01" /* Right X coordinate at 304 */
|
||||
#else
|
||||
"\$38\$00" /* Upper Y coordinate at 56 */
|
||||
"\$90\$00" /* Left X coordinate at 144 */
|
||||
"\$90\$00" /* Lower Y coorinate at 144 */
|
||||
"\$F0\$01" /* Right X coordinate at 496 */
|
||||
#endif
|
||||
"3/"
|
||||
"___PROJECTNAME___\n"
|
||||
" by ___FULLUSERNAME___\n"
|
||||
"\n"
|
||||
"Copyright \$A9 ___YEAR___ ___FULLUSERNAME___\n"
|
||||
"\n"
|
||||
"Contains libraries from ORCAC,\n"
|
||||
"Copyright \$A9 1991, Byte Works Inc."
|
||||
"/^#0\$00";
|
||||
};
|
||||
|
||||
|
||||
resource rWindParam1 (windowRes) {
|
||||
$DDA5, /* wFrameBits */
|
||||
nil, /* wTitle */
|
||||
0, /* wRefCon */
|
||||
{0, 0, 0, 0}, /* ZoomRect */
|
||||
$07FF0001, /* wColor ID */
|
||||
{0, 0}, /* Origin */
|
||||
{1, 1}, /* data size */
|
||||
{0, 0}, /* max height-width */
|
||||
{8, 8}, /* scroll ver hors */
|
||||
{0, 0}, /* page ver horiz */
|
||||
0, /* winfoRefCon */
|
||||
10, /* wInfoHeight */
|
||||
#if DESKTOP_RES_MODE == 320
|
||||
{30, 10, 183, 300}, /* wposition */
|
||||
#else
|
||||
{30, 10, 183, 602}, /* wposition */
|
||||
#endif
|
||||
infront, /* wPlane */
|
||||
nil, /* wStorage */
|
||||
$0800 /* wInVerb */
|
||||
};
|
||||
|
||||
|
||||
resource rToolStartup (toolStartup) {
|
||||
#if DESKTOP_RES_MODE == 320
|
||||
mode320,
|
||||
#else
|
||||
mode640,
|
||||
#endif
|
||||
{
|
||||
3,$0100, /* Misc Tool */
|
||||
4,$0100, /* Quickdraw */
|
||||
5,$0100, /* Desk Manager */
|
||||
6,$0100, /* Event Manager */
|
||||
11,$0100, /* Int Math */
|
||||
14,$0300, /* Window Manager */
|
||||
15,$0300, /* Menu Manager */
|
||||
16,$0300, /* Control Manager */
|
||||
18,$0200, /* QD Aux */
|
||||
19,$0100, /* Print Manager */
|
||||
20,$0100, /* LineEdit Tool */
|
||||
21,$0100, /* Dialog Manager */
|
||||
22,$0100, /* Scrap Manager */
|
||||
23,$0100, /* Standard File */
|
||||
27,$0100, /* Font Manager */
|
||||
28,$0100, /* List Manager */
|
||||
30,$0100, /* Resource Manager */
|
||||
34,$0100 /* TextEdit */
|
||||
}
|
||||
};
|
280
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/main.s
vendored
Normal file
280
pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/main.s
vendored
Normal file
@ -0,0 +1,280 @@
|
||||
*
|
||||
* ___FILENAME___
|
||||
* ___PACKAGENAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
|
||||
*
|
||||
|
||||
]XCODESTART ; Keep this at the start and put your code after this
|
||||
|
||||
mx %00
|
||||
|
||||
use 4/Util.Macs
|
||||
use 4/Mem.Macs
|
||||
use 4/Locator.Macs
|
||||
use 4/Qd.Macs
|
||||
use 4/Window.Macs
|
||||
use 4/Menu.Macs
|
||||
use 4/Desk.Macs
|
||||
use 4/Dos.16.Macs
|
||||
|
||||
menuBar = 1
|
||||
|
||||
appleMenu = 3
|
||||
fileMenu = 4
|
||||
editMenu = 5
|
||||
|
||||
editUndo = 250
|
||||
editCut = 251
|
||||
editCopy = 252
|
||||
editPaste = 253
|
||||
editClear = 254
|
||||
|
||||
fileNew = 401
|
||||
fileOpen = 402
|
||||
fileClose = 255
|
||||
fileQuit = 256
|
||||
|
||||
appleAbout = 301
|
||||
|
||||
aboutAlertString = 1
|
||||
|
||||
windowRes = 1001
|
||||
|
||||
toolStartup = 1
|
||||
|
||||
refIsHandle = 1
|
||||
refIsResource = 2
|
||||
|
||||
wInMenuBar = $11
|
||||
wInGoAway = $16
|
||||
wInSpecial = $19
|
||||
|
||||
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
pha
|
||||
_MMStartUp
|
||||
PullWord userid
|
||||
|
||||
_TLStartUp
|
||||
|
||||
pha
|
||||
pha
|
||||
PushWord userid
|
||||
PushWord #refIsResource
|
||||
PushLong #toolStartup
|
||||
_StartUpTools
|
||||
PullLong toolStartupRef
|
||||
|
||||
jsl InitMenus
|
||||
_InitCursor
|
||||
|
||||
loop
|
||||
pha
|
||||
PushWord #$ffff
|
||||
PushLong #eventRec
|
||||
_TaskMaster
|
||||
pla
|
||||
|
||||
cmp #wInMenuBar
|
||||
bne notInMenuBar
|
||||
jsl HandleMenu
|
||||
bra loop
|
||||
|
||||
notInMenuBar
|
||||
cmp #wInSpecial
|
||||
bne notInSpecial
|
||||
jsl HandleMenu
|
||||
bra loop
|
||||
|
||||
notInSpecial
|
||||
cmp #wInGoAway
|
||||
bne notInGoAway
|
||||
* Put the low word of the grafport pointer to close in X and the high word in Y
|
||||
ldx wmTaskData
|
||||
ldy wmTaskData+2
|
||||
jsl CloseDocument
|
||||
|
||||
notInGoAway
|
||||
bra loop
|
||||
|
||||
|
||||
InitMenus
|
||||
|
||||
pha
|
||||
pha
|
||||
PushWord #refIsResource
|
||||
PushLong #menuBar
|
||||
PushLong #0
|
||||
_NewMenuBar2
|
||||
_SetSysBar
|
||||
PushLong #0
|
||||
_SetMenuBar
|
||||
PushWord #appleMenu
|
||||
_FixAppleMenu
|
||||
|
||||
pha
|
||||
_FixMenuBar
|
||||
pla
|
||||
|
||||
_DrawMenuBar
|
||||
|
||||
rtl
|
||||
|
||||
|
||||
HandleMenu
|
||||
; The low word of the wmTaskData has the menu item number
|
||||
lda wmTaskData
|
||||
|
||||
cmp #appleAbout
|
||||
bne notAbout
|
||||
jsl DoAbout
|
||||
bra menuDone
|
||||
|
||||
notAbout
|
||||
cmp #fileNew
|
||||
bne notNew
|
||||
jsl NewDocument
|
||||
bra menuDone
|
||||
|
||||
notNew
|
||||
cmp #fileOpen
|
||||
bne notOpen
|
||||
jsl NewDocument
|
||||
bra menuDone
|
||||
|
||||
notOpen
|
||||
cmp #fileClose
|
||||
bne notClose
|
||||
pha
|
||||
pha
|
||||
_FrontWindow
|
||||
plx
|
||||
ply
|
||||
jsl CloseDocument
|
||||
bra menuDone
|
||||
|
||||
notClose
|
||||
cmp #fileQuit
|
||||
bne notQuit
|
||||
jsl DoQuit
|
||||
bra menuDone
|
||||
|
||||
notQuit
|
||||
cmp #editUndo
|
||||
bne notUndo
|
||||
* Handle undo here
|
||||
bra menuDone
|
||||
|
||||
notUndo
|
||||
cmp #editCut
|
||||
bne notCut
|
||||
* Handle cut here
|
||||
bra menuDone
|
||||
|
||||
notCut
|
||||
cmp #editCopy
|
||||
bne notCopy
|
||||
* Handle copy here
|
||||
bra menuDone
|
||||
|
||||
notCopy
|
||||
cmp #editPaste
|
||||
bne notPaste
|
||||
* Handle paste here
|
||||
bra menuDone
|
||||
|
||||
notPaste
|
||||
cmp #editClear
|
||||
bne notClear
|
||||
* Handle clear here
|
||||
bra menuDone
|
||||
|
||||
notClear
|
||||
menuDone
|
||||
PushWord #0
|
||||
PushWord wmTaskData+2
|
||||
_HiliteMenu
|
||||
|
||||
rtl
|
||||
|
||||
|
||||
CloseDocument
|
||||
* X has the low word of the grafport pointer, Y has the high word
|
||||
phy
|
||||
phx
|
||||
_CloseWindow
|
||||
|
||||
rtl
|
||||
|
||||
|
||||
NewDocument
|
||||
pha
|
||||
pha
|
||||
PushLong #winName
|
||||
PushLong #0
|
||||
PushLong #0
|
||||
PushLong #0
|
||||
PushWord #2
|
||||
PushLong #windowRes
|
||||
PushWord #$800E
|
||||
_NewWindow2
|
||||
pla
|
||||
pla
|
||||
|
||||
rtl
|
||||
|
||||
|
||||
DoAbout
|
||||
pha
|
||||
PushWord #4
|
||||
PushLong #0
|
||||
PushLong #aboutAlertString
|
||||
_AlertWindow
|
||||
pla
|
||||
rtl
|
||||
|
||||
|
||||
DoQuit
|
||||
PushWord #refIsHandle
|
||||
PushLong toolStartupRef
|
||||
_ShutDownTools
|
||||
_TLShutDown
|
||||
PushWord userid
|
||||
_MMShutDown
|
||||
|
||||
plb
|
||||
|
||||
_QUIT quitDCB
|
||||
rtl
|
||||
|
||||
* Global data
|
||||
|
||||
userid dw 0
|
||||
toolStartupRef adrl 0
|
||||
winName str 'MyWindow'
|
||||
|
||||
eventRec
|
||||
what dw 0
|
||||
message adrl 0
|
||||
when adrl 0
|
||||
where_vert dw 0
|
||||
where_horiz dw 0
|
||||
modifiers dw 0
|
||||
wmTaskData adrl 0
|
||||
wmTaskMask adrl $001f7fff
|
||||
wmLastClickTick adrl 0
|
||||
wmClickCount dw 0
|
||||
wmTaskData2 adrl 0
|
||||
wmTaskData3 adrl 0
|
||||
wmTaskData4 adrl 0
|
||||
wmLastClickPt_vert dw 0
|
||||
wmLastClickPt_horiz dw 0
|
||||
|
||||
* Used by doQuit
|
||||
quitDCB dw 0
|
||||
|
209
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist
vendored
Normal file
209
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist
vendored
Normal file
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Nodes</key>
|
||||
<array>
|
||||
<string>main.s</string>
|
||||
<string>linkscript.s</string>
|
||||
<string>main.rez</string>
|
||||
<string>Makefile</string>
|
||||
<string>make/config.txt</string>
|
||||
<string>make/createDiskImage</string>
|
||||
<string>make/head.mk</string>
|
||||
<string>make/launchEmulator</string>
|
||||
<string>make/orca-asm</string>
|
||||
<string>make/orca-cc</string>
|
||||
<string>make/orca-rez</string>
|
||||
<string>make/system601.2mg</string>
|
||||
<string>make/tail.mk</string>
|
||||
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
|
||||
</array>
|
||||
<key>Definitions</key>
|
||||
<dict>
|
||||
<key>main.s</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>main.s</string>
|
||||
</dict>
|
||||
<key>linkscript.s</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>linkscript.s</string>
|
||||
</dict>
|
||||
<key>main.rez</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>main.rez</string>
|
||||
</dict>
|
||||
<key>make/config.txt</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/config.txt</string>
|
||||
</dict>
|
||||
<key>make/createDiskImage</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/createDiskImage</string>
|
||||
</dict>
|
||||
<key>make/head.mk</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/head.mk</string>
|
||||
</dict>
|
||||
<key>make/launchEmulator</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/launchEmulator</string>
|
||||
</dict>
|
||||
<key>make/orca-asm</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-asm</string>
|
||||
</dict>
|
||||
<key>make/orca-cc</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-cc</string>
|
||||
</dict>
|
||||
<key>make/orca-rez</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/orca-rez</string>
|
||||
</dict>
|
||||
<key>make/system601.2mg</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/system601.2mg</string>
|
||||
</dict>
|
||||
<key>make/tail.mk</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<string>make</string>
|
||||
<key>Path</key>
|
||||
<string>make/tail.mk</string>
|
||||
</dict>
|
||||
<key>Makefile</key>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>Makefile</string>
|
||||
</dict>
|
||||
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
|
||||
<dict>
|
||||
<key>Group</key>
|
||||
<array>
|
||||
<string>Supporting Files</string>
|
||||
</array>
|
||||
<key>Path</key>
|
||||
<string>___PACKAGENAME___.xcscheme</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Kind</key>
|
||||
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
||||
<key>Identifier</key>
|
||||
<string>com.halcyontouch.apple2gsMerlinNDA</string>
|
||||
<key>Ancestors</key>
|
||||
<array>
|
||||
<string>com.apple.dt.unit.externalBuildSystem</string>
|
||||
</array>
|
||||
<key>Concrete</key>
|
||||
<true/>
|
||||
<key>Description</key>
|
||||
<string>This template creates an Apple IIgs Merlin code project to build a new desktop accessory. The project starts with a single assembly file which you can modify. You can also add more assembly files as you may like.</string>
|
||||
<key>Options</key>
|
||||
<array/>
|
||||
<key>Targets</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>TargetType</key>
|
||||
<string>Legacy</string>
|
||||
<key>TargetIdentifier</key>
|
||||
<string>com.apple.dt.cocoaLegacyTarget</string>
|
||||
<key>BuildToolPath</key>
|
||||
<string>___VARIABLE_buildToolPath___</string>
|
||||
<key>BuildToolArgsString</key>
|
||||
<string>-C ___PACKAGENAME___ $(ACTION)</string>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>OTHER_CFLAGS</key>
|
||||
<string></string>
|
||||
<key>OTHER_LDFLAGS</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>Configurations</key>
|
||||
<dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
<key>DEBUGGING_SYMBOLS</key>
|
||||
<string>YES</string>
|
||||
<key>GCC_GENERATE_DEBUGGING_SYMBOLS</key>
|
||||
<string>YES</string>
|
||||
<key>GCC_OPTIMIZATION_LEVEL</key>
|
||||
<string>0</string>
|
||||
</dict>
|
||||
<key>Release</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ProductType</key>
|
||||
<string>com.apple.product-type.tool</string>
|
||||
<key>TargetIdentifier</key>
|
||||
<string>com.apple.dt.commandLineToolTarget</string>
|
||||
<key>Name</key>
|
||||
<string>doNotBuild</string>
|
||||
<key>SharedSettings</key>
|
||||
<dict>
|
||||
<key>PRODUCT_NAME</key>
|
||||
<string>doNotBuild</string>
|
||||
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
|
||||
<string>inline(X,Y)=""
|
||||
extended=double
|
||||
pascal=""</string>
|
||||
<key>HEADER_SEARCH_PATHS</key>
|
||||
<string>$GOLDEN_GATE/Libraries/ORCACDefs
|
||||
~/Library/GoldenGate/Libraries/ORCACDefs
|
||||
/Library/GoldenGate/Libraries/ORCACDefs
|
||||
~/GoldenGate/Libraries/ORCACDefs</string>
|
||||
</dict>
|
||||
<key>BuildPhases</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Sources</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>Frameworks</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Class</key>
|
||||
<string>CopyFiles</string>
|
||||
<key>DstPath</key>
|
||||
<string>/usr/share/man/man1/</string>
|
||||
<key>DstSubfolderSpec</key>
|
||||
<string>0</string>
|
||||
<key>RunOnlyForDeploymentPostprocessing</key>
|
||||
<string>YES</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
110
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/___PACKAGENAME___.xcscheme
vendored
Normal file
110
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/___PACKAGENAME___.xcscheme
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<PathRunnable
|
||||
runnableDebuggingMode = "0"
|
||||
FilePath = "/usr/bin/make">
|
||||
</PathRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "-C"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "$PROJECT_DIR/___PACKAGENAME___"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "TARGET_BUILD_DIR=$TARGET_BUILD_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "DERIVED_SOURCES_DIR=$DERIVED_SOURCES_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "OBJECT_FILE_DIR=$OBJECT_FILE_DIR"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "execute"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9D0B917C1F526C2D004D7E0B"
|
||||
BuildableName = "___PACKAGENAME___"
|
||||
BlueprintName = "___PACKAGENAME___"
|
||||
ReferencedContainer = "container:___PACKAGENAME___.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
18
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/linkscript.s
vendored
Normal file
18
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/linkscript.s
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
*
|
||||
* ___FILENAME___
|
||||
* ___PROJECTNAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* ___COPYRIGHT___
|
||||
*
|
||||
|
||||
dsk ___PROJECTNAME___
|
||||
typ $B9
|
||||
xpl
|
||||
|
||||
asm main.s
|
||||
ds 0
|
||||
knd #$1100
|
||||
ali None
|
||||
LNA ___PROJECTNAME___.S16
|
||||
sna main
|
47
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/main.rez
vendored
Normal file
47
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/main.rez
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* ___FILENAME___
|
||||
* ___PROJECTNAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* ___COPYRIGHT___
|
||||
*/
|
||||
|
||||
|
||||
#include "types.rez"
|
||||
|
||||
|
||||
#define windowRes 1001
|
||||
|
||||
|
||||
resource rVersion (1) {
|
||||
{
|
||||
0, /* Major version number in BCD */
|
||||
1, /* Minor version number in BCD */
|
||||
0, /* Bug version number in BCD */
|
||||
development,/* Development phase */
|
||||
0 /* Release number */
|
||||
},
|
||||
verUS,
|
||||
"___PROJECTNAME___",
|
||||
"Copyright \$A9 ___YEAR___ ___FULLUSERNAME___"
|
||||
};
|
||||
|
||||
|
||||
resource rWindParam1 (windowRes) {
|
||||
$C0A5, /* wFrameBits */
|
||||
nil, /* wTitle */
|
||||
0, /* wRefCon */
|
||||
{0,0,0,0}, /* ZoomRect */
|
||||
$07FF0001, /* wColor ID */
|
||||
{0,0}, /* Origin */
|
||||
{0,0}, /* data size */
|
||||
{0,0}, /* max height-width */
|
||||
{0,0}, /* scroll ver hors */
|
||||
{0,0}, /* page ver horiz */
|
||||
0, /* winfoRefcon */
|
||||
0, /* wInfoHeight */
|
||||
{50,50,62,200}, /* wposition */
|
||||
infront, /* wPlane */
|
||||
nil, /* wStorage */
|
||||
$0800 /* wInVerb */
|
||||
};
|
344
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/main.s
vendored
Normal file
344
pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/main.s
vendored
Normal file
@ -0,0 +1,344 @@
|
||||
*
|
||||
* ___FILENAME___
|
||||
* ___PACKAGENAME___
|
||||
*
|
||||
* Created by ___FULLUSERNAME___ on ___DATE___.
|
||||
* Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
|
||||
*
|
||||
|
||||
]XCODESTART ; Keep this at the start and put your code after this
|
||||
|
||||
mx %00
|
||||
|
||||
use 4/Util.Macs
|
||||
use 4/Mem.Macs
|
||||
use 4/Qd.Macs
|
||||
use 4/Window.Macs
|
||||
use 4/Desk.Macs
|
||||
use 4/Resource.Macs
|
||||
use 4/GsOs.Macs
|
||||
|
||||
windowRes = 1001
|
||||
|
||||
eventAction = $0001
|
||||
runAction = $0002
|
||||
cursorAction = $0003
|
||||
undoAction = $0005
|
||||
cutAction = $0006
|
||||
copyAction = $0007
|
||||
pasteAction = $0008
|
||||
clearAction = $0009
|
||||
|
||||
updateEvt = $0006
|
||||
wInControl = $0021
|
||||
keyDownEvt = $0003
|
||||
autoKeyEvt = $0005
|
||||
|
||||
setSysPrefs = $0c
|
||||
getSysPrefs = $0f
|
||||
setLevel = $1a
|
||||
getLevel = $1b
|
||||
|
||||
|
||||
adrl NDAOpen
|
||||
adrl NDAClose
|
||||
adrl NDAAction
|
||||
adrl NDAInit
|
||||
dw $ffff
|
||||
dw $03ff
|
||||
asc ' ___PACKAGENAME___ \H**'
|
||||
dw $0
|
||||
|
||||
|
||||
NDAOpen
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
lda ndaActive
|
||||
beq doOpen
|
||||
plb
|
||||
rtl
|
||||
|
||||
doOpen
|
||||
iGSOS getLevel;levelDCB;1
|
||||
lda level
|
||||
sta oldLevel
|
||||
stz level
|
||||
iGSOS setLevel;levelDCB;1
|
||||
|
||||
iGSOS getSysPrefs;prefsDCB;1
|
||||
lda prefs
|
||||
sta oldPrefs
|
||||
and #$1fff
|
||||
ora #$8000
|
||||
sta prefs
|
||||
iGSOS setSysPrefs;prefsDCB;1
|
||||
|
||||
pha
|
||||
PushWord #1
|
||||
lda userId
|
||||
pha
|
||||
_OpenResourceFileByID
|
||||
PullWord oldResApp
|
||||
|
||||
pha
|
||||
pha
|
||||
PushLong #winName
|
||||
PushLong #0
|
||||
PushLong #DrawContents
|
||||
PushLong #0
|
||||
PushWord #2
|
||||
PushLong #windowRes
|
||||
PushWord #$800E
|
||||
_NewWindow2
|
||||
PullLong winPtr
|
||||
|
||||
PushLong winPtr
|
||||
_SetSysWindow
|
||||
PushLong winPtr
|
||||
_ShowWindow
|
||||
PushLong winPtr
|
||||
_SelectWindow
|
||||
|
||||
lda #1
|
||||
sta ndaActive
|
||||
|
||||
lda oldPrefs
|
||||
sta prefs
|
||||
iGSOS setSysPrefs;prefsDCB;1
|
||||
lda oldLevel
|
||||
sta level
|
||||
iGSOS setLevel;levelDCB;1
|
||||
|
||||
PushWord oldResApp
|
||||
_SetCurResourceApp
|
||||
|
||||
lda winPtr
|
||||
sta 5,S
|
||||
lda winPtr+2
|
||||
sta 7,S
|
||||
|
||||
plb
|
||||
|
||||
rtl
|
||||
|
||||
DrawContents
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
_PenNormal
|
||||
PushWord #7
|
||||
PushWord #10
|
||||
_MoveTo
|
||||
PushLong #messageStr
|
||||
_DrawString
|
||||
|
||||
plb
|
||||
|
||||
rtl
|
||||
|
||||
NDAClose
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
lda ndaActive
|
||||
beq closeNotActive
|
||||
|
||||
PushLong winPtr
|
||||
_CloseWindow
|
||||
|
||||
stz winPtr
|
||||
stz winPtr+2
|
||||
stz ndaActive
|
||||
|
||||
closeNotActive
|
||||
_ResourceShutDown
|
||||
|
||||
plb
|
||||
rtl
|
||||
|
||||
NDAAction
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
cmp #eventAction
|
||||
bne notEvent
|
||||
jsl HandleEvent
|
||||
bra actionDone
|
||||
|
||||
notEvent
|
||||
cmp #runAction
|
||||
bne notRun
|
||||
jsl HandleRun
|
||||
bra actionDone
|
||||
|
||||
notRun
|
||||
cmp #cursorAction
|
||||
bne notCursor
|
||||
jsl HandleCursor
|
||||
bra actionDone
|
||||
|
||||
notCursor
|
||||
cmp #undoAction
|
||||
blt notEdit
|
||||
cmp #clearAction+1
|
||||
bge notEdit
|
||||
jsl HandleEdit
|
||||
lda #1
|
||||
bra actionDone
|
||||
|
||||
notEdit
|
||||
actionDone
|
||||
plb
|
||||
rtl
|
||||
|
||||
HandleEvent
|
||||
* The X register has the low 16 bits of the address of the event record.
|
||||
* We leave that there and use that in the memory move instruction to
|
||||
* copy that event record into our local event.
|
||||
*
|
||||
* The Y register has the high 16 bits of the address of the event record.
|
||||
* We need to get that into the upper 8 bits of the accumulator.
|
||||
tya
|
||||
xba
|
||||
* Now we need to or in the current bank register into the lower 8 bits
|
||||
* of the accumulator for the move instruction
|
||||
pea $0
|
||||
phb
|
||||
ora 1,S
|
||||
* We have the source and destination banks in the accumulator now. Modify
|
||||
* the move instruction to have these banks and clean up the stack.
|
||||
sta moveIns+1
|
||||
plb
|
||||
pla
|
||||
|
||||
* X is already setup for the move. We need the low 16 bits of the destination
|
||||
* in the Y register and the count of bytes to copy minus one in the accumulator.
|
||||
ldy #localEvent
|
||||
lda #15 ; Copy 16 bytes
|
||||
moveIns mvn 0,0
|
||||
|
||||
pha
|
||||
PushWord #0
|
||||
PushLong #localEvent
|
||||
_TaskMasterDA
|
||||
pla
|
||||
|
||||
cmp #updateEvt
|
||||
bne notUpdate
|
||||
PushLong winPtr
|
||||
_BeginUpdate
|
||||
jsl DrawContents
|
||||
PushLong winPtr
|
||||
_EndUpdate
|
||||
bra eventDone
|
||||
|
||||
notUpdate
|
||||
cmp #wInControl
|
||||
bne notControl
|
||||
jsl HandleControl
|
||||
bra eventDone
|
||||
|
||||
notControl
|
||||
cmp #keyDownEvt
|
||||
beq isKey
|
||||
cmp #autoKeyEvt
|
||||
beq isKey
|
||||
|
||||
eventDone
|
||||
rtl
|
||||
|
||||
isKey
|
||||
jsl HandleKey
|
||||
bra eventDone
|
||||
|
||||
|
||||
HandleControl
|
||||
* Add code here if you need to handle controls in your NDA window
|
||||
rtl
|
||||
|
||||
HandleKey
|
||||
* Add code here if you need to handle keypresses
|
||||
rtl
|
||||
|
||||
HandleRun
|
||||
* Add code here if you need to execute something periodically from your NDA
|
||||
rtl
|
||||
|
||||
HandleCursor
|
||||
* Add code here if you need to do something to the cursor when over the NDA window
|
||||
rtl
|
||||
|
||||
HandleEdit
|
||||
* Add code here to handle undo, cut, copy, paste or clear. The A register holds
|
||||
* the action code.
|
||||
rtl
|
||||
|
||||
NDAInit
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
cmp #$00
|
||||
beq toolShutdown
|
||||
|
||||
stz ndaActive
|
||||
|
||||
pha
|
||||
_MMStartUp
|
||||
pla
|
||||
sta userId
|
||||
|
||||
bra initReturn
|
||||
|
||||
toolShutdown
|
||||
lda ndaActive
|
||||
beq initReturn
|
||||
jsl NDAClose
|
||||
|
||||
initReturn
|
||||
plb
|
||||
rtl
|
||||
|
||||
* Global data
|
||||
|
||||
ndaActive dw 0
|
||||
winPtr adrl 0
|
||||
userId dw 0
|
||||
winName str ' ___PACKAGENAME___ '
|
||||
messageStr str 'Hello, world!'
|
||||
|
||||
* Used by NDAOpen to access resources
|
||||
oldResApp dw 0
|
||||
oldLevel dw 0
|
||||
oldPrefs dw 0
|
||||
|
||||
levelDCB dw 2 ; GSOS control block to get/set level
|
||||
level dw 0
|
||||
dw 0
|
||||
|
||||
prefsDCB dw 1 ; GSOS control block to get/set preferences
|
||||
prefs dw 0
|
||||
|
||||
* Used by HandleEvent
|
||||
localEvent
|
||||
what dw 0
|
||||
message adrl 0
|
||||
when adrl 0
|
||||
where_vert dw 0
|
||||
where_horiz dw 0
|
||||
modifiers dw 0
|
||||
wmTaskData adrl 0
|
||||
wmTaskMask adrl $001fffff
|
||||
wmLastClickTick adrl 0
|
||||
wmClickCount dw 0
|
||||
wmTaskData2 adrl 0
|
||||
wmTaskData3 adrl 0
|
||||
wmTaskData4 adrl 0
|
||||
wmLastClickPt_vert dw 0
|
||||
wmLastClickPt_horiz dw 0
|
||||
|
@ -197,7 +197,7 @@ HandleEvent entry
|
||||
moveIns mvn 0,0
|
||||
|
||||
pha
|
||||
~TaskMasterDA 0,#localEvent
|
||||
~TaskMasterDA #0,#localEvent
|
||||
pla
|
||||
|
||||
cmp #updateEvt
|
||||
@ -249,6 +249,9 @@ HandleEdit entry
|
||||
rtl
|
||||
|
||||
NDAInit entry
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
cmp #$00
|
||||
beq toolShutdown
|
||||
|
||||
@ -267,6 +270,7 @@ toolShutdown anop
|
||||
jsl NDAClose
|
||||
|
||||
initReturn anop
|
||||
plb
|
||||
rtl
|
||||
|
||||
; Global data
|
||||
|
@ -17,9 +17,11 @@ cdev:orca:ORCAM Control Panel:0:0
|
||||
cdev:merlin:Merlin Control Panel:0:0
|
||||
desktop:orca:ORCAC Desktop Application:1:1
|
||||
desktop:orca:ORCAM Desktop Application:1:0
|
||||
desktop:merlin:Merlin Desktop Application:1:0
|
||||
shell:gno:ORCAC GNO Shell Command:0:0
|
||||
nda:orca:ORCAC New Desk Accessory:0:0
|
||||
nda:orca:ORCAM New Desk Accessory:0:0
|
||||
nda:merlin:Merlin New Desk Accessory:0:0
|
||||
shell:orca:ORCAC Shell Command:0:0
|
||||
shell:orca:ORCAM Shell Command:0:0
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user