📄 observerrominfo.pas
字号:
//////////////////////////////////////////////////////////////////////
// //
// observerROMInfo.pas: ROM header viewer //
// //
// The contents of this file are subject to the Bottled Light //
// Public License Version 1.0 (the "License"); you may not use this //
// file except in compliance with the License. You may obtain a //
// copy of the License at http://www.bottledlight.com/BLPL/ //
// //
// Software distributed under the License is distributed on an //
// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or //
// implied. See the License for the specific language governing //
// rights and limitations under the License. //
// //
// The Original Code is the Mappy VM User Interface, released //
// April 1st, 2003. The Initial Developer of the Original Code is //
// Bottled Light, Inc. Portions created by Bottled Light, Inc. are //
// Copyright (C) 2001-2003 Bottled Light, Inc. All Rights Reserved. //
// //
// Author(s): //
// Michael Noland (joat), michael@bottledlight.com //
// //
// Changelog: //
// 1.0: First public release (April 1st, 2003) //
// //
// Notes: //
// Currently disabled. //
// //
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
unit observerROMInfo; ////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
interface ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, cpuObservers, StdCtrls, console, nexus;
//////////////////////////////////////////////////////////////////////
type
TjdevROMInfo = class(TCpuObserver)
lgGameTitle: TLabel;
lGameTitle: TLabel;
lGameCode: TLabel;
lDeveloper: TLabel;
lGameVersion: TLabel;
lgGameVersion: TLabel;
lgDeveloper: TLabel;
lgGameCode: TLabel;
lgUnitCode: TLabel;
lUnitCode: TLabel;
lDeviceType: TLabel;
lCompliment: TLabel;
lChecksum: TLabel;
lgChecksum: TLabel;
lgCompliment: TLabel;
lgDeviceType: TLabel;
lHeaderGood: TLabel;
lHeaderBad: TLabel;
procedure FormCreate(Sender: TObject);
public
procedure UpdateObserver; override;
class function OCaption: string; override;
end;
//////////////////////////////////////////////////////////////////////
var
jdevROMInfo: TjdevROMInfo;
//////////////////////////////////////////////////////////////////////
implementation ///////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
{$R *.DFM}
//////////////////////////////////////////////////////////////////////
class function TjdevROMInfo.OCaption: string;
begin
Result := 'ROM Info';
end;
//////////////////////////////////////////////////////////////////////
procedure TjdevROMInfo.UpdateObserver;
begin
(* if Assigned(currentHeader) then begin
lGameTitle.Caption := currentHeader^.title;
lGameCode.Caption := currentHeader^.code;//Format('%8.8x', [currentHeader^.code]);
lDeveloper.Caption := currentHeader^.publisher[0] + currentHeader^.publisher[1];
lGameVersion.Caption := Format('%2.2x', [currentHeader^.version]);
lUnitCode.Caption := Format('%2.2x', [currentHeader^.unitCode]);
lDeviceType.Caption := Format('%2.2x', [currentHeader^.deviceType]);
lCompliment.Caption := Format('%2.2x', [currentHeader^.complement]);
lChecksum.Caption := Format('%4.4x', [currentHeader^.checksum]);
lHeaderGood.Caption := 'Header OK';
lHeaderBad.Caption := 'Invalid Header!';
lHeaderGood.Visible := isHeaderOk(currentHeader);
lHeaderBad.Visible := not lHeaderGood.Visible;
end else begin
lGameTitle.Caption := '';
lGameCode.Caption := '';
lDeveloper.Caption := '';
lGameVersion.Caption := '';
lUnitCode.Caption := '';
lDeviceType.Caption := '';
lCompliment.Caption := '';
lChecksum.Caption := '';
lHeaderBad.Caption := 'No cart!';
lHeaderBad.Visible := true;
end;*)
end;
//////////////////////////////////////////////////////////////////////
procedure TjdevROMInfo.FormCreate(Sender: TObject);
begin
HelpContext := LinkHelp('cartridge_info.html');
end;
//////////////////////////////////////////////////////////////////////
initialization
// RegisterObserver(TjdevROMInfo);
end.
//////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -