From ae4e9fab8c1156a15b6db2250ad23356f1909611 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 2 Feb 2018 18:28:52 +0100 Subject: [PATCH] Atari: CONSOL port of GTIA is readable and writable. Adjust include/_gtia.h accordingly. --- include/_gtia.h | 108 ++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 53 deletions(-) diff --git a/include/_gtia.h b/include/_gtia.h index 424628f19..0542efa2f 100644 --- a/include/_gtia.h +++ b/include/_gtia.h @@ -34,63 +34,65 @@ /* Define a structure with the gtia register offsets */ struct __gtia_write { - unsigned char hposp0; /* horizontal position player 0 */ - unsigned char hposp1; /* horizontal position player 1 */ - unsigned char hposp2; /* horizontal position player 2 */ - unsigned char hposp3; /* horizontal position player 3 */ - unsigned char hposm0; /* horizontal position missile 0 */ - unsigned char hposm1; /* horizontal position missile 1 */ - unsigned char hposm2; /* horizontal position missile 2 */ - unsigned char hposm3; /* horizontal position missile 3 */ - unsigned char sizep0; /* size of player 0 */ - unsigned char sizep1; /* size of player 1 */ - unsigned char sizep2; /* size of player 2 */ - unsigned char sizep3; /* size of player 3 */ - unsigned char sizem; /* size of missiles */ - unsigned char grafp0; /* graphics shape player 0 */ - unsigned char grafp1; /* graphics shape player 1 */ - unsigned char grafp2; /* graphics shape player 2 */ - unsigned char grafp3; /* graphics shape player 3 */ - unsigned char grafm; /* graphics shape missiles */ - unsigned char colpm0; /* color player and missile 0 */ - unsigned char colpm1; /* color player and missile 1 */ - unsigned char colpm2; /* color player and missile 2 */ - unsigned char colpm3; /* color player and missile 3 */ - unsigned char colpf0; /* color playfield 0 */ - unsigned char colpf1; /* color playfield 1 */ - unsigned char colpf2; /* color playfield 2 */ - unsigned char colpf3; /* color playfield 3 */ - unsigned char colbk; /* color background */ - unsigned char prior; /* priority selection */ - unsigned char vdelay; /* vertical delay */ - unsigned char gractl; /* stick/paddle latch, p/m control */ - unsigned char hitclr; /* clear p/m collision */ - unsigned char consol; /* console buttons */ + unsigned char hposp0; /* 0x00: horizontal position player 0 */ + unsigned char hposp1; /* 0x01: horizontal position player 1 */ + unsigned char hposp2; /* 0x02: horizontal position player 2 */ + unsigned char hposp3; /* 0x03: horizontal position player 3 */ + unsigned char hposm0; /* 0x04: horizontal position missile 0 */ + unsigned char hposm1; /* 0x05: horizontal position missile 1 */ + unsigned char hposm2; /* 0x06: horizontal position missile 2 */ + unsigned char hposm3; /* 0x07: horizontal position missile 3 */ + unsigned char sizep0; /* 0x08: size of player 0 */ + unsigned char sizep1; /* 0x09: size of player 1 */ + unsigned char sizep2; /* 0x0A: size of player 2 */ + unsigned char sizep3; /* 0x0B: size of player 3 */ + unsigned char sizem; /* 0x0C: size of missiles */ + unsigned char grafp0; /* 0x0D: graphics shape player 0 */ + unsigned char grafp1; /* 0x0E: graphics shape player 1 */ + unsigned char grafp2; /* 0x0F: graphics shape player 2 */ + unsigned char grafp3; /* 0x10: graphics shape player 3 */ + unsigned char grafm; /* 0x11: graphics shape missiles */ + unsigned char colpm0; /* 0x12: color player and missile 0 */ + unsigned char colpm1; /* 0x13: color player and missile 1 */ + unsigned char colpm2; /* 0x14: color player and missile 2 */ + unsigned char colpm3; /* 0x15: color player and missile 3 */ + unsigned char colpf0; /* 0x16: color playfield 0 */ + unsigned char colpf1; /* 0x17: color playfield 1 */ + unsigned char colpf2; /* 0x18: color playfield 2 */ + unsigned char colpf3; /* 0x19: color playfield 3 */ + unsigned char colbk; /* 0x1A: color background */ + unsigned char prior; /* 0x1B: priority selection */ + unsigned char vdelay; /* 0x1C: vertical delay */ + unsigned char gractl; /* 0x1D: stick/paddle latch, p/m control */ + unsigned char hitclr; /* 0x1E: clear p/m collision */ + unsigned char consol; /* 0x1F: builtin speaker */ }; /* Define a structure with the gtia register offsets */ struct __gtia_read { - unsigned char m0pf; /* missile 0 to playfield collision */ - unsigned char m1pf; /* missile 1 to playfield collision */ - unsigned char m2pf; /* missile 2 to playfield collision */ - unsigned char m3pf; /* missile 3 to playfield collision */ - unsigned char p0pf; /* player 0 to playfield collision */ - unsigned char p1pf; /* player 1 to playfield collision */ - unsigned char p2pf; /* player 2 to playfield collision */ - unsigned char p3pf; /* player 3 to playfield collision */ - unsigned char m0pl; /* missile 0 to player collision */ - unsigned char m1pl; /* missile 1 to player collision */ - unsigned char m2pl; /* missile 2 to player collision */ - unsigned char m3pl; /* missile 3 to player collision */ - unsigned char p0pl; /* player 0 to player collision */ - unsigned char p1pl; /* player 1 to player collision */ - unsigned char p2pl; /* player 2 to player collision */ - unsigned char p3pl; /* player 3 to player collision */ - unsigned char trig0; /* joystick trigger 0 */ - unsigned char trig1; /* joystick trigger 1 */ - unsigned char trig2; /* joystick trigger 2 */ - unsigned char trig3; /* joystick trigger 3 */ - unsigned char pal; /* pal/ntsc flag */ + unsigned char m0pf; /* 0x00: missile 0 to playfield collision */ + unsigned char m1pf; /* 0x01: missile 1 to playfield collision */ + unsigned char m2pf; /* 0x02: missile 2 to playfield collision */ + unsigned char m3pf; /* 0x03: missile 3 to playfield collision */ + unsigned char p0pf; /* 0x04: player 0 to playfield collision */ + unsigned char p1pf; /* 0x05: player 1 to playfield collision */ + unsigned char p2pf; /* 0x06: player 2 to playfield collision */ + unsigned char p3pf; /* 0x07: player 3 to playfield collision */ + unsigned char m0pl; /* 0x08: missile 0 to player collision */ + unsigned char m1pl; /* 0x09: missile 1 to player collision */ + unsigned char m2pl; /* 0x0A: missile 2 to player collision */ + unsigned char m3pl; /* 0x0B: missile 3 to player collision */ + unsigned char p0pl; /* 0x0C: player 0 to player collision */ + unsigned char p1pl; /* 0x0D: player 1 to player collision */ + unsigned char p2pl; /* 0x0E: player 2 to player collision */ + unsigned char p3pl; /* 0x0F: player 3 to player collision */ + unsigned char trig0; /* 0x10: joystick trigger 0 */ + unsigned char trig1; /* 0x11: joystick trigger 1 */ + unsigned char trig2; /* 0x12: joystick trigger 2 */ + unsigned char trig3; /* 0x13: joystick trigger 3 */ + unsigned char pal; /* 0x14: pal/ntsc flag */ + unsigned char unused[10]; + unsigned char consol; /* 0x1F: console buttons */ }; /* End of _gtia.h */ -- 2.39.5