|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "blitzlib.h"#include "blitzexec.h"#include <graphics/gfxbase.h>#include <graphics/monitor.h>#include <proto/graphics.h>Macros | |
| #define | __NOLIBBASE__ |
| #define | GRAPHICS_BASE_NAME gr |
| #define | intgoblitz 0xc106 /* intlib */ |
| #define | intgoamiga 0xc107 |
| #define | CUSTOM 0xdff000 |
| #define | COP1LC 0x080 |
| #define | COPJMP1 0x088 |
| #define | DMACON 0x096 |
| #define | BPLCON3 0x106 |
| #define | BEAMCON0 0x1dc |
| #define | FMODE 0x1fc |
Functions | |
| void | switchlib_goblitz (void) |
| void | switchlib_goamiga (void) |
| void | goqamiga (void) |
| void | doownblit (void) |
| void | dodisownblit (void) |
| void | setcoplist (void) |
| void | goblitzS (void) |
| void | goqamigaS (void) |
| static ULONG | doinit (void) |
| init - open graphics, find keyboard.device. | |
| void | dofinit (void) |
| static void | custom_w (ULONG reg, UWORD v) |
| static void | custom_l (ULONG reg, ULONG v) |
| static void | doforbid (void) |
| static void | dopermit (void) |
| static void | doviewoff (void) |
| static void | doviewoffS (void) |
| static void | doviewon (void) |
| static void | ownblit (void) |
| static void | disownblit (void) |
| static void | doownblit_c (void) |
| $C203 - OwnBlitter, once (for the display libraries). | |
| static void | dodisownblit_c (void) |
| $C204 - DisownBlitter, if owned. | |
| static void | intjsr (UWORD tok) |
| static UWORD | setmode (WORD mode) |
| static UWORD | goqamigaS_c (void) |
| $C207 (QAmigaS) - QAmiga mode for the debugger, without touching the display. | |
| static UWORD | goblitzS_c (void) |
| $C206 (BlitzS) - Blitz mode for the debugger, without touching the display. | |
| static UWORD | goblitz_c (void) |
| $C200 BLITZ - switch to Blitz mode. | |
| static UWORD | goamiga_c (void) |
| $C201 AMIGA - switch to Amiga mode. | |
| static UWORD | goqamiga_c (void) |
| $C202 QAMIGA - switch to QAmiga mode (OS running, the program's own display). | |
| static void | setcoplist_c (ULONG cop) |
| $C205 (setcoplist) - set the copper list for Blitz/QAmiga mode. | |
Variables | |
| static WORD | mymode |
| static UWORD | agamode |
| static UWORD | oldpoke |
| static UWORD | monpoke |
| static UWORD | forbiden |
| static UWORD | blitowned |
| static struct View * | oldview |
| static struct GfxBase * | gr |
| static APTR | cia |
| static UBYTE * | key |
| static ULONG | oldcoplist |
| static UWORD | oldviewS |
| #define __NOLIBBASE__ |
| #define BEAMCON0 0x1dc |
| #define BPLCON3 0x106 |
| #define COP1LC 0x080 |
| #define COPJMP1 0x088 |
| #define CUSTOM 0xdff000 |
| #define DMACON 0x096 |
| #define FMODE 0x1fc |
| #define GRAPHICS_BASE_NAME gr |
| #define intgoamiga 0xc107 |
| #define intgoblitz 0xc106 /* intlib */ |
|
inlinestatic |
|
inlinestatic |
|
static |
| void dodisownblit | ( | void | ) |
|
static |
$C204 - DisownBlitter, if owned.
Keeps all registers.
| void dofinit | ( | void | ) |
|
static |
|
static |
init - open graphics, find keyboard.device.
Also notes the exec version (V39+: BEAMCON0 in Blitz mode), BEAMCON0 for Blitz mode from the NTSC flag, and opens ciaa.resource (unused). The device list walk has no end check (not a bug: keyboard.device is always there).
| void doownblit | ( | void | ) |
|
static |
$C203 - OwnBlitter, once (for the display libraries).
Keeps all registers.
|
static |
|
static |
|
static |
|
static |
|
static |
$C201 AMIGA - switch to Amiga mode.
intlib goamiga, Permit, DisownBlitter, back to the OS display (copper to the system list, DMA on, LoadView(oldview)).
|
static |
$C200 BLITZ - switch to Blitz mode.
OS display off (LoadView(NULL), two frames; our own copper list if one is set; FMODE 0, BPLCON3 $C00, on V39+ BEAMCON0), OwnBlitter, Forbid (keyboard.device told the OS is not reading the keyboard), intlib goblitz.
| void goblitzS | ( | void | ) |
|
static |
$C206 (BlitzS) - Blitz mode for the debugger, without touching the display.
Only remembers the view, OwnBlitter, Forbid (keyboard.device told the OS is not reading the keyboard), intlib goblitz.
| void goqamiga | ( | void | ) |
|
static |
$C202 QAMIGA - switch to QAmiga mode (OS running, the program's own display).
intlib goamiga, Permit, DisownBlitter, OS display off as for BLITZ.
| void goqamigaS | ( | void | ) |
|
static |
$C207 (QAmigaS) - QAmiga mode for the debugger, without touching the display.
Only remembers the view, intlib goamiga, Permit, DisownBlitter.
|
static |
|
static |
| void setcoplist | ( | void | ) |
|
static |
$C205 (setcoplist) - set the copper list for Blitz/QAmiga mode.
Started when the OS display is switched off. Keeps all registers.
| cop | a0: the copper list (0 = none) |
|
static |
| void switchlib_goamiga | ( | void | ) |
| void switchlib_goblitz | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |