Changeset 176 for branches/virtualcpu4/UMachine.pas
- Timestamp:
- Apr 12, 2019, 11:43:24 AM (6 years ago)
- Location:
- branches/virtualcpu4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/virtualcpu4
- Property svn:ignore
-
old new 4 4 *.lps 5 5 *.res 6 heaptrclog.trc
-
- Property svn:ignore
-
branches/virtualcpu4/UMachine.pas
r175 r176 12 12 Size: TPoint; 13 13 MemoryBase: Integer; 14 MemorySize: Integer; 15 ChangedAreaFrom: Integer; 16 ChangedAreaTo: Integer; 14 17 end; 15 18 … … 18 21 TMachine = class 19 22 private 23 FMemorySize: Integer; 20 24 function CpuInput(Port: TAddress): TRegister; 21 25 procedure CpuOutput(Port: TAddress; Value: TRegister); … … 128 132 bw64: Screen.MemoryBase := Value.Q; 129 133 end; 134 4: case Cpu.DataSize of 135 bw8: Screen.ChangedAreaFrom := Value.B; 136 bw16: Screen.ChangedAreaFrom := Value.W; 137 bw32: Screen.ChangedAreaFrom := Value.D; 138 bw64: Screen.ChangedAreaFrom := Value.Q; 139 end; 140 5: case Cpu.DataSize of 141 bw8: Screen.ChangedAreaTo := Value.B; 142 bw16: Screen.ChangedAreaTo := Value.W; 143 bw32: Screen.ChangedAreaTo := Value.D; 144 bw64: Screen.ChangedAreaTo := Value.Q; 145 end; 130 146 end; 131 147 end; … … 133 149 function TMachine.GetMemorySize: Integer; 134 150 begin 135 Result := MemSize(Memory);151 Result := FMemorySize; 136 152 end; 137 153 138 154 procedure TMachine.SetMemorySize(AValue: Integer); 139 155 begin 140 Memory := ReAllocMem(Memory, AValue); 156 if FMemorySize = AValue then Exit; 157 FMemorySize := AValue; 158 Memory := ReAllocMem(Memory, FMemorySize); 141 159 end; 142 160
Note:
See TracChangeset
for help on using the changeset viewer.