/* loader.h - minix defines needed to transfer data to minix           */
/* by Steven Reiz 14/1/89 - 4/5/89                                     */

#define MAXKEY     0x60     /* highest 'normal' keycode +1             */
struct minixkeymap {        /* used to convert raw keycodes to ascii   */
    char ascii[4*MAXKEY];   /* from 0*MAXKEY: no qualifiers depressed  */
                            /* from 1*MAXKEY: only shift depressed     */
                            /* from 2*MAXKEY: only alt depressed       */
                            /* from 3*MAXKEY: only shift & alt pressed */
    char *func[20];         /* from  0: only functionkey depressed     */
                            /* from 10: shift and functionkey pressed  */
    char functext[400];     /* the text for the functionkeys           */
};

struct TextAttr topaz8={    /* used to open font topaz.8               */
    (STRPTR)"topaz.font",
    8,
    0,
    0
};

short atoi();
long  atol(), strval();
char *open_topaz();

/* library calls: */
void              *OpenLibrary();
struct TextFont   *OpenFont();
long              RawKeyConvert(), Execute();
char              *AllocMem();
#define ALLOC_ANY 0x10000L          /* any kind of memory but cleared  */
long              Open();           /* returns a bptr to a FileHandle  */
#define OPEN_OLD  1005L             /* only open if it already exists  */
long              Read();           /* needs a bptr to a FileHandle    */
long              Seek();           /* needs a bptr to a FileHandle    */

/* globals */
struct GfxBase          *GfxBase;   /* graphics library pointer        */
char                    *ConsoleDevice; /* console device pointer      */
extern struct ExecBase  *SysBase;   /* provided by the linker          */
char                    *kernel;    /* kernel image load address       */
long                    kernelstart; /* kernel image destination       */
long                    kernelsz;   /* kernel image size               */
long                    file;       /* kernel image file               */
long                    debuglvl;   /* the argument to -d              */
struct transferdata     *transdat;  /* pointer to the transferdata     */

extern movek_start(), movek_end();  /* see loaderasm.s                 */

/* hardware */
#define DMACON (WORD *)0xdff096
#define INTENA (WORD *)0xdff09a
#define INTREQ (WORD *)0xdff09c
#define PRAA   (BYTE *)0xbfe001     /* peripheral data register aA     */
#define FIR0   (BYTE)  6            /* firebutton 0 bit in PRAA, 0=down*/
