Compare commits

...

10 Commits

Author SHA1 Message Date
Peter Dell
71b6bb07c3 Update Stella Programmer's Guide
Fixes #21
2024-02-03 23:33:39 +01:00
Peter Dell
6520f1e27a Fix escaping for regex split of spaces 2024-02-03 23:29:37 +01:00
Peter Dell
c22b471565 Adapt ASM6 readme to ASM6f file 2024-01-30 02:02:20 +01:00
Peter Dell
0423e79c7a Make command line/parameter parsing tolerant regarding consecutive spaces
Use REGEX instead of standard  split(" ")
2024-01-30 01:50:43 +01:00
Peter Dell
6dc5b3ef2f Ignore compile time warnings for deprecated platform constants. 2024-01-30 01:49:25 +01:00
Peter Dell
e0d03fc8ea Fix label of AssemblerC64PreferencesPage (as "Assemblers") 2024-01-30 01:13:20 +01:00
Peter Dell
da51fa1440 Merge branch 'main' of https://github.com/wudsn/wudsn-ide 2024-01-30 00:54:45 +01:00
Peter Dell
4ad66df344 Update assembler & runner homepage URLs. Remove duplicate spaces.
Removing duplicate spaces in the in default command line options is a
workaround for an ASM6f bug.
2024-01-30 00:50:52 +01:00
Peter Dell
b8a7ed581f Revert "Remove duplicate spaces from assembly options (fix for ASM6f bug)."
This reverts commit bbcebf699d.
2024-01-30 00:47:18 +01:00
Peter Dell
bbcebf699d Remove duplicate spaces from assembly options (fix for ASM6f bug). 2024-01-30 00:45:17 +01:00
6 changed files with 45 additions and 23 deletions

View File

@ -41,7 +41,7 @@
category="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage" category="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage"
class="com.wudsn.ide.lng.asm.preferences.AssemblerC64PreferencesPage" class="com.wudsn.ide.lng.asm.preferences.AssemblerC64PreferencesPage"
id="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage" id="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage"
name="%com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage.name"> name="%com.wudsn.ide.lng.asm.preferences.AssemblerC64PreferencesPage.name">
</page> </page>
<page <page
category="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage" category="com.wudsn.ide.lng.asm.preferences.AssemblerPreferencesPage"
@ -91,8 +91,8 @@
<compiler <compiler
class="com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler" class="com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler"
defaultHardware="NES" defaultHardware="NES"
defaultParameters=" ${sourceFilePath} ${outputFilePath}" defaultParameters=" ${sourceFilePath} ${outputFilePath}"
homePageURL="http://3dscapture.com/NES/asm6.zip" homePageURL="https://github.com/freem/asm6f"
id="asm6" id="asm6"
language="ASM" language="ASM"
name="%com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler.name" name="%com.wudsn.ide.lng.asm.compiler.asm6.Asm6Compiler.name"
@ -105,14 +105,14 @@
</supportedTarget> </supportedTarget>
<helpDocument <helpDocument
language="*" language="*"
path="./README.TXT"> path="./readme.txt">
</helpDocument> </helpDocument>
</compiler> </compiler>
<compiler <compiler
class="com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler" class="com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler"
defaultHardware="ATARI8BIT" defaultHardware="ATARI8BIT"
defaultParameters="-s -o${outputFilePath} -l${outputFilePathWithoutExtension}.lab ${sourceFilePath}" defaultParameters="-s -o${outputFilePath} -l${outputFilePathWithoutExtension}.lab ${sourceFilePath}"
homePageURL="http://atari.miribilist.com/atasm" homePageURL="https://atari.miribilist.com/atasm/"
id="atasm" id="atasm"
language="ASM" language="ASM"
name="%com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler.name" name="%com.wudsn.ide.lng.asm.compiler.atasm.AtasmCompiler.name"
@ -205,7 +205,7 @@
<compiler <compiler
class="com.wudsn.ide.lng.asm.compiler.merlin32.Merlin32Compiler" class="com.wudsn.ide.lng.asm.compiler.merlin32.Merlin32Compiler"
defaultHardware="APPLE2" defaultHardware="APPLE2"
defaultParameters="-V ${sourceFilePath}" defaultParameters="-V ${sourceFilePath}"
homePageURL="http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html" homePageURL="http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html"
id="merlin32" id="merlin32"
language="ASM" language="ASM"
@ -449,5 +449,5 @@
</contentTypeBinding> </contentTypeBinding>
</editor> </editor>
</extension> </extension>
</plugin> </plugin>

View File

@ -22,7 +22,7 @@
<runner <runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePathWithoutExtension}.dsk" defaultCommandLine="${runnerExecutablePath} ${outputFilePathWithoutExtension}.dsk"
hardware="APPLE2" hardware="APPLE2"
homePageURL="http://virtu.codeplex.com" homePageURL="https://github.com/digital-jellyfish/Virtu"
id="virtu" id="virtu"
name="%com.wudsn.ide.lng.run.apple2.virtu.name"> name="%com.wudsn.ide.lng.run.apple2.virtu.name">
</runner> </runner>
@ -34,6 +34,7 @@
name="%com.wudsn.ide.lng.run.apple2.virtualii.name"> name="%com.wudsn.ide.lng.run.apple2.virtualii.name">
</runner> </runner>
</extension> </extension>
<extension <extension
id="Atari 2600 runners" id="Atari 2600 runners"
point="com.wudsn.ide.lng.runners"> point="com.wudsn.ide.lng.runners">
@ -45,6 +46,7 @@
name="%com.wudsn.ide.lng.run.atari2600.stella.name"> name="%com.wudsn.ide.lng.run.atari2600.stella.name">
</runner> </runner>
</extension> </extension>
<extension <extension
id="Atari 8-bit runners" id="Atari 8-bit runners"
point="com.wudsn.ide.lng.runners"> point="com.wudsn.ide.lng.runners">
@ -52,14 +54,14 @@
class="com.wudsn.ide.lng.run.atari8.Altirra" class="com.wudsn.ide.lng.run.atari8.Altirra"
defaultCommandLine="${runnerExecutablePath} /singleinstance ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} /singleinstance ${outputFilePath}"
hardware="ATARI8BIT" hardware="ATARI8BIT"
homePageURL="http://www.virtualdub.org/altirra.html" homePageURL="https://www.virtualdub.org/altirra.html"
id="altirra" id="altirra"
name="%com.wudsn.ide.lng.run.atari8.altirra.name"> name="%com.wudsn.ide.lng.run.atari8.altirra.name">
</runner> </runner>
<runner <runner
defaultCommandLine="xterm -iconic -e atari800 -run ${outputFilePath}" defaultCommandLine="xterm -iconic -e atari800 -run ${outputFilePath}"
hardware="ATARI8BIT" hardware="ATARI8BIT"
homePageURL="http://atari800.sourceforge.net" homePageURL="https://atari800.github.io"
id="atari800" id="atari800"
name="%com.wudsn.ide.lng.run.atari8.atari800.name"> name="%com.wudsn.ide.lng.run.atari8.atari800.name">
</runner> </runner>
@ -74,7 +76,7 @@
<runner <runner
defaultCommandLine="open -a ${runnerExecutablePath} ${outputFilePath}" defaultCommandLine="open -a ${runnerExecutablePath} ${outputFilePath}"
hardware="ATARI8BIT" hardware="ATARI8BIT"
homePageURL="http://www.atarimac.com/atari800macx.php" homePageURL="https://www.atarimac.com/atari800macx.php"
id="atari800_macx" id="atari800_macx"
name="%com.wudsn.ide.lng.run.atari8.atari800_macx.name"> name="%com.wudsn.ide.lng.run.atari8.atari800_macx.name">
</runner> </runner>
@ -86,20 +88,19 @@
name="%com.wudsn.ide.lng.run.atari8.atari_plus_plus.name"> name="%com.wudsn.ide.lng.run.atari8.atari_plus_plus.name">
</runner> </runner>
</extension> </extension>
<extension <extension
id="Atari7800 runners" id="Atari7800 runners"
point="com.wudsn.ide.lng.runners"> point="com.wudsn.ide.lng.runners">
<runner <runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="ATARI7800" hardware="ATARI7800"
homePageURL="http://emu7800.sourceforge.net" homePageURL="https://emu7800.github.io/"
id="emu7800" id="emu7800"
name="%com.wudsn.ide.lng.run.atari7800.emu7800.name"> name="%com.wudsn.ide.lng.run.atari7800.emu7800.name">
</runner> </runner>
</extension> </extension>
<extension <extension
id="C64 runners" id="C64 runners"
point="com.wudsn.ide.lng.runners"> point="com.wudsn.ide.lng.runners">
@ -113,32 +114,33 @@
<runner <runner
defaultCommandLine="${runnerExecutablePath} -autostart ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} -autostart ${outputFilePath}"
hardware="C64" hardware="C64"
homePageURL="https://vice-emu.sourceforge.io/" homePageURL="https://vice-emu.sourceforge.io"
id="vice" id="vice"
name="%com.wudsn.ide.lng.run.c64.vice.name"> name="%com.wudsn.ide.lng.run.c64.vice.name">
</runner> </runner>
</extension> </extension>
<extension <extension
id="NES runners" id="NES runners"
point="com.wudsn.ide.lng.runners"> point="com.wudsn.ide.lng.runners">
<runner <runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES" hardware="NES"
homePageURL="http://www.byuu.org/bsnes" homePageURL="https://github.com/bsnes-emu/bsnes"
id="bsnes" id="bsnes"
name="%com.wudsn.ide.lng.run.nes.bsnes.name"> name="%com.wudsn.ide.lng.run.nes.bsnes.name">
</runner> </runner>
<runner <runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES" hardware="NES"
homePageURL="http://www.fceux.comux" homePageURL="https://fceux.com"
id="fceux" id="fceux"
name="%com.wudsn.ide.lng.run.nes.fceux.name"> name="%com.wudsn.ide.lng.run.nes.fceux.name">
</runner> </runner>
<runner <runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}" defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES" hardware="NES"
homePageURL="http://www.qmtpro.com/~nes/nintendulator" homePageURL="https://www.qmtpro.com/~nes/nintendulator"
id="nintendulator" id="nintendulator"
name="%com.wudsn.ide.lng.run.nes.nintendulator.name"> name="%com.wudsn.ide.lng.run.nes.nintendulator.name">
</runner> </runner>

View File

@ -1 +1,2 @@
From https://forums.atariage.com/topic/278499-stella-programmers-guide-reprinted-book/ From https://forums.atariage.com/topic/278499-stella-programmers-guide-reprinted-book/
"Stella_Programmers_Guide.pdf" was created directly from "Stella_Programmers_Guide.docx" via "Save as PDF".

View File

@ -88,6 +88,7 @@ public final class CompilerPaths {
/** /**
* Initialize the default paths. * Initialize the default paths.
*/ */
@SuppressWarnings("deprecation")
public void init() { public void init() {
compilerPaths = new TreeMap<String, CompilerPath>(); compilerPaths = new TreeMap<String, CompilerPath>();
// See https://github.com/peterdell/wudsn-ide-tools // See https://github.com/peterdell/wudsn-ide-tools

View File

@ -187,6 +187,23 @@ final class LanguageEditorCompileCommand {
} }
} }
/**
* Splits a string a one or more spaces, unless they are quoted.
*
* @param commandLine The command line to be split, not <code>null</code>.
* @return The array of string, may be empty, not <code>null</code>.
*/
private static String[] splitAtSpaces(String commandLine) {
if (commandLine == null) {
throw new IllegalArgumentException("Parameter 'commandLine' must not be null.");
}
return commandLine.split("\\s+(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)", -1);
}
public static void main(String[] args) {
System.out.println(java.util.Arrays.toString(splitAtSpaces("\"a b\" \"c d\" e")));
}
private boolean executeInternal(ILanguageEditor languageEditor, CompilerFiles files, String commandId, private boolean executeInternal(ILanguageEditor languageEditor, CompilerFiles files, String commandId,
String runnerId) { String runnerId) {
@ -280,14 +297,16 @@ final class LanguageEditorCompileCommand {
compilerParameters = compilerDefinition.getDefaultParameters(); compilerParameters = compilerDefinition.getDefaultParameters();
} }
// The parameters are first split and then substituted. // The parameters are first split at spaces (unless they are quotes) and then
// substituted.
// This allows for parameters and file paths inner spaces to be used. // This allows for parameters and file paths inner spaces to be used.
// In some case addition quotes must be places around parameters, for // In some case addition quotes must be places around parameters, for
// example for the "${sourceFilePath}". This can be used to avoid // example for the "${sourceFilePath}". This can be used to avoid
// problems with absolute file path under Unix starting with "/" or path // problems with absolute file path under Unix starting with "/" or path
// containing white spaces. // containing white spaces.
compilerParameters = compilerParameters.trim(); compilerParameters = compilerParameters.trim();
String compilerParameterArray[] = compilerParameters.split(" "); String compilerParameterArray[] = splitAtSpaces(compilerParameters);
if (compilerParameterArray.length == 0) { if (compilerParameterArray.length == 0) {
// ERROR: The {0} '{1}' does not specify default parameters. // ERROR: The {0} '{1}' does not specify default parameters.
createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E101, compilerDefinition.getText(), createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E101, compilerDefinition.getText(),
@ -570,8 +589,7 @@ final class LanguageEditorCompileCommand {
// parameters, for example for the "${outputFilePath}" for // parameters, for example for the "${outputFilePath}" for
// MADS. Otherwise using absolute file path under Unix starting // MADS. Otherwise using absolute file path under Unix starting
// "/" may cause conflicts. // "/" may cause conflicts.
String[] commandLineArray; String[] commandLineArray = splitAtSpaces(runnerCommandLine);
commandLineArray = runnerCommandLine.split(" ");
// Execution type: DEFAULT_APPLICATION // Execution type: DEFAULT_APPLICATION
if (runnerId.equals(RunnerId.DEFAULT_APPLICATION)) { if (runnerId.equals(RunnerId.DEFAULT_APPLICATION)) {