Skip to content

Commit a0bf700

Browse files
committed
Initial Push from local VS
0 parents  commit a0bf700

38 files changed

+5249
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArduinoFloppyReader", "ArduinoFloppyReader\ArduinoFloppyReader.vcxproj", "{17585290-34DC-42A1-9747-37198CE4AD1A}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArduinoFloppyReaderWin", "ArduinoFloppyReaderWin\ArduinoFloppyReaderWin.vcxproj", "{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Debug|x64.ActiveCfg = Debug|x64
19+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Debug|x64.Build.0 = Debug|x64
20+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Debug|x86.ActiveCfg = Debug|Win32
21+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Debug|x86.Build.0 = Debug|Win32
22+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Release|x64.ActiveCfg = Release|x64
23+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Release|x64.Build.0 = Release|x64
24+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Release|x86.ActiveCfg = Release|Win32
25+
{17585290-34DC-42A1-9747-37198CE4AD1A}.Release|x86.Build.0 = Release|Win32
26+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Debug|x64.ActiveCfg = Debug|x64
27+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Debug|x64.Build.0 = Debug|x64
28+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Debug|x86.ActiveCfg = Debug|Win32
29+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Debug|x86.Build.0 = Debug|Win32
30+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Release|x64.ActiveCfg = Release|x64
31+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Release|x64.Build.0 = Release|x64
32+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Release|x86.ActiveCfg = Release|Win32
33+
{37EEB775-8CC2-40F8-A3CD-40C955E11F0F}.Release|x86.Build.0 = Release|Win32
34+
EndGlobalSection
35+
GlobalSection(SolutionProperties) = preSolution
36+
HideSolutionNode = FALSE
37+
EndGlobalSection
38+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{17585290-34DC-42A1-9747-37198CE4AD1A}</ProjectGuid>
23+
<Keyword>Win32Proj</Keyword>
24+
<RootNamespace>ArduinoFloppyReader</RootNamespace>
25+
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
26+
<ProjectName>ArduinoFloppyReader</ProjectName>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v141</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v141</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v141</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v141</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
77+
<LinkIncremental>true</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
80+
<LinkIncremental>false</LinkIncremental>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
83+
<LinkIncremental>false</LinkIncremental>
84+
</PropertyGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
86+
<ClCompile>
87+
<PrecompiledHeader>Use</PrecompiledHeader>
88+
<WarningLevel>Level3</WarningLevel>
89+
<Optimization>Disabled</Optimization>
90+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
91+
<SDLCheck>false</SDLCheck>
92+
</ClCompile>
93+
<Link>
94+
<SubSystem>Console</SubSystem>
95+
<GenerateDebugInformation>true</GenerateDebugInformation>
96+
</Link>
97+
</ItemDefinitionGroup>
98+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
99+
<ClCompile>
100+
<PrecompiledHeader>Use</PrecompiledHeader>
101+
<WarningLevel>Level3</WarningLevel>
102+
<Optimization>Disabled</Optimization>
103+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
104+
<SDLCheck>true</SDLCheck>
105+
</ClCompile>
106+
<Link>
107+
<SubSystem>Console</SubSystem>
108+
<GenerateDebugInformation>true</GenerateDebugInformation>
109+
</Link>
110+
</ItemDefinitionGroup>
111+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
112+
<ClCompile>
113+
<WarningLevel>Level3</WarningLevel>
114+
<PrecompiledHeader>Use</PrecompiledHeader>
115+
<Optimization>MaxSpeed</Optimization>
116+
<FunctionLevelLinking>true</FunctionLevelLinking>
117+
<IntrinsicFunctions>true</IntrinsicFunctions>
118+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119+
<SDLCheck>true</SDLCheck>
120+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
121+
</ClCompile>
122+
<Link>
123+
<SubSystem>Console</SubSystem>
124+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
125+
<OptimizeReferences>true</OptimizeReferences>
126+
<GenerateDebugInformation>true</GenerateDebugInformation>
127+
</Link>
128+
</ItemDefinitionGroup>
129+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
130+
<ClCompile>
131+
<WarningLevel>Level3</WarningLevel>
132+
<PrecompiledHeader>Use</PrecompiledHeader>
133+
<Optimization>MaxSpeed</Optimization>
134+
<FunctionLevelLinking>true</FunctionLevelLinking>
135+
<IntrinsicFunctions>true</IntrinsicFunctions>
136+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
137+
<SDLCheck>true</SDLCheck>
138+
</ClCompile>
139+
<Link>
140+
<SubSystem>Console</SubSystem>
141+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
142+
<OptimizeReferences>true</OptimizeReferences>
143+
<GenerateDebugInformation>true</GenerateDebugInformation>
144+
</Link>
145+
</ItemDefinitionGroup>
146+
<ItemGroup>
147+
<ClInclude Include="..\lib\ADFWriter.h" />
148+
<ClInclude Include="..\lib\ArduinoInterface.h" />
149+
<ClInclude Include="..\lib\phaseAnalyser.h" />
150+
<ClInclude Include="stdafx.h" />
151+
<ClInclude Include="targetver.h" />
152+
</ItemGroup>
153+
<ItemGroup>
154+
<ClCompile Include="..\lib\ADFWriter.cpp" />
155+
<ClCompile Include="..\lib\ArduinoInterface.cpp" />
156+
<ClCompile Include="..\lib\phaseAnalyser.cpp" />
157+
<ClCompile Include="Main.cpp" />
158+
<ClCompile Include="stdafx.cpp">
159+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
160+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
161+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
162+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
163+
</ClCompile>
164+
</ItemGroup>
165+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
166+
<ImportGroup Label="ExtensionTargets">
167+
</ImportGroup>
168+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClInclude Include="stdafx.h">
19+
<Filter>Header Files</Filter>
20+
</ClInclude>
21+
<ClInclude Include="targetver.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
<ClInclude Include="..\lib\ADFWriter.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="..\lib\ArduinoInterface.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
<ClInclude Include="..\lib\phaseAnalyser.h">
31+
<Filter>Header Files</Filter>
32+
</ClInclude>
33+
</ItemGroup>
34+
<ItemGroup>
35+
<ClCompile Include="stdafx.cpp">
36+
<Filter>Source Files</Filter>
37+
</ClCompile>
38+
<ClCompile Include="Main.cpp">
39+
<Filter>Source Files</Filter>
40+
</ClCompile>
41+
<ClCompile Include="..\lib\ADFWriter.cpp">
42+
<Filter>Source Files</Filter>
43+
</ClCompile>
44+
<ClCompile Include="..\lib\ArduinoInterface.cpp">
45+
<Filter>Source Files</Filter>
46+
</ClCompile>
47+
<ClCompile Include="..\lib\phaseAnalyser.cpp">
48+
<Filter>Source Files</Filter>
49+
</ClCompile>
50+
</ItemGroup>
51+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
4+
<LocalDebuggerCommandArguments>5 "c:\\users\\djrob\\desktop\\output2.adf"</LocalDebuggerCommandArguments>
5+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
6+
</PropertyGroup>
7+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/* ArduinoFloppyReader
2+
*
3+
* Copyright (C) 2017 Robert Smith (@RobSmithDev)
4+
* http://amiga.robsmithdev.co.uk
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Library General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Library General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Library General Public
17+
* License along with this program; if not see http://www.gnu.org/licenses/
18+
*/
19+
20+
//////////////////////////////////////////////////////////////////////////////////////////
21+
// Example console application for reading floppy drives //
22+
//////////////////////////////////////////////////////////////////////////////////////////
23+
24+
25+
#include "stdafx.h"
26+
#include <windows.h>
27+
#include "..\lib\ADFWriter.h"
28+
29+
using namespace ArduinoFloppyReader;
30+
31+
ADFWriter writer;
32+
33+
int wmain(int argc, wchar_t* argv[], wchar_t *envp[])
34+
{
35+
printf("Arduino Amiga Floppydisk Reader, Copyright (C) 2017 Robert Smith\r\n");
36+
printf("Full sourcecode and documentation at http://amiga.robsmithdev.co.uk\r\n");
37+
printf("This is free software licenced under the GNU General Public Licence V3\r\n\r\n");
38+
39+
if (argc < 3) {
40+
printf("Usage:\r\n");
41+
printf("ArduinoFloppyReader COMPORT OutputFilename.ADF\r\n\r\n");
42+
return 0;
43+
}
44+
45+
writer.openDevice(_wtoi(argv[1]));
46+
if (writer.analyseDisk([](int progress) -> bool {
47+
printf("\rAnalysing Disk. %i %% complete", progress);
48+
return true;
49+
}
50+
) == AnalysisResult::arComplete)
51+
{
52+
53+
ADFResult result = writer.writeADF(argv[2], 80, [](const int currentTrack, const DiskSurface currentSide, const int retryCounter, const int sectorsFound, const int badSectorsFound) ->WriteResponse {
54+
if (retryCounter > 15) {
55+
char input;
56+
do {
57+
printf("\rDisk has checksum errors/missing data. [R]etry, [I]gnore, [A]bort? ");
58+
input = toupper(getchar());
59+
} while ((input != 'R') && (input != 'I') && (input != 'A'));
60+
switch (input) {
61+
case 'R': break;
62+
case 'I': return WriteResponse::wrSkipBadChecksums;
63+
case 'A': return WriteResponse::wrAbort;
64+
}
65+
}
66+
printf("\rReading Track %i, %s side (retry: %i) - Got %i/11 sectors (%i bad found) ", currentTrack, (currentSide == DiskSurface::dsUpper) ? "Upper" : "Lower", retryCounter, sectorsFound, badSectorsFound);
67+
return WriteResponse::wrContinue;
68+
});
69+
70+
switch (result) {
71+
case adfrComplete: printf("\rADF file created with valid checksums. "); break;
72+
case adfrAborted: printf("\rADF file aborted. "); break;
73+
case adfrFileError: printf("\rError creating ADF file. "); break;
74+
case adfrFileIOError: printf("\rError writing to ADF file. "); break;
75+
case adfrCompletedWithErrors: printf("\rADF file created with partial success. "); break;
76+
case adfrDriveError: printf("\rError communicating with the Arduino interface. "); break;
77+
}
78+
}
79+
else printf("\r\n\r\nError reading disk!\r\n");
80+
writer.closeDevice();
81+
82+
83+
getchar();
84+
return 0;
85+
}
86+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// stdafx.cpp : source file that includes just the standard includes
2+
// ArduinoFloppyReader.pch will be the pre-compiled header
3+
// stdafx.obj will contain the pre-compiled type information
4+
5+
#include "stdafx.h"
6+
7+
// TODO: reference any additional headers you need in STDAFX.H
8+
// and not in this file

0 commit comments

Comments
 (0)