Ignore:
Timestamp:
Jul 12, 2022, 10:43:40 PM (2 years ago)
Author:
chronos
Message:
  • Modified: More instructions.
  • Modified: Optimized instruction execution with procedure array instead case.
Location:
branches/CpuSingleSize/Forms
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/Forms/UFormAssembler.lfm

    r216 r223  
    99  DesignTimePPI = 144
    1010  OnShow = FormShow
    11   LCLVersion = '2.0.10.0'
     11  LCLVersion = '2.2.2.0'
    1212  inline SynEdit1: TSynEdit
    1313    Left = 16
     
    1818    Color = clBlack
    1919    Font.Color = clWhite
    20     Font.Height = 13
     20    Font.Height = 16
    2121    Font.Name = 'Liberation Mono'
    2222    Font.Pitch = fpFixed
     
    2525    ParentFont = False
    2626    TabOrder = 0
    27     Gutter.Width = 77
     27    Gutter.Width = 81
    2828    Gutter.MouseActions = <>
    2929    RightGutter.Width = 0
     
    481481      end
    482482      object SynGutterLineNumber1: TSynGutterLineNumber
    483         Width = 17
     483        Width = 21
    484484        MouseActions = <>
    485485        MarkupInfo.Background = clBtnFace
  • branches/CpuSingleSize/Forms/UFormAssembler.pas

    r216 r223  
    11unit UFormAssembler;
    2 
    3 {$mode delphi}
    42
    53interface
  • branches/CpuSingleSize/Forms/UFormConsole.pas

    r220 r223  
    11unit UFormConsole;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2422    procedure SetDevice(AValue: TDevice); override;
    2523  public
    26     Console: TConsole;
     24    Console: TDeviceConsole;
    2725  end;
    2826
     
    6361procedure TFormConsole.SetDevice(AValue: TDevice);
    6462begin
    65   if AValue is TConsole then
    66     Console := TConsole(AValue);
     63  if AValue is TDeviceConsole then
     64    Console := TDeviceConsole(AValue);
    6765end;
    6866
     
    7573    Console.Lock.Release;
    7674  end;
    77   Console.Cpu.Interrupt(Console.InterruptVector);
     75  Console.PulseInterrupt;
    7876end;
    7977
  • branches/CpuSingleSize/Forms/UFormCpu.pas

    r216 r223  
    11unit UFormCpu;
    2 
    3 {$mode delphi}
    42
    53interface
     
    4947  I: Integer;
    5048begin
    51   if Item.Index * DataPerLine < Length(Cpu.Data) then begin
     49  if Item.Index * DataPerLine < Length(Cpu.Memory) then begin
    5250    Item.Caption := IntToHex(Item.Index * DataPerLine, 8);
    5351    Line := '';
    5452    for I := 0 to DataPerLine - 1 do
    55       Line := Line + IntToHex(Cpu.Data[Item.Index * DataPerLine + I], 4) + ' ';
     53      Line := Line + IntToHex(Cpu.Memory[Item.Index * DataPerLine + I], 4) + ' ';
    5654    Item.SubItems.Add(Line);
    5755  end;
     
    6361    if Item.Index = 0 then begin
    6462      Item.Caption := 'IP';
    65       Item.SubItems.Add(IntToHex(Cpu.IP, 8));
     63      Item.SubItems.Add(IntToHex(Cpu.InstructionPointer, 8));
    6664    end else
    6765    if Item.Index = 1 then begin
    6866      Item.Caption := 'SP';
    69       Item.SubItems.Add(IntToHex(Cpu.SP, 8));
     67      Item.SubItems.Add(IntToHex(Cpu.StackPointer, 8));
    7068    end else begin
    7169      Item.Caption := 'R' + IntToStr(Item.Index - 2);
     
    7775procedure TFormCpu.Timer1Timer(Sender: TObject);
    7876begin
    79   ListViewMemory.Items.Count := Length(Cpu.Data) div DataPerLine;
     77  ListViewMemory.Items.Count := Length(Cpu.Memory) div DataPerLine;
    8078  ListViewMemory.Refresh;
    8179  ListViewRegs.Items.Count := Length(Cpu.R) + 2;
  • branches/CpuSingleSize/Forms/UFormDevices.lfm

    r220 r223  
    99  DesignTimePPI = 144
    1010  OnShow = FormShow
    11   LCLVersion = '2.0.10.0'
     11  LCLVersion = '2.2.2.0'
    1212  object TreeView1: TTreeView
    1313    Left = 16
  • branches/CpuSingleSize/Forms/UFormDevices.pas

    r220 r223  
    11unit UFormDevices;
    2 
    3 {$mode delphi}
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, UMachine;
     6  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
     7  UMachine;
    98
    109type
     
    3534const
    3635  DeviceClassFormClasses: array[TDeviceClass] of TFormDeviceClass = (
    37     nil, nil, nil, TFormStorage, TFormScreen, TFormConsole);
     36    nil, nil, nil, TFormStorage, TFormScreen, TFormConsole, nil);
    3837
    3938{ TFormDevices }
     
    5554        FormClass := DeviceClassFormClasses[Device.DeviceClass];
    5655        if Assigned(FormClass) then begin
    57           Device.Form := TFormDevice(FormClass.Create(nil));
     56          Device.Form := FormClass.Create(nil);
    5857          Device.Form.Device := Device;
    5958          Device.Form.Show;
  • branches/CpuSingleSize/Forms/UFormDisassembler.pas

    r216 r223  
    11unit UFormDisassembler;
    2 
    3 {$mode delphi}
    42
    53interface
  • branches/CpuSingleSize/Forms/UFormHelp.pas

    r216 r223  
    11unit UFormHelp;
    2 
    3 {$mode delphi}
    42
    53interface
  • branches/CpuSingleSize/Forms/UFormMain.lfm

    r220 r223  
    1212  OnDestroy = FormDestroy
    1313  OnShow = FormShow
    14   LCLVersion = '2.0.10.0'
     14  LCLVersion = '2.2.2.0'
    1515  object ButtonLoad: TButton
    1616    Left = 24
  • branches/CpuSingleSize/Forms/UFormMain.pas

    r220 r223  
    11unit UFormMain;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
  • branches/CpuSingleSize/Forms/UFormMessages.lfm

    r217 r223  
    88  ClientWidth = 1113
    99  DesignTimePPI = 144
    10   LCLVersion = '2.0.10.0'
     10  LCLVersion = '2.2.2.0'
    1111  object ListView1: TListView
    1212    Left = 0
  • branches/CpuSingleSize/Forms/UFormMessages.pas

    r217 r223  
    11unit UFormMessages;
    2 
    3 {$mode delphi}
    42
    53interface
  • branches/CpuSingleSize/Forms/UFormScreen.lfm

    r216 r223  
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    12   LCLVersion = '2.0.10.0'
     12  LCLVersion = '2.2.2.0'
    1313  object PaintBox1: TPaintBox
    1414    Left = 8
  • branches/CpuSingleSize/Forms/UFormScreen.pas

    r220 r223  
    11unit UFormScreen;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2523    procedure SetDevice(AValue: TDevice); override;
    2624  public
    27     Screen: TScreen;
     25    Screen: TDeviceScreen;
    2826  end;
    2927
     
    6563procedure TFormScreen.SetDevice(AValue: TDevice);
    6664begin
    67   if AValue is TScreen then
    68     Screen := TScreen(AValue);
     65  if AValue is TDeviceScreen then
     66    Screen := TDeviceScreen(AValue);
    6967end;
    7068
  • branches/CpuSingleSize/Forms/UFormStorage.lfm

    r220 r223  
    88  ClientWidth = 1153
    99  DesignTimePPI = 144
    10   LCLVersion = '2.0.10.0'
     10  LCLVersion = '2.2.2.0'
    1111  object ListView1: TListView
    1212    Left = 17
  • branches/CpuSingleSize/Forms/UFormStorage.pas

    r220 r223  
    11unit UFormStorage;
    2 
    3 {$mode delphi}
    42
    53interface
     
    1816    procedure SetDevice(AValue: TDevice); override;
    1917  public
    20     Storage: TStorage;
     18    Storage: TDeviceStorage;
    2119  end;
    2220
     
    3735procedure TFormStorage.SetDevice(AValue: TDevice);
    3836begin
    39   if AValue is TStorage then
    40     Storage := TStorage(AValue);
     37  if AValue is TDeviceStorage then
     38    Storage := TDeviceStorage(AValue);
    4139end;
    4240
Note: See TracChangeset for help on using the changeset viewer.