mirror of https://github.com/t-edson/P65Utils.git
Add files via upload
This commit is contained in:
parent
b2ceec7441
commit
88085bc91c
|
@ -7,7 +7,7 @@ unit CPUCore;
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc;
|
Classes, SysUtils;
|
||||||
type
|
type
|
||||||
//Union to access bytes of a word
|
//Union to access bytes of a word
|
||||||
TWordRec = record
|
TWordRec = record
|
||||||
|
@ -87,7 +87,7 @@ type
|
||||||
public //General fields
|
public //General fields
|
||||||
Model : string; //modelo de PIC
|
Model : string; //modelo de PIC
|
||||||
frequen : integer; //frecuencia del reloj
|
frequen : integer; //frecuencia del reloj
|
||||||
MaxFreq : integer; //máxima frecuencia del reloj
|
MaxFreq : integer; //Máxima frecuencia del reloj en Hz.
|
||||||
//Propiedades que definen la arquitectura del CPU.
|
//Propiedades que definen la arquitectura del CPU.
|
||||||
MsjError: string;
|
MsjError: string;
|
||||||
public //Execution control
|
public //Execution control
|
||||||
|
@ -467,7 +467,8 @@ constructor TCPUCore.Create;
|
||||||
begin
|
begin
|
||||||
dataAddr1 := -1; //Disable
|
dataAddr1 := -1; //Disable
|
||||||
hexLines := TStringList.Create;
|
hexLines := TStringList.Create;
|
||||||
frequen := 1000000; //4MHz
|
MaxFreq := 10000000; //10MHz.
|
||||||
|
frequen := 1000000; // 1MHz.
|
||||||
end;
|
end;
|
||||||
destructor TCPUCore.Destroy;
|
destructor TCPUCore.Destroy;
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
04/09/2020: Se mueve el método FindOpcode() fuera del objeto TP6502Instruct.
|
04/09/2020: Se mueve el método FindOpcode() fuera del objeto TP6502Instruct.
|
||||||
22/10/2020: Se agrega protección de dirección excesiva, a TCPUCore.addTopLabel().
|
22/10/2020: Se agrega protección de dirección excesiva, a TCPUCore.addTopLabel().
|
||||||
23/10/2020: Se crea la bandera pic.disableCodegen.
|
23/10/2020: Se crea la bandera pic.disableCodegen.
|
||||||
03/03/2022: Se agrega TP6502Instruct.HasOpcode(), se corrige TP6502.Decode() y se
|
|
||||||
modifica el tipo optCycles en TP6502Instruct.AddAddressMode().
|
|
||||||
|
|
||||||
|
|
||||||
0.4
|
0.4
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="12"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
|
||||||
<Title Value="project1"/>
|
<Title Value="project1"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="11"/>
|
<Version Value="12"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="5">
|
<Units Count="5">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
|
@ -22,32 +22,31 @@
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="Unit1"/>
|
<UnitName Value="Unit1"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="141"/>
|
<TopLine Value="142"/>
|
||||||
<CursorPos Y="170"/>
|
<CursorPos X="14" Y="170"/>
|
||||||
<UsageCount Value="75"/>
|
<UsageCount Value="75"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
<Filename Value="..\P6502utils.pas"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="1394"/>
|
<TopLine Value="1399"/>
|
||||||
<CursorPos X="26" Y="1411"/>
|
<CursorPos X="19" Y="1419"/>
|
||||||
<UsageCount Value="38"/>
|
<UsageCount Value="38"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 Y="1208" ID="1"/>
|
<Item0 Y="1208" ID="1"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\CPUCore.pas"/>
|
<Filename Value="..\CPUCore.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="35"/>
|
<TopLine Value="35"/>
|
||||||
<CursorPos X="14" Y="53"/>
|
<CursorPos X="14" Y="53"/>
|
||||||
<UsageCount Value="31"/>
|
<UsageCount Value="31"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 Y="117" ID="3"/>
|
<Item0 Y="117" ID="3"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="C:\lazarus\lcl\include\control.inc"/>
|
<Filename Value="C:\lazarus\lcl\include\control.inc"/>
|
||||||
|
@ -57,136 +56,79 @@
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="9"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="29" HistoryIndex="27">
|
<JumpHistory Count="17" HistoryIndex="16">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="1085" Column="49" TopLine="1064"/>
|
<Caret Line="130" Column="25" TopLine="114"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="123" Column="17" TopLine="104"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="370" Column="8" TopLine="354"/>
|
<Caret Line="23" Column="10" TopLine="4"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="369" Column="28" TopLine="354"/>
|
<Caret Line="98" Column="10" TopLine="79"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="1148" TopLine="1141"/>
|
<Caret Line="123" Column="16" TopLine="104"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="207" Column="33" TopLine="180"/>
|
<Caret Line="170" Column="44" TopLine="140"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
|
<Caret Line="171" Column="58" TopLine="141"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="1077" Column="62" TopLine="957"/>
|
<Caret Line="170" Column="10" TopLine="141"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\p6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="1446" Column="12" TopLine="1155"/>
|
<Caret Line="157" Column="38" TopLine="150"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="1590" Column="22" TopLine="1571"/>
|
<Caret Line="76" TopLine="59"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="61" Column="10" TopLine="43"/>
|
<Caret Line="80" TopLine="59"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="130" Column="25" TopLine="114"/>
|
<Caret Line="81" TopLine="59"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="123" Column="17" TopLine="104"/>
|
<Caret Line="82" TopLine="59"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="23" Column="10" TopLine="4"/>
|
<Caret Line="64" TopLine="64"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="98" Column="10" TopLine="79"/>
|
<Caret Line="76" TopLine="64"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="123" Column="16" TopLine="104"/>
|
<Caret Line="76" TopLine="64"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="236" TopLine="214"/>
|
<Caret Line="73" Column="7" TopLine="59"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="237" TopLine="214"/>
|
|
||||||
</Position18>
|
|
||||||
<Position19>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="238" TopLine="214"/>
|
|
||||||
</Position19>
|
|
||||||
<Position20>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="239" TopLine="214"/>
|
|
||||||
</Position20>
|
|
||||||
<Position21>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="240" TopLine="214"/>
|
|
||||||
</Position21>
|
|
||||||
<Position22>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="247" TopLine="217"/>
|
|
||||||
</Position22>
|
|
||||||
<Position23>
|
|
||||||
<Filename Value="unit1.pas"/>
|
|
||||||
<Caret Line="170" Column="44" TopLine="140"/>
|
|
||||||
</Position23>
|
|
||||||
<Position24>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="255" Column="30" TopLine="235"/>
|
|
||||||
</Position24>
|
|
||||||
<Position25>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="1445" Column="24" TopLine="1440"/>
|
|
||||||
</Position25>
|
|
||||||
<Position26>
|
|
||||||
<Filename Value="unit1.pas"/>
|
|
||||||
<Caret Line="171" Column="58" TopLine="141"/>
|
|
||||||
</Position26>
|
|
||||||
<Position27>
|
|
||||||
<Filename Value="unit1.pas"/>
|
|
||||||
<Caret Line="170" Column="10" TopLine="141"/>
|
|
||||||
</Position27>
|
|
||||||
<Position28>
|
|
||||||
<Filename Value="..\P6502utils.pas"/>
|
|
||||||
<Caret Line="1411" Column="26" TopLine="1382"/>
|
|
||||||
</Position28>
|
|
||||||
<Position29>
|
|
||||||
<Filename Value="..\CPUCore.pas"/>
|
|
||||||
<Caret Line="53" Column="14" TopLine="35"/>
|
|
||||||
</Position29>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
<Modes Count="0" ActiveMode="default"/>
|
<Modes ActiveMode="default"/>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
<Debugging>
|
|
||||||
<BreakPoints Count="1">
|
|
||||||
<Item1>
|
|
||||||
<Kind Value="bpkSource"/>
|
|
||||||
<WatchScope Value="wpsLocal"/>
|
|
||||||
<WatchKind Value="wpkWrite"/>
|
|
||||||
<Source Value="..\P6502utils.pas"/>
|
|
||||||
<Line Value="1408"/>
|
|
||||||
</Item1>
|
|
||||||
</BreakPoints>
|
|
||||||
</Debugging>
|
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
|
Binary file not shown.
|
@ -9,14 +9,14 @@ object Form1: TForm1
|
||||||
DesignTimePPI = 120
|
DesignTimePPI = 120
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
LCLVersion = '2.0.12.0'
|
LCLVersion = '2.2.0.4'
|
||||||
object Memo1: TMemo
|
object Memo1: TMemo
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 390
|
Height = 390
|
||||||
Top = 50
|
Top = 50
|
||||||
Width = 238
|
Width = 238
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'LDA'
|
'LDA $12'
|
||||||
'STA $10'
|
'STA $10'
|
||||||
)
|
)
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
@ -46,7 +46,6 @@ object Form1: TForm1
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 39
|
Width = 39
|
||||||
Caption = 'CODE'
|
Caption = 'CODE'
|
||||||
ParentColor = False
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
|
@ -55,7 +54,6 @@ object Form1: TForm1
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 58
|
Width = 58
|
||||||
Caption = 'HEX FILE'
|
Caption = 'HEX FILE'
|
||||||
ParentColor = False
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ unit P6502utils;
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, CPUCore, strutils;
|
Classes, SysUtils, CPUCore, strutils;
|
||||||
type //Instructions set
|
type //Instructions set
|
||||||
TP6502Inst = (
|
TP6502Inst = (
|
||||||
i_ADC, //add with carry
|
i_ADC, //add with carry
|
||||||
|
|
Loading…
Reference in New Issue