Go to the documentation of this file.
12 #if defined(__ATARI2600_MAPPER__)
18 typedef unsigned char byte;
20 typedef unsigned short word;
35 __attribute__((leaf))
void _set_horiz_pos(
byte xpos,
byte objindex);
38 #define set_horiz_pos(objindex,xpos) _set_horiz_pos(xpos,objindex)
42 __attribute__((leaf)) asm volatile("sta $42 ");
45 #define apply_hmove() \
46 __attribute__((leaf)) asm volatile("sta $42 " "\n" "sta $6a ");
56 #define SW_RESET() ((RIOT.swchb & RESET_MASK) == 0)
57 #define SW_SELECT() ((RIOT.swchb & SELECT_MASK) == 0)
58 #define SW_COLOR() ((RIOT.swchb & BW_MASK) != 0)
59 #define SW_P0_PRO() ((RIOT.swchb & P0_DIFF_MASK) != 0)
60 #define SW_P1_PRO() ((RIOT.swchb & P1_DIFF_MASK) != 0)
62 #define JOY_UP(plyr) (!(RIOT.swcha & ((plyr) ? 0x1 : ~MOVE_UP)))
63 #define JOY_DOWN(plyr) (!(RIOT.swcha & ((plyr) ? 0x2 : ~MOVE_DOWN)))
64 #define JOY_LEFT(plyr) (!(RIOT.swcha & ((plyr) ? 0x4 : ~MOVE_LEFT)))
65 #define JOY_RIGHT(plyr) (!(RIOT.swcha & ((plyr) ? 0x8 : ~MOVE_RIGHT)))
66 #define JOY_FIRE(plyr) !(((plyr) ? TIA.inpt5 : TIA.inpt4) & 0x80)
69 #define COLOR_CONV(color) (SW_COLOR() ? color : color & 0x0f)
72 #define _CYCLES(lines) (((lines) * 76) - 13)
73 #define _TIM64(cycles) (((cycles) >> 6) - (((cycles) & 63) < 12))
74 #define _T1024(cycles) ((cycles) >> 10)
77 #define VBLANK_TIM64 _TIM64(_CYCLES(45))
78 #define KERNAL_T1024 _T1024(_CYCLES(250))
79 #define OVERSCAN_TIM64 _TIM64(_CYCLES(36))
81 #define VBLANK_TIM64 _TIM64(_CYCLES(37))
82 #define KERNAL_TIM64 _TIM64(_CYCLES(194))
83 #define OVERSCAN_TIM64 _TIM64(_CYCLES(32))
@ PLAYER_1
Definition: vcslib.h:31
byte objindex
Definition: vcslib.h:35
unsigned char byte
Definition: vcslib.h:18
signed char sbyte
Definition: vcslib.h:19
@ MISSILE_1
Definition: vcslib.h:31
#define BALL
Definition: vcslib.h:54
unsigned short word
Definition: vcslib.h:20
@ MISSILE_0
Definition: vcslib.h:31
TIAObject
Definition: vcslib.h:31
@ PLAYER_0
Definition: vcslib.h:31