First commit of new com.wudsn.ide.lng.run plugin

This commit is contained in:
peterdell 2021-09-26 22:57:39 +02:00
parent 5c994c4c82
commit 2f9bf2051c
11 changed files with 395 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

1
com.wudsn.ide.lng.run/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin/

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.wudsn.ide.lng.run</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WUDSN IDE Runners Plugin
Bundle-SymbolicName: com.wudsn.ide.lng.run;singleton:=true
Bundle-Version: 1.7.2.qualifier
Bundle-Vendor: Peter Dell
Automatic-Module-Name: com.wudsn.ide.lng.run
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: com.wudsn.ide.lng

View File

@ -0,0 +1,39 @@
#
# Hardware: APPLE2
#
com.wudsn.ide.lng.run.apple2.applewin.name=AppleWin
com.wudsn.ide.lng.run.apple2.jace.name=JACE
com.wudsn.ide.lng.run.apple2.virtu.name=Virtu
com.wudsn.ide.lng.run.apple2.virtualii.name=Virtual ][
#
# Hardware: ATARI2600
#
com.wudsn.ide.lng.run.atari2600.stella.name=Stella
#
# Hardware: ATARI7800
#
com.wudsn.ide.lng.run.atari7800.emu7800.name=EMU7800
#
# Hardware: ATARI8
#
com.wudsn.ide.lng.run.atari8.atari800.name=Atari800
com.wudsn.ide.lng.run.atari8.atari800_win.name=Atari800Win
com.wudsn.ide.lng.run.atari8.atari800_macx.name=Atari800MacX
com.wudsn.ide.lng.run.atari8.altirra.name=Altirra
com.wudsn.ide.lng.run.atari8.atari_plus_plus.name=Atari++
#
# Hardware: C64
#
com.wudsn.ide.lng.run.c64.ccs64.name=CCS64
com.wudsn.ide.lng.run.c64.vice.name=VICE
#
# Hardware: NES
#
com.wudsn.ide.lng.run.nes.bsnes.name=BSNES
com.wudsn.ide.lng.run.nes.fceux.name=FCEUX
com.wudsn.ide.lng.run.nes.nintendulator.name=Nintendulator

View File

@ -0,0 +1,39 @@
#
# Hardware: APPLE2
#
com.wudsn.ide.lng.run.apple2.applewin.name=AppleWin
com.wudsn.ide.lng.run.apple2.jace.name=JACE
com.wudsn.ide.lng.run.apple2.virtu.name=Virtu
com.wudsn.ide.lng.run.apple2.virtualii.name=Virtual ][
#
# Hardware: ATARI2600
#
com.wudsn.ide.lng.run.atari2600.stella.name=Stella
#
# Hardware: ATARI7800
#
com.wudsn.ide.lng.run.atari7800.emu7800.name=EMU7800
#
# Hardware: ATARI8
#
com.wudsn.ide.lng.run.atari8.atari800.name=Atari800
com.wudsn.ide.lng.run.atari8.atari800_win.name=Atari800Win
com.wudsn.ide.lng.run.atari8.atari800_macx.name=Atari800MacX
com.wudsn.ide.lng.run.atari8.altirra.name=Altirra
com.wudsn.ide.lng.run.atari8.atari_plus_plus.name=Atari++
#
# Hardware: C64
#
com.wudsn.ide.lng.run.c64.ccs64.name=CCS64
com.wudsn.ide.lng.run.c64.vice.name=VICE
#
# Hardware: NES
#
com.wudsn.ide.lng.run.nes.bsnes.name=BSNES
com.wudsn.ide.lng.run.nes.fceux.name=FCEUX
com.wudsn.ide.lng.run.nes.nintendulator.name=Nintendulator

View File

@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
OSGI-INF/,\
bin/

View File

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="Apple II runners"
point="com.wudsn.ide.lng.runners">
<runner
defaultCommandLine="${runnerExecutablePath} -d1 ${outputFilePathWithoutExtension}.dsk"
hardware="APPLE2"
homePageURL="https://github.com/AppleWin/AppleWin"
id="applewin"
name="%com.wudsn.ide.lng.run.apple2.applewin.name">
</runner>
<runner
defaultCommandLine="java -jar ${runnerExecutablePath} -computer.s6card disk -s6.d1 ${outputFilePathWithoutExtension}.dsk"
hardware="APPLE2"
homePageURL="https://sites.google.com/site/brendanrobert/projects/jace"
id="jace"
name="%com.wudsn.ide.lng.run.apple2.jace.name">
</runner>
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePathWithoutExtension}.dsk"
hardware="APPLE2"
homePageURL="http://virtu.codeplex.com"
id="virtu"
name="%com.wudsn.ide.lng.run.apple2.virtu.name">
</runner>
<runner
defaultCommandLine="open ${runnerExecutablePath} ${outputFilePathWithoutExtension}.dsk"
hardware="APPLE2"
homePageURL="http://www.virtualii.com"
id="virtualii"
name="%com.wudsn.ide.lng.run.apple2.virtualii.name">
</runner>
</extension>
<extension
id="Atari 2600 runners"
point="com.wudsn.ide.lng.runners">
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="ATARI2600"
homePageURL="http://stella.sourceforge.net"
id="stella"
name="%com.wudsn.ide.lng.run.atari2600.stella.name">
</runner>
</extension>
<extension
id="Atari 8-bit runners"
point="com.wudsn.ide.lng.runners">
<runner
class="com.wudsn.ide.lng.run.atari8.Altirra"
defaultCommandLine="${runnerExecutablePath} /singleinstance ${outputFilePath}"
hardware="ATARI8BIT"
homePageURL="http://www.virtualdub.org/altirra.html"
id="altirra"
name="%com.wudsn.ide.lng.run.atari8.altirra.name">
</runner>
<runner
defaultCommandLine="xterm -iconic -e atari800 -run ${outputFilePath}"
hardware="ATARI8BIT"
homePageURL="http://atari800.sourceforge.net"
id="atari800"
name="%com.wudsn.ide.lng.run.atari8.atari800.name">
</runner>
<runner
class="com.wudsn.ide.lng.run.atari8.Atari800Win"
defaultCommandLine="${runnerExecutablePath} -run ${outputFilePath}"
hardware="ATARI8BIT"
homePageURL="http://a800win.atari-area.prv.pl"
id="atari800_win"
name="%com.wudsn.ide.lng.run.atari8.atari800_win.name">
</runner>
<runner
defaultCommandLine="open -a ${runnerExecutablePath} ${outputFilePath}"
hardware="ATARI8BIT"
homePageURL="http://www.atarimac.com/atari800macx.php"
id="atari800_macx"
name="%com.wudsn.ide.lng.run.atari8.atari800_macx.name">
</runner>
<runner
defaultCommandLine="${runnerExecutablePath} -image.1 ${outputFilePath}"
hardware="ATARI8BIT"
homePageURL="http://www.xl-project.com"
id="atari_plus_plus"
name="%com.wudsn.ide.lng.run.atari8.atari_plus_plus.name">
</runner>
</extension>
<extension
id="Atari7800 runners"
point="com.wudsn.ide.lng.runners">
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="ATARI7800"
homePageURL="http://emu7800.sourceforge.net"
id="emu7800"
name="%com.wudsn.ide.lng.run.atari7800.emu7800.name">
</runner>
</extension>
<extension
id="C64 runners"
point="com.wudsn.ide.lng.runners">
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="C64"
homePageURL="http://www.ccs64.com"
id="ccs64"
name="%com.wudsn.ide.lng.run.c64.ccs64.name">
</runner>
<runner
defaultCommandLine="${runnerExecutablePath} -autostart ${outputFilePath}"
hardware="C64"
homePageURL="http://vice-emu.sourceforge.net"
id="vice"
name="%com.wudsn.ide.lng.run.c64.vice.name">
</runner>
</extension>
<extension
id="NES runners"
point="com.wudsn.ide.lng.runners">
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES"
homePageURL="http://www.byuu.org/bsnes"
id="bsnes"
name="%com.wudsn.ide.lng.run.nes.bsnes.name">
</runner>
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES"
homePageURL="http://www.fceux.comux"
id="fceux"
name="%com.wudsn.ide.lng.run.nes.fceux.name">
</runner>
<runner
defaultCommandLine="${runnerExecutablePath} ${outputFilePath}"
hardware="NES"
homePageURL="http://www.qmtpro.com/~nes/nintendulator"
id="nintendulator"
name="%com.wudsn.ide.lng.run.nes.nintendulator.name">
</runner>
</extension>
</plugin>

View File

@ -0,0 +1,78 @@
/**
* Copyright (C) 2009 - 2021 <a href="https://www.wudsn.com" target="_top">Peter Dell</a>
*
* This file is part of WUDSN IDE.
*
* WUDSN IDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* WUDSN IDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
*/
package com.wudsn.ide.lng.run.atari8;
import java.io.File;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.model.IBreakpoint;
import com.wudsn.ide.lng.breakpoint.LanguageBreakpoint;
import com.wudsn.ide.lng.compiler.CompilerFiles;
import com.wudsn.ide.lng.runner.Runner;
/**
* Runner for Altirra 2.0 and above which support source line breakpoints.
*
* @author Peter Dell
* @since 1.6.1
*/
public final class Altirra extends Runner {
@Override
public File createBreakpointsFile(CompilerFiles files) {
if (files == null) {
throw new IllegalArgumentException("Parameter 'files' must not be null.");
}
return new File(files.outputFilePathWithoutExtension + ".atdbg");
}
@Override
public int createBreakpointsFileContent(LanguageBreakpoint[] breakpoints, StringBuilder breakpointBuilder) {
if (breakpoints == null) {
throw new IllegalArgumentException("Parameter 'breakpoints' must not be null.");
}
int activeBreakpoints = 0;
breakpointBuilder.append(".sourcemode on\n");
breakpointBuilder.append(".echo\n");
breakpointBuilder.append(".echo \"Loading executable...\"\n");
breakpointBuilder.append(".echo\n");
breakpointBuilder.append("bc *\n");
breakpointBuilder.append(".onexerun .echo \"Launching executable...\"\n");
for (IBreakpoint breakpoint : breakpoints) {
try {
if (breakpoint.isEnabled()) {
LanguageBreakpoint assemberBreakpoint = (LanguageBreakpoint) breakpoint;
IMarker marker = breakpoint.getMarker();
String sourceFilePath = marker.getResource().getLocation().toOSString();
breakpointBuilder
.append("bp \"`" + sourceFilePath + ":" + assemberBreakpoint.getLineNumber() + "`\"\n");
activeBreakpoints++;
}
} catch (CoreException ex) {
throw new RuntimeException(ex);
}
}
return activeBreakpoints;
}
}

View File

@ -0,0 +1,32 @@
/**
* Copyright (C) 2009 - 2021 <a href="https://www.wudsn.com" target="_top">Peter Dell</a>
*
* This file is part of WUDSN IDE.
*
* WUDSN IDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* WUDSN IDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WUDSN IDE. If not, see <http://www.gnu.org/licenses/>.
*/
package com.wudsn.ide.lng.run.atari8;
import com.wudsn.ide.lng.runner.Runner;
/**
* Runner for Atar800Win.
*
* @author Peter Dell
* @since 1.7.0.
*/
public final class Atari800Win extends Runner {
}