Skip to content

Commit

Permalink
Initial import from SVN
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgRottensteiner committed Apr 18, 2017
0 parents commit 2da7079
Show file tree
Hide file tree
Showing 3,094 changed files with 265,123 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/C64Ass/bin/Debug
/C64Ass/obj/Debug
/C64Studio/bin/Debug
/C64Studio/obj/Debug
/TestProject/bin/Debug
/FastColoredTextBox/bin/Debug
/FastColoredTextBox/obj/Debug
/HexBox/bin/Debug
/HexBox/obj/Debug
/MediaManager/bin/Debug
/MediaManager/obj/Debug
/MediaTool/bin/Debug
/MediaTool/obj/Debug
/TestProject/obj/Debug
6 changes: 6 additions & 0 deletions C64Ass/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>

<supportedRuntime version="v2.0.50727"/></startup>
</configuration>
108 changes: 108 additions & 0 deletions C64Ass/ArgumentEvaluator.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.Text;



namespace C64Ass
{
class ArgumentEvaluator
{
GR.Text.ArgumentParser _Args = new GR.Text.ArgumentParser();

public ArgumentEvaluator()
{
// [options] [file]
_Args.AddSwitch( "H", true );
_Args.AddSwitch( "-HELP", true );
_Args.AddParameter( "O", true );
_Args.AddParameter( "-OUTFILE", true );
_Args.AddParameter( "L", true );
_Args.AddParameter( "-LABELDUMP", true );
_Args.AddParameter( "-FORMAT", true );
_Args.AddParameter( "F", true );
_Args.AddParameter( "-SETPC", true );
}



void WriteHelp()
{
System.Console.WriteLine( "Call with C64Ass [options] [file]" );
}



public C64Studio.Parser.CompileConfig CheckParams( string[] Args )
{
C64Studio.Parser.CompileConfig config = null;

if ( Args.Length == 0 )
{
WriteHelp();
return config;
}

if ( !_Args.CheckParameters( Args ) )
{
WriteHelp();
return config;
}

// last arg is filename?
if ( ( Args[Args.Length - 1].StartsWith( "-" ) )
|| ( Args[Args.Length - 1].StartsWith( "/" ) ) )
{
WriteHelp();
return config;
}

config = new C64Studio.Parser.CompileConfig();
config.InputFile = Args[Args.Length - 1];

if ( _Args.IsParameterSet( "O" ) )
{
config.OutputFile = _Args.Parameter( "O" );
}
if ( _Args.IsParameterSet( "OUTFILE" ) )
{
config.OutputFile = _Args.Parameter( "OUTFILE" );
}
if ( _Args.IsParameterSet( "L" ) )
{
config.LabelDumpFile = _Args.Parameter( "L" );
}
if ( _Args.IsParameterSet( "-LABELDUMP" ) )
{
config.LabelDumpFile = _Args.Parameter( "LABELDUMP" );
}

if ( ( _Args.IsParameterSet( "F" ) )
|| ( _Args.IsParameterSet( "-FORMAT" ) ) )
{
string outputFormat = _Args.IsParameterSet( "F" ) ? _Args.Parameter( "F" ) : _Args.Parameter( "-FORMAT" );

if ( string.Compare( outputFormat, "PLAIN", true ) == 0 )
{
config.TargetType = C64Studio.Types.CompileTargetType.PLAIN;
}
else if ( string.Compare( outputFormat, "CBM", true ) == 0 )
{
config.TargetType = C64Studio.Types.CompileTargetType.PRG;
}
}

if ( _Args.IsParameterSet( "-SETPC" ) )
{
int startPC = GR.Convert.ToI32( _Args.Parameter( "-SETPC" ) );
if ( ( startPC >= 0 )
&& ( startPC < 65536 ) )
{
config.StartAddress = startPC;
}
}
return config;
}

}
}
63 changes: 63 additions & 0 deletions C64Ass/C64Ass.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{060EC631-0065-45F1-AE91-5E39FE260337}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>C64Ass</RootNamespace>
<AssemblyName>C64Ass</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ArgumentEvaluator.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\C64Studio\C64Studio.csproj">
<Project>{5bea5ce5-4c5d-4ec5-83f3-83634e929858}</Project>
<Name>C64Studio</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
16 changes: 16 additions & 0 deletions C64Ass/CompileConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;



namespace C64Ass
{
public class CompileConfig
{
public string InputFile = "";
public string OutputFile = null;
public int StartAddress = -1;
public C64Studio.Types.CompileTargetType TargetType = C64Studio.Types.CompileTargetType.NONE;
}
}
69 changes: 69 additions & 0 deletions C64Ass/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
using C64Studio;
using C64Studio.Parser;
using System;
using System.Collections.Generic;
using System.Text;



namespace C64Ass
{
class Program
{
static int Main( string[] args )
{
var configReader = new ArgumentEvaluator();
var config = configReader.CheckParams( args );
if ( config == null )
{
return 1;
}
config.Assembler = C64Studio.Types.AssemblerType.C64_STUDIO;

var parser = new ASMFileParser();

var docInfo = new DocumentInfo()
{
Type = ProjectElement.ElementType.ASM_SOURCE
};

var projectConfig = new ProjectConfig();
// TODO - add defines if given

docInfo.DocumentFilename = System.IO.Path.GetFullPath( config.InputFile );

bool result = parser.ParseFile( docInfo, projectConfig, config );
if ( !result )
{
System.Console.WriteLine( "Parsing the file failed" );
return 1;
}

// default to plain
C64Studio.Types.CompileTargetType compileTargetType = C64Studio.Types.CompileTargetType.PLAIN;
// command line given target type overrides everything
if ( config.TargetType != C64Studio.Types.CompileTargetType.NONE )
{
compileTargetType = config.TargetType;
}
else if ( parser.CompileTarget != C64Studio.Types.CompileTargetType.NONE )
{
compileTargetType = parser.CompileTarget;
}
config.TargetType = compileTargetType;

if ( !parser.Assemble( config ) )
{
System.Console.WriteLine( "Assembling the output failed" );
return 1;
}

if ( !GR.IO.File.WriteAllBytes( config.OutputFile, parser.Assembly ) )
{
System.Console.WriteLine( "Failed to write output file" );
return 1;
}
return 0;
}
}
}
36 changes: 36 additions & 0 deletions C64Ass/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle( "C64Ass" )]
[assembly: AssemblyDescription( "" )]
[assembly: AssemblyConfiguration( "" )]
[assembly: AssemblyCompany( "" )]
[assembly: AssemblyProduct( "C64Ass" )]
[assembly: AssemblyCopyright( "Copyright © 2016" )]
[assembly: AssemblyTrademark( "" )]
[assembly: AssemblyCulture( "" )]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible( false )]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid( "88fb7a10-8dfe-427a-8c0e-300dc86f6a3a" )]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "1.0.0.0" )]
[assembly: AssemblyFileVersion( "1.0.0.0" )]
4 changes: 4 additions & 0 deletions C64Ass/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge" version="2.14.1208" targetFramework="net45" />
</packages>
60 changes: 60 additions & 0 deletions C64Studio.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C64Studio", "C64Studio\C64Studio.csproj", "{5BEA5CE5-4C5D-4EC5-83F3-83634E929858}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexBox", "HexBox\HexBox.csproj", "{EA74431C-8749-4F1A-8F8F-FCEDAFAE89B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaManager", "MediaManager\MediaManager.csproj", "{0718AAF4-1991-4BA1-A060-476767A30E93}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastColoredTextBox", "FastColoredTextBox\FastColoredTextBox.csproj", "{6DD14A85-CCFC-4774-BD26-0F5772512319}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaTool", "MediaTool\MediaTool.csproj", "{DFC77808-2D96-4DFE-8B35-5108E864A325}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject", "TestProject\TestProject.csproj", "{6AAC13D8-50DE-4199-B331-063516E8F333}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C64Ass", "C64Ass\C64Ass.csproj", "{060EC631-0065-45F1-AE91-5E39FE260337}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B80F7D3F-F7FA-49FA-BCEB-63A99D5760F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5BEA5CE5-4C5D-4EC5-83F3-83634E929858}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BEA5CE5-4C5D-4EC5-83F3-83634E929858}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BEA5CE5-4C5D-4EC5-83F3-83634E929858}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BEA5CE5-4C5D-4EC5-83F3-83634E929858}.Release|Any CPU.Build.0 = Release|Any CPU
{EA74431C-8749-4F1A-8F8F-FCEDAFAE89B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA74431C-8749-4F1A-8F8F-FCEDAFAE89B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA74431C-8749-4F1A-8F8F-FCEDAFAE89B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA74431C-8749-4F1A-8F8F-FCEDAFAE89B9}.Release|Any CPU.Build.0 = Release|Any CPU
{0718AAF4-1991-4BA1-A060-476767A30E93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0718AAF4-1991-4BA1-A060-476767A30E93}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0718AAF4-1991-4BA1-A060-476767A30E93}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0718AAF4-1991-4BA1-A060-476767A30E93}.Release|Any CPU.Build.0 = Release|Any CPU
{6DD14A85-CCFC-4774-BD26-0F5772512319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DD14A85-CCFC-4774-BD26-0F5772512319}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DD14A85-CCFC-4774-BD26-0F5772512319}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DD14A85-CCFC-4774-BD26-0F5772512319}.Release|Any CPU.Build.0 = Release|Any CPU
{DFC77808-2D96-4DFE-8B35-5108E864A325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFC77808-2D96-4DFE-8B35-5108E864A325}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFC77808-2D96-4DFE-8B35-5108E864A325}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFC77808-2D96-4DFE-8B35-5108E864A325}.Release|Any CPU.Build.0 = Release|Any CPU
{6AAC13D8-50DE-4199-B331-063516E8F333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AAC13D8-50DE-4199-B331-063516E8F333}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AAC13D8-50DE-4199-B331-063516E8F333}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AAC13D8-50DE-4199-B331-063516E8F333}.Release|Any CPU.Build.0 = Release|Any CPU
{060EC631-0065-45F1-AE91-5E39FE260337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{060EC631-0065-45F1-AE91-5E39FE260337}.Debug|Any CPU.Build.0 = Debug|Any CPU
{060EC631-0065-45F1-AE91-5E39FE260337}.Release|Any CPU.ActiveCfg = Release|Any CPU
{060EC631-0065-45F1-AE91-5E39FE260337}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading

0 comments on commit 2da7079

Please sign in to comment.