Unofficial documentation for the BlowUp screen enhancer on Atari Falcon 030 v 0.1 - 2003/01/29 0. Disclaimer This document describes the BlowUp cookie. This is an unofficial document. The originals authors have nothing in common with this document, except the involved product. This document describes the BlowUp cookie as the author understands it. While every effort has been made to ensure that the contents of this document are accurate, the author does not guarantee that any portion of this document is actually correct. In addition, the author cannot be held responsible the consequences of the any use or misuse of the information contained in this document. This work was done using the demo version, hence many features are not documented. 1. Introduction BlowUp is a screen enhancer for Atari Falcon 030 computers. The software only version only uses standard Videl (Atari Falcon video chip) clocks of 25 and 32 MHz to generate video modes. The hardware version has an enhanced clock that can be plugged in to have much varied video modes. When run from the AUTO folder, the blowboot.prg installs a new cookie, plus some new vectors to setup enhanced video modes. 2. The cookie Its name is 'BLOW', and is a pointer in memory to the following structure, which is also contained at offset 0x20 in the blowboot.prg file. typedef struct { blow_mode_t blowup_modes[10]; unsigned char num_mode[6]; void (*set_modes)(void); /* d1 = 0 */ /* d1 = 1 */ /* d1 = 2 */ /* d1 = -1 */ /* result d0.w = xres */ /* d1.w = xres */ /* d2.w = extended mode enabled ? */ /* d3.w = 42 */ /* d1 = -2 read screen saver properties */ /* result d0.b = 0:screen saver disabled, <>0:enabled */ /* d1.w = saver_counter>>16 (high word) */ /* d2.w = saver_counter & 0xffff (low word) */ /* d1 = -3 set screen saver properties */ /* d0.b = 0 : disable screen saver */ /* d0.b <> 0 : enable screen saver */ unsigned short montype; unsigned long max_saver_counter; unsigned short saver_active; /* 0 : disabled */ /* <>0 : enabled */ unsigned long saver_counter; } blow_cookie_t; The blowup_mode_t structure has a length of 256 bytes. The cookie stores 10 video modes: there is 2 definable modes for the 5 possible bpp (1, 2, 4, 8, 16). The 'num_mode' field value is 0 or 1 to select the first or second video mode for the needed bpp. The 'montype' field is the type of monitor plugged. 'blowup_modes[0..4]' are for mode #0, and 'blowup_modes[5..9]' for mode #1. 3. Defined video modes typedef struct { /* 64 bytes */ unsigned short flag1; /* Extended mode enabled ? 0=yes, 1=no, 2=undefined */ unsigned short flag2; unsigned short flag3; unsigned short dummy10[4]; unsigned short registers_0E; /* Register 0xffff820e */ unsigned short registers_10; /* Register 0xffff8210 */ unsigned short dummy11[23]; /* 64 bytes */ unsigned short xres; /* width-1 */ unsigned short yres; /* height-1 */ unsigned short bpl; /* bits per pixel */ unsigned long slen; /* screensize in bytes */ unsigned short celwr; unsigned short planes; unsigned short c_cfrequ; unsigned short pll_flag; unsigned short pll_res; unsigned short pll_r1; unsigned short pll_r2; unsigned short pll_r3; unsigned short vscr_flag; /* Virtual screen ? */ unsigned short vscr_rx; /* Virtual screen width */ unsigned short vscr_ry; /* Virtual screen height */ unsigned short col_mode; unsigned short monitor_type1; /* Monitor defined for this mode */ unsigned short critical_flag; /* Extended mode defined ? 0=yes, 1=no */ unsigned long max_s_c; unsigned short sav_act; unsigned short dummy23[10]; /* 64 bytes */ unsigned short dummy30; unsigned short registers_82[6];/* Registers 0xffff8282-8c */ unsigned short dummy31[2]; unsigned short registers_A2[6];/* Registers 0xffff82a2-ac */ unsigned short dummy33[9]; /* 64 bytes */ unsigned short registers_C0; /* Register 0xffff82c0 */ unsigned short registers_C2; /* Register 0xffff82c2 */ unsigned short dummy40[30]; } blow_mode_t; The 'enabled' field contains 0 if an enhanced mode is defined, and 2 otherwise. 'width', 'height' are the dimensions of the screen (virtual or real) minus 1, and 'screensize' is its length, as returned by Vgetsize(). When a virtual mode is defined, the 'virtual' field contains 1, otherwise 0. In this case, 'virwidth' and 'virheight' contains the visible portion of the virtual screen. 'monitor' contains the monitor type for which this mode is defined. The 'registers_*' fields contains the needed value for the Videl hardware registers. You don't need to play with them, as BlowUp will set the Videl accordingly when you call Vsetmode(). 4. Get current video mode When calling Vsetmode(-1), the value returned has always bit 14 set. The bit 15 is set if it is not an extended mode. 5. Setting a video mode To setup a non extended mode, set bit 15 in the value passed to Vsetmode(). To setup an extended mode, clear bit 15 int the value passed to Vsetmode(). First, BlowUp selects which mode (0 or 1) to set for the current bpp, in blowup_cookie_t->num_mode[num_bpp]. Then it checks if the extended mode is defined or not. If it is not defined, the standard video mode is setup. -- Patrice Mandin http://membres.lycos.fr/pmandin/