ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
ted.c File Reference
#include "../ugbc.h"
#include <math.h>

Go to the source code of this file.

Macros

#define FREQTED(f)
#define PROGRAM_FREQUENCY(c, f)
#define PROGRAM_FREQUENCY_V(c, f)
#define PROGRAM_FREQUENCY_SV(c, f)
#define PROGRAM_DURATION(c, d)
#define WAIT_DURATION(c)
#define PROGRAM_PITCH(c, f)
#define PROGRAM_PITCH_V(c, f)
#define PROGRAM_PITCH_SV(c, f)
#define PROGRAM_PULSE(c, p)
#define PROGRAM_PULSE_V(c, p)
#define PROGRAM_PULSE_SV(c, p)
#define PROGRAM_NOISE(c)
#define PROGRAM_NOISE_V(c, p)
#define PROGRAM_NOISE_SV(c)
#define PROGRAM_SAW(c)
#define PROGRAM_SAW_V(c)
#define PROGRAM_SAW_SV(c)
#define PROGRAM_TRIANGLE(c)
#define PROGRAM_TRIANGLE_V(c)
#define PROGRAM_TRIANGLE_SV(c)
#define PROGRAM_SAW_TRIANGLE(c)
#define PROGRAM_SAW_TRIANGLE_V(c)
#define PROGRAM_SAW_TRIANGLE_SV(c)
#define PROGRAM_ATTACK_DECAY(c, a, d)
#define PROGRAM_ATTACK_DECAY_V(c, a, d)
#define PROGRAM_ATTACK_DECAY_SV(c, a, d)
#define PROGRAM_SUSTAIN_RELEASE(c, s, r)
#define PROGRAM_SUSTAIN_RELEASE_V(c, s, r)
#define PROGRAM_SUSTAIN_RELEASE_SV(c, s, r)
#define STOP_FREQUENCY(c)
#define STOP_FREQUENCY_V(c)
#define STOP_FREQUENCY_SV(c)

Functions

RGBited_image_nearest_system_color (RGBi *_color)
void ted_collision (Environment *_environment, char *_sprite_mask, char *_result)
void ted_hit (Environment *_environment, char *_sprite_mask, char *_result)
void ted_border_color (Environment *_environment, char *_border_color)
 TED: emit code to change border color
void ted_background_color (Environment *_environment, int _index, int _background_color)
 TED: emit code to change bac_kground color
void ted_background_color_vars (Environment *_environment, char *_index, char *_background_color)
 TED: emit code to change background color
void ted_background_color_semivars (Environment *_environment, int _index, char *_background_color)
 TED: emit code to change background color
void ted_background_color_get_vars (Environment *_environment, char *_index, char *_background_color)
 TED: emit code to retrieve background color
void ted_sprite_common_color (Environment *_environment, char *_index, char *_common_color)
void ted_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 TED: emit code to set raster irq
void ted_next_raster (Environment *_environment)
 TED: emit code to wait for next raster irq
void ted_next_raster_at (Environment *_environment, char *_label, char *_positionlo, char *_positionhi)
 TED: emit code to wait for next raster irq at different position
void ted_bank_select (Environment *_environment, int _bank)
int ted_screen_mode_enable (Environment *_environment, ScreenMode *_screen_mode)
void console_calculate (Environment *_environment)
void console_calculate_vars (Environment *_environment)
void ted_bitmap_enable (Environment *_environment, int _width, int _height, int _colors)
void ted_bitmap_disable (Environment *_environment)
void ted_tilemap_enable (Environment *_environment, int _width, int _height, int _colors, int _tile_width, int _tile_height)
void ted_bitmap_at (Environment *_environment, char *_address)
void ted_colormap_at (Environment *_environment, char *_address)
void ted_textmap_at (Environment *_environment, char *_address)
void ted_charset_uppercase (Environment *_environment)
void ted_charset_lowercase (Environment *_environment)
void ted_charset_at (Environment *_environment, char *_address)
void ted_pset_int (Environment *_environment, int _x, int _y, int *_c)
void ted_pset_vars (Environment *_environment, char *_x, char *_y, char *_c)
void ted_pget_color_vars (Environment *_environment, char *_x, char *_y, char *_result)
void ted_screen_on (Environment *_environment)
void ted_screen_off (Environment *_environment)
void ted_screen_rows (Environment *_environment, char *_rows)
void ted_screen_columns (Environment *_environment, char *_columns)
void ted_sprite_data_from (Environment *_environment, char *_sprite, char *_address)
void ted_sprite_data_set (Environment *_environment, char *_sprite, char *_address)
void ted_sprite_enable (Environment *_environment, char *_sprite)
void ted_sprite_disable (Environment *_environment, char *_sprite)
void ted_sprite_at (Environment *_environment, char *_sprite, char *_x, char *_y)
void ted_sprite_expand_vertical (Environment *_environment, char *_sprite)
void ted_sprite_expand_horizontal (Environment *_environment, char *_sprite)
void ted_sprite_compress_vertical (Environment *_environment, char *_sprite)
void ted_sprite_compress_horizontal (Environment *_environment, char *_sprite)
void ted_sprite_multicolor (Environment *_environment, char *_sprite)
void ted_sprite_monocolor (Environment *_environment, char *_sprite)
void ted_sprite_color (Environment *_environment, char *_sprite, char *_color)
void ted_sprite_priority (Environment *_environment, char *_sprite, char *_priority)
void ted_tiles_at (Environment *_environment, char *_address)
void ted_vertical_scroll (Environment *_environment, char *_displacement)
void ted_horizontal_scroll (Environment *_environment, char *_displacement)
void ted_busy_wait (Environment *_environment, char *_timing)
void ted_get_width (Environment *_environment, char *_result)
void ted_tiles_get (Environment *_environment, char *_result)
void ted_get_height (Environment *_environment, char *_result)
void ted_cls (Environment *_environment)
void ted_cls_box (Environment *_environment, char *_x1, char *_y1, char *_w, char *_h)
void ted_scroll_text (Environment *_environment, int _direction, int _overlap)
void ted_scroll (Environment *_environment, int _dx, int _dy)
void ted_text (Environment *_environment, char *_text, char *_text_size, int _raw)
void ted_initialization (Environment *_environment)
void ted_finalization (Environment *_environment)
void ted_hscroll_line (Environment *_environment, int _direction, int _overlap)
void ted_hscroll_screen (Environment *_environment, int _direction, int _overlap)
void ted_back (Environment *_environment)
int ted_image_size (Environment *_environment, int _width, int _height, int _mode)
Variableted_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 ted_calculate_sequence_frame_offset (Environment *_environment, char *_offset, char *_sequence, char *_frame, int _frame_size, int _frame_count)
void ted_put_image (Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
void ted_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 ted_wait_vbl (Environment *_environment, char *_raster_line)
Variableted_new_image (Environment *_environment, int _width, int _height, int _mode)
Variableted_new_images (Environment *_environment, int _frames, int _width, int _height, int _mode)
Variableted_new_sequence (Environment *_environment, int _sequences, int _frames, int _width, int _height, int _mode)
void ted_get_image (Environment *_environment, char *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, int _palette)
void ted_put_tile (Environment *_environment, char *_tile, char *_x, char *_y)
void ted_move_tiles (Environment *_environment, char *_tile, char *_x, char *_y)
void ted_put_tiles (Environment *_environment, char *_tile, char *_x, char *_y, char *_w, char *_h)
void ted_tile_at (Environment *_environment, char *_x, char *_y, char *_result)
void ted_use_tileset (Environment *_environment, char *_tileset)
Variableted_get_raster_line (Environment *_environment)
void ted_start (Environment *_environment, int _channels)
void ted_set_volume (Environment *_environment, int _channels, int _volume)
void ted_set_program (Environment *_environment, int _channels, int _program)
void ted_set_parameter (Environment *_environment, int _channels, int _parameter, int _value)
void ted_set_frequency (Environment *_environment, int _channels, int _frequency)
void ted_set_pitch (Environment *_environment, int _channels, int _pitch)
void ted_set_note (Environment *_environment, int _channels, int _note)
void ted_stop (Environment *_environment, int _channels)
void ted_start_var (Environment *_environment, char *_channels)
void ted_set_volume_vars (Environment *_environment, char *_channels, char *_volume)
void ted_set_volume_semi_var (Environment *_environment, char *_channel, int _volume)
void ted_set_program_semi_var (Environment *_environment, char *_channels, int _program)
void ted_set_frequency_vars (Environment *_environment, char *_channels, char *_frequency)
void ted_set_pitch_vars (Environment *_environment, char *_channels, char *_pitch)
void ted_set_note_vars (Environment *_environment, char *_channels, char *_note)
void ted_stop_vars (Environment *_environment, char *_channels)
void ted_music (Environment *_environment, char *_music, int _size, int _loop)
void ted_slice_image (Environment *_environment, char *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_destination)
int ted_palette_extract (Environment *_environment, char *_data, int _width, int _height, int _depth, int _flags, RGBi *_palette)
void ted_flip_image (Environment *_environment, Resource *_image, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_direction)
void ted_set_duration (Environment *_environment, int _channels, int _duration)
void ted_wait_duration (Environment *_environment, int _channels)
void ted_set_duration_vars (Environment *_environment, char *_channels, char *_duration)
void ted_wait_duration_vars (Environment *_environment, char *_channels)
void ted_screen (Environment *_environment, char *_x, char *_y, char *_c)

Variables

int lastUsedSlotInCommonPalette = 0
int plotVBase []

Macro Definition Documentation

◆ FREQTED

#define FREQTED ( f)
Value:
( 1024 - (111841 / (f) ) )

Definition at line 2381 of file ted.c.

◆ PROGRAM_ATTACK_DECAY

#define PROGRAM_ATTACK_DECAY ( c,
a,
d )

Definition at line 2484 of file ted.c.

◆ PROGRAM_ATTACK_DECAY_SV

#define PROGRAM_ATTACK_DECAY_SV ( c,
a,
d )

Definition at line 2488 of file ted.c.

◆ PROGRAM_ATTACK_DECAY_V

#define PROGRAM_ATTACK_DECAY_V ( c,
a,
d )

Definition at line 2486 of file ted.c.

◆ PROGRAM_DURATION

#define PROGRAM_DURATION ( c,
d )
Value:
outline1("LDX #$%2.2x", ( d ) & 0xff ); \
outline1("LDY #$%2.2x", ( ( d ) >> 8 ) & 0xff ); \
if ( ( c & 0x01 ) ) \
outline0("JSR TEDPROGDUR0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDPROGDUR1" ); \
#define outline1(s, a)
Definition ugbc.h:4253

Definition at line 2403 of file ted.c.

◆ PROGRAM_FREQUENCY

#define PROGRAM_FREQUENCY ( c,
f )
Value:
outline1("LDX #$%2.2x", ( FREQTED( f ) ) & 0xff ); \
outline1("LDY #$%2.2x", ( ( FREQTED( f ) ) >> 8 ) & 0xff ); \
if ( ( c & 0x01 ) ) \
outline0("JSR TEDPROGFREQ0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDPROGFREQ1" ); \
#define FREQTED(f)
Definition ted.c:2381

Definition at line 2383 of file ted.c.

◆ PROGRAM_FREQUENCY_SV

#define PROGRAM_FREQUENCY_SV ( c,
f )
Value:
outline1("LDX #$%2.2x", ( FREQTED( f ) ) & 0xff ); \
outline1("LDY #$%2.2x", ( ( FREQTED( f ) ) >> 8 ) & 0xff ); \
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline0("JSR TEDFREQ2" );

Definition at line 2397 of file ted.c.

◆ PROGRAM_FREQUENCY_V

#define PROGRAM_FREQUENCY_V ( c,
f )
Value:
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline1("LDX %s", f ); \
outline1("LDY %s", address_displacement(_environment, f, "1") ); \
outline0("JSR TEDFREQ" );
char * address_displacement(Environment *_environment, char *_address, char *_displacement)

Definition at line 2391 of file ted.c.

◆ PROGRAM_NOISE

#define PROGRAM_NOISE ( c)
Value:
outline0("JSR TEDPROGNOISE" );
#define outline0(s)
Definition ugbc.h:4252

Definition at line 2457 of file ted.c.

◆ PROGRAM_NOISE_SV

#define PROGRAM_NOISE_SV ( c)
Value:
outline0("JSR TEDPROGNOISE" );

Definition at line 2463 of file ted.c.

◆ PROGRAM_NOISE_V

#define PROGRAM_NOISE_V ( c,
p )
Value:
outline0("JSR TEDPROGNOISE" );

Definition at line 2460 of file ted.c.

◆ PROGRAM_PITCH

#define PROGRAM_PITCH ( c,
f )
Value:
outline1("LDX #$%2.2x", ( f & 0xff ) ); \
outline1("LDY #$%2.2x", ( ( f >> 8 ) & 0xff ) ); \
if ( ( c & 0x01 ) ) \
outline0("JSR TEDPROGFREQ0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDPROGFREQ1" ); \

Definition at line 2417 of file ted.c.

◆ PROGRAM_PITCH_SV

#define PROGRAM_PITCH_SV ( c,
f )
Value:
outline1("LDX #$%2.2x", ( f & 0xff ) ); \
outline1("LDY #$%2.2x", ( ( f >> 8 ) & 0xff ) ); \
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline0("JSR TEDPROGFREQ" );

Definition at line 2431 of file ted.c.

◆ PROGRAM_PITCH_V

#define PROGRAM_PITCH_V ( c,
f )
Value:
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline1("LDX %s", f ); \
outline1("LDY %s", address_displacement(_environment, f, "1") ); \
outline0("JSR TEDPROGFREQ" );

Definition at line 2425 of file ted.c.

◆ PROGRAM_PULSE

#define PROGRAM_PULSE ( c,
p )
Value:
outline1("LDX #$%2.2x", ( p & 0xff ) ); \
outline1("LDY #$%2.2x", ( ( p >> 8 ) & 0xff ) ); \
if ( ( c & 0x01 ) ) \
outline0("JSR TEDPROGPULSE0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDPROGPULSE1" ); \

Definition at line 2437 of file ted.c.

◆ PROGRAM_PULSE_SV

#define PROGRAM_PULSE_SV ( c,
p )
Value:
outline1("LDX #$%2.2x", ( p & 0xff ) ); \
outline1("LDY #$%2.2x", ( ( p >> 8 ) & 0xff ) ); \
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline0("JSR TEDPROGPULSE" );

Definition at line 2451 of file ted.c.

◆ PROGRAM_PULSE_V

#define PROGRAM_PULSE_V ( c,
p )
Value:
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline1("LDX %s", p ); \
outline1("LDY %s", address_displacement(_environment, p, "1") ); \
outline0("JSR TEDPROGPULSE" );

Definition at line 2445 of file ted.c.

◆ PROGRAM_SAW

#define PROGRAM_SAW ( c)

Definition at line 2466 of file ted.c.

◆ PROGRAM_SAW_SV

#define PROGRAM_SAW_SV ( c)

Definition at line 2470 of file ted.c.

◆ PROGRAM_SAW_TRIANGLE

#define PROGRAM_SAW_TRIANGLE ( c)

Definition at line 2478 of file ted.c.

◆ PROGRAM_SAW_TRIANGLE_SV

#define PROGRAM_SAW_TRIANGLE_SV ( c)

Definition at line 2482 of file ted.c.

◆ PROGRAM_SAW_TRIANGLE_V

#define PROGRAM_SAW_TRIANGLE_V ( c)

Definition at line 2480 of file ted.c.

◆ PROGRAM_SAW_V

#define PROGRAM_SAW_V ( c)

Definition at line 2468 of file ted.c.

◆ PROGRAM_SUSTAIN_RELEASE

#define PROGRAM_SUSTAIN_RELEASE ( c,
s,
r )

Definition at line 2490 of file ted.c.

◆ PROGRAM_SUSTAIN_RELEASE_SV

#define PROGRAM_SUSTAIN_RELEASE_SV ( c,
s,
r )

Definition at line 2494 of file ted.c.

◆ PROGRAM_SUSTAIN_RELEASE_V

#define PROGRAM_SUSTAIN_RELEASE_V ( c,
s,
r )

Definition at line 2492 of file ted.c.

◆ PROGRAM_TRIANGLE

#define PROGRAM_TRIANGLE ( c)

Definition at line 2472 of file ted.c.

◆ PROGRAM_TRIANGLE_SV

#define PROGRAM_TRIANGLE_SV ( c)

Definition at line 2476 of file ted.c.

◆ PROGRAM_TRIANGLE_V

#define PROGRAM_TRIANGLE_V ( c)

Definition at line 2474 of file ted.c.

◆ STOP_FREQUENCY

#define STOP_FREQUENCY ( c)
Value:
if ( ( c & 0x01 ) ) \
outline0("JSR TEDSTOP0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDSTOP1" ); \

Definition at line 2496 of file ted.c.

◆ STOP_FREQUENCY_SV

#define STOP_FREQUENCY_SV ( c)
Value:
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline0("JSR TEDSTOP" );

Definition at line 2506 of file ted.c.

◆ STOP_FREQUENCY_V

#define STOP_FREQUENCY_V ( c)
Value:
outline1("LDA %s", ( c == NULL ? "#$3" : c ) ); \
outline0("JSR TEDSTOP" );

Definition at line 2502 of file ted.c.

◆ WAIT_DURATION

#define WAIT_DURATION ( c)
Value:
if ( ( c & 0x01 ) ) \
outline0("JSR TEDWAITDUR0" ); \
if ( ( c & 0x02 ) ) \
outline0("JSR TEDWAITDUR1" ); \

Definition at line 2411 of file ted.c.

Function Documentation

◆ console_calculate()

void console_calculate ( Environment * _environment)

Definition at line 890 of file ted.c.

◆ console_calculate_vars()

void console_calculate_vars ( Environment * _environment)

Definition at line 925 of file ted.c.

◆ ted_back()

void ted_back ( Environment * _environment)

Definition at line 1473 of file ted.c.

◆ ted_background_color()

void ted_background_color ( Environment * _environment,
int _index,
int _background_color )

TED: emit code to change bac_kground 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 552 of file ted.c.

◆ ted_background_color_get_vars()

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

TED: emit code to retrieve background color

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

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

Definition at line 609 of file ted.c.

◆ ted_background_color_semivars()

void ted_background_color_semivars ( Environment * _environment,
int _index,
char * _background_color )

TED: 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 589 of file ted.c.

◆ ted_background_color_vars()

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

TED: 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 569 of file ted.c.

◆ ted_bank_select()

void ted_bank_select ( Environment * _environment,
int _bank )

Definition at line 717 of file ted.c.

◆ ted_bitmap_at()

void ted_bitmap_at ( Environment * _environment,
char * _address )

Definition at line 982 of file ted.c.

◆ ted_bitmap_disable()

void ted_bitmap_disable ( Environment * _environment)

Definition at line 951 of file ted.c.

◆ ted_bitmap_enable()

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

Definition at line 933 of file ted.c.

◆ ted_blit_image()

void ted_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 2030 of file ted.c.

◆ ted_border_color()

void ted_border_color ( Environment * _environment,
char * _border_color )

TED: 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 534 of file ted.c.

◆ ted_busy_wait()

void ted_busy_wait ( Environment * _environment,
char * _timing )

Definition at line 1219 of file ted.c.

◆ ted_calculate_sequence_frame_offset()

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

Definition at line 1721 of file ted.c.

◆ ted_charset_at()

void ted_charset_at ( Environment * _environment,
char * _address )

Definition at line 1002 of file ted.c.

◆ ted_charset_lowercase()

void ted_charset_lowercase ( Environment * _environment)

Definition at line 998 of file ted.c.

◆ ted_charset_uppercase()

void ted_charset_uppercase ( Environment * _environment)

Definition at line 994 of file ted.c.

◆ ted_cls()

void ted_cls ( Environment * _environment)

Definition at line 1265 of file ted.c.

◆ ted_cls_box()

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

Definition at line 1277 of file ted.c.

◆ ted_collision()

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

Definition at line 517 of file ted.c.

◆ ted_colormap_at()

void ted_colormap_at ( Environment * _environment,
char * _address )

Definition at line 986 of file ted.c.

◆ ted_finalization()

void ted_finalization ( Environment * _environment)

Definition at line 1423 of file ted.c.

◆ ted_flip_image()

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

Definition at line 3102 of file ted.c.

◆ ted_get_height()

void ted_get_height ( Environment * _environment,
char * _result )

Definition at line 1256 of file ted.c.

◆ ted_get_image()

void ted_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 2185 of file ted.c.

◆ ted_get_raster_line()

Variable * ted_get_raster_line ( Environment * _environment)

Definition at line 2326 of file ted.c.

◆ ted_get_width()

void ted_get_width ( Environment * _environment,
char * _result )

Definition at line 1240 of file ted.c.

◆ ted_hit()

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

Definition at line 521 of file ted.c.

◆ ted_horizontal_scroll()

void ted_horizontal_scroll ( Environment * _environment,
char * _displacement )

Definition at line 1210 of file ted.c.

◆ ted_hscroll_line()

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

Definition at line 1447 of file ted.c.

◆ ted_hscroll_screen()

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

Definition at line 1461 of file ted.c.

◆ ted_image_converter()

Variable * ted_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 1698 of file ted.c.

◆ ted_image_nearest_system_color()

RGBi * ted_image_nearest_system_color ( RGBi * _color)

Definition at line 94 of file ted.c.

◆ ted_image_size()

int ted_image_size ( Environment * _environment,
int _width,
int _height,
int _mode )

Definition at line 1481 of file ted.c.

◆ ted_initialization()

void ted_initialization ( Environment * _environment)

Definition at line 1357 of file ted.c.

◆ ted_move_tiles()

void ted_move_tiles ( Environment * _environment,
char * _tile,
char * _x,
char * _y )

Definition at line 2229 of file ted.c.

◆ ted_music()

void ted_music ( Environment * _environment,
char * _music,
int _size,
int _loop )

Definition at line 3063 of file ted.c.

◆ ted_new_image()

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

Definition at line 2096 of file ted.c.

◆ ted_new_images()

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

Definition at line 2120 of file ted.c.

◆ ted_new_sequence()

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

Definition at line 2152 of file ted.c.

◆ ted_next_raster()

void ted_next_raster ( Environment * _environment)

TED: 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 674 of file ted.c.

◆ ted_next_raster_at()

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

TED: 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 694 of file ted.c.

◆ ted_palette_extract()

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

Definition at line 3088 of file ted.c.

◆ ted_pget_color_vars()

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

Definition at line 1073 of file ted.c.

◆ ted_pset_int()

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

Definition at line 1006 of file ted.c.

◆ ted_pset_vars()

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

Definition at line 1035 of file ted.c.

◆ ted_put_image()

void ted_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 1996 of file ted.c.

◆ ted_put_tile()

void ted_put_tile ( Environment * _environment,
char * _tile,
char * _x,
char * _y )

Definition at line 2208 of file ted.c.

◆ ted_put_tiles()

void ted_put_tiles ( Environment * _environment,
char * _tile,
char * _x,
char * _y,
char * _w,
char * _h )

Definition at line 2270 of file ted.c.

◆ ted_raster_at()

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

TED: 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 639 of file ted.c.

◆ ted_screen()

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

Definition at line 3202 of file ted.c.

◆ ted_screen_columns()

void ted_screen_columns ( Environment * _environment,
char * _columns )

Definition at line 1125 of file ted.c.

◆ ted_screen_mode_enable()

int ted_screen_mode_enable ( Environment * _environment,
ScreenMode * _screen_mode )

Definition at line 744 of file ted.c.

◆ ted_screen_off()

void ted_screen_off ( Environment * _environment)

Definition at line 1101 of file ted.c.

◆ ted_screen_on()

void ted_screen_on ( Environment * _environment)

Definition at line 1097 of file ted.c.

◆ ted_screen_rows()

void ted_screen_rows ( Environment * _environment,
char * _rows )

Definition at line 1105 of file ted.c.

◆ ted_scroll()

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

Definition at line 1316 of file ted.c.

◆ ted_scroll_text()

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

Definition at line 1301 of file ted.c.

◆ ted_set_duration()

void ted_set_duration ( Environment * _environment,
int _channels,
int _duration )

Definition at line 3146 of file ted.c.

◆ ted_set_duration_vars()

void ted_set_duration_vars ( Environment * _environment,
char * _channels,
char * _duration )

Definition at line 3164 of file ted.c.

◆ ted_set_frequency()

void ted_set_frequency ( Environment * _environment,
int _channels,
int _frequency )

Definition at line 2716 of file ted.c.

◆ ted_set_frequency_vars()

void ted_set_frequency_vars ( Environment * _environment,
char * _channels,
char * _frequency )

Definition at line 2990 of file ted.c.

◆ ted_set_note()

void ted_set_note ( Environment * _environment,
int _channels,
int _note )

Definition at line 2734 of file ted.c.

◆ ted_set_note_vars()

void ted_set_note_vars ( Environment * _environment,
char * _channels,
char * _note )

Definition at line 3024 of file ted.c.

◆ ted_set_parameter()

void ted_set_parameter ( Environment * _environment,
int _channels,
int _parameter,
int _value )

Definition at line 2712 of file ted.c.

◆ ted_set_pitch()

void ted_set_pitch ( Environment * _environment,
int _channels,
int _pitch )

Definition at line 2725 of file ted.c.

◆ ted_set_pitch_vars()

void ted_set_pitch_vars ( Environment * _environment,
char * _channels,
char * _pitch )

Definition at line 3007 of file ted.c.

◆ ted_set_program()

void ted_set_program ( Environment * _environment,
int _channels,
int _program )

Definition at line 2510 of file ted.c.

◆ ted_set_program_semi_var()

void ted_set_program_semi_var ( Environment * _environment,
char * _channels,
int _program )

Definition at line 2788 of file ted.c.

◆ ted_set_volume()

void ted_set_volume ( Environment * _environment,
int _channels,
int _volume )

Definition at line 2371 of file ted.c.

◆ ted_set_volume_semi_var()

void ted_set_volume_semi_var ( Environment * _environment,
char * _channel,
int _volume )

Definition at line 2778 of file ted.c.

◆ ted_set_volume_vars()

void ted_set_volume_vars ( Environment * _environment,
char * _channels,
char * _volume )

Definition at line 2763 of file ted.c.

◆ ted_slice_image()

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

Definition at line 3084 of file ted.c.

◆ ted_sprite_at()

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

Definition at line 1161 of file ted.c.

◆ ted_sprite_color()

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

Definition at line 1189 of file ted.c.

◆ ted_sprite_common_color()

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

Definition at line 620 of file ted.c.

◆ ted_sprite_compress_horizontal()

void ted_sprite_compress_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 1177 of file ted.c.

◆ ted_sprite_compress_vertical()

void ted_sprite_compress_vertical ( Environment * _environment,
char * _sprite )

Definition at line 1173 of file ted.c.

◆ ted_sprite_data_from()

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

Definition at line 1145 of file ted.c.

◆ ted_sprite_data_set()

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

Definition at line 1149 of file ted.c.

◆ ted_sprite_disable()

void ted_sprite_disable ( Environment * _environment,
char * _sprite )

Definition at line 1157 of file ted.c.

◆ ted_sprite_enable()

void ted_sprite_enable ( Environment * _environment,
char * _sprite )

Definition at line 1153 of file ted.c.

◆ ted_sprite_expand_horizontal()

void ted_sprite_expand_horizontal ( Environment * _environment,
char * _sprite )

Definition at line 1169 of file ted.c.

◆ ted_sprite_expand_vertical()

void ted_sprite_expand_vertical ( Environment * _environment,
char * _sprite )

Definition at line 1165 of file ted.c.

◆ ted_sprite_monocolor()

void ted_sprite_monocolor ( Environment * _environment,
char * _sprite )

Definition at line 1185 of file ted.c.

◆ ted_sprite_multicolor()

void ted_sprite_multicolor ( Environment * _environment,
char * _sprite )

Definition at line 1181 of file ted.c.

◆ ted_sprite_priority()

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

Definition at line 1193 of file ted.c.

◆ ted_start()

void ted_start ( Environment * _environment,
int _channels )

Definition at line 2357 of file ted.c.

◆ ted_start_var()

void ted_start_var ( Environment * _environment,
char * _channels )

Definition at line 2749 of file ted.c.

◆ ted_stop()

void ted_stop ( Environment * _environment,
int _channels )

Definition at line 2740 of file ted.c.

◆ ted_stop_vars()

void ted_stop_vars ( Environment * _environment,
char * _channels )

Definition at line 3053 of file ted.c.

◆ ted_text()

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

Definition at line 1331 of file ted.c.

◆ ted_textmap_at()

void ted_textmap_at ( Environment * _environment,
char * _address )

Definition at line 990 of file ted.c.

◆ ted_tile_at()

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

Definition at line 2298 of file ted.c.

◆ ted_tilemap_enable()

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

Definition at line 964 of file ted.c.

◆ ted_tiles_at()

void ted_tiles_at ( Environment * _environment,
char * _address )

Definition at line 1197 of file ted.c.

◆ ted_tiles_get()

void ted_tiles_get ( Environment * _environment,
char * _result )

Definition at line 1249 of file ted.c.

◆ ted_use_tileset()

void ted_use_tileset ( Environment * _environment,
char * _tileset )

Definition at line 2315 of file ted.c.

◆ ted_vertical_scroll()

void ted_vertical_scroll ( Environment * _environment,
char * _displacement )

Definition at line 1201 of file ted.c.

◆ ted_wait_duration()

void ted_wait_duration ( Environment * _environment,
int _channels )

Definition at line 3155 of file ted.c.

◆ ted_wait_duration_vars()

void ted_wait_duration_vars ( Environment * _environment,
char * _channels )

Definition at line 3186 of file ted.c.

◆ ted_wait_vbl()

void ted_wait_vbl ( Environment * _environment,
char * _raster_line )

Definition at line 2088 of file ted.c.

Variable Documentation

◆ lastUsedSlotInCommonPalette

int lastUsedSlotInCommonPalette = 0

Definition at line 60 of file ted.c.

◆ plotVBase

int plotVBase[]
Initial value:
= {
0x6000+(0*320),0x6000+(1*320),0x6000+(2*320),0x6000+(3*320),
0x6000+(4*320),0x6000+(5*320),0x6000+(6*320),0x6000+(7*320),
0x6000+(8*320),0x6000+(9*320),0x6000+(10*320),0x6000+(11*320),
0x6000+(12*320),0x6000+(13*320),0x6000+(14*320),0x6000+(15*320),
0x6000+(16*320),0x6000+(17*320),0x6000+(18*320),0x6000+(19*320),
0x6000+(20*320),0x6000+(21*320),0x6000+(22*320),0x6000+(23*320),
0x6000+(24*320)
}

Definition at line 62 of file ted.c.