From 52ac6b1c8f65fe2477ffc3a7fc63ca8ae9d7e59f Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 16 Jun 2013 19:29:47 +0300 Subject: [PATCH] restructure the repository to be Cyclone only --- Cyclone/Cyclone.h => Cyclone.h | 0 Cyclone/Cyclone.txt => Cyclone.txt | 0 Cyclone/Cyclone.dsp | 170 ---- Cyclone/Cyclone.dsw | 29 - Cyclone/DoClean.bat | 20 - {Cyclone/Disa => Disa}/Disa.c | 0 {Cyclone/Disa => Disa}/Disa.h | 0 Cyclone/Ea.cpp => Ea.cpp | 0 Cyclone/Main.cpp => Main.cpp | 0 Cyclone/Makefile => Makefile | 0 Cyclone/OpAny.cpp => OpAny.cpp | 0 Cyclone/OpArith.cpp => OpArith.cpp | 0 Cyclone/OpBranch.cpp => OpBranch.cpp | 0 Cyclone/OpLogic.cpp => OpLogic.cpp | 0 Cyclone/OpMove.cpp => OpMove.cpp | 0 Pico/Area.cpp | 172 ----- Pico/Cart.cpp | 101 --- Pico/Disa.c | 855 -------------------- Pico/Disa.h | 33 - Pico/Draw.cpp | 357 --------- Pico/MakeSine.bat | 4 - Pico/MakeSine.cpp | 47 -- Pico/Makefile | 17 - Pico/Makefile.mir | 25 - Pico/Makefile.symb | 41 - Pico/Memory.cpp | 260 ------- Pico/Pico.cpp | 224 ------ Pico/Pico.dsp | 172 ----- Pico/Pico.dsw | 29 - Pico/Pico.h | 62 -- Pico/Pico.vcp | 1074 -------------------------- Pico/Pico.vcw | 29 - Pico/PicoInt.h | 141 ---- Pico/Profile.cpp | 59 -- Pico/Psnd.cpp | 254 ------ Pico/Sek.cpp | 142 ---- Pico/Sine.cpp | 36 - Pico/SymbianClean.bat | 2 - Pico/SymbianMake.bat | 3 - Pico/Utils.cpp | 85 -- Pico/VideoPort.cpp | 231 ------ Pico/driver.h | 29 - PicoDrive/Config.cpp | 95 --- PicoDrive/Debug.cpp | 89 --- PicoDrive/Emulate.cpp | 226 ------ PicoDrive/File.cpp | 71 -- PicoDrive/FrameWindow.cpp | 101 --- PicoDrive/PicoDrive.txt | 191 ----- PicoDrive/PicoDrive.vcp | 851 -------------------- PicoDrive/PicoDrive.vcw | 44 -- PicoDrive/Script1.rc | 116 --- PicoDrive/Wave.cpp | 114 --- PicoDrive/WinMain.cpp | 80 -- PicoDrive/afxres.h | 16 - PicoDrive/resource.h | 27 - PicoDrive/stdafx.h | 82 -- Cyclone/app.h => app.h | 0 Cyclone/config.h => config.h | 0 58 files changed, 6806 deletions(-) rename Cyclone/Cyclone.h => Cyclone.h (100%) rename Cyclone/Cyclone.txt => Cyclone.txt (100%) delete mode 100644 Cyclone/Cyclone.dsp delete mode 100644 Cyclone/Cyclone.dsw delete mode 100644 Cyclone/DoClean.bat rename {Cyclone/Disa => Disa}/Disa.c (100%) rename {Cyclone/Disa => Disa}/Disa.h (100%) rename Cyclone/Ea.cpp => Ea.cpp (100%) rename Cyclone/Main.cpp => Main.cpp (100%) rename Cyclone/Makefile => Makefile (100%) rename Cyclone/OpAny.cpp => OpAny.cpp (100%) rename Cyclone/OpArith.cpp => OpArith.cpp (100%) rename Cyclone/OpBranch.cpp => OpBranch.cpp (100%) rename Cyclone/OpLogic.cpp => OpLogic.cpp (100%) rename Cyclone/OpMove.cpp => OpMove.cpp (100%) delete mode 100644 Pico/Area.cpp delete mode 100644 Pico/Cart.cpp delete mode 100644 Pico/Disa.c delete mode 100644 Pico/Disa.h delete mode 100644 Pico/Draw.cpp delete mode 100644 Pico/MakeSine.bat delete mode 100644 Pico/MakeSine.cpp delete mode 100644 Pico/Makefile delete mode 100644 Pico/Makefile.mir delete mode 100644 Pico/Makefile.symb delete mode 100644 Pico/Memory.cpp delete mode 100644 Pico/Pico.cpp delete mode 100644 Pico/Pico.dsp delete mode 100644 Pico/Pico.dsw delete mode 100644 Pico/Pico.h delete mode 100644 Pico/Pico.vcp delete mode 100644 Pico/Pico.vcw delete mode 100644 Pico/PicoInt.h delete mode 100644 Pico/Profile.cpp delete mode 100644 Pico/Psnd.cpp delete mode 100644 Pico/Sek.cpp delete mode 100644 Pico/Sine.cpp delete mode 100644 Pico/SymbianClean.bat delete mode 100644 Pico/SymbianMake.bat delete mode 100644 Pico/Utils.cpp delete mode 100644 Pico/VideoPort.cpp delete mode 100644 Pico/driver.h delete mode 100644 PicoDrive/Config.cpp delete mode 100644 PicoDrive/Debug.cpp delete mode 100644 PicoDrive/Emulate.cpp delete mode 100644 PicoDrive/File.cpp delete mode 100644 PicoDrive/FrameWindow.cpp delete mode 100644 PicoDrive/PicoDrive.txt delete mode 100644 PicoDrive/PicoDrive.vcp delete mode 100644 PicoDrive/PicoDrive.vcw delete mode 100644 PicoDrive/Script1.rc delete mode 100644 PicoDrive/Wave.cpp delete mode 100644 PicoDrive/WinMain.cpp delete mode 100644 PicoDrive/afxres.h delete mode 100644 PicoDrive/resource.h delete mode 100644 PicoDrive/stdafx.h rename Cyclone/app.h => app.h (100%) rename Cyclone/config.h => config.h (100%) diff --git a/Cyclone/Cyclone.h b/Cyclone.h similarity index 100% rename from Cyclone/Cyclone.h rename to Cyclone.h diff --git a/Cyclone/Cyclone.txt b/Cyclone.txt similarity index 100% rename from Cyclone/Cyclone.txt rename to Cyclone.txt diff --git a/Cyclone/Cyclone.dsp b/Cyclone/Cyclone.dsp deleted file mode 100644 index f40bf42..0000000 --- a/Cyclone/Cyclone.dsp +++ /dev/null @@ -1,170 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Cyclone" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Cyclone - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Cyclone.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Cyclone.mak" CFG="Cyclone - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Cyclone - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Cyclone - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Cyclone - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 user32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "Cyclone - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 user32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "Cyclone - Win32 Release" -# Name "Cyclone - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Cyclone.txt -# End Source File -# Begin Source File - -SOURCE=.\Ea.cpp -# End Source File -# Begin Source File - -SOURCE=.\Main.cpp -# End Source File -# Begin Source File - -SOURCE=.\OpAny.cpp -# End Source File -# Begin Source File - -SOURCE=.\OpArith.cpp -# End Source File -# Begin Source File - -SOURCE=.\OpBranch.cpp -# End Source File -# Begin Source File - -SOURCE=.\OpLogic.cpp -# End Source File -# Begin Source File - -SOURCE=.\OpMove.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\app.h -# End Source File -# Begin Source File - -SOURCE=.\Cyclone.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Group "Output" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Cyclone.asm -# End Source File -# Begin Source File - -SOURCE=.\Cyclone.s -# End Source File -# End Group -# Begin Group "Disassembler" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Disa\Disa.c -# End Source File -# Begin Source File - -SOURCE=.\Disa\Disa.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\EmuInfo\68000\680x0bin.txt -# End Source File -# Begin Source File - -SOURCE=..\bits.txt -# End Source File -# End Target -# End Project diff --git a/Cyclone/Cyclone.dsw b/Cyclone/Cyclone.dsw deleted file mode 100644 index a783183..0000000 --- a/Cyclone/Cyclone.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Cyclone"=.\Cyclone.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/Cyclone/DoClean.bat b/Cyclone/DoClean.bat deleted file mode 100644 index e0119d4..0000000 --- a/Cyclone/DoClean.bat +++ /dev/null @@ -1,20 +0,0 @@ -ren Cyclone.obj Cyclone.ob_ - -del Cyclone.asm -del Cyclone.s -del Cyclone.exe -del *.obj -del vc60.idb -del vc60.pdb -del Cyclone.plg -del Cyclone.ncb -del Cyclone.pch -del Cyclone.ilk -del Cyclone.pdb - -del /q Release\*.* -rd Release -del /q Debug\*.* -rd Debug - -ren Cyclone.ob_ Cyclone.obj diff --git a/Cyclone/Disa/Disa.c b/Disa/Disa.c similarity index 100% rename from Cyclone/Disa/Disa.c rename to Disa/Disa.c diff --git a/Cyclone/Disa/Disa.h b/Disa/Disa.h similarity index 100% rename from Cyclone/Disa/Disa.h rename to Disa/Disa.h diff --git a/Cyclone/Ea.cpp b/Ea.cpp similarity index 100% rename from Cyclone/Ea.cpp rename to Ea.cpp diff --git a/Cyclone/Main.cpp b/Main.cpp similarity index 100% rename from Cyclone/Main.cpp rename to Main.cpp diff --git a/Cyclone/Makefile b/Makefile similarity index 100% rename from Cyclone/Makefile rename to Makefile diff --git a/Cyclone/OpAny.cpp b/OpAny.cpp similarity index 100% rename from Cyclone/OpAny.cpp rename to OpAny.cpp diff --git a/Cyclone/OpArith.cpp b/OpArith.cpp similarity index 100% rename from Cyclone/OpArith.cpp rename to OpArith.cpp diff --git a/Cyclone/OpBranch.cpp b/OpBranch.cpp similarity index 100% rename from Cyclone/OpBranch.cpp rename to OpBranch.cpp diff --git a/Cyclone/OpLogic.cpp b/OpLogic.cpp similarity index 100% rename from Cyclone/OpLogic.cpp rename to OpLogic.cpp diff --git a/Cyclone/OpMove.cpp b/OpMove.cpp similarity index 100% rename from Cyclone/OpMove.cpp rename to OpMove.cpp diff --git a/Pico/Area.cpp b/Pico/Area.cpp deleted file mode 100644 index 499ad37..0000000 --- a/Pico/Area.cpp +++ /dev/null @@ -1,172 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -int (*PicoAcb)(struct PicoArea *)=NULL; // Area callback for each block of memory -FILE *PmovFile=NULL; -int PmovAction=0; - -// Scan one variable and callback -static void ScanVar(void *data,int len,char *name) -{ - struct PicoArea pa={NULL,0,NULL}; - pa.data=data; pa.len=len; pa.name=name; - if (PicoAcb) PicoAcb(&pa); -} - -#define SCAN_VAR(x,y) ScanVar(&x,sizeof(x),y); -#define SCANP(x) ScanVar(&Pico.x,sizeof(Pico.x),#x); - -// Pack the cpu into a common format: -static int PackCpu(unsigned char *cpu) -{ - unsigned int pc=0; - -#ifdef EMU_A68K - memcpy(cpu,M68000_regs.d,0x40); - pc=M68000_regs.pc; - *(unsigned char *)(cpu+0x44)=(unsigned char)M68000_regs.ccr; - *(unsigned char *)(cpu+0x45)=(unsigned char)M68000_regs.srh; - *(unsigned int *)(cpu+0x48)=M68000_regs.isp; -#endif - -#ifdef EMU_C68K - memcpy(cpu,PicoCpu.d,0x40); - pc=PicoCpu.pc-PicoCpu.membase; - *(unsigned char *)(cpu+0x44)=PicoCpu.ccr; - *(unsigned char *)(cpu+0x45)=PicoCpu.srh; - *(unsigned int *)(cpu+0x48)=PicoCpu.osp; -#endif - - *(unsigned int *)(cpu+0x40)=pc; - return 0; -} - -static int UnpackCpu(unsigned char *cpu) -{ - unsigned int pc=0; - - pc=*(unsigned int *)(cpu+0x40); - -#ifdef EMU_A68K - memcpy(M68000_regs.d,cpu,0x40); - M68000_regs.pc=pc; - M68000_regs.ccr=*(unsigned char *)(cpu+0x44); - M68000_regs.srh=*(unsigned char *)(cpu+0x45); - M68000_regs.isp=*(unsigned int *)(cpu+0x48); -#endif - -#ifdef EMU_C68K - memcpy(PicoCpu.d,cpu,0x40); - PicoCpu.membase=0; - PicoCpu.pc =PicoCpu.checkpc(pc); // Base pc - PicoCpu.ccr=*(unsigned char *)(cpu+0x44); - PicoCpu.srh=*(unsigned char *)(cpu+0x45); - PicoCpu.osp=*(unsigned int *)(cpu+0x48); -#endif - return 0; -} - -// Scan the contents of the virtual machine's memory for saving or loading -int PicoAreaScan(int action,int *pmin) -{ - unsigned char cpu[0x60]; - - memset(&cpu,0,sizeof(cpu)); - - if (action&4) - { - // Scan all the memory areas: - SCANP(ram) SCANP(vram) SCANP(zram) SCANP(cram) SCANP(vsram) - - // Pack, scan and unpack the cpu data: - PackCpu(cpu); - SekInit(); - PicoMemInit(); - SCAN_VAR(cpu,"cpu") - UnpackCpu(cpu); - - SCAN_VAR(Pico.m ,"misc") - SCAN_VAR(Pico.video,"video") - SCAN_VAR(Pico.s ,"sound") - - Pico.m.scanline=0; - if (action&2) - { - memset(Pico.highpal,0,sizeof(Pico.highpal)); - Pico.m.dirtyPal=1; // Recalculate palette - } - } - - if (pmin) *pmin=0x0021; - - return 0; -} - -// --------------------------------------------------------------------------- -// Helper code to save/load to a file handle - -// Area callback for each piece of Megadrive memory, read or write to the file: -static int StateAcb(struct PicoArea *pa) -{ - if (PmovFile==NULL) return 1; - - if ((PmovAction&3)==1) fwrite(pa->data,1,pa->len,PmovFile); - if ((PmovAction&3)==2) fread (pa->data,1,pa->len,PmovFile); - return 0; -} - -// Save or load the state from PmovFile: -int PmovState() -{ - int minimum=0; - unsigned char head[32]; - - memset(head,0,sizeof(head)); - - // Find out minial compatible version: - PicoAreaScan(PmovAction&0xc,&minimum); - - memcpy(head,"Pico",4); - *(unsigned int *)(head+0x8)=PicoVer; - *(unsigned int *)(head+0xc)=minimum; - - // Scan header: - if (PmovAction&1) fwrite(head,1,sizeof(head),PmovFile); - if (PmovAction&2) fread (head,1,sizeof(head),PmovFile); - - // Scan memory areas: - PicoAcb=StateAcb; - PicoAreaScan(PmovAction,NULL); - PicoAcb=NULL; - return 0; -} - -int PmovUpdate() -{ - int ret=0; - if (PmovFile==NULL) return 1; - - if ((PmovAction&3)==0) return 0; - - PicoPad[1]=0; // Make sure pad #2 is blank - if (PmovAction&1) ret=fwrite(PicoPad,1,2,PmovFile); - if (PmovAction&2) ret=fread (PicoPad,1,2,PmovFile); - - if (ret!=2) - { - // End of file - fclose(PmovFile); PmovFile=NULL; - PmovAction=0; - } - - return 0; -} diff --git a/Pico/Cart.cpp b/Pico/Cart.cpp deleted file mode 100644 index 23c6e60..0000000 --- a/Pico/Cart.cpp +++ /dev/null @@ -1,101 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -static void Byteswap(unsigned char *data,int len) -{ - int i=0; - - if (len<2) return; // Too short - - do - { - unsigned short *pd=(unsigned short *)(data+i); - int value=*pd; // Get 2 bytes - - value=(value<<8)|(value>>8); // Byteswap it - *pd=(unsigned short)value; // Put 2b ytes - i+=2; - } - while (i+2<=len); -} - -// Interleve a 16k block and byteswap -static int InterleveBlock(unsigned char *dest,unsigned char *src) -{ - int i=0; - for (i=0;i<0x2000;i++) dest[(i<<1) ]=src[ i]; // Odd - for (i=0;i<0x2000;i++) dest[(i<<1)+1]=src[0x2000+i]; // Even - return 0; -} - -// Decode a SMD file -static int DecodeSmd(unsigned char *data,int len) -{ - unsigned char *temp=NULL; - int i=0; - - temp=(unsigned char *)malloc(0x4000); - if (temp==NULL) return 1; - memset(temp,0,0x4000); - - // Interleve each 16k block and shift down by 0x200: - for (i=0; i+0x4200<=len; i+=0x4000) - { - InterleveBlock(temp,data+0x200+i); // Interleve 16k to temporary buffer - memcpy(data+i,temp,0x4000); // Copy back in - } - - free(temp); - return 0; -} - -int PicoCartLoad(FILE *f,unsigned char **prom,unsigned int *psize) -{ - unsigned char *rom=NULL; int size=0; - if (f==NULL) return 1; - - fseek(f,0,SEEK_END); size=ftell(f); fseek(f,0,SEEK_SET); - - size=(size+3)&~3; // Round up to a multiple of 4 - - // Allocate space for the rom plus padding - rom=(unsigned char *)malloc(size+4); - if (rom==NULL) { fclose(f); return 1; } - memset(rom,0,size+4); - - fread(rom,1,size,f); // Load up the rom - fclose(f); - - // Check for SMD: - if ((size&0x3fff)==0x200) { DecodeSmd(rom,size); size-=0x200; } // Decode and byteswap SMD - else Byteswap(rom,size); // Just byteswap - - if (prom) *prom=rom; - if (psize) *psize=size; - - return 0; -} - -// Insert/remove a cartridge: -int PicoCartInsert(unsigned char *rom,unsigned int romsize) -{ - // Make sure movie playing/recording is stopped: - if (PmovFile) fclose(PmovFile); - PmovFile=NULL; PmovAction=0; - - memset(&Pico,0,sizeof(Pico)); // Blank Pico state - Pico.rom=rom; - Pico.romsize=romsize; - PicoReset(); - - return 0; -} diff --git a/Pico/Disa.c b/Pico/Disa.c deleted file mode 100644 index 01a54bc..0000000 --- a/Pico/Disa.c +++ /dev/null @@ -1,855 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -// Disa 68000 Disassembler -#ifndef __GNUC__ -#pragma warning(disable:4115) -#endif - -#define _CRT_SECURE_NO_WARNINGS -#include -#include -#include "Disa.h" - -unsigned int DisaPc=0; -char *DisaText=NULL; // Text buffer to write in -static char Tasm[]="bwl?"; -static char Comment[64]=""; -unsigned short (CPU_CALL *DisaWord)(unsigned int a)=NULL; - -static unsigned int DisaLong(unsigned int a) -{ - unsigned int d=0; - if (DisaWord==NULL) return d; - - d= DisaWord(a)<<16; - d|=DisaWord(a+2)&0xffff; - return d; -} - -// Get text version of the effective address -int DisaGetEa(char *t,int ea,int size) -{ - ea&=0x3f; t[0]=0; - if ((ea&0x38)==0x00) { sprintf(t,"d%d",ea ); return 0; } // 000rrr - if ((ea&0x38)==0x08) { sprintf(t,"a%d",ea&7); return 0; } // 001rrr - if ((ea&0x38)==0x10) { sprintf(t,"(a%d)",ea&7); return 0; } // 010rrr - if ((ea&0x38)==0x18) { sprintf(t,"(a%d)+",ea&7); return 0; } // 011rrr - if ((ea&0x38)==0x20) { sprintf(t,"-(a%d)",ea&7); return 0; } // 100rrr - if ((ea&0x38)==0x28) { sprintf(t,"($%x,a%d)",DisaWord(DisaPc)&0xffff,ea&7); DisaPc+=2; return 0; } // 101rrr - - if ((ea&0x38)==0x30) - { - // 110nnn - An + Disp + D/An - int areg=0,ext=0,off=0,da=0,reg=0,wol=0,scale=0; - ext=DisaWord(DisaPc)&0xffff; - - areg=ea&7; - off=ext&0xff; da =ext&0x8000?'a':'d'; - reg=(ext>>12)&7; wol=ext&0x0800?'l':'w'; - scale=1<<((ext>>9)&3); - - if (scale<2) sprintf(t,"($%x,a%d,%c%d.%c)", off,areg,da,reg,wol); - else sprintf(t,"($%x,a%d,%c%d.%c*%d)",off,areg,da,reg,wol,scale); // 68020 - - DisaPc+=2; - return 0; - } - - if (ea==0x38) { sprintf(t,"$%x.w",DisaWord(DisaPc)&0xffff); DisaPc+=2; return 0; } // 111000 - Absolute short - if (ea==0x39) { sprintf(t,"$%x.l",DisaLong(DisaPc)); DisaPc+=4; return 0; } // 111001 - Absolute long - - if (ea==0x3a) - { - // 111010 - PC Relative - int ext=DisaWord(DisaPc)&0xffff; - sprintf(t,"($%x,pc)",ext); - sprintf(Comment,"; =%x",DisaPc+(short)ext); // Comment where pc+ext is - DisaPc+=2; - return 0; - } - - if (ea==0x3b) - { - // 111011 - PC Relative + D/An - int ext=0,off=0,da=0,reg=0,wol=0,scale=0; - ext=DisaWord(DisaPc)&0xffff; - - off=ext&0xff; da =ext&0x8000?'a':'d'; - reg=(ext>>12)&7; wol=ext&0x0800?'l':'w'; - scale=1<<((ext>>9)&3); - - if (scale<2) sprintf(t,"($%x,pc,%c%d.%c)", off,da,reg,wol); - else sprintf(t,"($%x,pc,%c%d.%c*%d)",off,da,reg,wol,scale); // 68020 - - sprintf(Comment,"; =%x",DisaPc+(char)off); // Comment where pc+ext is - DisaPc+=2; - return 0; - } - - if (ea==0x3c) - { - // 111100 - Immediate - switch (size) - { - case 0: sprintf(t,"#$%x",DisaWord(DisaPc)&0x00ff); DisaPc+=2; return 0; - case 1: sprintf(t,"#$%x",DisaWord(DisaPc)&0xffff); DisaPc+=2; return 0; - case 2: sprintf(t,"#$%x",DisaLong(DisaPc) ); DisaPc+=4; return 0; - } - return 1; - } - -// Unknown effective address - sprintf(t,"ea=(%d%d%d %d%d%d)", - (ea>>5)&1,(ea>>4)&1,(ea>>3)&1, - (ea>>2)&1,(ea>>1)&1, ea &1); - return 1; -} - -static void GetOffset(char *text) -{ - int off=(short)DisaWord(DisaPc); DisaPc+=2; - - if (off<0) sprintf(text,"-$%x",-off); - else sprintf(text,"$%x", off); -} - -// ================ Opcodes 0x0000+ ================ -static int DisaArithImm(int op) -{ - // Or/And/Sub/Add/Eor/Cmp Immediate 0000ttt0 xxDDDddd (tt=type, xx=size extension, DDDddd=Dest ea) - int dea=0; - char seat[64]="",deat[64]=""; - int type=0,size=0; - char *arith[8]={"or","and","sub","add","?","eor","cmp","?"}; - - type=(op>>9)&7; if (type==4 || type>=7) return 1; - size=(op>>6)&3; if (size>=3) return 1; - dea=op&0x3f; if (dea==0x3c) return 1; - - DisaGetEa(seat,0x3c,size); - DisaGetEa(deat,dea, size); - - sprintf(DisaText,"%si.%c %s, %s",arith[type],Tasm[size],seat,deat); - return 0; -} - -// ================ Opcodes 0x0108+ ================ -static int DisaMovep(int op) -{ - // movep.x (Aa),Dn - 0000nnn1 dx001aaa nn - int dn=0,dir=0,size=0,an=0; - char offset[32]=""; - - dn =(op>>9)&7; - dir =(op>>7)&1; - size=(op>>6)&1; size++; - an = op &7; - - GetOffset(offset); - if (dir) sprintf(DisaText,"movep.%c d%d, (%s,a%d)",Tasm[size],dn,offset,an); - else sprintf(DisaText,"movep.%c (%s,a%d), d%d",Tasm[size],offset,an,dn); - - return 0; -} - -// ================ Opcodes 0x007c+ ================ -static int DisaArithSr(int op) -{ - // Ori/Andi/Eori $nnnn,sr 0000t0tx 0s111100 - char *opcode[6]={"ori","andi","","","","eori"}; - char seat[64]=""; - int type=0,size=0; - - type=(op>>9)&5; - size=(op>>6)&1; - - DisaGetEa(seat,0x3c,size); - sprintf(DisaText,"%s.%c %s, %s", opcode[type], Tasm[size], seat, size?"sr":"ccr"); - - return 0; -} - -// ================ Opcodes 0x0100+ ================ -static int DisaBtstReg(int op) -{ - // Btst/Bchg/Bclr/Bset 0000nnn1 tteeeeee (nn=reg number, eeeeee=Dest ea) - int type=0; - int sea=0,dea=0; - char seat[64]="",deat[64]=""; - char *opcode[4]={"btst","bchg","bclr","bset"}; - - sea =(op>>9)&7; - type=(op>>6)&3; - dea= op&0x3f; - - if ((dea&0x38)==0x08) return 1; // movep - DisaGetEa(seat,sea,0); - DisaGetEa(deat,dea,0); - - sprintf(DisaText,"%s %s, %s",opcode[type],seat,deat); - return 0; -} - -// ================ Opcodes 0x0800+ ================ -static int DisaBtstImm(int op) -{ - // Btst/Bchg/Bclr/Bset 00001000 tteeeeee 00 nn (eeeeee=ea, nn=bit number) - int type=0; - char seat[64]="",deat[64]=""; - char *opcode[4]={"btst","bchg","bclr","bset"}; - - type=(op>>6)&3; - DisaGetEa(seat, 0x3c,0); - DisaGetEa(deat,op&0x3f,0); - - sprintf(DisaText,"%s %s, %s",opcode[type],seat,deat); - return 0; -} - -// ================ Opcodes 0x1000+ ================ -static int DisaMove(int op) -{ - // Move 00xxdddD DDssssss (xx=size extension, ssssss=Source EA, DDDddd=Dest ea) - int sea=0,dea=0; - char inst[64]="",seat[64]="",deat[64]=""; - char *movea=""; - int size=0; - - if ((op&0x01c0)==0x0040) movea="a"; // See if it's a movea opcode - - // Find size extension - switch (op&0x3000) - { - case 0x1000: size=0; break; - case 0x3000: size=1; break; - case 0x2000: size=2; break; - default: return 1; - } - - sea = op&0x003f; - DisaGetEa(seat,sea,size); - - dea =(op&0x01c0)>>3; - dea|=(op&0x0e00)>>9; - DisaGetEa(deat,dea,size); - - sprintf(inst,"move%s.%c",movea,Tasm[size]); - sprintf(DisaText,"%s %s, %s",inst,seat,deat); - return 0; -} - -// ================ Opcodes 0x4000+ ================ -static int DisaNeg(int op) -{ - // 01000tt0 xxeeeeee (tt=negx/clr/neg/not, xx=size, eeeeee=EA) - char eat[64]=""; - int type=0,size=0; - char *opcode[4]={"negx","clr","neg","not"}; - - type=(op>>9)&3; - size=(op>>6)&3; if (size>=3) return 1; - DisaGetEa(eat,op&0x3f,size); - - sprintf(DisaText,"%s.%c %s",opcode[type],Tasm[size],eat); - return 0; -} - -// ================ Opcodes 0x40c0+ ================ -static int DisaMoveSr(int op) -{ - // 01000tt0 11eeeeee (tt=type, xx=size, eeeeee=EA) - int type=0,ea=0; - char eat[64]=""; - - type=(op>>9)&3; - ea=op&0x3f; - DisaGetEa(eat,ea,1); - - switch (type) - { - default: sprintf(DisaText,"move sr, %s", eat); break; - case 1: sprintf(DisaText,"move ccr, %s",eat); break; - case 2: sprintf(DisaText,"move %s, ccr",eat); break; - case 3: sprintf(DisaText,"move %s, sr", eat); break; - } - return 0; -} - -// ================ Opcodes 0x41c0+ ================ -static int DisaLea(int op) -{ - // Lea 0100nnn1 11eeeeee (eeeeee=ea) - int sea=0,dea=0; - char seat[64]="",deat[64]=""; - - sea=op&0x003f; - DisaGetEa(seat,sea,0); - - dea=(op>>9)&7; dea|=8; - DisaGetEa(deat,dea,2); - - sprintf(DisaText,"lea %s, %s",seat,deat); - return 0; -} - -static int MakeRegList(char *list,int mask,int ea) -{ - int reverse=0,i=0,low=0,len=0; - - if ((ea&0x38)==0x20) reverse=1; // -(An), bitfield is reversed - - mask&=0xffff; list[0]=0; - - for (i=0;i<17;i++) - { - int bit=0; - - // Mask off bit i: - if (reverse) bit=0x8000>>i; else bit=1<0) if (list[len-1]=='/') list[len-1]=0; - return 0; -} - -// ================ Opcodes 0x4840+ ================ -static int DisaSwap(int op) -{ - // Swap, 01001000 01000nnn swap Dn - sprintf(DisaText,"swap d%d",op&7); - return 0; -} - -// ================ Opcodes 0x4850+ ================ -static int DisaPea(int op) -{ - // Pea 01001000 01eeeeee (eeeeee=ea) pea - int ea=0; - char eat[64]=""; - - ea=op&0x003f; if (ea<0x10) return 1; // swap opcode - DisaGetEa(eat,ea,2); - - sprintf(DisaText,"pea %s",eat); - return 0; -} - -// ================ Opcodes 0x4880+ ================ -static int DisaExt(int op) -{ - // Ext 01001000 1x000nnn (x=size, eeeeee=EA) - char eat[64]=""; - int size=0; - - size=(op>>6)&1; size++; - DisaGetEa(eat,op&0x3f,size); - - sprintf(DisaText,"ext.%c %s",Tasm[size],eat); - return 0; -} - -// ================ Opcodes 0x4890+ ================ -static int DisaMovem(int op) -{ - // Movem 01001d00 1xeeeeee regmask d=direction, x=size, eeeeee=EA - int dir=0,size=0; - int ea=0,mask=0; - char list[64]="",eat[64]=""; - - dir=(op>>10)&1; - size=((op>>6)&1)+1; - ea=op&0x3f; if (ea<0x10) return 1; // ext opcode - - mask=DisaWord(DisaPc)&0xffff; DisaPc+=2; - - MakeRegList(list,mask,ea); // Turn register mask into text - DisaGetEa(eat,ea,size); - - if (dir) sprintf(DisaText,"movem.%c %s, %s",Tasm[size],eat,list); - else sprintf(DisaText,"movem.%c %s, %s",Tasm[size],list,eat); - return 0; -} - -// ================ Opcodes 0x4e40+ ================ -static int DisaTrap(int op) -{ - sprintf(DisaText,"trap #%d",op&0xf); - return 0; -} - -// ================ Opcodes 0x4e50+ ================ -static int DisaLink(int op) -{ - // Link opcode, 01001110 01010nnn dd link An,#offset - char eat[64]=""; - char offset[32]=""; - - DisaGetEa(eat,(op&7)|8,0); - GetOffset(offset); - - sprintf(DisaText,"link %s,#%s",eat,offset); - - return 0; -} - -// ================ Opcodes 0x4e58+ ================ -static int DisaUnlk(int op) -{ - // Link opcode, 01001110 01011nnn dd unlk An - char eat[64]=""; - - DisaGetEa(eat,(op&7)|8,0); - sprintf(DisaText,"unlk %s",eat); - - return 0; -} - -// ================ Opcodes 0x4e60+ ================ -static int DisaMoveUsp(int op) -{ - // Move USP opcode, 01001110 0110dnnn move An to/from USP (d=direction) - int ea=0,dir=0; - char eat[64]=""; - - dir=(op>>3)&1; - ea=(op&7)|8; - DisaGetEa(eat,ea,0); - - if (dir) sprintf(DisaText,"move usp, %s",eat); - else sprintf(DisaText,"move %s, usp",eat); - return 0; -} - -// ================ Opcodes 0x4e70+ ================ -static int Disa4E70(int op) -{ - char *inst[8]={"reset","nop","stop","rte","rtd","rts","trapv","rtr"}; - int n=0; - - n=op&7; - - sprintf(DisaText,"%s",inst[n]); - - //todo - 'stop' with 16 bit data - - return 0; -} - -// ================ Opcodes 0x4a00+ ================ -static int DisaTst(int op) -{ - // Tst 01001010 xxeeeeee (eeeeee=ea) - int ea=0; - char eat[64]=""; - int size=0; - - ea=op&0x003f; - DisaGetEa(eat,ea,0); - size=(op>>6)&3; if (size>=3) return 1; - - sprintf(DisaText,"tst.%c %s",Tasm[size],eat); - return 0; -} - -// ================ Opcodes 0x4e80+ ================ -static int DisaJsr(int op) -{ - // Jsr/Jmp 0100 1110 1mEE Eeee (eeeeee=ea m=1=jmp) - int sea=0; - char seat[64]=""; - - sea=op&0x003f; - DisaGetEa(seat,sea,0); - - sprintf(DisaText,"j%s %s", op&0x40?"mp":"sr", seat); - return 0; -} - -// ================ Opcodes 0x5000+ ================ -static int DisaAddq(int op) -{ - // 0101nnnt xxeeeeee (nnn=#8,1-7 t=addq/subq xx=size, eeeeee=EA) - int num=0,type=0,size=0,ea=0; - char eat[64]=""; - - num =(op>>9)&7; if (num==0) num=8; - type=(op>>8)&1; - size=(op>>6)&3; if (size>=3) return 1; - ea = op&0x3f; - - DisaGetEa(eat,ea,size); - - sprintf(DisaText,"%s.%c #%d, %s",type?"subq":"addq",Tasm[size],num,eat); - return 0; -} - -// ================ Opcodes 0x50c0+ ================ -static int DisaSet(int op) -{ - // 0101cccc 11eeeeee (sxx ea) - static char *cond[16]= - {"t" ,"f", "hi","ls","cc","cs","ne","eq", - "vc","vs","pl","mi","ge","lt","gt","le"}; - char *cc=""; - int ea=0; - char eat[64]=""; - - cc=cond[(op>>8)&0xf]; // Get condition code - ea=op&0x3f; - if ((ea&0x38)==0x08) return 1; // dbra, not scc - - DisaGetEa(eat,ea,0); - sprintf(DisaText,"s%s %s",cc,eat); - return 0; -} - -// ================ Opcodes 0x50c8+ ================ -static int DisaDbra(int op) -{ - // 0101cccc 11001nnn offset (dbra/dbxx Rn,offset) - int dea=0; char deat[64]=""; - int pc=0,Offset=0; - - static char *BraCode[16]= - {"bt" ,"bra","bhi","bls","bcc","bcs","bne","beq", - "bvc","bvs","bpl","bmi","bge","blt","bgt","ble"}; - char *Bra=""; - - dea=op&7; - DisaGetEa(deat,dea,2); - - // Get condition code - Bra=BraCode[(op>>8)&0xf]; - - // Get offset - pc=DisaPc; - Offset=(short)DisaWord(DisaPc); DisaPc+=2; - - sprintf(DisaText,"d%s %s, %x",Bra,deat,pc+Offset); - return 0; -} - -// ================ Opcodes 0x6000+ ================ -static int DisaBranch(int op) -{ - // Branch 0110cccc nn (cccc=condition) - int pc=0,Offset=0; - - static char *BraCode[16]= - {"bra","bsr","bhi","bls","bcc","bcs","bne","beq", - "bvc","bvs","bpl","bmi","bge","blt","bgt","ble"}; - char *Bra=""; - - // Get condition code - Bra=BraCode[(op>>8)&0x0f]; - - // Get offset - pc=DisaPc; - Offset=(char)(op&0xff); - if (Offset== 0) { Offset=(short)DisaWord(DisaPc); DisaPc+=2; } - else if (Offset==-1) { Offset= DisaLong(DisaPc); DisaPc+=4; } - - sprintf(DisaText,"%s %x",Bra,pc+Offset); - return 0; -} - -// ================ Opcodes 0x7000+ ================ -static int DisaMoveq(int op) -{ - // Moveq 0111rrr0 nn (rrr=Dest register, nn=data) - - int dea=0; char deat[64]=""; - char *inst="moveq"; - int val=0; - - dea=(op>>9)&7; - DisaGetEa(deat,dea,2); - - val=(char)(op&0xff); - sprintf(DisaText,"%s #$%x, %s",inst,val,deat); - return 0; -} - -// ================ Opcodes 0x8000+ ================ -static int DisaArithReg(int op) -{ - // 1t0tnnnd xxeeeeee (tt=type:or/sub/and/add xx=size, eeeeee=EA) - int type=0,size=0,dir=0,rea=0,ea=0; - char reat[64]="",eat[64]=""; - char *opcode[]={"or","sub","","","and","add"}; - - type=(op>>12)&5; - rea =(op>> 9)&7; - dir =(op>> 8)&1; - size=(op>> 6)&3; if (size>=3) return 1; - ea = op&0x3f; - - if (dir && ea<0x10) return 1; // addx opcode - - DisaGetEa(reat,rea,size); - DisaGetEa( eat, ea,size); - - if (dir) sprintf(DisaText,"%s.%c %s, %s",opcode[type],Tasm[size],reat,eat); - else sprintf(DisaText,"%s.%c %s, %s",opcode[type],Tasm[size],eat,reat); - return 0; -} - -// ================ Opcodes 0x8100+ ================ -static int DisaAbcd(int op) -{ - // 1t00ddd1 0000asss - sbcd/abcd Ds,Dd or -(As),-(Ad) - int type=0; - int dn=0,addr=0,sn=0; - char *opcode[]={"sbcd","abcd"}; - - type=(op>>14)&1; - dn =(op>> 9)&7; - addr=(op>> 3)&1; - sn = op &7; - - if (addr) sprintf(DisaText,"%s -(a%d), -(a%d)",opcode[type],sn,dn); - else sprintf(DisaText,"%s d%d, d%d", opcode[type],sn,dn); - - return 0; -} - -// ================ Opcodes 0x80c0+ ================ -static int DisaMul(int op) -{ - // Div/Mul: 1m00nnns 11eeeeee (m=Mul, nnn=Register Dn, s=signed, eeeeee=EA) - int type=0,rea=0,sign=0,ea=0,size=1; - char reat[64]="",eat[64]=""; - char *opcode[2]={"div","mul"}; - - type=(op>>14)&1; // div/mul - rea =(op>> 9)&7; - sign=(op>> 8)&1; - ea = op&0x3f; - - DisaGetEa(reat,rea,size); - DisaGetEa( eat, ea,size); - - sprintf(DisaText,"%s%c.%c %s, %s",opcode[type],sign?'s':'u',Tasm[size],eat,reat); - return 0; -} - -// ================ Opcodes 0x90c0+ ================ -static int DisaAritha(int op) -{ - // Suba/Cmpa/Adda 1tt1nnnx 11eeeeee (tt=type, x=size, eeeeee=Source EA) - int type=0,size=0,sea=0,dea=0; - char seat[64]="",deat[64]=""; - char *aritha[4]={"suba","cmpa","adda",""}; - - type=(op>>13)&3; if (type>=3) return 1; - size=(op>>8)&1; size++; - dea =(op>>9)&7; dea|=8; // Dest=An - sea = op&0x003f; // Source - - DisaGetEa(seat,sea,size); - DisaGetEa(deat,dea,size); - - sprintf(DisaText,"%s.%c %s, %s",aritha[type],Tasm[size],seat,deat); - return 0; -} - -// ================ Opcodes 0xb000+ ================ -static int DisaCmpEor(int op) -{ - // Cmp/Eor 1011rrrt xxeeeeee (rrr=Dn, t=cmp/eor, xx=size extension, eeeeee=ea) - char reat[64]="",eat[64]=""; - int type=0,size=0; - - type=(op>>8)&1; - size=(op>>6)&3; if (size>=3) return 1; // cmpa opcode - if ((op&0xf138)==0xb108) return 1; // cmpm opcode - - DisaGetEa(reat,(op>>9)&7,size); - DisaGetEa(eat, op&0x3f, size); - - if (type) sprintf(DisaText,"eor.%c %s, %s",Tasm[size],reat,eat); - else sprintf(DisaText,"cmp.%c %s, %s",Tasm[size],eat,reat); - return 0; -} - -// ================ Opcodes 0xb108+ ================ -static int DisaCmpm(int op) -{ - // Cmpm 1011ddd1 xx001sss - int type=0,size=0,dea=0,sea=0; - char deat[64]="",seat[64]=""; - - type=(op>>12)&5; - dea =(op>> 9)&7; dea|=8; - size=(op>> 6)&3; if (size>=3) return 1; - sea = op&0x3f; - - DisaGetEa(deat,dea,size); - DisaGetEa(seat,sea,size); - - sprintf(DisaText,"cmpm.%c (%s)+, (%s)+",Tasm[size],seat,deat); - - return 0; -} - -// ================ Opcodes 0xc140+ ================ -// 1100ttt1 01000sss exg ds,dt -// 1100ttt1 01001sss exg as,at -// 1100ttt1 10001sss exg as,dt -static int DisaExg(int op) -{ - int tr=0,type=0,sr=0; - - tr =(op>>9)&7; - type= op&0xf8; - sr = op&7; - - if (type==0x40) sprintf(DisaText,"exg d%d, d%d",sr,tr); - else if (type==0x48) sprintf(DisaText,"exg a%d, a%d",sr,tr); - else if (type==0x88) sprintf(DisaText,"exg a%d, d%d",sr,tr); - else return 1; - - return 0; -} - -// ================ Opcodes 0xd100+ ================ -static int DisaAddx(int op) -{ - // 1t01ddd1 xx000sss addx - int type=0,size=0,dea=0,sea=0; - char deat[64]="",seat[64]=""; - char *opcode[6]={"","subx","","","","addx"}; - - type=(op>>12)&5; - dea =(op>> 9)&7; - size=(op>> 6)&3; if (size>=3) return 1; - sea = op&0x3f; - - DisaGetEa(deat,dea,size); - DisaGetEa(seat,sea,size); - - sprintf(DisaText,"%s.%c %s, %s",opcode[type],Tasm[size],seat,deat); - return 0; -} - -// ================ Opcodes 0xe000+ ================ -static char *AsrName[4]={"as","ls","rox","ro"}; -static int DisaAsr(int op) -{ - // Asr/l/Ror/l etc - 1110cccd xxuttnnn - // (ccc=count, d=direction xx=size extension, u=use reg for count, tt=type, nnn=register Dn) - int count=0,dir=0,size=0,usereg=0,type=0,num=0; - - count =(op>>9)&7; - dir =(op>>8)&1; - size =(op>>6)&3; if (size>=3) return 1; // todo Asr EA - usereg=(op>>5)&1; - type =(op>>3)&3; - num = op &7; // Register number - - if (usereg==0) count=((count-1)&7)+1; // because ccc=000 means 8 - - sprintf(DisaText,"%s%c.%c %c%d, d%d", - AsrName[type], dir?'l':'r', Tasm[size], - usereg?'d':'#', count, num); - return 0; -} - -static int DisaAsrEa(int op) -{ - // Asr/l/Ror/l etc EA - 11100ttd 11eeeeee - int type=0,dir=0,size=1; - char eat[64]=""; - - type=(op>>9)&3; - dir =(op>>8)&1; - DisaGetEa(eat,op&0x3f,size); - - sprintf(DisaText,"%s%c.w %s", AsrName[type], dir?'l':'r', eat); - return 0; -} - -// ================================================================= - -static int TryOp(int op) -{ - if ((op&0xf100)==0x0000) DisaArithImm(op); // Ori/And/Sub/Add/Eor/Cmp Immediate - if ((op&0xf5bf)==0x003c) DisaArithSr(op); // Ori/Andi/Eori $nnnn,sr - if ((op&0xf100)==0x0100) DisaBtstReg(op); - if ((op&0xf138)==0x0108) DisaMovep(op); - if ((op&0xff00)==0x0800) DisaBtstImm(op); // Btst/Bchg/Bclr/Bset - if ((op&0xc000)==0x0000) DisaMove(op); - if ((op&0xf900)==0x4000) DisaNeg(op); // Negx/Clr/Neg/Not - if ((op&0xf1c0)==0x41c0) DisaLea(op); - if ((op&0xf9c0)==0x40c0) DisaMoveSr(op); - if ((op&0xfff8)==0x4840) DisaSwap(op); - if ((op&0xffc0)==0x4840) DisaPea(op); - if ((op&0xffb8)==0x4880) DisaExt(op); - if ((op&0xfb80)==0x4880) DisaMovem(op); - if ((op&0xff00)==0x4a00) DisaTst(op); - if ((op&0xfff0)==0x4e40) DisaTrap(op); - if ((op&0xfff8)==0x4e50) DisaLink(op); - if ((op&0xfff8)==0x4e58) DisaUnlk(op); - if ((op&0xfff0)==0x4e60) DisaMoveUsp(op); - if ((op&0xfff8)==0x4e70) Disa4E70(op); - if ((op&0xff80)==0x4e80) DisaJsr(op); - if ((op&0xf000)==0x5000) DisaAddq(op); - if ((op&0xf0c0)==0x50c0) DisaSet(op); - if ((op&0xf0f8)==0x50c8) DisaDbra(op); - if ((op&0xf000)==0x6000) DisaBranch(op); - if ((op&0xa000)==0x8000) DisaArithReg(op); // Or/Sub/And/Add - if ((op&0xb1f0)==0x8100) DisaAbcd(op); - if ((op&0xb130)==0x9100) DisaAddx(op); - if ((op&0xb0c0)==0x80c0) DisaMul(op); - if ((op&0xf100)==0x7000) DisaMoveq(op); - if ((op&0x90c0)==0x90c0) DisaAritha(op); - if ((op&0xf000)==0xb000) DisaCmpEor(op); - if ((op&0xf138)==0xb108) DisaCmpm(op); - if ((op&0xf130)==0xc100) DisaExg(op); - if ((op&0xf000)==0xe000) DisaAsr(op); - if ((op&0xf8c0)==0xe0c0) DisaAsrEa(op); - - // Unknown opcoode - return 0; -} - -int DisaGet() -{ - int op=0; - if (DisaWord==NULL) return 1; - - Comment[0]=0; - DisaText[0]=0; // Assume opcode unknown - - op=DisaWord(DisaPc)&0xffff; DisaPc+=2; - TryOp(op); - strcat(DisaText,Comment); - - // Unknown opcoode - return 0; -} diff --git a/Pico/Disa.h b/Pico/Disa.h deleted file mode 100644 index dddc21d..0000000 --- a/Pico/Disa.h +++ /dev/null @@ -1,33 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -// Disa 68000 Disassembler - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(__GNUC__) || defined(_WIN32_WCE) -#define CPU_CALL -#else -#define CPU_CALL __fastcall -#endif - -extern unsigned int DisaPc; -extern char *DisaText; // Text buffer to write in - -extern unsigned short (CPU_CALL *DisaWord)(unsigned int a); -int DisaGetEa(char *t,int ea,int size); - -int DisaGet(); - -#ifdef __cplusplus -} // End of extern "C" -#endif diff --git a/Pico/Draw.cpp b/Pico/Draw.cpp deleted file mode 100644 index 4a1cdc7..0000000 --- a/Pico/Draw.cpp +++ /dev/null @@ -1,357 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" -#ifndef __GNUC__ -#pragma warning (disable:4706) // Disable assignment with conditional -#endif - -int (*PicoScan)(unsigned int num,unsigned short *data)=NULL; - -// Line colour indices - in the format 00ppcccc pp=palette, cccc=colour -static unsigned short HighCol[32+320+8]; // Gap for 32 column, and messy border on right -static int Scanline=0; // Scanline - -int PicoMask=0xfff; // Mask of which layers to draw - -static int TileNorm(unsigned short *pd,int addr,unsigned int *pal) -{ - unsigned int pack=0; unsigned int t=0; - - pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels - if (pack) - { - t=pack&0x0000f000; if (t) { t=pal[t>>12]; pd[0]=(unsigned short)t; } - t=pack&0x00000f00; if (t) { t=pal[t>> 8]; pd[1]=(unsigned short)t; } - t=pack&0x000000f0; if (t) { t=pal[t>> 4]; pd[2]=(unsigned short)t; } - t=pack&0x0000000f; if (t) { t=pal[t ]; pd[3]=(unsigned short)t; } - t=pack&0xf0000000; if (t) { t=pal[t>>28]; pd[4]=(unsigned short)t; } - t=pack&0x0f000000; if (t) { t=pal[t>>24]; pd[5]=(unsigned short)t; } - t=pack&0x00f00000; if (t) { t=pal[t>>20]; pd[6]=(unsigned short)t; } - t=pack&0x000f0000; if (t) { t=pal[t>>16]; pd[7]=(unsigned short)t; } - return 0; - } - - return 1; // Tile blank -} - -static int TileFlip(unsigned short *pd,int addr,unsigned int *pal) -{ - unsigned int pack=0; unsigned int t=0; - - pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels - if (pack) - { - t=pack&0x000f0000; if (t) { t=pal[t>>16]; pd[0]=(unsigned short)t; } - t=pack&0x00f00000; if (t) { t=pal[t>>20]; pd[1]=(unsigned short)t; } - t=pack&0x0f000000; if (t) { t=pal[t>>24]; pd[2]=(unsigned short)t; } - t=pack&0xf0000000; if (t) { t=pal[t>>28]; pd[3]=(unsigned short)t; } - t=pack&0x0000000f; if (t) { t=pal[t ]; pd[4]=(unsigned short)t; } - t=pack&0x000000f0; if (t) { t=pal[t>> 4]; pd[5]=(unsigned short)t; } - t=pack&0x00000f00; if (t) { t=pal[t>> 8]; pd[6]=(unsigned short)t; } - t=pack&0x0000f000; if (t) { t=pal[t>>12]; pd[7]=(unsigned short)t; } - return 0; - } - return 1; // Tile blank -} - -struct TileStrip -{ - int nametab; // Position in VRAM of name table (for this tile line) - int line; // Line number in pixels 0x000-0x3ff within the virtual tilemap - int hscroll; // Horizontal scroll value in pixels for the line - int xmask; // X-Mask (0x1f - 0x7f) for horizontal wraparound in the tilemap - int high; // High or low tiles -}; - -static int WrongPri=0; // 1 if there were tiles which are the wrong priority - -static int DrawStrip(struct TileStrip ts) -{ - int tilex=0,dx=0,ty=0; - int blank=-1; // The tile we know is blank - - WrongPri=0; - - // Draw tiles across screen: - tilex=(-ts.hscroll)>>3; - ty=(ts.line&7)<<1; // Y-Offset into tile - for (dx=((ts.hscroll-1)&7)+1; dx<328; dx+=8,tilex++) - { - int code=0,addr=0,zero=0; - unsigned int *pal=NULL; - - code=Pico.vram[ts.nametab+(tilex&ts.xmask)]; - if (code==blank) continue; - if ((code>>15)!=ts.high) { WrongPri=1; continue; } - - // Get tile address/2: - addr=(code&0x7ff)<<4; - if (code&0x1000) addr+=14-ty; else addr+=ty; // Y-flip - - pal=Pico.highpal+((code>>9)&0x30); - - if (code&0x0800) zero=TileFlip(HighCol+24+dx,addr,pal); - else zero=TileNorm(HighCol+24+dx,addr,pal); - - if (zero) blank=code; // We know this tile is blank now - } - - return 0; -} - -static int DrawLayer(int plane,int high) -{ - struct PicoVideo *pvid=&Pico.video; - static char shift[4]={5,6,6,7}; // 32,64 or 128 sized tilemaps - struct TileStrip ts; - - // Work out the TileStrip to draw - - // Get vertical scroll value: - int vscroll=Pico.vsram[plane]; - - int htab=pvid->reg[13]<<9; // Horizontal scroll table address - if ( pvid->reg[11]&2) htab+=Scanline<<1; // Offset by line - if ((pvid->reg[11]&1)==0) htab&=~0xf; // Offset by tile - htab+=plane; // A or B - - // Get horizontal scroll value - ts.hscroll=Pico.vram[htab&0x7fff]; - - // Work out the name table size: 32 64 or 128 tiles (0-3) - int width=pvid->reg[16]; - int height=(width>>4)&3; width&=3; - - ts.xmask=(1<reg[2]&0x38)<< 9; // A - else ts.nametab=(pvid->reg[4]&0x07)<<12; // B - - // Find the line in the name table - ts.line=(vscroll+Scanline)&ymask; - ts.nametab+=(ts.line>>3)<reg[3]&0x3c)<<9; // 40-cell mode - ts.nametab+=(ts.line>>3)<<6; - } - else - { - ts.nametab=(pvid->reg[3]&0x3e)<<9; // 32-cell mode - ts.nametab+=(ts.line>>3)<<5; - } - - ts.xmask=0x3f; - ts.high=high; - - DrawStrip(ts); - return 0; -} - -static int DrawSprite(int sy,unsigned short *sprite,int high) -{ - int sx=0,width=0,height=0; - int row=0,code=0; - unsigned int *pal=NULL; - int tile=0,delta=0; - int i=0; - - code=sprite[2]; - if ((code>>15)!=high) { WrongPri=1; return 0; } // Wrong priority - - height=sprite[1]>>8; - width=(height>>2)&3; height&=3; - width++; height++; // Width and height in tiles - if (Scanline>=sy+(height<<3)) return 0; // Not on this line after all - - row=Scanline-sy; // Row of the sprite we are on - pal=Pico.highpal+((code>>9)&0x30); // Get palette pointer - if (code&0x1000) row=(height<<3)-1-row; // Flip Y - - tile=code&0x7ff; // Tile number - tile+=row>>3; // Tile number increases going down - delta=height; // Delta to increase tile by going right - if (code&0x0800) { tile+=delta*(width-1); delta=-delta; } // Flip X - - tile<<=4; tile+=(row&7)<<1; // Tile address - delta<<=4; // Delta of address - - sx=(sprite[3]&0x1ff)-0x78; // Get X coordinate + 8 - - for (i=0; i=328) continue; // Offscreen - - tile&=0x7fff; // Clip tile address - if (code&0x0800) TileFlip(HighCol+24+sx,tile,pal); - else TileNorm(HighCol+24+sx,tile,pal); - } - - return 0; -} - -static int DrawAllSprites(int high) -{ - struct PicoVideo *pvid=&Pico.video; - int table=0; - int i=0,link=0; - unsigned char spin[80]; // Sprite index - - WrongPri=0; - - table=pvid->reg[5]&0x7f; - if (pvid->reg[12]&1) table&=0x7e; // Lowest bit 0 in 40-cell mode - table<<=8; // Get sprite table address/2 - - for (;;) - { - unsigned short *sprite=NULL; - - spin[i]=(unsigned char)link; - sprite=Pico.vram+((table+(link<<2))&0x7ffc); // Find sprite - - // Find next sprite - link=sprite[1]&0x7f; - if (link==0 || i>=79) break; // End of sprites - i++; - } - - // Go through sprites backwards: - for ( ;i>=0; i--) - { - unsigned short *sprite=NULL; - int sy=0; - - sprite=Pico.vram+((table+(spin[i]<<2))&0x7ffc); // Find sprite - - sy=(sprite[0]&0x1ff)-0x80; // Get Y coordinate - - if (Scanline>=sy && Scanline=edge) full=1; } - else { if (Scanline< edge) full=1; } - - if (PicoMask&0x04) { DrawLayer(1,0); bhigh=WrongPri; } - if (PicoMask&0x08) { if (full) DrawWindow(0); else DrawLayer(0,0); ahigh=WrongPri; } - if (PicoMask&0x10) { DrawAllSprites(0); shigh=WrongPri; } - - if (bhigh) if (PicoMask&0x20) DrawLayer(1,1); - if (ahigh) if (PicoMask&0x40) { if (full) DrawWindow(1); else DrawLayer(0,1); } - if (shigh) if (PicoMask&0x80) DrawAllSprites(1); - return 0; -} - -static int UpdatePalette() -{ - int c=0; - - // Update palette: - for (c=0;c<64;c++) Pico.highpal[c]=(unsigned short)PicoCram(Pico.cram[c]); - Pico.m.dirtyPal=0; - - return 0; -} - -static int Overlay() -{ - int col=0,x=0; - - if (PmovAction==0) return 0; - if (Scanline>=4) return 0; - - if (PmovAction&1) col =0x00f; - if (PmovAction&2) col|=0x0f0; - col=PicoCram(col); - - for (x=0;x<4;x++) HighCol[32+x]=(unsigned short)col; - - return 0; -} - -static int Skip=0; - - -int PicoLine(int scan) -{ - if (Skip>0) { Skip--; return 0; } // Skip rendering lines - - Scanline=scan; - - if (Pico.m.dirtyPal) UpdatePalette(); - - // Draw screen: - if (PicoMask&0x02) BackFill(); - if (Pico.video.reg[1]&0x40) DrawDisplay(); - - Overlay(); - - if (Pico.video.reg[12]&1) - { - Skip=PicoScan(Scanline,HighCol+32); // 40-column mode - } - else - { - // Crop, centre and return 32-column mode - memset(HighCol, 0,64); // Left border - memset(HighCol+288,0,64); // Right border - Skip=PicoScan(Scanline,HighCol); - } - - return 0; -} - diff --git a/Pico/MakeSine.bat b/Pico/MakeSine.bat deleted file mode 100644 index b9581ab..0000000 --- a/Pico/MakeSine.bat +++ /dev/null @@ -1,4 +0,0 @@ -cl /W4 MakeSine.cpp -del MakeSine.obj -MakeSine.exe > Sine.cpp -del MakeSine.exe diff --git a/Pico/MakeSine.cpp b/Pico/MakeSine.cpp deleted file mode 100644 index aad9953..0000000 --- a/Pico/MakeSine.cpp +++ /dev/null @@ -1,47 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -// Make a Sine table - -#pragma warning (disable:4514) - -#include -#include -#include -#include - -#define PI 3.14159265358979 - -int main() -{ - int i=0; - - printf ("\nshort Sine[0x100]=\n"); - printf ("{\n"); - - for (i=0;i<0x100;i++) - { - double fAng,fPos; - int nPos; - if ((i&7)==0) printf (" "); - - fAng=(double)i/(double)0x100; - fAng*=2*PI; - fPos=sin(fAng)*(double)0x4000; - nPos=(int)fPos; - printf ("%+6d,",nPos); - - if ((i&7)==7) printf ("\n"); - } - - printf ("};\n"); - - return 0; -} diff --git a/Pico/Makefile b/Pico/Makefile deleted file mode 100644 index 36e893b..0000000 --- a/Pico/Makefile +++ /dev/null @@ -1,17 +0,0 @@ - -# Makefile for GP32 - -export CCBASE=D:/Devkitadv -export CUSER=-DLITTLE_ENDIAN -DGP32 -W -Wall -include $(CCBASE)/gp32.mk - -OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \ - Sek.o Sine.o VideoPort.o ym2612.o ../Cyclone/Cyclone.o - -Pico.a: $(OBJS) - ar -rs $@ $(OBJS) - - -Draw.o: Draw.cpp - gcc $(CFLAGS) -S $< - gcc $(CFLAGS) -c $< diff --git a/Pico/Makefile.mir b/Pico/Makefile.mir deleted file mode 100644 index d4589d3..0000000 --- a/Pico/Makefile.mir +++ /dev/null @@ -1,25 +0,0 @@ - -# Makefile for GP32 (Mr. Mirko's SDK) - -CC=arm-elf-gcc -LD=arm-elf-gcc -AS=arm-elf-as -AR=arm-elf-ar - -INCLUDES=-I/gp32_MrMirko/lib.src/include -CFLAGS=$(INCLUDES) -O3 -W -Wall - -CPPFLAGS=$(CFLAGS) - -OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \ - Sek.o Sine.o VideoPort.o ym2612.o ../Cyclone/Cyclone.o - -Pico.a: $(OBJS) - $(AR) -rs $@ $(OBJS) - -VideoPort.o: VideoPort.cpp - $(CC) -c -O2 -W -Wall $< - -Draw.o: Draw.cpp - arm-elf-gcc $(CFLAGS) -S $< - arm-elf-gcc $(CFLAGS) -c $< diff --git a/Pico/Makefile.symb b/Pico/Makefile.symb deleted file mode 100644 index 65c4f24..0000000 --- a/Pico/Makefile.symb +++ /dev/null @@ -1,41 +0,0 @@ - -# Makefile for Symbian - -INCL=\ - -I "D:\Symbian\6.1\Series60\Epoc32\Include" \ - -I "D:\Symbian\6.1\Series60\Epoc32\Include\libc" - -# ----------------------------- ARM Compiler ----------------------------- -BPATH=D:\Symbian\6.1\Shared\Epoc32\gcc\bin -CPP=$(BPATH)\gcc -AS =$(BPATH)\as -AR =$(BPATH)\ar -CFLAGS=-D__SYMBIAN32__ -D__GCC32__ $(INCL) -march=armv4t \ - -Wall -Wno-ctor-dtor-privacy -O3 \ - -mstructure-size-boundary=32 \ - -fno-builtin - -OBJS = Area.o Cart.o Disa.o Draw.o Memory.o Pico.o Psnd.o \ - Sek.o Sine.o VideoPort.o Utils.o Cyclone.o ym2612.o - -Pico.lib: $(OBJS) - $(AR) -rs $@ $(OBJS) - copy Pico.lib "\Symbian\6.1\Series60\Epoc32\Release\armi\urel\" - copy Pico.lib "\Symbian\6.1\Series60\Epoc32\Release\thumb\urel\" - -Cyclone.o: ../Cyclone/Cyclone.s - $(AS) -mthumb-interwork -o $@ ../Cyclone/Cyclone.s 2> nul - -Utils.o: Utils.cpp - @$(CPP) $(CFLAGS) -S $*.cpp - @$(CPP) $(CFLAGS) -c $*.cpp - -.cpp.o: - @$(CPP) $(CFLAGS) -c $*.cpp -.c.o: - @$(CPP) $(CFLAGS) -c $*.c - - -CLEANUP=*.o *.lib Draw.s -clean : - for %i in ( $(CLEANUP) ) do if exist %i del %i diff --git a/Pico/Memory.cpp b/Pico/Memory.cpp deleted file mode 100644 index 5823d21..0000000 --- a/Pico/Memory.cpp +++ /dev/null @@ -1,260 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; - -static int PicoMemBase(u32 pc) -{ - int membase=0; - - if (pc>16); -} -#endif - -#ifdef EMU_C68K -static u32 PicoCheckPc(u32 pc) -{ - pc-=PicoCpu.membase; // Get real pc - pc&=0xffffff; - - PicoCpu.membase=PicoMemBase(pc); - - return PicoCpu.membase+pc; -} -#endif - -#ifdef EMU_NULL -static u32 PicoCheckPc(u32) { return 0; } -#endif - - -int PicoInitPc(u32 pc) -{ - PicoCheckPc(pc); - return 0; -} - -// ----------------------------------------------------------------- -static int PadRead(int i) -{ - int pad=0,value=0; - pad=~PicoPad[i]; // Get inverse of pad - - if (Pico.m.padSelect[i]) value=0x40|(pad&0x3f); // 01CB RLDU - else value=((pad&0xc0)>>2)|(pad&3); // 00SA 00DU - - return (value<<8)|value; // Mirror bytes -} - -static u32 OtherRead16(u32 a) -{ - u32 d=0; - - if ((a&0xffe000)==0xa00000) - { - // Z80 ram - d=*(u16 *)(Pico.zram+(a&0x1fff)); - - if (Pico.m.rotate&2) { d=(Pico.m.rotate>>2)&0xff; d|=d<<8; } // Fake z80 - Pico.m.rotate++; - - goto end; - } - - if ((a&0xffe000)==0xa00000) - { - // Fake Z80 ram - d=((Pico.m.rotate++)>>2)&0xff; d|=d<<8; - goto end; - } - - if (a==0xa04000) { d=Pico.m.rotate&3; Pico.m.rotate++; goto end; } // Fudge - if (a==0xa10000) { d=Pico.m.hardware; goto end; } // Hardware value - if (a==0xa10002) { d=PadRead(0); goto end; } - if (a==0xa10004) { d=PadRead(1); goto end; } - if (a==0xa11100) { d=((Pico.m.rotate++)&4)<<6; goto end; } // Fudge z80 reset - - if ((a&0xffffe0)==0xc00000) { d=PicoVideoRead(a); goto end; } - -end: - return d; -} - -static void OtherWrite8(u32 a,u32 d) -{ - if ((a&0xffe000)==0xa00000) { Pico.zram[(a^1)&0x1fff]=(u8)d; return; } // Z80 ram - if ((a&0xfffffc)==0xa04000) { PsndFm(a,d); return; } // FM Sound - - if (a==0xa11100) { Pico.m.z80Run=(u8)(d^1); return; } - if (a==0xa10003) { Pico.m.padSelect[0]=(u8)((d>>6)&1); return; } // Joypad 1 select - if (a==0xa10005) { Pico.m.padSelect[1]=(u8)((d>>6)&1); return; } // Joypad 2 select - - if ((a&0xffffe0)==0xc00000) { PicoVideoWrite(a,d|(d<<8)); return; } // Byte access gets mirrored -} - -static void OtherWrite16(u32 a,u32 d) -{ - if ((a&0xffffe0)==0xc00000) { PicoVideoWrite(a,d); return; } - if ((a&0xffe000)==0xa00000) { *(u16 *)(Pico.zram+(a&0x1ffe))=(u16)d; return; } // Z80 ram - - OtherWrite8(a, d>>8); - OtherWrite8(a+1,d&0xff); -} - -// ----------------------------------------------------------------- -// Read Rom and read Ram - -static u8 CPU_CALL PicoRead8(u32 a) -{ - u32 d=0; - a&=0xffffff; - - if (a>=8; - return (u8)d; -} - -u16 CPU_CALL PicoRead16(u32 a) -{ - a&=0xfffffe; - - if (a>16); pm[1]=(u16)d; - return; - } - - a&=0xfffffe; - OtherWrite16(a, (u16)(d>>16)); - OtherWrite16(a+2,(u16)d); -} - - -// ----------------------------------------------------------------- -int PicoMemInit() -{ -#ifdef EMU_C68K - // Setup memory callbacks: - PicoCpu.checkpc=PicoCheckPc; - PicoCpu.fetch8 =PicoCpu.read8 =PicoRead8; - PicoCpu.fetch16=PicoCpu.read16=PicoRead16; - PicoCpu.fetch32=PicoCpu.read32=PicoRead32; - PicoCpu.write8 =PicoWrite8; - PicoCpu.write16=PicoWrite16; - PicoCpu.write32=PicoWrite32; -#endif - return 0; -} - -#ifdef EMU_A68K -struct A68KInter -{ - u32 unknown; - u8 (__fastcall *Read8) (u32 a); - u16 (__fastcall *Read16)(u32 a); - u32 (__fastcall *Read32)(u32 a); - void (__fastcall *Write8) (u32 a,u8 d); - void (__fastcall *Write16) (u32 a,u16 d); - void (__fastcall *Write32) (u32 a,u32 d); - void (__fastcall *ChangePc)(u32 a); - u8 (__fastcall *PcRel8) (u32 a); - u16 (__fastcall *PcRel16)(u32 a); - u32 (__fastcall *PcRel32)(u32 a); - u16 (__fastcall *Dir16)(u32 a); - u32 (__fastcall *Dir32)(u32 a); -}; - -extern "C" struct A68KInter a68k_memory_intf= -{ - 0, - PicoRead8, - PicoRead16, - PicoRead32, - PicoWrite8, - PicoWrite16, - PicoWrite32, - PicoCheckPc, - PicoRead8, - PicoRead16, - PicoRead32, - PicoRead16, // unused - PicoRead32, // unused -}; -#endif diff --git a/Pico/Pico.cpp b/Pico/Pico.cpp deleted file mode 100644 index 5d37b26..0000000 --- a/Pico/Pico.cpp +++ /dev/null @@ -1,224 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -int PicoVer=0x0030; -struct Pico Pico; -int PicoOpt=0; - -int PicoPad[2]; // Joypads, format is SACB RLDU - -int PicoInit() -{ - // Blank space for state: - memset(&Pico,0,sizeof(Pico)); - memset(&PicoPad,0,sizeof(PicoPad)); - Pico.m.dirtyPal=1; - - // Init CPU: - SekInit(); - - // Setup memory callbacks: - PicoMemInit(); - PsndReset(); - -#ifdef MSOUND - YM2612Init(1,7670443,PsndRate,NULL,NULL); -#endif - return 0; -} - -void PicoExit() -{ -#ifdef MSOUND - YM2612Shutdown(); -#endif - - memset(&Pico,0,sizeof(Pico)); -} - -int PicoReset() -{ - unsigned int region=0; - int support=0,hw=0,i=0; - unsigned char pal=0; - - if (Pico.romsize<=0) return 1; - - SekReset(); - PsndReset(); -#ifdef MSOUND - YM2612ResetChip(0); -#endif - - // Read cartridge region data: - region=PicoRead32(0x1f0); - - for (i=0;i<4;i++) - { - int c=0; - - c=region>>(i<<3); c&=0xff; - if (c<=' ') continue; - - if (c=='J') support|=1; - else if (c=='U') support|=4; - else if (c=='E') support|=8; - else - { - // New style code: - char s[2]={0,0}; - s[0]=(char)c; - support|=strtol(s,NULL,16); - } - - } - - // Try to pick the best hardware value for English/60hz: - if (support&4) hw=0x80; // USA - else if (support&8) { hw=0xc0; pal=1; } // Europe - else if (support&1) hw=0x00; // Japan NTSC - else if (support&2) { hw=0x40; pal=1; } // Japan PAL - else hw=0x80; // USA - - Pico.m.hardware=(unsigned char)(hw|0x20); // No disk attached - Pico.m.pal=pal; - - return 0; -} - -static int CheckIdle() -{ - unsigned char state[0x88]; - - memset(state,0,sizeof(state)); - - // See if the state is the same after 2 steps: - SekState(state); SekRun(0); SekRun(0); SekState(state+0x44); - if (memcmp(state,state+0x44,0x44)==0) return 1; - - return 0; -} - -// Accurate but slower frame which does hints -static int PicoFrameHints() -{ - struct PicoVideo *pv=&Pico.video; - int total=0,aim=0; - int y=0; - int hint=0x400; // Hint counter - - pv->status|=0x08; // Go into vblank - - for (y=-38;y<224;y++) - { - if (y==0) - { - hint=pv->reg[10]; // Load H-Int counter - if (pv->reg[1]&0x40) pv->status&=~8; // Come out of vblank if display enabled - } - - // H-Interrupts: - if (hint<0) - { - hint=pv->reg[10]; // Reload H-Int counter - if (pv->reg[0]&0x10) SekInterrupt(4); - } - - // V-Interrupt: - if (y==-37) - { - pv->status|=0x80; // V-Int happened - if (pv->reg[1]&0x20) SekInterrupt(6); - } - - Pico.m.scanline=(short)y; - - // Run scanline: - aim+=489; total+=SekRun(aim-total); - - hint--; - - if (PicoScan && y>=0) PicoLine(y); - } - - SekInterrupt(0); // Cancel interrupt - - return 0; -} - -// Simple frame without H-Ints -static int PicoFrameSimple() -{ - int total=0,y=0,aim=0; - - Pico.m.scanline=-64; - - // V-Blanking period: - if (Pico.video.reg[1]&0x20) SekInterrupt(6); // Set IRQ - Pico.video.status|=0x88; // V-Int happened / go into vblank - total+=SekRun(18560); - - // Active Scan: - if (Pico.video.reg[1]&0x40) Pico.video.status&=~8; // Come out of vblank if display is enabled - SekInterrupt(0); // Clear IRQ - - // Run in sections: - for (aim=18560+6839; aim<=18560+6839*16; aim+=6839) - { - int add=0; - if (CheckIdle()) break; - add=SekRun(aim-total); - total+=add; - } - - if (PicoMask&0x100) - if (PicoScan) - { - // Draw the screen - for (y=0;y<224;y++) PicoLine(y); - } - - return 0; -} - -int PicoFrame() -{ - int hints=0; - - if (Pico.rom==NULL) return 1; // No Rom plugged in - - - PmovUpdate(); - - hints=Pico.video.reg[0]&0x10; - - if (hints) PicoFrameHints(); - else PicoFrameSimple(); - - PsndRender(); - - return 0; -} - -static int DefaultCram(int cram) -{ - int high=0x0841; - // Convert 0000bbbb ggggrrrr - // to rrrr1ggg g10bbbb1 - high|=(cram&0x00f)<<12; // Red - high|=(cram&0x0f0)<< 3; // Green - high|=(cram&0xf00)>> 7; // Blue - return high; -} - -// Function to convert Megadrive Cram into a native colour: -int (*PicoCram)(int cram)=DefaultCram; diff --git a/Pico/Pico.dsp b/Pico/Pico.dsp deleted file mode 100644 index ca0635c..0000000 --- a/Pico/Pico.dsp +++ /dev/null @@ -1,172 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Pico" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=Pico - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Pico.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Pico.mak" CFG="Pico - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Pico - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "Pico - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Pico - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "Pico - Win32 Release" -# Name "Pico - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Area.cpp -# End Source File -# Begin Source File - -SOURCE=.\Cart.cpp -# End Source File -# Begin Source File - -SOURCE=.\Draw.cpp -# End Source File -# Begin Source File - -SOURCE=.\driver.h -# End Source File -# Begin Source File - -SOURCE=.\Memory.cpp -# End Source File -# Begin Source File - -SOURCE=.\Pico.cpp -# End Source File -# Begin Source File - -SOURCE=.\Psnd.cpp -# End Source File -# Begin Source File - -SOURCE=.\Sek.cpp -# End Source File -# Begin Source File - -SOURCE=.\Sine.cpp -# End Source File -# Begin Source File - -SOURCE=.\Utils.cpp -# End Source File -# Begin Source File - -SOURCE=.\VideoPort.cpp -# End Source File -# Begin Source File - -SOURCE=.\ym2612.c -# End Source File -# Begin Source File - -SOURCE=.\a68k.obj -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Pico.h -# End Source File -# Begin Source File - -SOURCE=.\PicoInt.h -# End Source File -# End Group -# Begin Group "Disassembler" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Disa.c -# End Source File -# Begin Source File - -SOURCE=.\Disa.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\bits.txt -# End Source File -# Begin Source File - -SOURCE=..\GenaDrive\zout.txt -# End Source File -# End Target -# End Project diff --git a/Pico/Pico.dsw b/Pico/Pico.dsw deleted file mode 100644 index 6e5c845..0000000 --- a/Pico/Pico.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Pico"=.\Pico.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/Pico/Pico.h b/Pico/Pico.h deleted file mode 100644 index 2757c52..0000000 --- a/Pico/Pico.h +++ /dev/null @@ -1,62 +0,0 @@ - -// -------------------- Pico Library -------------------- - -// Pico Megadrive Emulator Library - Header File - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#ifdef __cplusplus -extern "C" { -#endif - -// Pico.cpp -extern int PicoVer; -extern int PicoOpt; -int PicoInit(); -void PicoExit(); -int PicoReset(); -int PicoFrame(); -extern int PicoPad[2]; // Joypads, format is SACB RLDU -extern int (*PicoCram)(int cram); // Callback to convert colour ram 0000bbb0 ggg0rrr0 - -// Area.cpp -struct PicoArea { void *data; int len; char *name; }; -extern int (*PicoAcb)(struct PicoArea *); // Area callback for each block of memory -extern FILE *PmovFile; -extern int PmovAction; -// &1=for reading &2=for writing &4=volatile &8=non-volatile -int PicoAreaScan(int action,int *pmin); -// Save or load the state from PmovFile: -int PmovState(); -int PmovUpdate(); - -// Cart.cpp -int PicoCartLoad(FILE *f,unsigned char **prom,unsigned int *psize); -int PicoCartInsert(unsigned char *rom,unsigned int romsize); - -// Draw.cpp -extern int (*PicoScan)(unsigned int num,unsigned short *data); -extern int PicoMask; // Mask of which layers to draw - -// Sek.cpp -extern char PicoStatus[]; - -// Sound.cpp -extern int PsndRate,PsndLen; -extern short *PsndOut; -extern unsigned char PicoSreg[]; - -// Utils.cpp -extern int PicuAnd; -int PicuQuick(unsigned short *dest,unsigned short *src); -int PicuShrink(unsigned short *dest,int destLen,unsigned short *src,int srcLen); -int PicuMerge(unsigned short *dest,int destLen,unsigned short *src,int srcLen); - -#ifdef __cplusplus -} // End of extern "C" -#endif diff --git a/Pico/Pico.vcp b/Pico/Pico.vcp deleted file mode 100644 index d6c1ce4..0000000 --- a/Pico/Pico.vcp +++ /dev/null @@ -1,1074 +0,0 @@ -# Microsoft eMbedded Visual Tools Project File - Name="Pico" - Package Owner=<4> -# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304 -# TARGTYPE "Win32 (WCE x86em) Static Library" 0x7f04 -# TARGTYPE "Win32 (WCE ARM) Static Library" 0x8504 - -CFG=Pico - Win32 (WCE ARM) Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Pico.vcn". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Pico.vcn" CFG="Pico - Win32 (WCE ARM) Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Pico - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Static Library") -!MESSAGE "Pico - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Static Library") -!MESSAGE "Pico - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library") -!MESSAGE "Pico - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library") -!MESSAGE "Pico - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Static Library") -!MESSAGE "Pico - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -# PROP ATL_Project 2 - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ARMRel" -# PROP BASE Intermediate_Dir "ARMRel" -# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ARMRel" -# PROP Intermediate_Dir "ARMRel" -# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=clarm.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ARMDbg" -# PROP BASE Intermediate_Dir "ARMDbg" -# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "ARMDbg" -# PROP Intermediate_Dir "ARMDbg" -# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=clarm.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "X86Rel" -# PROP BASE Intermediate_Dir "X86Rel" -# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "X86Rel" -# PROP Intermediate_Dir "X86Rel" -# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=cl.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "X86Dbg" -# PROP BASE Intermediate_Dir "X86Dbg" -# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "X86Dbg" -# PROP Intermediate_Dir "X86Dbg" -# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=cl.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "X86EMRel" -# PROP BASE Intermediate_Dir "X86EMRel" -# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "X86EMRel" -# PROP Intermediate_Dir "X86EMRel" -# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=cl.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "X86EMDbg" -# PROP BASE Intermediate_Dir "X86EMDbg" -# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "X86EMDbg" -# PROP Intermediate_Dir "X86EMDbg" -# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Target_Dir "" -CPP=cl.exe -# 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 -# 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 -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo - -!ENDIF - -# Begin Target - -# Name "Pico - Win32 (WCE ARM) Release" -# Name "Pico - Win32 (WCE ARM) Debug" -# Name "Pico - Win32 (WCE x86) Release" -# Name "Pico - Win32 (WCE x86) Debug" -# Name "Pico - Win32 (WCE x86em) Release" -# Name "Pico - Win32 (WCE x86em) Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Area.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_AREA_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Cart.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - -NODEP_CPP_CART_=\ - "..\Cyclone\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_CART_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Draw.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - -NODEP_CPP_DRAW_=\ - "..\Cyclone\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_DRAW_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Memory.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - -NODEP_CPP_MEMOR=\ - "..\Cyclone\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_MEMOR=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Pico.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_PICO_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Profile.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_PROFI=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Psnd.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_PSND_=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Sek.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - -NODEP_CPP_SEK_C=\ - "..\Cyclone\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_SEK_C=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Sine.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Utils.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_UTILS=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\VideoPort.cpp - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - -NODEP_CPP_VIDEO=\ - "..\Cyclone\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_VIDEO=\ - "..\Cyclone\Cyclone.h"\ - ".\Disa.h"\ - ".\Pico.h"\ - ".\PicoInt.h"\ - ".\ym2612.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\ym2612.c - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_YM261=\ - ".\driver.h"\ - ".\ym2612.h"\ - -NODEP_CPP_YM261=\ - ".\deftypes.h"\ - ".\support.h"\ - -# ADD CPP /W3 - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Pico.h -# End Source File -# Begin Source File - -SOURCE=.\PicoInt.h -# End Source File -# End Group -# Begin Group "Cyclone" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\Cyclone\Cyclone.h -# End Source File -# Begin Source File - -SOURCE=..\Cyclone\Cyclone.obj - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# End Group -# Begin Group "Dasm" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Disa.c - -!IF "$(CFG)" == "Pico - Win32 (WCE ARM) Release" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE ARM) Debug" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Release" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86) Debug" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Release" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ELSEIF "$(CFG)" == "Pico - Win32 (WCE x86em) Debug" - -DEP_CPP_DISA_=\ - ".\Disa.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Disa.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\bits.txt -# End Source File -# Begin Source File - -SOURCE=..\PicoDrive\PicoDrive.txt -# End Source File -# End Target -# End Project diff --git a/Pico/Pico.vcw b/Pico/Pico.vcw deleted file mode 100644 index 55f6997..0000000 --- a/Pico/Pico.vcw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Pico"=.\Pico.vcp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h deleted file mode 100644 index 1ad2fb6..0000000 --- a/Pico/PicoInt.h +++ /dev/null @@ -1,141 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include -#include -#include -#include "Pico.h" - -#if defined(__GNUC__) || defined(_WIN32_WCE) -#define EMU_C68K // Use the Cyclone 68000 emulator -#else -#define EMU_A68K // Use the 'A68K' (Make68K) Assembler 68000 emulator -#endif - -//#define MSOUND - -// Disa.h also defines CPU_CALL to be fastcall or normal call -#include "Disa.h" - - -// ----------------------- 68000 CPU ----------------------- -#ifdef EMU_A68K -// The format of the data in a68k.asm (at the _M68000_regs location) -struct A68KContext -{ - unsigned int d[8],a[8]; - unsigned int isp,srh,ccr,xc,pc,irq,sr; - int (*IrqCallback) (int nIrq); - unsigned int ppc; - void *pResetCallback; - unsigned int sfc,dfc,usp,vbr; - unsigned int AsmBank,CpuVersion; -}; -extern "C" struct A68KContext M68000_regs; -#endif - -#ifdef EMU_C68K -#include "../Cyclone/Cyclone.h" -extern struct Cyclone PicoCpu; -#endif - -#ifdef MSOUND -extern "C" { -#include "ym2612.h" -} -#endif - -// --------------------------------------------------------- - -struct PicoVideo -{ - unsigned char reg[0x20]; - unsigned int command; // 32-bit Command - unsigned char pending; // 1 if waiting for second half of 32-bit command - unsigned char type; // Command type (v/c/vsram read/write) - unsigned short addr; // Read/Write address - int status; // Status bits - unsigned char pad[0x14]; -}; - -struct PicoMisc -{ - unsigned char rotate; - unsigned char z80Run; - unsigned char padSelect[2]; // Select high or low bit from joypad - short scanline; // -38 to 223 - char dirtyPal; // Is the palette dirty - unsigned char hardware; // Hardware value for country - unsigned char pal; // 1=PAL 0=NTSC - unsigned char pad[0x16]; -}; - -struct PicoSound -{ - unsigned char fmsel[2]; // FM selected register - unsigned char reg[0x100]; - unsigned char pad[0x3e]; -}; - -struct Pico -{ - unsigned char ram[0x10000]; // scratch ram - unsigned short vram[0x8000]; - unsigned char zram[0x2000]; // Z80 ram - unsigned int highpal[0x40]; - unsigned short cram[0x40]; - unsigned short vsram[0x40]; - - unsigned char *rom; - unsigned int romsize; - - struct PicoMisc m; - struct PicoVideo video; - struct PicoSound s; -}; - -// Draw.cpp -int PicoLine(int scan); - -// Draw2.cpp -int PicoDraw2(); - -// Memory.cpp -int PicoInitPc(unsigned int pc); -unsigned short CPU_CALL PicoRead16(unsigned int a); -unsigned int CPU_CALL PicoRead32(unsigned int a); -int PicoMemInit(); -void PicoDasm(int start,int len); - -// Pico.cpp -extern struct Pico Pico; - -// Sek.cpp -int SekInit(); -int SekReset(); -int SekRun(int cyc); -int SekInterrupt(int irq); -int SekPc(); -void SekState(unsigned char *data); - -// Sine.cpp -extern short Sine[]; - -// Psnd.cpp -int PsndReset(); -int PsndFm(int a,int d); -int PsndRender(); - -// VideoPort.cpp -void PicoVideoWrite(unsigned int a,unsigned int d); -unsigned int PicoVideoRead(unsigned int a); - -// External: -extern "C" int dprintf(char *Format, ...); diff --git a/Pico/Profile.cpp b/Pico/Profile.cpp deleted file mode 100644 index 223512c..0000000 --- a/Pico/Profile.cpp +++ /dev/null @@ -1,59 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -#ifdef _WIN32_WCE - -#pragma warning(disable:4514) -#pragma warning(push) -#pragma warning(disable:4201) -#include -#pragma warning(pop) - -static float Period=0.0f; -static LARGE_INTEGER TimeStart={0,0}; - -int ProfileInit() -{ - LARGE_INTEGER freq={0,0}; - - QueryPerformanceFrequency(&freq); - - Period =(float)freq.HighPart*4294967296.0f; - Period+=(float)freq.LowPart; - - if (Period>=1.0f) Period=1.0f/Period; - return 0; -} - -int ProfileStart() -{ - QueryPerformanceCounter(&TimeStart); - - return 0; -} - -float ProfileTime() -{ - LARGE_INTEGER end={0,0}; - int ticks=0; - float seconds=0.0f; - - QueryPerformanceCounter(&end); - - ticks=end.LowPart-TimeStart.LowPart; - seconds=(float)ticks*Period; - - return seconds; -} - -#endif - diff --git a/Pico/Psnd.cpp b/Pico/Psnd.cpp deleted file mode 100644 index 99f9190..0000000 --- a/Pico/Psnd.cpp +++ /dev/null @@ -1,254 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "PicoInt.h" - -#ifdef MSOUND -extern "C" -{ -int YM2612UpdateReq(int) { return 0; } -void *errorlog=NULL; -} -#endif - -int PsndRate=0,PsndLen=0; -short *PsndOut=NULL; - -// An operator is a single sine wave generator -struct Operator -{ - unsigned short angle; // 0-0xffff - unsigned short freq; // Converted frequency - unsigned char key; - unsigned char state; // 1=attack, 2=decay, 3=sustain, 4=release - int vol; - int delta; // Change in volume per sample - int limit; // Next volume limit -}; - -struct Channel -{ - struct Operator op[4]; // 4 operators for the channel - unsigned short note; // Written to 0xa4 and 0xa0 -}; - -static struct Channel Chan[8]; - -unsigned char PicoSreg[0x200]; - -static int WriteReg(int side,int a,int d) -{ - struct Channel *pc=NULL; - - PicoSreg[(side<<8)|a]=(unsigned char)d; - - if (a==0x28) - { - pc=Chan+(d&7); - // Key On/Key Off - if (d&0xf0) pc->op[0].state=1; // Attack - else pc->op[0].state=4; // Release - - return 0; - } - - // Find channel: - pc=Chan+(a&3); if (side) pc+=4; - - if ((a&0xf0)==0xa0) - { - int n=0,f=0,mult=2455; - - if (PsndRate>0) mult=44100*2455/PsndRate; - - if (a&4) pc->note =(unsigned short)(d<<8); - else pc->note|=d; - - // Convert to an actual frequency: - n=pc->note; f=(n&0x7ff)<<((n>>11)&7); - - pc->op[0].freq=(unsigned short)((f*mult)>>16); - return 0; - } - - return 0; -} - -int PsndReset() -{ - int i=0; - memset(&Chan,0,sizeof(Chan)); - memset(PicoSreg,0,sizeof(PicoSreg)); - -// Change Sine wave into a square wave - for (i=0x00; i<0x080; i++) Sine[i]= 0x2000; - for (i=0x80; i<0x100; i++) Sine[i]=-0x2000; - - return 0; -} - -int PsndFm(int a,int d) -{ - int side=0; - -#ifdef MSOUND - YM2612Write(0,a&3,(unsigned char)d); -#endif - - a&=3; side=a>>1; // Which side: channels 0-2 or 3-5 - - if (a&1) WriteReg(side,Pico.s.fmsel[side],d); // Write register - else Pico.s.fmsel[side]=(unsigned char)d; // Select register - - return 0; -} - -static void BlankSound(short *dest,int len) -{ - short *end=NULL; - - end=dest+(len<<1); - - // Init sound to silence: - do { *dest=0; dest++; } while (dest0) total=0x7fff; else total=-0x8000; - } - *targ=(short)total; -} - -static void OpNewState(int c) -{ - struct Operator *op=Chan[c].op; - int off=0; - - off=((c&4)<<6)|(c&3); - - switch (op->state) - { - case 1: - { - // Attack: - int ar=PicoSreg[0x50|off]; - ar&=0x1f; if (ar) ar+=0x10; - op->delta=ar<<7; op->limit=0x1000000; break; - } - case 2: - { - // Decay: - int d1r=PicoSreg[0x60|off]; - d1r&=0x1f; if (d1r) d1r+=0x10; - op->delta=-(d1r<<5); op->limit=0; - } - break; - case 3: - { - // Sustain: - int d2r=0,rr=0; - - d2r=PicoSreg[0x70|off]; - d2r&=0x1f; if (d2r) d2r+=0x10; - rr =PicoSreg[0x80|off]; - rr>>=4; - - op->delta=-(d2r<<5); op->limit=rr<<20; - } - break; - case 4: - // Release: - int rr=PicoSreg[0x80|off]; - rr&=0x0f; rr<<=1; rr+=0x10; - op->delta=-(rr<<5); op->limit=0; - break; - } -} - -// Merely adding this code in seems to bugger up the N-Gage??? -static void UpdateOp(int c) -{ - struct Operator *op=Chan[c].op; - - op->angle=(unsigned short)(op->angle+op->freq); - op->vol+=op->delta; - - switch (op->state) - { - case 1: - if (op->vol>=op->limit) { op->vol=op->limit; op->state++; OpNewState(c); } - break; - case 2: case 3: // Decay/Sustain - if (op->vol< op->limit) { op->vol=op->limit; op->state++; OpNewState(c); } - break; - case 4: - if (op->vol< op->limit) { op->vol=op->limit; } - break; - } -} - -static void AddChannel(int c,short *dest,int len) -{ - struct Channel *pc=Chan+c; - struct Operator *op=pc->op; - short *end=NULL; - - // Work out volume delta for this operator: - OpNewState(c); - - end=dest+len; - do - { - int d=0; - d=Sine[(op->angle>>8)&0xff]>>2; - - d*=(op->vol>>8); d>>=16; - - // Add to output: - AddClip(dest,d); - UpdateOp(c); - - dest++; - } - while (dest>=1; bias+=destLen; } - *dest++=(unsigned short)pa; - - pa=*src++; bias-=sub; - if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; } - *dest++=(unsigned short)pa; - } - while (dest>=1; bias+=destLen; } - pa&=mask; pa+=(*dest)&mask; pa>>=1; - *dest++=(unsigned short)pa; - - pa=*src++; bias-=sub; - if (bias<0) { pa+=*src++; pa>>=1; bias+=destLen; } - pa&=mask; pa+=(*dest)&mask; pa>>=1; - *dest++=(unsigned short)pa; - } - while (dest>8); // If address is odd, bytes are swapped - a>>=1; - - switch (Pico.video.type) - { - case 1: Pico.vram [a&0x7fff]=sd; break; - case 3: Pico.cram [a&0x003f]=sd; Pico.m.dirtyPal=1; break; - case 5: Pico.vsram[a&0x003f]=sd; break; - } - - AutoIncrement(); -} - -static unsigned int VideoRead() -{ - unsigned int a=0,d=0; - - a=Pico.video.addr; a>>=1; - - switch (Pico.video.type) - { - case 0: d=Pico.vram [a&0x7fff]; break; - case 8: d=Pico.cram [a&0x003f]; break; - case 4: d=Pico.vsram[a&0x003f]; break; - } - - AutoIncrement(); - return d; -} - -static int GetDmaSource() -{ - struct PicoVideo *pvid=&Pico.video; - int source=0; - source =pvid->reg[0x15]<<1; - source|=pvid->reg[0x16]<<9; - source|=pvid->reg[0x17]<<17; - return source; -} - -static int GetDmaLength() -{ - struct PicoVideo *pvid=&Pico.video; - int len=0; - // 16-bit words to transfer: - len =pvid->reg[0x13]; - len|=pvid->reg[0x14]<<8; - return len; -} - -static void DmaSlow(int source,int len) -{ - int i=0,max=0; - - if (source>=0x800000 && source<0xe00000) return; // Invalid source address - - /// Clip Cram DMA size (Todds Adventures in Slime World): - if (Pico.video.type==3) { max=0x80-Pico.video.addr; if (len>max) len=max; } - - for (i=0;i>=1; // Length specifies number of bytes - - for (i=0;ireg[1]&0x10)==0) return; // DMA not enabled - - len=GetDmaLength(); - - method=pvid->reg[0x17]>>6; - source=GetDmaSource(); - if (method< 2) DmaSlow(source,len); // 68000 to VDP - if (method==3) DmaCopy(source,len); // VRAM Copy -} - -static void CommandChange() -{ - struct PicoVideo *pvid=&Pico.video; - unsigned int cmd=0,addr=0; - - cmd=pvid->command; - - // Get type of transfer 0xc0000030 (v/c/vsram read/write) - pvid->type=(unsigned char)(((cmd>>2)&0xc)|(cmd>>30)); - - // Get address 0x3fff0003 - addr =(cmd>>16)&0x3fff; - addr|=(cmd<<14)&0xc000; - pvid->addr=(unsigned short)addr; - - // Check for dma: - if (cmd&0x80) CommandDma(); -} - -void PicoVideoWrite(unsigned int a,unsigned int d) -{ - struct PicoVideo *pvid=&Pico.video; - - a&=0x1c; - d=(unsigned short)d; - - if (a==0x00) // Data port 0 or 2 - { - if (pvid->pending) CommandChange(); - pvid->pending=0; - - // If a DMA fill has been set up, do it - if ((pvid->command&0x80) && (pvid->reg[1]&0x10) && (pvid->reg[0x17]>>6)==2) - { - DmaFill(d); - } - else - { - VideoWrite(d); - } - return; - } - - if (a==0x04) // Command port 4 or 6 - { - if (pvid->pending) - { - // Low word of command: - pvid->command&=0xffff0000; - pvid->command|=d; - pvid->pending=0; - CommandChange(); - return; - } - - if ((d&0xc000)==0x8000) - { - // Register write: - int num=(d>>8)&0x1f; - pvid->reg[num]=(unsigned char)d; - return; - } - - // High word of command: - pvid->command&=0x0000ffff; - pvid->command|=d<<16; - pvid->pending=1; - } -} - -unsigned int PicoVideoRead(unsigned int a) -{ - unsigned int d=0; - - a&=0x1c; - - if (a==0x00) { d=VideoRead(); goto end; } - - if (a==0x04) - { - d=Pico.video.status; - - // Toggle fifo full empty: - if (Pico.m.rotate&4) d|=0x3520; else d|=0x3620; - if (Pico.m.rotate&2) d|=0x0004; // Toggle in/out of H-Blank - Pico.m.rotate++; - - if (Pico.m.pal) d|=1; // PAL screen - - goto end; - } - - if ((a&0x1c)==0x08) - { - if (Pico.m.scanline>-64) d=Pico.m.scanline; // HV-Counter - else d=Pico.m.rotate++; // Fudge - - d&=0xff; d<<=8; - goto end; - } - -end: - - return d; -} diff --git a/Pico/driver.h b/Pico/driver.h deleted file mode 100644 index 14439af..0000000 --- a/Pico/driver.h +++ /dev/null @@ -1,29 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -// Drive filler file for ym2612.c -#undef INLINE -#define INLINE __inline - -#define CLIB_DECL -#define INTERNAL_TIMER - -// Callbacks from fm.c -int YM2612UpdateReq(int nChip); -int AY8910_set_clock(int nChip,int nClock); -//int Log(int nType,char *szText,...); -extern void *errorlog; - -#ifndef __GNUC__ -#pragma warning (disable:4100) -#pragma warning (disable:4244) -#pragma warning (disable:4245) -#pragma warning (disable:4710) -#endif diff --git a/PicoDrive/Config.cpp b/PicoDrive/Config.cpp deleted file mode 100644 index 0dcbaba..0000000 --- a/PicoDrive/Config.cpp +++ /dev/null @@ -1,95 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "stdafx.h" - -static char *ConfigName="\\PicoConfig.txt"; -struct Config Config; - -int ConfigInit() -{ - memset(&Config,0,sizeof(Config)); - - Config.key[0]=VK_UP; - Config.key[1]=VK_DOWN; - Config.key[2]=VK_LEFT; - Config.key[3]=VK_RIGHT; - Config.key[4]=GXKey.vkC; // A - Config.key[5]=GXKey.vkA; // B - Config.key[6]=GXKey.vkB; // C - Config.key[7]=GXKey.vkStart; - - return 0; -} - -int ConfigSave() -{ - FILE *f=NULL; - int i=0,max=0; - - // Open config file: - f=fopen(ConfigName,"wt"); if (f==NULL) return 1; - - fprintf(f,"// PicoDrive Config File\n\n"); - - fprintf(f,"// Keys: Up Down Left Right\n"); - fprintf(f,"// A B C Start\n\n"); - - max=sizeof(Config.key)/sizeof(Config.key[0]); - for (i=0;i=1000) break; - } - - // Use this filename - file=fopen(filename,"wb"); if (file==NULL) { GXEndDraw(); free(line); return 1; } - - head[0x02]=0x02; //? - head[0x0c]=(unsigned char) GXDisp.cxWidth; - head[0x0d]=(unsigned char)(GXDisp.cxWidth>>8); - head[0x0e]=(unsigned char) GXDisp.cyHeight; - head[0x0f]=(unsigned char)(GXDisp.cyHeight>>8); - head[0x10]=24; // Number of bits per pixel - - // Write header: - fwrite(head,1,sizeof(head),file); - - for (y=0;y<(int)GXDisp.cyHeight;y++) - { - unsigned char *ps=NULL,*pd=NULL; - int ry=0; - int pix=0; - - ry=GXDisp.cyHeight-y-1; - ps=screen+ry*GXDisp.cbyPitch; - pd=line; - - // Copy pixel to our line buffer - for (x=0;x<(int)GXDisp.cxWidth; x++,ps+=GXDisp.cbxPitch,pd+=3) - { - pix=*(unsigned short *)ps; - - pd[0]=(unsigned char)((pix&0x001f)<<3); // Red - pd[1]=(unsigned char)((pix&0x07e0)>>3); // Green - pd[2]=(unsigned char)((pix&0xf800)>>8); // Blue - } - - fwrite(line,1,GXDisp.cxWidth*3,file); - } - - fclose(file); file=NULL; - - GXEndDraw(); - free(line); - - return 0; -} diff --git a/PicoDrive/Emulate.cpp b/PicoDrive/Emulate.cpp deleted file mode 100644 index 6844818..0000000 --- a/PicoDrive/Emulate.cpp +++ /dev/null @@ -1,226 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "stdafx.h" - -TCHAR RomName[260]={0}; -static unsigned char *RomData=NULL; -static unsigned int RomSize=0; - -static unsigned int LastSecond=0; -static int FramesDone=0; -static int FramesPerSecond=60; - -struct Target Targ; - -static int TargetInit() -{ - RECT rect={0,0,0,0}; - int height=0; - - memset(&Targ,0,sizeof(Targ)); - - height=168; - - ClientToScreen(FrameWnd,&Targ.point); - - GetClientRect(FrameWnd,&rect); - // Find out where the top of the screen should go: - rect.top=(rect.bottom-height)>>1; - if (rect.top<0) rect.top=0; - rect.bottom=rect.top+height; - - Targ.view=rect; // Save the view rectangle (client coordinates) - - Targ.offset=Targ.view.top+Targ.point.y; - - return 0; -} - -static int TargetUpdate() -{ - // Need to repaint the view rectangle: - GetUpdateRect(FrameWnd,&Targ.update,0); - - Targ.top =Targ.update.top +Targ.point.y; - Targ.bottom=Targ.update.bottom+Targ.point.y; - - return 0; -} - -int EmulateInit() -{ - FILE *f=NULL; - - EmulateExit(); // Make sure exited - - TargetInit(); // Find out where to put the screen - - PicoInit(); - - // Load cartridge - f=_wfopen(RomName,L"rb"); if (f==NULL) return 1; - PicoCartLoad(f,&RomData,&RomSize); - fclose(f); - - PicoCartInsert(RomData,RomSize); - - LastSecond=GetTickCount(); FramesDone=0; - - return 0; -} - -void EmulateExit() -{ - // Remove cartridge - PicoCartInsert(NULL,0); - if (RomData) free(RomData); RomData=NULL; RomSize=0; - - PicoExit(); -} - -// Callback for scanline data: -static int EmulateScan(unsigned int scan,unsigned short *sdata) -{ - int len=0; - unsigned short *ps=NULL,*end=NULL; - unsigned char *pd=NULL; - int xpitch=0; - - if ((scan&3)==1) return 0; - scan+=scan<<1; scan>>=2; // Reduce size to 75% - - scan+=Targ.offset; - if ((int)scan< Targ.top) return 0; // Out of range - if ((int)scan>=Targ.bottom) return 0; // Out of range - - pd=Targ.screen+scan*GXDisp.cbyPitch; - - len=240; - xpitch=GXDisp.cbxPitch; - ps=sdata; end=ps+320; - - // Reduce 4 pixels into 3 - do - { - *(unsigned short *)pd=ps[0]; pd+=xpitch; - *(unsigned short *)pd=(unsigned short)((ps[1]+ps[2])>>1); pd+=xpitch; - *(unsigned short *)pd=ps[3]; pd+=xpitch; - ps+=4; - } - while (ps0) - { - // Carry over any >60 frame count to one second - while (FramesDone>=FramesPerSecond) { FramesDone-=FramesPerSecond; LastSecond+=1000; } - } - - if (need<=0) { Sleep(2); return 1; } - if (need>4) need=4; // Limit frame skipping - - for (i=0;i>1; - ofn.lpstrDefExt=L"mds"; - ofn.lpstrFilter=L"MD State Files\0*.mds\0\0"; - - if (load) GetOpenFileNameW(&ofn); - else GetSaveFileNameW(&ofn); - UpdateWindow(FrameWnd); - - if (name[0]==0) return 1; - - if (PmovFile) fclose(PmovFile); - - PmovFile=_wfopen(name,load ? L"rb":L"wb"); - if (PmovFile==NULL) return 1; - - PmovAction=load?6:5; - PmovState(); // Save the state - - return 0; -} diff --git a/PicoDrive/FrameWindow.cpp b/PicoDrive/FrameWindow.cpp deleted file mode 100644 index 110d6dd..0000000 --- a/PicoDrive/FrameWindow.cpp +++ /dev/null @@ -1,101 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "stdafx.h" - -HWND FrameWnd=NULL; -struct GXDisplayProperties GXDisp; -struct GXKeyList GXKey; - -// Window procedure for frame window -static LRESULT CALLBACK FrameProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam) -{ - switch (Msg) - { - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDOK: case IDCANCEL: SendMessage(hWnd,WM_CLOSE,0,0); break; - - case ID_LOADROM: FileLoadRom(); break; - case ID_OPTIONS_GRAB: DebugScreenGrab(); break; - case ID_OPTIONS_SAVE: FileState(0); break; - case ID_OPTIONS_LOAD: FileState(1); break; - } - return 0; - - case WM_KILLFOCUS: GXSuspend(); return 0; - case WM_SETFOCUS: GXResume(); return 0; - - case WM_CLOSE: PostQuitMessage(0); return 0; - - case WM_DESTROY: - GXCloseInput(); - GXCloseDisplay(); - FrameWnd=NULL; // Blank window handle - return 0; - } - - return DefWindowProc(hWnd,Msg,wParam,lParam); -} - -static int GxInit() -{ - GXOpenDisplay(FrameWnd,GX_FULLSCREEN); - GXOpenInput(); - GXDisp=GXGetDisplayProperties(); - GXKey=GXGetDefaultKeys(GX_NORMALKEYS); - - // The real layout of the 3800: - if (Main3800) { GXDisp.cbxPitch=-640; GXDisp.cbyPitch=2; } - - return 0; -} - -int FrameInit() -{ - WNDCLASS wc; - SHMENUBARINFO mbi; - TCHAR title[128]={0}; - RECT rect={0,0,0,0}; - - memset(&wc,0,sizeof(wc)); - memset(&mbi,0,sizeof(mbi)); - - // Register the Frame window class - wc.lpfnWndProc=FrameProc; - wc.hInstance=GetModuleHandle(NULL); - wc.lpszClassName=APP_TITLE; - wc.hbrBackground=(HBRUSH)CreateSolidBrush(0x404040); - RegisterClass(&wc); - - FrameWnd=CreateWindowEx(WS_EX_CAPTIONOKBTN,APP_TITLE,APP_TITLE,WS_VISIBLE, - CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, - NULL,NULL,wc.hInstance,NULL); - - wsprintf(title,APP_TITLE L" v%x.%.3x",PicoVer>>12,PicoVer&0xfff); - SetWindowText(FrameWnd,title); - - // Show SIP - mbi.cbSize=sizeof(mbi); - mbi.hwndParent=FrameWnd; - mbi.nToolBarId=IDR_MENUBAR1; - mbi.hInstRes=wc.hInstance; - SHCreateMenuBar(&mbi); - - // Resize Frame to avoid the SIP - GetWindowRect(FrameWnd,&rect); - MoveWindow(FrameWnd, rect.left,rect.top, rect.right-rect.left,rect.bottom-rect.top-26, 1); - - GxInit(); - - FileLoadRom(); - return 0; -} diff --git a/PicoDrive/PicoDrive.txt b/PicoDrive/PicoDrive.txt deleted file mode 100644 index 9da9484..0000000 --- a/PicoDrive/PicoDrive.txt +++ /dev/null @@ -1,191 +0,0 @@ - ----------------------------------------------------------------------------- - - PicoDrive - - Megadrive emulator for Pocket PC - -This code is licensed under the GNU General Public License version 2.0 and the MAME License. -You can choose the license that has the most advantages for you. - -SVN repository can be found at http://code.google.com/p/cyclone68000/ - ----------------------------------------------------------------------------- - - What's new? - -0.030 - Cyclone v0.076, fixes: - + Fixed an issue with sbcd - e.g. when 0x00-0x01 was performed, the result was correct (0x99), - but the carry bit was not set. Also changed abcd code to be more similar to new sbcd. - Used on RT2. - + Fixed a subtle issue in btst #n,(An), if the target is less that 32-bit, the value is - now masked. - Rolling Thunder 2 did this, but it doesn't seem to have fixed/broken anything. - + Oops #2! Cmpa was writing back the value to the destination register! Fixes: don't know. - + Oops #3! The CCR should be writable from any mode, previously it was only allowed from the - supervisor mode. Fixes Gain Ground. - + Added cmpm (Flicky, Decap Attack) - + For movem, added some EA modes (like 0x3a PC relative) which I thought were invalid, but - Flicky uses movem to PC relative... - + Oops, incorrect eor opcodes were being emitted instead of cmpm opcodes - * Trying a different way of doing addx/subx with carry (to fix zero flag?) - -0.025 - + Doh, fixed a dumb divide by zero in the (w.i.p.) sound code - Sonic 1, Revenge of Shinobi - work again! - -0.024 - Cyclone v0.072: - + Fixed a problem with divs - remainder should be negative when result is negative - Fixed intro of Block Out. - - + Fixed a typo in SekInterrupt - - + Added a config file PicoConfig.txt with key codes, in the root directory - of the Pocket PC. If you want you can edit this to remap keys. I'll add - an easier way to redefine keys later. - - Revenge of Shinobi strangely seems broken? - -0.022 - Cyclone changes: - + Added movep opcode (Sonic 3 works) - + Fixed a problem with DBcc not decrementing if the condition is false (Shadow of the Beast) - -0.018 - Cyclone changes: - + Added SBCD and the flags for ABCD/SBCD. Score and time now works in games such as - Rolling Thunder 2, Ghouls 'N Ghosts - + Fixed a problem with addx and subx with 8-bit and 16-bit values. - Ghouls 'N' Ghosts now works! - + Alien 3 now works - + Added ABCD opcode (Streets of Rage works now!) - -0.017 Added Window (score display) - -0.016 - + Added some Z80 faking which makes a few more games run - + Sped up graphics rendering a bit - + Fixed Sprite priority - -Cyclone Fixes - + Added dbCC (After Burner) - + Added asr EA (Sonic 1 Boss/Labyrinth Zone) - + Added andi/ori/eori ccr (Altered Beast) - + Added trap (After Burner) - + Added special case for move.b (a7)+ and -(a7), stepping by 2 - After Burner is playable! Eternal Champions shows more - + Fixed lsr.b/w zero flag (Ghostbusters) - Rolling Thunder 2 first level only now works - + Fixed N flag for .b and .w arithmetic. Golden Axe works! - - -v0.011 -Changes are to the Cyclone core, repeated here: ----- -v0.0065 - + Fixed a problem with immediate values - they weren't being shifted up correctly for some - opcodes. Spiderman works, After Burner shows a bit of graphics. - + Fixed a problem with EA:"110nnn" extension word. 32-bit offsets were being decoded as 8-bit - offsets by mistake. Castlevania Bloodlines seems fine now. - + Added exg opcode - + Fixed asr opcode (Sonic jumping left is fixed) - + Fixed a problem with the carry bit in rol.b (Marble Madness) - -v0.0064 - + Added rtr - + Fixed addq/subq.l (all An opcodes are 32-bit) (Road Rash) - + Fixed various little timings - -v0.0063 - + Added link/unlk opcodes - + Fixed various little timings - + Fixed a problem with dbCC opcode being emitted at set opcodes - + Improved long register access, the EA fetch now does ldr r0,[r7,r0,lsl #2] whenever - possible, saving 1 or 2 cycles on many opcodes, which should give a nice speed up. - + May have fixed N flag on ext opcode? - + Added dasm for link opcode. - -v0.0062 - * I was a bit too keen with the Arithmetic opcodes! Some of them should have been abcd, - exg and addx. Removed the incorrect opcodes, pending re-adding them as abcd, exg and addx. - + Changed unknown opcodes to act as nops. - Not very technical, but fun - a few more games show more graphics ;) - -v0.0060 - + Fixed divu (EA intro) - + Added sf (set false) opcode - SOR2 - * Todo: pea/link/unlk opcodes ----- -v0.010 - -+ Cyclone v0.0059: Added remainder to divide opcodes. - Background is now fixed on Eswat and Revenge of Shinobi. In fact they are playable! - -* Shrunk the screen down because some games aren't playable if you can't see the whole - 320 pixel width. - -* Merged the PicoDrive and GenaDrive 'Pico' directories, with ifdefs for EMU_C68K (Cyclone) - and EMU_A68K. - -+ While making GenaDrive I noticed a few bugs in the memory handlers and carried them - over to PicoDrive. - A lot of games (Revenge of Shinobi, Eswat, Sonic 1 maybe even) were reading - from memory locations like 0xff000000+Rom address, and I wasn't returning the Rom data. - Many more games show graphics now (G'n'G, Sonic 1)! - -* Cyclone: Changed the way Cyclone reads memory to be a bit less confusing. - The read/write memory handlers are now like this: - - unsigned char (*read8 )(unsigned int a); // [r7,#0x68] - unsigned short (*read16 )(unsigned int a); // [r7,#0x6c] - unsigned int (*read32 )(unsigned int a); // [r7,#0x70] - void (*write8 )(unsigned int a,unsigned char d); // [r7,#0x74] - void (*write16)(unsigned int a,unsigned short d); // [r7,#0x78] - void (*write32)(unsigned int a,unsigned int d); // [r7,#0x7c] - - This means the Cyclone itself now sign-extends 16 and 8-bit values when needed, and - the application doesn't have to. - - -v0.007 - Initial release - - Haven't been working on this much recently so I thought I'd release what - I had onto the Internet. - - Basically this is largely a framework for Cyclone, my 68000 core, and the - simplest system has to be the Megadrive, which is just really a 68000 with - flat address space wired up to a video display processor. - The Megadrive does of course have a Z80 for sound as well, but many games - will still run without it. Basically it's one of the most forgiving systems, - so it's probably a good starting point. - - Not many games run, and none of them are playable yet, but if you really want - to take a look anyway, here's what to do: - -------------------------------------------------------------------------------- - -How to run PicoDrive - - First connect your Pocket PC and copy PicoDrive.exe to it. Windows\Start Menu is - probably the best place for easy access. - It needs to have GAPI installed, which you may have already. If you don't it - will give you a really unhelpful error message (good old Windows!) like "Unable to execute - program". - To install GAPI just drop gx.dll into either the same folder as PicoDrive, or - your Windows folder. - Rom images go in the My Documents folder, and they must be in .BIN format, uncompressed. - - From memory, some games which do something are: Revenge of Shinobi, Sonic 2, - Ghouls 'N' Ghosts and CastleVania Bloodlines. Most just show a big blank screen :( - - If you find any games that are playable (maybe a PD game?), let me know, I'd be interested ;) - My e-mail is dev(at)finalburn.com - replace the (at) with an @ - - I think there must be something wrong somewhere with one of the ASL-type instructions - or something - there are still a few unimplemented opcodes, and also I don't think I did - the remainder from DIVS and DIVU yet. - - Dave. - emudave(atsymbol)gmail.com - diff --git a/PicoDrive/PicoDrive.vcp b/PicoDrive/PicoDrive.vcp deleted file mode 100644 index e0654d3..0000000 --- a/PicoDrive/PicoDrive.vcp +++ /dev/null @@ -1,851 +0,0 @@ -# Microsoft eMbedded Visual Tools Project File - Name="PicoDrive" - Package Owner=<4> -# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (WCE x86) Application" 0x8301 -# TARGTYPE "Win32 (WCE ARM) Application" 0x8501 -# TARGTYPE "Win32 (WCE x86em) Application" 0x7f01 - -CFG=PicoDrive - Win32 (WCE ARM) Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "PicoDrive.vcn". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "PicoDrive.vcn" CFG="PicoDrive - Win32 (WCE ARM) Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "PicoDrive - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Application") -!MESSAGE "PicoDrive - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Application") -!MESSAGE "PicoDrive - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application") -!MESSAGE "PicoDrive - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application") -!MESSAGE "PicoDrive - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Application") -!MESSAGE "PicoDrive - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -# PROP ATL_Project 2 - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ARMRel" -# PROP BASE Intermediate_Dir "ARMRel" -# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ARMRel" -# PROP Intermediate_Dir "ARMRel" -# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=clarm.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM -# ADD LINK32 coredll.lib gx.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM -# Begin Special Build Tool -TargetPath=.\ARMRel\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "D:\Briefcase" -# End Special Build Tool - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "ARMDbg" -# PROP BASE Intermediate_Dir "ARMDbg" -# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "ARMDbg" -# PROP Intermediate_Dir "ARMDbg" -# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=clarm.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM -# 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 -# Begin Special Build Tool -TargetPath=.\ARMDbg\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents" -# End Special Build Tool - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "X86Rel" -# PROP BASE Intermediate_Dir "X86Rel" -# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "X86Rel" -# PROP Intermediate_Dir "X86Rel" -# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=cl.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# 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 -# 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 -# Begin Special Build Tool -TargetPath=.\X86Rel\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents" -# End Special Build Tool - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "X86Dbg" -# PROP BASE Intermediate_Dir "X86Dbg" -# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "X86Dbg" -# PROP Intermediate_Dir "X86Dbg" -# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=cl.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# 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 -# 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 -# Begin Special Build Tool -TargetPath=.\X86Dbg\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents" -# End Special Build Tool - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "X86EMRel" -# PROP BASE Intermediate_Dir "X86EMRel" -# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "X86EMRel" -# PROP Intermediate_Dir "X86EMRel" -# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=cl.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /subsystem:windows /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 -# ADD LINK32 $(CEx86Corelibc) coredll.lib gx.lib aygshell.lib /nologo /stack:0x10000,0x1000 /subsystem:windows /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 -# Begin Special Build Tool -TargetPath=.\X86EMRel\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents" -# End Special Build Tool - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "X86EMDbg" -# PROP BASE Intermediate_Dir "X86EMDbg" -# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "X86EMDbg" -# PROP Intermediate_Dir "X86EMDbg" -# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" -# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# 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 -# 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 -CPP=cl.exe -# 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 -# 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 -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /subsystem:windows /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 -# 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 -# Begin Special Build Tool -TargetPath=.\X86EMDbg\PicoDrive.exe -SOURCE="$(InputPath)" -PostBuild_Cmds=copy $(TargetPath) "C:\Documents and Settings\Dave\My Documents\Mio My Documents" -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "PicoDrive - Win32 (WCE ARM) Release" -# Name "PicoDrive - Win32 (WCE ARM) Debug" -# Name "PicoDrive - Win32 (WCE x86) Release" -# Name "PicoDrive - Win32 (WCE x86) Debug" -# Name "PicoDrive - Win32 (WCE x86em) Release" -# Name "PicoDrive - Win32 (WCE x86em) Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Config.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_CONFI=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_CONFI=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_CONFI=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_CONFI=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_CONFI=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Debug.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_DEBUG=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_DEBUG=\ - "..\Cyclone\Cyclone.h"\ - "..\Pico\Disa.h"\ - "..\Pico\Pico.h"\ - "..\Pico\PicoInt.h"\ - -NODEP_CPP_DEBUG=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_DEBUG=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_DEBUG=\ - "..\Cyclone\Cyclone.h"\ - "..\Pico\Pico.h"\ - "..\Pico\PicoInt.h"\ - -NODEP_CPP_DEBUG=\ - "..\Cyclone\Disa.h"\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_DEBUG=\ - "..\Cyclone\Cyclone.h"\ - "..\Pico\Disa.h"\ - "..\Pico\Pico.h"\ - "..\Pico\PicoInt.h"\ - -NODEP_CPP_DEBUG=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_DEBUG=\ - "..\Cyclone\Cyclone.h"\ - "..\Pico\Pico.h"\ - "..\Pico\PicoInt.h"\ - -NODEP_CPP_DEBUG=\ - "..\Cyclone\Disa.h"\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\Emulate.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_EMULA=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_EMULA=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_EMULA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\File.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - -NODEP_CPP_FILE_=\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - -NODEP_CPP_FILE_=\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - -NODEP_CPP_FILE_=\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_FILE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - -NODEP_CPP_FILE_=\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\FrameWindow.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_FRAME=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_FRAME=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_FRAME=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\PicoDrive.txt -# End Source File -# Begin Source File - -SOURCE=.\Wave.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WAVE_=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WAVE_=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WAVE_=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_WAVE_=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WAVE_=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\WinMain.cpp - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WINMA=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - -NODEP_CPP_WINMA=\ - ".\app.h"\ - ".\ipapi.h"\ - ".\x.h"\ - ".\ygshell.h"\ - - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -DEP_CPP_WINMA=\ - "..\Pico\Pico.h"\ - ".\stdafx.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"gx.h"\ - {$(INCLUDE)}"sipapi.h"\ - - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\afxres.h -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# Begin Source File - -SOURCE=.\stdafx.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\bitmap1.bmp -# End Source File -# Begin Source File - -SOURCE=.\Script1.rc - -!IF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Release" - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE ARM) Debug" - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Release" - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86) Debug" - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Release" - -!ELSEIF "$(CFG)" == "PicoDrive - Win32 (WCE x86em) Debug" - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/PicoDrive/PicoDrive.vcw b/PicoDrive/PicoDrive.vcw deleted file mode 100644 index 05c3401..0000000 --- a/PicoDrive/PicoDrive.vcw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Pico"=..\Pico\Pico.vcp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "PicoDrive"=.\PicoDrive.vcp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name Pico - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/PicoDrive/Script1.rc b/PicoDrive/Script1.rc deleted file mode 100644 index d7928d3..0000000 --- a/PicoDrive/Script1.rc +++ /dev/null @@ -1,116 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Menubar -// - -IDR_MENUBAR1 MENU DISCARDABLE -BEGIN - MENUITEM "Load Rom", ID_LOADROM - POPUP "Options" - BEGIN - MENUITEM "Save Movie", ID_OPTIONS_SAVE - MENUITEM "Load Movie", ID_OPTIONS_LOAD - MENUITEM "Grab Image", ID_OPTIONS_GRAB - END - MENUITEM "Close", IDCANCEL -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Data -// - -IDR_MENUBAR1 SHMENUBAR DISCARDABLE -BEGIN - IDR_MENUBAR1, 3, - I_IMAGENONE, ID_LOADROM, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, - IDS_CAP_LOADROM, 0, 0, - I_IMAGENONE, ID_OPTIONS, TBSTATE_ENABLED, - TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_CAP_OPTIONS, 0, 1, - I_IMAGENONE, IDCANCEL, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, IDS_CAP_CLOSE, - 0, 2, -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_CAP_LOADROM "Load Rom" - IDS_CAP_CLOSE "Close" - IDS_CAP_GRAB "Grab" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_CAP_OPTIONS "Options" -END - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/PicoDrive/Wave.cpp b/PicoDrive/Wave.cpp deleted file mode 100644 index 15350ef..0000000 --- a/PicoDrive/Wave.cpp +++ /dev/null @@ -1,114 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "stdafx.h" - -int WaveRate=0; -int WaveLen=0; // Length of each buffer in samples -short *WaveDest=NULL; // Destination to render sound - -static HWAVEOUT WaveOut=NULL; -static short *WaveBuf=NULL; // Wave double-buffer -static WAVEHDR WaveHeader[2]; // WAVEHDR for each buffer -static int WavePlay=0; // Next buffer side to play - -int WaveInit() -{ - WAVEFORMATEX wfx; - WAVEHDR *pwh=NULL; - - if (WaveOut) return 0; // Already initted - - memset(&wfx,0,sizeof(wfx)); - memset(&WaveHeader,0,sizeof(WaveHeader)); - - wfx.wFormatTag=WAVE_FORMAT_PCM; - wfx.nChannels=2; // stereo - wfx.nSamplesPerSec=WaveRate; // sample rate - wfx.wBitsPerSample=16; - // Calculate bytes per sample and per second - wfx.nBlockAlign=(unsigned short)( (wfx.wBitsPerSample>>3)*wfx.nChannels ); - wfx.nAvgBytesPerSec=wfx.nSamplesPerSec*wfx.nBlockAlign; - - waveOutOpen(&WaveOut,WAVE_MAPPER,&wfx,0,NULL,CALLBACK_NULL); - - // Allocate both buffers - WaveBuf=(short *)malloc(WaveLen<<3); - if (WaveBuf==NULL) return 1; - memset(WaveBuf,0,WaveLen<<3); - - // Make WAVEHDRs for both buffers - pwh=WaveHeader+0; - pwh->lpData=(char *)WaveBuf; - pwh->dwBufferLength=WaveLen<<2; - pwh->dwLoops=1; - - pwh=WaveHeader+1; - *pwh=WaveHeader[0]; pwh->lpData+=WaveLen<<2; - - // Prepare the buffers - waveOutPrepareHeader(WaveOut,WaveHeader, sizeof(WAVEHDR)); - waveOutPrepareHeader(WaveOut,WaveHeader+1,sizeof(WAVEHDR)); - - // Queue both buffers: - WavePlay=0; - WaveHeader[0].dwFlags|=WHDR_DONE; - WaveHeader[1].dwFlags|=WHDR_DONE; - WaveUpdate(); - return 0; -} - -int WaveExit() -{ - WAVEHDR *pwh=NULL; - int i=0; - - if (WaveOut) waveOutReset(WaveOut); - - for (i=0;i<2;i++) - { - pwh=WaveHeader+i; - if (pwh->lpData) waveOutUnprepareHeader(WaveOut,pwh,sizeof(*pwh)); - } - memset(WaveHeader,0,sizeof(WaveHeader)); - - free(WaveBuf); WaveBuf=NULL; WaveLen=0; - - if (WaveOut) waveOutClose(WaveOut); WaveOut=NULL; - return 0; -} - -int WaveUpdate() -{ - WAVEHDR *pwh=NULL; int i=0; - int Last=-1; - - for (i=0;i<2;i++) - { - pwh=WaveHeader+WavePlay; - if (pwh->lpData==NULL) return 1; // Not initted - - if (pwh->dwFlags&WHDR_DONE) - { - // This buffer has finished - start it playing again - WaveDest=(short *)pwh->lpData; - SndRender(); - WaveDest=NULL; - - waveOutWrite(WaveOut,pwh,sizeof(*pwh)); - Last=WavePlay; // Remember the last buffer we played - } - - WavePlay++; WavePlay&=1; - } - - if (Last>=0) WavePlay=Last^1; // Next buffer to play is the other one - return 0; -} diff --git a/PicoDrive/WinMain.cpp b/PicoDrive/WinMain.cpp deleted file mode 100644 index ccd53b2..0000000 --- a/PicoDrive/WinMain.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#include "stdafx.h" -#include - -static FILE *DebugFile=NULL; -int Main3800=0; -int WINAPI WinMain(HINSTANCE,HINSTANCE,LPTSTR,int) -{ - MSG msg; int ret=0; - TCHAR device[260]; - - memset(&msg,0,sizeof(msg)); - memset(device,0,sizeof(device)); - - // Check if this program is running already: - FrameWnd=FindWindow(APP_TITLE,NULL); - if (FrameWnd!=NULL) { SetForegroundWindow(FrameWnd); return 0; } - - DeleteFile(L"zout.txt"); - - SystemParametersInfo(SPI_GETOEMINFO,sizeof(device)>>1,device,0); - if (_wcsicmp(device,L"compaq ipaq h3800")==0) Main3800=1; - - FrameInit(); - - ConfigInit(); - ConfigLoad(); - - WaveRate=44100; WaveLen=735; - WaveInit(); - - for(;;) - { - ret=PeekMessage(&msg,NULL,0,0,PM_REMOVE); - if (ret) - { - if (msg.message==WM_QUIT) break; - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else - { - EmulateFrame(); - //WaveUpdate(); - Sleep(1); - } - } - - WaveExit(); - EmulateExit(); - - ConfigSave(); - - DestroyWindow(FrameWnd); - - if (DebugFile) fclose(DebugFile); - DebugFile=NULL; - return 0; -} - -extern "C" int dprintf(char *Format, ...) -{ - va_list VaList=NULL; - va_start(VaList,Format); - - if (DebugFile==NULL) DebugFile=fopen("zout.txt","wt"); - if (DebugFile) vfprintf(DebugFile,Format,VaList); - - va_end(VaList); - return 0; -} diff --git a/PicoDrive/afxres.h b/PicoDrive/afxres.h deleted file mode 100644 index eb920f8..0000000 --- a/PicoDrive/afxres.h +++ /dev/null @@ -1,16 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include -#define I_IMAGENONE (-2) -#define SHMENUBAR RCDATA diff --git a/PicoDrive/resource.h b/PicoDrive/resource.h deleted file mode 100644 index 61cde71..0000000 --- a/PicoDrive/resource.h +++ /dev/null @@ -1,27 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Script1.rc -// -#define IDR_MENUBAR1 101 -#define ID_LOADROM 40001 -#define IDS_CAP_LOADROM 40003 -#define IDS_CAP_CLOSE 40006 -#define ID_DEBUG_SHOWRAM 40010 -#define ID_GRAB 40012 -#define IDS_CAP_GRAB 40014 -#define ID_OPTIONS 40015 -#define IDS_CAP_OPTIONS 40017 -#define ID_OPTIONS_SAVE 40018 -#define ID_OPTIONS_LOAD 40019 -#define ID_OPTIONS_GRAB 40020 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 104 -#define _APS_NEXT_COMMAND_VALUE 40021 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/PicoDrive/stdafx.h b/PicoDrive/stdafx.h deleted file mode 100644 index 3283b35..0000000 --- a/PicoDrive/stdafx.h +++ /dev/null @@ -1,82 +0,0 @@ - -// This file is part of the PicoDrive Megadrive Emulator - -// Copyright (c) 2011 FinalDave (emudave (at) gmail.com) - -// This code is licensed under the GNU General Public License version 2.0 and the MAME License. -// You can choose the license that has the most advantages for you. - -// SVN repository can be found at http://code.google.com/p/cyclone68000/ - -#pragma warning(disable:4514) -#pragma warning(push) -#pragma warning(disable:4201) -#include -#pragma warning(pop) - -#include -#include -#include - -#include "resource.h" - -#include "../Pico/Pico.h" - -#define APP_TITLE L"PicoDrive" - -// ---------------------------------------------------------- - -struct Target -{ - unsigned char *screen; - POINT point; // Screen to client point - RECT view,update; - int offset; // Amount to add onto scanline - int top,bottom; // Update rectangle in screen coordinates -}; - -// Config.cpp -struct Config -{ - int key[8]; -}; -extern struct Config Config; - -int ConfigInit(); -int ConfigSave(); -int ConfigLoad(); - -// Debug.cpp -int DebugShowRam(); -int DebugScreenGrab(); - -// Emulate.cpp -extern struct Target Targ; -extern TCHAR RomName[260]; -int EmulateInit(); -void EmulateExit(); -int EmulateFrame(); -int SndRender(); - -// File.cpp -int FileLoadRom(); -int FileState(int load); - -// FrameWindow.cpp -extern HWND FrameWnd; -extern struct GXDisplayProperties GXDisp; -extern struct GXKeyList GXKey; -extern int FrameShowRam; -int FrameInit(); - -// Wave.cpp -extern int WaveRate; -extern int WaveLen; // Length of each buffer in samples -extern short *WaveDest; // Destination to render sound -int WaveInit(); -int WaveExit(); -int WaveUpdate(); - -// WinMain.cpp -extern "C" int dprintf(char *Format, ...); -extern int Main3800; diff --git a/Cyclone/app.h b/app.h similarity index 100% rename from Cyclone/app.h rename to app.h diff --git a/Cyclone/config.h b/config.h similarity index 100% rename from Cyclone/config.h rename to config.h -- 2.39.5