cool-bun-demo/system/system.h

42 lines
1.2 KiB
C

#ifndef __SYSTEM_H__
#define __SYSTEM_H__
#include "../types.h"
#include "../screen.h"
#define WORD_ALIGNED_BYTE_POSITION(width, x, y) (((width * y + x) >> 3) & 0xfffe)
#define WORD_ALIGNED_BYTE_X(x) (((x) >> 3) & 0xfffe)
// this needs to be kept in sync with the XDEFs in system.s
// copperlist
extern void initializeCopperlist(void *copperlist);
extern uint16_t* endCopperlist(uint16_t *copperlist);
/**
* This only adds bitplane pointers to the copperlist
* and sets it up for double buffering.
* You still need to configure the playfield hardware.
*/
extern uint16_t* addDisplayToCopperlist(
uint16_t *copperlist,
struct ScreenDefinition *,
struct ActiveScreenBufferDetails *,
void *copperlistBitplanePointers
);
extern void updateDisplayInCopperList(
struct ScreenDefinition *,
struct ActiveScreenBufferDetails *,
void *copperlistBitplanePointers
);
extern uint16_t* addColorsToCopperlist(uint16_t *copperlist, color_t[], int count);
extern uint16_t* setUpEmptySpritesInCopperlist(uint16_t *copperlist);
extern void takeOverSystem(void);
extern void giveBackSystem(void);
extern void setUpDisplay(uint32_t bitplaneCount);
extern void myWaitBlit(void);
extern uint16_t WaitBOF(uint32_t line);
#endif