Skip to content

Commit

Permalink
Initial commit of modified VisualNQC codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mesheets committed Feb 28, 2020
1 parent 93bd97a commit 6e3ca3c
Show file tree
Hide file tree
Showing 427 changed files with 54,079 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# VisualNQC
An iconic language to for the Lego MindStorms RCX, which generates NQC code. Support is included to facilitate integrating the NQC compilation and deployment processes. (This project was formerly known as fUNSoftWare.)

This has personally been one of the more intriguing software finds for the RCX.

Only one release and version of the source code were posted to the original [SourceForge project site](http://funsoftware.sourceforge.net/).
Over the intervening period before republishing here, I have updated the project follows, but these updates never saw any response upstream.
The earliest patches were posted to SourceForge [here](https://sourceforge.net/p/funsoftware/patches/1/).

In particular, these modifications include the following:
* Fixed bug preventing creation of arithmetic conditions (branch, loop) inside global event monitors
* Enabled use of non-USB IR towers by checking the RCXTTY environment variable before defaulting to USB
* Changed default file writes (e.g. config.txt, intermediate NQC code file) to occur under the user's directory to resolve permissions issues
* Updated check in Windows for whether to use command.com or cmd.exe
* Added a "Device" menu (for potential future enhancement; for now, is set to RCX2)
* Modularized some property values into an AppProperties class
* Changed window layout to increase the programming area; added UNSW CSE logo and URL to the about dialog
* Updated GUI to be able resize well to other screen sizes; removed the manual screen resizing code and reworked the code to use components with built-in resizing capabilities.

Development currently seems to work best with NetBeans IDE 8.2.


----------------
----- fUNSoftWare -----
----------------
Expand Down
73 changes: 73 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="VisualNQC" default="default" basedir=".">
<description>Builds, tests, and runs the project VisualNQC.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="VisualNQC-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
229 changes: 229 additions & 0 deletions doc/flash_presentation/funTutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
<html>
<head>
<!-- saved from url=(0025)http://www.techsmith.com/ -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Created by Camtasia Studio 3</title>
<script language="JavaScript" type="text/javascript">
<!--
var requiredMajorVersion = 7;
var requiredMinorVersion = 0;
var requiredRevision = 0;
var jsVersion = 1.0;
// -->
</script>

<script language="VBScript" type="text/vbscript">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0

set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable("$version")
end if
VBGetSwfVer = swVersion
End Function
// -->
</script>

<script language="JavaScript1.1" type="text/javascript">
<!--

// Detect Client Browser type
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

jsVersion = 1.1;

// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i)
{
// NS/Opera version >= 3 check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0)
{
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
{
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;

descArray = flashDescription.split(" ");
tempArrayMajor = descArray[2].split(".");
versionMajor = tempArrayMajor[0];
versionMinor = tempArrayMajor[1];

if ( descArray[3] != "" )
{
tempArrayMinor = descArray[3].split("r");
}
else
{
tempArrayMinor = descArray[4].split("r");
}

versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
else
{
flashVer = -1;
}
}
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1)
flashVer = 4; // MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1)
flashVer = 3; // WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1)
flashVer = 2; // older WebTV supports Flash 2
else
flashVer = -1; // Can't detect in all other cases

return flashVer;
}

// If called with no parameters this function returns a floating point value
// which should be the version of the Flash Player or 0.0
// ex: Flash Player 7r14 returns 7.14
// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer( reqMajorVer, reqMinorVer, reqRevision )
{
reqVer = parseFloat(reqMajorVer + "." + reqRevision);
// loop backwards through the versions until we find the newest version
for (i=25;i>0;i--)
{
if (isIE && isWin && !isOpera)
{
versionStr = VBGetSwfVer(i);
}
else
{
versionStr = JSGetSwfVer(i);
}
if (versionStr == -1 )
{
return false;
}
else if (versionStr != 0)
{
if(isIE && isWin && !isOpera)
{
tempArray = versionStr.split(" ");
tempString = tempArray[1];
versionArray = tempString .split(",");
}
else
{
versionArray = versionStr.split(".");
}

versionMajor = versionArray[0];
versionMinor = versionArray[1];
versionRevision = versionArray[2];

versionString = versionMajor + "." + versionRevision; // 7.0r24 == 7.24
versionNum = parseFloat(versionString);

// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) )
return true;
else
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
return (reqVer ? false : 0.0);
}
// -->
</script>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<script language="JavaScript" type="text/javascript">

<!--
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if( hasRightVersion )
{
var BodyTop = '<body >'
+ '<table border="0" cellpadding="0" align="center" width="1020">'
+ ' <tr> '
+ ' <td >';

var oeTags = '<object id ="flashMovie"'
+ 'codeBase ="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"'
+ 'height ="791"'
+ 'width ="1020"'
+ 'classid ="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>'
+ '<PARAM NAME="FlashVars" VALUE="csConfigFile=funTutorial_config.xml&csColor=FFFFFF&csPreloader=funTutorial_preload.swf"/>'
+ '<PARAM NAME="Movie" VALUE="funTutorial_controller.swf"/>'
+ '<PARAM NAME="WMode" VALUE="Window"/>'
+ '<PARAM NAME="Quality" VALUE="best"/>'
+ '<PARAM NAME="SAlign" VALUE="TL"/>'
+ '<PARAM NAME="Menu" VALUE="FALSE"/>'
+ '<PARAM NAME="BGColor" VALUE="FFFFFF"/>'
+ '<EMBED id ="EmbedflashMovie"'
+ ' flashvars ="csConfigFile=funTutorial_config.xml&csColor=FFFFFF&csPreloader=funTutorial_preload.swf"'
+ ' src ="funTutorial_controller.swf"'
+ ' quality ="best"'
+ ' bgcolor ="FFFFFF"'
+ ' width ="1020"'
+ ' height ="791"'
+ ' pluginspace ="http://www.macromedia.com/go/getflashplayer" >'
+ '<\/EMBED>'
+ '<\/OBJECT>';

document.write(BodyTop);
document.write(oeTags);
}
else
{
var BodyTop = '<body style="background-color:#CCCCCC" >'
+ '<table border="0" cellpadding="0" align="center" width="1020">'
+ ' <tr> '
+ ' <td >';

// flash is too old or we can't detect the plugin
var alternateContent = '<div align="center"><img src="funTutorial_nofp_bg.gif" width="293" height="280"></div>'
+ '<div align="center">'
+ '<p style="width: 250px;font-family:Arial, Helvetica, sans-serif;font-size: x-small;color: #003300;margin-top: -200px;text-align:left;">The Camtasia Studio video content presented here requires the latest version of the Macromedia Flash Player. Please update your version of this free player by'
+ '&nbsp; <a href="http://www.macromedia.com/go/getflashplayer" target="_blank">downloading here</a>.</p></div>'

document.write(alternateContent); // insert non-flash content
document.write(BodyTop); // insert non-flash content
}
// -->
</script>
<noscript>
<object id ="flashMovie"
codeBase ="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
height ="791"
width ="1020"
classid ="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
<PARAM NAME="FlashVars" VALUE="csConfigFile=funTutorial_config.xml&csColor=FFFFFF&csPreloader=funTutorial_preload.swf">
<PARAM NAME="Movie" VALUE="funTutorial_controller.swf">
<PARAM NAME="WMode" VALUE="Window">
<PARAM NAME="Quality" VALUE="best">
<PARAM NAME="SAlign" VALUE="TL">
<PARAM NAME="Menu" VALUE="FALSE">
<PARAM NAME="BGColor" VALUE="FFFFFF">
<EMBED id ="EmbedflashMovie"
flashvars ="csConfigFile=funTutorial_config.xml&csColor=FFFFFF&csPreloader=funTutorial_preload.swf"
src ="funTutorial_controller.swf"
quality ="best"
bgcolor ="FFFFFF"
width ="1020"
height ="791"
pluginspace ="http://www.macromedia.com/go/getflashplayer" >
</EMBED>
</OBJECT>
</noscript>
</td>
</tr>
</table>
</body>
</html>
Binary file added doc/flash_presentation/funTutorial.swf
Binary file not shown.
Loading

0 comments on commit 6e3ca3c

Please sign in to comment.