Linearly Allocates Vram in a bank and returns address to start of allocation. Allocation fails if there is not enough free space in the bank or if access requires too many cycles.
- Parameters
-
size | Number of bytes to allocate |
boundary | Byte Boundary that the allocation should be aligned to (must be multiple of 32 for all VDP2 Data types) |
bank | The VRAM bank to allocate in |
cycles | (Optional) Number of Bank Cycles this data will require to access during frame(0-8). |
- Returns
- void* start of the Allocated region in VRAM (nullptr if allocation failed)
- Note
- Any VRAM padded to maintain alignment to a requested boundary is rendered inaccessible to further allocations until VRAM is cleared and reset.