BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
rifxlib.c File Reference
#include "blitzlib.h"
#include <stddef.h>
#include <graphics/gfx.h>

Macros

#define RI_BMAP(r, p)
#define RI_BMAPS()
#define B_(a)
#define W_(a)
#define L_(a)
#define BM(bm)
#define BM_BPR(bm)
#define BM_ROWS(bm)
#define BM_DEPTH(bm)
#define BM_PLANES(bm)
#define bit_add   (&pa.all[0])
#define dest_add   (&pa.all[16])
#define source_address   pa.v.source_address
#define dest_address   pa.v.dest_address
#define add_source   pa.v.add_source
#define add_dest   pa.v.add_dest
#define TABLESIZE   1856
#define COPY40(s, d)

Functions

static void clearbitmap2 (ULONG delay, ULONG bm)
 ClearBitmap bitmap#,delay: clears the whole bitmap line by line with a dither fade (see clearbitmap_c).
static void clearbitmap (ULONG delay, ULONG h, ULONG off, ULONG bm)
 ClearBitmap bitmap#,delay,height,offset: clears height lines from line offset on with a dither fade.
static void fadeinbitmap2 (ULONG delay, ULONG src, ULONG dst)
 FadeInBitmap bitmapsource#,bitmapdest#,delay: fades the whole source into the destination line by line (see fadein_c).
static void fadeinbitmap (ULONG delay, ULONG h, ULONG off1, ULONG off2, ULONG src, ULONG dst)
 FadeInBitmap bitmapsource#,bitmapdest#,delay,height,offset1,offset2: fades height source lines into the destination with a dither.
void zoomxy_no_xy (void)
void zoomx4_xy (void)
void asmderez (void)
void AsmZoom (void)
void InitZoomxy (void)
void zoomtables (void)
void ADDValue (void)
void ReduceX2 (void)
void dozoomy (void)
void rifxlib_libinit (void)
void rifxlib_libfinit (void)
void clearchk (void)
void fadechk (void)
void bm2chk (void)
void zoomxychk (void)
void zoomychk (void)
static void libfinit_c (void)
 finit: frees the zoom tables (1856 bytes, memlib globfree).
static void libinit_c (void)
 init: allocates the zoom tables (memlib globalloc, 1856 bytes MEMF_PUBLIC) and fills them.
static ULONG zoomtables_c (void)
 GetZoomTables: the address of the four table pointers.
static void slow_down (void)
static void clearbitmap_c (ULONG delay, UWORD h, UWORD off, ULONG bm)
static void fadein_c (ULONG delay, UWORD h, UWORD off1, UWORD off2, ULONG src, ULONG dst)
static BOOL zoomstart (UWORD width, UWORD h, WORD *wbytes)
static void zoomx4_c (UBYTE sel, ULONG srcadd, ULONG dstadd, UWORD width, UWORD h, ULONG src, ULONG dst)
static void zoomx4_6_c (ULONG srcadd, ULONG dstadd, ULONG width, ULONG h, ULONG src, ULONG dst)
 ZoomX4 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 4x4 pixels (zoomx4 table, see zoomx4_c).
static void zoomx4_7_c (ULONG srcadd, ULONG dstadd, ULONG width, ULONG h, ULONG src, ULONG dst, const UBYTE *args)
 ZoomX4 source#,dest#,sourceadd,destadd,width,height,xy_select: as ZoomX4 above, in one direction only if asked.
static void zoomx2_c (ULONG srcadd, ULONG dstadd, ULONG width, ULONG h, ULONG src, ULONG dst)
 ZoomX2 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 2x2 pixels (zoomx2 table).
static void zoomx8_c (ULONG srcadd, ULONG dstadd, ULONG width, ULONG h, ULONG src, ULONG dst)
 ZoomX8 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 8x8 pixels (zoomx8 table).
static void dozoomy_c (ULONG bm)
 ZoomyZoom bitmap#: doubles the left half of the bitmap in x, in place (zoomx2 table).
static void reducex2_c (ULONG srcadd, ULONG dstadd, ULONG width, ULONG h, ULONG src, ULONG dst)
 ReduceX2 source#,dest#,sourceadd,destadd,width,height: halves the size (reducex2 table).
static void store_bitplanes (ULONG src, ULONG dst, ULONG sadd, ULONG dadd)
static void screencopy (void)
static void unrezx2 (void)
static ULONG asmderez_c (ULONG sadd, ULONG dadd, ULONG rez, ULONG h, ULONG src, ULONG dst)
 Derez source#,dest#,sourceadd,destadd,derez_value,height: lowers the resolution of a lores bitmap (40 bytes per line).
static void initzoomxy_c (ULONG sadd, ULONG dadd, ULONG src, ULONG dst)
 InitZoomXY source#,dest#,sourceadd,destadd: stores the bitmaps and offsets for ZoomXY.
static void asmzoom_c (ULONG xz, ULONG yz, ULONG h)
 ZoomXY xzoom,yzoom,height: zooms the bitmaps of InitZoomXY (lores, 40 bytes per line) by whole factors.
static ULONG addvalue_c (ULONG x, ULONG y, ULONG bm)
 ADDValue(bitmap#,x,y): the byte offset of pixel x,y in a plane.
static void depthchk (ULONG bm)
static void clearchk_c (ULONG delay, ULONG bm)
 The error check of ClearBitmap (both forms; debugger only).
static void fadechk_c (ULONG delay, ULONG src, ULONG dst)
 The error check of FadeInBitmap (both forms; debugger only).
static void bm2chk_c (ULONG src, ULONG dst)
 The error check of ZoomX2, ZoomX4 (both forms), ZoomX8, ReduceX2 and Derez (debugger only).
static void zoomxychk_c (void)
 The error check of ZoomXY (debugger only): the bitmaps of InitZoomXY.
static void zoomychk_c (ULONG bm)
 The error check of ZoomyZoom (debugger only).

Variables

static UWORD EWWidth
static UWORD BHeight
static UWORD BDepth
static ULONG delay_timer
static UWORD bytesperline
static UWORD bytesperline2
static UWORD xzoom = 1
static UWORD yzoom = 1
static ULONG tableaddress
struct { 
   ULONG   reducex2 
   ULONG   zoomx2 
   ULONG   zoomx4 
   ULONG   zoomx8 
} tables
static ULONG add_value = 1
static UWORD res_value
static UWORD res_value2
static UWORD res_value3
static UWORD myline [21]
static UWORD yzoom_value = 1
static UWORD yzoom_value2 = 1
static UWORD xzoom_value = 1
static UWORD sbitdepth
static UWORD yvalue
static UWORD height
union { 
   ULONG   all [36] 
   struct { 
      ULONG   bit_add [16] 
      ULONG   dest_add [16] 
      ULONG   source_address 
      ULONG   dest_address 
      ULONG   add_source 
      ULONG   add_dest 
   }   v
} pa

Macro Definition Documentation

◆ add_dest

#define add_dest   pa.v.add_dest

◆ add_source

#define add_source   pa.v.add_source

◆ B_

#define B_ ( a)
Value:
(*(UBYTE *)(a))

◆ bit_add

#define bit_add   (&pa.all[0])

◆ BM

#define BM ( bm)
Value:
((struct BitMap *)(bm))
struct BitMap bm
Definition iffmakelib.c:162

◆ BM_BPR

#define BM_BPR ( bm)
Value:
(BM(bm)->BytesPerRow)
#define BM
Definition bitmaplib.c:134

◆ BM_DEPTH

#define BM_DEPTH ( bm)
Value:
B_((bm) + offsetof(struct BitMap, Depth))
#define B_(a)
Definition rifxlib.c:228

◆ BM_PLANES

#define BM_PLANES ( bm)
Value:
((ULONG)BM(bm)->Planes)

◆ BM_ROWS

#define BM_ROWS ( bm)
Value:
(BM(bm)->Rows)

◆ COPY40

#define COPY40 ( s,
d )
Value:
do { \
int k_; \
for (k_ = 0; k_ < 10; k_++) { \
L_(d) = L_(s); \
(s) += 4; \
(d) += 4; \
} \
} while (0)
static struct @065163037313156332013005143365272036211065172003 d
#define L_(a)
Definition rifxlib.c:230

◆ dest_add

#define dest_add   (&pa.all[16])

◆ dest_address

#define dest_address   pa.v.dest_address

◆ L_

#define L_ ( a)
Value:
(*(ULONG *)(a))

◆ RI_BMAP

#define RI_BMAP ( r,
p )
Value:
LIB_bitmaplib, BL_LA(r) | BL_ITEM | BL_PD(p)
#define BL_LA(n)
Definition blitzlib.h:178
#define BL_PD(n)
Definition blitzlib.h:185
#define BL_ITEM
Definition blitzlib.h:184

◆ RI_BMAPS

RI_BMAPS ( )
Value:
BLITZ_LIBS(RI_BMAP(0, 0), RI_BMAP(1, 1))
#define BLITZ_LIBS(...)
Definition blitzlib.h:361
#define RI_BMAP(r, p)
Definition rifxlib.c:128

◆ source_address

#define source_address   pa.v.source_address

◆ TABLESIZE

#define TABLESIZE   1856

◆ W_

#define W_ ( a)
Value:
(*(UWORD *)(a))

Function Documentation

◆ ADDValue()

void ADDValue ( void )

◆ addvalue_c()

ULONG addvalue_c ( ULONG x,
ULONG y,
ULONG bm )
static

ADDValue(bitmap#,x,y): the byte offset of pixel x,y in a plane.

Parameters
xd1.w: x (ASR.w #3: signed)
yd2.w: the line
bma0: the bitmap of bitmap# (d0)
Returns
d0: y * bm_BytesPerRow + x/8 (changes d1)

◆ asmderez()

void asmderez ( void )

◆ asmderez_c()

ULONG asmderez_c ( ULONG sadd,
ULONG dadd,
ULONG rez,
ULONG h,
ULONG src,
ULONG dst )
static

Derez source#,dest#,sourceadd,destadd,derez_value,height: lowers the resolution of a lores bitmap (40 bytes per line).

Blocks of derez_value pixels and lines get the colour of their first pixel (1 = ScreenCopy, 2 = UnrezX2, up to 17 through the mask table myline, above that bit by bit); derez_value 0 does nothing. The result: -1, 0 for derez_value 0 (fixed #672: the original set none, d0 was what the routine left there - the input for 0, its upper word and $FFFF for 1, the last long for 2, else the last mask/source word). Values >= 3 write 20 (21) words of myline, which has room for 21 here (the original's 18 words were followed by ZoomXY's code: fixed #671, DIFF). A depth-0 source gives 65536 planes, more than 16 planes overrun the pointer arrays: refused by bm2chk (fixed #947, #674). sbitdepth is set as a whole word (fixed #675: the original set its low byte only).

Parameters
saddd2: byte offset added to every source plane
daddd3: byte offset added to every destination plane
rezd4.w: derez_value, the block size
hd5.w: the number of lines
srca0: the source bitmap (d0)
dsta1: the destination bitmap (d1)
Returns
d0: -1 when it worked, 0 for derez_value 0

◆ AsmZoom()

void AsmZoom ( void )

◆ asmzoom_c()

void asmzoom_c ( ULONG xz,
ULONG yz,
ULONG h )
static

ZoomXY xzoom,yzoom,height: zooms the bitmaps of InitZoomXY (lores, 40 bytes per line) by whole factors.

Every source pixel becomes xzoom pixels wide, every line yzoom lines high; 1,1 = ScreenCopy; a factor 0 does nothing. A depth-0 source gives 65536 planes, more than 16 planes overrun the pointer arrays: refused by zoomxychk (fixed #947, #674), as is a ZoomXY before any InitZoomXY (fixed #1131: the bitmaps at address 0). sbitdepth is set as a whole word (fixed #675: the original set its low byte only).

Parameters
xzd0.w: xzoom
yzd1.w: yzoom
hd2.w: the number of lines Returns nothing (keeps d1-d7/a0-a6, and d0 if it does nothing).

◆ bm2chk()

void bm2chk ( void )

◆ bm2chk_c()

void bm2chk_c ( ULONG src,
ULONG dst )
static

The error check of ZoomX2, ZoomX4 (both forms), ZoomX8, ReduceX2 and Derez (debugger only).

Fixed (#947, #674), not in the original: the source's depth was not checked - the zooms count it as a byte (depth 0 = 256 planes, through the plane pointers behind the bitmap object), Derez as a word (65536 planes over the 16-entry plane pointer arrays and the 256 KB behind them); more than 16 planes overran Derez's arrays. The release code is unchanged (D-005).

Errors: "Illegal BitMap Depth" (depth 0 or more than 8, either bitmap).

Parameters
srca0: the source bitmap (source#)
dsta1: the destination bitmap (dest#)

◆ clearbitmap()

void clearbitmap ( ULONG delay,
ULONG h,
ULONG off,
ULONG bm )
static

ClearBitmap bitmap#,delay,height,offset: clears height lines from line offset on with a dither fade.

Backwards from the end of the area: each line is first ANDed with the alternating mask $AAAA/$5555, 19 lines later cleared. Delay 0 (2^32 turns), depth 0 or more than 8: refused by clearchk (fixed #669, #947, #674). Fixed: the passes start at the last word of the area (end-2); the original started at end-4, one word too low: the last word of the area stayed and the word before the area was cleared (#668). Fixed (#670): the depth is the byte bm_Depth (the original read the word bm_Flags:bm_Depth).

Parameters
delayd1: turns of the busy loop per line
hd2.w: the number of lines
offd3.w: the first line
bma0: the bitmap of bitmap# (d0) Returns nothing (keeps a4-a6 only).

◆ clearbitmap2()

void clearbitmap2 ( ULONG delay,
ULONG bm )
static

ClearBitmap bitmap#,delay: clears the whole bitmap line by line with a dither fade (see clearbitmap_c).

Height bm_Rows, offset 0. Delay 0 = 2^32 turns, more than 16 planes overrun the pointer arrays, depth 0 runs 65536 planes: refused by clearchk (fixed #669, #674, #947). Fixed: the depth is the byte bm_Depth (#670); the passes start at the last word of the area, not one word lower (#668).

Parameters
delayd1: turns of the busy loop per line
bma0: the bitmap (struct BitMap) of bitmap# (d0) Returns nothing (keeps a4-a6 only).

◆ clearbitmap_c()

void clearbitmap_c ( ULONG delay,
UWORD h,
UWORD off,
ULONG bm )
static

◆ clearchk()

void clearchk ( void )

◆ clearchk_c()

void clearchk_c ( ULONG delay,
ULONG bm )
static

The error check of ClearBitmap (both forms; debugger only).

Fixed (#947, #674), not in the original (rifxlib had no error check area): the depth of the bitmap was not checked - depth 0 ran the plane loops 65536 times (DBRA on depth - 1 as a word), over the 16-entry plane pointer arrays and what follows them, and so did more than 16 planes. The manual: "the maximum bitmap depth for these functions is 8". Fixed (#669): the delay was not checked - 0 ran the busy loop 2^32 times per line (SUBQ.l #1 before its test); the manual: "don't pass 0". The release code is unchanged (invalid arguments, D-005).

Errors: "Illegal BitMap Depth" (depth 0 or more than 8), "Delay must not be 0".

Parameters
delayd1: the delay (a long)
bma0: the bitmap of bitmap#

◆ depthchk()

void depthchk ( ULONG bm)
static

◆ dozoomy()

void dozoomy ( void )

◆ dozoomy_c()

void dozoomy_c ( ULONG bm)
static

ZoomyZoom bitmap#: doubles the left half of the bitmap in x, in place (zoomx2 table).

Fixed 32 lines of 80 bytes whatever the bitmap's size; the left 40 bytes of a line are doubled in place (from the right, so nothing is read after it is written). A bitmap smaller than 640 x 32 is refused by zoomychk (fixed #676; the original's size is kept in the release code). Nothing without the table. Fixed (#670): the depth is the byte bm_Depth (the original read the word bm_Flags:bm_Depth); depth 0 (65536 planes) and more than 8 are refused by zoomychk (fixed #947, #674).

Parameters
bma0: the bitmap of bitmap# (d0) Returns nothing (all registers kept).

◆ fadechk()

void fadechk ( void )

◆ fadechk_c()

void fadechk_c ( ULONG delay,
ULONG src,
ULONG dst )
static

The error check of FadeInBitmap (both forms; debugger only).

Fixed (#947, #674), not in the original: as clearchk_c for both bitmaps; FadeInBitmap stores two pointers per plane in each array, so the original overran them from 9 planes on; the delay as there (#669).

Errors: "Illegal BitMap Depth" (depth 0 or more than 8, either bitmap), "Delay must not be 0".

Parameters
delayd2: the delay (a long)
srca0: the source bitmap
dsta1: the destination bitmap

◆ fadein_c()

void fadein_c ( ULONG delay,
UWORD h,
UWORD off1,
UWORD off2,
ULONG src,
ULONG dst )
static

◆ fadeinbitmap()

void fadeinbitmap ( ULONG delay,
ULONG h,
ULONG off1,
ULONG off2,
ULONG src,
ULONG dst )
static

FadeInBitmap bitmapsource#,bitmapdest#,delay,height,offset1,offset2: fades height source lines into the destination with a dither.

Forwards: each line is first copied through the alternating mask $AAAA/$5555, 19 lines later copied whole. Width, depth and both line offsets come from the source bitmap (offsets times the SOURCE's bytes per row). Fixed (#670): the depth is the byte bm_Depth (the original read the word bm_Flags:bm_Depth). Delay 0 = 2^32 turns, from 9 planes on the two pointers per plane overrun bit_add/dest_add, depth 0 runs 65536 planes: refused by fadechk (fixed #669, #674, #947).

Parameters
delayd2: turns of the busy loop per line
hd3.w: the number of lines
off1d4.w: the first source line
off2d5.w: the first destination line
srca0: the source bitmap (d0)
dsta1: the destination bitmap (d1) Returns nothing (keeps a4-a6 only).

◆ fadeinbitmap2()

void fadeinbitmap2 ( ULONG delay,
ULONG src,
ULONG dst )
static

FadeInBitmap bitmapsource#,bitmapdest#,delay: fades the whole source into the destination line by line (see fadein_c).

Height bm_Rows of the source, offsets 0. Delay 0 = 2^32 turns, more than 8 planes overrun the pointer arrays, depth 0 runs 65536 planes: refused by fadechk (fixed #669, #674, #947). Fixed (#670): the depth is the byte bm_Depth.

Parameters
delayd2: turns of the busy loop per line
srca0: the source bitmap (bitmapsource#, d0)
dsta1: the destination bitmap (bitmapdest#, d1) Returns nothing (keeps a4-a6 only).

◆ InitZoomxy()

void InitZoomxy ( void )

◆ initzoomxy_c()

void initzoomxy_c ( ULONG sadd,
ULONG dadd,
ULONG src,
ULONG dst )
static

InitZoomXY source#,dest#,sourceadd,destadd: stores the bitmaps and offsets for ZoomXY.

Parameters
saddd2: byte offset added to every source plane
daddd3: byte offset added to every destination plane
srca0: the source bitmap (source#, d0)
dsta1: the destination bitmap (dest#, d1) Returns nothing (all registers kept).

◆ libfinit_c()

void libfinit_c ( void )
static

finit: frees the zoom tables (1856 bytes, memlib globfree).

Nothing without tables. The table pointers stay set after the free, as in the original: not a defect, the next init sets them anew (#673, see the head of the file).

◆ libinit_c()

void libinit_c ( void )
static

init: allocates the zoom tables (memlib globalloc, 1856 bytes MEMF_PUBLIC) and fills them.

reducex2: 256 bytes, bits 7,5,3,1 to bits 3-0; zoomx2: 256 words, every bit twice; zoomx4: 256 longs, every bit four times; zoomx8: 16 longs, four bits eight times each. The test of globalloc's result is the original's: globalloc does not return without memory (memlib ends the program with "Out of Memory!"), so init always sets the pointers; they are 0 only before the first init, when the zooms do nothing. Then it clears the InitZoomXY state, as at the first load: fixed (#1127), the original kept the bitmaps and offsets of the run before.

◆ ReduceX2()

void ReduceX2 ( void )

◆ reducex2_c()

void reducex2_c ( ULONG srcadd,
ULONG dstadd,
ULONG width,
ULONG h,
ULONG src,
ULONG dst )
static

ReduceX2 source#,dest#,sourceadd,destadd,width,height: halves the size (reducex2 table).

Every second line, two source bytes -> one (bits 7,5,3,1). Nothing without the table, with a width below 16 or a height below 2. The number of planes is the source's bm_Depth (0 = 256; bm2chk refuses 0 and more than 8: fixed #947, #674).

Parameters
srcaddd2: byte offset added to every source plane
dstaddd3: byte offset added to every destination plane
widthd4.w: the source width in pixels
hd5.w: the number of source lines
srca0: the source bitmap (source#, d0)
dsta1: the destination bitmap (dest#, d1) Returns nothing (all registers kept).

◆ rifxlib_libfinit()

void rifxlib_libfinit ( void )

◆ rifxlib_libinit()

void rifxlib_libinit ( void )

◆ screencopy()

void screencopy ( void )
static

◆ slow_down()

void slow_down ( void )
static

◆ store_bitplanes()

void store_bitplanes ( ULONG src,
ULONG dst,
ULONG sadd,
ULONG dadd )
static

◆ unrezx2()

void unrezx2 ( void )
static

◆ zoomstart()

BOOL zoomstart ( UWORD width,
UWORD h,
WORD * wbytes )
static

◆ zoomtables()

void zoomtables ( void )

◆ zoomtables_c()

ULONG zoomtables_c ( void )
static

GetZoomTables: the address of the four table pointers.

The longs reducex2, zoomx2, zoomx4, zoomx8 (0 before init or if init found no memory).

Returns
d0: the address of the pointer block

◆ zoomx2_c()

void zoomx2_c ( ULONG srcadd,
ULONG dstadd,
ULONG width,
ULONG h,
ULONG src,
ULONG dst )
static

ZoomX2 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 2x2 pixels (zoomx2 table).

Nothing without the table, with a width below 8 or a height below 1. The number of planes is the source's bm_Depth (0 = 256; bm2chk refuses 0 and more than 8: fixed #947, #674).

Parameters
srcaddd2: byte offset added to every source plane
dstaddd3: byte offset added to every destination plane
widthd4.w: the width in pixels (ASR.w #3: whole bytes)
hd5.w: the number of source lines
srca0: the source bitmap (source#, d0)
dsta1: the destination bitmap (dest#, d1) Returns nothing (all registers kept).

◆ zoomx4_6_c()

void zoomx4_6_c ( ULONG srcadd,
ULONG dstadd,
ULONG width,
ULONG h,
ULONG src,
ULONG dst )
static

ZoomX4 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 4x4 pixels (zoomx4 table, see zoomx4_c).

Nothing without the table (init found no memory), with a width below 8 or a height below 1. The number of planes is the source's bm_Depth (a byte: 0 = 256; bm2chk refuses 0 and more than 8: fixed #947, #674).

Parameters
srcaddd2: byte offset added to every source plane
dstaddd3: byte offset added to every destination plane
widthd4.w: the width in pixels (ASR.w #3: whole bytes)
hd5.w: the number of source lines
srca0: the source bitmap (source#, d0)
dsta1: the destination bitmap (dest#, d1) Returns nothing (all registers kept).

◆ zoomx4_7_c()

void zoomx4_7_c ( ULONG srcadd,
ULONG dstadd,
ULONG width,
ULONG h,
ULONG src,
ULONG dst,
const UBYTE * args )
static

ZoomX4 source#,dest#,sourceadd,destadd,width,height,xy_select: as ZoomX4 above, in one direction only if asked.

xy_select 1 = only x (4 times as wide), 2 = only y (4 times as high), anything else both.

Parameters
srcaddd2: byte offset added to every source plane
dstaddd3: byte offset added to every destination plane
widthd4.w: the width in pixels
hd5.w: the number of source lines
srca0: the source bitmap (d0)
dsta1: the destination bitmap (d1)
argsa2: the argument stack, xy_select the byte at -1(a2) Returns nothing (all registers kept).

◆ zoomx4_c()

void zoomx4_c ( UBYTE sel,
ULONG srcadd,
ULONG dstadd,
UWORD width,
UWORD h,
ULONG src,
ULONG dst )
static

◆ zoomx4_xy()

void zoomx4_xy ( void )

◆ zoomx8_c()

void zoomx8_c ( ULONG srcadd,
ULONG dstadd,
ULONG width,
ULONG h,
ULONG src,
ULONG dst )
static

ZoomX8 source#,dest#,sourceadd,destadd,width,height: every source pixel becomes 8x8 pixels (zoomx8 table).

Every source line becomes 8 lines of 8 times the width (two passes of 4 lines). Nothing without the table, with a width below 8 or a height below 1. The number of planes is the source's bm_Depth (0 = 256; bm2chk refuses 0 and more than 8: fixed #947, #674).

Parameters
srcaddd2: byte offset added to every source plane
dstaddd3: byte offset added to every destination plane
widthd4.w: the width in pixels (ASR.w #3: whole bytes)
hd5.w: the number of source lines
srca0: the source bitmap (source#, d0)
dsta1: the destination bitmap (dest#, d1) Returns nothing (all registers kept).

◆ zoomxy_no_xy()

void zoomxy_no_xy ( void )

◆ zoomxychk()

void zoomxychk ( void )

◆ zoomxychk_c()

void zoomxychk_c ( void )
static

The error check of ZoomXY (debugger only): the bitmaps of InitZoomXY.

Fixed (#1131), not in the original: ZoomXY did not look whether InitZoomXY stored any bitmaps; before it (also after init, #1127) both are 0, and ZoomXY read a struct BitMap at address 0 (its depth a byte of the ExecBase pointer, its planes the exception vectors) and wrote through it. Fixed (#947, #674): as bm2chk_c for the bitmaps InitZoomXY stored (ZoomXY takes no bitmap itself). The release code is unchanged (a command before its setup command, D-005).

Errors: "ZoomXY needs InitZoomXY" (no bitmap stored), "Illegal BitMap Depth" (depth 0 or more than 8, either bitmap).

◆ zoomychk()

void zoomychk ( void )

◆ zoomychk_c()

void zoomychk_c ( ULONG bm)
static

The error check of ZoomyZoom (debugger only).

Fixed (#947, #674), not in the original: the depth was not checked (depth 0: 65536 planes through the plane pointers behind the bitmap object). Fixed (#676): nor was the size - ZoomyZoom works on 32 lines of 80 bytes per plane whatever the bitmap is; a narrower bitmap is garbled (the lines are not its rows), a smaller one overwritten behind the plane. The release code is unchanged (D-005; W6 decision Q5).

Errors: "Illegal BitMap Depth" (depth 0 or more than 8), "ZoomyZoom needs a bitmap of at least 640 x 32" (fewer than 80 bytes per row or fewer than 32 rows).

Parameters
bma0: the bitmap of bitmap#

Variable Documentation

◆ add_dest

ULONG add_dest

◆ add_source

ULONG add_source

◆ add_value

ULONG add_value = 1
static

◆ all

ULONG all[36]

◆ BDepth

UWORD BDepth
static

◆ BHeight

UWORD BHeight
static

◆ bit_add

ULONG bit_add[16]

◆ bytesperline

UWORD bytesperline
static

◆ bytesperline2

UWORD bytesperline2
static

◆ delay_timer

ULONG delay_timer
static

◆ dest_add

ULONG dest_add[16]

◆ dest_address

ULONG dest_address

◆ EWWidth

UWORD EWWidth
static

◆ height

UWORD height
static

◆ myline

UWORD myline[21]
static
Initial value:
= {
0x6db6, 0xdb6d, 0xb6db, 0x6db6, 0xdb6d, 0xb6db,
0x6db6, 0xdb6d, 0xb6db, 0x6db6, 0xdb6d, 0xb6db,
0x6db6, 0xdb6d, 0xb6db, 0x6db6, 0xdb6d, 0xb6db,
}

◆ [union]

union { ... } pa

◆ reducex2

ULONG reducex2

◆ res_value

UWORD res_value
static

◆ res_value2

UWORD res_value2
static

◆ res_value3

UWORD res_value3
static

◆ sbitdepth

UWORD sbitdepth
static

◆ source_address

ULONG source_address

◆ tableaddress

ULONG tableaddress
static

◆ [struct]

struct { ... } tables

◆ [struct]

struct { ... } v

◆ xzoom

UWORD xzoom = 1
static

◆ xzoom_value

UWORD xzoom_value = 1
static

◆ yvalue

UWORD yvalue
static

◆ yzoom

UWORD yzoom = 1
static

◆ yzoom_value

UWORD yzoom_value = 1
static

◆ yzoom_value2

UWORD yzoom_value2 = 1
static

◆ zoomx2

void zoomx2

◆ zoomx4

ULONG zoomx4

◆ zoomx8

void zoomx8