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:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user