Changeset 220 for branches/CpuSingleSize/Forms
- Timestamp:
- Oct 20, 2020, 1:10:09 AM (4 years ago)
- Location:
- branches/CpuSingleSize/Forms
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CpuSingleSize/Forms/UFormConsole.pas
r216 r220 13 13 { TFormConsole } 14 14 15 TFormConsole = class(TForm )15 TFormConsole = class(TFormDevice) 16 16 MemoConsole: TMemo; 17 17 Timer1: TTimer; … … 20 20 procedure MemoConsoleKeyPress(Sender: TObject; var Key: char); 21 21 procedure Timer1Timer(Sender: TObject); 22 private 23 22 protected 23 function GetDevice: TDevice; override; 24 procedure SetDevice(AValue: TDevice); override; 24 25 public 25 26 Console: TConsole; … … 55 56 end; 56 57 58 function TFormConsole.GetDevice: TDevice; 59 begin 60 Result := Console; 61 end; 62 63 procedure TFormConsole.SetDevice(AValue: TDevice); 64 begin 65 if AValue is TConsole then 66 Console := TConsole(AValue); 67 end; 68 57 69 procedure TFormConsole.MemoConsoleKeyPress(Sender: TObject; var Key: char); 58 70 begin -
branches/CpuSingleSize/Forms/UFormMain.lfm
r216 r220 105 105 object MenuItem12: TMenuItem 106 106 Caption = 'View' 107 object MenuItem13: TMenuItem108 Action = Core.AConsole109 end110 107 object MenuItem14: TMenuItem 111 108 Action = Core.ACpu 112 109 end 113 110 object MenuItem15: TMenuItem 114 Action = Core.A Screen111 Action = Core.ADevices 115 112 end 116 113 object MenuItem16: TMenuItem -
branches/CpuSingleSize/Forms/UFormMain.pas
r216 r220 22 22 MenuItem11: TMenuItem; 23 23 MenuItem12: TMenuItem; 24 MenuItem13: TMenuItem;25 24 MenuItem14: TMenuItem; 26 25 MenuItem15: TMenuItem; -
branches/CpuSingleSize/Forms/UFormScreen.pas
r216 r220 12 12 { TFormScreen } 13 13 14 TFormScreen = class(TForm )14 TFormScreen = class(TFormDevice) 15 15 PaintBox1: TPaintBox; 16 16 Timer1: TTimer; … … 21 21 private 22 22 TempBitmap: TBitmap; 23 protected 24 function GetDevice: TDevice; override; 25 procedure SetDevice(AValue: TDevice); override; 23 26 public 24 27 Screen: TScreen; … … 46 49 P := TempBitmap.ScanLine[Y]; 47 50 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; 49 52 Inc(P); 50 53 end; … … 53 56 PaintBox1.Refresh; 54 57 end; 58 end; 59 60 function TFormScreen.GetDevice: TDevice; 61 begin 62 Result := Screen; 63 end; 64 65 procedure TFormScreen.SetDevice(AValue: TDevice); 66 begin 67 if AValue is TScreen then 68 Screen := TScreen(AValue); 55 69 end; 56 70
Note:
See TracChangeset
for help on using the changeset viewer.