Changeset 6 for trunk/SharpMz800.pas
- Timestamp:
- Apr 19, 2026, 10:45:05 AM (8 days ago)
- File:
-
- 1 edited
-
trunk/SharpMz800.pas (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SharpMz800.pas
r5 r6 4 4 5 5 uses 6 Classes, SysUtils, CpuZ80, Memory, Base;6 Classes, SysUtils, Z80, Memory, Base; 7 7 8 8 type … … 14 14 TSharpMz800 = class 15 15 private 16 FOnMemoryMappingChange: TNotifyEvent; 16 17 WriteFormatRegister: Byte; // WF 17 18 ReadFormatRegister: Byte; // RF … … 27 28 procedure MesssageExecute(Text: string); 28 29 procedure UpdateMemoryMapping; 30 procedure DoMemoryMappingChange; 29 31 public 30 32 Cpu: TCpuZ80; … … 41 43 destructor Destroy; override; 42 44 property OnMessage: TMessageEvent read FOnMessage write FOnMessage; 45 property OnMemoryMappingChange: TNotifyEvent read FOnMemoryMappingChange 46 write FOnMemoryMappingChange; 43 47 end; 44 48 … … 75 79 end; 76 80 $e0..$e6: MemoryBankControl[Address - $e0] := Data; 81 else MesssageExecute('Unsupported I/O port ' + IntToHex(Address, 4) + ' data ' + IntToHex(Data, 2)); 77 82 end; 78 83 end; … … 102 107 end; 103 108 MappedMemory.Areas.AddNew($0, Memory); 109 if Assigned(Cpu) then 110 TThread.Synchronize(Cpu.Thread, DoMemoryMappingChange); 111 end; 112 113 procedure TSharpMz800.DoMemoryMappingChange; 114 begin 115 if Assigned(OnMemoryMappingChange) then 116 FOnMemoryMappingChange(nil); 104 117 end; 105 118 … … 141 154 MappedIO.Size := 8; 142 155 MappedIO.BasePort := $d0; 156 MappedIO.OnInput := CpuInput; 157 MappedIO.OnOutput := CpuOutput; 143 158 UpdateMemoryMapping; 144 159 Cpu := TCpuZ80.Create;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/mzxemu/chrome/site/your_project_logo.png)