ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
6847.h File Reference
#include "../ugbc.h"

Go to the source code of this file.

Macros

#define COLOR_BLACK   4
#define COLOR_YELLOW   1
#define COLOR_DARK_WHITE   COLOR_YELLOW
#define COLOR_WHITE   COLOR_YELLOW
#define COLOR_LIGHT_WHITE   COLOR_WHITE
#define COLOR_CYAN   COLOR_BLUE
#define COLOR_MAGENTA   COLOR_BLUE
#define COLOR_ORANGE   COLOR_BLUE
#define COLOR_DARK_RED   3
#define COLOR_RED   3
#define COLOR_LIGHT_RED   COLOR_RED
#define COLOR_DARK_GREEN   COLOR_BLACK
#define COLOR_GREEN   0
#define COLOR_LIGHT_GREEN   COLOR_GREEN
#define COLOR_DARK_BLUE   COLOR_BLUE
#define COLOR_BLUE   2
#define COLOR_LIGHT_BLUE   COLOR_BLUE
#define COLOR_VIOLET   COLOR_MAGENTA
#define COLOR_BROWN   COLOR_ORANGE
#define COLOR_DARK_GREY   COLOR_BLACK
#define COLOR_GREY   COLOR_WHITE
#define COLOR_LIGHT_GREY   COLOR_WHITE
#define COLOR_PURPLE   COLOR_VIOLET
#define COLOR_LAVENDER   COLOR_VIOLET
#define COLOR_GOLD   COLOR_YELLOW
#define COLOR_TURQUOISE   COLOR_LIGHT_BLUE
#define COLOR_TAN   COLOR_BROWN
#define COLOR_YELLOW_GREEN   COLOR_YELLOW
#define COLOR_OLIVE_GREEN   COLOR_GREEN
#define COLOR_PINK   COLOR_LIGHT_RED
#define COLOR_PEACH   COLOR_PINK
#define DEFAULT_PEN_COLOR   COLOR_YELLOW
#define DEFAULT_PAPER_COLOR   COLOR_GREEN
#define COLOR_COUNT   4
#define TEXT_COLUMNS_COUNT   32
#define TEXT_ROWS_COUNT   16
#define TILEMAP_MODE_INTERNAL   0
#define TILEMAP_MODE_EXTERNAL   1
#define TILEMAP_MODE_SEMIGRAPHICS4   2
#define TILEMAP_MODE_SEMIGRAPHICS6   3
#define TILEMAP_MODE_SEMIGRAPHICS8   4
#define TILEMAP_MODE_SEMIGRAPHICS12   5
#define TILEMAP_MODE_SEMIGRAPHICS24   6
#define BITMAP_MODE_COLOR1   7
#define BITMAP_MODE_RESOLUTION1   8
#define BITMAP_MODE_COLOR2   9
#define BITMAP_MODE_RESOLUTION2   10
#define BITMAP_MODE_COLOR3   11
#define BITMAP_MODE_RESOLUTION3   12
#define BITMAP_MODE_COLOR6   13
#define BITMAP_MODE_RESOLUTION6   14
#define BITMAP_MODE_DEFAULT   BITMAP_MODE_RESOLUTION6
#define BITMAP_MODE_STANDARD   BITMAP_MODE_DEFAULT
#define SPRITE_COUNT   0
#define SPRITE_WIDTH   0
#define SPRITE_HEIGHT   0
#define SPRITE_X_MIN   0
#define SPRITE_Y_MIN   0
#define SPRITE_X_MAX   0
#define SPRITE_Y_MAX   0
#define SCREEN_SPRITE_RATIO_X   100
#define SCREEN_SPRITE_RATIO_Y   100
#define SCREEN_BORDER_X   0
#define SCREEN_BORDER_Y   0
#define SAM_V0_CLR   outline0("STA $FFC0")
#define SAM_V0_SET   outline0("STA $FFC1")
#define SAM_V1_CLR   outline0("STA $FFC2")
#define SAM_V1_SET   outline0("STA $FFC3")
#define SAM_V2_CLR   outline0("STA $FFC4")
#define SAM_V2_SET   outline0("STA $FFC5")
#define SAM_F0_CLR   outline0("STA $FFC6")
#define SAM_F0_SET   outline0("STA $FFC7")
#define SAM_F1_CLR   outline0("STA $FFC8")
#define SAM_F1_SET   outline0("STA $FFC9")
#define SAM_F2_CLR   outline0("STA $FFCA")
#define SAM_F2_SET   outline0("STA $FFCB")
#define SAM_F3_CLR   outline0("STA $FFCC")
#define SAM_F3_SET   outline0("STA $FFCD")
#define SAM_F4_CLR   outline0("STA $FFCE")
#define SAM_F4_SET   outline0("STA $FFCF")
#define SAM_F5_CLR   outline0("STA $FFD0")
#define SAM_F5_SET   outline0("STA $FFD1")
#define SAM_F6_CLR   outline0("STA $FFD2")
#define SAM_F6_SET   outline0("STA $FFD3")
#define GM0_SET   outline0("LDA $FF22"); outline0("ORA #$10"); outline0("STA $FF22");
#define GM0_CLR   outline0("LDA $FF22"); outline0("ANDA #$EF"); outline0("STA $FF22");
#define GM1_SET   outline0("LDA $FF22"); outline0("ORA #$20"); outline0("STA $FF22");
#define GM1_CLR   outline0("LDA $FF22"); outline0("ANDA #$DF"); outline0("STA $FF22");
#define GM2_SET   outline0("LDA $FF22"); outline0("ORA #$40"); outline0("STA $FF22");
#define GM2_CLR   outline0("LDA $FF22"); outline0("ANDA #$BF"); outline0("STA $FF22");
#define CSS_SET   outline0("LDA $FF22"); outline0("ORA #$08"); outline0("STA $FF22");
#define CSS_CLR   outline0("LDA $FF22"); outline0("ANDA #$F7"); outline0("STA $FF22");
#define VDG_GRAPH   outline0("LDA $FF22"); outline0("ORA #$80"); outline0("STA $FF22");
#define VDG_TEXT   outline0("LDA $FF22"); outline0("ANDA #$7f"); outline0("STA $FF22");
#define SPRITE_COUNT   0
#define SPRITE_WIDTH   0
#define SPRITE_HEIGHT   0
#define IMAGE_WIDTH_SIZE   1
#define IMAGE_WIDTH_OFFSET   0
#define IMAGE_HEIGHT_SIZE   1
#define IMAGE_HEIGHT_OFFSET   1
#define DOUBLE_BUFFER_PAGE_0   0
#define DOUBLE_BUFFER_PAGE_1   1

Functions

int c6847_screen_mode_enable (Environment *_environment, ScreenMode *_screen_mode)
void c6847_initialization (Environment *_environment)
void c6847_finalization (Environment *_environment)
void c6847_back (Environment *_environment)
void c6847_background_color (Environment *_environment, char *_index, char *_background_color)
 VIC-II: emit code to change background color
void c6847_border_color (Environment *_environment, char *_border_color)
 VIC-II: emit code to change border color
void c6847_collision (Environment *_environment, char *_sprite_mask, char *_result)
 VIC-II: emit code to check for collision
void c6847_hit (Environment *_environment, char *_sprite_mask, char *_result)
 VIC-II: emit code to check for collision
void c6847_next_raster (Environment *_environment)
 VIC-II: emit code to wait for next raster irq
void c6847_next_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 VIC-II: emit code to wait for next raster irq at different position
void c6847_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 VIC-II: emit code to set raster irq
void c6847_sprite_common_color (Environment *_environment, char *_index, char *_common_color)
 VIC-II: emit code to change common sprite's color
void c6847_bitmap_enable (Environment *_environment, int _width, int _height, int _colors)
void c6847_bitmap_disable (Environment *_environment)
void c6847_bitmap_at (Environment *_environment, char *_address)
void c6847_colormap_at (Environment *_environment, char *_address)
void c6847_textmap_at (Environment *_environment, char *_address)
void c6847_tiles_at (Environment *_environment, char *_address)
void c6847_tilemap_enable (Environment *_environment, int _width, int _height, int _colors, int _tile_width, int _tile_height)
void c6847_bank_select (Environment *_environment, int _bank)
void c6847_screen_on (Environment *_environment)
void c6847_screen_off (Environment *_environment)
void c6847_screen_rows (Environment *_environment, char *_rows)
void c6847_screen_columns (Environment *_environment, char *_columns)
void c6847_sprite_data_from (Environment *_environment, char *_sprite, char *_address)
void c6847_sprite_data_set (Environment *_environment, char *_sprite, char *_address)
void c6847_sprite_enable (Environment *_environment, char *_sprite)
void c6847_sprite_disable (Environment *_environment, char *_sprite)
void c6847_sprite_at (Environment *_environment, char *_sprite, char *_x, char *_y)
void c6847_sprite_expand_vertical (Environment *_environment, char *_sprite)
void c6847_sprite_expand_horizontal (Environment *_environment, char *_sprite)
void c6847_sprite_compress_vertical (Environment *_environment, char *_sprite)
void c6847_sprite_compress_horizontal (Environment *_environment, char *_sprite)
void c6847_sprite_multicolor (Environment *_environment, char *_sprite)
void c6847_sprite_monocolor (Environment *_environment, char *_sprite)
void c6847_sprite_color (Environment *_environment, char *_sprite, char *_color)
void c6847_sprite_priority (Environment *_environment, char *_sprite, char *_priority)
void c6847_vertical_scroll (Environment *_environment, char *_displacement)
void c6847_horizontal_scroll (Environment *_environment, char *_displacement)
void c6847_tiles_get (Environment *_environment, char *_result)
void c6847_get_width (Environment *_environment, char *_result)
void c6847_get_height (Environment *_environment, char *_result)
void c6847_pset_int (Environment *_environment, int _x, int _y, int *_c)
void c6847_pset_vars (Environment *_environment, char *_x, char *_y, char *_c)
void c6847_pget_color_vars (Environment *_environment, char *_x, char *_y, char *_result)
void c6847_cls (Environment *_environment)
void c6847_cls_box (Environment *_environment, char *_x1, char *_y1, char *_w, char *_h)
void c6847_scroll_text (Environment *_environment, int _direction, int _overlap)
void c6847_hscroll_line (Environment *_environment, int _direction, int _overlap)
void c6847_hscroll_screen (Environment *_environment, int _direction, int _overlap)
void c6847_text (Environment *_environment, char *_text, char *_text_size, int _raw)
void c6847_cline (Environment *_environment, char *_characters)
void c6847_scroll (Environment *_environment, int _dx, int _dy)
Variablec6847_get_raster_line (Environment *_environment)
int c6847_image_size (Environment *_environment, int _width, int _height, int _mode, int _transparent)
Variablec6847_image_converter (Environment *_environment, char *_data, int _width, int _height, int _depth, int _offset_x, int _offset_y, int _frame_width, int _frame_height, int _mode, int _transparent_color, int _flags)
void c6847_put_image (Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
void c6847_blit_image (Environment *_environment, char *_sources[], int _source_count, char *_blit, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _flags)
Variablec6847_new_image (Environment *_environment, int _width, int _height, int _mode)
Variablec6847_new_images (Environment *_environment, int _frames, int _width, int _height, int _mode)
Variablec6847_new_sequence (Environment *_environment, int _sequences, int _frames, int _width, int _height, int _mode)
void c6847_get_image (Environment *_environment, char *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _palette)
void c6847_put_tile (Environment *_environment, char *_image, char *_x, char *_y)
void c6847_put_tiles (Environment *_environment, char *_image, char *_x, char *_y, char *_w, char *_h)
void c6847_move_tiles (Environment *_environment, char *_image, char *_x, char *_y)
void c6847_use_tileset (Environment *_environment, char *_tileset)
void c6847_tile_at (Environment *_environment, char *_x, char *_y, char *_result)
void c6847_slice_image (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination)
int c6847_palette_extract (Environment *_environment, char *_data, int _width, int _height, int _depth, int _flags, RGBi *_palette)
void c6847_calculate_sequence_frame_offset (Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count)
void c6847_flip_image (Environment *_environment, Resource *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_direction)
void c6847_screen (Environment *_environment, char *_x, char *_y, char *_c)

Macro Definition Documentation

◆ BITMAP_MODE_COLOR1

#define BITMAP_MODE_COLOR1   7

Definition at line 86 of file 6847.h.

◆ BITMAP_MODE_COLOR2

#define BITMAP_MODE_COLOR2   9

Definition at line 88 of file 6847.h.

◆ BITMAP_MODE_COLOR3

#define BITMAP_MODE_COLOR3   11

Definition at line 90 of file 6847.h.

◆ BITMAP_MODE_COLOR6

#define BITMAP_MODE_COLOR6   13

Definition at line 92 of file 6847.h.

◆ BITMAP_MODE_DEFAULT

#define BITMAP_MODE_DEFAULT   BITMAP_MODE_RESOLUTION6

Definition at line 95 of file 6847.h.

◆ BITMAP_MODE_RESOLUTION1

#define BITMAP_MODE_RESOLUTION1   8

Definition at line 87 of file 6847.h.

◆ BITMAP_MODE_RESOLUTION2

#define BITMAP_MODE_RESOLUTION2   10

Definition at line 89 of file 6847.h.

◆ BITMAP_MODE_RESOLUTION3

#define BITMAP_MODE_RESOLUTION3   12

Definition at line 91 of file 6847.h.

◆ BITMAP_MODE_RESOLUTION6

#define BITMAP_MODE_RESOLUTION6   14

Definition at line 93 of file 6847.h.

◆ BITMAP_MODE_STANDARD

#define BITMAP_MODE_STANDARD   BITMAP_MODE_DEFAULT

Definition at line 96 of file 6847.h.

◆ COLOR_BLACK

#define COLOR_BLACK   4

Definition at line 36 of file 6847.h.

◆ COLOR_BLUE

#define COLOR_BLUE   2

Definition at line 51 of file 6847.h.

◆ COLOR_BROWN

#define COLOR_BROWN   COLOR_ORANGE

Definition at line 55 of file 6847.h.

◆ COLOR_COUNT

#define COLOR_COUNT   4

Definition at line 72 of file 6847.h.

◆ COLOR_CYAN

#define COLOR_CYAN   COLOR_BLUE

Definition at line 41 of file 6847.h.

◆ COLOR_DARK_BLUE

#define COLOR_DARK_BLUE   COLOR_BLUE

Definition at line 50 of file 6847.h.

◆ COLOR_DARK_GREEN

#define COLOR_DARK_GREEN   COLOR_BLACK

Definition at line 47 of file 6847.h.

◆ COLOR_DARK_GREY

#define COLOR_DARK_GREY   COLOR_BLACK

Definition at line 56 of file 6847.h.

◆ COLOR_DARK_RED

#define COLOR_DARK_RED   3

Definition at line 44 of file 6847.h.

◆ COLOR_DARK_WHITE

#define COLOR_DARK_WHITE   COLOR_YELLOW

Definition at line 38 of file 6847.h.

◆ COLOR_GOLD

#define COLOR_GOLD   COLOR_YELLOW

Definition at line 61 of file 6847.h.

◆ COLOR_GREEN

#define COLOR_GREEN   0

Definition at line 48 of file 6847.h.

◆ COLOR_GREY

#define COLOR_GREY   COLOR_WHITE

Definition at line 57 of file 6847.h.

◆ COLOR_LAVENDER

#define COLOR_LAVENDER   COLOR_VIOLET

Definition at line 60 of file 6847.h.

◆ COLOR_LIGHT_BLUE

#define COLOR_LIGHT_BLUE   COLOR_BLUE

Definition at line 52 of file 6847.h.

◆ COLOR_LIGHT_GREEN

#define COLOR_LIGHT_GREEN   COLOR_GREEN

Definition at line 49 of file 6847.h.

◆ COLOR_LIGHT_GREY

#define COLOR_LIGHT_GREY   COLOR_WHITE

Definition at line 58 of file 6847.h.

◆ COLOR_LIGHT_RED

#define COLOR_LIGHT_RED   COLOR_RED

Definition at line 46 of file 6847.h.

◆ COLOR_LIGHT_WHITE

#define COLOR_LIGHT_WHITE   COLOR_WHITE

Definition at line 40 of file 6847.h.

◆ COLOR_MAGENTA

#define COLOR_MAGENTA   COLOR_BLUE

Definition at line 42 of file 6847.h.

◆ COLOR_OLIVE_GREEN

#define COLOR_OLIVE_GREEN   COLOR_GREEN

Definition at line 65 of file 6847.h.

◆ COLOR_ORANGE

#define COLOR_ORANGE   COLOR_BLUE

Definition at line 43 of file 6847.h.

◆ COLOR_PEACH

#define COLOR_PEACH   COLOR_PINK

Definition at line 67 of file 6847.h.

◆ COLOR_PINK

#define COLOR_PINK   COLOR_LIGHT_RED

Definition at line 66 of file 6847.h.

◆ COLOR_PURPLE

#define COLOR_PURPLE   COLOR_VIOLET

Definition at line 59 of file 6847.h.

◆ COLOR_RED

#define COLOR_RED   3

Definition at line 45 of file 6847.h.

◆ COLOR_TAN

#define COLOR_TAN   COLOR_BROWN

Definition at line 63 of file 6847.h.

◆ COLOR_TURQUOISE

#define COLOR_TURQUOISE   COLOR_LIGHT_BLUE

Definition at line 62 of file 6847.h.

◆ COLOR_VIOLET

#define COLOR_VIOLET   COLOR_MAGENTA

Definition at line 54 of file 6847.h.

◆ COLOR_WHITE

#define COLOR_WHITE   COLOR_YELLOW

Definition at line 39 of file 6847.h.

◆ COLOR_YELLOW

#define COLOR_YELLOW   1

Definition at line 37 of file 6847.h.

◆ COLOR_YELLOW_GREEN

#define COLOR_YELLOW_GREEN   COLOR_YELLOW

Definition at line 64 of file 6847.h.

◆ CSS_CLR

#define CSS_CLR   outline0("LDA $FF22"); outline0("ANDA #$F7"); outline0("STA $FF22");

Definition at line 145 of file 6847.h.

◆ CSS_SET

#define CSS_SET   outline0("LDA $FF22"); outline0("ORA #$08"); outline0("STA $FF22");

Definition at line 144 of file 6847.h.

◆ DEFAULT_PAPER_COLOR

#define DEFAULT_PAPER_COLOR   COLOR_GREEN

Definition at line 70 of file 6847.h.

◆ DEFAULT_PEN_COLOR

#define DEFAULT_PEN_COLOR   COLOR_YELLOW

Definition at line 69 of file 6847.h.

◆ DOUBLE_BUFFER_PAGE_0

#define DOUBLE_BUFFER_PAGE_0   0

Definition at line 205 of file 6847.h.

◆ DOUBLE_BUFFER_PAGE_1

#define DOUBLE_BUFFER_PAGE_1   1

Definition at line 206 of file 6847.h.

◆ GM0_CLR

#define GM0_CLR   outline0("LDA $FF22"); outline0("ANDA #$EF"); outline0("STA $FF22");

Definition at line 138 of file 6847.h.

◆ GM0_SET

#define GM0_SET   outline0("LDA $FF22"); outline0("ORA #$10"); outline0("STA $FF22");

Definition at line 137 of file 6847.h.

◆ GM1_CLR

#define GM1_CLR   outline0("LDA $FF22"); outline0("ANDA #$DF"); outline0("STA $FF22");

Definition at line 140 of file 6847.h.

◆ GM1_SET

#define GM1_SET   outline0("LDA $FF22"); outline0("ORA #$20"); outline0("STA $FF22");

Definition at line 139 of file 6847.h.

◆ GM2_CLR

#define GM2_CLR   outline0("LDA $FF22"); outline0("ANDA #$BF"); outline0("STA $FF22");

Definition at line 142 of file 6847.h.

◆ GM2_SET

#define GM2_SET   outline0("LDA $FF22"); outline0("ORA #$40"); outline0("STA $FF22");

Definition at line 141 of file 6847.h.

◆ IMAGE_HEIGHT_OFFSET

#define IMAGE_HEIGHT_OFFSET   1

Definition at line 203 of file 6847.h.

◆ IMAGE_HEIGHT_SIZE

#define IMAGE_HEIGHT_SIZE   1

Definition at line 202 of file 6847.h.

◆ IMAGE_WIDTH_OFFSET

#define IMAGE_WIDTH_OFFSET   0

Definition at line 201 of file 6847.h.

◆ IMAGE_WIDTH_SIZE

#define IMAGE_WIDTH_SIZE   1

Definition at line 200 of file 6847.h.

◆ SAM_F0_CLR

#define SAM_F0_CLR   outline0("STA $FFC6")

Definition at line 122 of file 6847.h.

◆ SAM_F0_SET

#define SAM_F0_SET   outline0("STA $FFC7")

Definition at line 123 of file 6847.h.

◆ SAM_F1_CLR

#define SAM_F1_CLR   outline0("STA $FFC8")

Definition at line 124 of file 6847.h.

◆ SAM_F1_SET

#define SAM_F1_SET   outline0("STA $FFC9")

Definition at line 125 of file 6847.h.

◆ SAM_F2_CLR

#define SAM_F2_CLR   outline0("STA $FFCA")

Definition at line 126 of file 6847.h.

◆ SAM_F2_SET

#define SAM_F2_SET   outline0("STA $FFCB")

Definition at line 127 of file 6847.h.

◆ SAM_F3_CLR

#define SAM_F3_CLR   outline0("STA $FFCC")

Definition at line 128 of file 6847.h.

◆ SAM_F3_SET

#define SAM_F3_SET   outline0("STA $FFCD")

Definition at line 129 of file 6847.h.

◆ SAM_F4_CLR

#define SAM_F4_CLR   outline0("STA $FFCE")

Definition at line 130 of file 6847.h.

◆ SAM_F4_SET

#define SAM_F4_SET   outline0("STA $FFCF")

Definition at line 131 of file 6847.h.

◆ SAM_F5_CLR

#define SAM_F5_CLR   outline0("STA $FFD0")

Definition at line 132 of file 6847.h.

◆ SAM_F5_SET

#define SAM_F5_SET   outline0("STA $FFD1")

Definition at line 133 of file 6847.h.

◆ SAM_F6_CLR

#define SAM_F6_CLR   outline0("STA $FFD2")

Definition at line 134 of file 6847.h.

◆ SAM_F6_SET

#define SAM_F6_SET   outline0("STA $FFD3")

Definition at line 135 of file 6847.h.

◆ SAM_V0_CLR

#define SAM_V0_CLR   outline0("STA $FFC0")

Definition at line 115 of file 6847.h.

◆ SAM_V0_SET

#define SAM_V0_SET   outline0("STA $FFC1")

Definition at line 116 of file 6847.h.

◆ SAM_V1_CLR

#define SAM_V1_CLR   outline0("STA $FFC2")

Definition at line 117 of file 6847.h.

◆ SAM_V1_SET

#define SAM_V1_SET   outline0("STA $FFC3")

Definition at line 118 of file 6847.h.

◆ SAM_V2_CLR

#define SAM_V2_CLR   outline0("STA $FFC4")

Definition at line 119 of file 6847.h.

◆ SAM_V2_SET

#define SAM_V2_SET   outline0("STA $FFC5")

Definition at line 120 of file 6847.h.

◆ SCREEN_BORDER_X

#define SCREEN_BORDER_X   0

Definition at line 108 of file 6847.h.

◆ SCREEN_BORDER_Y

#define SCREEN_BORDER_Y   0

Definition at line 109 of file 6847.h.

◆ SCREEN_SPRITE_RATIO_X

#define SCREEN_SPRITE_RATIO_X   100

Definition at line 106 of file 6847.h.

◆ SCREEN_SPRITE_RATIO_Y

#define SCREEN_SPRITE_RATIO_Y   100

Definition at line 107 of file 6847.h.

◆ SPRITE_COUNT [1/2]

#define SPRITE_COUNT   0

Definition at line 98 of file 6847.h.

◆ SPRITE_COUNT [2/2]

#define SPRITE_COUNT   0

Definition at line 98 of file 6847.h.

◆ SPRITE_HEIGHT [1/2]

#define SPRITE_HEIGHT   0

Definition at line 100 of file 6847.h.

◆ SPRITE_HEIGHT [2/2]

#define SPRITE_HEIGHT   0

Definition at line 100 of file 6847.h.

◆ SPRITE_WIDTH [1/2]

#define SPRITE_WIDTH   0

Definition at line 99 of file 6847.h.

◆ SPRITE_WIDTH [2/2]

#define SPRITE_WIDTH   0

Definition at line 99 of file 6847.h.

◆ SPRITE_X_MAX

#define SPRITE_X_MAX   0

Definition at line 103 of file 6847.h.

◆ SPRITE_X_MIN

#define SPRITE_X_MIN   0

Definition at line 101 of file 6847.h.

◆ SPRITE_Y_MAX

#define SPRITE_Y_MAX   0

Definition at line 104 of file 6847.h.

◆ SPRITE_Y_MIN

#define SPRITE_Y_MIN   0

Definition at line 102 of file 6847.h.

◆ TEXT_COLUMNS_COUNT

#define TEXT_COLUMNS_COUNT   32

Definition at line 74 of file 6847.h.

◆ TEXT_ROWS_COUNT

#define TEXT_ROWS_COUNT   16

Definition at line 75 of file 6847.h.

◆ TILEMAP_MODE_EXTERNAL

#define TILEMAP_MODE_EXTERNAL   1

Definition at line 78 of file 6847.h.

◆ TILEMAP_MODE_INTERNAL

#define TILEMAP_MODE_INTERNAL   0

Definition at line 77 of file 6847.h.

◆ TILEMAP_MODE_SEMIGRAPHICS12

#define TILEMAP_MODE_SEMIGRAPHICS12   5

Definition at line 83 of file 6847.h.

◆ TILEMAP_MODE_SEMIGRAPHICS24

#define TILEMAP_MODE_SEMIGRAPHICS24   6

Definition at line 84 of file 6847.h.

◆ TILEMAP_MODE_SEMIGRAPHICS4

#define TILEMAP_MODE_SEMIGRAPHICS4   2

Definition at line 80 of file 6847.h.

◆ TILEMAP_MODE_SEMIGRAPHICS6

#define TILEMAP_MODE_SEMIGRAPHICS6   3

Definition at line 81 of file 6847.h.

◆ TILEMAP_MODE_SEMIGRAPHICS8

#define TILEMAP_MODE_SEMIGRAPHICS8   4

Definition at line 82 of file 6847.h.

◆ VDG_GRAPH

#define VDG_GRAPH   outline0("LDA $FF22"); outline0("ORA #$80"); outline0("STA $FF22");

Definition at line 149 of file 6847.h.

◆ VDG_TEXT

#define VDG_TEXT   outline0("LDA $FF22"); outline0("ANDA #$7f"); outline0("STA $FF22");

Definition at line 150 of file 6847.h.

Function Documentation

◆ c6847_back()

void c6847_back ( Environment * _environment)

Definition at line 1201 of file 6847.c.

◆ c6847_background_color()

void c6847_background_color ( Environment * _environment,
char * _index,
char * _background_color )

VIC-II: emit code to change background color

This function can be used to issue code aimed at changing the background color of the screen.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_background_colorBackground color to use

Definition at line 171 of file 6847.c.

◆ c6847_bank_select()

void c6847_bank_select ( Environment * _environment,
int _bank )

Definition at line 253 of file 6847.c.

◆ c6847_bitmap_at()

void c6847_bitmap_at ( Environment * _environment,
char * _address )

Definition at line 780 of file 6847.c.

◆ c6847_bitmap_disable()

void c6847_bitmap_disable ( Environment * _environment)

Definition at line 755 of file 6847.c.

◆ c6847_bitmap_enable()

void c6847_bitmap_enable ( Environment * _environment,
int _width,
int _height,
int _colors )

Definition at line 735 of file 6847.c.

◆ c6847_blit_image()

void c6847_blit_image ( Environment * _environment,
char * _sources[],
int _source_count,
char * _blit,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
int _flags )

Definition at line 2566 of file 6847.c.

◆ c6847_border_color()

void c6847_border_color ( Environment * _environment,
char * _border_color )

VIC-II: emit code to change border color

This function can be used to issue code aimed at changing the border color of the screen.

Parameters
_environmentCurrent calling environment
_border_colorBorder color to use

Definition at line 145 of file 6847.c.

◆ c6847_calculate_sequence_frame_offset()

void c6847_calculate_sequence_frame_offset ( Environment * _environment,
char * _offset,
char * _sequence,
char * _frame,
int _frame_size,
int _frame_count )

Definition at line 2872 of file 6847.c.

◆ c6847_cline()

void c6847_cline ( Environment * _environment,
char * _characters )

Definition at line 1205 of file 6847.c.

◆ c6847_cls()

void c6847_cls ( Environment * _environment)

Definition at line 970 of file 6847.c.

◆ c6847_cls_box()

void c6847_cls_box ( Environment * _environment,
char * _x1,
char * _y1,
char * _w,
char * _h )

Definition at line 982 of file 6847.c.

◆ c6847_collision()

void c6847_collision ( Environment * _environment,
char * _sprite_mask,
char * _result )

VIC-II: emit code to check for collision

This function can be used to issue code aimed at verifying if a sprite has had a collision with another sprite. The result (0 = no collision, 0xff = collision occurred) is returned in the output variable.

Parameters
_environmentCurrent calling environment
_sprite_maskSprite mask to use
_resultWhere to store the result

Definition at line 117 of file 6847.c.

◆ c6847_colormap_at()

void c6847_colormap_at ( Environment * _environment,
char * _address )

Definition at line 787 of file 6847.c.

◆ c6847_finalization()

void c6847_finalization ( Environment * _environment)

Definition at line 1155 of file 6847.c.

◆ c6847_flip_image()

void c6847_flip_image ( Environment * _environment,
Resource * _image,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _direction )

Definition at line 2919 of file 6847.c.

◆ c6847_get_height()

void c6847_get_height ( Environment * _environment,
char * _result )

Definition at line 963 of file 6847.c.

◆ c6847_get_image()

void c6847_get_image ( Environment * _environment,
char * _image,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
int _palette )

Definition at line 2760 of file 6847.c.

◆ c6847_get_raster_line()

Variable * c6847_get_raster_line ( Environment * _environment)

Definition at line 2842 of file 6847.c.

◆ c6847_get_width()

void c6847_get_width ( Environment * _environment,
char * _result )

Definition at line 949 of file 6847.c.

◆ c6847_hit()

void c6847_hit ( Environment * _environment,
char * _sprite_mask,
char * _result )

VIC-II: emit code to check for collision

This function can be used to issue code aimed at verifying if a sprite has had a collision with a tile. The result (0 = no collision, 0xff = collision occurred) is returned in the output variable.

Parameters
_environmentCurrent calling environment
_sprite_maskSprite mask to use
_resultWhere to store the result

Definition at line 132 of file 6847.c.

◆ c6847_horizontal_scroll()

void c6847_horizontal_scroll ( Environment * _environment,
char * _displacement )

Definition at line 945 of file 6847.c.

◆ c6847_hscroll_line()

void c6847_hscroll_line ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1172 of file 6847.c.

◆ c6847_hscroll_screen()

void c6847_hscroll_screen ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1188 of file 6847.c.

◆ c6847_image_converter()

Variable * c6847_image_converter ( Environment * _environment,
char * _data,
int _width,
int _height,
int _depth,
int _offset_x,
int _offset_y,
int _frame_width,
int _frame_height,
int _mode,
int _transparent_color,
int _flags )

Definition at line 2472 of file 6847.c.

◆ c6847_image_size()

int c6847_image_size ( Environment * _environment,
int _width,
int _height,
int _mode,
int _transparent )

Definition at line 1231 of file 6847.c.

◆ c6847_initialization()

void c6847_initialization ( Environment * _environment)

Definition at line 1059 of file 6847.c.

◆ c6847_move_tiles()

void c6847_move_tiles ( Environment * _environment,
char * _image,
char * _x,
char * _y )

Definition at line 2829 of file 6847.c.

◆ c6847_new_image()

Variable * c6847_new_image ( Environment * _environment,
int _width,
int _height,
int _mode )

Definition at line 2673 of file 6847.c.

◆ c6847_new_images()

Variable * c6847_new_images ( Environment * _environment,
int _frames,
int _width,
int _height,
int _mode )

Definition at line 2697 of file 6847.c.

◆ c6847_new_sequence()

Variable * c6847_new_sequence ( Environment * _environment,
int _sequences,
int _frames,
int _width,
int _height,
int _mode )

Definition at line 2728 of file 6847.c.

◆ c6847_next_raster()

void c6847_next_raster ( Environment * _environment)

VIC-II: emit code to wait for next raster irq

This function outputs assembly code needed to wait for the next raster. Meanwhile, the execution of the main code will resume where it left off.

Parameters
_environmentCurrent calling environment

Definition at line 232 of file 6847.c.

◆ c6847_next_raster_at()

void c6847_next_raster_at ( Environment * _environment,
char * _label,
char * _positionlo,
char * _positionhi )

VIC-II: emit code to wait for next raster irq at different position

This function outputs assembly code needed to wait for the next raster on a different position with a different code to execute. Meanwhile, the execution of the main code will resume where it left off.

Parameters
_environmentCurrent calling environment
_labelLabel to jump to when vertical raster reach the value given
_positionloThe vertical position to wait for (bits 7..0)
_positionhiThe vertical position to wait for (bit 8)

Definition at line 249 of file 6847.c.

◆ c6847_palette_extract()

int c6847_palette_extract ( Environment * _environment,
char * _data,
int _width,
int _height,
int _depth,
int _flags,
RGBi * _palette )

Definition at line 2856 of file 6847.c.

◆ c6847_pget_color_vars()

void c6847_pget_color_vars ( Environment * _environment,
char * _x,
char * _y,
char * _result )

Definition at line 848 of file 6847.c.

◆ c6847_pset_int()

void c6847_pset_int ( Environment * _environment,
int _x,
int _y,
int * _c )

Definition at line 798 of file 6847.c.

◆ c6847_pset_vars()

void c6847_pset_vars ( Environment * _environment,
char * _x,
char * _y,
char * _c )

Definition at line 821 of file 6847.c.

◆ c6847_put_image()

void c6847_put_image ( Environment * _environment,
Resource * _image,
char * _x,
char * _y,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _flags )

Definition at line 2618 of file 6847.c.

◆ c6847_put_tile()

void c6847_put_tile ( Environment * _environment,
char * _image,
char * _x,
char * _y )

Definition at line 2821 of file 6847.c.

◆ c6847_put_tiles()

void c6847_put_tiles ( Environment * _environment,
char * _image,
char * _x,
char * _y,
char * _w,
char * _h )

Definition at line 2833 of file 6847.c.

◆ c6847_raster_at()

void c6847_raster_at ( Environment * _environment,
char * _label,
char * _positionlo,
char * _positionhi )

VIC-II: emit code to set raster irq

This function outputs assembly code needed to initialize a raster routine. In other words, asynchronously and in parallel with the execution of the main program, the routine starting from the label provided will be executed when the vertical brush on the screen reaches the value of _position. This function is particularly useful when the position is communicated is given as an integer.

Parameters
_environmentCurrent calling environment
_labelLabel to jump to when vertical raster reach the value given
_positionloThe vertical position to wait for (bits 7..0)
_positionhiThe vertical position to wait for (bit 8)

Definition at line 218 of file 6847.c.

◆ c6847_screen()

void c6847_screen ( Environment * _environment,
char * _x,
char * _y,
char * _c )

Definition at line 2961 of file 6847.c.

◆ c6847_screen_columns()

void c6847_screen_columns ( Environment * _environment,
char * _columns )

Definition at line 881 of file 6847.c.

◆ c6847_screen_mode_enable()

int c6847_screen_mode_enable ( Environment * _environment,
ScreenMode * _screen_mode )

Definition at line 325 of file 6847.c.

◆ c6847_screen_off()

void c6847_screen_off ( Environment * _environment)

Definition at line 873 of file 6847.c.

◆ c6847_screen_on()

void c6847_screen_on ( Environment * _environment)

Definition at line 869 of file 6847.c.

◆ c6847_screen_rows()

void c6847_screen_rows ( Environment * _environment,
char * _rows )

Definition at line 877 of file 6847.c.

◆ c6847_scroll()

void c6847_scroll ( Environment * _environment,
int _dx,
int _dy )

Definition at line 2817 of file 6847.c.

◆ c6847_scroll_text()

void c6847_scroll_text ( Environment * _environment,
int _direction,
int _overlap )

Definition at line 1001 of file 6847.c.

◆ c6847_slice_image()

void c6847_slice_image ( Environment * _environment,
char * _image,
char * _frame,
char * _sequence,
int _frame_size,
int _frame_count,
char * _destination )

Definition at line 2852 of file 6847.c.

◆ c6847_sprite_at()

void c6847_sprite_at ( Environment * _environment,
char * _sprite,
char * _x,
char * _y )

Definition at line 901 of file 6847.c.

◆ c6847_sprite_color()

void c6847_sprite_color ( Environment * _environment,
char * _sprite,
char * _color )

Definition at line 933 of file 6847.c.

◆ c6847_sprite_common_color()

void c6847_sprite_common_color ( Environment * _environment,
char * _index,
char * _common_color )

VIC-II: emit code to change common sprite's color

This function can be used to issue code aimed at changing the common color of the sprites.

Parameters
_environmentCurrent calling environment
_indexIndex of the background color
_common_colorIndex of the color to use

Definition at line 199 of file 6847.c.

◆ c6847_sprite_compress_horizontal()

void c6847_sprite_compress_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 921 of file 6847.c.

◆ c6847_sprite_compress_vertical()

void c6847_sprite_compress_vertical ( Environment * _environment,
char * _sprite )

Definition at line 917 of file 6847.c.

◆ c6847_sprite_data_from()

void c6847_sprite_data_from ( Environment * _environment,
char * _sprite,
char * _address )

Definition at line 885 of file 6847.c.

◆ c6847_sprite_data_set()

void c6847_sprite_data_set ( Environment * _environment,
char * _sprite,
char * _address )

Definition at line 889 of file 6847.c.

◆ c6847_sprite_disable()

void c6847_sprite_disable ( Environment * _environment,
char * _sprite )

Definition at line 897 of file 6847.c.

◆ c6847_sprite_enable()

void c6847_sprite_enable ( Environment * _environment,
char * _sprite )

Definition at line 893 of file 6847.c.

◆ c6847_sprite_expand_horizontal()

void c6847_sprite_expand_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 913 of file 6847.c.

◆ c6847_sprite_expand_vertical()

void c6847_sprite_expand_vertical ( Environment * _environment,
char * _sprite )

Definition at line 909 of file 6847.c.

◆ c6847_sprite_monocolor()

void c6847_sprite_monocolor ( Environment * _environment,
char * _sprite )

Definition at line 929 of file 6847.c.

◆ c6847_sprite_multicolor()

void c6847_sprite_multicolor ( Environment * _environment,
char * _sprite )

Definition at line 925 of file 6847.c.

◆ c6847_sprite_priority()

void c6847_sprite_priority ( Environment * _environment,
char * _sprite,
char * _priority )

Definition at line 905 of file 6847.c.

◆ c6847_text()

void c6847_text ( Environment * _environment,
char * _text,
char * _text_size,
int _raw )

Definition at line 1021 of file 6847.c.

◆ c6847_textmap_at()

void c6847_textmap_at ( Environment * _environment,
char * _address )

Definition at line 791 of file 6847.c.

◆ c6847_tile_at()

void c6847_tile_at ( Environment * _environment,
char * _x,
char * _y,
char * _result )

Definition at line 2825 of file 6847.c.

◆ c6847_tilemap_enable()

void c6847_tilemap_enable ( Environment * _environment,
int _width,
int _height,
int _colors,
int _tile_width,
int _tile_height )

Definition at line 759 of file 6847.c.

◆ c6847_tiles_at()

void c6847_tiles_at ( Environment * _environment,
char * _address )

Definition at line 937 of file 6847.c.

◆ c6847_tiles_get()

void c6847_tiles_get ( Environment * _environment,
char * _result )

Definition at line 956 of file 6847.c.

◆ c6847_use_tileset()

void c6847_use_tileset ( Environment * _environment,
char * _tileset )

Definition at line 2838 of file 6847.c.

◆ c6847_vertical_scroll()

void c6847_vertical_scroll ( Environment * _environment,
char * _displacement )

Definition at line 941 of file 6847.c.