liberis
|
Controls the NEW Iron Guanyin (Tetsu kannon) chip (Video Controller) More...
#include <eris/types.h>
Go to the source code of this file.
Enumerations | |
enum | tetsu_lines { TETSU_LINES_263 = 0, TETSU_LINES_262 = 1, TETSU_LINES_INTERLACED = 2, TETSU_LINES_UNKNOWN = 3 } |
Number of vertical lines to display. More... | |
enum | tetsu_dotclock { TETSU_DOTCLOCK_5MHz = 0, TETUS_DOTCLOCK_7MHz = 1 } |
Dot clock. Determines screen width. More... | |
enum | tetsu_colordepth { TETSU_COLORS_16 = 0, TETSU_COLORS_256 = 1 } |
Amount of colors (to display?). More... | |
enum | tetsu_coeff { TETSU_NO_COEFF = 0, TETSU_COEFF_1 = 1, TETSU_COEFF_2 = 2, TETSU_COEFF_3 = 3 } |
Which coefficient to use for cellophane. More... | |
Functions | |
void | eris_tetsu_init () |
Initialize the NEW Iron Guanyin. | |
void | eris_tetsu_set_video_mode (tetsu_lines lines, int ext_sync, tetsu_dotclock dotclock, tetsu_colordepth bg_depth, tetsu_colordepth spr_depth, int bg7up_show, int spr7up_show, int bg0_disp, int bg1_disp, int bg2_disp, int bg3_disp, int rainbow_disp) |
Setup the video mode. | |
void | eris_tetsu_set_palette (u16 pal_entry, u16 color) |
Set a palette entry. | |
void | eris_tetsu_set_7up_palette (u8 bg7up, u8 spr7up) |
Which palette to use for the 7up chips. | |
void | eris_tetsu_set_king_palette (u8 bg0, u8 bg1, u8 bg2, u8 bg3) |
Which palette to use for the KING backgrounds. | |
void | eris_tetsu_set_rainbow_palette (u8 rainbow) |
Which palette to use for RAIBOW. | |
void | eris_tetsu_set_priorities (u8 bg7up, u8 spr7up, u8 bg0, u8 bg1, u8 bg2, u8 bg3, u8 rainbow) |
Set layer priorities. | |
void | eris_tetsu_set_chroma_key (u8 maxy, u8 miny, u8 maxu, u8 minu, u8 maxv, u8 minv) |
Set chroma color key values. | |
int | eris_tetsu_get_raster (void) |
Get the current raster. | |
int | eris_tetsu_get_field (void) |
Check which field is being displayed for interlaced mode. | |
int | eris_tetsu_is_displaying (void) |
Checks if we are currently displaying (not in H or V blank) | |
void | eris_tetsu_set_cellophane_color (u16 color) |
Sets the constant color for the cellophane. | |
void | eris_tetsu_set_cellophane_sprites (int *banks) |
Sets cellophane activity on sprites. | |
void | eris_tetsu_set_cellophane_control (int enable, int in_front, tetsu_coeff bg7up, tetsu_coeff spr7up, tetsu_coeff bg0, tetsu_coeff bg1, tetsu_coeff bg2, tetsu_coeff bg3, tetsu_coeff rainbow) |
Set cellophane control. | |
void | eris_tetsu_set_cellophane_coeffs (int coeff, u8 ay, u8 au, u8 av, u8 by, u8 bu, u8 bv) |
Set a cellophane coefficient. |
Controls the NEW Iron Guanyin (Tetsu kannon) chip (Video Controller)
enum tetsu_coeff |
enum tetsu_colordepth |
enum tetsu_dotclock |
enum tetsu_lines |
int eris_tetsu_get_field | ( | void | ) |
Check which field is being displayed for interlaced mode.
int eris_tetsu_get_raster | ( | void | ) |
Get the current raster.
int eris_tetsu_is_displaying | ( | void | ) |
Checks if we are currently displaying (not in H or V blank)
Which palette to use for the 7up chips.
Palettes are actually indexes into the palette which is the first color to the chip. For example, if bg7up was 4, then the 4th palette entry would be color 0, 5th would be 1, etc.
bg7up | Which palette to use for 7up backgrounds. |
spr7up | Which palette to use for 7up sprites. |
Set a cellophane coefficient.
For coefficient information, see hardware documentation.
coeff | Which coefficient to set the information for. (1 ~ 3) |
ay | Y component of the A coefficient. |
au | U component of the A coefficient. |
av | V component of the A coefficient. |
by | Y component of the B coefficient. |
bu | U component of the B coefficient. |
bv | V component of the B coefficient. |
void eris_tetsu_set_cellophane_color | ( | u16 | color | ) |
Sets the constant color for the cellophane.
This color is either the color of the cellophane (in the case of it being in front) or the color of the background (in the case of it being in back).
color | Color in Y8U4V4 format. |
void eris_tetsu_set_cellophane_control | ( | int | enable, |
int | in_front, | ||
tetsu_coeff | bg7up, | ||
tetsu_coeff | spr7up, | ||
tetsu_coeff | bg0, | ||
tetsu_coeff | bg1, | ||
tetsu_coeff | bg2, | ||
tetsu_coeff | bg3, | ||
tetsu_coeff | rainbow | ||
) |
Set cellophane control.
enable | Whether the cellophane is being used or not. |
in_front | Whether the cellophane is the constant color, or the active surfaces. If 1, it is the constant color. |
bg7up | Which coefficient to use for 7up backgrounds. |
spr7up | Which coefficient to use for 7up sprites. |
bg0 | Which coefficient to use for KING BG0. |
bg1 | Which coefficient to use for KING BG1. |
bg2 | Which coefficient to use for KING BG2. |
bg3 | Which coefficient to use for KING BG3. |
rainbow | Which coefficient to use for RAINBOW output. |
void eris_tetsu_set_cellophane_sprites | ( | int * | banks | ) |
Sets cellophane activity on sprites.
banks | A 16-element array of 1s or 0s that contains whether that color palette bank receives cellophane treatment. |
Set chroma color key values.
Disable each colorkey by setting the minimum higher than the maximum.
maxy | Maximum Y. |
miny | Minimum Y. |
maxu | Maximum U. |
minu | Minimum U. |
maxv | Maximum V. |
minv | Minimum V. |
Which palette to use for the KING backgrounds.
Palettes are actually indexes into the palette which is the first color to the chip. For example, if bg0 was 4, then the 4th palette entry would be color 0, 5th would be 1, etc.
bg0 | Which palette to use for KING background 0. |
bg1 | Which palette to use for KING background 1. |
bg2 | Which palette to use for KING background 2. |
bg3 | Which palette to use for KING background 3. |
Set a palette entry.
pal_entry | Which palette entry to set the color of. |
color | The color to set. In Y8U4V4 format. |
Set layer priorities.
bg7up | Priority for the 7up backgrounds. (0 ~ 7) |
spr7up | Priority for the 7up sprites. (0 ~ 7) |
bg0 | Priority for KING BG0. (0 ~ 7) |
bg1 | Priority for KING BG1. (0 ~ 7) |
bg2 | Priority for KING BG2. (0 ~ 7) |
bg3 | Priority for KING BG3. (0 ~ 7) |
rainbow | Priority for RAINBOW. (0 ~ 7) |
void eris_tetsu_set_rainbow_palette | ( | u8 | rainbow | ) |
Which palette to use for RAIBOW.
Palettes are actually indexes into the palette which is the first color to the chip. For example, if raibow was 4, then the 4th palette entry would be color 0, 5th would be 1, etc.
rainbow | Which palette to use for RAIBOW. |
void eris_tetsu_set_video_mode | ( | tetsu_lines | lines, |
int | ext_sync, | ||
tetsu_dotclock | dotclock, | ||
tetsu_colordepth | bg_depth, | ||
tetsu_colordepth | spr_depth, | ||
int | bg7up_show, | ||
int | spr7up_show, | ||
int | bg0_disp, | ||
int | bg1_disp, | ||
int | bg2_disp, | ||
int | bg3_disp, | ||
int | rainbow_disp | ||
) |
Setup the video mode.
lines | Vertical line mode. |
ext_sync | Whether to use external sync. |
dotclock | The dotclock to run at. |
bg_depth | Color depth of 7up backgrounds. |
spr_depth | Color depth of 7up sprites. |
bg7up_show | Whether 7up backgrounds are displayed. |
spr7up_show | Whether 7up sprites are displayed. |
bg0_disp | Whether KING BG0 is displayed. |
bg1_disp | Whether KING BG1 is displayed. |
bg2_disp | Whether KING BG2 is displayed. |
bg3_disp | Whether KING BG3 is displayed. |
rainbow_disp | Whether the RAINBOW output is displayed. |