Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:cdmfldr:02cdm003

Checking for Low Memory Pointers


Several titles submitted to The 3DO Company for encryption were accessing the lower 512 bytes of memory, which are reserved for the operating system. This often involved using the return value of a system or user function as the base address for a structure without checking whether that value was NULL.

To solve this problem, The 3DO Company offered each developer a hardware upgrade to the 3DO development system that facilitates easy detection of low memory pointers in 1994.

Why Avoiding Low Memory Access is Important

Even if a title that accesses low memory runs without errors on the current 3DO player, is not guaranteed to work on future hardware for two reasons:

  • Different manufacturers' hardware returns different values when low memory is accessed.
  • Future hardware or operating systems may not allow low memory access at all.

Warning: Titles must be low memory clean to receive a Right to Manufacture.

How to Detect and Remove Low Memory Pointers

To detect and remove low memory pointers, you need the following:

  • A version of your application. You can work with a development version, a cdrom.image file, or a CD-ROM.
  • The symbols file for your program. You need this file to identify where low memory pointers are used in your source code.
  • The 3DO Debugger 1.9b5 or later.
  • The 3DO operating system 1.3.1 or later.

With all required files available, go through the following steps:

<HTML><ol></HTML> <HTML><li></HTML><HTML><p></HTML>Run your application from the Debugger on a 3DO development system that has a low memory detection board.<HTML></p></HTML> <HTML><p></HTML>If you're not sure whether your Station has a low memory detection board, run the example code in “Checking for Low Memory Boards” below.<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML>Make sure the following windows are open: <HTML><ul></HTML> <HTML><li></HTML>Terminal window<HTML></li></HTML> <HTML><li></HTML>Disassembly window<HTML></li></HTML> <HTML><li></HTML>Register window<HTML></li></HTML> <HTML><li></HTML>Source window<HTML></li></HTML><HTML></ul></HTML> <HTML></li></HTML> <HTML><li></HTML>If you can test all parts of your application without problems, no additional action is necessary.<HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>If the program accesses low memory, it aborts where the access occurs displaying the following message:<HTML></p></HTML> <HTML><p></HTML>3DO Debug : Abort (Dat) = PC@address
<HTML></p></HTML> <HTML><p></HTML>address is the point in the program where the problem occurred.<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML>If you look at the Disassembly window and the Register window, you are likely to find that the program stopped when accessing an address lower than 00x1FF.<HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>If you look at the Source window, you are likely to find an error return value.<HTML></p></HTML> <HTML><p></HTML>In most cases, you have to modify your source code to check for NULL.<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML>Note the problem location for later correction.<HTML></li></HTML> <HTML><li></HTML>Try to continue from the Debugger, repeating the process until you have found all instances of low memory access. In some cases, for example, if the access happens during a loop, you may have to fix one problem and recompile your application before you can continue.<HTML></li></HTML><HTML></ol></HTML>

Checking for Low Memory Boards

If you're not sure whether your 3DO Station has a low memory board installed, compile and link the following program, then run it on the 3DO Station. This program stops, as explained above.

int main()
{
    int *addr=0;
    int i;
    
    i = *addr;
}
documentation/development/opera/pf25/ppgfldr/smmfldr/cdmfldr/02cdm003.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1