32x: initial code (security code passes)
[picodrive.git] / pico / pico_int.h
index cb12bc1..85f2506 100644 (file)
@@ -257,15 +257,15 @@ struct PicoMisc
   unsigned char pal;           // 08 1=PAL 0=NTSC\r
   unsigned char sram_reg;      // 09 SRAM reg. See SRR_* below\r
   unsigned short z80_bank68k;  // 0a\r
-  unsigned short z80_lastaddr; // this is for Z80 faking\r
-  unsigned char  pad0;\r
+  unsigned short pad0;\r
+  unsigned char  pad1;\r
   unsigned char  z80_reset;    // z80 reset held\r
   unsigned char  padDelay[2];  // 10 gamepad phase time outs, so we count a delay\r
   unsigned short eeprom_addr;  // EEPROM address register\r
   unsigned char  eeprom_cycle; // EEPROM cycle number\r
   unsigned char  eeprom_slave; // EEPROM slave word for X24C02 and better SRAMs\r
   unsigned char  eeprom_status;\r
-  unsigned char  pad1;\r
+  unsigned char  pad2;\r
   unsigned short dma_xfers;    // 18\r
   unsigned char  eeprom_wb[2]; // EEPROM latch/write buffer\r
   unsigned int  frame_count;   // 1c for movies and idle det\r
@@ -385,8 +385,17 @@ typedef struct
        Rot_Comp rot_comp;\r
 } mcd_state;\r
 \r
+// XXX: this will need to be reworked for cart+cd support.\r
 #define Pico_mcd ((mcd_state *)Pico.rom)\r
 \r
+// 32X\r
+struct Pico32x\r
+{\r
+  unsigned short regs[0x20];\r
+  unsigned short vdp_regs[0x10];\r
+  unsigned char pending_fb;\r
+  unsigned char pad[3];\r
+};\r
 \r
 // area.c\r
 PICO_INTERNAL void PicoAreaPackCpu(unsigned char *cpu, int is_sub);\r
@@ -576,6 +585,19 @@ void PicoMemSetupMS(void);
 void PicoFrameMS(void);\r
 void PicoFrameDrawOnlyMS(void);\r
 \r
+// 32x/32x.c\r
+extern struct Pico32x Pico32x;\r
+void Pico32xInit(void);\r
+void Pico32xStartup(void);\r
+void PicoReset32x(void);\r
+\r
+// 32x/memory.c\r
+unsigned int PicoRead8_32x(unsigned int a);\r
+unsigned int PicoRead16_32x(unsigned int a);\r
+void PicoWrite8_32x(unsigned int a, unsigned int d);\r
+void PicoWrite16_32x(unsigned int a, unsigned int d);\r
+void PicoMemSetup32x(void);\r
+\r
 /* avoid dependency on newer glibc */\r
 static __inline int isspace_(int c)\r
 {\r
@@ -606,6 +628,7 @@ static __inline int isspace_(int c)
 #define EL_IDLE    0x00010000 /* idle loop det. */\r
 #define EL_CDREGS  0x00020000 /* MCD: register access */\r
 #define EL_CDREG3  0x00040000 /* MCD: register 3 only */\r
+#define EL_32X     0x00080000\r
 \r
 #define EL_STATUS  0x40000000 /* status messages */\r
 #define EL_ANOMALY 0x80000000 /* some unexpected conditions (during emulation) */\r