liberis
Enumerations | Functions
7up.h File Reference

Low-level access to the 7up video chips. More...

Go to the source code of this file.

Enumerations

enum  sup_low_mapsize {
  SUP_LOW_MAP_32X32 = 0, SUP_LOW_MAP_64X32 = 1, SUP_LOW_MAP_128X32 = 2, SUP_LOW_MAP_32X64 = 4,
  SUP_LOW_MAP_64X64 = 5, SUP_LOW_MAP_128X64 = 7
}
 Map sizes for the backgrounds. More...

Functions

void eris_low_sup_init (int chip)
 Initialize a 7up.
void eris_low_sup_set_video_mode (int chip, int hdispstrt, int hsyncwid, int hdispend, int hdispwid, int vdispstrt, int vsyncwid, int vdispwid, int vdispend)
 Setup a 7up's video mode.
void eris_low_sup_set_vram_write (int chip, u16 addr)
 Set the VRAM write address for a 7up chip.
void eris_low_sup_vram_write (int chip, u16 data)
 Write to VRAM on a 7up chip.
void eris_low_sup_set_vram_read (int chip, u16 addr)
 Set the VRAM read address for a 7up chip.
u16 eris_low_sup_vram_read (int chip)
 Read from VRAM from a 7up chip.
void eris_low_sup_set_control (int chip, int increment, int bg_show, int spr_show)
 Set controls for a 7up chip.
void eris_low_sup_set_interrupts (int chip, int vblank_irq, int raster_irq, int excess_spr, int spr_collision)
 Set interrupt information for a 7up chip.
void eris_low_sup_set_interrupt_raster (int chip, int raster)
 Set the raster to generate an IRQ from.
void eris_low_sup_set_scroll (int chip, u16 x, u16 y)
 Scroll a 7up background.
void eris_low_sup_do_dma (int chip, u16 src, u16 dst, u16 len)
 Perform a 7up DMA.
void eris_low_sup_setup_dma (int chip, int satb_repeat, int src_dec, int dst_dec, int vram_irq, int satb_irq)
 Setup the DMA on a 7up.
void eris_low_sup_set_satb_address (int chip, u16 addr)
 Sets the Sprite Attribute Table Block address.
void eris_low_sup_set_access_width (int chip, int cg_mode, sup_low_mapsize mapsize, int spr_px_w, int vram_px_w)
 Set access width information.

Detailed Description

Low-level access to the 7up video chips.


Enumeration Type Documentation

Map sizes for the backgrounds.

Enumerator:
SUP_LOW_MAP_32X32 

32x32 tile map. (256x256 pixel)

SUP_LOW_MAP_64X32 

64x32 tile map. (512x256 pixel)

SUP_LOW_MAP_128X32 

128x32 tile map. (1024x256 pixel)

SUP_LOW_MAP_32X64 

32x64 tile map. (256x512 pixel)

SUP_LOW_MAP_64X64 

64x64 tile map. (512x512 pixel)

SUP_LOW_MAP_128X64 

128x64 tile map. (1024x512 pixel)


Function Documentation

void eris_low_sup_do_dma ( int  chip,
u16  src,
u16  dst,
u16  len 
)

Perform a 7up DMA.

Parameters:
chipWhich 7up to DMA on. (0 ~ 1)
srcThe source address of the DMA.
dstThe destination of the DMA.
lenHow many 16bit words to transfer.
void eris_low_sup_init ( int  chip)

Initialize a 7up.

Parameters:
chipWhich 7up to initialize. (0 ~ 1)
void eris_low_sup_set_access_width ( int  chip,
int  cg_mode,
sup_low_mapsize  mapsize,
int  spr_px_w,
int  vram_px_w 
)

Set access width information.

See the hardware documentation for more information.

Parameters:
chipWhich 7up to set access width information for. (0 ~ 1)
cg_modeWhich character generation is used on vram_px_w = 3.
mapsizeSize of the background map.
spr_px_wSprite pixel width. See hardware documentation. (0 ~ 3)
vram_px_wVRAM pixel width. See hardware documentation. (0 ~ 3)
void eris_low_sup_set_control ( int  chip,
int  increment,
int  bg_show,
int  spr_show 
)

Set controls for a 7up chip.

Parameters:
chipWhich 7up to set controls for. (0 ~ 1)
incrementHow much to increment on every VRAM read/write. See hardwre documentation for which values.
bg_showWhether the BG should show or not.
spr_showWhether sprites should show or not.
void eris_low_sup_set_interrupt_raster ( int  chip,
int  raster 
)

Set the raster to generate an IRQ from.

Parameters:
chipWhich 7up to set the raster on. (0 ~ 1)
rasterWhich raster to generate an IRQ on.
void eris_low_sup_set_interrupts ( int  chip,
int  vblank_irq,
int  raster_irq,
int  excess_spr,
int  spr_collision 
)

Set interrupt information for a 7up chip.

Parameters:
chipWhich 7up to set interrupts for. (0 ~ 1)
vblank_irqWhether an IRQ should fire on VBlank.
raster_irqWhether an IRQ should fire on raster match.
excess_sprWhether an IRQ should fire on too many sprites per line.
spr_collisionWhether an IRQ should fire on a sprite overlapping sprite 0.
void eris_low_sup_set_satb_address ( int  chip,
u16  addr 
)

Sets the Sprite Attribute Table Block address.

Setting the address starts a VRAM->SATB DMA.

Parameters:
chipWhich 7up to set the SATB for. (0 ~ 1)
addrVRAM address for the start of the SATB.
void eris_low_sup_set_scroll ( int  chip,
u16  x,
u16  y 
)

Scroll a 7up background.

Parameters:
chipWhich 7up to scroll. (0 ~ 1)
xTop-left X coordinate of the background.
yTop-left Y coordinate of the background.
void eris_low_sup_set_video_mode ( int  chip,
int  hdispstrt,
int  hsyncwid,
int  hdispend,
int  hdispwid,
int  vdispstrt,
int  vsyncwid,
int  vdispwid,
int  vdispend 
)

Setup a 7up's video mode.

Parameters:
chipWhich 7up to configure. (0 ~ 1)
hdispstrtThe start of horizontal display, -1. (0 ~ 127)
hsyncwidThe length of hsync. (0 ~ 31)
hdispendThe end of horizontal display, -1. (0 ~ 127)
hdispwidThe length of horizontal display, -1. (0 ~ 127)
vdispstrtThe start of vertical display, -2. (0 ~ 255)
vsyncwidThe length of vsync. (0 ~ 31)
vdispwidThe length of vertical display, -1. (0 ~ 512)
vdispendThe end of vertical display. (0 ~ 255)
void eris_low_sup_set_vram_read ( int  chip,
u16  addr 
)

Set the VRAM read address for a 7up chip.

Parameters:
chipWhich 7up to set the read address for. (0 ~ 1)
addrNew VRAM address for read pointer.
void eris_low_sup_set_vram_write ( int  chip,
u16  addr 
)

Set the VRAM write address for a 7up chip.

Parameters:
chipWhich 7up to set the write address for. (0 ~ 1)
addrNew VRAM address for write pointer.
void eris_low_sup_setup_dma ( int  chip,
int  satb_repeat,
int  src_dec,
int  dst_dec,
int  vram_irq,
int  satb_irq 
)

Setup the DMA on a 7up.

Parameters:
chipWhich 7up to setup the DMA on. (0 ~ 1)
satb_repeatWhether to continually DMA the SATB after a transfer.
src_decIf 1, decrement the source address for each transfer. Otherwise, increment it.
dst_decIf 1, decrement the destination address for each transfer. Otherwise, increment it.
vram_irqFire an IRQ at the end of a VRAM->VRAM transfer.
satb_irqFire an IRq at the end of a VRAM->SATB transfer.
u16 eris_low_sup_vram_read ( int  chip)

Read from VRAM from a 7up chip.

Parameters:
chipWhich 7up to read data from. (0 ~ 1)
Returns:
The daata located at the read pointer address.
void eris_low_sup_vram_write ( int  chip,
u16  data 
)

Write to VRAM on a 7up chip.

Parameters:
chipWhich 7up to write data to. (0 ~ 1)
dataData to write.
 All Files Functions Typedefs Enumerations Enumerator Defines