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

27 lines
537 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);
2023-11-09 18:54:58 +00:00
void __dlist_done();
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");
2023-11-09 18:54:58 +00:00
// stop display list
#define DLIST_DONE() __dlist_done();
2022-07-20 19:32:47 +00:00
#endif