1.32 release
[picodrive.git] / Pico / PicoInt.h
index 2b802d7..eb10b54 100644 (file)
@@ -1,7 +1,7 @@
 // Pico Library - Header File\r
 \r
 // (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006 notaz, All rights reserved.\r
+// (c) Copyright 2006,2007 Grazvydas "notaz" Ignotas, all rights reserved.\r
 // Free for non-commercial use.\r
 \r
 // For commercial use, separate licencing terms must be obtained.\r
@@ -142,7 +142,7 @@ struct PicoMisc
   char dirtyPal; // Is the palette dirty (1 - change @ this frame, 2 - some time before)\r
   unsigned char hardware; // Hardware value for country\r
   unsigned char pal; // 1=PAL 0=NTSC\r
-  unsigned char sram_reg; // SRAM mode register. bit0: allow read? bit1: deny write? bit2: EEPROM?\r
+  unsigned char sram_reg; // SRAM mode register. bit0: allow read? bit1: deny write? bit2: EEPROM? bit4: detected? (header or by access)\r
   unsigned short z80_bank68k;\r
   unsigned short z80_lastaddr; // this is for Z80 faking\r
   unsigned char  z80_fakeval;\r
@@ -151,7 +151,7 @@ struct PicoMisc
   unsigned short sram_addr;  // EEPROM address register\r
   unsigned char sram_cycle;  // EEPROM SRAM cycle number\r
   unsigned char sram_slave;  // EEPROM slave word for X24C02 and better SRAMs\r
-  unsigned char prot_bytes[2]; // simple protection fakeing\r
+  unsigned char prot_bytes[2]; // simple protection faking\r
   unsigned short dma_bytes;  //\r
   unsigned char pad[2];\r
   unsigned int  frame_count; // mainly for movies\r
@@ -217,10 +217,13 @@ struct mcd_misc
        unsigned int   counter75hz;\r
        unsigned short audio_offset;    // 0c: for savestates: play pointer offset (0-1023)\r
        unsigned char  audio_track;     // playing audio track # (zero based)\r
-       char pad1;\r
+       char           pad1;\r
        int            timer_int3;      // 10\r
        unsigned int   timer_stopwatch;\r
-       int pad[10];\r
+       unsigned char  bcram_reg;       // 18: battery-backed RAM cart register\r
+       unsigned char  pad2;\r
+       unsigned short pad3;\r
+       int pad[9];\r
 };\r
 \r
 typedef struct\r
@@ -333,7 +336,7 @@ unsigned int SRAMReadEEPROM();
 void SRAMUpdPending(unsigned int a, unsigned int d);\r
 void memcpy16(unsigned short *dest, unsigned short *src, int count);\r
 void memcpy16bswap(unsigned short *dest, void *src, int count);\r
-void memcpy32(int *dest, int *src, int count);\r
+void memcpy32(int *dest, int *src, int count); // 32bit word count\r
 void memset32(int *dest, int c, int count);\r
 \r
 // cd/Misc.c\r