Changeset 220 for branches/CpuSingleSize/UCpu.pas
- Timestamp:
- Oct 20, 2020, 1:10:09 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CpuSingleSize/UCpu.pas
r219 r220 17 17 18 18 TCpuThread = class; 19 TOutputEvent = procedure ( Port: TInteger; Value: TInteger) of object;20 TInputEvent = function ( Port: TInteger): TInteger of object;19 TOutputEvent = procedure (Device, Port: TInteger; Value: TInteger) of object; 20 TInputEvent = function (Device, Port: TInteger): TInteger of object; 21 21 22 22 { TCpu } … … 115 115 Port: TInteger; 116 116 Dest: TInteger; 117 Device: TInteger; 117 118 begin 118 119 Instruction := TInstruction(ReadNext); … … 136 137 inIn: begin 137 138 Index := ReadNext; 139 Device := R[ReadNext]; 138 140 Port := R[ReadNext]; 139 if Assigned(FOnInput) then R[Index] := FOnInput( Port);141 if Assigned(FOnInput) then R[Index] := FOnInput(Device, Port); 140 142 end; 141 143 inOut: begin 144 Device := R[ReadNext]; 142 145 Port := R[ReadNext]; 143 if Assigned(FOnOutput) then FOnOutput( Port, R[ReadNext]);146 if Assigned(FOnOutput) then FOnOutput(Device, Port, R[ReadNext]); 144 147 end; 145 148 inJump: IP := ReadNext;
Note:
See TracChangeset
for help on using the changeset viewer.