If you have some comments or if you want more function please contact me at Replouf66@Hotmail.com
If you make a plugin for OfflineList please contact me, I will test it and
propose it on my web site.
Replouf66@Hotmail.com
type FSetSize = procedure(rom: PPChar; size:pInteger; newSize: Integer); stdcall; // this procedure is called to allocate memory for the rom. rom is a Pointer to a PCHAR, it will contain the rom. size indicate the current size of the rom. newSize indicate the new size to allocate for the PPChar. In this function, you need to do that: ReallocMem(rom^, newSize); size^ := newSize; type FPGetRom = procedure(rom: PPChar; size: pInteger; crc: pchar; patch:Integer; resize:FSetSize); stdcall; // you can call this procedure to get rom. rom : is a Pointer to a PCHAR, it will contain the rom. size : will indicate the size of rom. crc : indicate the CRC32 of the rom wanted. patch : indicate if the rom will be patched by the module. Use 0 for patch the rom, and for futher evolution use -1 if you don't want patch the rom. resize : indicate the address of your procedure FSetSize. type FPLaunchEmulatorFile = procedure(f:pchar); stdcall; // you can call this function to launch the emulator.SDK version "0.4" :
f : indicate the complete path of the rom (zipped or not). Ex: 'C:\dir\rom.zip' type FPLaunchEmulatorCRC = procedure(crc:PCHAR); stdcall; // you can call this function to launch the emulator. crc : indicate the crc of the rom you want play with the emulator. type
FPAddRoms = procedure(roms:PCHAR); // this function permit you to add roms by indicating the path of the roms. roms is a PCHAR who contains one or more roms (zipped or not). You need to concat all the path of all roms add finish the PCHAR by #0#0. Exemple: - for one rom: roms := 'C:\dir\foo.zip'+#0 + #0; - for more than one rom: roms := 'C:\dir\foo.zip'+#0 + 'D:\dir\foo2.gba'+#0 + ... + 'D:\dir\foox.gba'+#0 + #0;
type PGame = ^TGame; // a pointer to a TGame. TGame=record // this record indicate some information about the rom. nextGame: PGame; // the next game selected. crc: PChar; // indicate the crc of the rom file. name: PChar; // indicate the name of the game. named: PChar; // indicate the rom naming. num: Integer; // indicate the release number of the rom. size: Integer; // indicate the size of the rom. location: Integer; // indicate the location of the rom. 0 : Europe 1 : USA 2 : Germany 3 : China 4 : Spain 5 : France 6 : Italy 7 : Japan 8 : Nederland language: Integer; // indicate the Language(s) of the rom. 1 : French
2 : English
4 : Chinese
8 : Danish
16 : Dutch
32 : Finland
64 : German
128 : Italian
256 : Japanese
512 : Norwegian
1024 : Polish
2048 : Portuguese
4096 : Spanish
8192 : Swedish
16384 : English // if there are 2 english language in the game (like Harry potter), this one is the UK version
32768 : Portuguese // if there are 2 Portuguese language in the game (like Harry potter), this one is the BR version Exemple of use:
- if (game.language and 256) <> 0 then the Danish language is in the game. save: PChar; // indicate the save type of the rom. publisher: PChar; // this is the publisher of the game. sourceRom: PChar; // this is the group who release the first dump available for the rom. comment: PChar; // this is the comment available for this rom. end;
type TFunction=record getRom: FPGetRom; // call this procedure to receive a rom. launchEmulatorFile: FPLaunchEmulatorFile; // call this procedure to launch the emulator on a spécified file.
launchEmulatorCRC: FPLaunchEmulatorCRC; // call this procedure to launch the emulator on the game who have the specified CRC. addRoms: FPAddRoms; // with this function you can add roms to OfflineList. end;
Function/Procedure Summary | |
procedure | closePlugin; stdcall; This procedure is called when the plugin is deactivated. |
function | getAuthor : pchar; stdcall; |
function | getName : pchar; stdcall; This function returns the name of the plugin. |
function | getSDKVersion : pchar;
stdcall; *needed* This function returns the SDK version used by the plugin. |
function | getSmallComment
: pchar; stdcall; |
function | getVersion : pchar; stdcall; This function returns the version of the plugin. |
procedure | initPlugin(functions: TFunction;
dir:pchar); stdcall; *needed* This function is called when the plugin is activated. |
function | inMenu : pchar; stdcall; This function returns the list of menu who sould be displayed in plugin menu. |
function | inPopupMenu : pchar; stdcall; This function returns the list of menu who sould be displayed in context menu in the list of game. |
function | inPopupMenuHave : pchar;
stdcall; This function returns the list of menu who sould be displayed in context menu in the list of game (for having rom). |
function | inPopupMenuMiss : pchar;
stdcall; This function returns the list of menu who sould be displayed in context menu in the list of game (for missing rom). |
procedure | onPopupMenuClick(act:Integer;
game:TGame); stdcall; This procedure is called when the user click on the context menu of the list of game. |
procedure | onPopupMenuHaveClick(act:Integer;
game:TGame); stdcall; This procedure is called when the user click on the context menu of the list of game (for having rom). |
procedure | onPopupMenuMissClick(act:Integer;
game:TGame); stdcall; This procedure is called when the user click on the context menu of the list of game (for missing rom). |
procedure | onMenuClick(act:Integer);
stdcall; This procedure is called when the user click on the plugin menu. |
procedure | rename(language:Integer); stdcall; This procedure is called at startup of OfflineList and when the user change the selected language. |
procedure | setSize(rom: PPChar; size:pInteger;
newSize:Integer); stdcall; This function is called by the application to allocate the good space to receive a rom. |
Function/Procedure Detail |
procedure closePlugin; stdcall;
function getAuthor : pchar; stdcall;
function getName : pchar; stdcall;
function getSDKVersion : pchar; stdcall;
function getSmallComment : pchar; stdcall;
function getVersion : pchar; stdcall;
procedure initPlugin(functions: TFunction; dir:pchar); stdcall;
function inMenu : pchar; stdcall;
function inPopupMenu : pchar; stdcall;
function inPopupMenuHave : pchar; stdcall;
function inPopupMenuMiss : pchar; stdcall;
procedure onPopupMenuClick(act:Integer; game:PGame); stdcall;
procedure onPopupMenuHaveClick(act:Integer; game:PGame); stdcall;
procedure onPopupMenuMissClick(act:Integer; game:PGame); stdcall;
procedure onMenuClick(act:Integer); stdcall;
procedure rename(language:Integer); stdcall;
procedure setSize(rom: PPChar; size:pInteger; newSize:Integer); stdcall;
procedure setSize(rom: PPChar; size:pInteger; newSize:Integer); stdcall; begin ReallocMem(rom^, newSize); size^ := newSize; end;