unit lunardll;
interface
uses windows;
const
    LC_READONLY = 1;
    LC_READWRITE = 1;
    LC_CREATEREADWRITE = 2;
    LC_NOSEEK  = 0;
    LC_SEEK = 1;
    LC_NOBANK = 0;
    LC_LOROM = 1;
    LC_HIROM = 2;
    LC_EXROM = 4;
    LC_NOHEADER = 0;
    LC_HEADER = 1;
    RATF_FORMAT = $FF;
    RATF_LOROM = $100;
    RATF_HIROM = $200;
    RATF_EXLOROM = $10000;
    RATF_EXHIROM = $400;
    RATF_EXROM = $400;
    RATF_COMPRESSED = $800;
    RATF_NOERASERAT = $1000;
    RATF_NOWRITERAT = $2000;
    RATF_NOERASEDATA = $4000;
    RATF_NOWRITEDATA = $8000;

function LunarCloseFile: Bool stdcall;
function LunarOpenFile(FileName: PChar;FileMode: longint): Bool stdcall;
function LunarGetFileSize: longint stdcall;
function LunarReadFile(var Destination: Byte;Size: longint;Address: Longint;Seek: longint): longint stdcall;
function LunarWriteRatArea(var TheData: Byte;Size: longint;PreferedAddress: longint;MinRange: longint; MaxRange: longint;Flags: longint):longint stdcall;
function LunarWriteFile(var Source: Byte;Size: longint;Address: Longint;Seek: longint): longint stdcall;
function LunarVerifyFreeSpace(AddressStart: longint;AddressEnd: longint;Size: longint;BankType: longint): longint stdcall;
function LunarSNEStoPC(Pointer: longint;ROMType: longint;Header: longint): longint stdcall;
function LunarPCtoSNES(Pointer: longint;ROMType: longint;Header: longint): longint stdcall;
function LunarEraseRatArea(Address: longint;Size: longint;Flags: longint): Bool stdcall;
function LunarExpandROM(Mbits: longint): longint stdcall;
implementation

function LunarCloseFile; external 'Lunar Compress.dll';
function LunarOpenFile; external 'Lunar Compress.dll';
function LunarGetFileSize; external 'Lunar Compress.dll';
function LunarReadFile; external 'Lunar Compress.dll';
function LunarSNEStoPC; external 'Lunar Compress.dll';
function LunarPCtoSNES; external 'Lunar Compress.dll';
function LunarEraseRatArea; external 'Lunar Compress.dll';
function LunarWriteRatArea; external 'Lunar Compress.dll';
function LunarExpandROM; external 'Lunar Compress.dll';
function LunarWriteFile; external 'Lunar Compress.dll';
function LunarVerifyFreeSpace; external 'Lunar Compress.dll';

end.
