Next Previous Contents

3.235 tgi_ioctl

Function

Platform dependent code extensions.

Header

tgi.h

Declaration

unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);

Description

Some platforms have extra display hardware that is not supported by standard tgi functions. You can extend the driver to support this extra hardware using tgi_ioctl functions.

Limits

  • The function is only available as fastcall function, so it may only be used in presence of a prototype.
  • These functions are not easily portable to other cc65 platforms.

Availability

cc65

See also

Other tgi functions.

Example

#define tgi_sprite(spr) tgi_ioctl(0, (void*)(spr))
#define tgi_flip() tgi_ioctl(1, (void*)0)
#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
#define tgi_busy() tgi_ioctl(4, (void*)0)
#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
if (!tgi_busy()) {
  tgi_sprite(&background);
  tgi_setcolor(TGI_COLOR_BLUE);
  tgi_outttextxy(20,40,"Hello World");
  tgi_updatedisplay();
}


Next Previous Contents