svp minor adjustments, copyright
[picodrive.git] / Pico / PicoInt.h
index ed97081..e2ce1ad 100644 (file)
@@ -13,6 +13,7 @@
 #include <stdlib.h>\r
 #include <string.h>\r
 #include "Pico.h"\r
+#include "carthw/carthw.h"\r
 \r
 //\r
 #define USE_POLL_DETECT\r
@@ -384,6 +385,7 @@ PICO_INTERNAL int PicoInitPc(unsigned int pc);
 PICO_INTERNAL_ASM unsigned int PicoRead32(unsigned int a);\r
 PICO_INTERNAL void PicoMemSetup(void);\r
 PICO_INTERNAL_ASM void PicoMemReset(void);\r
+PICO_INTERNAL void PicoMemResetHooks(void);\r
 PICO_INTERNAL int PadRead(int i);\r
 PICO_INTERNAL unsigned char z80_read(unsigned short a);\r
 #ifndef _USE_CZ80\r
@@ -393,6 +395,9 @@ PICO_INTERNAL unsigned short z80_read16(unsigned short a);
 #else\r
 PICO_INTERNAL_ASM void z80_write(unsigned int a, unsigned char data);\r
 #endif\r
+extern unsigned int (*PicoRead16Hook)(unsigned int a, int realsize);\r
+extern void (*PicoWrite8Hook) (unsigned int a,unsigned int d,int realsize);\r
+extern void (*PicoWrite16Hook)(unsigned int a,unsigned int d,int realsize);\r
 \r
 // cd/Memory.c\r
 PICO_INTERNAL void PicoMemSetupCD(void);\r
@@ -404,6 +409,8 @@ extern struct Pico Pico;
 extern struct PicoSRAM SRam;\r
 extern int emustatus;\r
 extern int z80startCycle, z80stopCycle; // in 68k cycles\r
+extern void (*PicoResetHook)(void);\r
+extern void (*PicoLineHook)(int count);\r
 PICO_INTERNAL int CheckDMA(void);\r
 \r
 // cd/Pico.c\r
@@ -430,6 +437,7 @@ extern int PsndLen_exc_add;
 // VideoPort.c\r
 PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d);\r
 PICO_INTERNAL_ASM unsigned int PicoVideoRead(unsigned int a);\r
+extern int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp);\r
 \r
 // Misc.c\r
 PICO_INTERNAL void SRAMWriteEEPROM(unsigned int d);\r
@@ -469,23 +477,24 @@ PICO_INTERNAL void z80_exit(void);
 #define EL_LOGMASK 0\r
 #endif\r
 \r
-#define EL_HVCNT   0x0001 /* hv counter reads */\r
-#define EL_SR      0x0002 /* SR reads */\r
-#define EL_INTS    0x0004 /* ints and acks */\r
-#define EL_YM2612R 0x0008 /* 68k ym2612 reads */\r
-#define EL_INTSW   0x0010 /* log irq switching on/off */\r
-#define EL_ASVDP   0x0020 /* VDP accesses during active scan */\r
-#define EL_VDPDMA  0x0040 /* VDP DMA transfers and their timing */\r
-#define EL_BUSREQ  0x0080 /* z80 busreq r/w or reset w */\r
-#define EL_Z80BNK  0x0100 /* z80 i/o through bank area */\r
-#define EL_SRAMIO  0x0200 /* sram i/o */\r
-#define EL_EEPROM  0x0400 /* eeprom debug */\r
-#define EL_UIO     0x0800 /* unmapped i/o */\r
-#define EL_IO      0x1000 /* all i/o */\r
-#define EL_CDPOLL  0x2000 /* MCD: log poll detection */\r
-\r
-#define EL_STATUS  0x4000 /* status messages */\r
-#define EL_ANOMALY 0x8000 /* some unexpected conditions (during emulation) */\r
+#define EL_HVCNT   0x00000001 /* hv counter reads */\r
+#define EL_SR      0x00000002 /* SR reads */\r
+#define EL_INTS    0x00000004 /* ints and acks */\r
+#define EL_YM2612R 0x00000008 /* 68k ym2612 reads */\r
+#define EL_INTSW   0x00000010 /* log irq switching on/off */\r
+#define EL_ASVDP   0x00000020 /* VDP accesses during active scan */\r
+#define EL_VDPDMA  0x00000040 /* VDP DMA transfers and their timing */\r
+#define EL_BUSREQ  0x00000080 /* z80 busreq r/w or reset w */\r
+#define EL_Z80BNK  0x00000100 /* z80 i/o through bank area */\r
+#define EL_SRAMIO  0x00000200 /* sram i/o */\r
+#define EL_EEPROM  0x00000400 /* eeprom debug */\r
+#define EL_UIO     0x00000800 /* unmapped i/o */\r
+#define EL_IO      0x00001000 /* all i/o */\r
+#define EL_CDPOLL  0x00002000 /* MCD: log poll detection */\r
+#define EL_SVP     0x00004000 /* SVP stuff */\r
+\r
+#define EL_STATUS  0x40000000 /* status messages */\r
+#define EL_ANOMALY 0x80000000 /* some unexpected conditions (during emulation) */\r
 \r
 #if EL_LOGMASK\r
 extern void lprintf(const char *fmt, ...);\r