cool-bun-demo/system/copper.c

29 lines
536 B
C
Raw Permalink Normal View History

2024-05-02 16:52:06 +00:00
#include "copper.h"
#include "system.h"
#include <clib/exec_protos.h>
#include <exec/memory.h>
#include <hardware/custom.h>
extern struct Custom far custom;
uint16_t * prepareNewCopperlist(void) {
uint16_t *copperlist = AllocMem(
COPPERLIST_SIZE,
MEMF_CHIP | MEMF_CLEAR
);
initializeCopperlist(copperlist);
return copperlist;
}
void setCopperlist(uint16_t *copperlist) {
custom.cop1lc = copperlist;
2024-06-01 11:42:11 +00:00
//custom.copjmp1 = 1;
2024-05-02 16:52:06 +00:00
}
void freeCopperlist(uint16_t *copperlist) {
FreeMem(copperlist, COPPERLIST_SIZE);
}