#include "libFireBird.h" static int looked = 0; static dword *bmCount = NULL; static dword *bmRec = NULL; static int bmMax = 0; // Locates firmware variables static void findBM() { word *bm; InitTAPex(); looked = 1; bm = (word*)FindInstructionSequence( "3c1681ee 3c1381ee 26d6b10c 2673b100 8f8487ec 26650008 0c055da3 26c60180", "fff00000 fff00000 ff000000 ff000000 ffff0000 ff0fffff fc000000 ff8ff000", 0x80100000, 0x80180000, 0, FALSE); if(bm == NULL) TAP_Print("No bookmark variables - unsupported firmware (fw: %d:%x)\n", SysID, ApplID); else { bmRec = (dword*)((bm[1]<<16)+(short)bm[5]); bmCount = (dword*)((bm[3]<<16)+(short)bm[7]); bmMax = bm[15] >> 3; } } // Returns bookmark count for the slot (0,1=RecSlot [Chase/Timeshift], 2=Play) dword getBookmarkCount(dword slot) { if(looked == 0) findBM(); if(bmCount && slot<=2) return bmCount[slot]; else return 0; } // Returns bookmark n for the slot (0,1=RecSlot [Chase/Timeshift], 2=Play) dword getBookmark(dword slot, dword n) { if(looked == 0) findBM(); if(bmRec && n