X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPicoInt.h;h=cd4d00e88dfa4c535b12e3b6a27765f8efae3519;hb=1cb1584b86a5679b8d32ccfc190f6e76c920810f;hp=bd10f19e46b17477ff021bd79b2da89d069d452e;hpb=f8ef8ff7100baa0ac0ecfcacb47aea3a9e24bc38;p=picodrive.git diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h index bd10f19..cd4d00e 100644 --- a/Pico/PicoInt.h +++ b/Pico/PicoInt.h @@ -169,7 +169,7 @@ extern int SekCycleAimS68k; // ----------------------- Z80 CPU ----------------------- #if defined(_USE_MZ80) -#include "../../cpu/mz80/mz80.h" +#include "../cpu/mz80/mz80.h" #define z80_run(cycles) mz80_run(cycles) #define z80_run_nr(cycles) mz80_run(cycles) @@ -177,7 +177,7 @@ extern int SekCycleAimS68k; #define z80_resetCycles() mz80GetElapsedTicks(1) #elif defined(_USE_DRZ80) -#include "../../cpu/DrZ80/drz80.h" +#include "../cpu/DrZ80/drz80.h" extern struct DrZ80 drZ80; @@ -190,7 +190,7 @@ extern struct DrZ80 drZ80; #define z80_resetCycles() #elif defined(_USE_CZ80) -#include "../../cpu/cz80/cz80.h" +#include "../cpu/cz80/cz80.h" #define z80_run(cycles) Cz80_Exec(&CZ80, cycles) #define z80_run_nr(cycles) Cz80_Exec(&CZ80, cycles) @@ -335,10 +335,10 @@ typedef struct union { // 0a0000: 256K struct { unsigned char word_ram2M[0x40000]; - unsigned char unused[0x20000]; + unsigned char unused0[0x20000]; }; struct { - unsigned char unused[0x20000]; + unsigned char unused1[0x20000]; unsigned char word_ram1M[2][0x20000]; }; }; @@ -362,13 +362,22 @@ typedef struct // Area.c PICO_INTERNAL int PicoAreaPackCpu(unsigned char *cpu, int is_sub); PICO_INTERNAL int PicoAreaUnpackCpu(unsigned char *cpu, int is_sub); +extern void (*PicoLoadStateHook)(void); // cd/Area.c PICO_INTERNAL int PicoCdSaveState(void *file); PICO_INTERNAL int PicoCdLoadState(void *file); +typedef struct { + int chunk; + int size; + void *ptr; +} carthw_state_chunk; +extern carthw_state_chunk *carthw_chunks; +#define CHUNK_CARTHW 64 + // Cart.c -PICO_INTERNAL void PicoCartDetect(void); +extern void (*PicoCartUnloadHook)(void); // Debug.c int CM_compareRun(int cyc, int is_sub); @@ -410,12 +419,14 @@ extern struct PicoSRAM SRam; extern int emustatus; extern int z80startCycle, z80stopCycle; // in 68k cycles extern void (*PicoResetHook)(void); +extern void (*PicoLineHook)(int count); PICO_INTERNAL int CheckDMA(void); // cd/Pico.c PICO_INTERNAL int PicoInitMCD(void); PICO_INTERNAL void PicoExitMCD(void); -PICO_INTERNAL int PicoResetMCD(int hard); +PICO_INTERNAL void PicoPowerMCD(void); +PICO_INTERNAL int PicoResetMCD(void); PICO_INTERNAL int PicoFrameMCD(void); // Sek.c @@ -436,7 +447,7 @@ extern int PsndLen_exc_add; // VideoPort.c PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d); PICO_INTERNAL_ASM unsigned int PicoVideoRead(unsigned int a); -extern int (*PicoDmaHook)(unsigned int source, unsigned short **srcp, unsigned short **limitp); +extern int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp); // Misc.c PICO_INTERNAL void SRAMWriteEEPROM(unsigned int d); @@ -476,23 +487,24 @@ PICO_INTERNAL void z80_exit(void); #define EL_LOGMASK 0 #endif -#define EL_HVCNT 0x0001 /* hv counter reads */ -#define EL_SR 0x0002 /* SR reads */ -#define EL_INTS 0x0004 /* ints and acks */ -#define EL_YM2612R 0x0008 /* 68k ym2612 reads */ -#define EL_INTSW 0x0010 /* log irq switching on/off */ -#define EL_ASVDP 0x0020 /* VDP accesses during active scan */ -#define EL_VDPDMA 0x0040 /* VDP DMA transfers and their timing */ -#define EL_BUSREQ 0x0080 /* z80 busreq r/w or reset w */ -#define EL_Z80BNK 0x0100 /* z80 i/o through bank area */ -#define EL_SRAMIO 0x0200 /* sram i/o */ -#define EL_EEPROM 0x0400 /* eeprom debug */ -#define EL_UIO 0x0800 /* unmapped i/o */ -#define EL_IO 0x1000 /* all i/o */ -#define EL_CDPOLL 0x2000 /* MCD: log poll detection */ - -#define EL_STATUS 0x4000 /* status messages */ -#define EL_ANOMALY 0x8000 /* some unexpected conditions (during emulation) */ +#define EL_HVCNT 0x00000001 /* hv counter reads */ +#define EL_SR 0x00000002 /* SR reads */ +#define EL_INTS 0x00000004 /* ints and acks */ +#define EL_YM2612R 0x00000008 /* 68k ym2612 reads */ +#define EL_INTSW 0x00000010 /* log irq switching on/off */ +#define EL_ASVDP 0x00000020 /* VDP accesses during active scan */ +#define EL_VDPDMA 0x00000040 /* VDP DMA transfers and their timing */ +#define EL_BUSREQ 0x00000080 /* z80 busreq r/w or reset w */ +#define EL_Z80BNK 0x00000100 /* z80 i/o through bank area */ +#define EL_SRAMIO 0x00000200 /* sram i/o */ +#define EL_EEPROM 0x00000400 /* eeprom debug */ +#define EL_UIO 0x00000800 /* unmapped i/o */ +#define EL_IO 0x00001000 /* all i/o */ +#define EL_CDPOLL 0x00002000 /* MCD: log poll detection */ +#define EL_SVP 0x00004000 /* SVP stuff */ + +#define EL_STATUS 0x40000000 /* status messages */ +#define EL_ANOMALY 0x80000000 /* some unexpected conditions (during emulation) */ #if EL_LOGMASK extern void lprintf(const char *fmt, ...); @@ -501,9 +513,17 @@ extern void lprintf(const char *fmt, ...); if ((w) & EL_LOGMASK) \ lprintf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \ } +#elif defined(_MSC_VER) +#define elprintf #else #define elprintf(w,f,...) #endif +#ifdef _MSC_VER +#define cdprintf +#else +#define cdprintf(x...) +#endif + #endif // PICO_INTERNAL_INCLUDED