--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+int (*PicoAcb)(struct PicoArea *)=NULL; // Area callback for each block of memory\r
+FILE *PmovFile=NULL;\r
+int PmovAction=0;\r
+\r
+// Scan one variable and callback\r
+static void ScanVar(void *data,int len,char *name)\r
+{\r
+ struct PicoArea pa={NULL,0,NULL};\r
+ pa.data=data; pa.len=len; pa.name=name;\r
+ if (PicoAcb) PicoAcb(&pa);\r
+}\r
+\r
+#define SCAN_VAR(x,y) ScanVar(&x,sizeof(x),y);\r
+#define SCANP(x) ScanVar(&Pico.x,sizeof(Pico.x),#x);\r
+\r
+// Pack the cpu into a common format:\r
+static int PackCpu(unsigned char *cpu)\r
+{\r
+ unsigned int pc=0;\r
+\r
+#ifdef EMU_A68K\r
+ memcpy(cpu,M68000_regs.d,0x40);\r
+ pc=M68000_regs.pc;\r
+ *(unsigned char *)(cpu+0x44)=(unsigned char)M68000_regs.ccr;\r
+ *(unsigned char *)(cpu+0x45)=(unsigned char)M68000_regs.srh;\r
+ *(unsigned int *)(cpu+0x48)=M68000_regs.isp;\r
+#endif\r
+\r
+#ifdef EMU_C68K\r
+ memcpy(cpu,PicoCpu.d,0x40);\r
+ pc=PicoCpu.pc-PicoCpu.membase;\r
+ *(unsigned char *)(cpu+0x44)=PicoCpu.ccr;\r
+ *(unsigned char *)(cpu+0x45)=PicoCpu.srh;\r
+ *(unsigned int *)(cpu+0x48)=PicoCpu.osp;\r
+#endif\r
+\r
+ *(unsigned int *)(cpu+0x40)=pc;\r
+ return 0;\r
+}\r
+\r
+static int UnpackCpu(unsigned char *cpu)\r
+{\r
+ unsigned int pc=0;\r
+\r
+ pc=*(unsigned int *)(cpu+0x40);\r
+\r
+#ifdef EMU_A68K\r
+ memcpy(M68000_regs.d,cpu,0x40);\r
+ M68000_regs.pc=pc;\r
+ M68000_regs.ccr=*(unsigned char *)(cpu+0x44);\r
+ M68000_regs.srh=*(unsigned char *)(cpu+0x45);\r
+ M68000_regs.isp=*(unsigned int *)(cpu+0x48);\r
+#endif\r
+\r
+#ifdef EMU_C68K\r
+ memcpy(PicoCpu.d,cpu,0x40);\r
+ PicoCpu.membase=0;\r
+ PicoCpu.pc =PicoCpu.checkpc(pc); // Base pc\r
+ PicoCpu.ccr=*(unsigned char *)(cpu+0x44);\r
+ PicoCpu.srh=*(unsigned char *)(cpu+0x45);\r
+ PicoCpu.osp=*(unsigned int *)(cpu+0x48);\r
+#endif\r
+ return 0;\r
+}\r
+\r
+// Scan the contents of the virtual machine's memory for saving or loading\r
+int PicoAreaScan(int action,int *pmin)\r
+{\r
+ unsigned char cpu[0x60];\r
+\r
+ memset(&cpu,0,sizeof(cpu));\r
+\r
+ if (action&4)\r
+ {\r
+ // Scan all the memory areas:\r
+ SCANP(ram) SCANP(vram) SCANP(zram) SCANP(cram) SCANP(vsram)\r
+\r
+ // Pack, scan and unpack the cpu data:\r
+ PackCpu(cpu);\r
+ SekInit();\r
+ PicoMemInit();\r
+ SCAN_VAR(cpu,"cpu")\r
+ UnpackCpu(cpu);\r
+\r
+ SCAN_VAR(Pico.m ,"misc")\r
+ SCAN_VAR(Pico.video,"video")\r
+ SCAN_VAR(Pico.s ,"sound")\r
+\r
+ Pico.m.scanline=0;\r
+ if (action&2)\r
+ {\r
+ memset(Pico.highpal,0,sizeof(Pico.highpal));\r
+ Pico.m.dirtyPal=1; // Recalculate palette\r
+ }\r
+ }\r
+\r
+ if (pmin) *pmin=0x0021;\r
+\r
+ return 0;\r
+}\r
+\r
+// ---------------------------------------------------------------------------\r
+// Helper code to save/load to a file handle\r
+\r
+// Area callback for each piece of Megadrive memory, read or write to the file:\r
+static int StateAcb(struct PicoArea *pa)\r
+{\r
+ if (PmovFile==NULL) return 1;\r
+\r
+ if ((PmovAction&3)==1) fwrite(pa->data,1,pa->len,PmovFile);\r
+ if ((PmovAction&3)==2) fread (pa->data,1,pa->len,PmovFile);\r
+ return 0;\r
+}\r
+\r
+// Save or load the state from PmovFile:\r
+int PmovState()\r
+{\r
+ int minimum=0;\r
+ unsigned char head[32];\r
+\r
+ memset(head,0,sizeof(head));\r
+\r
+ // Find out minial compatible version:\r
+ PicoAreaScan(PmovAction&0xc,&minimum); \r
+\r
+ memcpy(head,"Pico",4);\r
+ *(unsigned int *)(head+0x8)=PicoVer;\r
+ *(unsigned int *)(head+0xc)=minimum;\r
+\r
+ // Scan header:\r
+ if (PmovAction&1) fwrite(head,1,sizeof(head),PmovFile);\r
+ if (PmovAction&2) fread (head,1,sizeof(head),PmovFile);\r
+\r
+ // Scan memory areas:\r
+ PicoAcb=StateAcb;\r
+ PicoAreaScan(PmovAction,NULL);\r
+ PicoAcb=NULL;\r
+ return 0;\r
+}\r
+\r
+int PmovUpdate()\r
+{\r
+ int ret=0;\r
+ if (PmovFile==NULL) return 1;\r
+ \r
+ if ((PmovAction&3)==0) return 0;\r
+\r
+ PicoPad[1]=0; // Make sure pad #2 is blank\r
+ if (PmovAction&1) ret=fwrite(PicoPad,1,2,PmovFile);\r
+ if (PmovAction&2) ret=fread (PicoPad,1,2,PmovFile);\r
+\r
+ if (ret!=2)\r
+ {\r
+ // End of file\r
+ fclose(PmovFile); PmovFile=NULL;\r
+ PmovAction=0;\r
+ }\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+static void Byteswap(unsigned char *data,int len)\r
+{\r
+ int i=0;\r
+\r
+ if (len<2) return; // Too short\r
+\r
+ do\r
+ {\r
+ unsigned short *pd=(unsigned short *)(data+i);\r
+ int value=*pd; // Get 2 bytes\r
+\r
+ value=(value<<8)|(value>>8); // Byteswap it\r
+ *pd=(unsigned short)value; // Put 2b ytes\r
+ i+=2;\r
+ } \r
+ while (i+2<=len);\r
+}\r
+\r
+// Interleve a 16k block and byteswap\r
+static int InterleveBlock(unsigned char *dest,unsigned char *src)\r
+{\r
+ int i=0;\r
+ for (i=0;i<0x2000;i++) dest[(i<<1) ]=src[ i]; // Odd\r
+ for (i=0;i<0x2000;i++) dest[(i<<1)+1]=src[0x2000+i]; // Even\r
+ return 0;\r
+}\r
+\r
+// Decode a SMD file\r
+static int DecodeSmd(unsigned char *data,int len)\r
+{\r
+ unsigned char *temp=NULL;\r
+ int i=0;\r
+\r
+ temp=(unsigned char *)malloc(0x4000);\r
+ if (temp==NULL) return 1;\r
+ memset(temp,0,0x4000);\r
+\r
+ // Interleve each 16k block and shift down by 0x200:\r
+ for (i=0; i+0x4200<=len; i+=0x4000)\r
+ {\r
+ InterleveBlock(temp,data+0x200+i); // Interleve 16k to temporary buffer\r
+ memcpy(data+i,temp,0x4000); // Copy back in\r
+ }\r
+\r
+ free(temp);\r
+ return 0;\r
+}\r
+\r
+int PicoCartLoad(FILE *f,unsigned char **prom,unsigned int *psize)\r
+{\r
+ unsigned char *rom=NULL; int size=0;\r
+ if (f==NULL) return 1;\r
+\r
+ fseek(f,0,SEEK_END); size=ftell(f); fseek(f,0,SEEK_SET);\r
+\r
+ size=(size+3)&~3; // Round up to a multiple of 4\r
+\r
+ // Allocate space for the rom plus padding\r
+ rom=(unsigned char *)malloc(size+4);\r
+ if (rom==NULL) { fclose(f); return 1; }\r
+ memset(rom,0,size+4);\r
+\r
+ fread(rom,1,size,f); // Load up the rom\r
+ fclose(f);\r
+\r
+ // Check for SMD:\r
+ if ((size&0x3fff)==0x200) { DecodeSmd(rom,size); size-=0x200; } // Decode and byteswap SMD\r
+ else Byteswap(rom,size); // Just byteswap\r
+ \r
+ if (prom) *prom=rom;\r
+ if (psize) *psize=size;\r
+\r
+ return 0;\r
+}\r
+\r
+// Insert/remove a cartridge:\r
+int PicoCartInsert(unsigned char *rom,unsigned int romsize)\r
+{\r
+ // Make sure movie playing/recording is stopped:\r
+ if (PmovFile) fclose(PmovFile);\r
+ PmovFile=NULL; PmovAction=0;\r
+\r
+ memset(&Pico,0,sizeof(Pico)); // Blank Pico state\r
+ Pico.rom=rom;\r
+ Pico.romsize=romsize;\r
+ PicoReset();\r
+\r
+ return 0;\r
+}\r
\r
-// Dave's Disa 68000 Disassembler\r
+// Disa 68000 Disassembler\r
#ifndef __GNUC__\r
#pragma warning(disable:4115)\r
#endif\r
\r
-// Dave's Disa 68000 Disassembler\r
+// Disa 68000 Disassembler\r
\r
#ifdef __cplusplus\r
extern "C" {\r
#endif\r
\r
+#if defined(__GNUC__) || defined(_WIN32_WCE)\r
#define CPU_CALL\r
+#else\r
+#define CPU_CALL __fastcall\r
+#endif\r
\r
extern unsigned int DisaPc;\r
extern char *DisaText; // Text buffer to write in\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+#ifndef __GNUC__\r
+#pragma warning (disable:4706) // Disable assignment with conditional\r
+#endif\r
+\r
+int (*PicoScan)(unsigned int num,unsigned short *data)=NULL;\r
+\r
+// Line colour indices - in the format 00ppcccc pp=palette, cccc=colour\r
+static unsigned short HighCol[32+320+8]; // Gap for 32 column, and messy border on right\r
+static int Scanline=0; // Scanline\r
+\r
+int PicoMask=0xfff; // Mask of which layers to draw\r
+\r
+static int TileNorm(unsigned short *pd,int addr,unsigned int *pal)\r
+{\r
+ unsigned int pack=0; unsigned int t=0;\r
+\r
+ pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ if (pack)\r
+ {\r
+ t=pack&0x0000f000; if (t) { t=pal[t>>12]; pd[0]=(unsigned short)t; }\r
+ t=pack&0x00000f00; if (t) { t=pal[t>> 8]; pd[1]=(unsigned short)t; }\r
+ t=pack&0x000000f0; if (t) { t=pal[t>> 4]; pd[2]=(unsigned short)t; }\r
+ t=pack&0x0000000f; if (t) { t=pal[t ]; pd[3]=(unsigned short)t; }\r
+ t=pack&0xf0000000; if (t) { t=pal[t>>28]; pd[4]=(unsigned short)t; }\r
+ t=pack&0x0f000000; if (t) { t=pal[t>>24]; pd[5]=(unsigned short)t; }\r
+ t=pack&0x00f00000; if (t) { t=pal[t>>20]; pd[6]=(unsigned short)t; }\r
+ t=pack&0x000f0000; if (t) { t=pal[t>>16]; pd[7]=(unsigned short)t; }\r
+ return 0;\r
+ }\r
+\r
+ return 1; // Tile blank\r
+}\r
+\r
+static int TileFlip(unsigned short *pd,int addr,unsigned int *pal)\r
+{\r
+ unsigned int pack=0; unsigned int t=0;\r
+\r
+ pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels\r
+ if (pack)\r
+ {\r
+ t=pack&0x000f0000; if (t) { t=pal[t>>16]; pd[0]=(unsigned short)t; }\r
+ t=pack&0x00f00000; if (t) { t=pal[t>>20]; pd[1]=(unsigned short)t; }\r
+ t=pack&0x0f000000; if (t) { t=pal[t>>24]; pd[2]=(unsigned short)t; }\r
+ t=pack&0xf0000000; if (t) { t=pal[t>>28]; pd[3]=(unsigned short)t; }\r
+ t=pack&0x0000000f; if (t) { t=pal[t ]; pd[4]=(unsigned short)t; }\r
+ t=pack&0x000000f0; if (t) { t=pal[t>> 4]; pd[5]=(unsigned short)t; }\r
+ t=pack&0x00000f00; if (t) { t=pal[t>> 8]; pd[6]=(unsigned short)t; }\r
+ t=pack&0x0000f000; if (t) { t=pal[t>>12]; pd[7]=(unsigned short)t; }\r
+ return 0;\r
+ }\r
+ return 1; // Tile blank\r
+}\r
+\r
+struct TileStrip\r
+{\r
+ int nametab; // Position in VRAM of name table (for this tile line)\r
+ int line; // Line number in pixels 0x000-0x3ff within the virtual tilemap \r
+ int hscroll; // Horizontal scroll value in pixels for the line\r
+ int xmask; // X-Mask (0x1f - 0x7f) for horizontal wraparound in the tilemap\r
+ int high; // High or low tiles\r
+};\r
+\r
+static int WrongPri=0; // 1 if there were tiles which are the wrong priority\r
+\r
+static int DrawStrip(struct TileStrip ts)\r
+{\r
+ int tilex=0,dx=0,ty=0;\r
+ int blank=-1; // The tile we know is blank\r
+\r
+ WrongPri=0;\r
+\r
+ // Draw tiles across screen:\r
+ tilex=(-ts.hscroll)>>3;\r
+ ty=(ts.line&7)<<1; // Y-Offset into tile\r
+ for (dx=((ts.hscroll-1)&7)+1; dx<328; dx+=8,tilex++)\r
+ {\r
+ int code=0,addr=0,zero=0;\r
+ unsigned int *pal=NULL;\r
+\r
+ code=Pico.vram[ts.nametab+(tilex&ts.xmask)];\r
+ if (code==blank) continue;\r
+ if ((code>>15)!=ts.high) { WrongPri=1; continue; }\r
+\r
+ // Get tile address/2:\r
+ addr=(code&0x7ff)<<4;\r
+ if (code&0x1000) addr+=14-ty; else addr+=ty; // Y-flip\r
+\r
+ pal=Pico.highpal+((code>>9)&0x30);\r
+\r
+ if (code&0x0800) zero=TileFlip(HighCol+24+dx,addr,pal);\r
+ else zero=TileNorm(HighCol+24+dx,addr,pal);\r
+\r
+ if (zero) blank=code; // We know this tile is blank now\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int DrawLayer(int plane,int high)\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ static char shift[4]={5,6,6,7}; // 32,64 or 128 sized tilemaps\r
+ struct TileStrip ts;\r
+\r
+ // Work out the TileStrip to draw\r
+\r
+ // Get vertical scroll value:\r
+ int vscroll=Pico.vsram[plane];\r
+\r
+ int htab=pvid->reg[13]<<9; // Horizontal scroll table address\r
+ if ( pvid->reg[11]&2) htab+=Scanline<<1; // Offset by line\r
+ if ((pvid->reg[11]&1)==0) htab&=~0xf; // Offset by tile\r
+ htab+=plane; // A or B\r
+\r
+ // Get horizontal scroll value\r
+ ts.hscroll=Pico.vram[htab&0x7fff];\r
+\r
+ // Work out the name table size: 32 64 or 128 tiles (0-3)\r
+ int width=pvid->reg[16];\r
+ int height=(width>>4)&3; width&=3;\r
+\r
+ ts.xmask=(1<<shift[width ])-1; // X Mask in tiles\r
+ int ymask=(8<<shift[height])-1; // Y Mask in pixels\r
+\r
+ // Find name table:\r
+ if (plane==0) ts.nametab=(pvid->reg[2]&0x38)<< 9; // A\r
+ else ts.nametab=(pvid->reg[4]&0x07)<<12; // B\r
+\r
+ // Find the line in the name table\r
+ ts.line=(vscroll+Scanline)&ymask;\r
+ ts.nametab+=(ts.line>>3)<<shift[width];\r
+\r
+ ts.high=high;\r
+\r
+ DrawStrip(ts);\r
+ return 0;\r
+}\r
+\r
+static int DrawWindow(int high)\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ struct TileStrip ts;\r
+\r
+ ts.line=Scanline;\r
+ ts.hscroll=0;\r
+\r
+ // Find name table line:\r
+ if (Pico.video.reg[12]&1)\r
+ {\r
+ ts.nametab=(pvid->reg[3]&0x3c)<<9; // 40-cell mode\r
+ ts.nametab+=(ts.line>>3)<<6;\r
+ }\r
+ else\r
+ {\r
+ ts.nametab=(pvid->reg[3]&0x3e)<<9; // 32-cell mode\r
+ ts.nametab+=(ts.line>>3)<<5;\r
+ }\r
+\r
+ ts.xmask=0x3f;\r
+ ts.high=high;\r
+\r
+ DrawStrip(ts);\r
+ return 0;\r
+}\r
+\r
+static int DrawSprite(int sy,unsigned short *sprite,int high)\r
+{\r
+ int sx=0,width=0,height=0;\r
+ int row=0,code=0;\r
+ unsigned int *pal=NULL;\r
+ int tile=0,delta=0;\r
+ int i=0;\r
+\r
+ code=sprite[2];\r
+ if ((code>>15)!=high) { WrongPri=1; return 0; } // Wrong priority\r
+\r
+ height=sprite[1]>>8;\r
+ width=(height>>2)&3; height&=3;\r
+ width++; height++; // Width and height in tiles\r
+ if (Scanline>=sy+(height<<3)) return 0; // Not on this line after all\r
+\r
+ row=Scanline-sy; // Row of the sprite we are on\r
+ pal=Pico.highpal+((code>>9)&0x30); // Get palette pointer\r
+ if (code&0x1000) row=(height<<3)-1-row; // Flip Y\r
+\r
+ tile=code&0x7ff; // Tile number\r
+ tile+=row>>3; // Tile number increases going down\r
+ delta=height; // Delta to increase tile by going right\r
+ if (code&0x0800) { tile+=delta*(width-1); delta=-delta; } // Flip X\r
+\r
+ tile<<=4; tile+=(row&7)<<1; // Tile address\r
+ delta<<=4; // Delta of address\r
+\r
+ sx=(sprite[3]&0x1ff)-0x78; // Get X coordinate + 8\r
+\r
+ for (i=0; i<width; i++,sx+=8,tile+=delta)\r
+ {\r
+ if (sx<=0 || sx>=328) continue; // Offscreen\r
+\r
+ tile&=0x7fff; // Clip tile address\r
+ if (code&0x0800) TileFlip(HighCol+24+sx,tile,pal);\r
+ else TileNorm(HighCol+24+sx,tile,pal);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static int DrawAllSprites(int high)\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ int table=0;\r
+ int i=0,link=0;\r
+ unsigned char spin[80]; // Sprite index\r
+\r
+ WrongPri=0;\r
+\r
+ table=pvid->reg[5]&0x7f;\r
+ if (pvid->reg[12]&1) table&=0x7e; // Lowest bit 0 in 40-cell mode\r
+ table<<=8; // Get sprite table address/2\r
+\r
+ for (;;)\r
+ {\r
+ unsigned short *sprite=NULL;\r
+ \r
+ spin[i]=(unsigned char)link;\r
+ sprite=Pico.vram+((table+(link<<2))&0x7ffc); // Find sprite\r
+\r
+ // Find next sprite\r
+ link=sprite[1]&0x7f;\r
+ if (link==0 || i>=79) break; // End of sprites\r
+ i++;\r
+ }\r
+\r
+ // Go through sprites backwards:\r
+ for ( ;i>=0; i--)\r
+ {\r
+ unsigned short *sprite=NULL;\r
+ int sy=0;\r
+ \r
+ sprite=Pico.vram+((table+(spin[i]<<2))&0x7ffc); // Find sprite\r
+\r
+ sy=(sprite[0]&0x1ff)-0x80; // Get Y coordinate\r
+\r
+ if (Scanline>=sy && Scanline<sy+32) DrawSprite(sy,sprite,high); // Possibly on this line\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+static void BackFill()\r
+{\r
+ unsigned int back=0;\r
+ unsigned int *pd=NULL,*end=NULL;\r
+\r
+ // Start with a blank scanline (background colour):\r
+ back=Pico.video.reg[7]&0x3f;\r
+ back=Pico.highpal[back];\r
+ back|=back<<16;\r
+\r
+ pd= (unsigned int *)(HighCol+32);\r
+ end=(unsigned int *)(HighCol+32+320);\r
+\r
+ do { pd[0]=pd[1]=pd[2]=pd[3]=back; pd+=4; } while (pd<end);\r
+}\r
+\r
+static int DrawDisplay()\r
+{\r
+ int win=0,edge=0,full=0;\r
+ int bhigh=1,ahigh=1,shigh=1;\r
+\r
+ // Find out if the window is on this line:\r
+ win=Pico.video.reg[0x12];\r
+ edge=(win&0x1f)<<3;\r
+\r
+ if (win&0x80) { if (Scanline>=edge) full=1; }\r
+ else { if (Scanline< edge) full=1; }\r
+\r
+ if (PicoMask&0x04) { DrawLayer(1,0); bhigh=WrongPri; }\r
+ if (PicoMask&0x08) { if (full) DrawWindow(0); else DrawLayer(0,0); ahigh=WrongPri; }\r
+ if (PicoMask&0x10) { DrawAllSprites(0); shigh=WrongPri; }\r
+ \r
+ if (bhigh) if (PicoMask&0x20) DrawLayer(1,1);\r
+ if (ahigh) if (PicoMask&0x40) { if (full) DrawWindow(1); else DrawLayer(0,1); }\r
+ if (shigh) if (PicoMask&0x80) DrawAllSprites(1);\r
+ return 0;\r
+}\r
+\r
+static int UpdatePalette()\r
+{\r
+ int c=0;\r
+\r
+ // Update palette:\r
+ for (c=0;c<64;c++) Pico.highpal[c]=(unsigned short)PicoCram(Pico.cram[c]);\r
+ Pico.m.dirtyPal=0;\r
+\r
+ return 0;\r
+}\r
+\r
+static int Overlay()\r
+{\r
+ int col=0,x=0;\r
+\r
+ if (PmovAction==0) return 0;\r
+ if (Scanline>=4) return 0;\r
+\r
+ if (PmovAction&1) col =0x00f;\r
+ if (PmovAction&2) col|=0x0f0;\r
+ col=PicoCram(col);\r
+\r
+ for (x=0;x<4;x++) HighCol[32+x]=(unsigned short)col;\r
+\r
+ return 0;\r
+}\r
+\r
+static int Skip=0;\r
+\r
+\r
+int PicoLine(int scan)\r
+{\r
+ if (Skip>0) { Skip--; return 0; } // Skip rendering lines\r
+\r
+ Scanline=scan;\r
+\r
+ if (Pico.m.dirtyPal) UpdatePalette();\r
+\r
+ // Draw screen:\r
+ if (PicoMask&0x02) BackFill();\r
+ if (Pico.video.reg[1]&0x40) DrawDisplay();\r
+\r
+ Overlay();\r
+\r
+ if (Pico.video.reg[12]&1)\r
+ {\r
+ Skip=PicoScan(Scanline,HighCol+32); // 40-column mode\r
+ }\r
+ else\r
+ {\r
+ // Crop, centre and return 32-column mode\r
+ memset(HighCol, 0,64); // Left border\r
+ memset(HighCol+288,0,64); // Right border\r
+ Skip=PicoScan(Scanline,HighCol);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
--- /dev/null
+cl /W4 MakeSine.cpp\r
+del MakeSine.obj\r
+MakeSine.exe > Sine.cpp\r
+del MakeSine.exe\r
--- /dev/null
+\r
+// Make a Sine table\r
+\r
+#pragma warning (disable:4514)\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <math.h>\r
+\r
+#define PI 3.14159265358979\r
+\r
+int main()\r
+{\r
+ int i=0;\r
+\r
+ printf ("\nshort Sine[0x100]=\n");\r
+ printf ("{\n");\r
+\r
+ for (i=0;i<0x100;i++)\r
+ {\r
+ double fAng,fPos;\r
+ int nPos;\r
+ if ((i&7)==0) printf (" ");\r
+ \r
+ fAng=(double)i/(double)0x100;\r
+ fAng*=2*PI;\r
+ fPos=sin(fAng)*(double)0x4000;\r
+ nPos=(int)fPos;\r
+ printf ("%+6d,",nPos);\r
+ \r
+ if ((i&7)==7) printf ("\n");\r
+ }\r
+\r
+ printf ("};\n");\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+# Makefile for GP32\r
+\r
+export CCBASE=D:/Devkitadv\r
+export CUSER=-DLITTLE_ENDIAN -DGP32 -W -Wall\r
+include $(CCBASE)/gp32.mk\r
+\r
+OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \\r
+ Sek.o Sine.o VideoPort.o ym2612.o ../Cyclone/Cyclone.o\r
+\r
+Pico.a: $(OBJS)\r
+ ar -rs $@ $(OBJS)\r
+\r
+\r
+Draw.o: Draw.cpp\r
+ gcc $(CFLAGS) -S $<\r
+ gcc $(CFLAGS) -c $<\r
--- /dev/null
+\r
+# Makefile for GP32 (Mr. Mirko's SDK)\r
+\r
+CC=arm-elf-gcc\r
+LD=arm-elf-gcc\r
+AS=arm-elf-as\r
+AR=arm-elf-ar\r
+\r
+INCLUDES=-I/gp32_MrMirko/lib.src/include\r
+CFLAGS=$(INCLUDES) -O3 -W -Wall\r
+\r
+CPPFLAGS=$(CFLAGS)\r
+\r
+OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \\r
+ Sek.o Sine.o VideoPort.o ym2612.o ../Cyclone/Cyclone.o\r
+\r
+Pico.a: $(OBJS)\r
+ $(AR) -rs $@ $(OBJS)\r
+\r
+VideoPort.o: VideoPort.cpp\r
+ $(CC) -c -O2 -W -Wall $<\r
+\r
+Draw.o: Draw.cpp\r
+ arm-elf-gcc $(CFLAGS) -S $<\r
+ arm-elf-gcc $(CFLAGS) -c $<\r
--- /dev/null
+\r
+# Makefile for Symbian\r
+\r
+INCL=\\r
+ -I "D:\Symbian\6.1\Series60\Epoc32\Include" \\r
+ -I "D:\Symbian\6.1\Series60\Epoc32\Include\libc"\r
+\r
+# ----------------------------- ARM Compiler -----------------------------\r
+BPATH=D:\Symbian\6.1\Shared\Epoc32\gcc\bin\r
+CPP=$(BPATH)\gcc\r
+AS =$(BPATH)\as\r
+AR =$(BPATH)\ar\r
+CFLAGS=-D__SYMBIAN32__ -D__GCC32__ $(INCL) -march=armv4t \\r
+ -Wall -Wno-ctor-dtor-privacy -O3 \\r
+ -mstructure-size-boundary=32 \\r
+ -fno-builtin\r
+\r
+OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \\r
+ Sek.o Sine.o VideoPort.o Utils.o Cyclone.o ym2612.o\r
+\r
+Pico.lib: $(OBJS)\r
+ $(AR) -rs $@ $(OBJS)\r
+ copy Pico.lib "\Symbian\6.1\Series60\Epoc32\Release\armi\urel\"\r
+ copy Pico.lib "\Symbian\6.1\Series60\Epoc32\Release\thumb\urel\"\r
+\r
+Cyclone.o: ../Cyclone/Cyclone.s\r
+ $(AS) -mthumb-interwork -o $@ ../Cyclone/Cyclone.s 2> nul\r
+\r
+Utils.o: Utils.cpp\r
+ @$(CPP) $(CFLAGS) -S $*.cpp\r
+ @$(CPP) $(CFLAGS) -c $*.cpp\r
+\r
+.cpp.o:\r
+ @$(CPP) $(CFLAGS) -c $*.cpp\r
+.c.o:\r
+ @$(CPP) $(CFLAGS) -c $*.c\r
+\r
+\r
+CLEANUP=*.o *.lib Draw.s\r
+clean :\r
+ for %i in ( $(CLEANUP) ) do if exist %i del %i\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+typedef unsigned char u8;\r
+typedef unsigned short u16;\r
+typedef unsigned int u32;\r
+\r
+static int PicoMemBase(u32 pc)\r
+{\r
+ int membase=0;\r
+\r
+ if (pc<Pico.romsize)\r
+ {\r
+ membase=(int)Pico.rom; // Program Counter in Rom\r
+ }\r
+ else if ((pc&0xe00000)==0xe00000)\r
+ {\r
+ membase=(int)Pico.ram-(pc&0xff0000); // Program Counter in Ram\r
+ }\r
+ else\r
+ {\r
+ // Error - Program Counter is invalid\r
+ membase=(int)Pico.rom;\r
+ }\r
+\r
+ return membase;\r
+}\r
+\r
+#ifdef EMU_A68K\r
+extern "C" u8 *OP_ROM=NULL,*OP_RAM=NULL;\r
+\r
+static void CPU_CALL PicoCheckPc(u32 pc)\r
+{\r
+ OP_ROM=(u8 *)PicoMemBase(pc);\r
+\r
+ // don't bother calling us back unless it's outside the 64k segment\r
+ M68000_regs.AsmBank=(pc>>16);\r
+}\r
+#endif\r
+\r
+#ifdef EMU_C68K\r
+static u32 PicoCheckPc(u32 pc)\r
+{\r
+ pc-=PicoCpu.membase; // Get real pc\r
+ pc&=0xffffff;\r
+\r
+ PicoCpu.membase=PicoMemBase(pc);\r
+\r
+ return PicoCpu.membase+pc;\r
+}\r
+#endif\r
+\r
+#ifdef EMU_NULL\r
+static u32 PicoCheckPc(u32) { return 0; }\r
+#endif\r
+\r
+\r
+int PicoInitPc(u32 pc)\r
+{\r
+ PicoCheckPc(pc);\r
+ return 0;\r
+}\r
+\r
+// -----------------------------------------------------------------\r
+static int PadRead(int i)\r
+{\r
+ int pad=0,value=0;\r
+ pad=~PicoPad[i]; // Get inverse of pad\r
+\r
+ if (Pico.m.padSelect[i]) value=0x40|(pad&0x3f); // 01CB RLDU\r
+ else value=((pad&0xc0)>>2)|(pad&3); // 00SA 00DU\r
+\r
+ return (value<<8)|value; // Mirror bytes\r
+}\r
+\r
+static u32 OtherRead16(u32 a)\r
+{\r
+ u32 d=0;\r
+\r
+ if ((a&0xffe000)==0xa00000)\r
+ {\r
+ // Z80 ram\r
+ d=*(u16 *)(Pico.zram+(a&0x1fff));\r
+\r
+ if (Pico.m.rotate&2) { d=(Pico.m.rotate>>2)&0xff; d|=d<<8; } // Fake z80\r
+ Pico.m.rotate++;\r
+\r
+ goto end;\r
+ }\r
+\r
+ if ((a&0xffe000)==0xa00000)\r
+ {\r
+ // Fake Z80 ram\r
+ d=((Pico.m.rotate++)>>2)&0xff; d|=d<<8;\r
+ goto end;\r
+ }\r
+ \r
+ if (a==0xa04000) { d=Pico.m.rotate&3; Pico.m.rotate++; goto end; } // Fudge\r
+ if (a==0xa10000) { d=Pico.m.hardware; goto end; } // Hardware value\r
+ if (a==0xa10002) { d=PadRead(0); goto end; }\r
+ if (a==0xa10004) { d=PadRead(1); goto end; }\r
+ if (a==0xa11100) { d=((Pico.m.rotate++)&4)<<6; goto end; } // Fudge z80 reset\r
+\r
+ if ((a&0xffffe0)==0xc00000) { d=PicoVideoRead(a); goto end; }\r
+\r
+end:\r
+ return d;\r
+}\r
+\r
+static void OtherWrite8(u32 a,u32 d)\r
+{\r
+ if ((a&0xffe000)==0xa00000) { Pico.zram[(a^1)&0x1fff]=(u8)d; return; } // Z80 ram\r
+ if ((a&0xfffffc)==0xa04000) { PsndFm(a,d); return; } // FM Sound\r
+\r
+ if (a==0xa11100) { Pico.m.z80Run=(u8)(d^1); return; }\r
+ if (a==0xa10003) { Pico.m.padSelect[0]=(u8)((d>>6)&1); return; } // Joypad 1 select\r
+ if (a==0xa10005) { Pico.m.padSelect[1]=(u8)((d>>6)&1); return; } // Joypad 2 select\r
+\r
+ if ((a&0xffffe0)==0xc00000) { PicoVideoWrite(a,d|(d<<8)); return; } // Byte access gets mirrored\r
+}\r
+\r
+static void OtherWrite16(u32 a,u32 d)\r
+{\r
+ if ((a&0xffffe0)==0xc00000) { PicoVideoWrite(a,d); return; }\r
+ if ((a&0xffe000)==0xa00000) { *(u16 *)(Pico.zram+(a&0x1ffe))=(u16)d; return; } // Z80 ram\r
+\r
+ OtherWrite8(a, d>>8);\r
+ OtherWrite8(a+1,d&0xff);\r
+}\r
+\r
+// -----------------------------------------------------------------\r
+// Read Rom and read Ram\r
+\r
+static u8 CPU_CALL PicoRead8(u32 a)\r
+{\r
+ u32 d=0;\r
+ a&=0xffffff;\r
+\r
+ if (a<Pico.romsize) return *(u8 *)(Pico.rom+(a^1)); // Rom\r
+ if ((a&0xe00000)==0xe00000) return *(u8 *)(Pico.ram+((a^1)&0xffff)); // Ram\r
+\r
+ d=OtherRead16(a&~1); if ((a&1)==0) d>>=8;\r
+ return (u8)d;\r
+}\r
+\r
+u16 CPU_CALL PicoRead16(u32 a)\r
+{\r
+ a&=0xfffffe;\r
+\r
+ if (a<Pico.romsize) { u16 *pm=(u16 *)(Pico.rom+a); return pm[0]; } // Rom\r
+ if ((a&0xe00000)==0xe00000) { u16 *pm=(u16 *)(Pico.ram+(a&0xffff)); return pm[0]; } // Ram\r
+\r
+ return (u16)OtherRead16(a);\r
+}\r
+\r
+u32 CPU_CALL PicoRead32(u32 a)\r
+{\r
+ a&=0xfffffe;\r
+\r
+ if (a<Pico.romsize) { u16 *pm=(u16 *)(Pico.rom+a); return (pm[0]<<16)|pm[1]; } // Rom\r
+ if ((a&0xe00000)==0xe00000) { u16 *pm=(u16 *)(Pico.ram+(a&0xffff)); return (pm[0]<<16)|pm[1]; } // Ram\r
+\r
+ return (OtherRead16(a)<<16)|OtherRead16(a+2);\r
+}\r
+\r
+// -----------------------------------------------------------------\r
+// Write Ram\r
+\r
+static void CPU_CALL PicoWrite8(u32 a,u8 d)\r
+{\r
+ if ((a&0xe00000)==0xe00000) { u8 *pm=(u8 *)(Pico.ram+((a^1)&0xffff)); pm[0]=d; return; } // Ram\r
+\r
+ a&=0xffffff;\r
+ OtherWrite8(a,d);\r
+}\r
+\r
+static void CPU_CALL PicoWrite16(u32 a,u16 d)\r
+{\r
+ if ((a&0xe00000)==0xe00000) { *(u16 *)(Pico.ram+(a&0xfffe))=d; return; } // Ram\r
+\r
+ a&=0xfffffe;\r
+ OtherWrite16(a,d);\r
+}\r
+\r
+static void CPU_CALL PicoWrite32(u32 a,u32 d)\r
+{\r
+ if ((a&0xe00000)==0xe00000)\r
+ {\r
+ // Ram:\r
+ u16 *pm=(u16 *)(Pico.ram+(a&0xfffe));\r
+ pm[0]=(u16)(d>>16); pm[1]=(u16)d;\r
+ return;\r
+ }\r
+\r
+ a&=0xfffffe;\r
+ OtherWrite16(a, (u16)(d>>16));\r
+ OtherWrite16(a+2,(u16)d);\r
+}\r
+\r
+\r
+// -----------------------------------------------------------------\r
+int PicoMemInit()\r
+{\r
+#ifdef EMU_C68K\r
+ // Setup memory callbacks:\r
+ PicoCpu.checkpc=PicoCheckPc;\r
+ PicoCpu.fetch8 =PicoCpu.read8 =PicoRead8;\r
+ PicoCpu.fetch16=PicoCpu.read16=PicoRead16;\r
+ PicoCpu.fetch32=PicoCpu.read32=PicoRead32;\r
+ PicoCpu.write8 =PicoWrite8;\r
+ PicoCpu.write16=PicoWrite16;\r
+ PicoCpu.write32=PicoWrite32;\r
+#endif\r
+ return 0;\r
+}\r
+\r
+#ifdef EMU_A68K\r
+struct A68KInter\r
+{\r
+ u32 unknown;\r
+ u8 (__fastcall *Read8) (u32 a);\r
+ u16 (__fastcall *Read16)(u32 a);\r
+ u32 (__fastcall *Read32)(u32 a);\r
+ void (__fastcall *Write8) (u32 a,u8 d);\r
+ void (__fastcall *Write16) (u32 a,u16 d);\r
+ void (__fastcall *Write32) (u32 a,u32 d);\r
+ void (__fastcall *ChangePc)(u32 a);\r
+ u8 (__fastcall *PcRel8) (u32 a);\r
+ u16 (__fastcall *PcRel16)(u32 a);\r
+ u32 (__fastcall *PcRel32)(u32 a);\r
+ u16 (__fastcall *Dir16)(u32 a);\r
+ u32 (__fastcall *Dir32)(u32 a);\r
+};\r
+\r
+extern "C" struct A68KInter a68k_memory_intf=\r
+{\r
+ 0,\r
+ PicoRead8,\r
+ PicoRead16,\r
+ PicoRead32,\r
+ PicoWrite8,\r
+ PicoWrite16,\r
+ PicoWrite32,\r
+ PicoCheckPc,\r
+ PicoRead8,\r
+ PicoRead16,\r
+ PicoRead32,\r
+ PicoRead16, // unused\r
+ PicoRead32, // unused\r
+};\r
+#endif\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+int PicoVer=0x0030;\r
+struct Pico Pico;\r
+int PicoOpt=0;\r
+\r
+int PicoPad[2]; // Joypads, format is SACB RLDU\r
+\r
+int PicoInit()\r
+{\r
+ // Blank space for state:\r
+ memset(&Pico,0,sizeof(Pico));\r
+ memset(&PicoPad,0,sizeof(PicoPad));\r
+ Pico.m.dirtyPal=1;\r
+\r
+ // Init CPU:\r
+ SekInit();\r
+\r
+ // Setup memory callbacks:\r
+ PicoMemInit();\r
+ PsndReset();\r
+\r
+#ifdef MSOUND\r
+ YM2612Init(1,7670443,PsndRate,NULL,NULL);\r
+#endif\r
+ return 0;\r
+}\r
+\r
+void PicoExit()\r
+{\r
+#ifdef MSOUND\r
+ YM2612Shutdown();\r
+#endif\r
+\r
+ memset(&Pico,0,sizeof(Pico));\r
+}\r
+\r
+int PicoReset()\r
+{\r
+ unsigned int region=0;\r
+ int support=0,hw=0,i=0;\r
+ unsigned char pal=0;\r
+\r
+ if (Pico.romsize<=0) return 1;\r
+\r
+ SekReset();\r
+ PsndReset();\r
+#ifdef MSOUND\r
+ YM2612ResetChip(0);\r
+#endif\r
+\r
+ // Read cartridge region data:\r
+ region=PicoRead32(0x1f0);\r
+\r
+ for (i=0;i<4;i++)\r
+ {\r
+ int c=0;\r
+ \r
+ c=region>>(i<<3); c&=0xff;\r
+ if (c<=' ') continue;\r
+\r
+ if (c=='J') support|=1;\r
+ else if (c=='U') support|=4;\r
+ else if (c=='E') support|=8;\r
+ else\r
+ {\r
+ // New style code:\r
+ char s[2]={0,0};\r
+ s[0]=(char)c;\r
+ support|=strtol(s,NULL,16);\r
+ }\r
+\r
+ }\r
+\r
+ // Try to pick the best hardware value for English/60hz:\r
+ if (support&4) hw=0x80; // USA\r
+ else if (support&8) { hw=0xc0; pal=1; } // Europe\r
+ else if (support&1) hw=0x00; // Japan NTSC\r
+ else if (support&2) { hw=0x40; pal=1; } // Japan PAL\r
+ else hw=0x80; // USA\r
+\r
+ Pico.m.hardware=(unsigned char)(hw|0x20); // No disk attached\r
+ Pico.m.pal=pal;\r
+\r
+ return 0;\r
+}\r
+\r
+static int CheckIdle()\r
+{\r
+ unsigned char state[0x88];\r
+\r
+ memset(state,0,sizeof(state));\r
+\r
+ // See if the state is the same after 2 steps:\r
+ SekState(state); SekRun(0); SekRun(0); SekState(state+0x44);\r
+ if (memcmp(state,state+0x44,0x44)==0) return 1;\r
+\r
+ return 0;\r
+}\r
+\r
+// Accurate but slower frame which does hints\r
+static int PicoFrameHints()\r
+{\r
+ struct PicoVideo *pv=&Pico.video;\r
+ int total=0,aim=0;\r
+ int y=0;\r
+ int hint=0x400; // Hint counter\r
+\r
+ pv->status|=0x08; // Go into vblank\r
+\r
+ for (y=-38;y<224;y++)\r
+ {\r
+ if (y==0)\r
+ {\r
+ hint=pv->reg[10]; // Load H-Int counter\r
+ if (pv->reg[1]&0x40) pv->status&=~8; // Come out of vblank if display enabled\r
+ }\r
+\r
+ // H-Interrupts:\r
+ if (hint<0)\r
+ {\r
+ hint=pv->reg[10]; // Reload H-Int counter\r
+ if (pv->reg[0]&0x10) SekInterrupt(4);\r
+ }\r
+\r
+ // V-Interrupt:\r
+ if (y==-37)\r
+ {\r
+ pv->status|=0x80; // V-Int happened\r
+ if (pv->reg[1]&0x20) SekInterrupt(6);\r
+ }\r
+\r
+ Pico.m.scanline=(short)y;\r
+\r
+ // Run scanline:\r
+ aim+=489; total+=SekRun(aim-total);\r
+\r
+ hint--;\r
+\r
+ if (PicoScan && y>=0) PicoLine(y);\r
+ }\r
+\r
+ SekInterrupt(0); // Cancel interrupt\r
+\r
+ return 0;\r
+}\r
+\r
+// Simple frame without H-Ints\r
+static int PicoFrameSimple()\r
+{\r
+ int total=0,y=0,aim=0;\r
+ \r
+ Pico.m.scanline=-64;\r
+\r
+ // V-Blanking period:\r
+ if (Pico.video.reg[1]&0x20) SekInterrupt(6); // Set IRQ\r
+ Pico.video.status|=0x88; // V-Int happened / go into vblank\r
+ total+=SekRun(18560);\r
+\r
+ // Active Scan:\r
+ if (Pico.video.reg[1]&0x40) Pico.video.status&=~8; // Come out of vblank if display is enabled\r
+ SekInterrupt(0); // Clear IRQ\r
+\r
+ // Run in sections:\r
+ for (aim=18560+6839; aim<=18560+6839*16; aim+=6839)\r
+ {\r
+ int add=0;\r
+ if (CheckIdle()) break;\r
+ add=SekRun(aim-total);\r
+ total+=add;\r
+ }\r
+\r
+ if (PicoMask&0x100)\r
+ if (PicoScan)\r
+ {\r
+ // Draw the screen\r
+ for (y=0;y<224;y++) PicoLine(y);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int PicoFrame()\r
+{\r
+ int hints=0;\r
+\r
+ if (Pico.rom==NULL) return 1; // No Rom plugged in\r
+\r
+\r
+ PmovUpdate();\r
+\r
+ hints=Pico.video.reg[0]&0x10;\r
+\r
+ if (hints) PicoFrameHints();\r
+ else PicoFrameSimple();\r
+\r
+ PsndRender();\r
+\r
+ return 0;\r
+}\r
+\r
+static int DefaultCram(int cram)\r
+{\r
+ int high=0x0841;\r
+ // Convert 0000bbbb ggggrrrr\r
+ // to rrrr1ggg g10bbbb1\r
+ high|=(cram&0x00f)<<12; // Red\r
+ high|=(cram&0x0f0)<< 3; // Green\r
+ high|=(cram&0xf00)>> 7; // Blue\r
+ return high;\r
+}\r
+\r
+// Function to convert Megadrive Cram into a native colour:\r
+int (*PicoCram)(int cram)=DefaultCram;\r
--- /dev/null
+# Microsoft Developer Studio Project File - Name="Pico" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
+\r
+CFG=Pico - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "Pico.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "Pico.mak" CFG="Pico - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "Pico - Win32 Release" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "Pico - Win32 Debug" (based on "Win32 (x86) Static Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "Pico - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c\r
+# ADD CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c\r
+# ADD BASE RSC /l 0x809 /d "NDEBUG"\r
+# ADD RSC /l 0x809 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c\r
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c\r
+# ADD BASE RSC /l 0x809 /d "_DEBUG"\r
+# ADD RSC /l 0x809 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "Pico - Win32 Release"\r
+# Name "Pico - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\Area.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Cart.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Draw.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\driver.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Memory.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Pico.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Psnd.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Sek.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Sine.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Utils.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\VideoPort.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\ym2612.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\a68k.obj\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\Pico.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\PicoInt.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Disassembler"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\Disa.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Disa.h\r
+# End Source File\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=..\bits.txt\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\GenaDrive\zout.txt\r
+# End Source File\r
+# End Target\r
+# End Project\r
--- /dev/null
+Microsoft Developer Studio Workspace File, Format Version 6.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "Pico"=.\Pico.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
--- /dev/null
+\r
+// -------------------- Pico Library --------------------\r
+\r
+// Pico Megadrive Emulator Library - Header File\r
+\r
+// This code is licensed under the GNU General Public License version 2.0 and the MAME License.\r
+// You can choose the license that has the most advantages for you.\r
+\r
+// SVN repository can be found at http://code.google.com/p/cyclone68000/\r
+\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+// Pico.cpp\r
+extern int PicoVer;\r
+extern int PicoOpt;\r
+int PicoInit();\r
+void PicoExit();\r
+int PicoReset();\r
+int PicoFrame();\r
+extern int PicoPad[2]; // Joypads, format is SACB RLDU\r
+extern int (*PicoCram)(int cram); // Callback to convert colour ram 0000bbb0 ggg0rrr0\r
+\r
+// Area.cpp\r
+struct PicoArea { void *data; int len; char *name; };\r
+extern int (*PicoAcb)(struct PicoArea *); // Area callback for each block of memory\r
+extern FILE *PmovFile;\r
+extern int PmovAction;\r
+// &1=for reading &2=for writing &4=volatile &8=non-volatile\r
+int PicoAreaScan(int action,int *pmin);\r
+// Save or load the state from PmovFile:\r
+int PmovState();\r
+int PmovUpdate();\r
+\r
+// Cart.cpp\r
+int PicoCartLoad(FILE *f,unsigned char **prom,unsigned int *psize);\r
+int PicoCartInsert(unsigned char *rom,unsigned int romsize);\r
+\r
+// Draw.cpp\r
+extern int (*PicoScan)(unsigned int num,unsigned short *data);\r
+extern int PicoMask; // Mask of which layers to draw\r
+\r
+// Sek.cpp\r
+extern char PicoStatus[];\r
+\r
+// Sound.cpp\r
+extern int PsndRate,PsndLen;\r
+extern short *PsndOut;\r
+extern unsigned char PicoSreg[];\r
+\r
+// Utils.cpp\r
+extern int PicuAnd;\r
+int PicuQuick(unsigned short *dest,unsigned short *src);\r
+int PicuShrink(unsigned short *dest,int destLen,unsigned short *src,int srcLen);\r
+int PicuMerge(unsigned short *dest,int destLen,unsigned short *src,int srcLen);\r
+\r
+#ifdef __cplusplus\r
+} // End of extern "C"\r
+#endif\r
--- /dev/null
+# Microsoft eMbedded Visual Tools Project File - Name="Pico" - Package Owner=<4>\r
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304\r
+# TARGTYPE "Win32 (WCE x86em) Static Library" 0x7f04\r
+# TARGTYPE "Win32 (WCE ARM) Static Library" 0x8504\r
+\r
+CFG=Pico - Win32 (WCE ARM) Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "Pico.vcn".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "Pico.vcn" CFG="Pico - Win32 (WCE ARM) Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "Pico - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Static Library")\r
+!MESSAGE "Pico - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Static Library")\r
+!MESSAGE "Pico - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")\r
+!MESSAGE "Pico - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")\r
+!MESSAGE "Pico - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Static Library")\r
+!MESSAGE "Pico - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Static Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+# PROP ATL_Project 2\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "ARMRel"\r
+# PROP BASE Intermediate_Dir "ARMRel"\r
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "ARMRel"\r
+# PROP Intermediate_Dir "ARMRel"\r
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=clarm.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "ARMDbg"\r
+# PROP BASE Intermediate_Dir "ARMDbg"\r
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "ARMDbg"\r
+# PROP Intermediate_Dir "ARMDbg"\r
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=clarm.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "X86Rel"\r
+# PROP BASE Intermediate_Dir "X86Rel"\r
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "X86Rel"\r
+# PROP Intermediate_Dir "X86Rel"\r
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /Oxs /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /Oxs /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "X86Dbg"\r
+# PROP BASE Intermediate_Dir "X86Dbg"\r
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "X86Dbg"\r
+# PROP Intermediate_Dir "X86Dbg"\r
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "X86EMRel"\r
+# PROP BASE Intermediate_Dir "X86EMRel"\r
+# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "X86EMRel"\r
+# PROP Intermediate_Dir "X86EMRel"\r
+# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Oxs /Gz /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Oxs /Gz /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "X86EMDbg"\r
+# PROP BASE Intermediate_Dir "X86EMDbg"\r
+# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "X86EMDbg"\r
+# PROP Intermediate_Dir "X86EMDbg"\r
+# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Target_Dir ""\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gz /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gz /c\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "Pico - Win32 (WCE ARM) Release"\r
+# Name "Pico - Win32 (WCE ARM) Debug"\r
+# Name "Pico - Win32 (WCE x86) Release"\r
+# Name "Pico - Win32 (WCE x86) Debug"\r
+# Name "Pico - Win32 (WCE x86em) Release"\r
+# Name "Pico - Win32 (WCE x86em) Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\Area.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_AREA_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Cart.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+NODEP_CPP_CART_=\\r
+ "..\Cyclone\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_CART_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Draw.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+NODEP_CPP_DRAW_=\\r
+ "..\Cyclone\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_DRAW_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Memory.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+NODEP_CPP_MEMOR=\\r
+ "..\Cyclone\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_MEMOR=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Pico.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_PICO_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Profile.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_PROFI=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Psnd.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_PSND_=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Sek.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+NODEP_CPP_SEK_C=\\r
+ "..\Cyclone\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_SEK_C=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Sine.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Utils.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_UTILS=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\VideoPort.cpp\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ \r
+NODEP_CPP_VIDEO=\\r
+ "..\Cyclone\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_VIDEO=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ ".\Disa.h"\\r
+ ".\Pico.h"\\r
+ ".\PicoInt.h"\\r
+ ".\ym2612.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\ym2612.c\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_YM261=\\r
+ ".\driver.h"\\r
+ ".\ym2612.h"\\r
+ \r
+NODEP_CPP_YM261=\\r
+ ".\deftypes.h"\\r
+ ".\support.h"\\r
+ \r
+# ADD CPP /W3\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\Pico.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\PicoInt.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Cyclone"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\Cyclone\Cyclone.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\Cyclone\Cyclone.obj\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Group\r
+# Begin Group "Dasm"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\Disa.c\r
+\r
+!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_DISA_=\\r
+ ".\Disa.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Disa.h\r
+# End Source File\r
+# End Group\r
+# Begin Source File\r
+\r
+SOURCE=..\bits.txt\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\PicoDrive\PicoDrive.txt\r
+# End Source File\r
+# End Target\r
+# End Project\r
--- /dev/null
+Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "Pico"=.\Pico.vcp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
--- /dev/null
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include "Pico.h"\r
+\r
+#if defined(__GNUC__) || defined(_WIN32_WCE)\r
+#define EMU_C68K // Use the Cyclone 68000 emulator\r
+#else\r
+#define EMU_A68K // Use the 'A68K' (Make68K) Assembler 68000 emulator\r
+#endif\r
+\r
+//#define MSOUND\r
+\r
+// Disa.h also defines CPU_CALL to be fastcall or normal call\r
+#include "Disa.h"\r
+\r
+\r
+// ----------------------- 68000 CPU -----------------------\r
+#ifdef EMU_A68K\r
+// The format of the data in a68k.asm (at the _M68000_regs location)\r
+struct A68KContext\r
+{\r
+ unsigned int d[8],a[8];\r
+ unsigned int isp,srh,ccr,xc,pc,irq,sr;\r
+ int (*IrqCallback) (int nIrq);\r
+ unsigned int ppc;\r
+ void *pResetCallback;\r
+ unsigned int sfc,dfc,usp,vbr;\r
+ unsigned int AsmBank,CpuVersion;\r
+};\r
+extern "C" struct A68KContext M68000_regs;\r
+#endif\r
+\r
+#ifdef EMU_C68K\r
+#include "../Cyclone/Cyclone.h"\r
+extern struct Cyclone PicoCpu;\r
+#endif\r
+\r
+#ifdef MSOUND\r
+extern "C" {\r
+#include "ym2612.h"\r
+}\r
+#endif\r
+\r
+// ---------------------------------------------------------\r
+\r
+struct PicoVideo\r
+{\r
+ unsigned char reg[0x20];\r
+ unsigned int command; // 32-bit Command\r
+ unsigned char pending; // 1 if waiting for second half of 32-bit command\r
+ unsigned char type; // Command type (v/c/vsram read/write)\r
+ unsigned short addr; // Read/Write address\r
+ int status; // Status bits\r
+ unsigned char pad[0x14];\r
+};\r
+\r
+struct PicoMisc\r
+{\r
+ unsigned char rotate;\r
+ unsigned char z80Run;\r
+ unsigned char padSelect[2]; // Select high or low bit from joypad\r
+ short scanline; // -38 to 223\r
+ char dirtyPal; // Is the palette dirty\r
+ unsigned char hardware; // Hardware value for country\r
+ unsigned char pal; // 1=PAL 0=NTSC\r
+ unsigned char pad[0x16];\r
+};\r
+\r
+struct PicoSound\r
+{\r
+ unsigned char fmsel[2]; // FM selected register\r
+ unsigned char reg[0x100];\r
+ unsigned char pad[0x3e];\r
+};\r
+\r
+struct Pico\r
+{\r
+ unsigned char ram[0x10000]; // scratch ram\r
+ unsigned short vram[0x8000];\r
+ unsigned char zram[0x2000]; // Z80 ram\r
+ unsigned int highpal[0x40];\r
+ unsigned short cram[0x40];\r
+ unsigned short vsram[0x40];\r
+\r
+ unsigned char *rom;\r
+ unsigned int romsize;\r
+\r
+ struct PicoMisc m;\r
+ struct PicoVideo video;\r
+ struct PicoSound s;\r
+};\r
+\r
+// Draw.cpp\r
+int PicoLine(int scan);\r
+\r
+// Draw2.cpp\r
+int PicoDraw2();\r
+\r
+// Memory.cpp\r
+int PicoInitPc(unsigned int pc);\r
+unsigned short CPU_CALL PicoRead16(unsigned int a);\r
+unsigned int CPU_CALL PicoRead32(unsigned int a);\r
+int PicoMemInit();\r
+void PicoDasm(int start,int len);\r
+\r
+// Pico.cpp\r
+extern struct Pico Pico;\r
+\r
+// Sek.cpp\r
+int SekInit();\r
+int SekReset();\r
+int SekRun(int cyc);\r
+int SekInterrupt(int irq);\r
+int SekPc();\r
+void SekState(unsigned char *data);\r
+\r
+// Sine.cpp\r
+extern short Sine[];\r
+\r
+// Psnd.cpp\r
+int PsndReset();\r
+int PsndFm(int a,int d);\r
+int PsndRender();\r
+\r
+// VideoPort.cpp\r
+void PicoVideoWrite(unsigned int a,unsigned int d);\r
+unsigned int PicoVideoRead(unsigned int a);\r
+\r
+// External:\r
+extern "C" int dprintf(char *Format, ...);\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+#ifdef _WIN32_WCE\r
+\r
+#pragma warning(disable:4514)\r
+#pragma warning(push)\r
+#pragma warning(disable:4201)\r
+#include <windows.h>\r
+#pragma warning(pop)\r
+\r
+static float Period=0.0f;\r
+static LARGE_INTEGER TimeStart={0,0};\r
+\r
+int ProfileInit()\r
+{\r
+ LARGE_INTEGER freq={0,0};\r
+\r
+ QueryPerformanceFrequency(&freq);\r
+\r
+ Period =(float)freq.HighPart*4294967296.0f;\r
+ Period+=(float)freq.LowPart;\r
+\r
+ if (Period>=1.0f) Period=1.0f/Period;\r
+ return 0;\r
+}\r
+\r
+int ProfileStart()\r
+{\r
+ QueryPerformanceCounter(&TimeStart);\r
+\r
+ return 0;\r
+}\r
+\r
+float ProfileTime()\r
+{\r
+ LARGE_INTEGER end={0,0};\r
+ int ticks=0;\r
+ float seconds=0.0f;\r
+\r
+ QueryPerformanceCounter(&end);\r
+\r
+ ticks=end.LowPart-TimeStart.LowPart;\r
+ seconds=(float)ticks*Period;\r
+\r
+ return seconds;\r
+}\r
+\r
+#endif\r
+\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+#ifdef MSOUND\r
+extern "C"\r
+{\r
+int YM2612UpdateReq(int) { return 0; }\r
+void *errorlog=NULL;\r
+}\r
+#endif\r
+\r
+int PsndRate=0,PsndLen=0;\r
+short *PsndOut=NULL;\r
+\r
+// An operator is a single sine wave generator\r
+struct Operator\r
+{\r
+ unsigned short angle; // 0-0xffff\r
+ unsigned short freq; // Converted frequency\r
+ unsigned char key;\r
+ unsigned char state; // 1=attack, 2=decay, 3=sustain, 4=release\r
+ int vol;\r
+ int delta; // Change in volume per sample\r
+ int limit; // Next volume limit\r
+};\r
+\r
+struct Channel\r
+{\r
+ struct Operator op[4]; // 4 operators for the channel\r
+ unsigned short note; // Written to 0xa4 and 0xa0\r
+};\r
+\r
+static struct Channel Chan[8];\r
+\r
+unsigned char PicoSreg[0x200];\r
+\r
+static int WriteReg(int side,int a,int d)\r
+{\r
+ struct Channel *pc=NULL;\r
+\r
+ PicoSreg[(side<<8)|a]=(unsigned char)d;\r
+\r
+ if (a==0x28)\r
+ {\r
+ pc=Chan+(d&7);\r
+ // Key On/Key Off\r
+ if (d&0xf0) pc->op[0].state=1; // Attack\r
+ else pc->op[0].state=4; // Release\r
+\r
+ return 0;\r
+ }\r
+\r
+ // Find channel:\r
+ pc=Chan+(a&3); if (side) pc+=4;\r
+\r
+ if ((a&0xf0)==0xa0)\r
+ {\r
+ int n=0,f=0,mult=2455;\r
+\r
+ if (PsndRate>0) mult=44100*2455/PsndRate;\r
+\r
+ if (a&4) pc->note =(unsigned short)(d<<8);\r
+ else pc->note|=d;\r
+\r
+ // Convert to an actual frequency:\r
+ n=pc->note; f=(n&0x7ff)<<((n>>11)&7);\r
+\r
+ pc->op[0].freq=(unsigned short)((f*mult)>>16);\r
+ return 0;\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int PsndReset()\r
+{\r
+ int i=0;\r
+ memset(&Chan,0,sizeof(Chan));\r
+ memset(PicoSreg,0,sizeof(PicoSreg));\r
+\r
+// Change Sine wave into a square wave\r
+ for (i=0x00; i<0x080; i++) Sine[i]= 0x2000;\r
+ for (i=0x80; i<0x100; i++) Sine[i]=-0x2000;\r
+\r
+ return 0;\r
+}\r
+\r
+int PsndFm(int a,int d)\r
+{\r
+ int side=0;\r
+\r
+#ifdef MSOUND\r
+ YM2612Write(0,a&3,(unsigned char)d);\r
+#endif\r
+\r
+ a&=3; side=a>>1; // Which side: channels 0-2 or 3-5\r
+\r
+ if (a&1) WriteReg(side,Pico.s.fmsel[side],d); // Write register\r
+ else Pico.s.fmsel[side]=(unsigned char)d; // Select register\r
+\r
+ return 0;\r
+}\r
+\r
+static void BlankSound(short *dest,int len)\r
+{\r
+ short *end=NULL;\r
+\r
+ end=dest+(len<<1);\r
+\r
+ // Init sound to silence:\r
+ do { *dest=0; dest++; } while (dest<end);\r
+}\r
+\r
+// Add to output and clip:\r
+static inline void AddClip(short *targ,int d)\r
+{\r
+ int total=*targ+d;\r
+ if ((total+0x8000)&0xffff0000)\r
+ {\r
+ if (total>0) total=0x7fff; else total=-0x8000;\r
+ }\r
+ *targ=(short)total;\r
+}\r
+\r
+static void OpNewState(int c)\r
+{\r
+ struct Operator *op=Chan[c].op;\r
+ int off=0;\r
+\r
+ off=((c&4)<<6)|(c&3);\r
+\r
+ switch (op->state)\r
+ {\r
+ case 1:\r
+ {\r
+ // Attack:\r
+ int ar=PicoSreg[0x50|off];\r
+ ar&=0x1f; if (ar) ar+=0x10;\r
+ op->delta=ar<<7; op->limit=0x1000000; break;\r
+ }\r
+ case 2:\r
+ {\r
+ // Decay:\r
+ int d1r=PicoSreg[0x60|off];\r
+ d1r&=0x1f; if (d1r) d1r+=0x10;\r
+ op->delta=-(d1r<<5); op->limit=0;\r
+ }\r
+ break;\r
+ case 3:\r
+ {\r
+ // Sustain:\r
+ int d2r=0,rr=0;\r
+ \r
+ d2r=PicoSreg[0x70|off];\r
+ d2r&=0x1f; if (d2r) d2r+=0x10;\r
+ rr =PicoSreg[0x80|off];\r
+ rr>>=4;\r
+\r
+ op->delta=-(d2r<<5); op->limit=rr<<20;\r
+ }\r
+ break;\r
+ case 4:\r
+ // Release:\r
+ int rr=PicoSreg[0x80|off];\r
+ rr&=0x0f; rr<<=1; rr+=0x10;\r
+ op->delta=-(rr<<5); op->limit=0;\r
+ break;\r
+ }\r
+}\r
+\r
+// Merely adding this code in seems to bugger up the N-Gage???\r
+static void UpdateOp(int c)\r
+{\r
+ struct Operator *op=Chan[c].op;\r
+\r
+ op->angle=(unsigned short)(op->angle+op->freq);\r
+ op->vol+=op->delta;\r
+\r
+ switch (op->state)\r
+ {\r
+ case 1:\r
+ if (op->vol>=op->limit) { op->vol=op->limit; op->state++; OpNewState(c); }\r
+ break;\r
+ case 2: case 3: // Decay/Sustain\r
+ if (op->vol< op->limit) { op->vol=op->limit; op->state++; OpNewState(c); }\r
+ break;\r
+ case 4:\r
+ if (op->vol< op->limit) { op->vol=op->limit; }\r
+ break;\r
+ }\r
+}\r
+\r
+static void AddChannel(int c,short *dest,int len)\r
+{\r
+ struct Channel *pc=Chan+c;\r
+ struct Operator *op=pc->op;\r
+ short *end=NULL;\r
+\r
+ // Work out volume delta for this operator:\r
+ OpNewState(c);\r
+\r
+ end=dest+len;\r
+ do\r
+ {\r
+ int d=0;\r
+ d=Sine[(op->angle>>8)&0xff]>>2;\r
+\r
+ d*=(op->vol>>8); d>>=16;\r
+\r
+ // Add to output:\r
+ AddClip(dest,d);\r
+ UpdateOp(c);\r
+\r
+ dest++;\r
+ }\r
+ while (dest<end);\r
+}\r
+\r
+int PsndRender()\r
+{\r
+ int i=0;\r
+\r
+ if (PsndOut==NULL) return 1; // Not rendering sound\r
+\r
+#ifdef MSOUND\r
+ if (PicoOpt&1)\r
+ {\r
+ short *wave[2]={NULL,NULL};\r
+ wave[0]=PsndOut;\r
+ wave[1]=PsndOut+PsndLen;\r
+ YM2612UpdateOne(0,wave,PsndLen);\r
+ }\r
+#endif\r
+\r
+ if ((PicoOpt&1)==0)\r
+ {\r
+ BlankSound(PsndOut,PsndLen);\r
+ for (i=0;i<7;i++)\r
+ {\r
+ if (i!=3) AddChannel(i,PsndOut,PsndLen);\r
+ }\r
+ }\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+char PicoStatus[128]=""; // 68000 state for debug\r
+\r
+#ifdef EMU_C68K\r
+// ---------------------- Cyclone 68000 ----------------------\r
+\r
+struct Cyclone PicoCpu;\r
+\r
+int SekInit()\r
+{\r
+ memset(&PicoCpu,0,sizeof(PicoCpu));\r
+ return 0;\r
+}\r
+\r
+// Reset the 68000:\r
+int SekReset()\r
+{\r
+ if (Pico.rom==NULL) return 1;\r
+\r
+ PicoCpu.srh =0x27; // Supervisor mode\r
+ PicoCpu.a[7]=PicoCpu.read32(0); // Stack Pointer\r
+ PicoCpu.membase=0;\r
+ PicoCpu.pc=PicoCpu.checkpc(PicoCpu.read32(4)); // Program Counter\r
+\r
+ return 0;\r
+}\r
+\r
+\r
+// Run the 68000 for 'cyc' number of cycles and return the number of cycles actually executed\r
+static inline int DoRun(int cyc)\r
+{\r
+ PicoCpu.cycles=cyc;\r
+ CycloneRun(&PicoCpu);\r
+ return cyc-PicoCpu.cycles;\r
+}\r
+\r
+int SekInterrupt(int irq)\r
+{\r
+ PicoCpu.irq=(unsigned char)irq;\r
+ return 0;\r
+}\r
+\r
+int SekPc() { return PicoCpu.pc-PicoCpu.membase; }\r
+\r
+void SekState(unsigned char *data)\r
+{\r
+ memcpy(data,PicoCpu.d,0x44);\r
+}\r
+\r
+#endif\r
+\r
+#ifdef EMU_A68K\r
+// ---------------------- A68K ----------------------\r
+\r
+extern "C" void __cdecl M68000_RUN();\r
+extern "C" void __cdecl M68000_RESET();\r
+extern "C" int m68k_ICount=0;\r
+extern "C" unsigned int mem_amask=0xffffff; // 24-bit bus\r
+extern "C" unsigned int mame_debug=0,cur_mrhard=0,m68k_illegal_opcode=0,illegal_op=0,illegal_pc=0,opcode_entry=0; // filler\r
+\r
+static int IrqCallback(int) { return -1; }\r
+static int DoReset() { return 0; }\r
+static int (*ResetCallback)()=DoReset;\r
+\r
+int SekInit()\r
+{\r
+ memset(&M68000_regs,0,sizeof(M68000_regs));\r
+ M68000_regs.IrqCallback=IrqCallback;\r
+ M68000_regs.pResetCallback=ResetCallback;\r
+ M68000_RESET(); // Init cpu emulator\r
+ return 0;\r
+}\r
+\r
+int SekReset()\r
+{\r
+ // Reset CPU: fetch SP and PC\r
+ M68000_regs.srh=0x27; // Supervisor mode\r
+ M68000_regs.a[7]=PicoRead32(0);\r
+ M68000_regs.pc =PicoRead32(4);\r
+ PicoInitPc(M68000_regs.pc);\r
+\r
+ return 0;\r
+}\r
+\r
+static inline int DoRun(int cyc)\r
+{\r
+ m68k_ICount=cyc;\r
+ M68000_RUN();\r
+ return cyc-m68k_ICount;\r
+}\r
+\r
+int SekInterrupt(int irq)\r
+{\r
+ M68000_regs.irq=irq; // raise irq (gets lowered after taken)\r
+ return 0;\r
+}\r
+\r
+int SekPc() { return M68000_regs.pc; }\r
+\r
+void SekState(unsigned char *data)\r
+{\r
+ memcpy(data, M68000_regs.d, 0x40);\r
+ memcpy(data+0x40,&M68000_regs.pc,0x04);\r
+}\r
+\r
+#endif\r
+\r
+#ifdef EMU_NULL\r
+// -----------------------------------------------------------\r
+int SekInit() { return 0; }\r
+int SekReset() { return 0; }\r
+static inline int DoRun(int cyc) { return cyc; }\r
+int SekInterrupt(int) { return 0; }\r
+\r
+int SekPc()\r
+{\r
+ return 0;\r
+}\r
+\r
+void SekState(unsigned char *) { }\r
+\r
+#endif\r
+\r
+int SekRun(int cyc)\r
+{\r
+ int did=0;\r
+\r
+ did=DoRun(cyc);\r
+\r
+ return did;\r
+}\r
--- /dev/null
+\r
+short Sine[0x100]=\r
+{\r
+ +0, +402, +803, +1205, +1605, +2005, +2404, +2801,\r
+ +3196, +3589, +3980, +4369, +4756, +5139, +5519, +5896,\r
+ +6269, +6639, +7005, +7366, +7723, +8075, +8423, +8765,\r
+ +9102, +9434, +9759,+10079,+10393,+10701,+11002,+11297,\r
+ +11585,+11866,+12139,+12406,+12665,+12916,+13159,+13395,\r
+ +13622,+13842,+14053,+14255,+14449,+14634,+14810,+14978,\r
+ +15136,+15286,+15426,+15557,+15678,+15790,+15892,+15985,\r
+ +16069,+16142,+16206,+16260,+16305,+16339,+16364,+16379,\r
+ +16384,+16379,+16364,+16339,+16305,+16260,+16206,+16142,\r
+ +16069,+15985,+15892,+15790,+15678,+15557,+15426,+15286,\r
+ +15136,+14978,+14810,+14634,+14449,+14255,+14053,+13842,\r
+ +13622,+13395,+13159,+12916,+12665,+12406,+12139,+11866,\r
+ +11585,+11297,+11002,+10701,+10393,+10079, +9759, +9434,\r
+ +9102, +8765, +8423, +8075, +7723, +7366, +7005, +6639,\r
+ +6269, +5896, +5519, +5139, +4756, +4369, +3980, +3589,\r
+ +3196, +2801, +2404, +2005, +1605, +1205, +803, +402,\r
+ +0, -402, -803, -1205, -1605, -2005, -2404, -2801,\r
+ -3196, -3589, -3980, -4369, -4756, -5139, -5519, -5896,\r
+ -6269, -6639, -7005, -7366, -7723, -8075, -8423, -8765,\r
+ -9102, -9434, -9759,-10079,-10393,-10701,-11002,-11297,\r
+ -11585,-11866,-12139,-12406,-12665,-12916,-13159,-13395,\r
+ -13622,-13842,-14053,-14255,-14449,-14634,-14810,-14978,\r
+ -15136,-15286,-15426,-15557,-15678,-15790,-15892,-15985,\r
+ -16069,-16142,-16206,-16260,-16305,-16339,-16364,-16379,\r
+ -16384,-16379,-16364,-16339,-16305,-16260,-16206,-16142,\r
+ -16069,-15985,-15892,-15790,-15678,-15557,-15426,-15286,\r
+ -15136,-14978,-14810,-14634,-14449,-14255,-14053,-13842,\r
+ -13622,-13395,-13159,-12916,-12665,-12406,-12139,-11866,\r
+ -11585,-11297,-11002,-10701,-10393,-10079, -9759, -9434,\r
+ -9102, -8765, -8423, -8075, -7723, -7366, -7005, -6639,\r
+ -6269, -5896, -5519, -5139, -4756, -4369, -3980, -3589,\r
+ -3196, -2801, -2404, -2005, -1605, -1205, -803, -402,\r
+};\r
--- /dev/null
+nmake -f Makefile.symb clean\r
+rd /s /q D:\Symbian\6.1\Series60\Epoc32\BUILD\r
--- /dev/null
+nmake -f Makefile.symb\r
+pause\r
+if errorlevel 1 pause\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+int PicuAnd=0xf7de;\r
+\r
+// Quick low-quality conversion of 320 to 176:\r
+int PicuQuick(unsigned short *dest,unsigned short *src)\r
+{\r
+ unsigned short *end=NULL;\r
+\r
+ src+=13; end=src+290;\r
+ dest++;\r
+\r
+ do\r
+ {\r
+ *dest++=*src++;\r
+ *dest++=*src; src+=2;\r
+ *dest++=*src; src+=2;\r
+ *dest++=*src++;\r
+ *dest++=*src; src+=2;\r
+ *dest++=*src; src+=2;\r
+ }\r
+ while (src<end);\r
+\r
+ return 0;\r
+}\r
+\r
+// Shrink the pixels in src/srcLen, to the screen line pointed to by dest/destLen\r
+int PicuShrink(unsigned short *dest,int destLen,unsigned short *src,int srcLen)\r
+{\r
+ unsigned short *end=NULL;\r
+ int bias=0,pa=0,sub=0;\r
+\r
+ end=dest+destLen;\r
+ sub=srcLen-destLen;\r
+\r
+ do\r
+ {\r
+ pa=*src++; bias-=sub;\r
+ if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; }\r
+ *dest++=(unsigned short)pa;\r
+\r
+ pa=*src++; bias-=sub;\r
+ if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; }\r
+ *dest++=(unsigned short)pa;\r
+ }\r
+ while (dest<end);\r
+ \r
+ return 0;\r
+}\r
+\r
+int PicuMerge(unsigned short *dest,int destLen,unsigned short *src,int srcLen)\r
+{\r
+ unsigned short *end=NULL;\r
+ int bias=0,pa=0,mask=PicuAnd,sub=0;\r
+\r
+ end=dest+destLen;\r
+ sub=srcLen-destLen;\r
+\r
+ do\r
+ {\r
+ pa=*src++; bias-=sub;\r
+ if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; }\r
+ pa&=mask; pa+=(*dest)&mask; pa>>=1;\r
+ *dest++=(unsigned short)pa;\r
+\r
+ pa=*src++; bias-=sub;\r
+ if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; }\r
+ pa&=mask; pa+=(*dest)&mask; pa>>=1;\r
+ *dest++=(unsigned short)pa;\r
+ }\r
+ while (dest<end);\r
+ \r
+ return 0;\r
+}\r
+\r
--- /dev/null
+\r
+#include "PicoInt.h"\r
+\r
+static inline void AutoIncrement()\r
+{\r
+ Pico.video.addr=(unsigned short)(Pico.video.addr+Pico.video.reg[0xf]);\r
+}\r
+\r
+static void VideoWrite(unsigned int d)\r
+{\r
+ unsigned int a=0;\r
+ unsigned short sd=(unsigned short)d;\r
+\r
+ a=Pico.video.addr;\r
+ if (a&1) d=((d<<8)&0xff00)|(d>>8); // If address is odd, bytes are swapped\r
+ a>>=1;\r
+\r
+ switch (Pico.video.type)\r
+ {\r
+ case 1: Pico.vram [a&0x7fff]=sd; break;\r
+ case 3: Pico.cram [a&0x003f]=sd; Pico.m.dirtyPal=1; break;\r
+ case 5: Pico.vsram[a&0x003f]=sd; break;\r
+ }\r
+ \r
+ AutoIncrement();\r
+}\r
+\r
+static unsigned int VideoRead()\r
+{\r
+ unsigned int a=0,d=0;\r
+\r
+ a=Pico.video.addr; a>>=1;\r
+\r
+ switch (Pico.video.type)\r
+ {\r
+ case 0: d=Pico.vram [a&0x7fff]; break;\r
+ case 8: d=Pico.cram [a&0x003f]; break;\r
+ case 4: d=Pico.vsram[a&0x003f]; break;\r
+ }\r
+ \r
+ AutoIncrement();\r
+ return d;\r
+}\r
+\r
+static int GetDmaSource()\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ int source=0;\r
+ source =pvid->reg[0x15]<<1;\r
+ source|=pvid->reg[0x16]<<9;\r
+ source|=pvid->reg[0x17]<<17;\r
+ return source;\r
+}\r
+\r
+static int GetDmaLength()\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ int len=0;\r
+ // 16-bit words to transfer:\r
+ len =pvid->reg[0x13];\r
+ len|=pvid->reg[0x14]<<8;\r
+ return len;\r
+}\r
+\r
+static void DmaSlow(int source,int len)\r
+{\r
+ int i=0,max=0;\r
+\r
+ if (source>=0x800000 && source<0xe00000) return; // Invalid source address\r
+\r
+ /// Clip Cram DMA size (Todds Adventures in Slime World):\r
+ if (Pico.video.type==3) { max=0x80-Pico.video.addr; if (len>max) len=max; }\r
+\r
+ for (i=0;i<len;i++)\r
+ {\r
+ VideoWrite(PicoRead16(source));\r
+ source+=2;\r
+ }\r
+}\r
+\r
+static void DmaCopy(int source,int len)\r
+{\r
+ int i=0;\r
+\r
+ len>>=1; // Length specifies number of bytes\r
+\r
+ for (i=0;i<len;i++)\r
+ {\r
+ VideoWrite(Pico.vram[source&0x7fff]);\r
+ source+=2;\r
+ }\r
+}\r
+\r
+static void DmaFill(int data)\r
+{\r
+ int len=0,i=0;\r
+ \r
+ len=GetDmaLength();\r
+\r
+ for (i=0;i<len+1;i++) VideoWrite(data);\r
+}\r
+\r
+static void CommandDma()\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ int len=0,method=0,source=0;\r
+\r
+ if ((pvid->reg[1]&0x10)==0) return; // DMA not enabled\r
+\r
+ len=GetDmaLength();\r
+\r
+ method=pvid->reg[0x17]>>6;\r
+ source=GetDmaSource();\r
+ if (method< 2) DmaSlow(source,len); // 68000 to VDP\r
+ if (method==3) DmaCopy(source,len); // VRAM Copy\r
+}\r
+\r
+static void CommandChange()\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+ unsigned int cmd=0,addr=0;\r
+\r
+ cmd=pvid->command;\r
+\r
+ // Get type of transfer 0xc0000030 (v/c/vsram read/write)\r
+ pvid->type=(unsigned char)(((cmd>>2)&0xc)|(cmd>>30));\r
+\r
+ // Get address 0x3fff0003\r
+ addr =(cmd>>16)&0x3fff;\r
+ addr|=(cmd<<14)&0xc000;\r
+ pvid->addr=(unsigned short)addr;\r
+\r
+ // Check for dma:\r
+ if (cmd&0x80) CommandDma();\r
+}\r
+\r
+void PicoVideoWrite(unsigned int a,unsigned int d)\r
+{\r
+ struct PicoVideo *pvid=&Pico.video;\r
+\r
+ a&=0x1c;\r
+ d=(unsigned short)d;\r
+\r
+ if (a==0x00) // Data port 0 or 2\r
+ { \r
+ if (pvid->pending) CommandChange();\r
+ pvid->pending=0;\r
+\r
+ // If a DMA fill has been set up, do it\r
+ if ((pvid->command&0x80) && (pvid->reg[1]&0x10) && (pvid->reg[0x17]>>6)==2)\r
+ {\r
+ DmaFill(d);\r
+ }\r
+ else\r
+ {\r
+ VideoWrite(d);\r
+ }\r
+ return;\r
+ }\r
+\r
+ if (a==0x04) // Command port 4 or 6\r
+ {\r
+ if (pvid->pending)\r
+ {\r
+ // Low word of command:\r
+ pvid->command&=0xffff0000;\r
+ pvid->command|=d;\r
+ pvid->pending=0;\r
+ CommandChange();\r
+ return;\r
+ }\r
+\r
+ if ((d&0xc000)==0x8000)\r
+ {\r
+ // Register write:\r
+ int num=(d>>8)&0x1f;\r
+ pvid->reg[num]=(unsigned char)d;\r
+ return;\r
+ }\r
+\r
+ // High word of command:\r
+ pvid->command&=0x0000ffff;\r
+ pvid->command|=d<<16;\r
+ pvid->pending=1;\r
+ }\r
+}\r
+\r
+unsigned int PicoVideoRead(unsigned int a)\r
+{\r
+ unsigned int d=0;\r
+ \r
+ a&=0x1c;\r
+\r
+ if (a==0x00) { d=VideoRead(); goto end; }\r
+\r
+ if (a==0x04)\r
+ {\r
+ d=Pico.video.status;\r
+\r
+ // Toggle fifo full empty:\r
+ if (Pico.m.rotate&4) d|=0x3520; else d|=0x3620;\r
+ if (Pico.m.rotate&2) d|=0x0004; // Toggle in/out of H-Blank\r
+ Pico.m.rotate++;\r
+\r
+ if (Pico.m.pal) d|=1; // PAL screen\r
+\r
+ goto end;\r
+ }\r
+\r
+ if ((a&0x1c)==0x08)\r
+ {\r
+ if (Pico.m.scanline>-64) d=Pico.m.scanline; // HV-Counter\r
+ else d=Pico.m.rotate++; // Fudge\r
+\r
+ d&=0xff; d<<=8;\r
+ goto end;\r
+ }\r
+\r
+end:\r
+\r
+ return d;\r
+}\r
--- /dev/null
+// Drive filler file for ym2612.c\r
+#undef INLINE\r
+#define INLINE __inline\r
+\r
+#define CLIB_DECL \r
+#define INTERNAL_TIMER\r
+\r
+// Callbacks from fm.c\r
+int YM2612UpdateReq(int nChip);\r
+int AY8910_set_clock(int nChip,int nClock);\r
+//int Log(int nType,char *szText,...);\r
+extern void *errorlog;\r
+\r
+#ifndef __GNUC__\r
+#pragma warning (disable:4100)\r
+#pragma warning (disable:4244)\r
+#pragma warning (disable:4245)\r
+#pragma warning (disable:4710)\r
+#endif\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+static char *ConfigName="\\PicoConfig.txt";\r
+struct Config Config;\r
+\r
+int ConfigInit()\r
+{\r
+ memset(&Config,0,sizeof(Config));\r
+\r
+ Config.key[0]=VK_UP;\r
+ Config.key[1]=VK_DOWN;\r
+ Config.key[2]=VK_LEFT;\r
+ Config.key[3]=VK_RIGHT;\r
+ Config.key[4]=GXKey.vkC; // A\r
+ Config.key[5]=GXKey.vkA; // B\r
+ Config.key[6]=GXKey.vkB; // C\r
+ Config.key[7]=GXKey.vkStart;\r
+\r
+ return 0;\r
+}\r
+\r
+int ConfigSave()\r
+{\r
+ FILE *f=NULL;\r
+ int i=0,max=0;\r
+\r
+ // Open config file:\r
+ f=fopen(ConfigName,"wt"); if (f==NULL) return 1;\r
+\r
+ fprintf(f,"// PicoDrive Config File\n\n");\r
+\r
+ fprintf(f,"// Keys: Up Down Left Right\n");\r
+ fprintf(f,"// A B C Start\n\n");\r
+\r
+ max=sizeof(Config.key)/sizeof(Config.key[0]);\r
+ for (i=0;i<max;i++)\r
+ {\r
+ fprintf(f,"key,%d,0x%.2x\n",i,Config.key[i]);\r
+ }\r
+\r
+ fclose(f);\r
+\r
+ return 0;\r
+}\r
+\r
+int ConfigLoad()\r
+{\r
+ FILE *f=NULL;\r
+ char line[256];\r
+ int i=0;\r
+\r
+ memset(line,0,sizeof(line));\r
+\r
+ // Open config file:\r
+ f=fopen(ConfigName,"rt"); if (f==NULL) return 1;\r
+\r
+ // Read through each line of the config file\r
+ for (;;)\r
+ {\r
+ char *tok[3]={"","",""};\r
+ if (fgets(line,sizeof(line)-1,f)==NULL) break;\r
+\r
+ // Split line into tokens:\r
+ for (i=0;i<3;i++)\r
+ {\r
+ tok[i]=strtok(i<1?line:NULL, ",\r\n");\r
+ if (tok[i]==NULL) { tok[i]=""; break; }\r
+ }\r
+\r
+ if (_stricmp(tok[0],"key")==0)\r
+ {\r
+ // Key code\r
+ int ta=0,tb=0;\r
+ \r
+ ta=strtol(tok[1],NULL,0);\r
+ tb=strtol(tok[2],NULL,0);\r
+\r
+ Config.key[ta&7]=tb;\r
+ }\r
+ }\r
+\r
+ fclose(f);\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+static int ScreenNum=0;\r
+\r
+int DebugScreenGrab()\r
+{\r
+ unsigned char *screen=NULL;\r
+ FILE *file=NULL;\r
+ unsigned char *line=NULL;\r
+ int x=0,y=0;\r
+ char filename[64];\r
+ unsigned char head[0x12];\r
+\r
+ memset(filename,0,sizeof(filename));\r
+ memset(head,0,sizeof(head));\r
+\r
+ // Allocate memory for one line\r
+ line=(unsigned char *)malloc(GXDisp.cxWidth*3); if (line==NULL) return 1;\r
+ memset(line,0,GXDisp.cxWidth*3);\r
+\r
+ // Get pointer to screen:\r
+ screen=(unsigned char *)GXBeginDraw(); if (screen==NULL) { free(line); return 1; }\r
+\r
+ // Open screenshot file:\r
+ for (;;)\r
+ {\r
+ sprintf(filename,"\\Screen%.3d.tga",ScreenNum);\r
+\r
+ // Does this file exist?\r
+ file=fopen(filename,"rb"); if (file==NULL) break; // No - use this\r
+ \r
+ // Exists, try next file\r
+ fclose(file); ScreenNum++;\r
+ if (ScreenNum>=1000) break;\r
+ }\r
+\r
+ // Use this filename\r
+ file=fopen(filename,"wb"); if (file==NULL) { GXEndDraw(); free(line); return 1; }\r
+\r
+ head[0x02]=0x02; //?\r
+ head[0x0c]=(unsigned char) GXDisp.cxWidth;\r
+ head[0x0d]=(unsigned char)(GXDisp.cxWidth>>8);\r
+ head[0x0e]=(unsigned char) GXDisp.cyHeight;\r
+ head[0x0f]=(unsigned char)(GXDisp.cyHeight>>8);\r
+ head[0x10]=24; // Number of bits per pixel\r
+\r
+ // Write header:\r
+ fwrite(head,1,sizeof(head),file);\r
+\r
+ for (y=0;y<(int)GXDisp.cyHeight;y++)\r
+ {\r
+ unsigned char *ps=NULL,*pd=NULL;\r
+ int ry=0;\r
+ int pix=0;\r
+\r
+ ry=GXDisp.cyHeight-y-1;\r
+ ps=screen+ry*GXDisp.cbyPitch;\r
+ pd=line;\r
+\r
+ // Copy pixel to our line buffer\r
+ for (x=0;x<(int)GXDisp.cxWidth; x++,ps+=GXDisp.cbxPitch,pd+=3)\r
+ {\r
+ pix=*(unsigned short *)ps;\r
+\r
+ pd[0]=(unsigned char)((pix&0x001f)<<3); // Red\r
+ pd[1]=(unsigned char)((pix&0x07e0)>>3); // Green\r
+ pd[2]=(unsigned char)((pix&0xf800)>>8); // Blue\r
+ }\r
+\r
+ fwrite(line,1,GXDisp.cxWidth*3,file);\r
+ }\r
+\r
+ fclose(file); file=NULL;\r
+ \r
+ GXEndDraw();\r
+ free(line);\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+TCHAR RomName[260]={0};\r
+static unsigned char *RomData=NULL;\r
+static unsigned int RomSize=0;\r
+\r
+static unsigned int LastSecond=0;\r
+static int FramesDone=0;\r
+static int FramesPerSecond=60;\r
+\r
+struct Target Targ;\r
+\r
+static int TargetInit()\r
+{\r
+ RECT rect={0,0,0,0};\r
+ int height=0;\r
+\r
+ memset(&Targ,0,sizeof(Targ));\r
+\r
+ height=168;\r
+\r
+ ClientToScreen(FrameWnd,&Targ.point);\r
+\r
+ GetClientRect(FrameWnd,&rect);\r
+ // Find out where the top of the screen should go:\r
+ rect.top=(rect.bottom-height)>>1;\r
+ if (rect.top<0) rect.top=0;\r
+ rect.bottom=rect.top+height;\r
+\r
+ Targ.view=rect; // Save the view rectangle (client coordinates)\r
+\r
+ Targ.offset=Targ.view.top+Targ.point.y;\r
+\r
+ return 0;\r
+}\r
+\r
+static int TargetUpdate()\r
+{\r
+ // Need to repaint the view rectangle:\r
+ GetUpdateRect(FrameWnd,&Targ.update,0);\r
+\r
+ Targ.top =Targ.update.top +Targ.point.y;\r
+ Targ.bottom=Targ.update.bottom+Targ.point.y;\r
+\r
+ return 0;\r
+}\r
+\r
+int EmulateInit()\r
+{\r
+ FILE *f=NULL;\r
+\r
+ EmulateExit(); // Make sure exited\r
+\r
+ TargetInit(); // Find out where to put the screen\r
+\r
+ PicoInit();\r
+\r
+ // Load cartridge\r
+ f=_wfopen(RomName,L"rb"); if (f==NULL) return 1;\r
+ PicoCartLoad(f,&RomData,&RomSize);\r
+ fclose(f);\r
+\r
+ PicoCartInsert(RomData,RomSize);\r
+\r
+ LastSecond=GetTickCount(); FramesDone=0;\r
+\r
+ return 0;\r
+}\r
+\r
+void EmulateExit()\r
+{\r
+ // Remove cartridge\r
+ PicoCartInsert(NULL,0);\r
+ if (RomData) free(RomData); RomData=NULL; RomSize=0;\r
+ \r
+ PicoExit();\r
+}\r
+\r
+// Callback for scanline data:\r
+static int EmulateScan(unsigned int scan,unsigned short *sdata)\r
+{\r
+ int len=0;\r
+ unsigned short *ps=NULL,*end=NULL;\r
+ unsigned char *pd=NULL;\r
+ int xpitch=0;\r
+\r
+ if ((scan&3)==1) return 0;\r
+ scan+=scan<<1; scan>>=2; // Reduce size to 75%\r
+\r
+ scan+=Targ.offset;\r
+ if ((int)scan< Targ.top) return 0; // Out of range\r
+ if ((int)scan>=Targ.bottom) return 0; // Out of range\r
+\r
+ pd=Targ.screen+scan*GXDisp.cbyPitch;\r
+\r
+ len=240;\r
+ xpitch=GXDisp.cbxPitch;\r
+ ps=sdata; end=ps+320;\r
+\r
+ // Reduce 4 pixels into 3\r
+ do\r
+ {\r
+ *(unsigned short *)pd=ps[0]; pd+=xpitch;\r
+ *(unsigned short *)pd=(unsigned short)((ps[1]+ps[2])>>1); pd+=xpitch;\r
+ *(unsigned short *)pd=ps[3]; pd+=xpitch;\r
+ ps+=4;\r
+ }\r
+ while (ps<end);\r
+\r
+ return 0;\r
+}\r
+\r
+static int DoFrame()\r
+{\r
+ int pad=0,i=0,ks=0;\r
+ char map[8]={0,1,2,3,5,6,4,7}; // u/d/l/r/b/c/a/start\r
+\r
+ for (i=0;i<8;i++)\r
+ {\r
+ ks=GetAsyncKeyState(Config.key[map[i]]);\r
+ if (ks) pad|=1<<i;\r
+ }\r
+ PicoPad[0]=pad;\r
+\r
+ PicoFrame();\r
+ return 0;\r
+}\r
+\r
+static int DrawFrame()\r
+{\r
+ // Now final frame is drawn:\r
+ InvalidateRect(FrameWnd,&Targ.view,0);\r
+\r
+ if (Main3800) Targ.screen=(unsigned char *)0xac0755a0; // The real 3800 screen address\r
+ else Targ.screen=(unsigned char *)GXBeginDraw();\r
+\r
+ if (Targ.screen==NULL) return 1;\r
+\r
+ TargetUpdate();\r
+\r
+ PicoScan=EmulateScan; // Setup scanline callback\r
+ DoFrame();\r
+ PicoScan=NULL;\r
+\r
+\r
+ \r
+ if (Main3800==0) GXEndDraw();\r
+\r
+ Targ.screen=NULL;\r
+\r
+ ValidateRect(FrameWnd,&Targ.update);\r
+\r
+ if (PicoStatus[0])\r
+ {\r
+ // Print the status of the 68000:\r
+ HDC hdc=GetDC(FrameWnd);\r
+ RECT rect={0,220, 240,260};\r
+ TCHAR status[128]={0};\r
+\r
+ wsprintf(status,L"%.120S",PicoStatus);\r
+\r
+ FillRect(hdc,&rect,(HBRUSH)GetStockObject(WHITE_BRUSH));\r
+ SetBkMode(hdc,TRANSPARENT);\r
+\r
+ DrawText(hdc,status,lstrlen(status),&rect,0);\r
+ ReleaseDC(FrameWnd,hdc);\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+int EmulateFrame()\r
+{\r
+ int i=0,need=0;\r
+ int time=0,frame=0;\r
+\r
+ if (RomData==NULL) return 1;\r
+\r
+ // Speed throttle:\r
+ time=GetTickCount()-LastSecond; // This will be about 0-1000 ms\r
+ frame=time*FramesPerSecond/1000;\r
+ need=frame-FramesDone;\r
+ FramesDone=frame;\r
+\r
+ if (FramesPerSecond>0)\r
+ {\r
+ // Carry over any >60 frame count to one second\r
+ while (FramesDone>=FramesPerSecond) { FramesDone-=FramesPerSecond; LastSecond+=1000; }\r
+ }\r
+\r
+ if (need<=0) { Sleep(2); return 1; }\r
+ if (need>4) need=4; // Limit frame skipping\r
+\r
+ for (i=0;i<need-1;i++) DoFrame(); // Frame skip if needed\r
+\r
+ DrawFrame();\r
+ return 0;\r
+}\r
+\r
+int SndRender()\r
+{\r
+// int p=0;\r
+\r
+ PsndRate=WaveRate;\r
+ PsndLen=WaveLen;\r
+ PsndOut=WaveDest;\r
+\r
+ DrawFrame();\r
+ // Convert to signed:\r
+// for (p=0;p<PsndLen<<1;p++) PsndOut[p]+=0x8000;\r
+\r
+ PsndRate=PsndLen=0;\r
+ PsndOut=NULL;\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+// Loading roms, loading and saving states etc...\r
+\r
+int FileLoadRom()\r
+{\r
+ OPENFILENAME ofn;\r
+\r
+ memset(&ofn,0,sizeof(ofn));\r
+ memset(&RomName,0,sizeof(RomName));\r
+\r
+ ofn.lStructSize=sizeof(ofn);\r
+ ofn.hwndOwner=FrameWnd;\r
+ ofn.hInstance=GetModuleHandle(NULL);\r
+ ofn.lpstrFile=RomName;\r
+ ofn.nMaxFile=260;\r
+ ofn.lpstrDefExt=L"bin";\r
+ ofn.lpstrFilter=L"Rom Files\0*.bin;*.gen;*.smd\0\0";\r
+\r
+ GetOpenFileName(&ofn);\r
+\r
+ UpdateWindow(FrameWnd);\r
+\r
+ // Open new rom:\r
+ if (RomName[0]) EmulateInit();\r
+\r
+ return 0;\r
+}\r
+\r
+int FileState(int load)\r
+{\r
+ OPENFILENAME ofn;\r
+ WCHAR name[260]={0};\r
+\r
+ if (load==0) wcscpy(name,L"State.mds");\r
+\r
+ memset(&ofn,0,sizeof(ofn));\r
+ ofn.lStructSize=sizeof(ofn);\r
+ ofn.hwndOwner=FrameWnd;\r
+ ofn.hInstance=GetModuleHandle(NULL);\r
+ ofn.lpstrFile=name;\r
+ ofn.nMaxFile=sizeof(name)>>1;\r
+ ofn.lpstrDefExt=L"mds";\r
+ ofn.lpstrFilter=L"MD State Files\0*.mds\0\0";\r
+\r
+ if (load) GetOpenFileNameW(&ofn);\r
+ else GetSaveFileNameW(&ofn);\r
+ UpdateWindow(FrameWnd);\r
+\r
+ if (name[0]==0) return 1;\r
+\r
+ if (PmovFile) fclose(PmovFile);\r
+\r
+ PmovFile=_wfopen(name,load ? L"rb":L"wb");\r
+ if (PmovFile==NULL) return 1;\r
+ \r
+ PmovAction=load?6:5;\r
+ PmovState(); // Save the state\r
+\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+HWND FrameWnd=NULL;\r
+struct GXDisplayProperties GXDisp;\r
+struct GXKeyList GXKey;\r
+\r
+// Window procedure for frame window\r
+static LRESULT CALLBACK FrameProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)\r
+{\r
+ switch (Msg)\r
+ {\r
+ case WM_COMMAND:\r
+ switch (LOWORD(wParam))\r
+ {\r
+ case IDOK: case IDCANCEL: SendMessage(hWnd,WM_CLOSE,0,0); break;\r
+\r
+ case ID_LOADROM: FileLoadRom(); break;\r
+ case ID_OPTIONS_GRAB: DebugScreenGrab(); break;\r
+ case ID_OPTIONS_SAVE: FileState(0); break;\r
+ case ID_OPTIONS_LOAD: FileState(1); break;\r
+ }\r
+ return 0;\r
+\r
+ case WM_KILLFOCUS: GXSuspend(); return 0;\r
+ case WM_SETFOCUS: GXResume(); return 0;\r
+\r
+ case WM_CLOSE: PostQuitMessage(0); return 0;\r
+\r
+ case WM_DESTROY:\r
+ GXCloseInput();\r
+ GXCloseDisplay();\r
+ FrameWnd=NULL; // Blank window handle\r
+ return 0;\r
+ }\r
+\r
+ return DefWindowProc(hWnd,Msg,wParam,lParam);\r
+}\r
+\r
+static int GxInit()\r
+{\r
+ GXOpenDisplay(FrameWnd,GX_FULLSCREEN);\r
+ GXOpenInput();\r
+ GXDisp=GXGetDisplayProperties();\r
+ GXKey=GXGetDefaultKeys(GX_NORMALKEYS);\r
+\r
+ // The real layout of the 3800:\r
+ if (Main3800) { GXDisp.cbxPitch=-640; GXDisp.cbyPitch=2; }\r
+\r
+ return 0;\r
+}\r
+\r
+int FrameInit()\r
+{\r
+ WNDCLASS wc;\r
+ SHMENUBARINFO mbi;\r
+ TCHAR title[128]={0};\r
+ RECT rect={0,0,0,0};\r
+\r
+ memset(&wc,0,sizeof(wc));\r
+ memset(&mbi,0,sizeof(mbi));\r
+\r
+ // Register the Frame window class\r
+ wc.lpfnWndProc=FrameProc;\r
+ wc.hInstance=GetModuleHandle(NULL);\r
+ wc.lpszClassName=APP_TITLE;\r
+ wc.hbrBackground=(HBRUSH)CreateSolidBrush(0x404040);\r
+ RegisterClass(&wc);\r
+\r
+ FrameWnd=CreateWindowEx(WS_EX_CAPTIONOKBTN,APP_TITLE,APP_TITLE,WS_VISIBLE,\r
+ CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,\r
+ NULL,NULL,wc.hInstance,NULL);\r
+ \r
+ wsprintf(title,APP_TITLE L" v%x.%.3x",PicoVer>>12,PicoVer&0xfff);\r
+ SetWindowText(FrameWnd,title);\r
+\r
+ // Show SIP\r
+ mbi.cbSize=sizeof(mbi);\r
+ mbi.hwndParent=FrameWnd;\r
+ mbi.nToolBarId=IDR_MENUBAR1;\r
+ mbi.hInstRes=wc.hInstance;\r
+ SHCreateMenuBar(&mbi);\r
+\r
+ // Resize Frame to avoid the SIP\r
+ GetWindowRect(FrameWnd,&rect);\r
+ MoveWindow(FrameWnd, rect.left,rect.top, rect.right-rect.left,rect.bottom-rect.top-26, 1);\r
+\r
+ GxInit();\r
+\r
+ FileLoadRom();\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+----------------------------------------------------------------------------\r
+\r
+ PicoDrive\r
+\r
+ Megadrive emulator for Pocket PC\r
+\r
+This code is licensed under the GNU General Public License version 2.0 and the MAME License.\r
+You can choose the license that has the most advantages for you.\r
+\r
+----------------------------------------------------------------------------\r
+\r
+ What's new?\r
+\r
+0.030\r
+ Cyclone v0.076, fixes:\r
+ + Fixed an issue with sbcd - e.g. when 0x00-0x01 was performed, the result was correct (0x99),\r
+ but the carry bit was not set. Also changed abcd code to be more similar to new sbcd.\r
+ Used on RT2.\r
+ + Fixed a subtle issue in btst #n,(An), if the target is less that 32-bit, the value is\r
+ now masked.\r
+ Rolling Thunder 2 did this, but it doesn't seem to have fixed/broken anything.\r
+ + Oops #2! Cmpa was writing back the value to the destination register! Fixes: don't know.\r
+ + Oops #3! The CCR should be writable from any mode, previously it was only allowed from the\r
+ supervisor mode. Fixes Gain Ground.\r
+ + Added cmpm (Flicky, Decap Attack)\r
+ + For movem, added some EA modes (like 0x3a PC relative) which I thought were invalid, but\r
+ Flicky uses movem to PC relative...\r
+ + Oops, incorrect eor opcodes were being emitted instead of cmpm opcodes\r
+ * Trying a different way of doing addx/subx with carry (to fix zero flag?)\r
+\r
+0.025\r
+ + Doh, fixed a dumb divide by zero in the (w.i.p.) sound code - Sonic 1, Revenge of Shinobi\r
+ work again!\r
+\r
+0.024\r
+ Cyclone v0.072:\r
+ + Fixed a problem with divs - remainder should be negative when result is negative\r
+ Fixed intro of Block Out.\r
+ \r
+ + Fixed a typo in SekInterrupt\r
+\r
+ + Added a config file PicoConfig.txt with key codes, in the root directory\r
+ of the Pocket PC. If you want you can edit this to remap keys. I'll add\r
+ an easier way to redefine keys later.\r
+ - Revenge of Shinobi strangely seems broken?\r
+\r
+0.022\r
+ Cyclone changes:\r
+ + Added movep opcode (Sonic 3 works)\r
+ + Fixed a problem with DBcc not decrementing if the condition is false (Shadow of the Beast)\r
+\r
+0.018\r
+ Cyclone changes:\r
+ + Added SBCD and the flags for ABCD/SBCD. Score and time now works in games such as\r
+ Rolling Thunder 2, Ghouls 'N Ghosts\r
+ + Fixed a problem with addx and subx with 8-bit and 16-bit values.\r
+ Ghouls 'N' Ghosts now works!\r
+ + Alien 3 now works\r
+ + Added ABCD opcode (Streets of Rage works now!)\r
+\r
+0.017 Added Window (score display)\r
+\r
+0.016\r
+ + Added some Z80 faking which makes a few more games run\r
+ + Sped up graphics rendering a bit\r
+ + Fixed Sprite priority\r
+\r
+Cyclone Fixes\r
+ + Added dbCC (After Burner)\r
+ + Added asr EA (Sonic 1 Boss/Labyrinth Zone)\r
+ + Added andi/ori/eori ccr (Altered Beast)\r
+ + Added trap (After Burner)\r
+ + Added special case for move.b (a7)+ and -(a7), stepping by 2\r
+ After Burner is playable! Eternal Champions shows more\r
+ + Fixed lsr.b/w zero flag (Ghostbusters)\r
+ Rolling Thunder 2 first level only now works\r
+ + Fixed N flag for .b and .w arithmetic. Golden Axe works!\r
+\r
+\r
+v0.011\r
+Changes are to the Cyclone core, repeated here:\r
+----\r
+v0.0065\r
+ + Fixed a problem with immediate values - they weren't being shifted up correctly for some\r
+ opcodes. Spiderman works, After Burner shows a bit of graphics.\r
+ + Fixed a problem with EA:"110nnn" extension word. 32-bit offsets were being decoded as 8-bit\r
+ offsets by mistake. Castlevania Bloodlines seems fine now.\r
+ + Added exg opcode\r
+ + Fixed asr opcode (Sonic jumping left is fixed)\r
+ + Fixed a problem with the carry bit in rol.b (Marble Madness)\r
+\r
+v0.0064\r
+ + Added rtr\r
+ + Fixed addq/subq.l (all An opcodes are 32-bit) (Road Rash)\r
+ + Fixed various little timings\r
+\r
+v0.0063\r
+ + Added link/unlk opcodes\r
+ + Fixed various little timings\r
+ + Fixed a problem with dbCC opcode being emitted at set opcodes\r
+ + Improved long register access, the EA fetch now does ldr r0,[r7,r0,lsl #2] whenever\r
+ possible, saving 1 or 2 cycles on many opcodes, which should give a nice speed up.\r
+ + May have fixed N flag on ext opcode?\r
+ + Added dasm for link opcode.\r
+\r
+v0.0062\r
+ * I was a bit too keen with the Arithmetic opcodes! Some of them should have been abcd,\r
+ exg and addx. Removed the incorrect opcodes, pending re-adding them as abcd, exg and addx.\r
+ + Changed unknown opcodes to act as nops.\r
+ Not very technical, but fun - a few more games show more graphics ;)\r
+\r
+v0.0060\r
+ + Fixed divu (EA intro)\r
+ + Added sf (set false) opcode - SOR2\r
+ * Todo: pea/link/unlk opcodes\r
+----\r
+v0.010\r
+\r
++ Cyclone v0.0059: Added remainder to divide opcodes.\r
+ Background is now fixed on Eswat and Revenge of Shinobi. In fact they are playable!\r
+\r
+* Shrunk the screen down because some games aren't playable if you can't see the whole\r
+ 320 pixel width.\r
+\r
+* Merged the PicoDrive and GenaDrive 'Pico' directories, with ifdefs for EMU_C68K (Cyclone)\r
+ and EMU_A68K.\r
+\r
++ While making GenaDrive I noticed a few bugs in the memory handlers and carried them\r
+ over to PicoDrive.\r
+ A lot of games (Revenge of Shinobi, Eswat, Sonic 1 maybe even) were reading\r
+ from memory locations like 0xff000000+Rom address, and I wasn't returning the Rom data.\r
+ Many more games show graphics now (G'n'G, Sonic 1)!\r
+\r
+* Cyclone: Changed the way Cyclone reads memory to be a bit less confusing.\r
+ The read/write memory handlers are now like this:\r
+\r
+ unsigned char (*read8 )(unsigned int a); // [r7,#0x68]\r
+ unsigned short (*read16 )(unsigned int a); // [r7,#0x6c]\r
+ unsigned int (*read32 )(unsigned int a); // [r7,#0x70]\r
+ void (*write8 )(unsigned int a,unsigned char d); // [r7,#0x74]\r
+ void (*write16)(unsigned int a,unsigned short d); // [r7,#0x78]\r
+ void (*write32)(unsigned int a,unsigned int d); // [r7,#0x7c]\r
+\r
+ This means the Cyclone itself now sign-extends 16 and 8-bit values when needed, and\r
+ the application doesn't have to.\r
+\r
+\r
+v0.007 - Initial release\r
+\r
+ Haven't been working on this much recently so I thought I'd release what\r
+ I had onto the Internet.\r
+\r
+ Basically this is largely a framework for Cyclone, my 68000 core, and the\r
+ simplest system has to be the Megadrive, which is just really a 68000 with\r
+ flat address space wired up to a video display processor.\r
+ The Megadrive does of course have a Z80 for sound as well, but many games\r
+ will still run without it. Basically it's one of the most forgiving systems,\r
+ so it's probably a good starting point.\r
+\r
+ Not many games run, and none of them are playable yet, but if you really want\r
+ to take a look anyway, here's what to do:\r
+\r
+-------------------------------------------------------------------------------\r
+\r
+How to run PicoDrive\r
+\r
+ First connect your Pocket PC and copy PicoDrive.exe to it. Windows\Start Menu is \r
+ probably the best place for easy access.\r
+ It needs to have GAPI installed, which you may have already. If you don't it\r
+ will give you a really unhelpful error message (good old Windows!) like "Unable to execute\r
+ program".\r
+ To install GAPI just drop gx.dll into either the same folder as PicoDrive, or\r
+ your Windows folder.\r
+ Rom images go in the My Documents folder, and they must be in .BIN format, uncompressed.\r
+\r
+ From memory, some games which do something are: Revenge of Shinobi, Sonic 2,\r
+ Ghouls 'N' Ghosts and CastleVania Bloodlines. Most just show a big blank screen :(\r
+ \r
+ If you find any games that are playable (maybe a PD game?), let me know, I'd be interested ;)\r
+ My e-mail is dev(at)finalburn.com - replace the (at) with an @\r
+ \r
+ I think there must be something wrong somewhere with one of the ASL-type instructions\r
+ or something - there are still a few unimplemented opcodes, and also I don't think I did\r
+ the remainder from DIVS and DIVU yet.\r
+\r
+ Dave.\r
+ emudave(atsymbol)gmail.com\r
+\r
--- /dev/null
+# Microsoft eMbedded Visual Tools Project File - Name="PicoDrive" - Package Owner=<4>\r
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (WCE x86) Application" 0x8301\r
+# TARGTYPE "Win32 (WCE ARM) Application" 0x8501\r
+# TARGTYPE "Win32 (WCE x86em) Application" 0x7f01\r
+\r
+CFG=PicoDrive - Win32 (WCE ARM) Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "PicoDrive.vcn".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "PicoDrive.vcn" CFG="PicoDrive - Win32 (WCE ARM) Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "PicoDrive - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Application")\r
+!MESSAGE "PicoDrive - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Application")\r
+!MESSAGE "PicoDrive - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")\r
+!MESSAGE "PicoDrive - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application")\r
+!MESSAGE "PicoDrive - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Application")\r
+!MESSAGE "PicoDrive - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+# PROP ATL_Project 2\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "ARMRel"\r
+# PROP BASE Intermediate_Dir "ARMRel"\r
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "ARMRel"\r
+# PROP Intermediate_Dir "ARMRel"\r
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
+CPP=clarm.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /FR /YX /Oxs /M$(CECrtMT) /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM\r
+# ADD LINK32 coredll.lib gx.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM\r
+# Begin Special Build Tool\r
+TargetPath=.\ARMRel\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "D:\Briefcase"\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "ARMDbg"\r
+# PROP BASE Intermediate_Dir "ARMDbg"\r
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "ARMDbg"\r
+# PROP Intermediate_Dir "ARMDbg"\r
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r\r
+CPP=clarm.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM\r
+# ADD LINK32 coredll.lib gx.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM\r
+# Begin Special Build Tool\r
+TargetPath=.\ARMDbg\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents"\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "X86Rel"\r
+# PROP BASE Intermediate_Dir "X86Rel"\r
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "X86Rel"\r
+# PROP Intermediate_Dir "X86Rel"\r
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /YX /Gs8192 /GF /Oxs /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /FR /YX /Gs8192 /GF /Oxs /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86\r
+# ADD LINK32 $(CEx86Corelibc) coredll.lib gx.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86\r
+# Begin Special Build Tool\r
+TargetPath=.\X86Rel\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents"\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "X86Dbg"\r
+# PROP BASE Intermediate_Dir "X86Dbg"\r
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "X86Dbg"\r
+# PROP Intermediate_Dir "X86Dbg"\r
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86\r
+# ADD LINK32 $(CEx86Corelibc) coredll.lib gx.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86\r
+# Begin Special Build Tool\r
+TargetPath=.\X86Dbg\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents"\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "X86EMRel"\r
+# PROP BASE Intermediate_Dir "X86EMRel"\r
+# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "X86EMRel"\r
+# PROP Intermediate_Dir "X86EMRel"\r
+# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /YX /Gz /Oxs /c\r
+# ADD CPP /nologo /W4 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /FR /YX /Gz /Oxs /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /subsystem:windows /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86\r
+# ADD LINK32 $(CEx86Corelibc) coredll.lib gx.lib aygshell.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86\r
+# Begin Special Build Tool\r
+TargetPath=.\X86EMRel\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents"\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "X86EMDbg"\r
+# PROP BASE Intermediate_Dir "X86EMDbg"\r
+# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "X86EMDbg"\r
+# PROP Intermediate_Dir "X86EMDbg"\r
+# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"\r
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+RSC=rc.exe\r
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r\r
+CPP=cl.exe\r
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gz /c\r
+# ADD CPP /nologo /W4 /Zi /Od /D "DEBUG" /D "i486" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gz /c\r
+MTL=midl.exe\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /subsystem:windows /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86\r
+# ADD LINK32 $(CEx86Corelibc) coredll.lib gx.lib aygshell.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86\r
+# Begin Special Build Tool\r
+TargetPath=.\X86EMDbg\PicoDrive.exe\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents"\r
+# End Special Build Tool\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "PicoDrive - Win32 (WCE ARM) Release"\r
+# Name "PicoDrive - Win32 (WCE ARM) Debug"\r
+# Name "PicoDrive - Win32 (WCE x86) Release"\r
+# Name "PicoDrive - Win32 (WCE x86) Debug"\r
+# Name "PicoDrive - Win32 (WCE x86em) Release"\r
+# Name "PicoDrive - Win32 (WCE x86em) Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\Config.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_CONFI=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_CONFI=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_CONFI=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_CONFI=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_CONFI=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Debug.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ "..\Pico\Disa.h"\\r
+ "..\Pico\Pico.h"\\r
+ "..\Pico\PicoInt.h"\\r
+ \r
+NODEP_CPP_DEBUG=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ "..\Pico\Pico.h"\\r
+ "..\Pico\PicoInt.h"\\r
+ \r
+NODEP_CPP_DEBUG=\\r
+ "..\Cyclone\Disa.h"\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ "..\Pico\Disa.h"\\r
+ "..\Pico\Pico.h"\\r
+ "..\Pico\PicoInt.h"\\r
+ \r
+NODEP_CPP_DEBUG=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_DEBUG=\\r
+ "..\Cyclone\Cyclone.h"\\r
+ "..\Pico\Pico.h"\\r
+ "..\Pico\PicoInt.h"\\r
+ \r
+NODEP_CPP_DEBUG=\\r
+ "..\Cyclone\Disa.h"\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Emulate.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_EMULA=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_EMULA=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_EMULA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\File.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ \r
+NODEP_CPP_FILE_=\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ \r
+NODEP_CPP_FILE_=\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ \r
+NODEP_CPP_FILE_=\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_FILE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ \r
+NODEP_CPP_FILE_=\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\FrameWindow.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_FRAME=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_FRAME=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_FRAME=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\PicoDrive.txt\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Wave.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WAVE_=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WAVE_=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WAVE_=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_WAVE_=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WAVE_=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\WinMain.cpp\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WINMA=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ \r
+NODEP_CPP_WINMA=\\r
+ ".\app.h"\\r
+ ".\ipapi.h"\\r
+ ".\x.h"\\r
+ ".\ygshell.h"\\r
+ \r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+DEP_CPP_WINMA=\\r
+ "..\Pico\Pico.h"\\r
+ ".\stdafx.h"\\r
+ {$(INCLUDE)}"aygshell.h"\\r
+ {$(INCLUDE)}"gx.h"\\r
+ {$(INCLUDE)}"sipapi.h"\\r
+ \r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=.\afxres.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\resource.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\stdafx.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+# Begin Source File\r
+\r
+SOURCE=.\bitmap1.bmp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\Script1.rc\r
+\r
+!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release"\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug"\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release"\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug"\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release"\r
+\r
+!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug"\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
--- /dev/null
+Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00\r
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
+\r
+###############################################################################\r
+\r
+Project: "Pico"=..\Pico\Pico.vcp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Project: "PicoDrive"=.\PicoDrive.vcp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+ Begin Project Dependency\r
+ Project_Dep_Name Pico\r
+ End Project Dependency\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Global:\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<3>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
--- /dev/null
+//Microsoft Developer Studio generated resource script.\r
+//\r
+#include "resource.h"\r
+\r
+#define APSTUDIO_READONLY_SYMBOLS\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 2 resource.\r
+//\r
+#include "afxres.h"\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+#undef APSTUDIO_READONLY_SYMBOLS\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+// English (U.K.) resources\r
+\r
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)\r
+#ifdef _WIN32\r
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK\r
+#pragma code_page(1252)\r
+#endif //_WIN32\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Menubar\r
+//\r
+\r
+IDR_MENUBAR1 MENU DISCARDABLE \r
+BEGIN\r
+ MENUITEM "Load Rom", ID_LOADROM\r
+ POPUP "Options"\r
+ BEGIN\r
+ MENUITEM "Save Movie", ID_OPTIONS_SAVE\r
+ MENUITEM "Load Movie", ID_OPTIONS_LOAD\r
+ MENUITEM "Grab Image", ID_OPTIONS_GRAB\r
+ END\r
+ MENUITEM "Close", IDCANCEL\r
+END\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Data\r
+//\r
+\r
+IDR_MENUBAR1 SHMENUBAR DISCARDABLE \r
+BEGIN\r
+ IDR_MENUBAR1, 3,\r
+ I_IMAGENONE, ID_LOADROM, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, \r
+ IDS_CAP_LOADROM, 0, 0,\r
+ I_IMAGENONE, ID_OPTIONS, TBSTATE_ENABLED, \r
+ TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_CAP_OPTIONS, 0, 1,\r
+ I_IMAGENONE, IDCANCEL, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, IDS_CAP_CLOSE, \r
+ 0, 2,\r
+END\r
+\r
+\r
+#ifdef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// TEXTINCLUDE\r
+//\r
+\r
+1 TEXTINCLUDE DISCARDABLE \r
+BEGIN\r
+ "resource.h\0"\r
+END\r
+\r
+2 TEXTINCLUDE DISCARDABLE \r
+BEGIN\r
+ "#include ""afxres.h""\r\n"\r
+ "\0"\r
+END\r
+\r
+3 TEXTINCLUDE DISCARDABLE \r
+BEGIN\r
+ "\r\n"\r
+ "\0"\r
+END\r
+\r
+#endif // APSTUDIO_INVOKED\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// String Table\r
+//\r
+\r
+STRINGTABLE DISCARDABLE \r
+BEGIN\r
+ IDS_CAP_LOADROM "Load Rom"\r
+ IDS_CAP_CLOSE "Close"\r
+ IDS_CAP_GRAB "Grab"\r
+END\r
+\r
+STRINGTABLE DISCARDABLE \r
+BEGIN\r
+ IDS_CAP_OPTIONS "Options"\r
+END\r
+\r
+#endif // English (U.K.) resources\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+\r
+#ifndef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 3 resource.\r
+//\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+#endif // not APSTUDIO_INVOKED\r
+\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+\r
+int WaveRate=0;\r
+int WaveLen=0; // Length of each buffer in samples\r
+short *WaveDest=NULL; // Destination to render sound\r
+\r
+static HWAVEOUT WaveOut=NULL;\r
+static short *WaveBuf=NULL; // Wave double-buffer\r
+static WAVEHDR WaveHeader[2]; // WAVEHDR for each buffer\r
+static int WavePlay=0; // Next buffer side to play\r
+\r
+int WaveInit()\r
+{\r
+ WAVEFORMATEX wfx;\r
+ WAVEHDR *pwh=NULL;\r
+\r
+ if (WaveOut) return 0; // Already initted\r
+\r
+ memset(&wfx,0,sizeof(wfx));\r
+ memset(&WaveHeader,0,sizeof(WaveHeader));\r
+\r
+ wfx.wFormatTag=WAVE_FORMAT_PCM;\r
+ wfx.nChannels=2; // stereo\r
+ wfx.nSamplesPerSec=WaveRate; // sample rate\r
+ wfx.wBitsPerSample=16;\r
+ // Calculate bytes per sample and per second\r
+ wfx.nBlockAlign=(unsigned short)( (wfx.wBitsPerSample>>3)*wfx.nChannels );\r
+ wfx.nAvgBytesPerSec=wfx.nSamplesPerSec*wfx.nBlockAlign;\r
+\r
+ waveOutOpen(&WaveOut,WAVE_MAPPER,&wfx,0,NULL,CALLBACK_NULL);\r
+\r
+ // Allocate both buffers\r
+ WaveBuf=(short *)malloc(WaveLen<<3);\r
+ if (WaveBuf==NULL) return 1;\r
+ memset(WaveBuf,0,WaveLen<<3);\r
+\r
+ // Make WAVEHDRs for both buffers\r
+ pwh=WaveHeader+0;\r
+ pwh->lpData=(char *)WaveBuf;\r
+ pwh->dwBufferLength=WaveLen<<2;\r
+ pwh->dwLoops=1;\r
+\r
+ pwh=WaveHeader+1;\r
+ *pwh=WaveHeader[0]; pwh->lpData+=WaveLen<<2;\r
+\r
+ // Prepare the buffers\r
+ waveOutPrepareHeader(WaveOut,WaveHeader, sizeof(WAVEHDR));\r
+ waveOutPrepareHeader(WaveOut,WaveHeader+1,sizeof(WAVEHDR));\r
+\r
+ // Queue both buffers:\r
+ WavePlay=0;\r
+ WaveHeader[0].dwFlags|=WHDR_DONE;\r
+ WaveHeader[1].dwFlags|=WHDR_DONE;\r
+ WaveUpdate();\r
+ return 0;\r
+}\r
+\r
+int WaveExit()\r
+{\r
+ WAVEHDR *pwh=NULL;\r
+ int i=0;\r
+\r
+ if (WaveOut) waveOutReset(WaveOut);\r
+\r
+ for (i=0;i<2;i++)\r
+ {\r
+ pwh=WaveHeader+i;\r
+ if (pwh->lpData) waveOutUnprepareHeader(WaveOut,pwh,sizeof(*pwh));\r
+ }\r
+ memset(WaveHeader,0,sizeof(WaveHeader));\r
+\r
+ free(WaveBuf); WaveBuf=NULL; WaveLen=0;\r
+\r
+ if (WaveOut) waveOutClose(WaveOut); WaveOut=NULL;\r
+ return 0;\r
+}\r
+\r
+int WaveUpdate()\r
+{\r
+ WAVEHDR *pwh=NULL; int i=0;\r
+ int Last=-1;\r
+\r
+ for (i=0;i<2;i++)\r
+ {\r
+ pwh=WaveHeader+WavePlay;\r
+ if (pwh->lpData==NULL) return 1; // Not initted\r
+\r
+ if (pwh->dwFlags&WHDR_DONE)\r
+ {\r
+ // This buffer has finished - start it playing again\r
+ WaveDest=(short *)pwh->lpData;\r
+ SndRender();\r
+ WaveDest=NULL;\r
+ \r
+ waveOutWrite(WaveOut,pwh,sizeof(*pwh));\r
+ Last=WavePlay; // Remember the last buffer we played\r
+ }\r
+\r
+ WavePlay++; WavePlay&=1;\r
+ }\r
+\r
+ if (Last>=0) WavePlay=Last^1; // Next buffer to play is the other one\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#include "stdafx.h"\r
+#include <stdarg.h>\r
+\r
+static FILE *DebugFile=NULL;\r
+int Main3800=0;\r
+int WINAPI WinMain(HINSTANCE,HINSTANCE,LPTSTR,int)\r
+{\r
+ MSG msg; int ret=0;\r
+ TCHAR device[260];\r
+\r
+ memset(&msg,0,sizeof(msg));\r
+ memset(device,0,sizeof(device));\r
+\r
+ // Check if this program is running already:\r
+ FrameWnd=FindWindow(APP_TITLE,NULL);\r
+ if (FrameWnd!=NULL) { SetForegroundWindow(FrameWnd); return 0; }\r
+\r
+ DeleteFile(L"zout.txt");\r
+\r
+ SystemParametersInfo(SPI_GETOEMINFO,sizeof(device)>>1,device,0);\r
+ if (_wcsicmp(device,L"compaq ipaq h3800")==0) Main3800=1;\r
+\r
+ FrameInit();\r
+\r
+ ConfigInit();\r
+ ConfigLoad();\r
+\r
+ WaveRate=44100; WaveLen=735;\r
+ WaveInit();\r
+\r
+ for(;;)\r
+ {\r
+ ret=PeekMessage(&msg,NULL,0,0,PM_REMOVE);\r
+ if (ret)\r
+ {\r
+ if (msg.message==WM_QUIT) break;\r
+ TranslateMessage(&msg);\r
+ DispatchMessage(&msg);\r
+ }\r
+ else\r
+ {\r
+ EmulateFrame();\r
+ //WaveUpdate();\r
+ Sleep(1);\r
+ }\r
+ }\r
+\r
+ WaveExit();\r
+ EmulateExit();\r
+\r
+ ConfigSave();\r
+\r
+ DestroyWindow(FrameWnd);\r
+\r
+ if (DebugFile) fclose(DebugFile);\r
+ DebugFile=NULL;\r
+ return 0;\r
+}\r
+\r
+extern "C" int dprintf(char *Format, ...)\r
+{\r
+ va_list VaList=NULL;\r
+ va_start(VaList,Format);\r
+\r
+ if (DebugFile==NULL) DebugFile=fopen("zout.txt","wt");\r
+ if (DebugFile) vfprintf(DebugFile,Format,VaList);\r
+\r
+ va_end(VaList);\r
+ return 0;\r
+}\r
--- /dev/null
+\r
+#define WIN32_LEAN_AND_MEAN\r
+#include <windows.h>\r
+#include <aygshell.h>\r
+#include <commctrl.h>\r
+#define I_IMAGENONE (-2)\r
+#define SHMENUBAR RCDATA\r
--- /dev/null
+//{{NO_DEPENDENCIES}}\r
+// Microsoft Developer Studio generated include file.\r
+// Used by Script1.rc\r
+//\r
+#define IDR_MENUBAR1 101\r
+#define ID_LOADROM 40001\r
+#define IDS_CAP_LOADROM 40003\r
+#define IDS_CAP_CLOSE 40006\r
+#define ID_DEBUG_SHOWRAM 40010\r
+#define ID_GRAB 40012\r
+#define IDS_CAP_GRAB 40014\r
+#define ID_OPTIONS 40015\r
+#define IDS_CAP_OPTIONS 40017\r
+#define ID_OPTIONS_SAVE 40018\r
+#define ID_OPTIONS_LOAD 40019\r
+#define ID_OPTIONS_GRAB 40020\r
+\r
+// Next default values for new objects\r
+// \r
+#ifdef APSTUDIO_INVOKED\r
+#ifndef APSTUDIO_READONLY_SYMBOLS\r
+#define _APS_NEXT_RESOURCE_VALUE 104\r
+#define _APS_NEXT_COMMAND_VALUE 40021\r
+#define _APS_NEXT_CONTROL_VALUE 1000\r
+#define _APS_NEXT_SYMED_VALUE 101\r
+#endif\r
+#endif\r
--- /dev/null
+\r
+#pragma warning(disable:4514)\r
+#pragma warning(push)\r
+#pragma warning(disable:4201)\r
+#include <windows.h>\r
+#pragma warning(pop)\r
+\r
+#include <aygshell.h>\r
+#include <commdlg.h>\r
+#include <gx.h>\r
+\r
+#include "resource.h"\r
+\r
+#include "../Pico/Pico.h"\r
+\r
+#define APP_TITLE L"PicoDrive"\r
+\r
+// ----------------------------------------------------------\r
+\r
+struct Target\r
+{\r
+ unsigned char *screen;\r
+ POINT point; // Screen to client point\r
+ RECT view,update;\r
+ int offset; // Amount to add onto scanline\r
+ int top,bottom; // Update rectangle in screen coordinates\r
+};\r
+\r
+// Config.cpp\r
+struct Config\r
+{\r
+ int key[8];\r
+};\r
+extern struct Config Config;\r
+\r
+int ConfigInit();\r
+int ConfigSave();\r
+int ConfigLoad();\r
+\r
+// Debug.cpp\r
+int DebugShowRam();\r
+int DebugScreenGrab();\r
+\r
+// Emulate.cpp\r
+extern struct Target Targ;\r
+extern TCHAR RomName[260];\r
+int EmulateInit();\r
+void EmulateExit();\r
+int EmulateFrame();\r
+int SndRender();\r
+\r
+// File.cpp\r
+int FileLoadRom();\r
+int FileState(int load);\r
+\r
+// FrameWindow.cpp\r
+extern HWND FrameWnd;\r
+extern struct GXDisplayProperties GXDisp;\r
+extern struct GXKeyList GXKey;\r
+extern int FrameShowRam;\r
+int FrameInit();\r
+\r
+// Wave.cpp\r
+extern int WaveRate;\r
+extern int WaveLen; // Length of each buffer in samples\r
+extern short *WaveDest; // Destination to render sound\r
+int WaveInit();\r
+int WaveExit();\r
+int WaveUpdate();\r
+\r
+// WinMain.cpp\r
+extern "C" int dprintf(char *Format, ...);\r
+extern int Main3800;\r