0.3.1
VRAM

Data Structures

struct  vdp2_vram_usage
 Not yet documented. More...
 
struct  vdp2_vram_ctl
 Not yet documented. More...
 
union  vdp2_vram_cycp_bank
 Not yet documented. More...
 
struct  vdp2_vram_cycp
 Not yet documented. More...
 
struct  vdp2_vram_cycp_bank.__unnamed138__
 Timings. More...
 

Macros

#define VDP2_VRAM_ADDR(_bank, _offset)   (0x25E00000UL + ((_bank) << 17) + (_offset))
 Not yet documented.
 
#define VDP2_VRAM_BANK(_address)   (((_address) >> 17) & 0x0007)
 Not yet documented.
 
#define VDP2_VRAM_SIZE   (0x00080000UL)
 Not yet documented.
 
#define VDP2_VRAM_BSIZE_2   (VDP2_VRAM_SIZE / 2)
 4 Mbit 2-split VRAM bank size
 
#define VDP2_VRAM_BSIZE_4   (VDP2_VRAM_SIZE / 4)
 4 Mbit 4-split VRAM bank size
 
#define VDP2_VRAM_CYCP_PNDR_NBG0   0x0
 NBG0 pattern name data read.
 
#define VDP2_VRAM_CYCP_PNDR_NBG1   0x1
 NBG1 pattern name data read.
 
#define VDP2_VRAM_CYCP_PNDR_NBG2   0x2
 NBG2 pattern name data read.
 
#define VDP2_VRAM_CYCP_PNDR_NBG3   0x3
 NBG3 pattern name data read.
 
#define VDP2_VRAM_CYCP_CHPNDR_NBG0   0x4
 NBG0 character pattern name data read.
 
#define VDP2_VRAM_CYCP_CHPNDR_NBG1   0x5
 NBG1 character pattern name data read.
 
#define VDP2_VRAM_CYCP_CHPNDR_NBG2   0x6
 NBG2 character pattern name data read.
 
#define VDP2_VRAM_CYCP_CHPNDR_NBG3   0x7
 NBG3 character pattern name data read.
 
#define VDP2_VRAM_CYCP_VCSTDR_NBG0   0xC
 NBG0 vertical cell scroll table data read.
 
#define VDP2_VRAM_CYCP_VCSTDR_NBG1   0xD
 NBG0 vertical cell scroll table data read.
 
#define VDP2_VRAM_CYCP_CPU_RW   0xE
 CPU read/write.
 
#define VDP2_VRAM_CYCP_NO_ACCESS   0xF
 No access.
 
#define VDP2_VRAM_CYCP_PNDR(_n)   ((_n) & 0x03)
 Pattern name data read.
 
#define VDP2_VRAM_CYCP_CHPNDR(_n)   (((_n) & 0x03) + 0x04)
 Character pattern name data read.
 
#define VDP2_VRAM_CYCP_VCSTDR(_n)   (((_n) & 0x01) + 0x0C)
 Vertical cell scroll table data read.
 

Typedefs

typedef uintptr_t vdp2_vram_t
 Not yet documented.
 
typedef enum vdp2_vram_bank vdp2_vram_bank_t
 Not yet documented.
 
typedef enum vdp2_vram_mode vdp2_vram_ctl_mode_t
 Not yet documented.
 
typedef enum vdp2_vram_ctl_coeff_table vdp2_vram_ctl_coeff_table_t
 Not yet documented.
 
typedef enum vdp2_vram_usage_type vdp2_vram_usage_type_t
 Not yet documented.
 
typedef struct vdp2_vram_usage vdp2_vram_usage_t
 Not yet documented.
 
typedef struct vdp2_vram_ctl vdp2_vram_ctl_t
 Not yet documented.
 
typedef union vdp2_vram_cycp_bank vdp2_vram_cycp_bank_t
 Not yet documented.
 
typedef struct vdp2_vram_cycp vdp2_vram_cycp_t
 Not yet documented.
 

Enumerations

enum  vdp2_vram_bank
 Not yet documented. More...
 
enum  vdp2_vram_mode
 Not yet documented. More...
 
enum  vdp2_vram_ctl_coeff_table
 Not yet documented. More...
 
enum  vdp2_vram_usage_type
 Not yet documented. More...
 

Functions

void vdp2_vram_control_set (const vdp2_vram_ctl_t *vram_ctl)
 Not yet documented.
 
void vdp2_vram_usage_set (const vdp2_vram_usage_t *vram_usage)
 Not yet documented.
 
vdp2_vram_cycp_tvdp2_vram_cycp_get (void)
 Retrieves the VRAM cycle patterns currently set in the VDP2 I/O shadow registers.
 
void vdp2_vram_cycp_set (const vdp2_vram_cycp_t *vram_cycp)
 Sets the VRAM cycle patterns for all 4 VDP2 VRAM banks.
 
void vdp2_vram_cycp_clear (void)
 Not yet documented.
 
vdp2_vram_cycp_bank_tvdp2_vram_cycp_bank_get (vdp2_vram_bank_t bank)
 Not yet documented.
 
void vdp2_vram_cycp_bank_set (vdp2_vram_bank_t bank, const vdp2_vram_cycp_bank_t *cycp_bank)
 Not yet documented.
 
void vdp2_vram_cycp_bank_clear (vdp2_vram_bank_t bank)
 Not yet documented.
 

Detailed Description

Description goes here.

There are two banks, A and B, each 262.144 bytes each. By default, Yaul splits VRAM into four banks.

4 Mbit
0x000000 +----------+
| A0 |
0x020000 +----------+
| A1 |
0x040000 +----------+
| B0 |
0x060000 +----------+
| B1 |
0x080000 +----------+

Data Structure Documentation

◆ vdp2_vram_usage

struct vdp2_vram_usage

Not yet documented.

Data Fields
vdp2_vram_usage_type_t a0 Not yet documented.
vdp2_vram_usage_type_t a1 Not yet documented.
vdp2_vram_usage_type_t b0 Not yet documented.
vdp2_vram_usage_type_t b1 Not yet documented.

◆ vdp2_vram_ctl

struct vdp2_vram_ctl

Not yet documented.

Data Fields
vdp2_vram_ctl_coeff_table_t coeff_table brief Coefficient table.
vdp2_vram_ctl_mode_t vram_mode VRAM mode bank partitions.

◆ vdp2_vram_cycp_bank

union vdp2_vram_cycp_bank

Not yet documented.

This is a general guideline for the number of accesses required.

Accesses required Type of access
1 Pattern name data (1-word or 2-words)
1 16-color character pattern or bitmap data
2 256-color character pattern or bitmap data
4 2048-color character pattern or bitmap data
4 32K-color character pattern or bitmap data
8 16M-color character pattern or bitmap data
1 Vertical cell scroll table data
Data Fields
uint32_t raw Raw 32-bit value.
struct vdp2_vram_cycp_bank.__unnamed138__ __unnamed__ Timings.

◆ vdp2_vram_cycp

struct vdp2_vram_cycp

Not yet documented.

Data Fields
vdp2_vram_cycp_bank_t pt[4] Not yet documented.

◆ vdp2_vram_cycp_bank.__unnamed138__

struct vdp2_vram_cycp_bank.__unnamed138__

Timings.

Data Fields
unsigned int t0:4 Timing 4-bit value (T0).
unsigned int t1:4 Timing 4-bit value (T1).
unsigned int t2:4 Timing 4-bit value (T2).
unsigned int t3:4 Timing 4-bit value (T3).
unsigned int t4:4 Timing 4-bit value (T4).
unsigned int t5:4 Timing 4-bit value (T5).
unsigned int t6:4 Timing 4-bit value (T6).
unsigned int t7:4 Timing 4-bit value (T7).

Macro Definition Documentation

◆ VDP2_VRAM_ADDR

#define VDP2_VRAM_ADDR (   _bank,
  _offset 
)    (0x25E00000UL + ((_bank) << 17) + (_offset))

Not yet documented.

Parameters
_bank
_offset

◆ VDP2_VRAM_BANK

#define VDP2_VRAM_BANK (   _address)    (((_address) >> 17) & 0x0007)

Not yet documented.

Parameters
_address

◆ VDP2_VRAM_CYCP_PNDR

#define VDP2_VRAM_CYCP_PNDR (   _n)    ((_n) & 0x03)

Pattern name data read.

Parameters
_nNormal scroll screen number 0 to 3.

◆ VDP2_VRAM_CYCP_CHPNDR

#define VDP2_VRAM_CYCP_CHPNDR (   _n)    (((_n) & 0x03) + 0x04)

Character pattern name data read.

Parameters
_nNormal scroll screen number 0 to 3.

◆ VDP2_VRAM_CYCP_VCSTDR

#define VDP2_VRAM_CYCP_VCSTDR (   _n)    (((_n) & 0x01) + 0x0C)

Vertical cell scroll table data read.

Parameters
_nNormal scroll screen number 0 to 1.

Enumeration Type Documentation

◆ vdp2_vram_bank

Not yet documented.

Enumerator
VDP2_VRAM_BANK_A0 

Not yet documented.

VDP2_VRAM_BANK_A1 

Not yet documented.

VDP2_VRAM_BANK_B0 

Not yet documented.

VDP2_VRAM_BANK_B1 

Not yet documented.

◆ vdp2_vram_mode

Not yet documented.

Enumerator
VDP2_VRAM_CTL_MODE_NO_PART_BANK_A 

Not yet documented.

VDP2_VRAM_CTL_MODE_NO_PART_BANK_B 

Not yet documented.

VDP2_VRAM_CTL_MODE_PART_BANK_A 

Partition VRAM-A into two banks.

VDP2_VRAM_CTL_MODE_PART_BANK_B 

Partition VRAM-B into two banks.

VDP2_VRAM_CTL_MODE_PART_BANK_BOTH 

Not yet documented.

◆ vdp2_vram_ctl_coeff_table

Not yet documented.

Enumerator
VDP2_VRAM_CTL_COEFF_TABLE_VRAM 

Store coefficient table in VRAM.

VDP2_VRAM_CTL_COEFF_TABLE_CRAM 

Store coefficient table in CRAM.

◆ vdp2_vram_usage_type

Not yet documented.

Enumerator
VDP2_VRAM_USAGE_TYPE_NONE 

Not yet documented.

VDP2_VRAM_USAGE_TYPE_COEFF_TBL 

Not yet documented.

VDP2_VRAM_USAGE_TYPE_PND 

Not yet documented.

VDP2_VRAM_USAGE_TYPE_CPD_BPD 

Not yet documented.

Function Documentation

◆ vdp2_vram_control_set()

void vdp2_vram_control_set ( const vdp2_vram_ctl_t vram_ctl)

Not yet documented.

Parameters
[in]vram_ctl

◆ vdp2_vram_usage_set()

void vdp2_vram_usage_set ( const vdp2_vram_usage_t vram_usage)

Not yet documented.

Parameters
[in]vram_usage

◆ vdp2_vram_cycp_get()

vdp2_vram_cycp_t * vdp2_vram_cycp_get ( void  )

Retrieves the VRAM cycle patterns currently set in the VDP2 I/O shadow registers.

Returns
A pointer to the vdp2_vram_cycp with the current VRAM cycle patterns.
See also
vdp2_ioregs

◆ vdp2_vram_cycp_set()

void vdp2_vram_cycp_set ( const vdp2_vram_cycp_t vram_cycp)

Sets the VRAM cycle patterns for all 4 VDP2 VRAM banks.

Parameters
[in]vram_cycp
See also
vdp2_vram_cycp_bank_set

◆ vdp2_vram_cycp_bank_get()

vdp2_vram_cycp_bank_t * vdp2_vram_cycp_bank_get ( vdp2_vram_bank_t  bank)

Not yet documented.

Parameters
bank
Returns
Not yet documented.

◆ vdp2_vram_cycp_bank_set()

void vdp2_vram_cycp_bank_set ( vdp2_vram_bank_t  bank,
const vdp2_vram_cycp_bank_t cycp_bank 
)

Not yet documented.

Parameters
bank
[in]cycp_bank

◆ vdp2_vram_cycp_bank_clear()

void vdp2_vram_cycp_bank_clear ( vdp2_vram_bank_t  bank)

Not yet documented.

Parameters
bank