|
ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
|
#include "../ugbc.h"Go to the source code of this file.
Typedefs | |
| typedef void(* | Tms9918SliceImageFunction) (Environment *, char *, char *, char *, int, int, char *) |
Functions | |
| int | tms9918_screen_mode_enable (Environment *_environment, ScreenMode *_screen_mode) |
| void | tms9918_initialization (Environment *_environment) |
| void | tms9918_finalization (Environment *_environment) |
| void | tms9918_back (Environment *_environment) |
| void | tms9918_background_color (Environment *_environment, int _index, int _background_color) |
| TMS9918: emit code to change background color | |
| void | tms9918_background_color_vars (Environment *_environment, char *_index, char *_background_color) |
| TMS9918: emit code to change background color | |
| void | tms9918_background_color_semivars (Environment *_environment, int _index, char *_background_color) |
| TMS9918: emit code to change background color | |
| void | tms9918_colors_vars (Environment *_environment, char *_foreground_color, char *_background_color) |
| void | tms9918_background_color_get_vars (Environment *_environment, char *_index, char *_background_color) |
| TMS9918: emit code to retrieve background color | |
| void | tms9918_border_color (Environment *_environment, char *_border_color) |
| TMS9918: emit code to change border color | |
| Variable * | tms9918_collision (Environment *_environment, char *_sprite) |
| TMS9918: emit code to check for collision | |
| void | tms9918_hit (Environment *_environment, char *_sprite_mask, char *_result) |
| TMS9918: emit code to check for collision | |
| void | tms9918_next_raster (Environment *_environment) |
| TMS9918: emit code to wait for next raster irq | |
| void | tms9918_next_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi) |
| TMS9918: emit code to wait for next raster irq at different position | |
| void | tms9918_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi) |
| TMS9918: emit code to set raster irq | |
| void | tms9918_sprite_common_color (Environment *_environment, char *_index, char *_common_color) |
| TMS9918: emit code to change common sprite's color | |
| void | tms9918_bitmap_enable (Environment *_environment, int _width, int _height, int _colors) |
| void | tms9918_bitmap_disable (Environment *_environment) |
| void | tms9918_bitmap_at (Environment *_environment, char *_address) |
| void | tms9918_colormap_at (Environment *_environment, char *_address) |
| void | tms9918_textmap_at (Environment *_environment, char *_address) |
| void | tms9918_tiles_at (Environment *_environment, char *_address) |
| void | tms9918_tilemap_enable (Environment *_environment, int _width, int _height, int _colors, int _tile_width, int _tile_height) |
| void | tms9918_bank_select (Environment *_environment, int _bank) |
| void | tms9918_screen_on (Environment *_environment) |
| void | tms9918_screen_off (Environment *_environment) |
| void | tms9918_screen_rows (Environment *_environment, char *_rows) |
| void | tms9918_screen_columns (Environment *_environment, char *_columns) |
| void | tms9918_sprite_data_from (Environment *_environment, char *_sprite, char *_image) |
| void | tms9918_sprite_data_set (Environment *_environment, char *_sprite, char *_image) |
| void | tms9918_sprite_enable (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_disable (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_at (Environment *_environment, char *_sprite, char *_x, char *_y) |
| void | tms9918_sprite_expand_vertical (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_expand_horizontal (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_compress_vertical (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_compress_horizontal (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_multicolor (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_monocolor (Environment *_environment, char *_sprite) |
| void | tms9918_sprite_color (Environment *_environment, char *_sprite, char *_color) |
| void | tms9918_sprite_priority (Environment *_environment, char *_sprite, char *_priority) |
| void | tms9918_vertical_scroll (Environment *_environment, char *_displacement) |
| void | tms9918_horizontal_scroll (Environment *_environment, char *_displacement) |
| void | tms9918_busy_wait (Environment *_environment, char *_timing) |
| void | tms9918_tiles_get (Environment *_environment, char *_result) |
| void | tms9918_get_width (Environment *_environment, char *_result) |
| void | tms9918_get_height (Environment *_environment, char *_result) |
| void | tms9918_pset_int (Environment *_environment, int _x, int _y, int *_c) |
| void | tms9918_pset_vars (Environment *_environment, char *_x, char *_y, char *_c) |
| void | tms9918_pget_color_vars (Environment *_environment, char *_x, char *_y, char *_result) |
| void | tms9918_cls (Environment *_environment) |
| void | tms9918_cls_box (Environment *_environment, char *_x1, char *_y1, char *_w, char *_h) |
| void | tms9918_scroll_text (Environment *_environment, int _direction, int _overlap) |
| void | tms9918_hscroll_line (Environment *_environment, int _direction, int _overlap) |
| void | tms9918_hscroll_screen (Environment *_environment, int _direction, int _overlap) |
| void | tms9918_text (Environment *_environment, char *_text, char *_text_size, int _raw) |
| void | tms9918_cline (Environment *_environment, char *_characters) |
| void | tms9918_scroll (Environment *_environment, int _dx, int _dy) |
| void | tms9918_calculate_sequence_frame_offset (Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count) |
| Variable * | tms9918_get_raster_line (Environment *_environment) |
| int | tms9918_image_size (Environment *_environment, int _width, int _height, int _mode) |
| Variable * | tms9918_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) |
| Variable * | tms9918_sprite_converter (Environment *_environment, char *_data, int _width, int _height, int _depth, RGBi *_color, int _x_slot, int _y_slot) |
| void | tms9918_put_image (Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags) |
| void | tms9918_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) |
| void | tms9918_wait_vbl (Environment *_environment) |
| Variable * | tms9918_new_image (Environment *_environment, int _width, int _height, int _mode) |
| Variable * | tms9918_new_images (Environment *_environment, int _frames, int _width, int _height, int _mode) |
| Variable * | tms9918_new_sequence (Environment *_environment, int _sequences, int _frames, int _width, int _height, int _mode) |
| void | tms9918_get_image (Environment *_environment, char *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _palette) |
| void | tms9918_put_tile (Environment *_environment, char *_image, char *_x, char *_y) |
| void | tms9918_put_tiles (Environment *_environment, char *_image, char *_x, char *_y, char *_w, char *_h) |
| void | tms9918_move_tiles (Environment *_environment, char *_image, char *_x, char *_y) |
| void | tms9918_use_tileset (Environment *_environment, char *_tileset) |
| void | tms9918_tile_at (Environment *_environment, char *_x, char *_y, char *_result) |
| void | tms9918_move_memory_video (Environment *_environment, char *_from, char *_to, char *_size) |
| void | tms9918_move_video_memory (Environment *_environment, char *_from, char *_to, char *_size) |
| void | tms9918_move_video_video (Environment *_environment, char *_from, char *_to, char *_size) |
| void | tms9918_slice_image_copy (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination) |
| void | tms9918_slice_image_extract (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination) |
| int | tms9918_palette_extract (Environment *_environment, char *_data, int _width, int _height, int _depth, int _flags, RGBi *_palette) |
| void | tms9918_flip_image (Environment *_environment, Resource *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_direction) |
| void | tms9918_screen (Environment *_environment, char *_x, char *_y, char *_c) |
| #define BITMAP_MODE_DEFAULT BITMAP_MODE_GRAPHIC2 |
| #define BITMAP_MODE_STANDARD BITMAP_MODE_GRAPHIC2 |
| #define COLOR_LAVENDER COLOR_VIOLET |
| #define COLOR_LIGHT_WHITE COLOR_WHITE |
| #define COLOR_PEACH COLOR_PINK |
| #define COLOR_PINK COLOR_LIGHT_RED |
| #define COLOR_PURPLE COLOR_VIOLET |
| #define COLOR_TAN COLOR_BROWN |
| #define COLOR_TURQUOISE COLOR_LIGHT_BLUE |
| #define DEFAULT_PAPER_COLOR COLOR_BLACK |
| #define DEFAULT_PEN_COLOR COLOR_WHITE |
| #define WVDP | ( | r, | |
| v ) |
| #define WVDP_R0 | ( | v | ) |
| #define WVDP_R1 | ( | v | ) |
| #define WVDP_RCOLOR | ( | v | ) |
| #define WVDP_RCOLORTABLE | ( | v | ) |
| #define WVDP_RNAME | ( | v | ) |
| #define WVDP_RPATTERN | ( | v | ) |
| #define WVDP_RSPRITEA | ( | v | ) |
| #define WVDP_RSPRITEP | ( | v | ) |
| typedef void(* Tms9918SliceImageFunction) (Environment *, char *, char *, char *, int, int, char *) |
| void tms9918_back | ( | Environment * | _environment | ) |
| void tms9918_background_color | ( | Environment * | _environment, |
| int | _index, | ||
| int | _background_color ) |
TMS9918: emit code to change background color
This function can be used to issue code aimed at changing the background color of the screen.
| _environment | Current calling environment |
| _index | Index of the background color |
| _background_color | Background color to use |
| void tms9918_background_color_get_vars | ( | Environment * | _environment, |
| char * | _index, | ||
| char * | _background_color ) |
TMS9918: emit code to retrieve background color
This function can be used to issue code aimed at retrieving the background color of the screen.
| _environment | Current calling environment |
| _index | Index of the background color |
| _background_color | Background color to use |
| void tms9918_background_color_semivars | ( | Environment * | _environment, |
| int | _index, | ||
| char * | _background_color ) |
TMS9918: emit code to change background color
This function can be used to issue code aimed at changing the background color of the screen.
| _environment | Current calling environment |
| _index | Index of the background color |
| _background_color | Background color to use |
| void tms9918_background_color_vars | ( | Environment * | _environment, |
| char * | _index, | ||
| char * | _background_color ) |
TMS9918: emit code to change background color
This function can be used to issue code aimed at changing the background color of the screen.
| _environment | Current calling environment |
| _index | Index of the background color |
| _background_color | Background color to use |
| void tms9918_bank_select | ( | Environment * | _environment, |
| int | _bank ) |
| void tms9918_bitmap_at | ( | Environment * | _environment, |
| char * | _address ) |
| void tms9918_bitmap_disable | ( | Environment * | _environment | ) |
| void tms9918_bitmap_enable | ( | Environment * | _environment, |
| int | _width, | ||
| int | _height, | ||
| int | _colors ) |
| void tms9918_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 ) |
| void tms9918_border_color | ( | Environment * | _environment, |
| char * | _border_color ) |
| void tms9918_busy_wait | ( | Environment * | _environment, |
| char * | _timing ) |
| void tms9918_calculate_sequence_frame_offset | ( | Environment * | _environment, |
| char * | _offset, | ||
| char * | _sequence, | ||
| char * | _frame, | ||
| int | _frame_size, | ||
| int | _frame_count ) |
| void tms9918_cline | ( | Environment * | _environment, |
| char * | _characters ) |
| void tms9918_cls | ( | Environment * | _environment | ) |
| void tms9918_cls_box | ( | Environment * | _environment, |
| char * | _x1, | ||
| char * | _y1, | ||
| char * | _w, | ||
| char * | _h ) |
| Variable * tms9918_collision | ( | Environment * | _environment, |
| char * | _sprite ) |
TMS9918: 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.
| _environment | Current calling environment |
| _sprite_mask | Sprite mask to use |
| _result | Where to store the result |
| void tms9918_colormap_at | ( | Environment * | _environment, |
| char * | _address ) |
| void tms9918_colors_vars | ( | Environment * | _environment, |
| char * | _foreground_color, | ||
| char * | _background_color ) |
| void tms9918_finalization | ( | Environment * | _environment | ) |
| void tms9918_flip_image | ( | Environment * | _environment, |
| Resource * | _image, | ||
| char * | _frame, | ||
| char * | _sequence, | ||
| int | _frame_size, | ||
| int | _frame_count, | ||
| char * | _direction ) |
| void tms9918_get_height | ( | Environment * | _environment, |
| char * | _result ) |
| void tms9918_get_image | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _x, | ||
| char * | _y, | ||
| char * | _frame, | ||
| char * | _sequence, | ||
| int | _frame_size, | ||
| int | _frame_count, | ||
| int | _palette ) |
| Variable * tms9918_get_raster_line | ( | Environment * | _environment | ) |
| void tms9918_get_width | ( | Environment * | _environment, |
| char * | _result ) |
| void tms9918_hit | ( | Environment * | _environment, |
| char * | _sprite_mask, | ||
| char * | _result ) |
TMS9918: 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.
| _environment | Current calling environment |
| _sprite_mask | Sprite mask to use |
| _result | Where to store the result |
| void tms9918_horizontal_scroll | ( | Environment * | _environment, |
| char * | _displacement ) |
| void tms9918_hscroll_line | ( | Environment * | _environment, |
| int | _direction, | ||
| int | _overlap ) |
| void tms9918_hscroll_screen | ( | Environment * | _environment, |
| int | _direction, | ||
| int | _overlap ) |
| Variable * tms9918_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 ) |
| int tms9918_image_size | ( | Environment * | _environment, |
| int | _width, | ||
| int | _height, | ||
| int | _mode ) |
| void tms9918_initialization | ( | Environment * | _environment | ) |
| void tms9918_move_memory_video | ( | Environment * | _environment, |
| char * | _from, | ||
| char * | _to, | ||
| char * | _size ) |
| void tms9918_move_tiles | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _x, | ||
| char * | _y ) |
| void tms9918_move_video_memory | ( | Environment * | _environment, |
| char * | _from, | ||
| char * | _to, | ||
| char * | _size ) |
| void tms9918_move_video_video | ( | Environment * | _environment, |
| char * | _from, | ||
| char * | _to, | ||
| char * | _size ) |
| Variable * tms9918_new_image | ( | Environment * | _environment, |
| int | _width, | ||
| int | _height, | ||
| int | _mode ) |
| Variable * tms9918_new_images | ( | Environment * | _environment, |
| int | _frames, | ||
| int | _width, | ||
| int | _height, | ||
| int | _mode ) |
| Variable * tms9918_new_sequence | ( | Environment * | _environment, |
| int | _sequences, | ||
| int | _frames, | ||
| int | _width, | ||
| int | _height, | ||
| int | _mode ) |
| void tms9918_next_raster | ( | Environment * | _environment | ) |
| void tms9918_next_raster_at | ( | Environment * | _environment, |
| char * | _label, | ||
| char * | _positionlo, | ||
| char * | _positionhi ) |
TMS9918: 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.
| _environment | Current calling environment |
| _label | Label to jump to when vertical raster reach the value given |
| _positionlo | The vertical position to wait for (bits 7..0) |
| _positionhi | The vertical position to wait for (bit 8) |
| int tms9918_palette_extract | ( | Environment * | _environment, |
| char * | _data, | ||
| int | _width, | ||
| int | _height, | ||
| int | _depth, | ||
| int | _flags, | ||
| RGBi * | _palette ) |
| void tms9918_pget_color_vars | ( | Environment * | _environment, |
| char * | _x, | ||
| char * | _y, | ||
| char * | _result ) |
| void tms9918_pset_int | ( | Environment * | _environment, |
| int | _x, | ||
| int | _y, | ||
| int * | _c ) |
| void tms9918_pset_vars | ( | Environment * | _environment, |
| char * | _x, | ||
| char * | _y, | ||
| char * | _c ) |
| void tms9918_put_image | ( | Environment * | _environment, |
| Resource * | _image, | ||
| char * | _x, | ||
| char * | _y, | ||
| char * | _frame, | ||
| char * | _sequence, | ||
| int | _frame_size, | ||
| int | _frame_count, | ||
| char * | _flags ) |
| void tms9918_put_tile | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _x, | ||
| char * | _y ) |
| void tms9918_put_tiles | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _x, | ||
| char * | _y, | ||
| char * | _w, | ||
| char * | _h ) |
| void tms9918_raster_at | ( | Environment * | _environment, |
| char * | _label, | ||
| char * | _positionlo, | ||
| char * | _positionhi ) |
TMS9918: 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.
| _environment | Current calling environment |
| _label | Label to jump to when vertical raster reach the value given |
| _positionlo | The vertical position to wait for (bits 7..0) |
| _positionhi | The vertical position to wait for (bit 8) |
| void tms9918_screen | ( | Environment * | _environment, |
| char * | _x, | ||
| char * | _y, | ||
| char * | _c ) |
| void tms9918_screen_columns | ( | Environment * | _environment, |
| char * | _columns ) |
| int tms9918_screen_mode_enable | ( | Environment * | _environment, |
| ScreenMode * | _screen_mode ) |
| void tms9918_screen_off | ( | Environment * | _environment | ) |
| void tms9918_screen_on | ( | Environment * | _environment | ) |
| void tms9918_screen_rows | ( | Environment * | _environment, |
| char * | _rows ) |
| void tms9918_scroll | ( | Environment * | _environment, |
| int | _dx, | ||
| int | _dy ) |
| void tms9918_scroll_text | ( | Environment * | _environment, |
| int | _direction, | ||
| int | _overlap ) |
| void tms9918_slice_image_copy | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _frame, | ||
| char * | _sequence, | ||
| int | _frame_size, | ||
| int | _frame_count, | ||
| char * | _destination ) |
| void tms9918_slice_image_extract | ( | Environment * | _environment, |
| char * | _image, | ||
| char * | _frame, | ||
| char * | _sequence, | ||
| int | _frame_size, | ||
| int | _frame_count, | ||
| char * | _destination ) |
| void tms9918_sprite_at | ( | Environment * | _environment, |
| char * | _sprite, | ||
| char * | _x, | ||
| char * | _y ) |
| void tms9918_sprite_color | ( | Environment * | _environment, |
| char * | _sprite, | ||
| char * | _color ) |
| void tms9918_sprite_common_color | ( | Environment * | _environment, |
| char * | _index, | ||
| char * | _common_color ) |
TMS9918: 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.
| _environment | Current calling environment |
| _index | Index of the background color |
| _common_color | Index of the color to use |
| void tms9918_sprite_compress_horizontal | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_compress_vertical | ( | Environment * | _environment, |
| char * | _sprite ) |
| Variable * tms9918_sprite_converter | ( | Environment * | _environment, |
| char * | _data, | ||
| int | _width, | ||
| int | _height, | ||
| int | _depth, | ||
| RGBi * | _color, | ||
| int | _x_slot, | ||
| int | _y_slot ) |
| void tms9918_sprite_data_from | ( | Environment * | _environment, |
| char * | _sprite, | ||
| char * | _image ) |
| void tms9918_sprite_data_set | ( | Environment * | _environment, |
| char * | _sprite, | ||
| char * | _image ) |
| void tms9918_sprite_disable | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_enable | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_expand_horizontal | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_expand_vertical | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_monocolor | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_multicolor | ( | Environment * | _environment, |
| char * | _sprite ) |
| void tms9918_sprite_priority | ( | Environment * | _environment, |
| char * | _sprite, | ||
| char * | _priority ) |
| void tms9918_text | ( | Environment * | _environment, |
| char * | _text, | ||
| char * | _text_size, | ||
| int | _raw ) |
| void tms9918_textmap_at | ( | Environment * | _environment, |
| char * | _address ) |
| void tms9918_tile_at | ( | Environment * | _environment, |
| char * | _x, | ||
| char * | _y, | ||
| char * | _result ) |
| void tms9918_tilemap_enable | ( | Environment * | _environment, |
| int | _width, | ||
| int | _height, | ||
| int | _colors, | ||
| int | _tile_width, | ||
| int | _tile_height ) |
| void tms9918_tiles_at | ( | Environment * | _environment, |
| char * | _address ) |
| void tms9918_tiles_get | ( | Environment * | _environment, |
| char * | _result ) |
| void tms9918_use_tileset | ( | Environment * | _environment, |
| char * | _tileset ) |
| void tms9918_vertical_scroll | ( | Environment * | _environment, |
| char * | _displacement ) |
| void tms9918_wait_vbl | ( | Environment * | _environment | ) |