# GetBankBits

Finds out which VRAM bank contains a memory location.

### Synopsis

`uint32 GetBankBits( const void *a )`

### Description

In the current 3DO hardware, 2 MB of video random-access memory (VRAM) is divided into two banks, each containing 1 MB of VRAM. Fast VRAM memory transfers using the SPORT bus can take place only between memory locations in the same bank. Use this procedure to find out which VRAM bank contains a specified memory location.

When a task allocates VRAM, the memory block contains memory from one VRAM bank or the other; it never contains memory from both banks. Thus, if any memory location in a block is in one VRAM bank, the entire block is guaranteed to be in the same bank.

### Arguments

a
  A pointer to the memory to be examined.

### Return Value

The procedure returns a set of memory flags in which the following flags can be set:

MEMTYPE_BANKSELECT
  Set if the memory is contained in VRAM.

MEMTYPE_BANK1
  Set if the memory is in the primary VRAM Bank.

MEMTYPE_BANK2
  Set if the memory is in the secondary VRAM bank.

If the memory is not in VRAM, the procedure returns 0.

### Implementation

Macro implemented in mem.h V20.

### Associated Files

mem.h
  ANSI C Macro

### See Also

``GetMemType`()`

#