liberis
|
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. |
Low-level access to the 7up video chips.
enum sup_low_mapsize |
Map sizes for the backgrounds.
Perform a 7up DMA.
chip | Which 7up to DMA on. (0 ~ 1) |
src | The source address of the DMA. |
dst | The destination of the DMA. |
len | How many 16bit words to transfer. |
void eris_low_sup_init | ( | int | chip | ) |
Initialize a 7up.
chip | Which 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.
chip | Which 7up to set access width information for. (0 ~ 1) |
cg_mode | Which character generation is used on vram_px_w = 3. |
mapsize | Size of the background map. |
spr_px_w | Sprite pixel width. See hardware documentation. (0 ~ 3) |
vram_px_w | VRAM 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.
chip | Which 7up to set controls for. (0 ~ 1) |
increment | How much to increment on every VRAM read/write. See hardwre documentation for which values. |
bg_show | Whether the BG should show or not. |
spr_show | Whether sprites should show or not. |
void eris_low_sup_set_interrupt_raster | ( | int | chip, |
int | raster | ||
) |
Set the raster to generate an IRQ from.
chip | Which 7up to set the raster on. (0 ~ 1) |
raster | Which 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.
chip | Which 7up to set interrupts for. (0 ~ 1) |
vblank_irq | Whether an IRQ should fire on VBlank. |
raster_irq | Whether an IRQ should fire on raster match. |
excess_spr | Whether an IRQ should fire on too many sprites per line. |
spr_collision | Whether 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.
chip | Which 7up to set the SATB for. (0 ~ 1) |
addr | VRAM address for the start of the SATB. |
Scroll a 7up background.
chip | Which 7up to scroll. (0 ~ 1) |
x | Top-left X coordinate of the background. |
y | Top-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.
chip | Which 7up to configure. (0 ~ 1) |
hdispstrt | The start of horizontal display, -1. (0 ~ 127) |
hsyncwid | The length of hsync. (0 ~ 31) |
hdispend | The end of horizontal display, -1. (0 ~ 127) |
hdispwid | The length of horizontal display, -1. (0 ~ 127) |
vdispstrt | The start of vertical display, -2. (0 ~ 255) |
vsyncwid | The length of vsync. (0 ~ 31) |
vdispwid | The length of vertical display, -1. (0 ~ 512) |
vdispend | The 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.
chip | Which 7up to set the read address for. (0 ~ 1) |
addr | New 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.
chip | Which 7up to set the write address for. (0 ~ 1) |
addr | New 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.
chip | Which 7up to setup the DMA on. (0 ~ 1) |
satb_repeat | Whether to continually DMA the SATB after a transfer. |
src_dec | If 1, decrement the source address for each transfer. Otherwise, increment it. |
dst_dec | If 1, decrement the destination address for each transfer. Otherwise, increment it. |
vram_irq | Fire an IRQ at the end of a VRAM->VRAM transfer. |
satb_irq | Fire 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.
chip | Which 7up to read data from. (0 ~ 1) |
void eris_low_sup_vram_write | ( | int | chip, |
u16 | data | ||
) |
Write to VRAM on a 7up chip.
chip | Which 7up to write data to. (0 ~ 1) |
data | Data to write. |