diff --git a/backup/main.lfm b/backup/main.lfm
index caa85b5..c5f9e71 100644
--- a/backup/main.lfm
+++ b/backup/main.lfm
@@ -1,7 +1,7 @@
object GUIForm: TGUIForm
- Left = 2434
+ Left = 2111
Height = 668
- Top = 239
+ Top = 138
Width = 1014
AlphaBlendValue = 128
Caption = 'microM8 GUI'
@@ -334,20 +334,20 @@ object GUIForm: TGUIForm
TabOrder = 2
object sidecarPanel: TPanel
Left = 844
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alRight
BevelOuter = bvNone
Caption = 'sidecarPanel'
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 170
Color = clBlack
ParentColor = False
TabOrder = 0
object Image1: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alClient
@@ -5440,12 +5440,12 @@ object GUIForm: TGUIForm
end
object embedPanel: TPanel
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
BevelOuter = bvNone
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 844
Color = clBlack
Font.Color = clWhite
@@ -5457,7 +5457,7 @@ object GUIForm: TGUIForm
OnMouseUp = FormMouseUp
object backdrop: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
@@ -5467,6 +5467,94 @@ object GUIForm: TGUIForm
Stretch = True
end
end
+ object pnlMemory: TPanel
+ Left = 0
+ Height = 37
+ Top = 552
+ Width = 1014
+ Align = alBottom
+ ClientHeight = 37
+ ClientWidth = 1014
+ ParentColor = False
+ TabOrder = 2
+ Visible = False
+ object txtAddress: TEdit
+ Left = 136
+ Height = 23
+ Top = 8
+ Width = 80
+ TabStop = False
+ TabOrder = 1
+ Text = '$0400'
+ end
+ object Label1: TLabel
+ Left = 9
+ Height = 15
+ Top = 10
+ Width = 122
+ Caption = 'Memory Address (hex):'
+ ParentColor = False
+ end
+ object Label2: TLabel
+ Left = 240
+ Height = 15
+ Top = 10
+ Width = 60
+ Caption = 'Value (hex):'
+ ParentColor = False
+ end
+ object txtValue: TEdit
+ Left = 312
+ Height = 23
+ Top = 8
+ Width = 80
+ OnKeyPress = txtValueKeyPress
+ TabStop = False
+ TabOrder = 2
+ Text = '$00'
+ end
+ object pnlMemButtons: TPanel
+ Left = 760
+ Height = 35
+ Top = 1
+ Width = 253
+ Align = alRight
+ BevelOuter = bvNone
+ ClientHeight = 35
+ ClientWidth = 253
+ TabOrder = 0
+ object btnRead: TButton
+ Left = 8
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Read'
+ OnClick = btnReadClick
+ TabOrder = 0
+ TabStop = False
+ end
+ object btnWrite: TButton
+ Left = 88
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Write'
+ OnClick = btnWriteClick
+ TabOrder = 1
+ TabStop = False
+ end
+ object btnHide: TButton
+ Left = 168
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Close'
+ OnClick = btnHideClick
+ TabOrder = 2
+ TabStop = False
+ end
+ end
+ end
end
object MainMenu1: TMainMenu
Images = ToolbarIcons
@@ -5969,6 +6057,10 @@ object GUIForm: TGUIForm
ShortCut = 24796
OnClick = miVideoScreenshotClick
end
+ object miCopyText: TMenuItem
+ Caption = 'Copy Text Screen'
+ OnClick = miCopyTextClick
+ end
end
object Input: TMenuItem
Caption = 'Input'
@@ -6454,6 +6546,10 @@ object GUIForm: TGUIForm
ShortCut = 24642
OnClick = miToolsWebDebuggerClick
end
+ object miMemoryEdit: TMenuItem
+ Caption = 'Read/Write Memory'
+ OnClick = miMemoryEditClick
+ end
end
object miHelp: TMenuItem
Caption = 'Help'
diff --git a/backup/main.pas b/backup/main.pas
index 162aed7..7e9a825 100644
--- a/backup/main.pas
+++ b/backup/main.pas
@@ -22,6 +22,13 @@ type
{ TGUIForm }
TGUIForm = class(TForm)
+ btnRead: TButton;
+ btnWrite: TButton;
+ btnHide: TButton;
+ Label1: TLabel;
+ Label2: TLabel;
+ miMemoryEdit: TMenuItem;
+ miCopyText: TMenuItem;
miPasteText: TMenuItem;
N12: TMenuItem;
N11: TMenuItem;
@@ -82,6 +89,8 @@ type
backdrop: TImage;
Image1: TImage;
odFreezeFiles: TOpenDialog;
+ pnlMemButtons: TPanel;
+ pnlMemory: TPanel;
pnlContainer: TPanel;
ProfileMenu: TPopupMenu;
RecordingMenu: TPopupMenu;
@@ -302,7 +311,12 @@ type
tbRMColor: TToolButton;
tbMasterVolume: TTrackBar;
TrackBar2: TTrackBar;
+ txtAddress: TEdit;
+ txtValue: TEdit;
procedure backdropClick(Sender: TObject);
+ procedure btnHideClick(Sender: TObject);
+ procedure btnReadClick(Sender: TObject);
+ procedure btnWriteClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure CheckTimerTimer(Sender: TObject);
procedure DiskMenuClose(Sender: TObject);
@@ -357,6 +371,7 @@ type
procedure miColorDotsClick(Sender: TObject);
procedure miColorRasterClick(Sender: TObject);
procedure miColorVoxelsClick(Sender: TObject);
+ procedure miCopyTextClick(Sender: TObject);
procedure miCPU6502Click(Sender: TObject);
procedure miCPUTypeClick(Sender: TObject);
procedure miCPUWarpClick(Sender: TObject);
@@ -402,6 +417,7 @@ type
procedure miJSAxisSwapClick(Sender: TObject);
procedure miJSXRevClick(Sender: TObject);
procedure miJSYRevClick(Sender: TObject);
+ procedure miMemoryEditClick(Sender: TObject);
procedure miMMHelpClick(Sender: TObject);
procedure miMonoDotsClick(Sender: TObject);
procedure miMonoRasterClick(Sender: TObject);
@@ -472,6 +488,7 @@ type
procedure ToolTimerTimer(Sender: TObject);
procedure tbMasterVolumeChange(Sender: TObject);
procedure TrackBar2Change(Sender: TObject);
+ procedure txtValueKeyPress(Sender: TObject; var Key: char);
procedure UpdateRenderMode;
procedure UnFreeze;
procedure HideM8;
@@ -820,6 +837,14 @@ begin
UpdateConfig( 'video/init.video.hgrmode', '1', true );
end;
+procedure TGUIForm.miCopyTextClick(Sender: TObject);
+var
+ s: string;
+begin
+ s := SimpleGet(baseUrl+'/api/control/memory/screen/text');
+ ClipBoard.SetAsHTML( s, s );
+end;
+
procedure TGUIForm.miCPU6502Click(Sender: TObject);
begin
UpdateConfig('hardware/current.cpu.model', TMenuItem(sender).Caption, false );
@@ -1147,6 +1172,11 @@ begin
UpdateConfig( 'input/init.joystick.reversey', '1', true );
end;
+procedure TGUIForm.miMemoryEditClick(Sender: TObject);
+begin
+ pnlMemory.Visible := (not pnlMemory.Visible);
+end;
+
procedure TGUIForm.miMMHelpClick(Sender: TObject);
begin
SimpleGet(baseUrl + '/api/control/system/help');
@@ -1207,8 +1237,13 @@ end;
procedure TGUIForm.miPasteTextClick(Sender: TObject);
var
s: string;
+ Respo: TStringStream;
begin
s := ClipBoard.AsText;
+ if length(s) > 0 then
+ begin
+ SimpleFormPost(baseUrl+'/api/control/paste', s, Respo);
+ end;
end;
procedure TGUIForm.miPDFTO5sClick(Sender: TObject);
@@ -1585,7 +1620,7 @@ end;
procedure TGUIForm.miToolsClick(Sender: TObject);
begin
-
+ miMemoryEdit.Checked := pnlMemory.Visible;
end;
procedure TGUIForm.miToolsTrackerClick(Sender: TObject);
@@ -1951,6 +1986,14 @@ begin
end;
end;
+procedure TGUIForm.txtValueKeyPress(Sender: TObject; var Key: char);
+begin
+ if Key = #13 then
+ begin
+ btnWriteClick(sender);
+ end;
+end;
+
procedure TGUIForm.UnFreeze;
begin
SimpleGet(baseUrl + '/api/control/window/unfreeze');
@@ -2307,6 +2350,44 @@ begin
end;
+procedure TGUIForm.btnHideClick(Sender: TObject);
+begin
+ pnlMemory.Visible := false;
+end;
+
+procedure TGUIForm.btnReadClick(Sender: TObject);
+var
+ addr: string;
+ r: string;
+begin
+ try
+ addr := IntToStr( StrToInt(txtAddress.Text) );
+ r := SimpleGet(baseUrl+'/api/control/memory/read/'+addr);
+ txtValue.Text := '$' + IntToHex( StrToInt(r), 2 );
+ except
+ on e: Exception do begin
+ // don't update
+ end;
+ end;
+end;
+
+procedure TGUIForm.btnWriteClick(Sender: TObject);
+var
+ addr, value: string;
+ r: string;
+begin
+ try
+ addr := IntToStr( StrToInt(txtAddress.Text) );
+ value := IntToStr( StrToInt(txtValue.Text) );
+ r := SimpleGet(baseUrl+'/api/control/memory/write/'+addr+'/'+value);
+ txtValue.Text := '$' + IntToHex( StrToInt(r), 2 );
+ except
+ on e: Exception do begin
+ // don't update
+ end;
+ end;
+end;
+
{$IFDEF WINDOWS}
function TGUIForm.GetTitleOfActiveWindow: string;
var
@@ -2340,8 +2421,8 @@ procedure TGUIForm.CheckTimerTimer(Sender: TObject);
begin
if isFS then
exit;
- if MilliSecondsBetween(Now(), lastFocusLostTime) < 250 then
- exit;
+ //if MilliSecondsBetween(Now(), lastFocusLostTime) < 250 then
+ // exit;
if WindowState = wsMinimized then
exit;
if disableFocusStealing then
diff --git a/backup/poc.lpi b/backup/poc.lpi
index a7cca62..ea8d0b5 100644
--- a/backup/poc.lpi
+++ b/backup/poc.lpi
@@ -34,7 +34,7 @@
-
+
@@ -53,6 +53,13 @@
+
+
+
+
+
+
+
@@ -63,6 +70,7 @@
+
diff --git a/backup/poc.lps b/backup/poc.lps
index 2eb137a..ff0f1ed 100644
--- a/backup/poc.lps
+++ b/backup/poc.lps
@@ -4,7 +4,7 @@
-
+
@@ -21,8 +21,8 @@
-
-
+
+
@@ -53,128 +53,107 @@
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/x86_64-win64/main.lfm b/lib/x86_64-win64/main.lfm
index caa85b5..d93e15d 100644
--- a/lib/x86_64-win64/main.lfm
+++ b/lib/x86_64-win64/main.lfm
@@ -1,7 +1,7 @@
object GUIForm: TGUIForm
- Left = 2434
+ Left = 2111
Height = 668
- Top = 239
+ Top = 138
Width = 1014
AlphaBlendValue = 128
Caption = 'microM8 GUI'
@@ -334,20 +334,20 @@ object GUIForm: TGUIForm
TabOrder = 2
object sidecarPanel: TPanel
Left = 844
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alRight
BevelOuter = bvNone
Caption = 'sidecarPanel'
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 170
Color = clBlack
ParentColor = False
TabOrder = 0
object Image1: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alClient
@@ -5440,12 +5440,12 @@ object GUIForm: TGUIForm
end
object embedPanel: TPanel
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
BevelOuter = bvNone
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 844
Color = clBlack
Font.Color = clWhite
@@ -5457,7 +5457,7 @@ object GUIForm: TGUIForm
OnMouseUp = FormMouseUp
object backdrop: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
@@ -5467,6 +5467,95 @@ object GUIForm: TGUIForm
Stretch = True
end
end
+ object pnlMemory: TPanel
+ Left = 0
+ Height = 37
+ Top = 552
+ Width = 1014
+ Align = alBottom
+ ClientHeight = 37
+ ClientWidth = 1014
+ ParentColor = False
+ TabOrder = 2
+ Visible = False
+ object txtAddress: TEdit
+ Left = 136
+ Height = 23
+ Top = 8
+ Width = 80
+ OnKeyPress = txtAddressKeyPress
+ TabStop = False
+ TabOrder = 1
+ Text = '$0400'
+ end
+ object Label1: TLabel
+ Left = 9
+ Height = 15
+ Top = 10
+ Width = 122
+ Caption = 'Memory Address (hex):'
+ ParentColor = False
+ end
+ object Label2: TLabel
+ Left = 240
+ Height = 15
+ Top = 10
+ Width = 60
+ Caption = 'Value (hex):'
+ ParentColor = False
+ end
+ object txtValue: TEdit
+ Left = 312
+ Height = 23
+ Top = 8
+ Width = 80
+ OnKeyPress = txtValueKeyPress
+ TabStop = False
+ TabOrder = 2
+ Text = '$00'
+ end
+ object pnlMemButtons: TPanel
+ Left = 760
+ Height = 35
+ Top = 1
+ Width = 253
+ Align = alRight
+ BevelOuter = bvNone
+ ClientHeight = 35
+ ClientWidth = 253
+ TabOrder = 0
+ object btnRead: TButton
+ Left = 8
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Read'
+ OnClick = btnReadClick
+ TabOrder = 0
+ TabStop = False
+ end
+ object btnWrite: TButton
+ Left = 88
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Write'
+ OnClick = btnWriteClick
+ TabOrder = 1
+ TabStop = False
+ end
+ object btnHide: TButton
+ Left = 168
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Close'
+ OnClick = btnHideClick
+ TabOrder = 2
+ TabStop = False
+ end
+ end
+ end
end
object MainMenu1: TMainMenu
Images = ToolbarIcons
@@ -5969,6 +6058,10 @@ object GUIForm: TGUIForm
ShortCut = 24796
OnClick = miVideoScreenshotClick
end
+ object miCopyText: TMenuItem
+ Caption = 'Copy Text Screen'
+ OnClick = miCopyTextClick
+ end
end
object Input: TMenuItem
Caption = 'Input'
@@ -6454,6 +6547,10 @@ object GUIForm: TGUIForm
ShortCut = 24642
OnClick = miToolsWebDebuggerClick
end
+ object miMemoryEdit: TMenuItem
+ Caption = 'Read/Write Memory'
+ OnClick = miMemoryEditClick
+ end
end
object miHelp: TMenuItem
Caption = 'Help'
diff --git a/lib/x86_64-win64/main.o b/lib/x86_64-win64/main.o
index 4c88878..ffd0486 100644
Binary files a/lib/x86_64-win64/main.o and b/lib/x86_64-win64/main.o differ
diff --git a/lib/x86_64-win64/main.ppu b/lib/x86_64-win64/main.ppu
index c9d9e88..2b18969 100644
Binary files a/lib/x86_64-win64/main.ppu and b/lib/x86_64-win64/main.ppu differ
diff --git a/lib/x86_64-win64/poc.o b/lib/x86_64-win64/poc.o
index 01a5238..0dd88ca 100644
Binary files a/lib/x86_64-win64/poc.o and b/lib/x86_64-win64/poc.o differ
diff --git a/lib/x86_64-win64/poc.obj b/lib/x86_64-win64/poc.obj
index c0920b8..ddf4c46 100644
Binary files a/lib/x86_64-win64/poc.obj and b/lib/x86_64-win64/poc.obj differ
diff --git a/main.lfm b/main.lfm
index caa85b5..d93e15d 100644
--- a/main.lfm
+++ b/main.lfm
@@ -1,7 +1,7 @@
object GUIForm: TGUIForm
- Left = 2434
+ Left = 2111
Height = 668
- Top = 239
+ Top = 138
Width = 1014
AlphaBlendValue = 128
Caption = 'microM8 GUI'
@@ -334,20 +334,20 @@ object GUIForm: TGUIForm
TabOrder = 2
object sidecarPanel: TPanel
Left = 844
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alRight
BevelOuter = bvNone
Caption = 'sidecarPanel'
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 170
Color = clBlack
ParentColor = False
TabOrder = 0
object Image1: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 170
Align = alClient
@@ -5440,12 +5440,12 @@ object GUIForm: TGUIForm
end
object embedPanel: TPanel
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
BevelOuter = bvNone
- ClientHeight = 589
+ ClientHeight = 552
ClientWidth = 844
Color = clBlack
Font.Color = clWhite
@@ -5457,7 +5457,7 @@ object GUIForm: TGUIForm
OnMouseUp = FormMouseUp
object backdrop: TImage
Left = 0
- Height = 589
+ Height = 552
Top = 0
Width = 844
Align = alClient
@@ -5467,6 +5467,95 @@ object GUIForm: TGUIForm
Stretch = True
end
end
+ object pnlMemory: TPanel
+ Left = 0
+ Height = 37
+ Top = 552
+ Width = 1014
+ Align = alBottom
+ ClientHeight = 37
+ ClientWidth = 1014
+ ParentColor = False
+ TabOrder = 2
+ Visible = False
+ object txtAddress: TEdit
+ Left = 136
+ Height = 23
+ Top = 8
+ Width = 80
+ OnKeyPress = txtAddressKeyPress
+ TabStop = False
+ TabOrder = 1
+ Text = '$0400'
+ end
+ object Label1: TLabel
+ Left = 9
+ Height = 15
+ Top = 10
+ Width = 122
+ Caption = 'Memory Address (hex):'
+ ParentColor = False
+ end
+ object Label2: TLabel
+ Left = 240
+ Height = 15
+ Top = 10
+ Width = 60
+ Caption = 'Value (hex):'
+ ParentColor = False
+ end
+ object txtValue: TEdit
+ Left = 312
+ Height = 23
+ Top = 8
+ Width = 80
+ OnKeyPress = txtValueKeyPress
+ TabStop = False
+ TabOrder = 2
+ Text = '$00'
+ end
+ object pnlMemButtons: TPanel
+ Left = 760
+ Height = 35
+ Top = 1
+ Width = 253
+ Align = alRight
+ BevelOuter = bvNone
+ ClientHeight = 35
+ ClientWidth = 253
+ TabOrder = 0
+ object btnRead: TButton
+ Left = 8
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Read'
+ OnClick = btnReadClick
+ TabOrder = 0
+ TabStop = False
+ end
+ object btnWrite: TButton
+ Left = 88
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Write'
+ OnClick = btnWriteClick
+ TabOrder = 1
+ TabStop = False
+ end
+ object btnHide: TButton
+ Left = 168
+ Height = 25
+ Top = 5
+ Width = 75
+ Caption = 'Close'
+ OnClick = btnHideClick
+ TabOrder = 2
+ TabStop = False
+ end
+ end
+ end
end
object MainMenu1: TMainMenu
Images = ToolbarIcons
@@ -5969,6 +6058,10 @@ object GUIForm: TGUIForm
ShortCut = 24796
OnClick = miVideoScreenshotClick
end
+ object miCopyText: TMenuItem
+ Caption = 'Copy Text Screen'
+ OnClick = miCopyTextClick
+ end
end
object Input: TMenuItem
Caption = 'Input'
@@ -6454,6 +6547,10 @@ object GUIForm: TGUIForm
ShortCut = 24642
OnClick = miToolsWebDebuggerClick
end
+ object miMemoryEdit: TMenuItem
+ Caption = 'Read/Write Memory'
+ OnClick = miMemoryEditClick
+ end
end
object miHelp: TMenuItem
Caption = 'Help'
diff --git a/main.pas b/main.pas
index d8726bb..7ef7bd9 100644
--- a/main.pas
+++ b/main.pas
@@ -22,6 +22,13 @@ type
{ TGUIForm }
TGUIForm = class(TForm)
+ btnRead: TButton;
+ btnWrite: TButton;
+ btnHide: TButton;
+ Label1: TLabel;
+ Label2: TLabel;
+ miMemoryEdit: TMenuItem;
+ miCopyText: TMenuItem;
miPasteText: TMenuItem;
N12: TMenuItem;
N11: TMenuItem;
@@ -82,6 +89,8 @@ type
backdrop: TImage;
Image1: TImage;
odFreezeFiles: TOpenDialog;
+ pnlMemButtons: TPanel;
+ pnlMemory: TPanel;
pnlContainer: TPanel;
ProfileMenu: TPopupMenu;
RecordingMenu: TPopupMenu;
@@ -302,7 +311,12 @@ type
tbRMColor: TToolButton;
tbMasterVolume: TTrackBar;
TrackBar2: TTrackBar;
+ txtAddress: TEdit;
+ txtValue: TEdit;
procedure backdropClick(Sender: TObject);
+ procedure btnHideClick(Sender: TObject);
+ procedure btnReadClick(Sender: TObject);
+ procedure btnWriteClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure CheckTimerTimer(Sender: TObject);
procedure DiskMenuClose(Sender: TObject);
@@ -357,6 +371,7 @@ type
procedure miColorDotsClick(Sender: TObject);
procedure miColorRasterClick(Sender: TObject);
procedure miColorVoxelsClick(Sender: TObject);
+ procedure miCopyTextClick(Sender: TObject);
procedure miCPU6502Click(Sender: TObject);
procedure miCPUTypeClick(Sender: TObject);
procedure miCPUWarpClick(Sender: TObject);
@@ -402,6 +417,7 @@ type
procedure miJSAxisSwapClick(Sender: TObject);
procedure miJSXRevClick(Sender: TObject);
procedure miJSYRevClick(Sender: TObject);
+ procedure miMemoryEditClick(Sender: TObject);
procedure miMMHelpClick(Sender: TObject);
procedure miMonoDotsClick(Sender: TObject);
procedure miMonoRasterClick(Sender: TObject);
@@ -472,6 +488,8 @@ type
procedure ToolTimerTimer(Sender: TObject);
procedure tbMasterVolumeChange(Sender: TObject);
procedure TrackBar2Change(Sender: TObject);
+ procedure txtAddressKeyPress(Sender: TObject; var Key: char);
+ procedure txtValueKeyPress(Sender: TObject; var Key: char);
procedure UpdateRenderMode;
procedure UnFreeze;
procedure HideM8;
@@ -820,6 +838,14 @@ begin
UpdateConfig( 'video/init.video.hgrmode', '1', true );
end;
+procedure TGUIForm.miCopyTextClick(Sender: TObject);
+var
+ s: string;
+begin
+ s := SimpleGet(baseUrl+'/api/control/memory/screen/text');
+ ClipBoard.SetAsHTML( s, s );
+end;
+
procedure TGUIForm.miCPU6502Click(Sender: TObject);
begin
UpdateConfig('hardware/current.cpu.model', TMenuItem(sender).Caption, false );
@@ -1147,6 +1173,11 @@ begin
UpdateConfig( 'input/init.joystick.reversey', '1', true );
end;
+procedure TGUIForm.miMemoryEditClick(Sender: TObject);
+begin
+ pnlMemory.Visible := (not pnlMemory.Visible);
+end;
+
procedure TGUIForm.miMMHelpClick(Sender: TObject);
begin
SimpleGet(baseUrl + '/api/control/system/help');
@@ -1590,7 +1621,7 @@ end;
procedure TGUIForm.miToolsClick(Sender: TObject);
begin
-
+ miMemoryEdit.Checked := pnlMemory.Visible;
end;
procedure TGUIForm.miToolsTrackerClick(Sender: TObject);
@@ -1956,6 +1987,22 @@ begin
end;
end;
+procedure TGUIForm.txtAddressKeyPress(Sender: TObject; var Key: char);
+begin
+ if Key = #13 then
+ begin
+ btnReadClick(sender);
+ end;
+end;
+
+procedure TGUIForm.txtValueKeyPress(Sender: TObject; var Key: char);
+begin
+ if Key = #13 then
+ begin
+ btnWriteClick(sender);
+ end;
+end;
+
procedure TGUIForm.UnFreeze;
begin
SimpleGet(baseUrl + '/api/control/window/unfreeze');
@@ -2312,6 +2359,44 @@ begin
end;
+procedure TGUIForm.btnHideClick(Sender: TObject);
+begin
+ pnlMemory.Visible := false;
+end;
+
+procedure TGUIForm.btnReadClick(Sender: TObject);
+var
+ addr: string;
+ r: string;
+begin
+ try
+ addr := IntToStr( StrToInt(txtAddress.Text) );
+ r := SimpleGet(baseUrl+'/api/control/memory/read/'+addr);
+ txtValue.Text := '$' + IntToHex( StrToInt(r), 2 );
+ except
+ on e: Exception do begin
+ // don't update
+ end;
+ end;
+end;
+
+procedure TGUIForm.btnWriteClick(Sender: TObject);
+var
+ addr, value: string;
+ r: string;
+begin
+ try
+ addr := IntToStr( StrToInt(txtAddress.Text) );
+ value := IntToStr( StrToInt(txtValue.Text) );
+ r := SimpleGet(baseUrl+'/api/control/memory/write/'+addr+'/'+value);
+ txtValue.Text := '$' + IntToHex( StrToInt(r), 2 );
+ except
+ on e: Exception do begin
+ // don't update
+ end;
+ end;
+end;
+
{$IFDEF WINDOWS}
function TGUIForm.GetTitleOfActiveWindow: string;
var
@@ -2345,8 +2430,8 @@ procedure TGUIForm.CheckTimerTimer(Sender: TObject);
begin
if isFS then
exit;
- if MilliSecondsBetween(Now(), lastFocusLostTime) < 250 then
- exit;
+ //if MilliSecondsBetween(Now(), lastFocusLostTime) < 250 then
+ // exit;
if WindowState = wsMinimized then
exit;
if disableFocusStealing then
diff --git a/poc.lpr b/poc.lpr
index 099684b..633d420 100644
--- a/poc.lpr
+++ b/poc.lpr
@@ -7,8 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
- Forms, lazopenglcontext, main, mixer
- { you can add units after this };
+ Forms, lazopenglcontext, main, mixer;
{$R *.res}
diff --git a/poc.lps b/poc.lps
index 2220d03..08c4388 100644
--- a/poc.lps
+++ b/poc.lps
@@ -4,7 +4,7 @@
-
+
@@ -21,8 +21,8 @@
-
-
+
+
@@ -53,124 +53,106 @@
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-