 |
EM_getArchiveMemoryBeginning |
Function (ROM Call 0x3CF) |
Returns a pointer to the first byte of the archive memory area.
This ROM_CALL first calls OO_GetEndOfAllFlashApps
and rounds the result up to the next Flash sector boundary (multiple of 64 KB). Then, it calls a
subroutine which, on two hardware models, increases the address to artificially reduce the amount of
usable archive memory (MaxMem, XPand and tiosmod+amspatch nullify this code):
- on 89 HW1 and 92+ HW1 running AMS 2.xx, capping to
ROM_base+0x190000
(see
CappedHW1ArchiveMemoryBeginning) - this is
the size hard-coded in AMS 1.xx;
- on V200, capping to
0x500000
(ROM_base+0x300000
).
Finally, it returns the result to the user.
The capping described above can be defeated on both hardware models. This ROM_CALL and
OO_GetEndOfAllFlashApps can be used to
detect whether the capping was defeated.
Uses: FL_getHardwareParmBlock, AB_getGateArrayVersion, OO_GetEndOfAllFlashApps, CappedHW1ArchiveMemoryBeginning
Used by: HeapShuffle, HeapUnlock, EM_abandon, EM_findEmptySlot, EM_survey, EM_write, ROM Call 0x3CE
See also: OO_GetFirstFlashAppSectorAddress, CappedHW1ArchiveMemoryBeginning