cool-bun-demo/system/system.h

42 lines
1.2 KiB
C
Raw Normal View History

2024-05-02 16:52:06 +00:00
#ifndef __SYSTEM_H__
#define __SYSTEM_H__
2024-06-01 11:42:11 +00:00
#include "../types.h"
#include "../screen.h"
2024-05-02 16:52:06 +00:00
2024-05-29 11:57:08 +00:00
#define WORD_ALIGNED_BYTE_POSITION(width, x, y) (((width * y + x) >> 3) & 0xfffe)
#define WORD_ALIGNED_BYTE_X(x) (((x) >> 3) & 0xfffe)
2024-05-02 16:52:06 +00:00
// 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.
*/
2024-06-01 11:42:11 +00:00
extern uint16_t* addDisplayToCopperlist(
uint16_t *copperlist,
2024-09-19 12:09:10 +00:00
struct ScreenDefinition *,
struct ActiveScreenBufferDetails *,
2024-06-01 11:42:11 +00:00
void *copperlistBitplanePointers
);
extern void updateDisplayInCopperList(
2024-09-19 12:09:10 +00:00
struct ScreenDefinition *,
struct ActiveScreenBufferDetails *,
2024-06-01 11:42:11 +00:00
void *copperlistBitplanePointers
);
2024-05-02 16:52:06 +00:00
extern uint16_t* addColorsToCopperlist(uint16_t *copperlist, color_t[], int count);
2024-06-01 11:42:11 +00:00
extern uint16_t* setUpEmptySpritesInCopperlist(uint16_t *copperlist);
2024-05-02 16:52:06 +00:00
extern void takeOverSystem(void);
extern void giveBackSystem(void);
2024-05-29 11:57:08 +00:00
extern void setUpDisplay(uint32_t bitplaneCount);
2024-05-02 16:52:06 +00:00
extern void myWaitBlit(void);
2024-06-01 11:42:11 +00:00
extern uint16_t WaitBOF(uint32_t line);
2024-05-02 16:52:06 +00:00
#endif