Ignore:
Timestamp:
Oct 20, 2020, 1:10:09 AM (4 years ago)
Author:
chronos
Message:
  • Added: Devices form with tree view of connected devices. Device control form can be opened by double click.
  • Modifid: IN/OUT instructions now use also device group index to directly specify which device should be read/written.
Location:
branches/CpuSingleSize/Forms
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/Forms/UFormConsole.pas

    r216 r220  
    1313  { TFormConsole }
    1414
    15   TFormConsole = class(TForm)
     15  TFormConsole = class(TFormDevice)
    1616    MemoConsole: TMemo;
    1717    Timer1: TTimer;
     
    2020    procedure MemoConsoleKeyPress(Sender: TObject; var Key: char);
    2121    procedure Timer1Timer(Sender: TObject);
    22   private
    23 
     22  protected
     23    function GetDevice: TDevice; override;
     24    procedure SetDevice(AValue: TDevice); override;
    2425  public
    2526    Console: TConsole;
     
    5556end;
    5657
     58function TFormConsole.GetDevice: TDevice;
     59begin
     60  Result := Console;
     61end;
     62
     63procedure TFormConsole.SetDevice(AValue: TDevice);
     64begin
     65  if AValue is TConsole then
     66    Console := TConsole(AValue);
     67end;
     68
    5769procedure TFormConsole.MemoConsoleKeyPress(Sender: TObject; var Key: char);
    5870begin
  • branches/CpuSingleSize/Forms/UFormMain.lfm

    r216 r220  
    105105    object MenuItem12: TMenuItem
    106106      Caption = 'View'
    107       object MenuItem13: TMenuItem
    108         Action = Core.AConsole
    109       end
    110107      object MenuItem14: TMenuItem
    111108        Action = Core.ACpu
    112109      end
    113110      object MenuItem15: TMenuItem
    114         Action = Core.AScreen
     111        Action = Core.ADevices
    115112      end
    116113      object MenuItem16: TMenuItem
  • branches/CpuSingleSize/Forms/UFormMain.pas

    r216 r220  
    2222    MenuItem11: TMenuItem;
    2323    MenuItem12: TMenuItem;
    24     MenuItem13: TMenuItem;
    2524    MenuItem14: TMenuItem;
    2625    MenuItem15: TMenuItem;
  • branches/CpuSingleSize/Forms/UFormScreen.pas

    r216 r220  
    1212  { TFormScreen }
    1313
    14   TFormScreen = class(TForm)
     14  TFormScreen = class(TFormDevice)
    1515    PaintBox1: TPaintBox;
    1616    Timer1: TTimer;
     
    2121  private
    2222    TempBitmap: TBitmap;
     23  protected
     24    function GetDevice: TDevice; override;
     25    procedure SetDevice(AValue: TDevice); override;
    2326  public
    2427    Screen: TScreen;
     
    4649      P := TempBitmap.ScanLine[Y];
    4750      for X := 0 to Screen.Size.X - 1 do begin
    48         P^ := Screen.Data[Y * Screen.Size.Y + X] * $010101;
     51        P^ := Screen.VideoMem[Y * Screen.Size.Y + X] * $010101;
    4952        Inc(P);
    5053      end;
     
    5356    PaintBox1.Refresh;
    5457  end;
     58end;
     59
     60function TFormScreen.GetDevice: TDevice;
     61begin
     62  Result := Screen;
     63end;
     64
     65procedure TFormScreen.SetDevice(AValue: TDevice);
     66begin
     67  if AValue is TScreen then
     68    Screen := TScreen(AValue);
    5569end;
    5670
Note: See TracChangeset for help on using the changeset viewer.