35#ifndef __JO_VDP2_MALLOC_H__
36# define __JO_VDP2_MALLOC_H__
41# define JO_VDP2_KTABLE_SIZE (0x1FE00)
42# define JO_VDP2_ROTATION_TABLE_SIZE (0x00080)
43# define JO_VDP2_MAP_SIZE (8192)
45# define JO_VDP2_PRINTF_CELL_OFFSET (0x60000)
46# define JO_VDP2_PRINTF_CELL_SIZE (0x2000)
48# define JO_VDP2_PRINTF_MAP_OFFSET (0x76000)
49# define JO_VDP2_CELL_TO_MAP_OFFSET(CELL_PTR) JO_DIV_BY_32(JO_MOD_POW2((int)CELL_PTR, JO_VDP2_BANK_SIZE))
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition types.h:39
void * jo_vdp2_malloc(const jo_vdp2_ram_usage usage, const unsigned int n)
Dynamic VDP2 memory allocator.
static __jo_force_inline void * jo_vdp2_malloc_autosize(const jo_vdp2_ram_usage usage)
Dynamic VDP2 memory allocator for known size usage (JO_VDP2_RAM_RTABLE, JO_VDP2_RAM_KTABLE,...
Definition vdp2_malloc.h:95
jo_vdp2_ram_usage
Definition vdp2_malloc.h:52
@ JO_VDP2_RAM_MAP_NBG1
Definition vdp2_malloc.h:57
@ JO_VDP2_RAM_BITMAP_NBG0
CELL (NBG0 and NBG1 bitmaps).
Definition vdp2_malloc.h:76
@ JO_VDP2_RAM_CELL_RBG0
Definition vdp2_malloc.h:70
@ JO_VDP2_RAM_MAP_NBG2
Definition vdp2_malloc.h:58
@ JO_VDP2_RAM_MAP_NBG3
Definition vdp2_malloc.h:59
@ JO_VDP2_RAM_USER
For user (in the bank B1, with the maps and the cells of NBG0, NBG2 and NBG3).
Definition vdp2_malloc.h:54
@ JO_VDP2_RAM_KTABLE
KTABLE (rotation coefficient table).
Definition vdp2_malloc.h:62
@ JO_VDP2_RAM_BITMAP_NBG1
Definition vdp2_malloc.h:77
@ JO_VDP2_RAM_RTABLE
Rotation table (rotation parameters).
Definition vdp2_malloc.h:64
@ JO_VDP2_RAM_MAP_RBG0
Definition vdp2_malloc.h:60
@ JO_VDP2_RAM_COLOR
Color RAM for Palette, etc.
Definition vdp2_malloc.h:79
@ JO_VDP2_RAM_CELL_NBG0
CELL (rotation and normal scroll screen cells).
Definition vdp2_malloc.h:66
@ JO_VDP2_RAM_BACK_COLOR
Back color (back screen color).
Definition vdp2_malloc.h:72
@ JO_VDP2_RAM_MAP_NBG0
MAP (rotation and normal scroll screen maps).
Definition vdp2_malloc.h:56
@ JO_VDP2_RAM_CELL_NBG3
Definition vdp2_malloc.h:69
@ JO_VDP2_RAM_CELL_NBG1
Definition vdp2_malloc.h:67
@ JO_VDP2_LINE_COLOR_TABLE
Line color table (line color screen).
Definition vdp2_malloc.h:81
@ JO_VDP2_RAM_CELL_NBG2
Definition vdp2_malloc.h:68
@ JO_VDP2_RAM_LINE_SCROLL
Line Scroll table (NBG0 and NBG1 line scroll).
Definition vdp2_malloc.h:74
void jo_vdp2_free(const void *const p)
function frees VDP2 memory space pointed to by p