1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-10-31 23:09:49 +00:00
8bitworkshop/presets/c64/rasterirq.h

24 lines
458 B
C
Raw Normal View History

2022-07-20 19:32:47 +00:00
#ifndef _RASTERIRQ_H
#define _RASTERIRQ_H
2022-08-11 20:27:20 +00:00
// internal function, use macro instead
void __dlist_setup(void* ptr);
2022-07-20 19:32:47 +00:00
2022-08-11 20:27:20 +00:00
// initialize display list with function 'func'
2022-07-20 19:32:47 +00:00
#define DLIST_SETUP(func) \
2022-08-11 20:27:20 +00:00
__dlist_setup(((char*)func)-1)
2022-07-20 19:32:47 +00:00
2022-08-11 20:27:20 +00:00
// continue on line 'line'
2022-07-20 19:32:47 +00:00
#define DLIST_NEXT(line) \
__A__ = line; \
asm ("jsr DLIST_IRQ_NEXT");
2022-08-11 20:27:20 +00:00
// restart display list on line 'line'
2022-07-20 19:32:47 +00:00
#define DLIST_RESTART(line) \
__A__ = line; \
asm ("jmp DLIST_IRQ_RESTART");
#endif