/*============================================================================== * * $Id: patch.h,v 1.6 2004/07/15 13:16:31 Olivier Exp $ * * - GhostBuster for TI89 Titanium - * Copyright (C) 2004 Olivier Armand * and Kevin Kofler * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. * * In addition, as a special exception, Olivier Armand and Kevin Kofler give * permission to link the code of this program with the ttunpack decompression * library by the TI-Chess Team, and distribute linked combinations including * the two. You must obey the GNU General Public License in all respects for * all of the code used other than the ttunpack decompression library. If you * modify this program, you may extend this exception to your version of the * program, but you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * *==============================================================================*/ #ifndef PATCH_H #define PATCH_H unsigned short ApplyPatches(unsigned char *prgm, unsigned long prgm_len); /* The stub is defined in stub.asm. */ extern void StubHead, StubTail; extern short StubRunPrgm; #if 0 /* Size of the stub added at the beginning of the patched program , defined in * stub.asm. */ extern unsigned long STUB_SIZE; #else #define STUB_SIZE 0 #endif /* Patch for ROM_BASE defined in rombase.asm. */ unsigned short PatchRomBase(unsigned char *prgm_head, unsigned char *prgm_tail) __attribute__ ((__regparm__(2))); #endif /* not PATCH_H */