Atari colors into _gtia.h; NMIRES/NMIST as union

Use a C "union" to give both read (NMIST) and write (NMIRES) labels
to their shared register in ANTIC. (h/t @groessler).

Consolodate duplicated color definitions (HUE_..., COLOR_... and TGI_COLOR_...;
and the "_gtia_mkcolor()" macro), found in both "atari.h" and "atari5200.h",
moving it to "_gtia.h", which they both share (and which makes the most sense).
This commit is contained in:
Bill Kendrick
2019-01-17 22:44:25 -08:00
parent 32525e0ddb
commit af8eb57f63
4 changed files with 79 additions and 119 deletions

View File

@@ -64,10 +64,15 @@ struct __antic {
unsigned char penh; /* (R) light pen horizontal position */
unsigned char penv; /* (R) light pen vertical position */
unsigned char nmien; /* (W) non-maskable interrupt enable */
unsigned char nmires;
/* (W) ("NMIRES") nmi reset -- clears the interrupt request register; resets all of the NMI status together
** (R) ("NMIST") nmi status -- holds cause for the NMI interrupt
*/
union {
/* (W) ("NMIRES") nmi reset -- clears the interrupt request register;
** resets all of the NMI status together
*/
unsigned char nmires;
/* (R) ("NMIST") nmi status -- holds cause for the NMI interrupt */
unsigned char nmist;
};
};