0.3.1
CRAM

Macros

#define VDP2_CRAM_ADDR(address)   (0x25F00000UL + ((address) << 1))
 Not yet documented.
 
#define VDP2_CRAM_MODE_0_OFFSET(_256_bank, _16_bank, _color_index)
 Not yet documented.
 
#define VDP2_CRAM_MODE_1_OFFSET(_256_bank, _16_bank, _color_index)    VDP2_CRAM_MODE_0_OFFSET(_256_bank, _16_bank, _color_index)
 Not yet documented.
 
#define VDP2_CRAM_MODE_2_OFFSET(_256_bank, _16_bank, _color_index)
 Not yet documented.
 
#define VDP2_CRAM_MODE_0_SIZE   0x0800
 RGB1555 1,024 colors mirrored.
 
#define VDP2_CRAM_MODE_1_SIZE   0x1000
 RGB1555 2,048 colors.
 
#define VDP2_CRAM_MODE_2_SIZE   0x1000
 RGB888 1,024 colors.
 
#define VDP2_CRAM_SIZE   0x1000
 Not yet documented.
 
#define COLOR_PALETTE_DATA   0x0000
 Not yet documented.
 
#define COLOR_RGB_DATA   0x8000
 Not yet documented.
 

Typedefs

typedef uint32_t vdp2_cram_mode_t
 32-bit address.
 
typedef uintptr_t vdp2_cram_t
 Not yet documented.
 

Functions

vdp2_cram_mode_t vdp2_cram_mode_get (void)
 Not yet documented.
 
void vdp2_cram_mode_set (vdp2_cram_mode_t mode)
 Not yet documented.
 
void vdp2_cram_offset_set (vdp2_scrn_t scroll_screen, vdp2_cram_t cram)
 Not yet documented.
 

Detailed Description

Color RAM (CRAM) stores color data of sprites and scroll screens.

R/W access from the CPU or DMA controller(s) is possible, but the image may be disturbed by the access timing. Access through CPU or DMA controller(s) is possible only in word units and long word units. Access in bytes is not allowed.

Macro Definition Documentation

◆ VDP2_CRAM_ADDR

#define VDP2_CRAM_ADDR (   address)    (0x25F00000UL + ((address) << 1))

Not yet documented.

Parameters
address

◆ VDP2_CRAM_MODE_0_OFFSET

#define VDP2_CRAM_MODE_0_OFFSET (   _256_bank,
  _16_bank,
  _color_index 
)
Value:
(0x25F00000UL + ((_256_bank) << 9) + \
((_16_bank) << 5) + \
((_color_index) << 1))

Not yet documented.

Parameters
_256_bank
_16_bank
_color_index

◆ VDP2_CRAM_MODE_1_OFFSET

#define VDP2_CRAM_MODE_1_OFFSET (   _256_bank,
  _16_bank,
  _color_index 
)     VDP2_CRAM_MODE_0_OFFSET(_256_bank, _16_bank, _color_index)

Not yet documented.

Parameters
_256_bank
_16_bank
_color_index

◆ VDP2_CRAM_MODE_2_OFFSET

#define VDP2_CRAM_MODE_2_OFFSET (   _256_bank,
  _16_bank,
  _color_index 
)
Value:
(0x25F00000UL + ((_256_bank) << 10) + \
((_16_bank) << 6) + \
((_color_index) << 2))

Not yet documented.

Parameters
_256_bank
_16_bank
_color_index

Function Documentation

◆ vdp2_cram_mode_get()

vdp2_cram_mode_t vdp2_cram_mode_get ( void  )

Not yet documented.

Returns
Not yet documented.

◆ vdp2_cram_mode_set()

void vdp2_cram_mode_set ( vdp2_cram_mode_t  mode)

Not yet documented.

Parameters
mode

◆ vdp2_cram_offset_set()

void vdp2_cram_offset_set ( vdp2_scrn_t  scroll_screen,
vdp2_cram_t  cram 
)

Not yet documented.

Parameters
scroll_screen
cram