X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPicoInt.h;h=832664d89de7a920e4226f4b26a20a42c428f30b;hb=83bd0b76aba19ff62368cfee76089e15579e3b7c;hp=d96a071249db9e9e8ebac5ab56fa822f770ffa24;hpb=75736070161d40608ba3052b4c95b42943f9de3d;p=picodrive.git diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h index d96a071..832664d 100644 --- a/Pico/PicoInt.h +++ b/Pico/PicoInt.h @@ -164,6 +164,22 @@ struct PicoSRAM #include "cd/LC89510.h" #include "cd/gfx_cd.h" +struct mcd_pcm +{ + unsigned char control; // reg7 + unsigned char enabled; // reg8 + unsigned char cur_ch; + unsigned char bank; + int pad1; + + struct pcm_chan + { + unsigned char regs[8]; + unsigned int addr; // played sample address + int pad; + } ch[8]; +}; + struct mcd_misc { unsigned short hint_vector; @@ -174,19 +190,35 @@ struct mcd_misc unsigned short audio_offset; // for savestates: play pointer offset (0-1023) unsigned char audio_track; // playing audio track # (zero based) char pad1; - int pad[12]; + int timer_int3; + unsigned int timer_stopwatch; + int pad[10]; }; typedef struct { unsigned char bios[0x20000]; // 128K - union { - unsigned char prg_ram[0x80000]; // 512K + union { // 512K + unsigned char prg_ram[0x80000]; unsigned char prg_ram_b[4][0x20000]; }; - unsigned char word_ram[0x40000]; // 256K + union { // 256K + struct { + unsigned char word_ram2M[0x40000]; + unsigned char unused[0x20000]; + }; + struct { + unsigned char unused[0x20000]; + unsigned char word_ram1M[2][0x20000]; + }; + }; + union { // 64K + unsigned char pcm_ram[0x10000]; + unsigned char pcm_ram_b[0x10][0x1000]; + }; unsigned char bram[0x2000]; // 8K - unsigned char s68k_regs[0x200]; + unsigned char s68k_regs[0x200]; // GA, not CPU regs + struct mcd_pcm pcm; _scd_toc TOC; // not to be saved CDD cdd; CDC cdc; @@ -204,6 +236,7 @@ int PicoAreaUnpackCpu(unsigned char *cpu, int is_sub); // cd/Area.c int PicoCdSaveState(void *file); int PicoCdLoadState(void *file); +int PicoCdLoadStateGfx(void *file); // Draw.c int PicoLine(int scan); @@ -224,7 +257,7 @@ void z80_write(unsigned char data, unsigned short a); void z80_write16(unsigned short data, unsigned short a); // cd/Memory.c -void PicoMemSetupCD(); +void PicoMemSetupCD(void); unsigned char PicoReadCD8 (unsigned int a); unsigned short PicoReadCD16(unsigned int a); unsigned int PicoReadCD32(unsigned int a); @@ -254,6 +287,10 @@ int SekInitS68k(void); int SekResetS68k(void); int SekInterruptS68k(int irq); +// sound/sound.c +extern int PsndLen_exc_cnt; +extern int PsndLen_exc_add; + // VideoPort.c void PicoVideoWrite(unsigned int a,unsigned short d); unsigned int PicoVideoRead(unsigned int a); @@ -262,6 +299,13 @@ unsigned int PicoVideoRead(unsigned int a); void SRAMWriteEEPROM(unsigned int d); unsigned int SRAMReadEEPROM(); void SRAMUpdPending(unsigned int a, unsigned int d); +void memcpy16(unsigned short *dest, unsigned short *src, int count); +void memcpy32(int *dest, int *src, int count); +void memset32(int *dest, int c, int count); + +// cd/Misc.c +void wram_2M_to_1M(unsigned char *m); +void wram_1M_to_2M(unsigned char *m); #ifdef __cplusplus