Subversion Repositories ht46f47_simulator

Compare Revisions

No changes between revisions

Regard whitespace Rev 1 → Rev 2

/trunk/HT46F47.pas
0,0 → 1,552
unit HT46F47;
 
interface
 
type
Nibble = 0..15;
 
TRom = array[0..$FF] of byte;
 
THT46F47 = class(TObject)
strict private
procedure WaitMs(milliseconds: integer);
strict protected
// ROM
// Registers
FPC: byte;
FReturnAddress: byte;
FPage: Nibble;
FRegA: Nibble;
FRegB: Nibble;
FRegC: Nibble;
FRegD: Nibble;
FCalledOnce: boolean;
// In
FS1: boolean;
FS2: boolean;
FDIn: Nibble;
FAD1: Nibble;
FAD2: Nibble;
// Out
FPWM: Nibble;
FPortOut: Nibble;
public
// ROM
ROM: TRom;
property FROM: TRom read ROM;
// Registers
property PC: byte read FPC;
property ReturnAddress: byte read FReturnAddress;
property Page: Nibble read FPage;
property RegA: Nibble read FRegA;
property RegB: Nibble read FRegB;
property RegC: Nibble read FRegC;
property RegD: Nibble read FRegD;
// In
property S1: boolean read FS1 write FS1;
property S2: boolean read FS2 write FS2;
property DIn: Nibble read FDIn write FDIn;
property AD1: Nibble read FAD1 write FAD1;
property AD2: Nibble read FAD2 write FAD2;
// Out
property PWM: Nibble read FPWM;
property PortOut: Nibble read FPortOut;
// Functions
constructor Create;
procedure Step;
procedure Reset;
end;
 
implementation
 
uses
SysUtils, Forms;
 
{ THT46F47 }
 
constructor THT46F47.Create;
var
i: integer;
begin
for i := Low(FROM) to High(FROM) do
begin
ROM[i] := $00;
end;
Reset;
end;
 
procedure THT46F47.Reset;
begin
// Internal
FPC := 0;
FReturnAddress := 0;
FPage := 0;
FRegA := 0; // Note: The registers don't seem to be reset in the actual chip, if a "soft reset" is done
FRegB := 0;
FRegC := 0;
FRegD := 0;
FCalledOnce := false;
// In
FS1 := false;
FS2 := false;
FDIn := 0;
FAD1 := 0;
FAD2 := 0;
// Out
FPWM := 0;
FPortOut := 0;
end;
 
procedure THT46F47.Step;
var
Instruction: byte;
ProgramCounterNext: Byte;
ProgramCounterCurrent: Byte;
begin
Instruction := FROM[FPC];
 
ProgramCounterCurrent := FPC;
ProgramCounterNext := FPC+1;
 
try
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
10 LED 0000 PORT 0
11 LED 0001 PORT 1
12 LED 0010 PORT 2
13 LED 0011 PORT 3
14 LED 0100 PORT 4
15 LED 0101 PORT 5
16 LED 0110 PORT 6
17 LED 0111 PORT 7
18 LED 1000 PORT 8
19 LED 1001 PORT 9
1A LED 1010 PORT 10
1B LED 1011 PORT 11
1C LED 1100 PORT 12
1D LED 1101 PORT 13
1E LED 1110 PORT 14
1F LED 1111 PORT 15
*)
if (Instruction >= $10) and (Instruction <= $1F) then
begin
FPortOut := Instruction and $F;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
20 WAIT 1ms
21 WAIT 2ms
22 WAIT 5ms
23 WAIT 10ms
24 WAIT 20ms
25 WAIT 50ms
26 WAIT 100ms
27 WAIT 200ms
28 WAIT 500ms
29 WAIT 1s
2A WAIT 2s
2B WAIT 5s
2C WAIT 10s
2D WAIT 20s
2E WAIT 30s
2F WAIT 60s
*)
case Instruction of
$20: WaitMs(1); // WAIT 1ms
$21: WaitMs(2); // WAIT 2ms
$22: WaitMs(5); // WAIT 5ms
$23: WaitMs(10); // WAIT 10ms
$24: WaitMs(20); // WAIT 20ms
$25: WaitMs(50); // WAIT 50ms
$26: WaitMs(100); // WAIT 100ms
$27: WaitMs(200); // WAIT 200ms
$28: WaitMs(500); // WAIT 500ms
$29: WaitMs(1000); // WAIT 1s
$2A: WaitMs(2000); // WAIT 2s
$2B: WaitMs(5000); // WAIT 5s
$2C: WaitMs(10000); // WAIT 10s
$2D: WaitMs(20000); // WAIT 20s
$2E: WaitMs(30000); // WAIT 30s
$2F: WaitMs(60000); // WAIT 60s
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
30 JUMP -0 HALT
31 JUMP -1
32 JUMP -2
33 JUMP -3
34 JUMP -4
35 JUMP -5
36 JUMP -6
37 JUMP -7
38 JUMP -8
39 JUMP -9
3A JUMP -10
3B JUMP -11
3C JUMP -12
3D JUMP -13
3E JUMP -14
3F JUMP -15
*)
if (Instruction >= $30) and (Instruction <= $3F) then
begin
ProgramCounterNext := ProgramCounterCurrent - (Instruction and $F);
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
40 SET A=0
41 SET A=1
42 SET A=2
43 SET A=3
44 SET A=4
45 SET A=5
46 SET A=6
47 SET A=7
48 SET A=8
49 SET A=9
4A SET A=10
4B SET A=11
4C SET A=12
4D SET A=13
4E SET A=14
4F SET A=15
*)
if (Instruction >= $40) and (Instruction <= $4F) then
begin
FRegA := Instruction and $F;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
50
51 SET B=A
52 SET C=A
53 SET D=A
54 SET Dout=A
55 SET Dout.0=A.0
56 SET Dout.1=A.0
57 SET Dout.2=A.0
58 SET Dout.3=A.0
59 SET PWM=A
5A
5B
5C
5D
5E
5F
*)
case Instruction of
$51: FRegB := FRegA; // SET B=A
$52: FRegC := FRegA; // SET C=A
$53: FRegD := FRegA; // SET D=A
$54: FPortOut := FRegA; // SET Dout=A
$55: FPortOut := ((FRegA and 1) shl 0) + (PortOut and 14); // SET Dout.0=A.0
$56: FPortOut := ((FRegA and 1) shl 1) + (PortOut and 13); // SET Dout.1=A.0
$57: FPortOut := ((FRegA and 1) shl 2) + (PortOut and 11); // SET Dout.2=A.0
$58: FPortOut := ((FRegA and 1) shl 3) + (PortOut and 7); // SET Dout.3=A.0
$59: FPWM := FRegA; // SET PWM=A
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
60
61 SET A=B
62 SET A=C
63 SET A=D
64 SET A=Din
65 SET A=Din.0
66 SET A=Din.1
67 SET A=Din.2
68 SET A=Din.3
69 SET A=AD1
6A SET A=AD2
6B
6C
6D
6E
6F
*)
case Instruction of
$61: FRegA := FRegB; // SET A=B
$62: FRegA := FRegC; // SET A=C
$63: FRegA := FRegD; // SET A=D
$64: FRegA := DIn; // SET A=Din
$65: FRegA := (DIn and 1) shr 0; // SET A=Din.0
$66: FRegA := (DIn and 2) shr 1; // SET A=Din.1
$67: FRegA := (DIn and 4) shr 1; // SET A=Din.2
$68: FRegA := (DIn and 8) shr 1; // SET A=Din.3
$69: FRegA := AD1;
$6A: FRegA := AD2;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
70
71 SET A=A+1
72 SET A=A-1
73 SET A=A+B
74 SET A=A-B
75 SET A=A*B
76 SET A=A/B
77 SET A=A&B AND
78 SET A=A|B OR
79 SET A=A^B XOR
7A SET A=~A NOT
7B
7C
7D
7E
7F
*)
case Instruction of
$71: FRegA := FRegA + 1; // SET A=A+1
$72: FRegA := FRegA - 1; // SET A=A-1
$73: FRegA := FRegA + FRegB; // SET A=A+B
$74: FRegA := FRegA - FRegB; // SET A=A-B
$75: FRegA := FRegA * FRegB; // SET A=A*B
$76: begin
if FRegB = 0 then
FRegA := $F // this is the actual behavior of the microchip (program 40 51 45 76 54 30)
else
FRegA := FRegA div FRegB; // SET A=A/B
end;
$77: FRegA := FRegA and FRegB; // SET A=A&B AND
$78: FRegA := FRegA or FRegB; // SET A=A|B OR
$79: FRegA := FRegA xor FRegB; // SET A=A^B XOR
$7A: FRegA := not FRegA; // SET A=~A NOT
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
80 PAGE 0 Page is used by JUMP, CALL, CTIMES and DTIMES
81 PAGE 1
82 PAGE 2
83 PAGE 3
84 PAGE 4
85 PAGE 5
86 PAGE 6
87 PAGE 7
88 PAGE 8
89 PAGE 9
8A PAGE A
8B PAGE B
8C PAGE C
8D PAGE D
8E PAGE E
8F PAGE F
*)
if (Instruction >= $80) and (Instruction <= $8F) then
begin
FPage := Instruction and $F;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
90 JUMP <PAGE>0
91 JUMP <PAGE>1
92 JUMP <PAGE>2
93 JUMP <PAGE>3
94 JUMP <PAGE>4
95 JUMP <PAGE>5
96 JUMP <PAGE>6
97 JUMP <PAGE>7
98 JUMP <PAGE>8
99 JUMP <PAGE>9
9A JUMP <PAGE>A
9B JUMP <PAGE>B
9C JUMP <PAGE>C
9D JUMP <PAGE>D
9E JUMP <PAGE>E
9F JUMP <PAGE>F
*)
if (Instruction >= $90) and (Instruction <= $9F) then
begin
ProgramCounterNext := (FPage shl 4) + (Instruction and $F);
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
A0 CTIMES <PAGE>0 IF C>0 THEN ( C=C-1 ; JUMP <PAGE>X ) ELSE CONTINUE
A1 CTIMES <PAGE>1
A2 CTIMES <PAGE>2
A3 CTIMES <PAGE>3
A4 CTIMES <PAGE>4
A5 CTIMES <PAGE>5
A6 CTIMES <PAGE>6
A7 CTIMES <PAGE>7
A8 CTIMES <PAGE>8
A9 CTIMES <PAGE>9
AA CTIMES <PAGE>A
AB CTIMES <PAGE>B
AC CTIMES <PAGE>C
AD CTIMES <PAGE>D
AE CTIMES <PAGE>E
AF CTIMES <PAGE>F
*)
if (Instruction >= $A0) and (Instruction <= $AF) then
begin
if FRegC > 0 then
begin
Dec(FRegC);
FReturnAddress := ProgramCounterCurrent;
ProgramCounterNext := (FPage shl 4) + (Instruction and $F);
end;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
B0 DTIMES <PAGE>0 IF D>0 THEN ( D=D-1 ; JUMP <PAGE>X ) ELSE CONTINUE
B1 DTIMES <PAGE>1
B2 DTIMES <PAGE>2
B3 DTIMES <PAGE>3
B4 DTIMES <PAGE>4
B5 DTIMES <PAGE>5
B6 DTIMES <PAGE>6
B7 DTIMES <PAGE>7
B8 DTIMES <PAGE>8
B9 DTIMES <PAGE>9
BA DTIMES <PAGE>A
BB DTIMES <PAGE>B
BC DTIMES <PAGE>C
BD DTIMES <PAGE>D
BE DTIMES <PAGE>E
BF DTIMES <PAGE>F
*)
if (Instruction >= $B0) and (Instruction <= $BF) then
begin
if FRegD > 0 then
begin
Dec(FRegD);
FReturnAddress := ProgramCounterCurrent;
ProgramCounterNext := (FPage shl 4) + (Instruction and $F);
end;
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
C0
C1 SKIP_IF A>B
C2 SKIP_IF A<B
C3 SKIP_IF A=B
C4 SKIP_IF Din.0=1
C5 SKIP_IF Din.1=1
C6 SKIP_IF Din.2=1
C7 SKIP_IF Din.3=1
C8 SKIP_IF Din.0=0
C9 SKIP_IF Din.1=0
CA SKIP_IF Din.2=0
CB SKIP_IF Din.3=0
CC SKIP_IF S1=0
CD SKIP_IF S2=0
CE SKIP_IF S1=1
CF SKIP_IF S2=1
*)
case Instruction of
$C1: if FRegA > FRegB then Inc(ProgramCounterNext);
$C2: if FRegA < FRegB then Inc(ProgramCounterNext);
$C3: if FRegA = FRegB then Inc(ProgramCounterNext);
$C4: if ((Din and 1) shr 0) = 1 then Inc(ProgramCounterNext);
$C5: if ((Din and 2) shr 1) = 1 then Inc(ProgramCounterNext);
$C6: if ((Din and 4) shr 2) = 1 then Inc(ProgramCounterNext);
$C7: if ((Din and 8) shr 3) = 1 then Inc(ProgramCounterNext);
$C8: if ((Din and 1) shr 0) = 0 then Inc(ProgramCounterNext);
$C9: if ((Din and 2) shr 1) = 0 then Inc(ProgramCounterNext);
$CA: if ((Din and 4) shr 2) = 0 then Inc(ProgramCounterNext);
$CB: if ((Din and 8) shr 3) = 0 then Inc(ProgramCounterNext);
$CC: if S1 = false then Inc(ProgramCounterNext);
$CD: if S2 = false then Inc(ProgramCounterNext);
$CE: if S1 = true then Inc(ProgramCounterNext);
$CF: if S2 = true then Inc(ProgramCounterNext);
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
D0 CALL <PAGE>0
D1 CALL <PAGE>1
D2 CALL <PAGE>2
D3 CALL <PAGE>3
D4 CALL <PAGE>4
D5 CALL <PAGE>5
D6 CALL <PAGE>6
D7 CALL <PAGE>7
D8 CALL <PAGE>8
D9 CALL <PAGE>9
DA CALL <PAGE>A
DB CALL <PAGE>B
DC CALL <PAGE>C
DD CALL <PAGE>D
DE CALL <PAGE>E
DF CALL <PAGE>F
*)
if (Instruction >= $D0) and (Instruction <= $DF) then
begin
FCalledOnce := true;
FReturnAddress := ProgramCounterNext;
ProgramCounterNext := (FPage shl 4) + (Instruction and $F)
end;
 
(*
----------------------------------------------------
Code Assembly Alternative Comment
----------------------------------------------------
E0 RET
*)
if Instruction = $E0 then
begin
if not FCalledOnce then
begin
// "Freeze" is the behavior of the actual chip (see test program 41 54 27 42 54 27 E0 7A 27 54 33)
ProgramCounterNext := ProgramCounterCurrent;
end
else
begin
ProgramCounterNext := FReturnAddress;
end;
end;
finally
FPC := ProgramCounterNext;
end;
end;
 
procedure THT46F47.WaitMs(milliseconds: integer);
var
i: integer;
begin
for i := 0 to milliseconds div 10 do
begin
Sleep(10);
Application.ProcessMessages;
if Application.Terminated then break;
end;
end;
 
end.
/trunk/HT46F47Sim.dpr
0,0 → 1,15
program HT46F47Sim;
 
uses
Vcl.Forms,
MainForm in 'MainForm.pas' {Form2},
HT46F47 in 'HT46F47.pas';
 
{$R *.res}
 
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
/trunk/HT46F47Sim.dproj
0,0 → 1,984
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{EF6EEC64-3E5A-47B6-96B4-3B59B467291A}</ProjectGuid>
<ProjectVersion>18.8</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>HT46F47Sim.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
<SanitizedProjectName>HT46F47Sim</SanitizedProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<DCC_DcuOutput>.</DCC_DcuOutput>
<DCC_ExeOutput>.</DCC_ExeOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<DCC_DcuOutput>.</DCC_DcuOutput>
<DCC_ExeOutput>.</DCC_ExeOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=ViaThinkSoft;FileDescription=HT46F47 Simulator;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="MainForm.pas">
<Form>Form2</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="HT46F47.pas"/>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Application</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">HT46F47Sim.dpr</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="3">
<DeployFile LocalName="Win32\Debug\HT46F47Sim.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>HT46F47Sim.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1024x768">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536x2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1668">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1668x2388">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048x1536">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048x2732">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2224">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2388x1668">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2732x2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768x1024">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1125">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1136x640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1242">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1242x2688">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1334">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1792">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2208">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2436">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2688x1242">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640x1136">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch750">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch828">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements">
<Platform Name="iOSDevice32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSInfoPList">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug">
<Platform Name="OSX64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXEntitlements">
<Platform Name="OSX32">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>..\</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXInfoPList">
<Platform Name="OSX32">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
</Deployment>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>
/trunk/HT46F47Sim.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/HT46F47Sim.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/MainForm.dfm
0,0 → 1,591
object Form2: TForm2
Left = 0
Top = 0
Caption = 'HT46F47 Simulator'
ClientHeight = 662
ClientWidth = 851
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label20: TLabel
Left = 24
Top = 392
Width = 100
Height = 13
Caption = 'Command Reference'
end
object BtnStart: TButton
Left = 728
Top = 253
Width = 115
Height = 49
Caption = 'Run'
TabOrder = 0
OnClick = BtnStartClick
end
object BtnStop: TButton
Left = 728
Top = 312
Width = 115
Height = 49
Caption = 'Stop'
Enabled = False
TabOrder = 1
OnClick = BtnStopClick
end
object GroupBox1: TGroupBox
Left = 728
Top = 37
Width = 113
Height = 169
Caption = 'Internal state'
TabOrder = 2
object Label7: TLabel
Left = 7
Top = 24
Width = 13
Height = 13
Caption = 'PC'
end
object Label14: TLabel
Left = 51
Top = 138
Width = 6
Height = 13
Caption = '0'
end
object Label13: TLabel
Left = 8
Top = 138
Width = 29
Height = 13
Caption = 'Reg D'
end
object Label12: TLabel
Left = 51
Top = 119
Width = 6
Height = 13
Caption = '0'
end
object Label11: TLabel
Left = 8
Top = 119
Width = 29
Height = 13
Caption = 'Reg C'
end
object Label10: TLabel
Left = 51
Top = 100
Width = 6
Height = 13
Caption = '0'
end
object Label9: TLabel
Left = 7
Top = 100
Width = 28
Height = 13
Caption = 'Reg B'
end
object Label8: TLabel
Left = 51
Top = 24
Width = 12
Height = 13
Caption = '00'
end
object Label6: TLabel
Left = 51
Top = 81
Width = 6
Height = 13
Caption = '0'
end
object Label5: TLabel
Left = 7
Top = 81
Width = 29
Height = 13
Caption = 'Reg A'
end
object Label4: TLabel
Left = 51
Top = 62
Width = 12
Height = 13
Caption = '00'
end
object Label3: TLabel
Left = 7
Top = 62
Width = 17
Height = 13
Caption = 'Ret'
end
object Label2: TLabel
Left = 51
Top = 43
Width = 6
Height = 13
Caption = '0'
end
object Label1: TLabel
Left = 7
Top = 43
Width = 28
Height = 13
Caption = 'Page:'
end
end
object BtnRandom: TButton
Left = 24
Top = 25
Width = 75
Height = 25
Caption = 'Rnd'
TabOrder = 3
OnClick = BtnRandomClick
end
object GroupBox2: TGroupBox
Left = 483
Top = 25
Width = 225
Height = 149
Caption = 'Input'
TabOrder = 4
object Label15: TLabel
Left = 24
Top = 67
Width = 20
Height = 13
Caption = 'AD1'
end
object Label16: TLabel
Left = 95
Top = 67
Width = 20
Height = 13
Caption = 'AD2'
end
object Label17: TLabel
Left = 24
Top = 22
Width = 42
Height = 13
Caption = 'Digital In'
end
object CheckBox1: TCheckBox
Left = 24
Top = 36
Width = 33
Height = 17
Caption = '1'
TabOrder = 0
end
object CheckBox2: TCheckBox
Left = 63
Top = 36
Width = 33
Height = 17
Caption = '2'
TabOrder = 1
end
object CheckBox3: TCheckBox
Left = 102
Top = 36
Width = 33
Height = 17
Caption = '4'
TabOrder = 2
end
object CheckBox4: TCheckBox
Left = 141
Top = 36
Width = 33
Height = 17
Caption = '8'
TabOrder = 3
end
object SpinEdit2: TSpinEdit
Left = 95
Top = 80
Width = 65
Height = 22
MaxValue = 15
MinValue = 0
TabOrder = 5
Value = 0
end
object SpinEdit1: TSpinEdit
Left = 24
Top = 80
Width = 65
Height = 22
MaxValue = 15
MinValue = 0
TabOrder = 4
Value = 0
end
object CheckBox5: TCheckBox
Left = 24
Top = 111
Width = 41
Height = 17
Caption = 'S1'
TabOrder = 6
end
object CheckBox6: TCheckBox
Left = 88
Top = 111
Width = 41
Height = 17
Caption = 'S2'
TabOrder = 7
end
end
object GroupBox3: TGroupBox
Left = 483
Top = 180
Width = 225
Height = 181
Caption = 'Digital Out'
TabOrder = 5
object Label18: TLabel
Left = 16
Top = 24
Width = 50
Height = 13
Caption = 'Digital Out'
end
object Label19: TLabel
Left = 16
Top = 90
Width = 24
Height = 13
Caption = 'PWM'
end
object Panel1: TPanel
Left = 16
Top = 43
Width = 41
Height = 41
Caption = '1'
Color = clWhite
ParentBackground = False
TabOrder = 0
end
object Panel2: TPanel
Left = 63
Top = 43
Width = 41
Height = 41
Caption = '2'
Color = clWhite
ParentBackground = False
TabOrder = 1
end
object Panel3: TPanel
Left = 110
Top = 43
Width = 41
Height = 41
Caption = '4'
Color = clWhite
ParentBackground = False
TabOrder = 2
end
object Panel4: TPanel
Left = 157
Top = 43
Width = 41
Height = 41
Caption = '8'
Color = clWhite
ParentBackground = False
TabOrder = 3
end
object SpinEdit3: TSpinEdit
Left = 16
Top = 104
Width = 65
Height = 22
TabStop = False
MaxValue = 15
MinValue = 0
ReadOnly = True
TabOrder = 4
Value = 0
end
end
object Memo1: TMemo
Left = 24
Top = 408
Width = 433
Height = 233
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
Lines.Strings = (
' 10'#9'LED 0000'#9'PORT 0'
' 11'#9'LED 0001'#9'PORT 1'
' 12'#9'LED 0010'#9'PORT 2'
' 13'#9'LED 0011'#9'PORT 3'
' 14'#9'LED 0100'#9'PORT 4'
' 15'#9'LED 0101'#9'PORT 5'
' 16'#9'LED 0110'#9'PORT 6'
' 17'#9'LED 0111'#9'PORT 7'
' 18'#9'LED 1000'#9'PORT 8'
' 19'#9'LED 1001'#9'PORT 9'
' 1A'#9'LED 1010'#9'PORT 10'
' 1B'#9'LED 1011'#9'PORT 11'
' 1C'#9'LED 1100'#9'PORT 12'
' 1D'#9'LED 1101'#9'PORT 13'
' 1E'#9'LED 1110'#9'PORT 14'
' 1F'#9'LED 1111'#9'PORT 15'
''
' 20'#9'WAIT 1ms'
' 21'#9'WAIT 2ms'
' 22'#9'WAIT 5ms'
' 23'#9'WAIT 10ms'
' 24'#9'WAIT 20ms'
' 25'#9'WAIT 50ms'
' 26'#9'WAIT 100ms'
' 27'#9'WAIT 200ms'
' 28'#9'WAIT 500ms'
' 29'#9'WAIT 1s'
' 2A'#9'WAIT 2s'
' 2B'#9'WAIT 5s'
' 2C'#9'WAIT 10s'
' 2D'#9'WAIT 20s'
' 2E'#9'WAIT 30s'
' 2F'#9'WAIT 60s'
''
' 30'#9'JUMP -0'#9#9'HALT'
' 31'#9'JUMP -1'
' 32'#9'JUMP -2'
' 33'#9'JUMP -3'
' 34'#9'JUMP -4'
' 35'#9'JUMP -5'
' 36'#9'JUMP -6'
' 37'#9'JUMP -7'
' 38'#9'JUMP -8'
' 39'#9'JUMP -9'
' 3A'#9'JUMP -10'
' 3B'#9'JUMP -11'
' 3C'#9'JUMP -12'
' 3D'#9'JUMP -13'
' 3E'#9'JUMP -14'
' 3F'#9'JUMP -15'
''
' 40'#9'SET A=0'
' 41'#9'SET A=1'
' 42'#9'SET A=2'
' 43'#9'SET A=3'
' 44'#9'SET A=4'
' 45'#9'SET A=5'
' 46'#9'SET A=6'
' 47'#9'SET A=7'
' 48'#9'SET A=8'
' 49'#9'SET A=9'
' 4A'#9'SET A=10'
' 4B'#9'SET A=11'
' 4C'#9'SET A=12'
' 4D'#9'SET A=13'
' 4E'#9'SET A=14'
' 4F'#9'SET A=15'
''
' 50'
' 51'#9'SET B=A'
' 52'#9'SET C=A'
' 53'#9'SET D=A'
' 54'#9'SET Dout=A'
' 55'#9'SET Dout.0=A.0'
' 56'#9'SET Dout.1=A.0'
' 57'#9'SET Dout.2=A.0'
' 58'#9'SET Dout.3=A.0'
' 59'#9'SET PWM=A'
' 5A'
' 5B'
' 5C'
' 5D'
' 5E'
' 5F'
''
' 60'
' 61'#9'SET A=B'
' 62'#9'SET A=C'
' 63'#9'SET A=D'
' 64'#9'SET A=Din'
' 65'#9'SET A=Din.0'
' 66'#9'SET A=Din.1'
' 67'#9'SET A=Din.2'
' 68'#9'SET A=Din.3'
' 69'#9'SET A=AD1'
' 6A'#9'SET A=AD2'
' 6B'
' 6C'
' 6D'
' 6E'
' 6F'
''
' 70'
' 71'#9'SET A=A+1'
' 72'#9'SET A=A-1'
' 73'#9'SET A=A+B'
' 74'#9'SET A=A-B'
' 75'#9'SET A=A*B'
' 76'#9'SET A=A/B'
' 77'#9'SET A=A&B'#9#9#9'AND'
' 78'#9'SET A=A|B'#9#9#9'OR'
' 79'#9'SET A=A^B'#9#9#9'XOR'
' 7A'#9'SET A=~A'#9#9#9'NOT'
' 7B'
' 7C'
' 7D'
' 7E'
' 7F'
''
' 80'#9'PAGE 0'#9#9#9#9'Page is used by JUMP, CALL, CTIMES and DTIMES'
' 81'#9'PAGE 1'
' 82'#9'PAGE 2'
' 83'#9'PAGE 3'
' 84'#9'PAGE 4'
' 85'#9'PAGE 5'
' 86'#9'PAGE 6'
' 87'#9'PAGE 7'
' 88'#9'PAGE 8'
' 89'#9'PAGE 9'
' 8A'#9'PAGE A'
' 8B'#9'PAGE B'
' 8C'#9'PAGE C'
' 8D'#9'PAGE D'
' 8E'#9'PAGE E'
' 8F'#9'PAGE F'
''
' 90'#9'JUMP <PAGE>0'
' 91'#9'JUMP <PAGE>1'
' 92'#9'JUMP <PAGE>2'
' 93'#9'JUMP <PAGE>3'
' 94'#9'JUMP <PAGE>4'
' 95'#9'JUMP <PAGE>5'
' 96'#9'JUMP <PAGE>6'
' 97'#9'JUMP <PAGE>7'
' 98'#9'JUMP <PAGE>8'
' 99'#9'JUMP <PAGE>9'
' 9A'#9'JUMP <PAGE>A'
' 9B'#9'JUMP <PAGE>B'
' 9C'#9'JUMP <PAGE>C'
' 9D'#9'JUMP <PAGE>D'
' 9E'#9'JUMP <PAGE>E'
' 9F'#9'JUMP <PAGE>F'
''
' A0'#9'CTIMES <PAGE>0'#9#9#9'IF C>0 THEN ( C=C-1 ; JUMP <PAGE>X ) ELSE C' +
'ONTINUE'
' A1'#9'CTIMES <PAGE>1'
' A2'#9'CTIMES <PAGE>2'
' A3'#9'CTIMES <PAGE>3'
' A4'#9'CTIMES <PAGE>4'
' A5'#9'CTIMES <PAGE>5'
' A6'#9'CTIMES <PAGE>6'
' A7'#9'CTIMES <PAGE>7'
' A8'#9'CTIMES <PAGE>8'
' A9'#9'CTIMES <PAGE>9'
' AA'#9'CTIMES <PAGE>A'
' AB'#9'CTIMES <PAGE>B'
' AC'#9'CTIMES <PAGE>C'
' AD'#9'CTIMES <PAGE>D'
' AE'#9'CTIMES <PAGE>E'
' AF'#9'CTIMES <PAGE>F'
''
' B0'#9'DTIMES <PAGE>0'#9#9#9'IF D>0 THEN ( D=D-1 ; JUMP <PAGE>X ) ELSE C' +
'ONTINUE'
' B1'#9'DTIMES <PAGE>1'
' B2'#9'DTIMES <PAGE>2'
' B3'#9'DTIMES <PAGE>3'
' B4'#9'DTIMES <PAGE>4'
' B5'#9'DTIMES <PAGE>5'
' B6'#9'DTIMES <PAGE>6'
' B7'#9'DTIMES <PAGE>7'
' B8'#9'DTIMES <PAGE>8'
' B9'#9'DTIMES <PAGE>9'
' BA'#9'DTIMES <PAGE>A'
' BB'#9'DTIMES <PAGE>B'
' BC'#9'DTIMES <PAGE>C'
' BD'#9'DTIMES <PAGE>D'
' BE'#9'DTIMES <PAGE>E'
' BF'#9'DTIMES <PAGE>F'
''
' C0'
' C1'#9'SKIP_IF A>B'
' C2'#9'SKIP_IF A<B'
' C3'#9'SKIP_IF A=B'
' C4'#9'SKIP_IF Din.0=1'
' C5'#9'SKIP_IF Din.1=1'
' C6'#9'SKIP_IF Din.2=1'
' C7'#9'SKIP_IF Din.3=1'
' C8'#9'SKIP_IF Din.0=0'
' C9'#9'SKIP_IF Din.1=0'
' CA'#9'SKIP_IF Din.2=0'
' CB'#9'SKIP_IF Din.3=0'
' CC'#9'SKIP_IF S1=0'
' CD'#9'SKIP_IF S2=0'
' CE'#9'SKIP_IF S1=1'
' CF'#9'SKIP_IF S2=1'
''
' D0'#9'CALL <PAGE>0'
' D1'#9'CALL <PAGE>1'
' D2'#9'CALL <PAGE>2'
' D3'#9'CALL <PAGE>3'
' D4'#9'CALL <PAGE>4'
' D5'#9'CALL <PAGE>5'
' D6'#9'CALL <PAGE>6'
' D7'#9'CALL <PAGE>7'
' D8'#9'CALL <PAGE>8'
' D9'#9'CALL <PAGE>9'
' DA'#9'CALL <PAGE>A'
' DB'#9'CALL <PAGE>B'
' DC'#9'CALL <PAGE>C'
' DD'#9'CALL <PAGE>D'
' DE'#9'CALL <PAGE>E'
' DF'#9'CALL <PAGE>F'
''
' E0'#9'RET')
ParentFont = False
ReadOnly = True
ScrollBars = ssBoth
TabOrder = 6
end
object Memo2: TMemo
Left = 24
Top = 56
Width = 433
Height = 313
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
Lines.Strings = (
'80 42 52 1F 26 27 10 26 27 A3 42 52 18 27 14 27'
'12 27 11 27 12 27 14 27 AC 18 27 10 27 91')
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 7
WantTabs = True
end
end
/trunk/MainForm.pas
0,0 → 1,188
unit MainForm;
 
interface
 
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, Vcl.ExtCtrls,
Vcl.Samples.Spin;
 
type
TForm2 = class(TForm)
BtnStart: TButton;
BtnStop: TButton;
GroupBox1: TGroupBox;
Label7: TLabel;
Label14: TLabel;
Label13: TLabel;
Label12: TLabel;
Label11: TLabel;
Label10: TLabel;
Label9: TLabel;
Label8: TLabel;
Label6: TLabel;
Label5: TLabel;
Label4: TLabel;
Label3: TLabel;
Label2: TLabel;
Label1: TLabel;
BtnRandom: TButton;
GroupBox2: TGroupBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
GroupBox3: TGroupBox;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Label15: TLabel;
Label16: TLabel;
SpinEdit2: TSpinEdit;
SpinEdit1: TSpinEdit;
Label17: TLabel;
Label18: TLabel;
SpinEdit3: TSpinEdit;
Label19: TLabel;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
Memo1: TMemo;
Label20: TLabel;
Memo2: TMemo;
procedure BtnStartClick(Sender: TObject);
procedure BtnStopClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure BtnRandomClick(Sender: TObject);
private
PleaseStop: boolean;
procedure ResetGui;
end;
 
var
Form2: TForm2;
 
implementation
 
{$R *.dfm}
 
uses
HT46F47;
 
type
ECodeTooLong = class(Exception);
 
{ TForm2 }
 
procedure TForm2.BtnStartClick(Sender: TObject);
var
x: THT46F47;
i, ci: Integer;
s: string;
tmp_din: integer;
resourcestring
SCodeTooLong = 'Code too long. Max 256 Bytes.';
begin
BtnStart.Enabled := false;
BtnStop.Enabled := true;
Memo2.Enabled := false;
BtnRandom.Enabled := false;
 
x := THT46F47.Create;
 
s := '';
ci := 0;
for i := 1 to Length(Memo2.Text) do
begin
if Memo2.Text[i] in ['a'..'f', 'A'..'F', '0'..'9'] then
begin
s := s + Memo2.Text[i];
end;
if Length(s) = 2 then
begin
if ci > $FF then raise ECodeTooLong.Create(SCodeTooLong);
x.ROM[ci] := StrToInt('$'+s);
s := '';
Inc(ci);
end;
end;
 
while true do
begin
{$REGION 'Input stuff'}
tmp_din := 0;
if CheckBox1.Checked then Inc(tmp_din, 1);
if CheckBox2.Checked then Inc(tmp_din, 2);
if CheckBox3.Checked then Inc(tmp_din, 4);
if CheckBox4.Checked then Inc(tmp_din, 8);
x.DIn := tmp_din;
x.AD1 := SpinEdit1.Value;
x.AD2 := SpinEdit2.Value;
x.S1 := CheckBox5.Checked;
x.S2 := CheckBox6.Checked;
{$ENDREGION}
x.Step;
{$REGION 'Show output stuff (LEDs)'}
if ((x.PortOut and 1) shr 0) = 1 then Panel1.Color := clRed else Panel1.Color := clMaroon;
if ((x.PortOut and 2) shr 1) = 1 then Panel2.Color := clRed else Panel2.Color := clMaroon;
if ((x.PortOut and 4) shr 2) = 1 then Panel3.Color := clRed else Panel3.Color := clMaroon;
if ((x.PortOut and 8) shr 3) = 1 then Panel4.Color := clRed else Panel4.Color := clMaroon;
SpinEdit3.Value := x.PWM;
{$ENDREGION}
{$REGION 'Debug output: Internal state'}
Label8.Caption := IntToHex(x.PC, 2);
Label2.Caption := IntToHex(x.Page, 1);
Label4.Caption := IntToHex(x.ReturnAddress, 2);
Label6.Caption := IntToHex(x.RegA, 1);
Label10.Caption := IntToHex(x.RegB, 1);
Label12.Caption := IntToHex(x.RegC, 1);
Label14.Caption := IntToHex(x.RegD, 1);
{$ENDREGION}
Application.ProcessMessages;
if Application.Terminated or PleaseStop then
begin
PleaseStop := false;
Break;
end;
end;
 
Memo2.Enabled := true;
BtnRandom.Enabled := true;
BtnStart.Enabled := true;
ResetGui;
end;
 
procedure TForm2.BtnStopClick(Sender: TObject);
begin
// TODO: actually we need to inform the THT46F47 object, so it can break out of a possible waiting loop
BtnStop.Enabled := false;
PleaseStop := true;
end;
 
procedure TForm2.BtnRandomClick(Sender: TObject);
var
i: integer;
begin
Memo2.Text := '';
for i := $00 to $FF do
begin
Memo2.Text := Memo2.Text + IntToHex(Random($100),2) + ' ';
end;
Memo2.Text := Trim(Memo2.Text);
end;
 
procedure TForm2.FormShow(Sender: TObject);
begin
ResetGui;
end;
 
procedure TForm2.ResetGui;
begin
Panel1.Color := clMaroon;
Panel2.Color := clMaroon;
Panel3.Color := clMaroon;
Panel4.Color := clMaroon;
end;
 
end.
 
/trunk/Project2.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Test.txt
0,0 → 1,95
 
Testprogramme um Implementierungsdetails zu klären
==================================================
 
# Testprogramm 1:
# 1. Mit welchem Wert wird A initialisiert?
# Anzeige fängt mit 0, 1, 2, 4, ... an? Dann wird A mit 0 initialisiert
# 2. Wird ProgramCounter nach $FF auf $00 zurückspringen?
# => Anzeige zählt langsam hoch => Überlauf, PC beginnt wieder bei 0
#
# 00: 29 WAIT 1s
# 01: 71 SET A=A+1
# 02: 54 SET Dout=A
# 03: 00...
#
import re
data='29 71 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
data = re.sub(r'[^0-9a-fA-F]+','', data)
for b in [int(data[i:i+2],16) for i in range(0,len(data),2)]:
programmiereByte(b)
 
------------------
 
# Testprogramm 2:
# Was passiert bei RET, wenn man bereits gesprungen ist?
# => Anzeige zählt langsam hoch => RET bleibt gleich (man kommt zum letzten CALL)
# Anzeige blinkt => RET gilt als NOP
# Anzeige bleibt bei "1" => RET gilt als 0
#
# 00: 40 SET A=0
# 01: DF CALL <PAGE>F
# 02: 71 SET A=A+1
# 03: 29 WAIT 1s
# 04: 54 SET Dout=A
# 05: E0 RET
# 06: 7A SET A=~A
# 07: 27 WAIT 200ms
# 08: 54 SET Dout=A
# 09: 33 JUMP -3
# 0A: 00
# 0B: 00
# 0C: 00
# 0D: 00
# 0E: 00
# 0F: E0 RET
#
import re
data='40 DF 71 29 54 E0 7A 27 54 33 00 00 00 00 00 E0'
data = re.sub(r'[^0-9a-fA-F]+','', data)
for b in [int(data[i:i+2],16) for i in range(0,len(data),2)]:
programmiereByte(b)
 
------------------
 
# Testprogramm 3:
# Was passiert mit RET wenn man nie einen CALL gemacht hat?
# => Anzeige bleibt bei Zahl 2 => RET wird zu "freeze"
# Anzeige wechselt zwischen 1 und 2 => RET springt zu adresse 0
# Anzeige blinkt => RET wird ignoriert und gilt als NOP
#
# 00: 41 SET A=1
# 01: 54 SET Dout=A
# 02: 27 WAIT 200ms
# 03: 42 SET A=2
# 04: 54 SET Dout=A
# 05: 27 WAIT 200ms
# 06: E0 RET
# 07: 7A SET A=~A
# 08: 27 WAIT 200ms
# 09: 54 SET Dout=A
# 0A: 33 JUMP -3
#
import re
data='41 54 27 42 54 27 E0 7A 27 54 33'
data = re.sub(r'[^0-9a-fA-F]+','', data)
for b in [int(data[i:i+2],16) for i in range(0,len(data),2)]:
programmiereByte(b)
 
------------------
 
# Testprogramm 4:
# Was passiert bei Division durch 0?
#
# 40 SET A=0
# 51 SET B=A
# 45 SET A=5
# 76 SET A=A/B
# 54 SET Dout=A
# 30 JUMP -0 HALT
#
import re
data='40 51 45 76 54 30'
data = re.sub(r'[^0-9a-fA-F]+','', data)
for b in [int(data[i:i+2],16) for i in range(0,len(data),2)]:
programmiereByte(b)