mirror of
https://github.com/alfishe/amiga-bootcamp.git
synced 2026-06-13 00:26:28 +00:00
Comprehensive technical documentation covering: - Hardware: OCS/ECS/AGA custom chip registers, Copper & Blitter deep dives - Boot sequence: cold boot through startup-sequence - Binary format: HUNK executable spec, relocation, debug info - Linking & ABI: .fd files, LVO tables, register calling conventions - Exec kernel: tasks, interrupts, memory, signals, semaphores - AmigaDOS: file I/O, FFS/OFS layout, CLI/Shell scripting - Graphics: planar bitmaps, Copper programming, HAM/EHB modes - Intuition: screens, windows, IDCMP, BOOPSI - Devices: trackdisk, SCSI, serial, timer, audio, keyboard - Libraries: utility, expansion, IFFParse, locale, ARexx - Networking: bsdsocket API, SANA-II, TCP/IP stack comparison - Toolchain: GCC, vasm/vlink, SAS/C, NDK, debugging - Reverse engineering: IDA/Ghidra setup, compiler fingerprints, case studies - CPU & MMU: 68040/060 emulation libs, PMMU, cache management - Driver development: SANA-II, Picasso96/RTG, AHI audio All files include breadcrumb navigation. No local paths or proprietary content.
2.8 KiB
2.8 KiB
Animation — GEL System: BOBs, VSprites, AnimObs
Overview
The GEL (Graphics ELement) system provides high-level animated sprite and bitmap overlay support. It manages VSprites (virtual sprites that can use hardware or software rendering), BOBs (Blitter OBjects — arbitrary-sized bitmaps overlaid on a playfield), and AnimObs (animation objects with sequencing).
VSprite
/* graphics/gels.h — NDK39 */
struct VSprite {
struct VSprite *NextVSprite;
struct VSprite *PrevVSprite;
struct VSprite *DrawPath;
struct VSprite *ClearPath;
WORD OldY, OldX; /* previous position */
WORD Flags; /* VSPRITE, SAVEBACK, OVERLAY, MUSTDRAW */
WORD Y, X; /* current position */
WORD Height;
WORD Width; /* width in words */
WORD Depth;
WORD MeMask; /* collision mask */
WORD HitMask;
WORD *ImageData; /* sprite image */
WORD *BorderLine; /* collision border */
WORD *CollMask; /* collision mask data */
WORD *SprColors; /* colour table */
struct Bob *VSBob; /* if this VSprite backs a BOB */
BYTE PlanePick;
BYTE PlaneOnOff;
/* ... */
};
BOB (Blitter Object)
struct Bob {
WORD Flags;
WORD *SaveBuffer; /* background save buffer */
WORD *ImageShadow; /* shadow mask for cookie-cut */
struct Bob *Before;
struct Bob *After;
struct VSprite *BobVSprite; /* associated VSprite */
struct AnimComp *BobComp; /* if part of animation */
struct DBufPacket *DBuffer; /* double-buffer packet */
};
Usage Pattern
struct GelsInfo gi;
struct VSprite headVS, tailVS;
/* Initialise GEL system: */
InitGels(&headVS, &tailVS, &gi);
rp->GelsInfo = &gi;
/* Add a VSprite/BOB: */
AddVSprite(&myVSprite, rp);
/* or */
AddBob(&myBob, rp);
/* Each frame: */
SortGList(rp); /* sort by Y position */
DrawGList(rp, &vp); /* render all GELs */
WaitTOF(); /* sync to vertical blank */
/* Cleanup: */
RemVSprite(&myVSprite);
/* or */
RemBob(&myBob);
AnimOb — Animation Sequences
struct AnimOb {
struct AnimOb *NextOb;
struct AnimOb *PrevOb;
LONG Clock; /* frame counter */
WORD AnOldY, AnOldX;
WORD AnY, AnX; /* current position */
WORD YVel, XVel; /* velocity */
WORD YAccel, XAccel; /* acceleration */
WORD RingYTrans; /* ring buffer Y translation */
WORD RingXTrans;
struct AnimComp *HeadComp; /* component chain */
/* ... */
};
References
- NDK39:
graphics/gels.h,graphics/gelsinternal.h - ADCD 2.1:
InitGels,AddVSprite,AddBob,SortGList,DrawGList - Amiga ROM Kernel Reference Manual: Libraries — GELs chapter