diff --git a/HelloWorld.s b/HelloWorld.s new file mode 100644 index 0000000..9027fd7 --- /dev/null +++ b/HelloWorld.s @@ -0,0 +1,11 @@ +; Uses S-C Assembler variant. +* This is also a valid comment... + org $800 +main ldy #$00 +start_loop lda HelloWorld,y + beq end_loop + jsr $fded ; ROM routine, COUT, y is preserved + iny + bne start_loop +end_loop rts +HelloWorld ASC "HELLO WORLD!"00 diff --git a/HelloWorld.sln b/HelloWorld.sln new file mode 100644 index 0000000..ac402c0 --- /dev/null +++ b/HelloWorld.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld.vcxproj", "{BAF4B8D0-B039-479F-911C-2EC80FAEA2DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BAF4B8D0-B039-479F-911C-2EC80FAEA2DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAF4B8D0-B039-479F-911C-2EC80FAEA2DD}.Debug|Win32.Build.0 = Debug|Win32 + {BAF4B8D0-B039-479F-911C-2EC80FAEA2DD}.Release|Win32.ActiveCfg = Release|Win32 + {BAF4B8D0-B039-479F-911C-2EC80FAEA2DD}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/HelloWorld.vcxproj b/HelloWorld.vcxproj new file mode 100644 index 0000000..a474c67 --- /dev/null +++ b/HelloWorld.vcxproj @@ -0,0 +1,81 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {BAF4B8D0-B039-479F-911C-2EC80FAEA2DD} + MakeFileProj + SAK + SAK + SAK + SAK + + + + Makefile + true + v120 + + + Makefile + false + v120 + + + + + + + + + + + + + $(PRG) + + + $(MERLIN32WIN);$(PATH); + + + $(MERLIN32LIBS); + + + + nmake.exe + nmake.exe all + nmake.ex clean + + + $(PRG) + + + $(MERLIN32WIN);$(PATH); + + + $(MERLIN32LIBS); + + + + nmake.exe + nmake.exe all + nmake.ex clean + + + + + + + + + + + \ No newline at end of file diff --git a/MAKEFILE b/MAKEFILE new file mode 100644 index 0000000..ee162ef --- /dev/null +++ b/MAKEFILE @@ -0,0 +1,66 @@ +# Program name +PRG=HelloWorld +# System target +SYSTEM=apple2enh +# The test below allows to keep working on this in different environments\computers +!if "$(COMPUTERNAME)" == "M" +# That's the location where I have programs such as AppleWin, or a DOS blank disk image +MyAppleFolder="C:\Users\Olivier\OneDrive\Apple" +!else +# Work environment... +MyAppleFolder="D:\Apple" +# This was running on GSPort @ work +GSPORT=$(MyAppleFolder)\sport_0.31\gsport.exe +!endif + +# Misc. vars +# https://github.com/AppleWin/AppleWin +APPLEWIN=$(MyAppleFolder)\AppleWin\Applewin.exe +# http://www.brutaldeluxe.fr/products/crossdevtools/merlin/ +MERLIN32ROOT=$(MyAppleFolder)\Merlin32_v1.0 +MERLIN32LIBS=$(MERLIN32ROOT)\Library +MERLIN32WIN=$(MERLIN32ROOT)\Windows +MERLIN32EXE=$(MERLIN32WIN)\merlin32.exe +# http://applecommander.sourceforge.net/ +APPLECOMMANDER=$(MyAppleFolder)\AppleCommander-1.3.5-ac.jar +ACJAR=java.exe -jar $(APPLECOMMANDER) + + +$(PRG): $(PRG).s + @Echo *************************************************************** + @Echo *** On compile l'exécutable / Compile program + @Echo *************************************************************** + $(MERLIN32EXE) -V $(MERLIN32LIBS) $(PRG).s + +GetFloppyAndCopyDSK: + @Echo *************************************************************** + @Echo *** On copie la disquette vierge à partir du répertoire parent + @Echo *** et on copie dessus les fichiers executables et autres + @Echo *** Copying blank disk image and copying the program on it + @Echo *************************************************************** + copy /Y $(MyAppleFolder)\prodos.dsk .\$(PRG).dsk + $(ACJAR) -p $(PRG).dsk $(PRG) bin 2048 < $(PRG) + +LaunchAppleWin: + @Echo *************************************************************** + @Echo *** On lance le tout dans AppleWin / Launch AppleWin + @Echo *************************************************************** + $(APPLEWIN) -d1 $(PRG).dsk + +LaunchGSPort: + @Echo *************************************************************** + @Echo *** On lance le tout dans GSPORT / Launch GSPort (not used here) + @Echo *************************************************************** +#$(GSPORT) -d1 $(PRG).dsk + $(GSPORT) + +clean: + @Echo *************************************************************** + @Echo *** On efface les fichiers programme, objet et backup + @Echo *** Clean files + @Echo *************************************************************** + del _FileInformation.txt $(PRG)_Output.txt $(PRG).dsk $(PRG) + +all: clean $(PRG) GetFloppyAndCopyDSK LaunchAppleWin + + diff --git a/Merlin32BuildSolution.gif b/Merlin32BuildSolution.gif new file mode 100644 index 0000000..ac47261 Binary files /dev/null and b/Merlin32BuildSolution.gif differ diff --git a/README.md b/README.md index fc3b413..9abc7b9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # Merlin32BuildSolution -Visual Studio makefile solution to build with Merlin32 +Visual Studio makefile solution to build Apple II projects with Merlin32. + +![](https://github.com/OlivierGuinart/Merlin32BuildSolution/blob/master/Merlin32BuildSolution.gif) + +This is a boilerplate VS solution to jumpstart Merlin32 projects development. The most important file is MAKEFILE: this is where you set your paths to your local tools, e.g. AppleWin, prodos.dsk, Merlin32, AppleCommander, GSPort, etc... +