From 85d30d5c5f5f5261564f146557b1d6045c997904 Mon Sep 17 00:00:00 2001 From: OV2 Date: Sat, 12 Feb 2011 18:13:22 +0100 Subject: [PATCH 1/7] Win32: Fix hires blending interfering with avi recording Blending is now done onto a separate surface, leaving GFX.Screen intact for avi recording. This also makes it possible to preview the effect in the video settings. --- win32/render.cpp | 6 +++--- win32/render.h | 2 +- win32/win32.cpp | 21 ++++++++++++++------- win32/win32_display.cpp | 35 +++++++++++++++++++---------------- win32/wsnes9x.cpp | 9 ++++++++- 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/win32/render.cpp b/win32/render.cpp index 97c68bb9..e1c8b25c 100644 --- a/win32/render.cpp +++ b/win32/render.cpp @@ -550,15 +550,15 @@ inline void SetRect(RECT* rect, int width, int height, int scale) } #define AVERAGE_565(el0, el1) (((el0) & (el1)) + ((((el0) ^ (el1)) & 0xF7DE) >> 1)) -void RenderMergeHires(void *buffer, int pitch, unsigned int &width, unsigned int &height) +void RenderMergeHires(void *src, void* dst, int pitch, unsigned int &width, unsigned int &height) { if (width <= 256) return; for (register int y = 0; y < height; y++) { - register uint16 *input = (uint16 *) ((uint8 *) buffer + y * pitch); - register uint16 *output = input; + register uint16 *input = (uint16 *) ((uint8 *) src + y * pitch); + register uint16 *output = (uint16 *) ((uint8 *) dst + y * pitch); register uint16 l, r; l = 0; diff --git a/win32/render.h b/win32/render.h index b80cdcd3..6d760443 100644 --- a/win32/render.h +++ b/win32/render.h @@ -195,7 +195,7 @@ typedef void (*TRenderMethod)( SSurface Src, SSurface Dst, RECT *); void SelectRenderMethod(); void InitLUTsWin32(); -void RenderMergeHires(void *buffer, int pitch, unsigned int &width, unsigned int &height); +void RenderMergeHires(void *src, void* dst, int pitch, unsigned int &width, unsigned int &height); extern TRenderMethod RenderMethod; extern TRenderMethod RenderMethodHiRes; diff --git a/win32/win32.cpp b/win32/win32.cpp index 2fc2709c..cb09edf5 100644 --- a/win32/win32.cpp +++ b/win32/win32.cpp @@ -203,8 +203,10 @@ #include -BYTE *ScreenBuf1 = NULL; +BYTE *ScreenBuf = NULL; +BYTE *ScreenBufBlend = NULL; BYTE *ScreenBuffer = NULL; +BYTE *ScreenBufferBlend = NULL; struct SJoyState Joystick [16]; uint32 joypads [8]; @@ -976,14 +978,17 @@ void InitSnes9X( void) extern void S9xPostRomInit(); Memory.PostRomInitFunc = S9xPostRomInit; - ScreenBuf1 = new BYTE [EXT_PITCH * EXT_HEIGHT]; + ScreenBuf = new BYTE [EXT_PITCH * EXT_HEIGHT]; + ScreenBufBlend = new BYTE [EXT_PITCH * EXT_HEIGHT]; - ScreenBuffer = ScreenBuf1 + EXT_OFFSET; - memset (ScreenBuf1, 0, EXT_PITCH * EXT_HEIGHT); + ScreenBuffer = ScreenBuf + EXT_OFFSET; + ScreenBufferBlend = ScreenBufBlend + EXT_OFFSET; + memset (ScreenBuf, 0, EXT_PITCH * EXT_HEIGHT); + memset (ScreenBufBlend, 0, EXT_PITCH * EXT_HEIGHT); GFX.Pitch = EXT_PITCH; GFX.RealPPL = EXT_PITCH; - GFX.Screen = (uint16*)(ScreenBuf1 + EXT_OFFSET); + GFX.Screen = (uint16*)(ScreenBuffer); InitializeCriticalSection(&GUI.SoundCritSect); CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1001,8 +1006,10 @@ void InitSnes9X( void) } void DeinitS9x() { - if(ScreenBuf1) - delete [] ScreenBuf1; + if(ScreenBuf) + delete [] ScreenBuf; + if(ScreenBufBlend) + delete [] ScreenBufBlend; DeleteCriticalSection(&GUI.SoundCritSect); CoUninitialize(); if(GUI.GunSight) diff --git a/win32/win32_display.cpp b/win32/win32_display.cpp index c04ab18d..dd845a9e 100644 --- a/win32/win32_display.cpp +++ b/win32/win32_display.cpp @@ -197,6 +197,7 @@ CDirect3D Direct3D; CDirectDraw DirectDraw; COpenGL OpenGL; SSurface Src = {0}; +extern BYTE *ScreenBufferBlend; // Interface used to access the display output IS9xDisplayOutput *S9xDisplayOutput=&Direct3D; @@ -216,11 +217,20 @@ repeats the last rendered frame */ void WinRefreshDisplay(void) { + if(!Src.Width) + return; + SelectRenderMethod (); - if(Src.Surface!=NULL) { - S9xDisplayOutput->Render(Src); - GUI.FlipCounter++; + + Src.Surface = (BYTE *)GFX.Screen; + + if(Src.Width > SNES_WIDTH && GUI.BlendHiRes) { + RenderMergeHires(Src.Surface,ScreenBufferBlend,Src.Pitch,Src.Width,Src.Height); + Src.Surface = ScreenBufferBlend; } + + S9xDisplayOutput->Render(Src); + GUI.FlipCounter++; } void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight) @@ -368,16 +378,9 @@ bool8 S9xDeinitUpdate (int Width, int Height) Src.Pitch = GFX.Pitch; Src.Surface = (BYTE*)GFX.Screen; - const int OrigHeight = Height; - Height = Src.Height; - // avi writing DoAVIVideoFrame(); - if(GUI.BlendHiRes) { - RenderMergeHires(Src.Surface,Src.Pitch,Src.Width,Src.Height); - } - // Clear some of the old SNES rendered image // when the resolution becomes lower in x or y, // otherwise the image processors (filters) might access @@ -388,23 +391,23 @@ bool8 S9xDeinitUpdate (int Width, int Height) if (Width < LastWidth) { - const int hh = max(LastHeight, OrigHeight); + const int hh = max(LastHeight, Height); for (int i = 0; i < hh; i++) memset (GFX.Screen + i * (GFX.Pitch>>1) + Width*1, 0, 4); } - if (OrigHeight < LastHeight) + if (Height < LastHeight) { const int ww = max(LastWidth, Width); - for (int i = OrigHeight; i < LastHeight ; i++) + for (int i = Height; i < LastHeight ; i++) memset (GFX.Screen + i * (GFX.Pitch>>1), 0, ww * 2); // also old clear extended height stuff from drawing surface - if((int)Src.Height > OrigHeight) - for (int i = OrigHeight; i < (int)Src.Height ; i++) + if((int)Src.Height > Height) + for (int i = Height; i < (int)Src.Height ; i++) memset (Src.Surface + i * Src.Pitch, 0, Src.Pitch); } LastWidth = Width; - LastHeight = OrigHeight; + LastHeight = Height; } WinRefreshDisplay(); diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 9442e602..3b284544 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -6958,7 +6958,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) // temporary GUI state for restoring after previewing while selecting options static int prevScale, prevScaleHiRes, prevPPL; - static bool prevStretch, prevAspectRatio, prevHeightExtend, prevAutoDisplayMessages, prevBilinearFilter, prevShaderEnabled; + static bool prevStretch, prevAspectRatio, prevHeightExtend, prevAutoDisplayMessages, prevBilinearFilter, prevShaderEnabled, prevBlendHires; static int prevAspectWidth; static OutputMethod prevOutputMethod; static TCHAR prevHLSLShaderFile[MAX_PATH],prevGLSLShaderFile[MAX_PATH]; @@ -6989,6 +6989,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) prevHeightExtend = GUI.HeightExtend; prevAutoDisplayMessages = Settings.AutoDisplayMessages != 0; prevShaderEnabled = GUI.shaderEnabled; + prevBlendHires = GUI.BlendHiRes; lstrcpy(prevHLSLShaderFile,GUI.HLSLshaderFileName); lstrcpy(prevGLSLShaderFile,GUI.GLSLshaderFileName); @@ -7187,6 +7188,11 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) WinRefreshDisplay(); break; + case IDC_HIRESBLEND: + GUI.BlendHiRes = (bool)(IsDlgButtonChecked(hDlg,IDC_HIRESBLEND)==BST_CHECKED); + WinRefreshDisplay(); + break; + case IDC_AUTOFRAME: if(BN_CLICKED==HIWORD(wParam)||BN_DBLCLK==HIWORD(wParam)) { @@ -7446,6 +7452,7 @@ updateFilterBox2: GUI.AspectWidth = prevAspectWidth; GUI.HeightExtend = prevHeightExtend; GUI.shaderEnabled = prevShaderEnabled; + GUI.BlendHiRes = prevBlendHires; lstrcpy(GUI.HLSLshaderFileName,prevHLSLShaderFile); lstrcpy(GUI.GLSLshaderFileName,prevGLSLShaderFile); } From 8cf6950c3d356e1e86c6fc365d632b2fb470153f Mon Sep 17 00:00:00 2001 From: OV2 Date: Sun, 13 Feb 2011 01:18:55 +0100 Subject: [PATCH 2/7] Win32: use generic DirectX error library (gocha) --- win32/CDirect3D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/CDirect3D.cpp b/win32/CDirect3D.cpp index affa54b1..e60a2bc9 100644 --- a/win32/CDirect3D.cpp +++ b/win32/CDirect3D.cpp @@ -176,7 +176,7 @@ #pragma comment( lib, "d3d9" ) #pragma comment( lib, "d3dx9" ) -#pragma comment( lib, "DxErr9" ) +#pragma comment( lib, "DxErr" ) #include "cdirect3d.h" #include "win32_display.h" From c717e7d5ef9940a7e12374d0d65ae7fefec41beb Mon Sep 17 00:00:00 2001 From: OV2 Date: Sun, 13 Feb 2011 23:44:16 +0100 Subject: [PATCH 3/7] Fix hires pixel plotter Hires images are no longer shifted left by one pixel. --- tile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tile.cpp b/tile.cpp index b1290090..f8d20827 100644 --- a/tile.cpp +++ b/tile.cpp @@ -1388,8 +1388,8 @@ extern struct SLineMatrixData LineMatrixData[240]; #define DRAW_PIXEL_H2x1(N, M) \ if (Z1 > GFX.DB[Offset + 2 * N] && (M)) \ { \ - GFX.S[Offset + 2 * N] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \ - GFX.S[Offset + 2 * N + 1] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N + 2]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \ + GFX.S[Offset + 2 * N] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \ + GFX.S[Offset + 2 * N + 1] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \ GFX.DB[Offset + 2 * N] = GFX.DB[Offset + 2 * N + 1] = Z2; \ } From a013ae33063383b8fbdd6537d1f0348ddacac663 Mon Sep 17 00:00:00 2001 From: zones Date: Sun, 20 Feb 2011 20:27:20 +0900 Subject: [PATCH 4/7] Mac,Unix: Add 256*448,478 support / Mac:code cleanup --- filter/blit.cpp | 17 + filter/blit.h | 1 + macosx/mac-render.cpp | 1938 ++++++++++++----------------------------- unix/x11.cpp | 33 +- 4 files changed, 619 insertions(+), 1370 deletions(-) diff --git a/filter/blit.cpp b/filter/blit.cpp index c3dca16e..4a6d100c 100644 --- a/filter/blit.cpp +++ b/filter/blit.cpp @@ -327,6 +327,23 @@ void S9xBlitPixHiRes16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRo } } +void S9xBlitPixDoubled16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +{ + for (; height; height--) + { + uint16 *dP = (uint16 *) dstPtr, *bP = (uint16 *) srcPtr; + + for (int i = 0; i < width; i++) + { + *dP++ = *bP; + *dP++ = *bP++; + } + + srcPtr += srcRowBytes; + dstPtr += dstRowBytes; + } +} + void S9xBlitPixScaledTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { uint8 *dstPtr2 = dstPtr + dstRowBytes, *deltaPtr = XDelta; diff --git a/filter/blit.h b/filter/blit.h index 493c4f6d..39cb3c9b 100644 --- a/filter/blit.h +++ b/filter/blit.h @@ -192,6 +192,7 @@ void S9xBlitNTSCFilterSet (const snes_ntsc_setup_t *); void S9xBlitPixSmall16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixScaled16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixHiRes16 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixDoubled16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixScaledTV16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixHiResTV16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixHiResMixedTV16 (uint8 *, int, uint8 *, int, int, int); diff --git a/macosx/mac-render.cpp b/macosx/mac-render.cpp index a8c03424..9bb6bd8f 100644 --- a/macosx/mac-render.cpp +++ b/macosx/mac-render.cpp @@ -210,6 +210,8 @@ #include "mac-screenshot.h" #include "mac-render.h" +typedef void (* Blitter) (uint8 *, int, uint8 *, int, int, int); + static OSStatus BlitMPGLTask (void *); static OSStatus PrepareMPBlitGL (void); static void S9xInitFullScreen (void); @@ -228,19 +230,14 @@ static void S9xInitCoreImage (void); static void S9xDeinitCoreImage (void); static void S9xPutImageOpenGL (int, int); static void S9xPutImageBlitGL (int, int); -static void S9xPutImageCoreImage (int, int); -static void S9xPutImageOverscanOpenGL (int, int); -static void S9xPutImageOverscanBlitGL (int, int); -static void S9xPutImageOverscanCoreImage (int, int); static void S9xPutImageBlitGL2 (int, int); -static void S9xPutImageBlitGL2CoreImage (int, int); static void GLMakeScreenMesh (GLfloat *, int, int); static void GLMakeTextureMesh (GLfloat *, int, int, float, float); - -#define BYTES_PER_PIXEL 2 - -#define kMarginDouble ((kMacWindowHeight - (SNES_HEIGHT << 1)) >> 1) -#define kMarginDoubleExt ((kMacWindowHeight - (SNES_HEIGHT_EXTENDED << 1)) >> 1) +static void GLPrepareTexture (bool8, int, int, int, int, int, int); +static inline void RenderBlitScreen (Blitter, int, int, int, int, int, uint16 *); +#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT +static void SetBestDisplayMode (int, int); +#endif enum { @@ -252,6 +249,7 @@ enum enum { kGL256256 = 0, + kGL256512, kGL512256, kGL512512, kGLBlit2x, @@ -268,6 +266,8 @@ enum kSC2xExtend, kSC2xNHiRes, kSC2xEHiRes, + kSC2xNInter, + kSC2xEInter, kSC3xNormal, kSC3xExtend, kSC3xNHiRes, @@ -283,15 +283,12 @@ enum kSCMeshY = 9 }; -typedef void (* Blitter) (uint8 *, int, uint8 *, int, int, int); - typedef struct { Blitter blitFn; int nx; int srcWidth; int srcHeight; - int srcRowBytes; int copyWidth; int copyHeight; uint16 *gfxBuffer; @@ -308,6 +305,9 @@ typedef struct GLint texW[kGLNumTextures]; GLint texH[kGLNumTextures]; GLboolean rangeExt; + GLint storage_hint; + GLint storage_apple; + GLfloat agp_texturing; } OpenGLData; static uint16 *gfxScreen[2], @@ -321,7 +321,7 @@ static MPTaskID taskID = NULL; static MPQueueID notificationQueue = NULL, taskQueue = NULL; static MPSemaphoreID readySemaphore = NULL; -static MPData *mpDataBuffer = NULL; +static MPData *mpBlit = NULL; static OpenGLData OpenGL; static CGLContextObj glContext; @@ -354,17 +354,16 @@ static const int ntsc_width = SNES_NTSC_OUT_WIDTH(SNES_WIDTH); // 602 void InitGraphics (void) { - int safebuffersize = 520 * 520 * BYTES_PER_PIXEL - 512 * 512 * BYTES_PER_PIXEL; + int safemarginbytes = (520 * 520 - 512 * 512) * 2; - GFX.Pitch = 512 * BYTES_PER_PIXEL; + snesScreenA = (uint16 *) calloc( 520 * 520 * 2, 1); + snesScreenB = (uint16 *) calloc( 520 * 520 * 2, 1); + blitGLBuffer = (uint8 *) calloc(1024 * 1024 * 2, 1); - snesScreenA = (uint16 *) calloc( 520 * 520 * BYTES_PER_PIXEL, 1); - snesScreenB = (uint16 *) calloc( 520 * 520 * BYTES_PER_PIXEL, 1); - blitGLBuffer = (uint8 *) calloc(1024 * 1024 * BYTES_PER_PIXEL, 1); - - gfxScreen[0] = snesScreenA + (safebuffersize >> 2); - gfxScreen[1] = snesScreenB + (safebuffersize >> 2); + gfxScreen[0] = snesScreenA + (safemarginbytes >> 2); + gfxScreen[1] = snesScreenB + (safemarginbytes >> 2); + GFX.Pitch = 512 * 2; GFX.Screen = gfxScreen[0]; if (!snesScreenA || !snesScreenB || !blitGLBuffer) @@ -432,215 +431,43 @@ void DeinitGraphics (void) } } -static OSStatus BlitMPGLTask (void *parameter) -{ - OSStatus err = noErr; - int32 theCommand, param1, param2; - - printf("MP: Entered BlitGL thread.\n"); - - for (;;) - { - err = MPWaitOnQueue(taskQueue, (void **) &theCommand, (void **) ¶m1, (void **) ¶m2, kDurationForever); - if (err) - break; - - if (theCommand == kMPBlitFrame) - { - switch (mpDataBuffer->nx) - { - case -1: - (mpDataBuffer->blitFn) ((uint8 *) mpDataBuffer->gfxBuffer, mpDataBuffer->srcRowBytes, blitGLBuffer, 1024 * 2, mpDataBuffer->srcWidth, mpDataBuffer->srcHeight); - break; - - case -2: - if (mpDataBuffer->srcHeight > SNES_HEIGHT_EXTENDED) - (mpDataBuffer->blitFn) ((uint8 *) mpDataBuffer->gfxBuffer, mpDataBuffer->srcRowBytes, blitGLBuffer, 1024 * 2, mpDataBuffer->srcWidth, mpDataBuffer->srcHeight); - else - { - uint8 *tmpBuffer = blitGLBuffer + (1024 * 512 * BYTES_PER_PIXEL); - int aligned = ((ntsc_width + 2) >> 1) << 1; - (mpDataBuffer->blitFn) ((uint8 *) mpDataBuffer->gfxBuffer, mpDataBuffer->srcRowBytes, tmpBuffer, 1024 * 2, mpDataBuffer->srcWidth, mpDataBuffer->srcHeight); - S9xBlitPixHiResMixedTV16(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, mpDataBuffer->copyHeight); - mpDataBuffer->copyHeight *= 2; - } - - break; - - default: - int dstbytes = (OpenGL.rangeExt ? mpDataBuffer->copyWidth : ((mpDataBuffer->copyWidth > 512) ? 1024 : 512)) * 2; - (mpDataBuffer->blitFn) ((uint8 *) mpDataBuffer->gfxBuffer, mpDataBuffer->srcRowBytes, blitGLBuffer, dstbytes, mpDataBuffer->srcWidth, mpDataBuffer->srcHeight); - break; - } - - if (!ciFilterEnable) - S9xPutImageBlitGL2(mpDataBuffer->copyWidth, mpDataBuffer->copyHeight); - else - S9xPutImageBlitGL2CoreImage(mpDataBuffer->copyWidth, mpDataBuffer->copyHeight); - MPSignalSemaphore(readySemaphore); - } - else - if (theCommand == kMPBlitNone) - MPSignalSemaphore(readySemaphore); - else - if (theCommand == kMPBlitDone) - break; - else - { - err = userCanceledErr; - break; - } - } - - MPFree(mpDataBuffer); - MPDeleteSemaphore(readySemaphore); - MPDeleteQueue(taskQueue); - mpDataBuffer = NULL; - readySemaphore = NULL; - taskQueue = NULL; - - printf("MP: Exited BlitGL thread.\n"); - - return (err); -} - -static OSStatus PrepareMPBlitGL (void) -{ - OSStatus err; - - mpDataBuffer = (MPData *) MPAllocateAligned(sizeof(MPData), kMPAllocateDefaultAligned, kMPAllocateClearMask); - if (!mpDataBuffer) - return (memFullErr); - - err = MPCreateQueue(¬ificationQueue); - if (err == noErr) - { - err = MPCreateQueue(&taskQueue); - if (err == noErr) - { - err = MPCreateBinarySemaphore(&readySemaphore); - if (err == noErr) - { - MPSignalSemaphore(readySemaphore); - err = MPCreateTask(BlitMPGLTask, NULL, 0, notificationQueue, NULL, NULL, 0, &taskID); - } - } - } - - return (err); -} - void DrawPauseScreen (CGContextRef ctx, HIRect bounds) { CGImageRef image; - CGRect crt; - int top, bottom, left, right, width, height; + CGRect rct; + float sh, mh, rofs, ry; - width = IPPU.RenderedScreenWidth; - height = IPPU.RenderedScreenHeight; - - if ((width == 0) || (height == 0)) + if ((IPPU.RenderedScreenWidth == 0) || (IPPU.RenderedScreenHeight == 0)) return; - top = left = 0; + sh = (float) ((IPPU.RenderedScreenHeight > 256) ? IPPU.RenderedScreenHeight : IPPU.RenderedScreenHeight * 2); + mh = (float) (SNES_HEIGHT_EXTENDED * 2); - if (width > 256) + if (drawoverscan) { - right = width; - - if (height > 256) - { - bottom = height; - - if (!drawoverscan) - { - if (height < (SNES_HEIGHT_EXTENDED << 1)) - { - top = kMarginDouble; - bottom += kMarginDouble; - } - else - { - top = kMarginDoubleExt; - bottom += kMarginDoubleExt; - } - } - } - else - { - bottom = height << 1; - - if (!drawoverscan) - { - if (height < SNES_HEIGHT_EXTENDED) - { - top = kMarginDouble; - bottom += kMarginDouble; - } - else - { - top = kMarginDoubleExt; - bottom += kMarginDoubleExt; - } - } - } + rofs = (mh - sh) / mh; + ry = sh / mh; + } + else + if (windowExtend) + { + rofs = (mh - sh) / mh / 2.0f; + ry = sh / mh; } else { - right = width << 1; - bottom = height << 1; - - if (!drawoverscan) - { - if (height < SNES_HEIGHT_EXTENDED) - { - top = kMarginDouble; - bottom += kMarginDouble; - } - else - { - top = kMarginDoubleExt; - bottom += kMarginDoubleExt; - } - } + rofs = 0.0f; + ry = 1.0f; } image = CreateGameScreenCGImage(); if (image) { - float rx, ry; - int ofs; - - rx = bounds.size.width / 512.0f; - - if (!drawoverscan) - { - if (windowExtend) - { - ofs = top; - ry = bounds.size.height / (float) kMacWindowHeight; - } - else - { - ofs = 0; - ry = bounds.size.height / (float) ((height <= 256) ? (height << 1) : height); - } - } - else - { - ofs = kMacWindowHeight - ((height <= 256) ? (height << 1) : height); - ry = bounds.size.height / (float) kMacWindowHeight; - } - CGContextSetRGBFillColor(ctx, 0.0f, 0.0f, 0.0f, 1.0f); CGContextFillRect(ctx, bounds); - crt = CGRectMake(0, 0, right - left, bottom - top); - crt.size.width *= rx; - crt.size.height *= ry; - crt.origin.x = (float) (int) (rx * (float) left); - crt.origin.y = (float) (int) (ry * (float) ofs); - CGContextDrawImage(ctx, crt, image); + rct = CGRectMake(0.0f, bounds.size.height * rofs, bounds.size.width, bounds.size.height * ry); + CGContextDrawImage(ctx, rct, image); CGContextSetRGBFillColor(ctx, 0.0f, 0.0f, 0.0f, 0.5f); CGContextFillRect(ctx, bounds); @@ -672,25 +499,16 @@ void DrawFreezeDefrostScreen (uint8 *draw) else memcpy(blitGLBuffer, draw, w * h * 2); - if (!ciFilterEnable) - S9xPutImageBlitGL2(512, kMacWindowHeight); - else - S9xPutImageBlitGL2CoreImage(512, kMacWindowHeight); + S9xPutImageBlitGL2(512, kMacWindowHeight); } void ClearGFXScreen (void) { - uint16 *p, *q; - - p = gfxScreen[0]; - q = gfxScreen[1]; - - for (int x = 0; x < 512; x++) - for (int y = 0; y < 512; y++) - *p++ = *q++ = 0; + memset(gfxScreen[0], 0, 512 * 512 * 2); + memset(gfxScreen[1], 0, 512 * 512 * 2); + memset(blitGLBuffer, 0, 1024 * 1024 * 2); S9xBlitClearDelta(); - memset(blitGLBuffer, 0, 1024 * 1024 * BYTES_PER_PIXEL); imageWidth[0] = imageHeight[0] = 0; imageWidth[1] = imageHeight[1] = 0; @@ -721,31 +539,9 @@ void ClearGFXScreen (void) } } -static void S9xInitFullScreen (void) +#ifndef MAC_LEOPARD_TIGER_PANTHER_SUPPORT +static void SetBestDisplayMode (int width, int height) { - DeinitGameWindow(); - - size_t width, height; - - width = autoRes ? 640 : CGDisplayPixelsWide(gGameDisplayID); - height = autoRes ? 480 : CGDisplayPixelsHigh(gGameDisplayID); - -#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT - CFDictionaryRef mode; - boolean_t exactMatch; - size_t depth = gl32bit ? 32 : 16; - - oldDisplayMode = CGDisplayCurrentMode(gGameDisplayID); - - mode = CGDisplayBestModeForParameters(gGameDisplayID, depth, width, height, &exactMatch); - - CGDisplayCapture(gGameDisplayID); - CGDisplaySwitchToMode(gGameDisplayID, mode); -#else - oldDisplayModeRef = CGDisplayCopyDisplayMode(gGameDisplayID); - - CGDisplayCapture(gGameDisplayID); - if (autoRes || !gl32bit) { CGError err; @@ -771,7 +567,7 @@ static void S9xInitFullScreen (void) r = CFStringCompare(pix, pixenc, 0) == kCFCompareEqualTo; CFRelease(pix); - if (w == width && h == height && r) + if (w == (size_t) width && h == (size_t) height && r) break; } @@ -780,6 +576,31 @@ static void S9xInitFullScreen (void) CFRelease(array); } +} +#endif + +static void S9xInitFullScreen (void) +{ + DeinitGameWindow(); + + size_t width, height; + + width = autoRes ? 640 : CGDisplayPixelsWide(gGameDisplayID); + height = autoRes ? 480 : CGDisplayPixelsHigh(gGameDisplayID); + +#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT + CFDictionaryRef mode; + boolean_t exactMatch; + size_t depth = gl32bit ? 32 : 16; + + oldDisplayMode = CGDisplayCurrentMode(gGameDisplayID); + mode = CGDisplayBestModeForParameters(gGameDisplayID, depth, width, height, &exactMatch); + CGDisplayCapture(gGameDisplayID); + CGDisplaySwitchToMode(gGameDisplayID, mode); +#else + oldDisplayModeRef = CGDisplayCopyDisplayMode(gGameDisplayID); + CGDisplayCapture(gGameDisplayID); + SetBestDisplayMode(width, height); #endif CGDisplayErr cgErr; @@ -831,47 +652,12 @@ static void S9xInitWindowMode (void) size_t depth = gl32bit ? 32 : 16; oldDisplayMode = CGDisplayCurrentMode(gGameDisplayID); - mode = CGDisplayBestModeForParameters(gGameDisplayID, depth, width, height, &exactMatch); if (exactMatch) CGDisplaySwitchToMode(gGameDisplayID, mode); #else oldDisplayModeRef = CGDisplayCopyDisplayMode(gGameDisplayID); - - if (autoRes || !gl32bit) - { - CGError err; - CGDisplayModeRef mode; - CFArrayRef array; - CFStringRef pixenc, pix; - CFIndex n, i; - size_t w, h; - bool r; - - pixenc = gl32bit ? CFSTR(IO32BitDirectPixels) : CFSTR(IO16BitDirectPixels); - - array = CGDisplayCopyAllDisplayModes(gGameDisplayID, NULL); - n = CFArrayGetCount(array); - - for (i = 0; i < n; i++) - { - mode = (CGDisplayModeRef) CFArrayGetValueAtIndex(array, i); - - w = CGDisplayModeGetWidth(mode); - h = CGDisplayModeGetHeight(mode); - pix = CGDisplayModeCopyPixelEncoding(mode); - r = CFStringCompare(pix, pixenc, 0) == kCFCompareEqualTo; - CFRelease(pix); - - if (w == width && h == height && r) - break; - } - - if (i < n) - err = CGDisplaySetDisplayMode(gGameDisplayID, mode, NULL); - - CFRelease(array); - } + SetBestDisplayMode(width, height); #endif InitGameWindow(); @@ -1015,6 +801,93 @@ static void S9xDeinitBlitGL (void) } } +static void GLPrepareTexture (bool8 useRange, int texNo, int rangeOnW, int rangeOnH, int rangeOffW, int rangeOffH, int filter) +{ + bool8 rangeAvailable = OpenGL.rangeExt & useRange; + + OpenGL.texW[texNo] = rangeAvailable ? rangeOnW : rangeOffW; + OpenGL.texH[texNo] = rangeAvailable ? rangeOnH : rangeOffH; + + OpenGL.vertex[texNo][0] = 0; + OpenGL.vertex[texNo][1] = 0; + OpenGL.vertex[texNo][2] = rangeAvailable ? rangeOnW : 1; + OpenGL.vertex[texNo][3] = 0; + OpenGL.vertex[texNo][4] = rangeAvailable ? rangeOnW : 1; + OpenGL.vertex[texNo][5] = rangeAvailable ? rangeOnH : 1; + OpenGL.vertex[texNo][6] = 0; + OpenGL.vertex[texNo][7] = rangeAvailable ? rangeOnH : 1; + + glBindTexture(OpenGL.target, OpenGL.textures[texNo]); + + if (rangeAvailable) + { + glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[texNo] * OpenGL.texH[texNo] * 2, GFX.Screen); + glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, OpenGL.storage_hint); + } + + glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, OpenGL.agp_texturing); + glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, filter); + glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, filter); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[texNo], OpenGL.texH[texNo], 0, OpenGL.format, OpenGL.type, GFX.Screen); +} + +static void GLMakeScreenMesh (GLfloat *vertex3D, int meshx, int meshy) +{ + GLfloat *v; + float warp; + + v = vertex3D; + warp = macCurvatureWarp * 0.001f; + + for (int y = 0; y < meshy; y++) + { + for (int x = 0; x <= meshx; x++) + { + float u1, v1, v2; + + u1 = -1.0f + 2.0f / (float) meshx * (float) x; + v1 = -1.0f + 2.0f / (float) meshy * (float) y; + v2 = -1.0f + 2.0f / (float) meshy * (float) (y + 1); + + *v++ = u1; + *v++ = v2; + *v++ = -1.0f - (u1 * u1 + v2 * v2) * warp; + + *v++ = u1; + *v++ = v1; + *v++ = -1.0f - (u1 * u1 + v1 * v1) * warp; + } + } +} + +static void GLMakeTextureMesh (GLfloat *vertex2D, int meshx, int meshy, float lx, float ly) +{ + GLfloat *v; + + v = vertex2D; + + for (int y = meshy; y > 0; y--) + { + for (int x = 0; x <= meshx; x++) + { + float u1, v1, v2; + + u1 = lx / (float) meshx * (float) x; + v1 = ly / (float) meshy * (float) y; + v2 = ly / (float) meshy * (float) (y - 1); + + *v++ = u1; + *v++ = v2; + + *v++ = u1; + *v++ = v1; + } + } +} + static void S9xInitOpenGLContext (void) { OpenGL.internal_format = GL_RGB5_A1; @@ -1023,19 +896,13 @@ static void S9xInitOpenGLContext (void) OpenGL.rangeExt = gluCheckExtension((const GLubyte *) "GL_APPLE_texture_range", glGetString(GL_EXTENSIONS)); OpenGL.target = OpenGL.rangeExt ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D; - GLint storage_hint = GL_STORAGE_SHARED_APPLE; - GLint storage_apple = 1; - GLfloat agp_texturing = 0.0f; - - storage_apple = extraOptions.glUseClientStrageApple ? 1 : 0; - - agp_texturing = extraOptions.glUseTexturePriority ? 0.0f : 1.0f; - + OpenGL.storage_apple = extraOptions.glUseClientStrageApple ? 1 : 0; + OpenGL.agp_texturing = extraOptions.glUseTexturePriority ? 0.0f : 1.0f; switch (extraOptions.glStorageHint) { - case 1: storage_hint = GL_STORAGE_PRIVATE_APPLE; break; - case 2: storage_hint = GL_STORAGE_CACHED_APPLE; break; - case 3: storage_hint = GL_STORAGE_SHARED_APPLE; break; + case 1: OpenGL.storage_hint = GL_STORAGE_PRIVATE_APPLE; break; + case 2: OpenGL.storage_hint = GL_STORAGE_CACHED_APPLE; break; + case 3: OpenGL.storage_hint = GL_STORAGE_SHARED_APPLE; break; } if (screencurvature || videoMode >= VIDEOMODE_NTSC_C || extraOptions.glForceNoTextureRectangle) @@ -1061,264 +928,19 @@ static void S9xInitOpenGLContext (void) glGenTextures(kGLNumTextures, OpenGL.textures); - glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, storage_apple); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, OpenGL.storage_apple); glPixelStorei(GL_UNPACK_ALIGNMENT, 8); - // 256 * 224/239 - - OpenGL.texW[kGL256256] = 256; - OpenGL.texH[kGL256256] = OpenGL.rangeExt ? SNES_HEIGHT_EXTENDED : 256; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGL256256][0] = 0; OpenGL.vertex[kGL256256][1] = 0; - OpenGL.vertex[kGL256256][2] = OpenGL.texW[kGL256256]; OpenGL.vertex[kGL256256][3] = 0; - OpenGL.vertex[kGL256256][4] = OpenGL.texW[kGL256256]; OpenGL.vertex[kGL256256][5] = OpenGL.texH[kGL256256]; - OpenGL.vertex[kGL256256][6] = 0; OpenGL.vertex[kGL256256][7] = OpenGL.texH[kGL256256]; - } - else - { - OpenGL.vertex[kGL256256][0] = 0.0f; OpenGL.vertex[kGL256256][1] = 0.0f; - OpenGL.vertex[kGL256256][2] = 1.0f; OpenGL.vertex[kGL256256][3] = 0.0f; - OpenGL.vertex[kGL256256][4] = 1.0f; OpenGL.vertex[kGL256256][5] = 1.0f; - OpenGL.vertex[kGL256256][6] = 0.0f; OpenGL.vertex[kGL256256][7] = 1.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGL256256]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGL256256] * OpenGL.texH[kGL256256] * BYTES_PER_PIXEL, GFX.Screen); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGL256256], OpenGL.texH[kGL256256], 0, OpenGL.format, OpenGL.type, GFX.Screen); - - // 512 * 224/239 - - OpenGL.texW[kGL512256] = 512; - OpenGL.texH[kGL512256] = OpenGL.rangeExt ? SNES_HEIGHT_EXTENDED : 256; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGL512256][0] = 0; OpenGL.vertex[kGL512256][1] = 0; - OpenGL.vertex[kGL512256][2] = OpenGL.texW[kGL512256]; OpenGL.vertex[kGL512256][3] = 0; - OpenGL.vertex[kGL512256][4] = OpenGL.texW[kGL512256]; OpenGL.vertex[kGL512256][5] = OpenGL.texH[kGL512256]; - OpenGL.vertex[kGL512256][6] = 0; OpenGL.vertex[kGL512256][7] = OpenGL.texH[kGL512256]; - } - else - { - OpenGL.vertex[kGL512256][0] = 0.0f; OpenGL.vertex[kGL512256][1] = 0.0f; - OpenGL.vertex[kGL512256][2] = 1.0f; OpenGL.vertex[kGL512256][3] = 0.0f; - OpenGL.vertex[kGL512256][4] = 1.0f; OpenGL.vertex[kGL512256][5] = 1.0f; - OpenGL.vertex[kGL512256][6] = 0.0f; OpenGL.vertex[kGL512256][7] = 1.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGL512256]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGL512256] * OpenGL.texH[kGL512256] * BYTES_PER_PIXEL, GFX.Screen); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGL512256], OpenGL.texH[kGL512256], 0, OpenGL.format, OpenGL.type, GFX.Screen); - - // 512 * 448/478 - - OpenGL.texW[kGL512512] = 512; - OpenGL.texH[kGL512512] = OpenGL.rangeExt ? (SNES_HEIGHT_EXTENDED << 1) : 512; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGL512512][0] = 0; OpenGL.vertex[kGL512512][1] = 0; - OpenGL.vertex[kGL512512][2] = OpenGL.texW[kGL512512]; OpenGL.vertex[kGL512512][3] = 0; - OpenGL.vertex[kGL512512][4] = OpenGL.texW[kGL512512]; OpenGL.vertex[kGL512512][5] = OpenGL.texH[kGL512512]; - OpenGL.vertex[kGL512512][6] = 0; OpenGL.vertex[kGL512512][7] = OpenGL.texH[kGL512512]; - } - else - { - OpenGL.vertex[kGL512512][0] = 0.0f; OpenGL.vertex[kGL512512][1] = 0.0f; - OpenGL.vertex[kGL512512][2] = 1.0f; OpenGL.vertex[kGL512512][3] = 0.0f; - OpenGL.vertex[kGL512512][4] = 1.0f; OpenGL.vertex[kGL512512][5] = 1.0f; - OpenGL.vertex[kGL512512][6] = 0.0f; OpenGL.vertex[kGL512512][7] = 1.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGL512512]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGL512512] * OpenGL.texH[kGL512512] * BYTES_PER_PIXEL, GFX.Screen); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, videoMode == VIDEOMODE_SMOOTH ? GL_LINEAR : GL_NEAREST); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGL512512], OpenGL.texH[kGL512512], 0, OpenGL.format, OpenGL.type, GFX.Screen); - - // Blit 2x - - OpenGL.texW[kGLBlit2x] = 512; - OpenGL.texH[kGLBlit2x] = OpenGL.rangeExt ? (SNES_HEIGHT_EXTENDED * 2) : 512; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGLBlit2x][0] = 0; OpenGL.vertex[kGLBlit2x][1] = 0; - OpenGL.vertex[kGLBlit2x][2] = OpenGL.texW[kGLBlit2x]; OpenGL.vertex[kGLBlit2x][3] = 0; - OpenGL.vertex[kGLBlit2x][4] = OpenGL.texW[kGLBlit2x]; OpenGL.vertex[kGLBlit2x][5] = OpenGL.texH[kGLBlit2x]; - OpenGL.vertex[kGLBlit2x][6] = 0; OpenGL.vertex[kGLBlit2x][7] = OpenGL.texH[kGLBlit2x]; - } - else - { - OpenGL.vertex[kGLBlit2x][0] = 0.0f; OpenGL.vertex[kGLBlit2x][1] = 0.0f; - OpenGL.vertex[kGLBlit2x][2] = 1.0f; OpenGL.vertex[kGLBlit2x][3] = 0.0f; - OpenGL.vertex[kGLBlit2x][4] = 1.0f; OpenGL.vertex[kGLBlit2x][5] = 1.0f; - OpenGL.vertex[kGLBlit2x][6] = 0.0f; OpenGL.vertex[kGLBlit2x][7] = 1.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGLBlit2x]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGLBlit2x] * OpenGL.texH[kGLBlit2x] * BYTES_PER_PIXEL, blitGLBuffer); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGLBlit2x], OpenGL.texH[kGLBlit2x], 0, OpenGL.format, OpenGL.type, blitGLBuffer); - - // Blit 3x - - OpenGL.texW[kGLBlit3x] = OpenGL.rangeExt ? (SNES_WIDTH * 3) : 1024; - OpenGL.texH[kGLBlit3x] = OpenGL.rangeExt ? (SNES_HEIGHT_EXTENDED * 3) : 1024; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGLBlit3x][0] = 0; OpenGL.vertex[kGLBlit3x][1] = 0; - OpenGL.vertex[kGLBlit3x][2] = OpenGL.texW[kGLBlit3x]; OpenGL.vertex[kGLBlit3x][3] = 0; - OpenGL.vertex[kGLBlit3x][4] = OpenGL.texW[kGLBlit3x]; OpenGL.vertex[kGLBlit3x][5] = OpenGL.texH[kGLBlit3x]; - OpenGL.vertex[kGLBlit3x][6] = 0; OpenGL.vertex[kGLBlit3x][7] = OpenGL.texH[kGLBlit3x]; - } - else - { - OpenGL.vertex[kGLBlit3x][0] = 0.0f; OpenGL.vertex[kGLBlit3x][1] = 0.0f; - OpenGL.vertex[kGLBlit3x][2] = SNES_WIDTH * 3 / 1024.0f; OpenGL.vertex[kGLBlit3x][3] = 0.0f; - OpenGL.vertex[kGLBlit3x][4] = SNES_WIDTH * 3 / 1024.0f; OpenGL.vertex[kGLBlit3x][5] = SNES_HEIGHT_EXTENDED * 3 / 1024.0f; - OpenGL.vertex[kGLBlit3x][6] = 0.0f; OpenGL.vertex[kGLBlit3x][7] = SNES_HEIGHT_EXTENDED * 3 / 1024.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGLBlit3x]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGLBlit3x] * OpenGL.texH[kGLBlit3x] * BYTES_PER_PIXEL, blitGLBuffer); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGLBlit3x], OpenGL.texH[kGLBlit3x], 0, OpenGL.format, OpenGL.type, blitGLBuffer); - - // Blit 4x - - OpenGL.texW[kGLBlit4x] = 1024; - OpenGL.texH[kGLBlit4x] = OpenGL.rangeExt ? (SNES_HEIGHT_EXTENDED * 4) : 1024; - - if (OpenGL.rangeExt) - { - OpenGL.vertex[kGLBlit4x][0] = 0; OpenGL.vertex[kGLBlit4x][1] = 0; - OpenGL.vertex[kGLBlit4x][2] = OpenGL.texW[kGLBlit4x]; OpenGL.vertex[kGLBlit4x][3] = 0; - OpenGL.vertex[kGLBlit4x][4] = OpenGL.texW[kGLBlit4x]; OpenGL.vertex[kGLBlit4x][5] = OpenGL.texH[kGLBlit4x]; - OpenGL.vertex[kGLBlit4x][6] = 0; OpenGL.vertex[kGLBlit4x][7] = OpenGL.texH[kGLBlit4x]; - } - else - { - OpenGL.vertex[kGLBlit4x][0] = 0.0f; OpenGL.vertex[kGLBlit4x][1] = 0.0f; - OpenGL.vertex[kGLBlit4x][2] = 1.0f; OpenGL.vertex[kGLBlit4x][3] = 0.0f; - OpenGL.vertex[kGLBlit4x][4] = 1.0f; OpenGL.vertex[kGLBlit4x][5] = 1.0f; - OpenGL.vertex[kGLBlit4x][6] = 0.0f; OpenGL.vertex[kGLBlit4x][7] = 1.0f; - } - - glBindTexture(OpenGL.target, OpenGL.textures[kGLBlit4x]); - - if (OpenGL.rangeExt) - { - glTextureRangeAPPLE(OpenGL.target, OpenGL.texW[kGLBlit4x] * OpenGL.texH[kGLBlit4x] * BYTES_PER_PIXEL, blitGLBuffer); - glTexParameteri(OpenGL.target, GL_TEXTURE_STORAGE_HINT_APPLE, storage_hint); - } - - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGLBlit4x], OpenGL.texH[kGLBlit4x], 0, OpenGL.format, OpenGL.type, blitGLBuffer); - - // Blit NTSC 602 * 224/239 - - OpenGL.texW[kGLNTS256] = 1024; - OpenGL.texH[kGLNTS256] = 256; - - OpenGL.vertex[kGLNTS256][0] = 0.0f; OpenGL.vertex[kGLNTS256][1] = 0.0f; - OpenGL.vertex[kGLNTS256][2] = 1.0f; OpenGL.vertex[kGLNTS256][3] = 0.0f; - OpenGL.vertex[kGLNTS256][4] = 1.0f; OpenGL.vertex[kGLNTS256][5] = 1.0f; - OpenGL.vertex[kGLNTS256][6] = 0.0f; OpenGL.vertex[kGLNTS256][7] = 1.0f; - - glBindTexture(OpenGL.target, OpenGL.textures[kGLNTS256]); - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGLNTS256], OpenGL.texH[kGLNTS256], 0, OpenGL.format, OpenGL.type, blitGLBuffer); - - // Blit NTSC 602 * 448/478 - - OpenGL.texW[kGLNTS512] = 1024; - OpenGL.texH[kGLNTS512] = 512; - - OpenGL.vertex[kGLNTS512][0] = 0.0f; OpenGL.vertex[kGLNTS512][1] = 0.0f; - OpenGL.vertex[kGLNTS512][2] = 1.0f; OpenGL.vertex[kGLNTS512][3] = 0.0f; - OpenGL.vertex[kGLNTS512][4] = 1.0f; OpenGL.vertex[kGLNTS512][5] = 1.0f; - OpenGL.vertex[kGLNTS512][6] = 0.0f; OpenGL.vertex[kGLNTS512][7] = 1.0f; - - glBindTexture(OpenGL.target, OpenGL.textures[kGLNTS512]); - glTexParameterf(OpenGL.target, GL_TEXTURE_PRIORITY, agp_texturing); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(OpenGL.target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(OpenGL.target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - glTexImage2D(OpenGL.target, 0, OpenGL.internal_format, OpenGL.texW[kGLNTS512], OpenGL.texH[kGLNTS512], 0, OpenGL.format, OpenGL.type, blitGLBuffer); - - // + int filter = (videoMode == VIDEOMODE_SMOOTH) ? GL_LINEAR : GL_NEAREST; + GLPrepareTexture(true, kGL256256, SNES_WIDTH, SNES_HEIGHT_EXTENDED, 256, 256, filter); + GLPrepareTexture(true, kGL256512, SNES_WIDTH, SNES_HEIGHT_EXTENDED * 2, 256, 512, filter); + GLPrepareTexture(true, kGL512256, SNES_WIDTH * 2, SNES_HEIGHT_EXTENDED, 512, 256, filter); + GLPrepareTexture(true, kGL512512, SNES_WIDTH * 2, SNES_HEIGHT_EXTENDED * 2, 512, 512, filter); + GLPrepareTexture(true, kGLBlit2x, SNES_WIDTH * 2, SNES_HEIGHT_EXTENDED * 2, 512, 512, GL_LINEAR); + GLPrepareTexture(true, kGLBlit3x, SNES_WIDTH * 3, SNES_HEIGHT_EXTENDED * 3, 1024, 1024, GL_LINEAR); + GLPrepareTexture(true, kGLBlit4x, SNES_WIDTH * 4, SNES_HEIGHT_EXTENDED * 4, 1024, 1024, GL_LINEAR); + GLPrepareTexture(false, kGLNTS256, 1024, 256, 1024, 256, GL_LINEAR); + GLPrepareTexture(false, kGLNTS512, 1024, 512, 1024, 512, GL_LINEAR); if (!screencurvature) { @@ -1343,35 +965,32 @@ static void S9xInitOpenGLContext (void) glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); - scTexArray[kSC2xNormal] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC2xNormal], kSCMeshX, kSCMeshY, 1.0f, 224.0f / 256.0f); + int mesh = (kSCMeshX + 1) * 2 * kSCMeshY * 2; + scTexArray[kSC2xNormal] = new GLfloat [mesh]; + scTexArray[kSC2xExtend] = new GLfloat [mesh]; + scTexArray[kSC2xNHiRes] = new GLfloat [mesh]; + scTexArray[kSC2xEHiRes] = new GLfloat [mesh]; + scTexArray[kSC2xNInter] = new GLfloat [mesh]; + scTexArray[kSC2xEInter] = new GLfloat [mesh]; + scTexArray[kSC3xNormal] = new GLfloat [mesh]; + scTexArray[kSC3xExtend] = new GLfloat [mesh]; + scTexArray[kSC3xNHiRes] = new GLfloat [mesh]; + scTexArray[kSC3xEHiRes] = new GLfloat [mesh]; + scTexArray[kSCNTNormal] = new GLfloat [mesh]; + scTexArray[kSCNTExtend] = new GLfloat [mesh]; - scTexArray[kSC2xExtend] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC2xExtend], kSCMeshX, kSCMeshY, 1.0f, 239.0f / 256.0f); - - scTexArray[kSC2xNHiRes] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC2xNHiRes], kSCMeshX, kSCMeshY, 1.0f, 224.0f / 512.0f); - - scTexArray[kSC2xEHiRes] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC2xEHiRes], kSCMeshX, kSCMeshY, 1.0f, 239.0f / 512.0f); - - scTexArray[kSC3xNormal] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC3xNormal], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 672.0f / 1024.0f); - - scTexArray[kSC3xExtend] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC3xExtend], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 717.0f / 1024.0f); - - scTexArray[kSC3xNHiRes] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC3xNHiRes], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 672.0f / 2048.0f); - - scTexArray[kSC3xEHiRes] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSC3xEHiRes], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 717.0f / 2048.0f); - - scTexArray[kSCNTNormal] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSCNTNormal], kSCMeshX, kSCMeshY, (float) ntsc_width / 1024.0f, 224.0f / 256.0f); - - scTexArray[kSCNTExtend] = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 2]; - GLMakeTextureMesh(scTexArray[kSCNTExtend], kSCMeshX, kSCMeshY, (float) ntsc_width / 1024.0f, 239.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSC2xNormal], kSCMeshX, kSCMeshY, 1.0f, 224.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSC2xExtend], kSCMeshX, kSCMeshY, 1.0f, 239.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSC2xNHiRes], kSCMeshX, kSCMeshY, 1.0f, 224.0f / 512.0f); + GLMakeTextureMesh(scTexArray[kSC2xEHiRes], kSCMeshX, kSCMeshY, 1.0f, 239.0f / 512.0f); + GLMakeTextureMesh(scTexArray[kSC2xNInter], kSCMeshX, kSCMeshY, 256.0f / 512.0f, 224.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSC2xEInter], kSCMeshX, kSCMeshY, 256.0f / 512.0f, 239.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSC3xNormal], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 672.0f / 1024.0f); + GLMakeTextureMesh(scTexArray[kSC3xExtend], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 717.0f / 1024.0f); + GLMakeTextureMesh(scTexArray[kSC3xNHiRes], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 672.0f / 2048.0f); + GLMakeTextureMesh(scTexArray[kSC3xEHiRes], kSCMeshX, kSCMeshY, 768.0f / 1024.0f, 717.0f / 2048.0f); + GLMakeTextureMesh(scTexArray[kSCNTNormal], kSCMeshX, kSCMeshY, (float) ntsc_width / 1024.0f, 224.0f / 256.0f); + GLMakeTextureMesh(scTexArray[kSCNTExtend], kSCMeshX, kSCMeshY, (float) ntsc_width / 1024.0f, 239.0f / 256.0f); scScnArray = new GLfloat [(kSCMeshX + 1) * 2 * kSCMeshY * 3]; GLMakeScreenMesh(scScnArray, kSCMeshX, kSCMeshY); @@ -1410,6 +1029,8 @@ static void S9xDeinitOpenGLContext (void) delete [] scTexArray[kSC2xExtend]; delete [] scTexArray[kSC2xNHiRes]; delete [] scTexArray[kSC2xEHiRes]; + delete [] scTexArray[kSC2xNInter]; + delete [] scTexArray[kSC2xEInter]; delete [] scTexArray[kSC3xNormal]; delete [] scTexArray[kSC3xExtend]; delete [] scTexArray[kSC3xNHiRes]; @@ -1422,6 +1043,8 @@ static void S9xDeinitOpenGLContext (void) scTexArray[kSC2xExtend] = NULL; scTexArray[kSC2xNHiRes] = NULL; scTexArray[kSC2xEHiRes] = NULL; + scTexArray[kSC2xNInter] = NULL; + scTexArray[kSC2xEInter] = NULL; scTexArray[kSC3xNormal] = NULL; scTexArray[kSC3xExtend] = NULL; scTexArray[kSC3xNHiRes] = NULL; @@ -1606,6 +1229,106 @@ bool8 S9xContinueUpdate (int width, int height) return (true); } +static inline void RenderBlitScreen (Blitter Fn, int x, int sW, int sH, int cW, int cH, uint16 *buf) +{ + switch (x) + { + case -1: + (Fn) ((uint8 *) buf, sW * 2, blitGLBuffer, 1024 * 2, sW, sH); + break; + + case -2: + if (sH > SNES_HEIGHT_EXTENDED) + (Fn) ((uint8 *) buf, sW * 2, blitGLBuffer, 1024 * 2, sW, sH); + else + { + uint8 *tmpBuffer = blitGLBuffer + (1024 * 512 * 2); + int aligned = ((ntsc_width + 2) >> 1) << 1; + (Fn) ((uint8 *) buf, sW * 2, tmpBuffer, 1024 * 2, sW, sH); + S9xBlitPixHiResMixedTV16(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, cH); + cH *= 2; + } + + break; + + default: + int dstbytes = (OpenGL.rangeExt ? cW : ((cW > 512) ? 1024 : ((cW > 256) ? 512 : 256))) * 2; + (Fn) ((uint8 *) buf, sW * 2, blitGLBuffer, dstbytes, sW, sH); + break; + } + + S9xPutImageBlitGL2(cW, cH); +} + +static OSStatus PrepareMPBlitGL (void) +{ + OSStatus err; + + mpBlit = (MPData *) MPAllocateAligned(sizeof(MPData), kMPAllocateDefaultAligned, kMPAllocateClearMask); + if (!mpBlit) + return (memFullErr); + + err = MPCreateQueue(¬ificationQueue); + if (err == noErr) + { + err = MPCreateQueue(&taskQueue); + if (err == noErr) + { + err = MPCreateBinarySemaphore(&readySemaphore); + if (err == noErr) + { + MPSignalSemaphore(readySemaphore); + err = MPCreateTask(BlitMPGLTask, NULL, 0, notificationQueue, NULL, NULL, 0, &taskID); + } + } + } + + return (err); +} + +static OSStatus BlitMPGLTask (void *parameter) +{ + OSStatus err = noErr; + int32 theCommand, param1, param2; + + printf("MP: Entered BlitGL thread.\n"); + + for (;;) + { + err = MPWaitOnQueue(taskQueue, (void **) &theCommand, (void **) ¶m1, (void **) ¶m2, kDurationForever); + if (err) + break; + + if (theCommand == kMPBlitFrame) + { + RenderBlitScreen(mpBlit->blitFn, mpBlit->nx, mpBlit->srcWidth, mpBlit->srcHeight, mpBlit->copyWidth, mpBlit->copyHeight, mpBlit->gfxBuffer); + MPSignalSemaphore(readySemaphore); + } + else + if (theCommand == kMPBlitNone) + MPSignalSemaphore(readySemaphore); + else + if (theCommand == kMPBlitDone) + break; + else + { + err = userCanceledErr; + break; + } + } + + MPFree(mpBlit); + MPDeleteSemaphore(readySemaphore); + MPDeleteQueue(taskQueue); + mpBlit = NULL; + readySemaphore = NULL; + taskQueue = NULL; + + printf("MP: Exited BlitGL thread.\n"); + + return (err); +} + void S9xPutImage (int width, int height) { static float fps = 0.0f; @@ -1672,44 +1395,38 @@ void S9xPutImage (int width, int height) } } - if (!drawoverscan) + switch (drawingMethod) { - switch (drawingMethod) - { - case kDrawingOpenGL: - if (!ciFilterEnable) - S9xPutImageOpenGL(width, height); - else - S9xPutImageCoreImage(width, height); - break; + case kDrawingOpenGL: + S9xPutImageOpenGL(width, height); + break; - case kDrawingBlitGL: - S9xPutImageBlitGL(width, height); - } - } - else - { - switch (drawingMethod) - { - case kDrawingOpenGL: - if (!ciFilterEnable) - S9xPutImageOverscanOpenGL(width, height); - else - S9xPutImageOverscanCoreImage(width, height); - break; - - case kDrawingBlitGL: - S9xPutImageOverscanBlitGL(width, height); - } + case kDrawingBlitGL: + S9xPutImageBlitGL(width, height); + break; } } static void S9xPutImageOpenGL (int width, int height) { - if ((imageWidth[0] != width) || (imageHeight[0] != height) || (windowResizeCount > 0)) + int orig_height = height; + + if ((imageWidth[0] != width) || (imageHeight[0] != height)) + windowResizeCount += 2; + + if (windowResizeCount > 0) { - if ((imageWidth[0] != width) || (imageHeight[0] != height)) - windowResizeCount += 2; + if (drawoverscan && (height % SNES_HEIGHT == 0)) + { + int pitch = width << 1; + int extbtm = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; + uint32 *extarea = (uint32 *) ((uint8 *) GFX.Screen + height * pitch); + + for (int i = 0; i < (((extbtm - height) * pitch) >> 2); i++) + extarea[i] = 0; + + height = extbtm; + } int vh = (height > 256) ? height : (height << 1); @@ -1747,60 +1464,82 @@ static void S9xPutImageOpenGL (int width, int height) glViewport(0, ((kMacWindowHeight - vh) >> 1) * wh / kMacWindowHeight, ww, vh * wh / kMacWindowHeight); } - windowResizeCount--; - - textureNum = (width <= 256) ? kGL256256 : ((height <= 256) ? kGL512256 : kGL512512); - OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = OpenGL.rangeExt ? height : (vh / 512.0f); - glPixelStorei(GL_UNPACK_ROW_LENGTH, width); - glBindTexture(OpenGL.target, OpenGL.textures[textureNum]); + + if (!ciFilterEnable) + { + textureNum = (width <= 256) ? ((height <= 256) ? kGL256256 : kGL256512) : ((height <= 256) ? kGL512256 : kGL512512); + OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = OpenGL.rangeExt ? height : (vh / 512.0f); + glBindTexture(OpenGL.target, OpenGL.textures[textureNum]); + } + else + { + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, width, orig_height - height, orig_height, -1, 1); + + if (cgGameImage) + CGImageRelease(cgGameImage); + cgGameImage = CreateGameScreenCGImage(); + } imageWidth[0] = width; imageHeight[0] = height; - } - glTexSubImage2D(OpenGL.target, 0, 0, 0, OpenGL.texW[textureNum], OpenGL.texH[textureNum], OpenGL.format, OpenGL.type, GFX.Screen); - - if (!screencurvature) - { - glBegin(GL_QUADS); - - glTexCoord2fv(&OpenGL.vertex[textureNum][6]); - glVertex2f(-1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][4]); - glVertex2f( 1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][2]); - glVertex2f( 1.0f, 1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][0]); - glVertex2f(-1.0f, 1.0f); - - glEnd(); + windowResizeCount--; } else { - GLfloat *t, *s; - int tex; - - if ((height == SNES_HEIGHT) || (height == (SNES_HEIGHT << 1))) - tex = kSC2xNormal; - else - tex = kSC2xExtend; - - t = scTexArray[tex]; - s = scScnArray; - - for (int i = 0; i < kSCMeshY; i++) - { - glTexCoordPointer(2, GL_FLOAT, 0, t); - glVertexPointer(3, GL_FLOAT, 0, s); - glDrawArrays(GL_TRIANGLE_STRIP, 0, (kSCMeshX + 1) * 2); - - t += (kSCMeshX + 1) * 2 * 2; - s += (kSCMeshX + 1) * 2 * 3; - } + if (drawoverscan) + height = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; } - glFinishObjectAPPLE(GL_TEXTURE, OpenGL.textures[textureNum]); + if (!ciFilterEnable) + { + glTexSubImage2D(OpenGL.target, 0, 0, 0, OpenGL.texW[textureNum], OpenGL.texH[textureNum], OpenGL.format, OpenGL.type, GFX.Screen); + + if (!screencurvature) + { + glBegin(GL_QUADS); + + glTexCoord2fv(&OpenGL.vertex[textureNum][6]); + glVertex2f(-1.0f, -1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][4]); + glVertex2f( 1.0f, -1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][2]); + glVertex2f( 1.0f, 1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][0]); + glVertex2f(-1.0f, 1.0f); + + glEnd(); + } + else + { + GLfloat *t, *s; + + t = scTexArray[(height % SNES_HEIGHT) ? kSC2xExtend : kSC2xNormal]; + s = scScnArray; + + for (int i = 0; i < kSCMeshY; i++) + { + glTexCoordPointer(2, GL_FLOAT, 0, t); + glVertexPointer(3, GL_FLOAT, 0, s); + glDrawArrays(GL_TRIANGLE_STRIP, 0, (kSCMeshX + 1) * 2); + + t += (kSCMeshX + 1) * 2 * 2; + s += (kSCMeshX + 1) * 2 * 3; + } + } + + glFinishObjectAPPLE(GL_TEXTURE, OpenGL.textures[textureNum]); + } + else + { + CGRect src; + + src = CGRectMake(0, 0, width, orig_height); + DrawWithCoreImageFilter(src, cgGameImage); + } if (fullscreen) CGLFlushDrawable(glContext); @@ -1813,36 +1552,68 @@ static void S9xPutImageBlitGL (int width, int height) Blitter blitFn; int copyWidth, copyHeight; - if (videoMode == VIDEOMODE_TV) - if ((width <= 256) && ((imageWidth[whichBuf] != width) || (imageHeight[whichBuf] != height))) + if ((imageWidth[whichBuf] != width) || (imageHeight[whichBuf] != height)) + { + if ((videoMode == VIDEOMODE_TV) && (width <= 256)) S9xBlitClearDelta(); + if (drawoverscan && (height % SNES_HEIGHT == 0)) + { + memset(blitGLBuffer, 0, 1024 * 1024 * 2); + + int pitch = width << 1; + int extbtm = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; + uint32 *extarea = (uint32 *) ((uint8 *) GFX.Screen + height * pitch); + + for (int i = 0; i < (((extbtm - height) * pitch) >> 2); i++) + extarea[i] = 0; + + height = extbtm; + } + } + else + { + if (drawoverscan) + height = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; + } + switch (nx) { default: case 2: - if (width <= 256) + if (height <= 256) { - copyWidth = width * 2; - copyHeight = height * 2; - - switch (videoMode) + if (width <= 256) { - default: - case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; - case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; - case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; - case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; - case VIDEOMODE_EPX: blitFn = S9xBlitPixEPX16; break; - case VIDEOMODE_HQ2X: blitFn = S9xBlitPixHQ2x16; break; + copyWidth = width * 2; + copyHeight = height * 2; + + switch (videoMode) + { + default: + case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; + case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; + case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; + case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; + case VIDEOMODE_EPX: blitFn = S9xBlitPixEPX16; break; + case VIDEOMODE_HQ2X: blitFn = S9xBlitPixHQ2x16; break; + } + } + else + { + if (videoMode == VIDEOMODE_TV) + { + copyWidth = width; + copyHeight = height * 2; + blitFn = S9xBlitPixHiResTV16; + } + else + { + copyWidth = width; + copyHeight = height; + blitFn = S9xBlitPixSmall16; + } } - } - else - if ((videoMode == VIDEOMODE_TV) && (height <= 256)) - { - copyWidth = width; - copyHeight = height * 2; - blitFn = S9xBlitPixHiResTV16; } else { @@ -1854,7 +1625,7 @@ static void S9xPutImageBlitGL (int width, int height) break; case 3: - if (width <= 256) + if (width <= 256 && height <= 256) { copyWidth = width * 3; copyHeight = height * 3; @@ -1870,18 +1641,25 @@ static void S9xPutImageBlitGL (int width, int height) break; case 4: - if (width <= 256) + if (width <= 256 && height <= 256) { copyWidth = width * 4; copyHeight = height * 4; blitFn = S9xBlitPixHQ4x16; } else + if (width > 256 && height > 256) { copyWidth = width * 2; copyHeight = height * 2; blitFn = S9xBlitPixHQ2x16; } + else + { + copyWidth = width; + copyHeight = height; + blitFn = S9xBlitPixSmall16; + } break; @@ -1905,14 +1683,13 @@ static void S9xPutImageBlitGL (int width, int height) { MPWaitOnSemaphore(readySemaphore, kDurationForever); - mpDataBuffer->nx = nx; - mpDataBuffer->blitFn = blitFn; - mpDataBuffer->srcWidth = width; - mpDataBuffer->srcHeight = height; - mpDataBuffer->srcRowBytes = width * 2; - mpDataBuffer->copyWidth = copyWidth; - mpDataBuffer->copyHeight = copyHeight; - mpDataBuffer->gfxBuffer = GFX.Screen; + mpBlit->nx = nx; + mpBlit->blitFn = blitFn; + mpBlit->srcWidth = width; + mpBlit->srcHeight = height; + mpBlit->copyWidth = copyWidth; + mpBlit->copyHeight = copyHeight; + mpBlit->gfxBuffer = GFX.Screen; MPNotifyQueue(taskQueue, (void *) kMPBlitFrame, 0, 0); @@ -1920,462 +1697,16 @@ static void S9xPutImageBlitGL (int width, int height) GFX.Screen = gfxScreen[whichBuf]; } else - { - switch (nx) - { - case -1: - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, 1024 * 2, width, height); - break; - - case -2: - if (height > SNES_HEIGHT_EXTENDED) - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, 1024 * 2, width, height); - else - { - uint8 *tmpBuffer = blitGLBuffer + (1024 * 512 * BYTES_PER_PIXEL); - int aligned = ((ntsc_width + 2) >> 1) << 1; - blitFn((uint8 *) GFX.Screen, width * 2, tmpBuffer, 1024 * 2, width, height); - S9xBlitPixHiResMixedTV16(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, copyHeight); - copyHeight *= 2; - } - - break; - - default: - int dstbytes = (OpenGL.rangeExt ? copyWidth : ((copyWidth > 512) ? 1024 : 512)) * 2; - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, dstbytes, width, height); - break; - } - - if (!ciFilterEnable) - S9xPutImageBlitGL2(copyWidth, copyHeight); - else - S9xPutImageBlitGL2CoreImage(copyWidth, copyHeight); - } -} - -static void S9xPutImageCoreImage (int width, int height) -{ - if ((imageWidth[0] != width) || (imageHeight[0] != height) || (windowResizeCount > 0)) - { - if ((imageWidth[0] != width) || (imageHeight[0] != height)) - windowResizeCount += 2; - - int vh = (height > 256) ? height : (height << 1); - - if (fullscreen) - { - CGLSetCurrentContext(glContext); - - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (glstretch) - { - float fpw = (float) glScreenH / vh * 512.0f; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - glViewport((glScreenW - 512) >> 1, (glScreenH - vh) >> 1, 512, vh); - } - else - { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; - - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (windowExtend) - glViewport(0, ((kMacWindowHeight - vh) >> 1) * wh / kMacWindowHeight, ww, vh * wh / kMacWindowHeight); - } - - windowResizeCount--; - - glPixelStorei(GL_UNPACK_ROW_LENGTH, width); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, width, 0, height, -1, 1); - - if (cgGameImage) - CGImageRelease(cgGameImage); - cgGameImage = CreateGameScreenCGImage(); - - imageWidth[0] = width; - imageHeight[0] = height; - } - - CGRect src; - - src = CGRectMake(0, 0, width, height); - DrawWithCoreImageFilter(src, cgGameImage); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); -} - -static void S9xPutImageOverscanOpenGL (int width, int height) -{ - if ((imageWidth[0] != width) || (imageHeight[0] != height) || (windowResizeCount > 0)) - { - if ((imageWidth[0] != width) || (imageHeight[0] != height)) - windowResizeCount += 2; - - if ((height == SNES_HEIGHT) || (height == (SNES_HEIGHT << 1))) - { - int pitch = width << 1; - int extbtm = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; - uint32 *extarea = (uint32 *) ((uint8 *) GFX.Screen + height * pitch); - - for (int i = 0; i < (((extbtm - height) * pitch) >> 2); i++) - extarea[i] = 0; - } - - const int vh = SNES_HEIGHT_EXTENDED << 1; - - if (fullscreen) - { - CGLSetCurrentContext(glContext); - - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (glstretch) - { - float fpw = (float) glScreenH / vh * 512.0f; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - glViewport((glScreenW - 512) >> 1, (glScreenH - vh) >> 1, 512, vh); - } - else - { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; - - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - } - - windowResizeCount--; - - textureNum = (width <= 256) ? kGL256256 : ((height <= 256) ? kGL512256 : kGL512512); - OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = OpenGL.rangeExt ? ((height > 256) ? vh : SNES_HEIGHT_EXTENDED) : (vh / 512.0f); - - glPixelStorei(GL_UNPACK_ROW_LENGTH, width); - glBindTexture(OpenGL.target, OpenGL.textures[textureNum]); - - imageWidth[0] = width; - imageHeight[0] = height; - } - - glTexSubImage2D(OpenGL.target, 0, 0, 0, OpenGL.texW[textureNum], OpenGL.texH[textureNum], OpenGL.format, OpenGL.type, GFX.Screen); - - if (!screencurvature) - { - glBegin(GL_QUADS); - - glTexCoord2fv(&OpenGL.vertex[textureNum][6]); - glVertex2f(-1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][4]); - glVertex2f( 1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][2]); - glVertex2f( 1.0f, 1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][0]); - glVertex2f(-1.0f, 1.0f); - - glEnd(); - } - else - { - GLfloat *t, *s; - - t = scTexArray[kSC2xExtend]; - s = scScnArray; - - for (int i = 0; i < kSCMeshY; i++) - { - glTexCoordPointer(2, GL_FLOAT, 0, t); - glVertexPointer(3, GL_FLOAT, 0, s); - glDrawArrays(GL_TRIANGLE_STRIP, 0, (kSCMeshX + 1) * 2); - - t += (kSCMeshX + 1) * 2 * 2; - s += (kSCMeshX + 1) * 2 * 3; - } - } - - glFinishObjectAPPLE(GL_TEXTURE, OpenGL.textures[textureNum]); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); -} - -static void S9xPutImageOverscanBlitGL (int width, int height) -{ - Blitter blitFn; - int copyWidth, copyHeight, extbtm; - - extbtm = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; - - if ((imageWidth[whichBuf] != width) || (imageHeight[whichBuf] != height)) - { - if ((height == SNES_HEIGHT) || (height == (SNES_HEIGHT << 1))) - { - const unsigned int pitch = 1024; - unsigned int i; - uint32 *extarea; - - extarea = (uint32 *) ((uint8 *) GFX.Screen + height * pitch); - for (i = 0; i < (((extbtm - height) * pitch) >> 2); i++) - extarea[i] = 0; - - memset(blitGLBuffer, 0, 1024 * 1024 * BYTES_PER_PIXEL); - } - - if (videoMode == VIDEOMODE_TV) - if (width <= 256) - S9xBlitClearDelta(); - } - - switch (nx) - { - default: - case 2: - if (width <= 256) - { - copyWidth = width * 2; - copyHeight = SNES_HEIGHT_EXTENDED * 2; - - switch (videoMode) - { - default: - case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; - case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; - case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; - case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; - case VIDEOMODE_EPX: blitFn = S9xBlitPixEPX16; break; - case VIDEOMODE_HQ2X: blitFn = S9xBlitPixHQ2x16; break; - } - } - else - if ((videoMode == VIDEOMODE_TV) && (height <= 256)) - { - copyWidth = width; - copyHeight = SNES_HEIGHT_EXTENDED * 2; - blitFn = S9xBlitPixHiResTV16; - } - else - { - copyWidth = width; - copyHeight = extbtm; - blitFn = S9xBlitPixSmall16; - } - - break; - - case 3: - if (width <= 256) - { - copyWidth = width * 3; - copyHeight = SNES_HEIGHT_EXTENDED * 3; - blitFn = S9xBlitPixHQ3x16; - } - else - { - copyWidth = width; - copyHeight = extbtm; - blitFn = S9xBlitPixSmall16; - } - - break; - - case 4: - if (width <= 256) - { - copyWidth = width * 4; - copyHeight = SNES_HEIGHT_EXTENDED * 4; - blitFn = S9xBlitPixHQ4x16; - } - else - { - copyWidth = width * 2; - copyHeight = extbtm * 2; - blitFn = S9xBlitPixHQ2x16; - } - - break; - - case -1: - case -2: - copyWidth = ntsc_width; - copyHeight = extbtm; - - if (width <= 256) - blitFn = S9xBlitPixNTSC16; - else - blitFn = S9xBlitPixHiResNTSC16; - - break; - } - - imageWidth[whichBuf] = width; - imageHeight[whichBuf] = height; - - if (multiprocessor) - { - MPWaitOnSemaphore(readySemaphore, kDurationForever); - - mpDataBuffer->nx = nx; - mpDataBuffer->blitFn = blitFn; - mpDataBuffer->srcWidth = width; - mpDataBuffer->srcHeight = height; - mpDataBuffer->srcRowBytes = width * 2; - mpDataBuffer->copyWidth = copyWidth; - mpDataBuffer->copyHeight = copyHeight; - mpDataBuffer->gfxBuffer = GFX.Screen; - - MPNotifyQueue(taskQueue, (void *) kMPBlitFrame, 0, 0); - - whichBuf = 1 - whichBuf; - GFX.Screen = gfxScreen[whichBuf]; - } - else - { - switch (nx) - { - case -1: - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, 1024 * 2, width, height); - break; - - case -2: - if (height > SNES_HEIGHT_EXTENDED) - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, 1024 * 2, width, height); - else - { - uint8 *tmpBuffer = blitGLBuffer + (1024 * 512 * BYTES_PER_PIXEL); - int aligned = ((ntsc_width + 2) >> 1) << 1; - blitFn((uint8 *) GFX.Screen, width * 2, tmpBuffer, 1024 * 2, width, height); - S9xBlitPixHiResMixedTV16(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, copyHeight); - copyHeight *= 2; - } - - break; - - default: - int dstbytes = (OpenGL.rangeExt ? copyWidth : ((copyWidth > 512) ? 1024 : 512)) * 2; - blitFn((uint8 *) GFX.Screen, width * 2, blitGLBuffer, dstbytes, width, height); - break; - } - - if (!ciFilterEnable) - S9xPutImageBlitGL2(copyWidth, copyHeight); - else - S9xPutImageBlitGL2CoreImage(copyWidth, copyHeight); - } -} - -static void S9xPutImageOverscanCoreImage (int width, int height) -{ - int extbtm = (height > 256) ? (SNES_HEIGHT_EXTENDED << 1) : SNES_HEIGHT_EXTENDED; - - if ((imageWidth[0] != width) || (imageHeight[0] != height) || (windowResizeCount > 0)) - { - if ((imageWidth[0] != width) || (imageHeight[0] != height)) - windowResizeCount += 2; - - if ((height == SNES_HEIGHT) || (height == (SNES_HEIGHT << 1))) - { - int pitch = width << 1; - uint32 *extarea = (uint32 *) ((uint8 *) GFX.Screen + height * pitch); - - for (int i = 0; i < (((extbtm - height) * pitch) >> 2); i++) - extarea[i] = 0; - } - - const int vh = SNES_HEIGHT_EXTENDED << 1; - - if (fullscreen) - { - CGLSetCurrentContext(glContext); - - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (glstretch) - { - float fpw = (float) glScreenH / vh * 512.0f; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - glViewport((glScreenW - 512) >> 1, (glScreenH - vh) >> 1, 512, vh); - } - else - { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; - - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); - - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - } - - windowResizeCount--; - - glPixelStorei(GL_UNPACK_ROW_LENGTH, width); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, width, height - extbtm, height, -1, 1); - - if (cgGameImage) - CGImageRelease(cgGameImage); - cgGameImage = CreateGameScreenCGImage(); - - imageWidth[0] = width; - imageHeight[0] = height; - } - - CGRect src; - - src = CGRectMake(0, 0, width, height); - DrawWithCoreImageFilter(src, cgGameImage); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); + RenderBlitScreen(blitFn, nx, width, height, copyWidth, copyHeight, GFX.Screen); } static void S9xPutImageBlitGL2 (int blit_width, int blit_height) { - if ((prevBlitWidth != blit_width) || (prevBlitHeight != blit_height) || (windowResizeCount > 0)) - { - if ((prevBlitWidth != blit_width) || (prevBlitHeight != blit_height)) - windowResizeCount += 2; + if ((prevBlitWidth != blit_width) || (prevBlitHeight != blit_height)) + windowResizeCount += 2; + if (windowResizeCount > 0) + { if (fullscreen) { CGLSetCurrentContext(glContext); @@ -2386,9 +1717,10 @@ static void S9xPutImageBlitGL2 (int blit_width, int blit_height) if (glstretch) { - int sh = (blit_width > blit_height * 2) ? (blit_height * 2) : blit_height; + int sh = (blit_width < blit_height) ? (blit_height >> 1) : ((blit_width > blit_height * 2) ? (blit_height << 1) : blit_height); float fpw = (float) glScreenH / (float) sh * (float) blit_width; int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); + glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); } else @@ -2428,193 +1760,137 @@ static void S9xPutImageBlitGL2 (int blit_width, int blit_height) } } - windowResizeCount--; - - if (nx < 0) - textureNum = (blit_height > SNES_HEIGHT_EXTENDED) ? kGLNTS512 : kGLNTS256; - else + if (!ciFilterEnable) { - switch (blit_width / SNES_WIDTH) - { - default: - case 2: textureNum = kGLBlit2x; break; - case 3: textureNum = kGLBlit3x; break; - case 4: textureNum = kGLBlit4x; break; - } - } - - if (nx < 0) - { - int sh = (blit_height > 256) ? 512 : 256; - OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width / 1024.0f; - OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height / (float) sh; - glPixelStorei(GL_UNPACK_ROW_LENGTH, 1024); - } - else - { - if (OpenGL.rangeExt) - { - OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width; - OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height; - glPixelStorei(GL_UNPACK_ROW_LENGTH, blit_width); - } + if (nx < 0) + textureNum = (blit_height > 256) ? kGLNTS512 : kGLNTS256; else { - int sl = (blit_width > 512) ? 1024 : 512; - OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width / (float) sl; - OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height / (float) sl; - glPixelStorei(GL_UNPACK_ROW_LENGTH, sl); - } - } - - glBindTexture(OpenGL.target, OpenGL.textures[textureNum]); - - prevBlitWidth = blit_width; - prevBlitHeight = blit_height; - } - - glTexSubImage2D(OpenGL.target, 0, 0, 0, OpenGL.texW[textureNum], OpenGL.texH[textureNum], OpenGL.format, OpenGL.type, blitGLBuffer); - - if (!screencurvature) - { - glBegin(GL_QUADS); - - glTexCoord2fv(&OpenGL.vertex[textureNum][6]); - glVertex2f(-1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][4]); - glVertex2f( 1.0f, -1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][2]); - glVertex2f( 1.0f, 1.0f); - glTexCoord2fv(&OpenGL.vertex[textureNum][0]); - glVertex2f(-1.0f, 1.0f); - - glEnd(); - } - else - { - GLfloat *t, *s; - int tex; - - if (nx < 0) - tex = (blit_height % SNES_HEIGHT) ? kSCNTExtend : kSCNTNormal; - else - if (blit_width > blit_height * 2) - { - if (blit_width / SNES_WIDTH != 3) - tex = (blit_height % SNES_HEIGHT) ? kSC2xEHiRes : kSC2xNHiRes; - else - tex = (blit_height % SNES_HEIGHT) ? kSC3xEHiRes : kSC3xNHiRes; - } - else - { - if (blit_width / SNES_WIDTH != 3) - tex = (blit_height % SNES_HEIGHT) ? kSC2xExtend : kSC2xNormal; - else - tex = (blit_height % SNES_HEIGHT) ? kSC3xExtend : kSC3xNormal; - } - - t = scTexArray[tex]; - s = scScnArray; - - for (int i = 0; i < kSCMeshY; i++) - { - glTexCoordPointer(2, GL_FLOAT, 0, t); - glVertexPointer(3, GL_FLOAT, 0, s); - glDrawArrays(GL_TRIANGLE_STRIP, 0, (kSCMeshX + 1) * 2); - - t += (kSCMeshX + 1) * 2 * 2; - s += (kSCMeshX + 1) * 2 * 3; - } - } - - glFinishObjectAPPLE(GL_TEXTURE, OpenGL.textures[textureNum]); - - if (fullscreen) - CGLFlushDrawable(glContext); - else - aglSwapBuffers(agContext); -} - -static void S9xPutImageBlitGL2CoreImage (int blit_width, int blit_height) -{ - if ((prevBlitWidth != blit_width) || (prevBlitHeight != blit_height) || (windowResizeCount > 0)) - { - if ((prevBlitWidth != blit_width) || (prevBlitHeight != blit_height)) - windowResizeCount += 2; - - if (fullscreen) - { - CGLSetCurrentContext(glContext); - - glViewport(0, 0, glScreenW, glScreenH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (glstretch) - { - int sh = (blit_width > blit_height * 2) ? (blit_height * 2) : blit_height; - float fpw = (float) glScreenH / (float) sh * (float) blit_width; - int pw = (int) (fpw + ((float) glScreenW - fpw) * (float) macAspectRatio / 10000.0); - glViewport((glScreenW - pw) >> 1, 0, pw, glScreenH); - } - else - { - int sw, sh; - - if (nx < 0) + switch (blit_width / SNES_WIDTH) { - sw = ntsc_width; - sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * 2; + default: + case 1: + case 2: textureNum = kGLBlit2x; break; + case 3: textureNum = kGLBlit3x; break; + case 4: textureNum = kGLBlit4x; break; + } + } + + if (nx < 0) + { + int sh = (blit_height > 256) ? 512 : 256; + OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width / 1024.0f; + OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height / (float) sh; + glPixelStorei(GL_UNPACK_ROW_LENGTH, 1024); + } + else + { + if (OpenGL.rangeExt) + { + OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width; + OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height; + glPixelStorei(GL_UNPACK_ROW_LENGTH, blit_width); } else { - sw = SNES_WIDTH * nx; - sh = ((blit_height % SNES_HEIGHT) ? SNES_HEIGHT_EXTENDED : SNES_HEIGHT) * nx; + int sl = (blit_width > 512) ? 1024 : 512; + int sh = (blit_height > 512) ? 1024 : 512; + OpenGL.vertex[textureNum][2] = OpenGL.vertex[textureNum][4] = blit_width / (float) sl; + OpenGL.vertex[textureNum][5] = OpenGL.vertex[textureNum][7] = blit_height / (float) sh; + glPixelStorei(GL_UNPACK_ROW_LENGTH, (blit_width > 512) ? 1024 : ((blit_width > 256) ? 512 : 256)); } - - glViewport((glScreenW - sw) >> 1, (glScreenH - sh) >> 1, sw, sh); } + + glBindTexture(OpenGL.target, OpenGL.textures[textureNum]); } else { - int ww = (int) gWindowRect.size.width, - wh = (int) gWindowRect.size.height; + int sl = OpenGL.rangeExt ? blit_width : ((blit_width > 512) ? 1024 : ((blit_width > 256) ? 512 : 256)); - aglSetCurrentContext(agContext); - aglUpdateContext(agContext); + glPixelStorei(GL_UNPACK_ROW_LENGTH, sl); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, blit_width, 0, blit_height, -1, 1); - glViewport(0, 0, ww, wh); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if (windowExtend) - { - int bh = (blit_height % SNES_HEIGHT) ? (SNES_HEIGHT_EXTENDED << 1) : (SNES_HEIGHT << 1); - glViewport(0, ((kMacWindowHeight - bh) >> 1) * wh / kMacWindowHeight, ww, bh * wh / kMacWindowHeight); - } + if (cgBlitImage) + CGImageRelease(cgBlitImage); + cgBlitImage = CreateBlitScreenCGImage(blit_width, blit_height, sl << 1, blitGLBuffer); } - windowResizeCount--; - - int sl = OpenGL.rangeExt ? blit_width : ((blit_width > 512) ? 1024 : 512); - - glPixelStorei(GL_UNPACK_ROW_LENGTH, sl); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, blit_width, 0, blit_height, -1, 1); - - if (cgBlitImage) - CGImageRelease(cgBlitImage); - cgBlitImage = CreateBlitScreenCGImage(blit_width, blit_height, sl << 1, blitGLBuffer); - prevBlitWidth = blit_width; prevBlitHeight = blit_height; + + windowResizeCount--; } - CGRect src; + if (!ciFilterEnable) + { + glTexSubImage2D(OpenGL.target, 0, 0, 0, OpenGL.texW[textureNum], OpenGL.texH[textureNum], OpenGL.format, OpenGL.type, blitGLBuffer); - src = CGRectMake(0, 0, blit_width, blit_height); - DrawWithCoreImageFilter(src, cgBlitImage); + if (!screencurvature) + { + glBegin(GL_QUADS); + + glTexCoord2fv(&OpenGL.vertex[textureNum][6]); + glVertex2f(-1.0f, -1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][4]); + glVertex2f( 1.0f, -1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][2]); + glVertex2f( 1.0f, 1.0f); + glTexCoord2fv(&OpenGL.vertex[textureNum][0]); + glVertex2f(-1.0f, 1.0f); + + glEnd(); + } + else + { + GLfloat *t, *s; + int tex; + + if (nx < 0) + tex = (blit_height % SNES_HEIGHT) ? kSCNTExtend : kSCNTNormal; + else + if (blit_width > blit_height * 2) + { + if (blit_width / SNES_WIDTH != 3) + tex = (blit_height % SNES_HEIGHT) ? kSC2xEHiRes : kSC2xNHiRes; + else + tex = (blit_height % SNES_HEIGHT) ? kSC3xEHiRes : kSC3xNHiRes; + } + else + if (blit_width > blit_height) + { + if (blit_width / SNES_WIDTH != 3) + tex = (blit_height % SNES_HEIGHT) ? kSC2xExtend : kSC2xNormal; + else + tex = (blit_height % SNES_HEIGHT) ? kSC3xExtend : kSC3xNormal; + } + else + tex = (blit_height % SNES_HEIGHT) ? kSC2xEInter : kSC2xNInter; + + t = scTexArray[tex]; + s = scScnArray; + + for (int i = 0; i < kSCMeshY; i++) + { + glTexCoordPointer(2, GL_FLOAT, 0, t); + glVertexPointer(3, GL_FLOAT, 0, s); + glDrawArrays(GL_TRIANGLE_STRIP, 0, (kSCMeshX + 1) * 2); + + t += (kSCMeshX + 1) * 2 * 2; + s += (kSCMeshX + 1) * 2 * 3; + } + } + + glFinishObjectAPPLE(GL_TEXTURE, OpenGL.textures[textureNum]); + } + else + { + CGRect src; + + src = CGRectMake(0, 0, blit_width, blit_height); + DrawWithCoreImageFilter(src, cgBlitImage); + } if (fullscreen) CGLFlushDrawable(glContext); @@ -2622,60 +1898,6 @@ static void S9xPutImageBlitGL2CoreImage (int blit_width, int blit_height) aglSwapBuffers(agContext); } -static void GLMakeScreenMesh (GLfloat *vertex3D, int meshx, int meshy) -{ - GLfloat *v; - float warp; - - v = vertex3D; - warp = macCurvatureWarp * 0.001f; - - for (int y = 0; y < meshy; y++) - { - for (int x = 0; x <= meshx; x++) - { - float u1, v1, v2; - - u1 = -1.0f + 2.0f / (float) meshx * (float) x; - v1 = -1.0f + 2.0f / (float) meshy * (float) y; - v2 = -1.0f + 2.0f / (float) meshy * (float) (y + 1); - - *v++ = u1; - *v++ = v2; - *v++ = -1.0f - (u1 * u1 + v2 * v2) * warp; - - *v++ = u1; - *v++ = v1; - *v++ = -1.0f - (u1 * u1 + v1 * v1) * warp; - } - } -} - -static void GLMakeTextureMesh (GLfloat *vertex2D, int meshx, int meshy, float lx, float ly) -{ - GLfloat *v; - - v = vertex2D; - - for (int y = meshy; y > 0; y--) - { - for (int x = 0; x <= meshx; x++) - { - float u1, v1, v2; - - u1 = lx / (float) meshx * (float) x; - v1 = ly / (float) meshy * (float) y; - v2 = ly / (float) meshy * (float) (y - 1); - - *v++ = u1; - *v++ = v2; - - *v++ = u1; - *v++ = v1; - } - } -} - void S9xTextMode (void) { return; diff --git a/unix/x11.cpp b/unix/x11.cpp index abcb3b74..5066f8f6 100644 --- a/unix/x11.cpp +++ b/unix/x11.cpp @@ -789,19 +789,28 @@ void S9xPutImage (int width, int height) if (width <= SNES_WIDTH) { - copyWidth = width * 2; - copyHeight = height * 2; - - switch (GUI.video_mode) + if (height > SNES_HEIGHT_EXTENDED) { - case VIDEOMODE_BLOCKY: blitFn = S9xBlitPixScaled16; break; - case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; - case VIDEOMODE_SMOOTH: blitFn = S9xBlitPixSmooth16; break; - case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; - case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; - case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; - case VIDEOMODE_EPX: blitFn = S9xBlitPixEPX16; break; - case VIDEOMODE_HQ2X: blitFn = S9xBlitPixHQ2x16; break; + copyWidth = width * 2; + copyHeight = height; + blitFn = S9xBlitPixDoubled16; + } + else + { + copyWidth = width * 2; + copyHeight = height * 2; + + switch (GUI.video_mode) + { + case VIDEOMODE_BLOCKY: blitFn = S9xBlitPixScaled16; break; + case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; + case VIDEOMODE_SMOOTH: blitFn = S9xBlitPixSmooth16; break; + case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; + case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; + case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; + case VIDEOMODE_EPX: blitFn = S9xBlitPixEPX16; break; + case VIDEOMODE_HQ2X: blitFn = S9xBlitPixHQ2x16; break; + } } } else From fc3025bd0564cca3de07a575300d3d8b1807f9fd Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 23 Feb 2011 15:38:55 -0600 Subject: [PATCH 5/7] Add a label that shows relative video refresh rate for the selected sound input rate. --- gtk/src/gtk_preferences.cpp | 21 +++++++++++++++++++++ gtk/src/snes9x.ui | 34 +++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/gtk/src/gtk_preferences.cpp b/gtk/src/gtk_preferences.cpp index 79df7f01..3db26170 100644 --- a/gtk/src/gtk_preferences.cpp +++ b/gtk/src/gtk_preferences.cpp @@ -452,6 +452,20 @@ Snes9xPreferences::calibration_dialog (void) #endif +static void +event_input_rate_changed (GtkRange *range, gpointer data) +{ + char text[256]; + GtkLabel *label = GTK_LABEL (data); + double value = gtk_range_get_value (range) / 32040.0 * 60.09881389744051; + + snprintf (text, 256, "%.4f hz", value); + + gtk_label_set_text (label, text); + + return; +} + static void event_about_clicked (GtkButton *widget, gpointer data) { @@ -548,6 +562,13 @@ Snes9xPreferences::Snes9xPreferences (Snes9xConfig *config) : signal_connect (callbacks); + g_signal_connect_data (get_widget ("sound_input_rate"), + "value-changed", + G_CALLBACK (event_input_rate_changed), + get_widget ("relative_video_rate"), + NULL, + (GConnectFlags) 0); + return; } diff --git a/gtk/src/snes9x.ui b/gtk/src/snes9x.ui index a511044e..5e9233c7 100644 --- a/gtk/src/snes9x.ui +++ b/gtk/src/snes9x.ui @@ -2095,7 +2095,7 @@ True - 3 + 4 2 10 5 @@ -2141,8 +2141,8 @@ 1 2 - 2 - 3 + 3 + 4 GTK_FILL GTK_FILL @@ -2154,8 +2154,8 @@ Buffer size: - 2 - 3 + 3 + 4 GTK_FILL GTK_FILL @@ -2216,6 +2216,30 @@ GTK_FILL + + + True + 0 + Video rate: + + + 2 + 3 + GTK_FILL + + + + + True + label + + + 1 + 2 + 2 + 3 + + False From b65f18fa84ab60d3636d8892c1122ad523ba4fab Mon Sep 17 00:00:00 2001 From: OV2 Date: Thu, 24 Feb 2011 01:26:42 +0100 Subject: [PATCH 6/7] Win32: add preliminary CG shader support (D3D + OGL) CG shaders can be found in the ps3 snes9x port. Some of them will not work correctly with all internal filter modes. --- win32/CDirect3D.cpp | 202 +++++++++++++++++++++++++++++++--------- win32/CDirect3D.h | 11 ++- win32/COpenGL.cpp | 148 ++++++++++++++++++++--------- win32/COpenGL.h | 17 +++- win32/rsrc/snes9x.rc | 4 +- win32/wconfig.cpp | 4 +- win32/win32_display.cpp | 25 +++++ win32/win32_display.h | 1 + win32/wsnes9x.cpp | 28 +++--- win32/wsnes9x.h | 4 +- 10 files changed, 334 insertions(+), 110 deletions(-) diff --git a/win32/CDirect3D.cpp b/win32/CDirect3D.cpp index e60a2bc9..6e418df9 100644 --- a/win32/CDirect3D.cpp +++ b/win32/CDirect3D.cpp @@ -178,6 +178,9 @@ #pragma comment( lib, "d3dx9" ) #pragma comment( lib, "DxErr" ) +#pragma comment( lib, "cg.lib" ) +#pragma comment( lib, "cgd3d9.lib" ) + #include "cdirect3d.h" #include "win32_display.h" #include "../snes9x.h" @@ -216,10 +219,12 @@ CDirect3D::CDirect3D() rubyLUT[i] = NULL; } effect=NULL; - shader_compiled=false; + shader_type = D3D_SHADER_NONE; shaderTimer = 1.0f; shaderTimeStart = 0; shaderTimeElapsed = 0; + cgContext = NULL; + cgVertexProgram = cgFragmentProgram = NULL; } /* CDirect3D::~CDirect3D() @@ -273,6 +278,12 @@ bool CDirect3D::Initialize(HWND hWnd) return false; } + cgContext = cgCreateContext(); + hr = cgD3D9SetDevice(pDevice); + if(FAILED(hr)) { + DXTRACE_ERR_MSGBOX(TEXT("Error setting cg device"), hr); + } + pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); init_done = true; @@ -303,6 +314,13 @@ void CDirect3D::DeInitialize() pD3D = NULL; } + if(cgContext) { + cgDestroyContext(cgContext); + cgContext = NULL; + } + + cgD3D9SetDevice(NULL); + init_done = false; afterRenderWidth = 0; afterRenderHeight = 0; @@ -312,6 +330,73 @@ void CDirect3D::DeInitialize() } bool CDirect3D::SetShader(const TCHAR *file) +{ + SetShaderCG(NULL); + SetShaderHLSL(NULL); + shader_type = D3D_SHADER_NONE; + if(file!=NULL && lstrlen(file)>3 && _tcsncicmp(&file[lstrlen(file)-3],TEXT(".cg"),3)==0) { + return SetShaderCG(file); + } else { + return SetShaderHLSL(file); + } +} + +bool CDirect3D::SetShaderCG(const TCHAR *file) +{ + TCHAR errorMsg[MAX_PATH + 50]; + HRESULT hr; + + if(cgFragmentProgram) { + cgDestroyProgram(cgFragmentProgram); + cgFragmentProgram = NULL; + } + if(cgVertexProgram) { + cgDestroyProgram(cgVertexProgram); + cgVertexProgram = NULL; + } + + if (file == NULL || *file==TEXT('\0')) + return true; + + CGprofile vertexProfile = cgD3D9GetLatestVertexProfile(); + CGprofile pixelProfile = cgD3D9GetLatestPixelProfile(); + + const char** vertexOptions = cgD3D9GetOptimalOptions(vertexProfile); + const char** pixelOptions = cgD3D9GetOptimalOptions(pixelProfile); + + char *fileContents = ReadShaderFileContents(file); + if(!fileContents) + return false; + + cgVertexProgram = cgCreateProgram( cgContext, CG_SOURCE, fileContents, + vertexProfile, "main_vertex", vertexOptions); + + cgFragmentProgram = cgCreateProgram( cgContext, CG_SOURCE, fileContents, + pixelProfile, "main_fragment", pixelOptions); + + delete [] fileContents; + + if(!cgVertexProgram && !cgFragmentProgram) { + _stprintf(errorMsg,TEXT("No vertex or fragment program in file:\n%s"),file); + MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION); + return false; + } + + if(cgVertexProgram) { + hr = cgD3D9LoadProgram(cgVertexProgram,false,0); + hr = cgD3D9BindProgram(cgVertexProgram); + } + if(cgFragmentProgram) { + hr = cgD3D9LoadProgram(cgFragmentProgram,false,0); + hr = cgD3D9BindProgram(cgFragmentProgram); + } + + shader_type = D3D_SHADER_CG; + + return true; +} + +bool CDirect3D::SetShaderHLSL(const TCHAR *file) { //MUDLORD: the guts //Compiles a shader from files on disc @@ -331,7 +416,6 @@ bool CDirect3D::SetShader(const TCHAR *file) HRESULT hr; - shader_compiled = false; shaderTimer = 1.0f; shaderTimeStart = 0; shaderTimeElapsed = 0; @@ -462,48 +546,77 @@ bool CDirect3D::SetShader(const TCHAR *file) D3DXHANDLE hTech; effect->FindNextValidTechnique(NULL,&hTech); effect->SetTechnique( hTech ); - shader_compiled = true; + shader_type = D3D_SHADER_HLSL; return true; } void CDirect3D::SetShaderVars() { - D3DXVECTOR4 rubyTextureSize; - D3DXVECTOR4 rubyInputSize; - D3DXVECTOR4 rubyOutputSize; - D3DXHANDLE rubyTimer; + if(shader_type == D3D_SHADER_HLSL) { + D3DXVECTOR4 rubyTextureSize; + D3DXVECTOR4 rubyInputSize; + D3DXVECTOR4 rubyOutputSize; + D3DXHANDLE rubyTimer; - int shaderTime = GetTickCount(); - shaderTimeElapsed += shaderTime - shaderTimeStart; - shaderTimeStart = shaderTime; - if(shaderTimeElapsed > 100) { - shaderTimeElapsed = 0; - shaderTimer += 0.01f; - } - rubyTextureSize.x = rubyTextureSize.y = (float)quadTextureSize; - rubyTextureSize.z = rubyTextureSize.w = 1.0 / quadTextureSize; - rubyInputSize.x = (float)afterRenderWidth; - rubyInputSize.y = (float)afterRenderHeight; - rubyInputSize.z = 1.0 / rubyInputSize.y; - rubyInputSize.w = 1.0 / rubyInputSize.z; - rubyOutputSize.x = GUI.Stretch?(float)dPresentParams.BackBufferWidth:(float)afterRenderWidth; - rubyOutputSize.y = GUI.Stretch?(float)dPresentParams.BackBufferHeight:(float)afterRenderHeight; - rubyOutputSize.z = 1.0 / rubyOutputSize.y; - rubyOutputSize.w = 1.0 / rubyOutputSize.x; - rubyTimer = effect->GetParameterByName(0, "rubyTimer"); - - effect->SetFloat(rubyTimer, shaderTimer); - effect->SetVector("rubyTextureSize", &rubyTextureSize); - effect->SetVector("rubyInputSize", &rubyInputSize); - effect->SetVector("rubyOutputSize", &rubyOutputSize); - - effect->SetTexture("rubyTexture", drawSurface); - for(int i = 0; i < MAX_SHADER_TEXTURES; i++) { - char rubyLUTName[256]; - sprintf(rubyLUTName, "rubyLUT%d", i); - if (rubyLUT[i] != NULL) { - effect->SetTexture( rubyLUTName, rubyLUT[i] ); + int shaderTime = GetTickCount(); + shaderTimeElapsed += shaderTime - shaderTimeStart; + shaderTimeStart = shaderTime; + if(shaderTimeElapsed > 100) { + shaderTimeElapsed = 0; + shaderTimer += 0.01f; } + rubyTextureSize.x = rubyTextureSize.y = (float)quadTextureSize; + rubyTextureSize.z = rubyTextureSize.w = 1.0 / quadTextureSize; + rubyInputSize.x = (float)afterRenderWidth; + rubyInputSize.y = (float)afterRenderHeight; + rubyInputSize.z = 1.0 / rubyInputSize.y; + rubyInputSize.w = 1.0 / rubyInputSize.z; + rubyOutputSize.x = GUI.Stretch?(float)dPresentParams.BackBufferWidth:(float)afterRenderWidth; + rubyOutputSize.y = GUI.Stretch?(float)dPresentParams.BackBufferHeight:(float)afterRenderHeight; + rubyOutputSize.z = 1.0 / rubyOutputSize.y; + rubyOutputSize.w = 1.0 / rubyOutputSize.x; + rubyTimer = effect->GetParameterByName(0, "rubyTimer"); + + effect->SetFloat(rubyTimer, shaderTimer); + effect->SetVector("rubyTextureSize", &rubyTextureSize); + effect->SetVector("rubyInputSize", &rubyInputSize); + effect->SetVector("rubyOutputSize", &rubyOutputSize); + + effect->SetTexture("rubyTexture", drawSurface); + for(int i = 0; i < MAX_SHADER_TEXTURES; i++) { + char rubyLUTName[256]; + sprintf(rubyLUTName, "rubyLUT%d", i); + if (rubyLUT[i] != NULL) { + effect->SetTexture( rubyLUTName, rubyLUT[i] ); + } + } + } else if(shader_type == D3D_SHADER_CG) { + CGparameter cgpModelViewProj = cgGetNamedParameter(cgVertexProgram, "modelViewProj"); + + CGparameter cgpVideoSize = cgGetNamedParameter(cgFragmentProgram, "IN.video_size"); + CGparameter cgpTextureSize = cgGetNamedParameter(cgFragmentProgram, "IN.texture_size"); + CGparameter cgpOutputSize = cgGetNamedParameter(cgFragmentProgram, "IN.output_size"); + + D3DXMATRIX mvpMat; + D3DXVECTOR2 videoSize; + D3DXVECTOR2 textureSize; + D3DXVECTOR2 outputSize; + videoSize.x = (float)afterRenderWidth; + videoSize.y = (float)afterRenderHeight; + textureSize.x = textureSize.y = (float)quadTextureSize; + outputSize.x = GUI.Stretch?(float)dPresentParams.BackBufferWidth:(float)afterRenderWidth; + outputSize.y = GUI.Stretch?(float)dPresentParams.BackBufferHeight:(float)afterRenderHeight; + + D3DXMatrixIdentity(&mvpMat); + + if(cgpModelViewProj) + cgD3D9SetUniformMatrix(cgpModelViewProj,&mvpMat); + if(cgpVideoSize) + cgD3D9SetUniform(cgpVideoSize,&videoSize); + if(cgpTextureSize) + cgD3D9SetUniform(cgpTextureSize,&textureSize); + if(cgpOutputSize) + cgD3D9SetUniform(cgpOutputSize,&outputSize); } } @@ -579,10 +692,15 @@ void CDirect3D::Render(SSurface Src) pDevice->SetFVF(FVF_COORDS_TEX); pDevice->SetStreamSource(0,vertexBuffer,0,sizeof(VERTEX)); - if (shader_compiled) { + if(shader_type == D3D_SHADER_CG) { + cgD3D9BindProgram(cgFragmentProgram); + cgD3D9BindProgram(cgVertexProgram); + } + + SetShaderVars(); + + if (shader_type == D3D_SHADER_HLSL) { UINT passes; - - SetShaderVars(); hr = effect->Begin(&passes, 0); for(UINT pass = 0; pass < passes; pass++ ) { @@ -893,8 +1011,8 @@ returns true if successful, false otherwise */ bool CDirect3D::ApplyDisplayChanges(void) { - if(GUI.shaderEnabled && GUI.HLSLshaderFileName) - SetShader(GUI.HLSLshaderFileName); + if(GUI.shaderEnabled && GUI.D3DshaderFileName) + SetShader(GUI.D3DshaderFileName); else SetShader(NULL); diff --git a/win32/CDirect3D.h b/win32/CDirect3D.h index 1daf463e..43b94e8b 100644 --- a/win32/CDirect3D.h +++ b/win32/CDirect3D.h @@ -183,6 +183,9 @@ #include #include +#include +#include + #include "render.h" #include "wsnes9x.h" #include "IS9xDisplayOutput.h" @@ -199,6 +202,8 @@ typedef struct _VERTEX { } } VERTEX; //our custom vertex with a constuctor for easier assignment +enum current_d3d_shader_type { D3D_SHADER_NONE, D3D_SHADER_HLSL, D3D_SHADER_CG }; + class CDirect3D: public IS9xDisplayOutput { private: @@ -218,7 +223,9 @@ private: LPD3DXEFFECT effect; LPDIRECT3DTEXTURE9 rubyLUT[MAX_SHADER_TEXTURES]; - bool shader_compiled; + CGcontext cgContext; + CGprogram cgVertexProgram, cgFragmentProgram; + current_d3d_shader_type shader_type; float shaderTimer; int shaderTimeStart; int shaderTimeElapsed; @@ -231,6 +238,8 @@ private: bool ResetDevice(); void SetShaderVars(); bool SetShader(const TCHAR *file); + bool SetShaderHLSL(const TCHAR *file); + bool SetShaderCG(const TCHAR *file); public: CDirect3D(); diff --git a/win32/COpenGL.cpp b/win32/COpenGL.cpp index 629980fd..ee2de7da 100644 --- a/win32/COpenGL.cpp +++ b/win32/COpenGL.cpp @@ -9,6 +9,9 @@ #include "../filter/hq2x.h" #include "../filter/2xsai.h" +#pragma comment( lib, "cg.lib" ) +#pragma comment( lib, "cggl.lib" ) + COpenGL::COpenGL(void) { @@ -23,11 +26,13 @@ COpenGL::COpenGL(void) afterRenderHeight = 0; fullscreen = false; shaderFunctionsLoaded = false; - shaderCompiled = false; + shader_type = OGL_SHADER_NONE; pboFunctionsLoaded = false; shaderProgram = 0; vertexShader = 0; fragmentShader = 0; + cgContext = NULL; + cgVertexProgram = cgFragmentProgram = NULL; } COpenGL::~COpenGL(void) @@ -99,6 +104,8 @@ bool COpenGL::Initialize(HWND hWnd) glVertexPointer(2, GL_FLOAT, 0, vertices); glTexCoordPointer(2, GL_FLOAT, 0, texcoords); + cgContext = cgCreateContext(); + GetClientRect(hWnd,&windowRect); ChangeRenderSize(windowRect.right,windowRect.bottom); @@ -113,8 +120,7 @@ bool COpenGL::Initialize(HWND hWnd) void COpenGL::DeInitialize() { initDone = false; - if(shaderCompiled) - SetShaders(NULL); + SetShaders(NULL); DestroyDrawSurface(); wglMakeCurrent(NULL,NULL); if(hRC) { @@ -132,7 +138,7 @@ void COpenGL::DeInitialize() afterRenderWidth = 0; afterRenderHeight = 0; shaderFunctionsLoaded = false; - shaderCompiled = false; + shader_type = OGL_SHADER_NONE; } void COpenGL::CreateDrawSurface() @@ -254,24 +260,37 @@ void COpenGL::Render(SSurface Src) ApplyDisplayChanges(); } - if (shaderCompiled) { - GLint location; + if (shader_type != OGL_SHADER_NONE) { + GLint location; float inputSize[2] = { (float)afterRenderWidth, (float)afterRenderHeight }; - location = glGetUniformLocation (shaderProgram, "rubyInputSize"); - glUniform2fv (location, 1, inputSize); - RECT windowSize; GetClientRect(hWnd,&windowSize); - float outputSize[2] = {(float)(GUI.Stretch?windowSize.right:afterRenderWidth), (float)(GUI.Stretch?windowSize.bottom:afterRenderHeight) }; - location = glGetUniformLocation (shaderProgram, "rubyOutputSize"); - glUniform2fv (location, 1, outputSize); - float textureSize[2] = { (float)quadTextureSize, (float)quadTextureSize }; - location = glGetUniformLocation (shaderProgram, "rubyTextureSize"); - glUniform2fv (location, 1, textureSize); + + if(shader_type == OGL_SHADER_GLSL) { + location = glGetUniformLocation (shaderProgram, "rubyInputSize"); + glUniform2fv (location, 1, inputSize); + + location = glGetUniformLocation (shaderProgram, "rubyOutputSize"); + glUniform2fv (location, 1, outputSize); + + location = glGetUniformLocation (shaderProgram, "rubyTextureSize"); + glUniform2fv (location, 1, textureSize); + } else if(shader_type == OGL_SHADER_CG) { + CGparameter cgpModelViewProj = cgGetNamedParameter(cgVertexProgram, "modelViewProj"); + + CGparameter cgpVideoSize = cgGetNamedParameter(cgFragmentProgram, "IN.video_size"); + CGparameter cgpTextureSize = cgGetNamedParameter(cgFragmentProgram, "IN.texture_size"); + CGparameter cgpOutputSize = cgGetNamedParameter(cgFragmentProgram, "IN.output_size"); + + cgGLSetStateMatrixParameter(cgpModelViewProj, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY); + cgGLSetParameter2fv(cgpVideoSize, inputSize); + cgGLSetParameter2fv(cgpTextureSize, textureSize); + cgGLSetParameter2fv(cgpOutputSize, outputSize); + } } glPixelStorei(GL_UNPACK_ROW_LENGTH, quadTextureSize); @@ -305,8 +324,8 @@ bool COpenGL::ApplyDisplayChanges(void) if(wglSwapIntervalEXT) { wglSwapIntervalEXT(GUI.Vsync?1:0); } - if(GUI.shaderEnabled && GUI.GLSLshaderFileName) - SetShaders(GUI.GLSLshaderFileName); + if(GUI.shaderEnabled && GUI.OGLshaderFileName) + SetShaders(GUI.OGLshaderFileName); else SetShaders(NULL); @@ -456,32 +475,79 @@ bool COpenGL::LoadShaderFunctions() return shaderFunctionsLoaded; } -char *ReadFileContents(const TCHAR *filename) +bool COpenGL::SetShaders(const TCHAR *file) { - HANDLE hFile; - DWORD size; - DWORD bytesRead; - char *contents; - - hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN , 0); - if(hFile == INVALID_HANDLE_VALUE){ - return NULL; + SetShadersCG(NULL); + SetShadersGLSL(NULL); + shader_type = OGL_SHADER_NONE; + if(file!=NULL && lstrlen(file)>3 && _tcsncicmp(&file[lstrlen(file)-3],TEXT(".cg"),3)==0) { + return SetShadersCG(file); + } else { + return SetShadersGLSL(file); } - size = GetFileSize(hFile,NULL); - contents = new char[size+1]; - if(!ReadFile(hFile,contents,size,&bytesRead,NULL)) { - CloseHandle(hFile); - delete[] contents; - return NULL; - } - CloseHandle(hFile); - contents[size] = '\0'; - return contents; - } -bool COpenGL::SetShaders(const TCHAR *glslFileName) +bool COpenGL::SetShadersCG(const TCHAR *file) +{ + TCHAR errorMsg[MAX_PATH + 50]; + HRESULT hr; + + if(cgFragmentProgram) { + cgDestroyProgram(cgFragmentProgram); + cgFragmentProgram = NULL; + } + if(cgVertexProgram) { + cgDestroyProgram(cgVertexProgram); + cgVertexProgram = NULL; + } + + CGprofile vertexProfile = cgGLGetLatestProfile(CG_GL_VERTEX); + CGprofile fragmentProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); + + cgGLDisableProfile(vertexProfile); + cgGLDisableProfile(fragmentProfile); + + if (file == NULL || *file==TEXT('\0')) + return true; + + cgGLSetOptimalOptions(vertexProfile); + cgGLSetOptimalOptions(fragmentProfile); + + char *fileContents = ReadShaderFileContents(file); + if(!fileContents) + return false; + + cgVertexProgram = cgCreateProgram( cgContext, CG_SOURCE, fileContents, + vertexProfile, "main_vertex", NULL); + + cgFragmentProgram = cgCreateProgram( cgContext, CG_SOURCE, fileContents, + fragmentProfile, "main_fragment", NULL); + + delete [] fileContents; + + if(!cgVertexProgram && !cgFragmentProgram) { + _stprintf(errorMsg,TEXT("No vertex or fragment program in file:\n%s"),file); + MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION); + return false; + } + + if(cgVertexProgram) { + cgGLEnableProfile(vertexProfile); + cgGLLoadProgram(cgVertexProgram); + cgGLBindProgram(cgVertexProgram); + } + if(cgFragmentProgram) { + cgGLEnableProfile(fragmentProfile); + cgGLLoadProgram(cgFragmentProgram); + cgGLBindProgram(cgFragmentProgram); + } + + shader_type = OGL_SHADER_CG; + + return true; +} + +bool COpenGL::SetShadersGLSL(const TCHAR *glslFileName) { char *fragment=NULL, *vertex=NULL; IXMLDOMDocument * pXMLDoc = NULL; @@ -492,8 +558,6 @@ bool COpenGL::SetShaders(const TCHAR *glslFileName) TCHAR errorMsg[MAX_PATH + 50]; - shaderCompiled = false; - if(fragmentShader) { glDetachShader(shaderProgram,fragmentShader); glDeleteShader(fragmentShader); @@ -631,7 +695,7 @@ bool COpenGL::SetShaders(const TCHAR *glslFileName) glLinkProgram(shaderProgram); glUseProgram(shaderProgram); - shaderCompiled = true; + shader_type = OGL_SHADER_GLSL; return true; } diff --git a/win32/COpenGL.h b/win32/COpenGL.h index edacfc07..1ef32a60 100644 --- a/win32/COpenGL.h +++ b/win32/COpenGL.h @@ -181,13 +181,15 @@ #include #include +#include +#include + #include "glext.h" #include "wglext.h" #include "IS9xDisplayOutput.h" -/* IS9xDisplayOutput - Interface for display driver. -*/ +enum current_ogl_shader_type { OGL_SHADER_NONE, OGL_SHADER_GLSL, OGL_SHADER_CG }; + class COpenGL : public IS9xDisplayOutput { private: @@ -207,10 +209,13 @@ private: unsigned int afterRenderWidth, afterRenderHeight; bool shaderFunctionsLoaded; - bool shaderCompiled; bool pboFunctionsLoaded; + CGcontext cgContext; + CGprogram cgVertexProgram, cgFragmentProgram; + current_ogl_shader_type shader_type; + GLuint shaderProgram; GLuint vertexShader; GLuint fragmentShader; @@ -240,7 +245,9 @@ private: PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT; - bool SetShaders(const TCHAR *glslFileName); + bool SetShaders(const TCHAR *file); + bool SetShadersCG(const TCHAR *file); + bool SetShadersGLSL(const TCHAR *glslFileName); bool LoadShaderFunctions(); bool LoadPBOFunctions(); void CreateDrawSurface(void); diff --git a/win32/rsrc/snes9x.rc b/win32/rsrc/snes9x.rc index 314e1890..d8288504 100644 --- a/win32/rsrc/snes9x.rc +++ b/win32/rsrc/snes9x.rc @@ -218,10 +218,10 @@ BEGIN LTEXT "Amount skipped:",IDC_STATIC,62,158,67,8 LTEXT "Output Method",IDC_STATIC,10,19,51,11 CONTROL "Use Shader",IDC_SHADER_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,52,9 - LTEXT "HLSL Effect File",IDC_STATIC,13,187,104,8 + LTEXT "Direct3D Shader File",IDC_STATIC,13,187,104,8 EDITTEXT IDC_SHADER_GLSL_FILE,13,227,306,14,ES_AUTOHSCROLL | WS_DISABLED PUSHBUTTON "...",IDC_SHADER_GLSL_BROWSE,322,227,19,14,WS_DISABLED - LTEXT "GLSL shader",IDC_STATIC,13,216,104,8 + LTEXT "OpenGL Shader File",IDC_STATIC,13,216,104,8 CONTROL "Blend Hi-Res Images",IDC_HIRESBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,136,82,10 CONTROL "VSync",IDC_VSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,102,37,10 END diff --git a/win32/wconfig.cpp b/win32/wconfig.cpp index e50f1ca0..a532e728 100644 --- a/win32/wconfig.cpp +++ b/win32/wconfig.cpp @@ -865,8 +865,8 @@ void WinRegisterConfigItems() AddUIntC("FilterHiRes", GUI.ScaleHiRes, 0, filterString2); AddBoolC("BlendHiRes", GUI.BlendHiRes, true, "true to horizontally blend Hi-Res images (better transparency effect on filters that do not account for this)"); AddBoolC("ShaderEnabled", GUI.shaderEnabled, false, "true to use pixel shader (if supported by output method)"); - AddStringC("Direct3D:HLSLFileName", GUI.HLSLshaderFileName, MAX_PATH, "", "shader filename for Direct3D mode"); - AddStringC("OpenGL:GLSLFileName", GUI.GLSLshaderFileName, MAX_PATH, "", "shader filename for OpenGL mode (bsnes-style XML shader)"); + AddStringC("Direct3D:D3DShader", GUI.D3DshaderFileName, MAX_PATH, "", "shader filename for Direct3D mode (HLSL effect file or CG shader"); + AddStringC("OpenGL:OGLShader", GUI.OGLshaderFileName, MAX_PATH, "", "shader filename for OpenGL mode (bsnes-style XML shader or CG shader)"); AddBoolC("ExtendHeight", GUI.HeightExtend, false, "true to display an extra 15 pixels at the bottom, which few games use. Also increases AVI output size from 256x224 to 256x240."); AddBoolC("AlwaysCenterImage", GUI.AlwaysCenterImage,false, "true to center the image even if larger than window"); AddIntC("Window:Width", GUI.window_size.right, 512, "256=1x, 512=2x, 768=3x, 1024=4x, etc. (usually)"); diff --git a/win32/win32_display.cpp b/win32/win32_display.cpp index dd845a9e..45c55272 100644 --- a/win32/win32_display.cpp +++ b/win32/win32_display.cpp @@ -430,6 +430,31 @@ void S9xSetWinPixelFormat () S9xDisplayOutput->SetSnes9xColorFormat(); } +char *ReadShaderFileContents(const TCHAR *filename) +{ + HANDLE hFile; + DWORD size; + DWORD bytesRead; + char *contents; + + hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN , 0); + if(hFile == INVALID_HANDLE_VALUE){ + return NULL; + } + size = GetFileSize(hFile,NULL); + contents = new char[size+1]; + if(!ReadFile(hFile,contents,size,&bytesRead,NULL)) { + CloseHandle(hFile); + delete[] contents; + return NULL; + } + CloseHandle(hFile); + contents[size] = '\0'; + return contents; + +} + // TODO: abstract the following functions in some way - only necessary for directdraw /* DirectDraw only begin */ diff --git a/win32/win32_display.h b/win32/win32_display.h index dd9cb635..b7f50fda 100644 --- a/win32/win32_display.h +++ b/win32/win32_display.h @@ -205,5 +205,6 @@ void WinDisplayStringFromBottom (const char *string, int linesFromBottom, int pi void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, int scale); template void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap); +char *ReadShaderFileContents(const TCHAR *filename); #endif diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 3b284544..115ddc30 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -6961,7 +6961,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) static bool prevStretch, prevAspectRatio, prevHeightExtend, prevAutoDisplayMessages, prevBilinearFilter, prevShaderEnabled, prevBlendHires; static int prevAspectWidth; static OutputMethod prevOutputMethod; - static TCHAR prevHLSLShaderFile[MAX_PATH],prevGLSLShaderFile[MAX_PATH]; + static TCHAR prevD3DShaderFile[MAX_PATH],prevOGLShaderFile[MAX_PATH]; switch(msg) { @@ -6990,8 +6990,8 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) prevAutoDisplayMessages = Settings.AutoDisplayMessages != 0; prevShaderEnabled = GUI.shaderEnabled; prevBlendHires = GUI.BlendHiRes; - lstrcpy(prevHLSLShaderFile,GUI.HLSLshaderFileName); - lstrcpy(prevGLSLShaderFile,GUI.GLSLshaderFileName); + lstrcpy(prevD3DShaderFile,GUI.D3DshaderFileName); + lstrcpy(prevOGLShaderFile,GUI.OGLshaderFileName); _stprintf(s,TEXT("Current: %dx%d %dbit %dHz"),GUI.FullscreenMode.width,GUI.FullscreenMode.height,GUI.FullscreenMode.depth,GUI.FullscreenMode.rate); @@ -7068,8 +7068,8 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hDlg, IDC_SHADER_GLSL_FILE),TRUE); EnableWindow(GetDlgItem(hDlg, IDC_SHADER_GLSL_BROWSE),TRUE); } - SetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.HLSLshaderFileName); - SetDlgItemText(hDlg,IDC_SHADER_GLSL_FILE,GUI.GLSLshaderFileName); + SetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.D3DshaderFileName); + SetDlgItemText(hDlg,IDC_SHADER_GLSL_FILE,GUI.OGLshaderFileName); lpfnOldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hDlg,IDC_SHADER_GROUP),GWLP_WNDPROC,(LONG_PTR)GroupBoxCheckBoxTitle); @@ -7234,8 +7234,8 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hDlg, IDC_SHADER_GLSL_FILE),GUI.shaderEnabled); EnableWindow(GetDlgItem(hDlg, IDC_SHADER_GLSL_BROWSE),GUI.shaderEnabled); - GetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.HLSLshaderFileName,MAX_PATH); - GetDlgItemText(hDlg,IDC_SHADER_GLSL_FILE,GUI.GLSLshaderFileName,MAX_PATH); + GetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.D3DshaderFileName,MAX_PATH); + GetDlgItemText(hDlg,IDC_SHADER_GLSL_FILE,GUI.OGLshaderFileName,MAX_PATH); WinDisplayApplyChanges(); WinRefreshDisplay(); break; @@ -7245,7 +7245,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hDlg; - ofn.lpstrFilter = TEXT("Shader Files\0*.shader\0All Files\0*.*\0\0"); + ofn.lpstrFilter = TEXT("Shader Files\0*.shader;*.cg\0All Files\0*.*\0\0"); ofn.lpstrFile = openFileName; ofn.lpstrTitle = TEXT("Select Shader"); ofn.lpstrDefExt = TEXT("shader"); @@ -7253,7 +7253,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; if(GetOpenFileName(&ofn)) { SetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,openFileName); - lstrcpy(GUI.HLSLshaderFileName,openFileName); + lstrcpy(GUI.D3DshaderFileName,openFileName); WinDisplayApplyChanges(); WinRefreshDisplay(); } @@ -7264,7 +7264,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hDlg; - ofn.lpstrFilter = TEXT("Shader Files\0*.shader\0All Files\0*.*\0\0"); + ofn.lpstrFilter = TEXT("Shader Files\0*.shader;*.cg\0All Files\0*.*\0\0"); ofn.lpstrFile = openFileName; ofn.lpstrTitle = TEXT("Select Shader"); ofn.lpstrDefExt = TEXT("shader"); @@ -7272,7 +7272,7 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; if(GetOpenFileName(&ofn)) { SetDlgItemText(hDlg,IDC_SHADER_GLSL_FILE,openFileName); - lstrcpy(GUI.GLSLshaderFileName,openFileName); + lstrcpy(GUI.OGLshaderFileName,openFileName); WinDisplayApplyChanges(); WinRefreshDisplay(); } @@ -7400,7 +7400,7 @@ updateFilterBox2: GUI.FullscreenMode = dm[index]; - GetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.HLSLshaderFileName,MAX_PATH); + GetDlgItemText(hDlg,IDC_SHADER_HLSL_FILE,GUI.D3DshaderFileName,MAX_PATH); // we might've changed the region that the game draws over @@ -7453,8 +7453,8 @@ updateFilterBox2: GUI.HeightExtend = prevHeightExtend; GUI.shaderEnabled = prevShaderEnabled; GUI.BlendHiRes = prevBlendHires; - lstrcpy(GUI.HLSLshaderFileName,prevHLSLShaderFile); - lstrcpy(GUI.GLSLshaderFileName,prevGLSLShaderFile); + lstrcpy(GUI.D3DshaderFileName,prevD3DShaderFile); + lstrcpy(GUI.OGLshaderFileName,prevOGLShaderFile); } EndDialog(hDlg,0); diff --git a/win32/wsnes9x.h b/win32/wsnes9x.h index 409deed2..19213774 100644 --- a/win32/wsnes9x.h +++ b/win32/wsnes9x.h @@ -316,8 +316,8 @@ struct sGUI { bool LocalVidMem; bool Vsync; bool shaderEnabled; - TCHAR HLSLshaderFileName[MAX_PATH]; - TCHAR GLSLshaderFileName[MAX_PATH]; + TCHAR D3DshaderFileName[MAX_PATH]; + TCHAR OGLshaderFileName[MAX_PATH]; bool IgnoreNextMouseMove; RECT window_size; From 41dc2fbb61b5b0babacb5f7f60049914f9703c06 Mon Sep 17 00:00:00 2001 From: zones Date: Thu, 24 Feb 2011 21:22:19 +0900 Subject: [PATCH 7/7] Add blend filters in blit.cpp --- filter/blit.cpp | 153 +- filter/blit.h | 18 +- macosx/English.lproj/Snes9x.nib/info.nib | 2 +- macosx/English.lproj/Snes9x.nib/objects.xib | 14212 +++++++++--------- macosx/mac-os.h | 1 + macosx/mac-prefs.cpp | 12 +- macosx/mac-render.cpp | 30 +- unix/x11.cpp | 15 +- 8 files changed, 7267 insertions(+), 7176 deletions(-) diff --git a/filter/blit.cpp b/filter/blit.cpp index 4a6d100c..69c48b44 100644 --- a/filter/blit.cpp +++ b/filter/blit.cpp @@ -181,11 +181,12 @@ #define ALL_COLOR_MASK (FIRST_COLOR_MASK | SECOND_COLOR_MASK | THIRD_COLOR_MASK) #ifdef GFX_MULTI_FORMAT -static uint16 lowPixelMask = 0, qlowPixelMask = 0; +static uint16 lowPixelMask = 0, qlowPixelMask = 0, highBitsMask = 0; static uint32 colorMask = 0; #else #define lowPixelMask (RGB_LOW_BITS_MASK) #define qlowPixelMask ((RGB_HI_BITS_MASK >> 3) | TWO_LOW_BITS_MASK) +#define highBitsMask (ALL_COLOR_MASK & RGB_REMOVE_LOW_BITS_MASK) #define colorMask (((~RGB_HI_BITS_MASK & ALL_COLOR_MASK) << 16) | (~RGB_HI_BITS_MASK & ALL_COLOR_MASK)) #endif @@ -204,6 +205,7 @@ bool8 S9xBlitFilterInit (void) #ifdef GFX_MULTI_FORMAT lowPixelMask = RGB_LOW_BITS_MASK; qlowPixelMask = (RGB_HI_BITS_MASK >> 3) | TWO_LOW_BITS_MASK; + highBitsMask = ALL_COLOR_MASK & RGB_REMOVE_LOW_BITS_MASK; colorMask = ((~RGB_HI_BITS_MASK & ALL_COLOR_MASK) << 16) | (~RGB_HI_BITS_MASK & ALL_COLOR_MASK); #endif @@ -252,7 +254,7 @@ void S9xBlitNTSCFilterSet (const snes_ntsc_setup_t *setup) snes_ntsc_init(ntsc, setup); } -void S9xBlitPixSmall16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixSimple1x1 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { width <<= 1; @@ -264,7 +266,41 @@ void S9xBlitPixSmall16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRo } } -void S9xBlitPixScaled16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixSimple1x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +{ + width <<= 1; + + for (; height; height--) + { + memcpy(dstPtr, srcPtr, width); + dstPtr += dstRowBytes; + memcpy(dstPtr, srcPtr, width); + srcPtr += srcRowBytes; + dstPtr += dstRowBytes; + } +} + +void S9xBlitPixSimple2x1 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +{ + for (; height; height--) + { + uint16 *dP = (uint16 *) dstPtr, *bP = (uint16 *) srcPtr; + + for (int i = 0; i < (width >> 1); i++) + { + *dP++ = *bP; + *dP++ = *bP++; + + *dP++ = *bP; + *dP++ = *bP++; + } + + srcPtr += srcRowBytes; + dstPtr += dstRowBytes; + } +} + +void S9xBlitPixSimple2x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { uint8 *dstPtr2 = dstPtr + dstRowBytes, *deltaPtr = XDelta; dstRowBytes <<= 1; @@ -313,30 +349,24 @@ void S9xBlitPixScaled16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstR } } -void S9xBlitPixHiRes16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) -{ - width <<= 1; - - for (; height; height--) - { - memcpy(dstPtr, srcPtr, width); - dstPtr += dstRowBytes; - memcpy(dstPtr, srcPtr, width); - srcPtr += srcRowBytes; - dstPtr += dstRowBytes; - } -} - -void S9xBlitPixDoubled16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixBlend1x1 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { for (; height; height--) { uint16 *dP = (uint16 *) dstPtr, *bP = (uint16 *) srcPtr; + uint16 prev, curr; - for (int i = 0; i < width; i++) + prev = *bP; + + for (int i = 0; i < (width >> 1); i++) { - *dP++ = *bP; - *dP++ = *bP++; + curr = *bP++; + *dP++ = (prev & curr) + (((prev ^ curr) & highBitsMask) >> 1); + prev = curr; + + curr = *bP++; + *dP++ = (prev & curr) + (((prev ^ curr) & highBitsMask) >> 1); + prev = curr; } srcPtr += srcRowBytes; @@ -344,7 +374,58 @@ void S9xBlitPixDoubled16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dst } } -void S9xBlitPixScaledTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixBlend2x1 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +{ + for (; height; height--) + { + uint16 *dP = (uint16 *) dstPtr, *bP = (uint16 *) srcPtr; + uint16 prev, curr; + + prev = *bP; + + for (int i = 0; i < (width >> 1); i++) + { + curr = *bP++; + *dP++ = (prev & curr) + (((prev ^ curr) & highBitsMask) >> 1); + *dP++ = curr; + prev = curr; + + curr = *bP++; + *dP++ = (prev & curr) + (((prev ^ curr) & highBitsMask) >> 1); + *dP++ = curr; + prev = curr; + } + + srcPtr += srcRowBytes; + dstPtr += dstRowBytes; + } +} + +void S9xBlitPixTV1x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +{ + uint8 *dstPtr2 = dstPtr + dstRowBytes; + dstRowBytes <<= 1; + + for (; height; height--) + { + uint32 *dP1 = (uint32 *) dstPtr, *dP2 = (uint32 *) dstPtr2, *bP = (uint32 *) srcPtr; + uint32 product, darkened; + + for (int i = 0; i < (width >> 1); i++) + { + product = *dP1++ = *bP++; + darkened = (product = (product >> 1) & colorMask); + darkened += (product = (product >> 1) & colorMask); + *dP2++ = darkened; + } + + srcPtr += srcRowBytes; + dstPtr += dstRowBytes; + dstPtr2 += dstRowBytes; + } +} + +void S9xBlitPixTV2x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { uint8 *dstPtr2 = dstPtr + dstRowBytes, *deltaPtr = XDelta; dstRowBytes <<= 1; @@ -455,31 +536,7 @@ void S9xBlitPixScaledTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int ds } } -void S9xBlitPixHiResTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) -{ - uint8 *dstPtr2 = dstPtr + dstRowBytes; - dstRowBytes <<= 1; - - for (; height; height--) - { - uint32 *dP1 = (uint32 *) dstPtr, *dP2 = (uint32 *) dstPtr2, *bP = (uint32 *) srcPtr; - uint32 product, darkened; - - for (int i = 0; i < (width >> 1); i++) - { - product = *dP1++ = *bP++; - darkened = (product = (product >> 1) & colorMask); - darkened += (product = (product >> 1) & colorMask); - *dP2++ = darkened; - } - - srcPtr += srcRowBytes; - dstPtr += dstRowBytes; - dstPtr2 += dstRowBytes; - } -} - -void S9xBlitPixHiResMixedTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixMixedTV1x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { uint8 *dstPtr2 = dstPtr + dstRowBytes, *srcPtr2 = srcPtr + srcRowBytes; dstRowBytes <<= 1; @@ -520,7 +577,7 @@ void S9xBlitPixHiResMixedTV16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, in } } -void S9xBlitPixSmooth16 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) +void S9xBlitPixSmooth2x2 (uint8 *srcPtr, int srcRowBytes, uint8 *dstPtr, int dstRowBytes, int width, int height) { uint8 *dstPtr2 = dstPtr + dstRowBytes, *deltaPtr = XDelta; uint32 lastLinePix[SNES_WIDTH << 1]; diff --git a/filter/blit.h b/filter/blit.h index 39cb3c9b..ebde40b1 100644 --- a/filter/blit.h +++ b/filter/blit.h @@ -189,14 +189,16 @@ void S9xBlitClearDelta (void); bool8 S9xBlitNTSCFilterInit (void); void S9xBlitNTSCFilterDeinit (void); void S9xBlitNTSCFilterSet (const snes_ntsc_setup_t *); -void S9xBlitPixSmall16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixScaled16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixHiRes16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixDoubled16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixScaledTV16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixHiResTV16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixHiResMixedTV16 (uint8 *, int, uint8 *, int, int, int); -void S9xBlitPixSmooth16 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixSimple1x1 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixSimple1x2 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixSimple2x1 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixSimple2x2 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixBlend1x1 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixBlend2x1 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixTV1x2 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixTV2x2 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixMixedTV1x2 (uint8 *, int, uint8 *, int, int, int); +void S9xBlitPixSmooth2x2 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixSuperEagle16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPix2xSaI16 (uint8 *, int, uint8 *, int, int, int); void S9xBlitPixSuper2xSaI16 (uint8 *, int, uint8 *, int, int, int); diff --git a/macosx/English.lproj/Snes9x.nib/info.nib b/macosx/English.lproj/Snes9x.nib/info.nib index 11dbf8ea..0e0eb7bd 100644 --- a/macosx/English.lproj/Snes9x.nib/info.nib +++ b/macosx/English.lproj/Snes9x.nib/info.nib @@ -5,7 +5,7 @@ IBFramework Version 823 IBLastKnownRelativeProjectPath - ../macpdate.xcodeproj + ../snes9x.xcodeproj IBOldestOS 6 IBOpenObjects diff --git a/macosx/English.lproj/Snes9x.nib/objects.xib b/macosx/English.lproj/Snes9x.nib/objects.xib index b89783e0..d4e9880e 100644 --- a/macosx/English.lproj/Snes9x.nib/objects.xib +++ b/macosx/English.lproj/Snes9x.nib/objects.xib @@ -2,321 +2,236 @@ - - - Core Image Filter... - TRUE - Ocif + + + osx_ + 806 + Saves the sizes and positions of the game window and dialogs so they come back to the same place. + Save Window Size and Position + 326 20 221 18 + 62 347 80 568 - - 4 : - 20 92 19 16 - 92 20 108 39 + + PRES + 1 + Preset #n + 130 456 95 13 + 456 130 469 225 - - Choose the behavior of Music Box: 'Sound Emulation Only' to only emulate the music system, and 'Whole Emulation' to also emulate the CPU. Music that depends on the CPU running will not sound right without 'Whole Emulation.' - Music Box : - 328 134 76 16 - 176 349 192 425 + + AEtx + 1 + TRUE + TRUE + 110 74 90 13 + 74 110 87 200 - - Client... - TRUE - Ncli - - - Sele - 1111 + + Star + 2 0 - 811 + 822 4 33024 - 123 74 28 28 - 280 494 308 522 + 159 74 28 28 + 122 200 150 228 - - PLNM - 3 - 56 92 122 16 - 92 56 108 178 + + #3 + TRUE + CPr3 - - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - Music Box - - 0 0 352 246 - - - Playing : - 20 22 61 16 - 22 20 38 81 - - - DONE - 2 - Done - 258 20 74 20 - 20 258 40 332 - - - Tr_i - Tr_i - 18 39 13 14 - 39 18 53 31 - - - Kart - ROMName - 83 22 167 16 - 22 83 38 250 - - - Pane - 36 70 250 130 - 70 36 200 286 - - - rCTL - 2 - 300 70 34 92 - - - Paus - Paus - 2 - 0 - 200 - -1 - 33024 - 2 3 30 20 - 73 302 93 332 - - - HEAD - FALSE - HEAD - 2 - 0 - 201 - -1 - 32768 - 2 29 30 20 - 99 302 119 332 - - - S_EF - S_EF - 2 - 0 - 202 - -1 - 32768 - 2 67 30 20 - 137 302 157 332 - - - 70 300 162 334 - - - bCTL - 2 - 21 208 280 25 - - - bar4 - 3 - bar4 - 0 - 4 - 256 - 62 6 12 12 - 214 83 226 95 - - - barc - 3 - barc - 0 - 4 - 256 - 192 6 12 12 - 214 213 226 225 - - - bar9 - 3 - bar9 - 0 - 1 - 256 - 150 6 12 12 - 214 171 226 183 - - - bar3 - 3 - bar3 - 0 - 3 - 256 - 48 6 12 12 - 214 69 226 81 - - - barb - 3 - barb - 0 - 3 - 256 - 178 6 12 12 - 214 199 226 211 - - - bar8 - 3 - bar8 - 0 - 8 - 256 - 118 6 12 12 - 214 139 226 151 - - - bare - 3 - bare - 0 - 6 - 256 - 220 6 12 12 - 214 241 226 253 - - - bar7 - 3 - bar7 - 0 - 7 - 256 - 104 6 12 12 - 214 125 226 137 - - - barf - 3 - barf - 0 - 7 - 256 - 234 6 12 12 - 214 255 226 267 - - - bar6 - 3 - bar6 - 0 - 6 - 256 - 90 6 12 12 - 214 111 226 123 - - - bar2 - 3 - bar2 - 0 - 2 - 256 - 34 6 12 12 - 214 55 226 67 - - - bar0 - 3 - bar0 - 0 - 8 - 256 - 248 6 12 12 - 214 269 226 281 - - - bar5 - 3 - bar5 - 0 - 5 - 256 - 76 6 12 12 - 214 97 226 109 - - - bar1 - 3 - bar1 - 0 - 1 - 256 - 20 6 12 12 - 214 41 226 53 - - - bard - 3 - bard - 0 - 5 - 256 - 206 6 12 12 - 214 227 226 239 - - - bara - 3 - bara - 0 - 2 - 256 - 164 6 12 12 - 214 185 226 197 - - - PILT - 132 - 1835623278 - 2117687422 - 132 4 16 16 - 212 153 228 169 - - - 208 21 233 301 - - - 0 0 246 352 - - 80 40 326 392 - 0 0 768 1024 + + TRUE + TRUE - - 3__A - 3__A + + 1 + Cheat Value : + -1 + 16 74 83 13 + 74 16 87 99 + + + 8__R + 8__R 0 - 907 + 1409 + 4 + TRUE + 32768 + 176 26 28 28 + 324 518 352 546 + + + RChk + 1 + 0 + 809 + 4 + 33024 + 180 30 28 28 + 78 221 106 249 + + + SHTa + 1 + SHTa + 1 + Add + 237 130 70 20 + 130 237 150 307 + + + 7__R + 7__R + 0 + 1309 + 4 + TRUE + 32768 + 176 26 28 28 + 324 196 352 224 + + + Slot A + 20 22 42 16 + 22 20 38 62 + + + 1 + Size (header) : + -1 + 20 167 128 13 + 167 20 180 148 + + + = + TRUE + + + 8Sel + 8Sel + 0 + 1411 + 4 + TRUE + 32768 + 119 70 28 28 + 368 461 396 489 + + + Slid + 1 + TRUE + 16 + 10 + 1 + 16 + 16 28 215 26 + 392 57 418 272 + + + barc + 3 + barc + 0 + 4 + 256 + 192 6 12 12 + 214 213 226 225 + + + 2__A + 2__A + 0 + 819 4 TRUE 32768 262 70 28 28 - 76 926 104 954 + 76 604 104 632 + + + 4 + TRUE + + + Justifier + TRUE + EIp7 + + + PANE + 1000 + 2 + + + RCTL + 108 + 1 + Players to Record : + 8 7 21 110 + + + RCTL + 109 + 1 + Comment : + 33 7 46 67 + + + RCTL + 107 + 1 + TRUE + TRUE + 33 77 46 422 + + + RCTL + 101 + 1 + 1 + 7 114 23 140 + + + RCTL + 102 + 1 + 2 + 7 152 23 178 + + + RCTL + 103 + 1 + 3 + 7 190 23 216 + + + RCTL + 104 + 1 + 4 + 7 228 23 254 + + + RCTL + 105 + 1 + 5 + 7 266 23 292 + + + RCTL + 106 + 1 + Reset + 7 358 23 406 + + + 0 0 57 433 CCTL @@ -353,439 +268,483 @@ 6 315 23 425 - - Down - 11 + + Up + 2 0 - 801 + 812 4 33024 - 46 104 28 28 - 152 417 180 445 + 46 44 28 28 + 92 87 120 115 - - YChk - 11 - 0 - 804 - 4 - 33024 - 206 74 28 28 - 122 577 150 605 - - - Popup: - - - Apple's Matrix Reverb - TRUE - Revb - - - Apple's Graphic Equalizer - TRUE - GrEQ - - - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - TRUE - FALSE - 11 - 53 - 7 - Add to Entry - - 0 0 328 168 - - - 1 - Address : - -1 - 16 20 83 13 - 20 16 33 99 + + Cheat + + Cheat + 132 + + + Apply Cheats + TRUE + Hapl - - AEad - 1 - address - 107 20 96 13 - 20 107 33 203 + + TRUE + TRUE - - AEtx - 1 - TRUE - TRUE - 110 74 90 13 - 74 110 87 200 + + Cheat Entry... + TRUE + Hent - - 1 - Current Value : - -1 - 16 47 83 13 - 47 16 60 99 - - - 1 - Cheat Value : - -1 - 16 74 83 13 - 74 16 87 99 - - - AEcv - 1 - current value - 107 47 96 13 - 47 107 60 203 - - - SHTa - 1 - SHTa - 1 - Add - 237 130 70 20 - 130 237 150 307 - - - SHTc - 1 - SHTc - 2 - Cancel - 157 130 70 20 - 130 157 150 227 - - - 1 - Description : - -1 - 16 101 83 13 - 101 16 114 99 - - - AEde - 1 - TRUE - TRUE - 110 101 195 13 - 101 110 114 305 + + Cheat Finder... + TRUE + Hfnd - 0 0 168 328 - 80 40 248 368 - 0 0 768 1024 - - SVIP - TRUE - TRUE - 97 23 172 16 - 23 97 39 269 + + 0 0 257 216 + + + BMrk + All frames are drawn without adjusting times. Make sure 'Synchronize' in 'Sound' tab in 'Preferences' dialog is turned off. + Benchmark Test + 18 20 133 18 + 20 18 38 151 + + + NoTR + GL_TEXTURE_2D is used even if GL_TEXTURE_RECTANGLE_EXT is available. + Don't Use Rectangle Texture + 34 104 203 18 + 104 34 122 237 + + + AGPT + Sets GL_TEXTURE_PRIORITY to 0.0. + AGP Texturing + 34 148 203 18 + 148 34 166 237 + + + Storage Hint : + 36 178 90 16 + 178 36 194 126 + + + CSAp + Sets GL_STORAGE_SHARED_APPLE to 1. + Client Stroage + 34 126 203 18 + 126 34 144 237 + + + Hint + Sets GL_TEXTURE_STORAGE_HINT_APPLE. + 2 + + Popup: + + + Private + TRUE + + + Cached + TRUE + + + Shared + TRUE + + + + 134 176 103 20 + 176 134 196 237 + + + OpenGL Settings : + 20 80 131 16 + 80 20 96 151 + + + 12 58 233 1 + 58 12 59 245 + + + 0 0 216 257 - - - msc2 - 604 - 10 - -1 - 173 221 20 16 - 263 194 279 214 + + The degree of curvature. + Warp : + -2 + 345 228 45 16 + 270 366 286 411 - - Left - 2222 - 0 - 814 - 4 - 33024 - 16 74 28 28 - 280 387 308 415 + + Defrost State + d + TRUE + Odfr - + 1 - Player 1 + Set whether automatic fire is enabled for each controller button. + Enable Automatic Fire FALSE - 20 6 302 140 + 20 6 310 148 - - 1_Lf - 1_Lf + + Left + 1 0 802 4 - TRUE - 32768 - 12 70 28 28 - 76 32 104 60 + 33024 + 16 74 28 28 + 122 57 150 85 - - 1_Up - 1_Up + + Up + 1 0 800 4 - TRUE - 32768 - 42 40 28 28 - 46 62 74 90 + 33024 + 46 44 28 28 + 92 87 120 115 - - 1_Dn - 1_Dn + + Down + 1 0 801 4 - TRUE - 32768 - 42 100 28 28 - 106 62 134 90 + 33024 + 46 104 28 28 + 152 87 180 115 - - 1_Rt - 1_Rt + + Righ + 1 0 803 4 - TRUE - 32768 - 72 70 28 28 - 76 92 104 120 + 33024 + 76 74 28 28 + 122 117 150 145 - - 1__A - 1__A + + AChk + 1 0 807 4 - TRUE - 32768 - 262 70 28 28 - 76 282 104 310 + 33024 + 266 74 28 28 + 122 307 150 335 - - 1__Y - 1__Y + + YChk + 1 0 804 4 - TRUE - 32768 - 202 70 28 28 - 76 222 104 250 + 33024 + 206 74 28 28 + 122 247 150 275 - - 1__B - 1__B + + BChk + 1 0 805 4 - TRUE - 32768 - 232 100 28 28 - 106 252 134 280 + 33024 + 236 104 28 28 + 152 277 180 305 - - 1Sel - 1Sel + + Sele + 1 0 811 4 - TRUE - 32768 - 119 70 28 28 - 76 139 104 167 + 33024 + 123 74 28 28 + 122 164 150 192 - - 1Srt - 1Srt + + Star + 1 0 810 4 - TRUE - 32768 - 155 70 28 28 - 76 175 104 203 + 33024 + 159 74 28 28 + 122 200 150 228 - - 1__X - 1__X + + XChk + 1 0 806 4 - TRUE - 32768 - 232 40 28 28 - 46 252 74 280 + 33024 + 236 44 28 28 + 92 277 120 305 - - 1__L - 1__L + + LChk + 1 0 808 4 - TRUE - 32768 - 98 26 28 28 - 32 118 60 146 - - - 1__R - 1__R - 0 - 809 - 4 - TRUE - 32768 - 176 26 28 28 - 32 196 60 224 + 33024 + 102 30 28 28 + 78 143 106 171 + - 6 20 146 322 + 48 41 196 351 - - 12 60 349 1 - 60 12 61 361 - - - 5_Up - 5_Up - 0 - 1100 - 4 - TRUE - 32768 - 42 40 28 28 - 192 384 220 412 - - - 4__A - 4__A - 0 - 1007 - 4 - TRUE - 32768 - 262 70 28 28 - 222 282 250 310 - - - 64 ms + + 140 ms TRUE - - 1 - Set the number of presses per second that an automatic fire button receives. - Automatic Fire Speed - FALSE - 20 322 310 70 - - - Slid - 1 - TRUE - 16 - 10 - 1 - 16 - 16 28 215 26 - 392 57 418 272 + + Up + 111 + 0 + 800 + 4 + 33024 + 46 44 28 28 + 250 87 278 115 + + + + Choose the behavior of Snes9x when it is in back of other applications. + When in Background : + 20 134 146 16 + 176 41 192 187 + + + 0 0 555 272 + + + BRSR + + 1 + 1 + 2 + 2 + + 40 + + + CHK_ + chbx + 327681 + 1 + 30 + 30 + + + ADDR + 327681 + 1 + 84 + 84 + Address + + + VALU + 327681 + 1 + 65 + 65 + Value + + + DESC + 327681 + 1 + 196 + 196 + -2 + Description + + + 1 + FALSE + FALSE + 17 + 20 20 396 232 + 20 20 252 416 - - Num_ - 1 - 1 - 10 - -1 - 242 35 19 13 - 399 283 412 302 + + NEW_ + NEW_ + + 1 + 2 + + New + 432 20 103 20 + 20 432 40 535 - - 1 - / sec - 265 35 29 13 - 399 306 412 335 + + DEL_ + DEL_ + + 1 + 2 + + Delete + 432 52 103 20 + 52 432 72 535 + + + ALL_ + ALL_ + + 1 + 2 + + Enable All + 432 92 103 20 + 92 432 112 535 - 364 41 434 351 + 0 0 272 555 - - 7_Lf - 7_Lf + + LChk + 22 0 - 1302 + 820 + 4 + 33024 + 102 30 28 28 + 78 473 106 501 + + + _Esc + _Esc + 0 + 837 4 TRUE 32768 - 12 70 28 28 - 368 32 396 60 + 262 63 28 28 + 361 926 389 954 + + + 1P : + 20 20 28 16 + 20 20 36 48 + + + 7_Rt + 7_Rt + 0 + 1303 + 4 + TRUE + 32768 + 72 70 28 28 + 368 92 396 120 + + + 1 + Cart Name : + -1 + 20 20 128 13 + 20 20 33 148 TRUE TRUE - - grap - 15 - 2 - 10 - 10000 - 135 226 144 22 - 268 156 290 300 - - - BChk - 222 - 0 - 817 - 4 - 33024 - 236 104 28 28 - 310 277 338 305 - - - grap - 3 - Toggles display of the frame rate on/off. - Show Frame Rate - 18 64 192 18 - 106 39 124 231 - - - 3 : - 20 68 19 16 - 68 20 84 39 - - - Code + + + QCTL + 103 1 - code - -2 - 156 41 186 13 - 41 156 54 342 + Compression... + 7 319 27 424 - - - Adjust this value if your Mac is slow. - Frame Skip : - 20 187 79 16 - 229 41 245 120 + + 0 0 292 132 + + + SVIP + TRUE + TRUE + 97 23 172 16 + 23 97 39 269 + + + NOT_ + NOT_ + 2 + Cancel + 110 92 70 20 + 92 110 112 180 + + + OK__ + OK__ + 1 + Connect + 192 92 80 20 + 92 192 112 272 + + + CLNM + TRUE + TRUE + 97 53 172 16 + 53 97 69 269 + + + Server IP : + -1 + 20 23 63 16 + 23 20 39 83 + + + Name : + -1 + 20 53 63 16 + 53 20 69 83 + + + CHAS + 18 98 16 16 + 98 18 114 34 + + + 0 0 132 292 - - - + + + Multi Taps (Both Ports) + TRUE + EIp6 + + + Smooth + TRUE + + + + FALSE FALSE FALSE @@ -794,66 +753,4013 @@ FALSE 1 7 - Keyboard Layout - - 0 0 593 251 - - - DFLT - DFLT - Defaults - 20 211 93 20 - 211 20 231 113 - - - 1 - Player 1 - 169 215 48 13 - 215 169 228 217 - - - 1 - Player 2 - 251 215 48 13 - 215 251 228 299 - - - Lgnd - 0.000000 - TRUE - 145 214 16 16 - 214 145 230 161 - - - Lgnd - 1 - 0.000000 - TRUE - 227 214 16 16 - 214 227 230 243 + Automatic Fire + + 0 0 723 472 + + + Ftab + 256 + 21 5 680 449 + + + Ftab + 257 + 2 + 0 37 680 412 + + + + 1 + Set whether pressing 'Alt' in conjunction with a controller button in-game toggles its automatic fire on/off. + Allow 'Alt' to Toggle Enable/Disable Automatic Fire + FALSE + 350 6 310 148 + + + Left + 11 + 0 + 802 + 4 + 33024 + 16 74 28 28 + 122 387 150 415 + + + Up + 11 + 0 + 800 + 4 + 33024 + 46 44 28 28 + 92 417 120 445 + + + Down + 11 + 0 + 801 + 4 + 33024 + 46 104 28 28 + 152 417 180 445 + + + Righ + 11 + 0 + 803 + 4 + 33024 + 76 74 28 28 + 122 447 150 475 + + + AChk + 11 + 0 + 807 + 4 + 33024 + 266 74 28 28 + 122 637 150 665 + + + YChk + 11 + 0 + 804 + 4 + 33024 + 206 74 28 28 + 122 577 150 605 + + + BChk + 11 + 0 + 805 + 4 + 33024 + 236 104 28 28 + 152 607 180 635 + + + Sele + 11 + 0 + 811 + 4 + 33024 + 123 74 28 28 + 122 494 150 522 + + + Star + 11 + 0 + 810 + 4 + 33024 + 159 74 28 28 + 122 530 150 558 + + + XChk + 11 + 0 + 806 + 4 + 33024 + 236 44 28 28 + 92 607 120 635 + + + LChk + 11 + 0 + 808 + 4 + 33024 + 102 30 28 28 + 78 473 106 501 + + + RChk + 11 + 0 + 809 + 4 + 33024 + 180 30 28 28 + 78 551 106 579 + + + 48 371 196 681 + + + 1 + Set whether, when automatic fire is enabled, 'TC' must also be held down to activate automatic fire. + Automatic Fire is Active Only While 'TC' is Pressed + FALSE + 20 164 310 148 + + + Left + 111 + 0 + 802 + 4 + 33024 + 16 74 28 28 + 280 57 308 85 + + + + Down + 111 + 0 + 801 + 4 + 33024 + 46 104 28 28 + 310 87 338 115 + + + Righ + 111 + 0 + 803 + 4 + 33024 + 76 74 28 28 + 280 117 308 145 + + + AChk + 111 + 0 + 807 + 4 + 33024 + 266 74 28 28 + 280 307 308 335 + + + YChk + 111 + 0 + 804 + 4 + 33024 + 206 74 28 28 + 280 247 308 275 + + + BChk + 111 + 0 + 805 + 4 + 33024 + 236 104 28 28 + 310 277 338 305 + + + Sele + 111 + 0 + 811 + 4 + 33024 + 123 74 28 28 + 280 164 308 192 + + + Star + 111 + 0 + 810 + 4 + 33024 + 159 74 28 28 + 280 200 308 228 + + + XChk + 111 + 0 + 806 + 4 + 33024 + 236 44 28 28 + 250 277 278 305 + + + LChk + 111 + 0 + 808 + 4 + 33024 + 102 30 28 28 + 236 143 264 171 + + + RChk + 111 + 0 + 809 + 4 + 33024 + 180 30 28 28 + 236 221 264 249 + + + 206 41 354 351 + + + 1 + Set whether a button's input is inverted - that is, Snes9x acts as though the button is pressed if and only if it is not pressed. + Button Input is Inverted + FALSE + 350 164 310 148 + + + Left + 1111 + 0 + 802 + 4 + 33024 + 16 74 28 28 + 280 387 308 415 + + + Up + 1111 + 0 + 800 + 4 + 33024 + 46 44 28 28 + 250 417 278 445 + + + Down + 1111 + 0 + 801 + 4 + 33024 + 46 104 28 28 + 310 417 338 445 + + + Righ + 1111 + 0 + 803 + 4 + 33024 + 76 74 28 28 + 280 447 308 475 + + + AChk + 1111 + 0 + 807 + 4 + 33024 + 266 74 28 28 + 280 637 308 665 + + + YChk + 1111 + 0 + 804 + 4 + 33024 + 206 74 28 28 + 280 577 308 605 + + + BChk + 1111 + 0 + 805 + 4 + 33024 + 236 104 28 28 + 310 607 338 635 + + + Sele + 1111 + 0 + 811 + 4 + 33024 + 123 74 28 28 + 280 494 308 522 + + + Star + 1111 + 0 + 810 + 4 + 33024 + 159 74 28 28 + 280 530 308 558 + + + XChk + 1111 + 0 + 806 + 4 + 33024 + 236 44 28 28 + 250 607 278 635 + + + LChk + 1111 + 0 + 808 + 4 + 33024 + 102 30 28 28 + 236 473 264 501 + + + RChk + 1111 + 0 + 809 + 4 + 33024 + 180 30 28 28 + 236 551 264 579 + + + 206 371 354 681 + + + 1 + Set the number of presses per second that an automatic fire button receives. + Automatic Fire Speed + FALSE + 20 322 310 70 + + + + Num_ + 1 + 1 + 10 + -1 + 242 35 19 13 + 399 283 412 302 + + + 1 + / sec + 265 35 29 13 + 399 306 412 335 + + + 364 41 434 351 + + + DEF1 + DEF1 + Restores the default settings. + Defaults + 579 372 81 20 + 414 600 434 681 + + + 42 21 454 701 + + + Ftab + 258 + 2 + 0 37 680 412 + + + 1 + Set whether pressing 'Alt' in conjunction with a controller button in-game toggles its automatic fire on/off. + Allow 'Alt' to Toggle Enable/Disable Automatic Fire + FALSE + 350 6 310 148 + + + Left + 22 + 0 + 814 + 4 + 33024 + 16 74 28 28 + 122 387 150 415 + + + Up + 22 + 0 + 812 + 4 + 33024 + 46 44 28 28 + 92 417 120 445 + + + Down + 22 + 0 + 813 + 4 + 33024 + 46 104 28 28 + 152 417 180 445 + + + Righ + 22 + 0 + 815 + 4 + 33024 + 76 74 28 28 + 122 447 150 475 + + + AChk + 22 + 0 + 819 + 4 + 33024 + 266 74 28 28 + 122 637 150 665 + + + YChk + 22 + 0 + 816 + 4 + 33024 + 206 74 28 28 + 122 577 150 605 + + + BChk + 22 + 0 + 817 + 4 + 33024 + 236 104 28 28 + 152 607 180 635 + + + Sele + 22 + 0 + 823 + 4 + 33024 + 123 74 28 28 + 122 494 150 522 + + + Star + 22 + 0 + 822 + 4 + 33024 + 159 74 28 28 + 122 530 150 558 + + + XChk + 22 + 0 + 818 + 4 + 33024 + 236 44 28 28 + 92 607 120 635 + + + + RChk + 22 + 0 + 821 + 4 + 33024 + 180 30 28 28 + 78 551 106 579 + + + 48 371 196 681 + + + 1 + Set whether automatic fire is enabled for each controller button. + Enable Automatic Fire + FALSE + 20 6 310 148 + + + Left + 2 + 0 + 814 + 4 + 33024 + 16 74 28 28 + 122 57 150 85 + + + + Down + 2 + 0 + 813 + 4 + 33024 + 46 104 28 28 + 152 87 180 115 + + + Righ + 2 + 0 + 815 + 4 + 33024 + 76 74 28 28 + 122 117 150 145 + + + AChk + 2 + 0 + 819 + 4 + 33024 + 266 74 28 28 + 122 307 150 335 + + + YChk + 2 + 0 + 816 + 4 + 33024 + 206 74 28 28 + 122 247 150 275 + + + BChk + 2 + 0 + 817 + 4 + 33024 + 236 104 28 28 + 152 277 180 305 + + + Sele + 2 + 0 + 823 + 4 + 33024 + 123 74 28 28 + 122 164 150 192 + + + + XChk + 2 + 0 + 818 + 4 + 33024 + 236 44 28 28 + 92 277 120 305 + + + LChk + 2 + 0 + 820 + 4 + 33024 + 102 30 28 28 + 78 143 106 171 + + + RChk + 2 + 0 + 821 + 4 + 33024 + 180 30 28 28 + 78 221 106 249 + + + 48 41 196 351 + + + 1 + Set whether, when automatic fire is enabled, 'TC' must also be held down to activate automatic fire. + Automatic Fire is Active Only While 'TC' is Pressed + FALSE + 20 164 310 148 + + + Left + 222 + 0 + 814 + 4 + 33024 + 16 74 28 28 + 280 57 308 85 + + + Up + 222 + 0 + 812 + 4 + 33024 + 46 44 28 28 + 250 87 278 115 + + + Down + 222 + 0 + 813 + 4 + 33024 + 46 104 28 28 + 310 87 338 115 + + + Righ + 222 + 0 + 815 + 4 + 33024 + 76 74 28 28 + 280 117 308 145 + + + AChk + 222 + 0 + 819 + 4 + 33024 + 266 74 28 28 + 280 307 308 335 + + + YChk + 222 + 0 + 816 + 4 + 33024 + 206 74 28 28 + 280 247 308 275 + + + BChk + 222 + 0 + 817 + 4 + 33024 + 236 104 28 28 + 310 277 338 305 + + + Sele + 222 + 0 + 823 + 4 + 33024 + 123 74 28 28 + 280 164 308 192 + + + Star + 222 + 0 + 822 + 4 + 33024 + 159 74 28 28 + 280 200 308 228 + + + XChk + 222 + 0 + 818 + 4 + 33024 + 236 44 28 28 + 250 277 278 305 + + + LChk + 222 + 0 + 820 + 4 + 33024 + 102 30 28 28 + 236 143 264 171 + + + RChk + 222 + 0 + 821 + 4 + 33024 + 180 30 28 28 + 236 221 264 249 + + + 206 41 354 351 + + + 1 + Set whether a button's input is inverted - that is, Snes9x acts as though the button is pressed if and only if it is not pressed. + Button Input is Inverted + FALSE + 350 164 310 148 + + + Left + 2222 + 0 + 814 + 4 + 33024 + 16 74 28 28 + 280 387 308 415 + + + Up + 2222 + 0 + 812 + 4 + 33024 + 46 44 28 28 + 250 417 278 445 + + + Down + 2222 + 0 + 813 + 4 + 33024 + 46 104 28 28 + 310 417 338 445 + + + Righ + 2222 + 0 + 815 + 4 + 33024 + 76 74 28 28 + 280 447 308 475 + + + AChk + 2222 + 0 + 819 + 4 + 33024 + 266 74 28 28 + 280 637 308 665 + + + YChk + 2222 + 0 + 816 + 4 + 33024 + 206 74 28 28 + 280 577 308 605 + + + BChk + 2222 + 0 + 817 + 4 + 33024 + 236 104 28 28 + 310 607 338 635 + + + Sele + 2222 + 0 + 823 + 4 + 33024 + 123 74 28 28 + 280 494 308 522 + + + Star + 2222 + 0 + 822 + 4 + 33024 + 159 74 28 28 + 280 530 308 558 + + + XChk + 2222 + 0 + 818 + 4 + 33024 + 236 44 28 28 + 250 607 278 635 + + + LChk + 2222 + 0 + 820 + 4 + 33024 + 102 30 28 28 + 236 473 264 501 + + + RChk + 2222 + 0 + 821 + 4 + 33024 + 180 30 28 28 + 236 551 264 579 + + + 206 371 354 681 + + + 1 + Set the number of presses per second that an automatic fire button receives. + Automatic Fire Speed + FALSE + 20 322 310 70 + + + Slid + 2 + TRUE + 16 + 10 + 1 + 16 + 16 28 215 26 + 392 57 418 272 + + + Num_ + 2 + 1 + 10 + -1 + 242 35 19 13 + 399 283 412 302 + + + 1 + / sec + 265 35 29 13 + 399 306 412 335 + + + 364 41 434 351 + + + DEF2 + DEF2 + Restores the default settings. + Defaults + 579 372 81 20 + 414 600 434 681 + + + 42 21 454 701 + + + 5 21 454 701 + + + contentResID + 0 + tabEnabled + 1 + tabName + Player 1 + userPane + + + + contentResID + 0 + tabEnabled + 1 + tabName + Player 2 + userPane + + + - 0 0 251 593 + 0 0 472 723 - 80 40 331 633 + 80 40 552 763 0 0 768 1024 - - 5P : - 20 116 28 16 - 116 20 132 48 + + Enab + Enab + Enable this Effect + 73 18 91 154 - - 3_Rt - 3_Rt - 0 - 903 - 4 - TRUE - 32768 - 72 70 28 28 - 76 736 104 764 + + Too short length will cause crackling noise. + Mix Buffer Length : + -1 + 275 81 130 16 + 123 296 139 426 + + + AEcv + 1 + current value + 107 47 96 13 + 47 107 60 203 + + + + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + Configure Controllers + + 0 0 986 491 + + + 1 + Player 1 + FALSE + 20 6 302 140 + + + 1_Lf + 1_Lf + 0 + 802 + 4 + TRUE + 32768 + 12 70 28 28 + 76 32 104 60 + + + 1_Up + 1_Up + 0 + 800 + 4 + TRUE + 32768 + 42 40 28 28 + 46 62 74 90 + + + 1_Dn + 1_Dn + 0 + 801 + 4 + TRUE + 32768 + 42 100 28 28 + 106 62 134 90 + + + 1_Rt + 1_Rt + 0 + 803 + 4 + TRUE + 32768 + 72 70 28 28 + 76 92 104 120 + + + 1__A + 1__A + 0 + 807 + 4 + TRUE + 32768 + 262 70 28 28 + 76 282 104 310 + + + 1__Y + 1__Y + 0 + 804 + 4 + TRUE + 32768 + 202 70 28 28 + 76 222 104 250 + + + 1__B + 1__B + 0 + 805 + 4 + TRUE + 32768 + 232 100 28 28 + 106 252 134 280 + + + 1Sel + 1Sel + 0 + 811 + 4 + TRUE + 32768 + 119 70 28 28 + 76 139 104 167 + + + 1Srt + 1Srt + 0 + 810 + 4 + TRUE + 32768 + 155 70 28 28 + 76 175 104 203 + + + 1__X + 1__X + 0 + 806 + 4 + TRUE + 32768 + 232 40 28 28 + 46 252 74 280 + + + 1__L + 1__L + 0 + 808 + 4 + TRUE + 32768 + 98 26 28 28 + 32 118 60 146 + + + 1__R + 1__R + 0 + 809 + 4 + TRUE + 32768 + 176 26 28 28 + 32 196 60 224 + + + 6 20 146 322 + + + 1 + Player 2 + FALSE + 342 6 302 140 + + + 2_Lf + 2_Lf + 0 + 814 + 4 + TRUE + 32768 + 12 70 28 28 + 76 354 104 382 + + + 2_Up + 2_Up + 0 + 812 + 4 + TRUE + 32768 + 42 40 28 28 + 46 384 74 412 + + + 2_Dn + 2_Dn + 0 + 813 + 4 + TRUE + 32768 + 42 100 28 28 + 106 384 134 412 + + + 2_Rt + 2_Rt + 0 + 815 + 4 + TRUE + 32768 + 72 70 28 28 + 76 414 104 442 + + + + 2__Y + 2__Y + 0 + 816 + 4 + TRUE + 32768 + 202 70 28 28 + 76 544 104 572 + + + 2__B + 2__B + 0 + 817 + 4 + TRUE + 32768 + 232 100 28 28 + 106 574 134 602 + + + 2Sel + 2Sel + 0 + 823 + 4 + TRUE + 32768 + 119 70 28 28 + 76 461 104 489 + + + 2Srt + 2Srt + 0 + 822 + 4 + TRUE + 32768 + 155 70 28 28 + 76 497 104 525 + + + 2__X + 2__X + 0 + 818 + 4 + TRUE + 32768 + 232 40 28 28 + 46 574 74 602 + + + 2__L + 2__L + 0 + 820 + 4 + TRUE + 32768 + 98 26 28 28 + 32 440 60 468 + + + 2__R + 2__R + 0 + 821 + 4 + TRUE + 32768 + 176 26 28 28 + 32 518 60 546 + + + 6 342 146 644 + + + 1 + Player 3 + FALSE + 664 6 302 140 + + + 3_Lf + 3_Lf + 0 + 902 + 4 + TRUE + 32768 + 12 70 28 28 + 76 676 104 704 + + + 3_Up + 3_Up + 0 + 900 + 4 + TRUE + 32768 + 42 40 28 28 + 46 706 74 734 + + + 3_Dn + 3_Dn + 0 + 901 + 4 + TRUE + 32768 + 42 100 28 28 + 106 706 134 734 + + + 3_Rt + 3_Rt + 0 + 903 + 4 + TRUE + 32768 + 72 70 28 28 + 76 736 104 764 + + + 3__A + 3__A + 0 + 907 + 4 + TRUE + 32768 + 262 70 28 28 + 76 926 104 954 + + + 3__Y + 3__Y + 0 + 904 + 4 + TRUE + 32768 + 202 70 28 28 + 76 866 104 894 + + + 3__B + 3__B + 0 + 905 + 4 + TRUE + 32768 + 232 100 28 28 + 106 896 134 924 + + + 3Sel + 3Sel + 0 + 911 + 4 + TRUE + 32768 + 119 70 28 28 + 76 783 104 811 + + + 3Srt + 3Srt + 0 + 910 + 4 + TRUE + 32768 + 155 70 28 28 + 76 819 104 847 + + + 3__X + 3__X + 0 + 906 + 4 + TRUE + 32768 + 232 40 28 28 + 46 896 74 924 + + + 3__L + 3__L + 0 + 908 + 4 + TRUE + 32768 + 98 26 28 28 + 32 762 60 790 + + + 3__R + 3__R + 0 + 909 + 4 + TRUE + 32768 + 176 26 28 28 + 32 840 60 868 + + + 6 664 146 966 + + + 1 + Player 4 + FALSE + 20 152 302 140 + + + 4_Lf + 4_Lf + 0 + 1002 + 4 + TRUE + 32768 + 12 70 28 28 + 222 32 250 60 + + + 4_Up + 4_Up + 0 + 1000 + 4 + TRUE + 32768 + 42 40 28 28 + 192 62 220 90 + + + 4_Dn + 4_Dn + 0 + 1001 + 4 + TRUE + 32768 + 42 100 28 28 + 252 62 280 90 + + + 4_Rt + 4_Rt + 0 + 1003 + 4 + TRUE + 32768 + 72 70 28 28 + 222 92 250 120 + + + 4__A + 4__A + 0 + 1007 + 4 + TRUE + 32768 + 262 70 28 28 + 222 282 250 310 + + + 4__Y + 4__Y + 0 + 1004 + 4 + TRUE + 32768 + 202 70 28 28 + 222 222 250 250 + + + 4__B + 4__B + 0 + 1005 + 4 + TRUE + 32768 + 232 100 28 28 + 252 252 280 280 + + + 4Sel + 4Sel + 0 + 1011 + 4 + TRUE + 32768 + 119 70 28 28 + 222 139 250 167 + + + 4Srt + 4Srt + 0 + 1010 + 4 + TRUE + 32768 + 155 70 28 28 + 222 175 250 203 + + + 4__X + 4__X + 0 + 1006 + 4 + TRUE + 32768 + 232 40 28 28 + 192 252 220 280 + + + 4__L + 4__L + 0 + 1008 + 4 + TRUE + 32768 + 98 26 28 28 + 178 118 206 146 + + + 4__R + 4__R + 0 + 1009 + 4 + TRUE + 32768 + 176 26 28 28 + 178 196 206 224 + + + 152 20 292 322 + + + 1 + Player 5 + FALSE + 342 152 302 140 + + + 5_Lf + 5_Lf + 0 + 1102 + 4 + TRUE + 32768 + 12 70 28 28 + 222 354 250 382 + + + 5_Up + 5_Up + 0 + 1100 + 4 + TRUE + 32768 + 42 40 28 28 + 192 384 220 412 + + + 5_Dn + 5_Dn + 0 + 1101 + 4 + TRUE + 32768 + 42 100 28 28 + 252 384 280 412 + + + 5_Rt + 5_Rt + 0 + 1103 + 4 + TRUE + 32768 + 72 70 28 28 + 222 414 250 442 + + + 5__A + 5__A + 0 + 1107 + 4 + TRUE + 32768 + 262 70 28 28 + 222 604 250 632 + + + 5__Y + 5__Y + 0 + 1104 + 4 + TRUE + 32768 + 202 70 28 28 + 222 544 250 572 + + + 5__B + 5__B + 0 + 1105 + 4 + TRUE + 32768 + 232 100 28 28 + 252 574 280 602 + + + 5Sel + 5Sel + 0 + 1111 + 4 + TRUE + 32768 + 119 70 28 28 + 222 461 250 489 + + + 5Srt + 5Srt + 0 + 1110 + 4 + TRUE + 32768 + 155 70 28 28 + 222 497 250 525 + + + 5__X + 5__X + 0 + 1106 + 4 + TRUE + 32768 + 232 40 28 28 + 192 574 220 602 + + + 5__L + 5__L + 0 + 1108 + 4 + TRUE + 32768 + 98 26 28 28 + 178 440 206 468 + + + 5__R + 5__R + 0 + 1109 + 4 + TRUE + 32768 + 176 26 28 28 + 178 518 206 546 + + + 152 342 292 644 + + + 1 + Common + FALSE + 664 298 302 140 + + + _DeF + _DeF + 0 + 826 + 4 + TRUE + 32768 + 48 63 28 28 + 361 712 389 740 + + + ScoT + ScoT + 0 + 829 + 4 + TRUE + 32768 + 190 100 28 28 + 398 854 426 882 + + + __FF + __FF + 0 + 824 + 4 + TRUE + 32768 + 190 26 28 28 + 324 854 352 882 + + + MouR + MouR + 0 + 851 + 4 + TRUE + 32768 + 48 100 28 28 + 398 712 426 740 + + + ScoC + ScoC + 0 + 831 + 4 + TRUE + 32768 + 262 100 28 28 + 398 926 426 954 + + + _SPC + _SPC + 0 + 828 + 4 + TRUE + 32768 + 190 63 28 28 + 361 854 389 882 + + + ScoP + ScoP + 0 + 830 + 4 + TRUE + 32768 + 226 100 28 28 + 398 890 426 918 + + + _Snp + _Snp + 0 + 827 + 4 + TRUE + 32768 + 226 63 28 28 + 361 890 389 918 + + + + MouL + MouL + 0 + 850 + 4 + TRUE + 32768 + 12 100 28 28 + 398 676 426 704 + + + _Frz + _Frz + 0 + 825 + 4 + TRUE + 32768 + 12 63 28 28 + 361 676 389 704 + + + Ofsc + Ofsc + 0 + 832 + 4 + TRUE + 32768 + 154 100 28 28 + 398 818 426 846 + + + __Fn + __Fn + 0 + 833 + 4 + TRUE + 32768 + 12 26 28 28 + 324 676 352 704 + + + _Alt + _Alt + 0 + 834 + 4 + TRUE + 32768 + 48 26 28 28 + 324 712 352 740 + + + __TC + __TC + 0 + 838 + 4 + TRUE + 32768 + 84 26 28 28 + 324 748 352 776 + + + FFUp + FFUp + 0 + 836 + 4 + TRUE + 32768 + 262 26 28 28 + 324 926 352 954 + + + FFDn + FFDn + 0 + 835 + 4 + TRUE + 32768 + 226 26 28 28 + 324 890 352 918 + + + 298 664 438 966 + + + CLRa + 1 + CLRa + Clear All + 21 453 85 20 + 453 21 473 106 + + + + 1 + Player 6 + FALSE + 664 152 302 140 + + + 6_Lf + 6_Lf + 0 + 1202 + 4 + TRUE + 32768 + 12 70 28 28 + 222 676 250 704 + + + 6_Up + 6_Up + 0 + 1200 + 4 + TRUE + 32768 + 42 40 28 28 + 192 706 220 734 + + + 6_Dn + 6_Dn + 0 + 1201 + 4 + TRUE + 32768 + 42 100 28 28 + 252 706 280 734 + + + 6_Rt + 6_Rt + 0 + 1203 + 4 + TRUE + 32768 + 72 70 28 28 + 222 736 250 764 + + + 6__A + 6__A + 0 + 1207 + 4 + TRUE + 32768 + 262 70 28 28 + 222 926 250 954 + + + 6__Y + 6__Y + 0 + 1204 + 4 + TRUE + 32768 + 202 70 28 28 + 222 866 250 894 + + + 6__B + 6__B + 0 + 1205 + 4 + TRUE + 32768 + 232 100 28 28 + 252 896 280 924 + + + 6Sel + 6Sel + 0 + 1211 + 4 + TRUE + 32768 + 119 70 28 28 + 222 783 250 811 + + + 6Srt + 6Srt + 0 + 1210 + 4 + TRUE + 32768 + 155 70 28 28 + 222 819 250 847 + + + 6__X + 6__X + 0 + 1206 + 4 + TRUE + 32768 + 232 40 28 28 + 192 896 220 924 + + + 6__L + 6__L + 0 + 1208 + 4 + TRUE + 32768 + 98 26 28 28 + 178 762 206 790 + + + 6__R + 6__R + 0 + 1209 + 4 + TRUE + 32768 + 176 26 28 28 + 178 840 206 868 + + + 152 664 292 966 + + + 1 + Player 7 + FALSE + 20 298 302 140 + + + 7_Lf + 7_Lf + 0 + 1302 + 4 + TRUE + 32768 + 12 70 28 28 + 368 32 396 60 + + + 7_Up + 7_Up + 0 + 1300 + 4 + TRUE + 32768 + 42 40 28 28 + 338 62 366 90 + + + 7_Dn + 7_Dn + 0 + 1301 + 4 + TRUE + 32768 + 42 100 28 28 + 398 62 426 90 + + + + 7__A + 7__A + 0 + 1307 + 4 + TRUE + 32768 + 262 70 28 28 + 368 282 396 310 + + + 7__Y + 7__Y + 0 + 1304 + 4 + TRUE + 32768 + 202 70 28 28 + 368 222 396 250 + + + 7__B + 7__B + 0 + 1305 + 4 + TRUE + 32768 + 232 100 28 28 + 398 252 426 280 + + + 7Sel + 7Sel + 0 + 1311 + 4 + TRUE + 32768 + 119 70 28 28 + 368 139 396 167 + + + 7Srt + 7Srt + 0 + 1310 + 4 + TRUE + 32768 + 155 70 28 28 + 368 175 396 203 + + + 7__X + 7__X + 0 + 1306 + 4 + TRUE + 32768 + 232 40 28 28 + 338 252 366 280 + + + 7__L + 7__L + 0 + 1308 + 4 + TRUE + 32768 + 98 26 28 28 + 324 118 352 146 + + + + 298 20 438 322 + + + 1 + Player 8 + FALSE + 342 298 302 140 + + + 8_Lf + 8_Lf + 0 + 1402 + 4 + TRUE + 32768 + 12 70 28 28 + 368 354 396 382 + + + 8_Up + 8_Up + 0 + 1400 + 4 + TRUE + 32768 + 42 40 28 28 + 338 384 366 412 + + + 8_Dn + 8_Dn + 0 + 1401 + 4 + TRUE + 32768 + 42 100 28 28 + 398 384 426 412 + + + 8_Rt + 8_Rt + 0 + 1403 + 4 + TRUE + 32768 + 72 70 28 28 + 368 414 396 442 + + + 8__A + 8__A + 0 + 1407 + 4 + TRUE + 32768 + 262 70 28 28 + 368 604 396 632 + + + 8__Y + 8__Y + 0 + 1404 + 4 + TRUE + 32768 + 202 70 28 28 + 368 544 396 572 + + + 8__B + 8__B + 0 + 1405 + 4 + TRUE + 32768 + 232 100 28 28 + 398 574 426 602 + + + + 8Srt + 8Srt + 0 + 1410 + 4 + TRUE + 32768 + 155 70 28 28 + 368 497 396 525 + + + 8__X + 8__X + 0 + 1406 + 4 + TRUE + 32768 + 232 40 28 28 + 338 574 366 602 + + + 8__L + 8__L + 0 + 1408 + 4 + TRUE + 32768 + 98 26 28 28 + 324 440 352 468 + + + + 298 342 438 644 + + + 0 0 491 986 + + 80 40 571 1026 + 0 0 768 1024 + + + + + 0 0 352 246 + + + Playing : + 20 22 61 16 + 22 20 38 81 + + + DONE + 2 + Done + 258 20 74 20 + 20 258 40 332 + + + Tr_i + Tr_i + 18 39 13 14 + 39 18 53 31 + + + Kart + ROMName + 83 22 167 16 + 22 83 38 250 + + + Pane + 36 70 250 130 + 70 36 200 286 + + + rCTL + 2 + 300 70 34 92 + + + Paus + Paus + 2 + 0 + 200 + -1 + 33024 + 2 3 30 20 + 73 302 93 332 + + + HEAD + FALSE + HEAD + 2 + 0 + 201 + -1 + 32768 + 2 29 30 20 + 99 302 119 332 + + + S_EF + S_EF + 2 + 0 + 202 + -1 + 32768 + 2 67 30 20 + 137 302 157 332 + + + 70 300 162 334 + + + bCTL + 2 + 21 208 280 25 + + + bar4 + 3 + bar4 + 0 + 4 + 256 + 62 6 12 12 + 214 83 226 95 + + + + bar9 + 3 + bar9 + 0 + 1 + 256 + 150 6 12 12 + 214 171 226 183 + + + bar3 + 3 + bar3 + 0 + 3 + 256 + 48 6 12 12 + 214 69 226 81 + + + barb + 3 + barb + 0 + 3 + 256 + 178 6 12 12 + 214 199 226 211 + + + bar8 + 3 + bar8 + 0 + 8 + 256 + 118 6 12 12 + 214 139 226 151 + + + bare + 3 + bare + 0 + 6 + 256 + 220 6 12 12 + 214 241 226 253 + + + bar7 + 3 + bar7 + 0 + 7 + 256 + 104 6 12 12 + 214 125 226 137 + + + barf + 3 + barf + 0 + 7 + 256 + 234 6 12 12 + 214 255 226 267 + + + bar6 + 3 + bar6 + 0 + 6 + 256 + 90 6 12 12 + 214 111 226 123 + + + bar2 + 3 + bar2 + 0 + 2 + 256 + 34 6 12 12 + 214 55 226 67 + + + bar0 + 3 + bar0 + 0 + 8 + 256 + 248 6 12 12 + 214 269 226 281 + + + bar5 + 3 + bar5 + 0 + 5 + 256 + 76 6 12 12 + 214 97 226 109 + + + bar1 + 3 + bar1 + 0 + 1 + 256 + 20 6 12 12 + 214 41 226 53 + + + bard + 3 + bard + 0 + 5 + 256 + 206 6 12 12 + 214 227 226 239 + + + bara + 3 + bara + 0 + 2 + 256 + 164 6 12 12 + 214 185 226 197 + + + PILT + 132 + 1835623278 + 2117687422 + 132 4 16 16 + 212 153 228 169 + + + 208 21 233 301 + + + 0 0 246 352 + + + PCTL + 101 + 1 + Read Only + 7 7 23 80 + + + + + + + snd_ + 206 + 5 + + Popup: + + + 20 ms + TRUE + + + 40 ms + TRUE + + + 60 ms + TRUE + + + 80 ms + TRUE + + + 100 ms + TRUE + + + 120 ms + TRUE + + + + 160 ms + TRUE + + + 180 ms + TRUE + + + 200 ms + TRUE + + + + 415 79 127 20 + 121 436 141 563 + + + 5 : + 20 116 19 16 + 116 20 132 39 + + + + 0 0 605 371 + + + tabs + 128 + 21 5 562 346 + + + tabs + 129 + 2 + 0 37 562 309 + + + grap + 2 + Toggles between scaling full screen graphics to the current screen resolution or changing the screen resolution to fit Snes9x's needs. + Switch Monitor Resolution + 18 42 192 18 + 84 39 102 231 + + + grap + 1 + Toggles full screen/windowed mode. Press esc key to hide full screen window and pause the game. + Full Screen Mode + 18 20 192 18 + 62 39 80 231 + + + grap + 3 + Toggles display of the frame rate on/off. + Show Frame Rate + 18 64 192 18 + 106 39 124 231 + + + grap + 5 + Toggles transparency effects on/off. Transparency effect is used in almost all games so this option is just for hack. + Transparency Effects + 18 86 192 18 + 128 39 146 231 + + + grap + 6 + Uses 16,777,216 colors. + Use 32 Bit Color + 326 183 193 18 + 225 347 243 540 + + + grap + 7 + G__7 + Stretches the image to fill the screen in full screen mode. + Stretch Image in Full Screen Mode + 18 205 241 18 + 247 39 265 280 + + + OpenGL Option : + 20 155 111 16 + 197 41 213 152 + + + grap + 9 + 3 + + Popup: + + + Blocky + TRUE + + + TV + TRUE + + + + Blend + TRUE + + + Super Eagle + TRUE + + + 2xSaI + TRUE + + + Super 2xSaI + TRUE + + + EPX + TRUE + + + hq2x + TRUE + + + hq3x + TRUE + + + hq4x + TRUE + + + NTSC Composite + TRUE + + + NTSC S-Video + TRUE + + + NTSC RGB + TRUE + + + NTSC Monochrome + TRUE + + + NTSC+TV Composite + TRUE + + + NTSC+TV S-Video + TRUE + + + NTSC+TV RGB + TRUE + + + NTSC+TV Monochrome + TRUE + + + + 327 19 215 20 + 61 348 81 563 + + + Choose the image scaling filter which is applied to the raw SNES image. + Video Mode : + -1 + 228 21 89 16 + 63 249 79 338 + + + grap + 11 + Synchronizes the render timing to the monitor's vertical refresh rate. + Sync to Vertical Blank + 18 183 241 18 + 225 39 243 280 + + + grap + 10 + When this option is on, the rendering process is separated from the emulation thread (except blocky and smooth modes). + Multitask + 326 64 193 18 + 106 347 124 540 + + + grap + 12 + Keeps the screen height always 239/478, for some games that change screen height frequently. + Keep Overscanned Height + 326 86 193 18 + 128 347 146 540 + + + grap + 13 + G_13 + Adds a warp effect like a CRT-based television. + Use Screen Curvature + 326 205 193 18 + 247 347 265 540 + + + grap + 14 + 2 + 10 + 397 226 144 22 + 268 418 290 562 + + + + 12 131 538 4 + 173 33 177 571 + + + grap + 15 + 2 + 10 + 10000 + 135 226 144 22 + 268 156 290 300 + + + grap + 16 + The aspect ratio of above option: the left is proportional and the right is full width of the monitor. + Aspect Ratio : + 38 228 88 16 + 270 59 286 147 + + + grap + 8 + G_FL + Choose the Core Image filter. + Filter... + 460 160 82 20 + 202 481 222 563 + + + grap + 4 + Applies additional Core Image effect after the image filter is applied. + Use Core Image + 326 161 120 18 + 203 347 221 467 + + + 42 21 351 583 + + + tabs + 130 + 2 + 0 37 562 309 + + + snd_ + 203 + S__3 + Enables stereo sound instead of mono. + Stereo + 18 80 152 18 + 122 39 140 191 + + + snd_ + 204 + Swaps the left and right stereo channels. + Reverse Stereo + 34 102 136 18 + 144 55 162 191 + + + snd_ + 202 + Enables 16-bit playback instead of 8-bit. + 16 Bit Playback + 18 58 152 18 + 100 39 118 191 + + + snd_ + 201 + Tries and ensures all available samples are buffered so there are no overruns. + Synchronize + 18 20 152 18 + 62 39 80 191 + + + snd_ + 210 + Safer from crackling noise, but time-lag becomes more noticeable. + Allow Lag + 414 109 85 18 + 151 435 169 520 + + + snd_ + 205 + 4 + + Popup: + + + 48000 Hz + TRUE + + + 44100 Hz + TRUE + + + 35000 Hz + TRUE + + + 32000 Hz + TRUE + + + 30000 Hz + TRUE + + + 22050 Hz + TRUE + + + 16000 Hz + TRUE + + + 11025 Hz + TRUE + + + 8000 Hz + TRUE + + + + 415 19 127 20 + 61 436 81 563 + + + + snd_ + 211 + 6 + + Popup: + + + 8 ms + TRUE + + + 16 ms + TRUE + + + 32 ms + TRUE + + + 64 ms + TRUE + + + TRUE + TRUE + + + System + TRUE + + + + 415 49 127 20 + 91 436 111 563 + + + The real SNES is 32000 Hz. Any values other than 32000 Hz will cause resampling. + Playback Rate : + -1 + 275 21 130 16 + 63 296 79 426 + + + Make sure this value is smaller than the mix buffer length. + Output Interval : + -1 + 275 51 130 16 + 93 296 109 426 + + + + snd_ + 207 + 2 + 80 + 322 140 219 22 + 182 343 204 562 + + + snd_ + 208 + TRUE + 10 + 2 + 32000 + 31000 + 33000 + 322 170 219 22 + 212 343 234 562 + + + Volume of the whole Snes9x sounds. + Volume : + -1 + 226 142 85 16 + 184 247 200 332 + + + 1 + Hz + -1 + 526 192 16 16 + 234 547 250 563 + + + Adjusts the sound rate through resampling. For every Input Rate samples generated by the SNES, Playback Rate samples will be produced. + Input Rate : + -1 + 226 172 85 16 + 214 247 230 332 + + + snd_ + 209 + 1 + 32000 + -1 + 465 192 59 16 + 234 486 250 545 + + + S_EF + S_EF + Opens 'Sound Effect' dialog. + Effect... + 20 140 100 20 + 182 41 202 141 + + + 42 21 351 583 + + + tabs + 131 + 2 + 0 37 562 309 + + + othe + 401 + 3 + + Popup: + + + Snes9x Folder + TRUE + + + ROM Folder + TRUE + + + Application Support Folder + TRUE + + + TRUE + TRUE + + + None Selected + TRUE + TRUE + + + TRUE + TRUE + + + Other... + TRUE + F_FL + + + + 201 19 222 20 + 61 222 81 444 + + + othe + 402 + TRUE + TRUE + 205 62 73 16 + 104 226 120 299 + + + Choose the folder where Snes9x will look for files. + Save Data in : + -1 + 79 21 112 16 + 63 100 79 212 + + + sec after Modified + -1 + 289 62 116 16 + 104 310 120 426 + + + Updates SRAM file when SRAM contents are modified. This may cause frequent disk access. + Auto Save SRAM : + -1 + 79 62 112 16 + 104 100 120 212 + + + 1 + (0 : Disable) + -1 + 414 64 69 16 + 106 435 122 504 + + + 42 21 351 583 + + + tabs + 132 + 2 + 0 37 562 309 + + + Changes HDMA timing and will 'fix' some games' glitches, but breaks many other games. The default value is 100. + HDMA Timing Hack : + 20 59 133 16 + 101 41 117 174 + + + msc2 + 601 + TRUE + TRUE + 164 59 74 16 + 101 185 117 259 + + + Note : These Hacks Need to Reopen ROM Image to Achieve Effects. + 20 21 456 16 + 63 41 79 497 + + + msc2 + 603 + Turb + 3 + 1 + 15 + 201 219 13 22 + 261 222 283 235 + + + The speed when turbo mode is on. Modify in-game with Fn+T, Fn+Y. + Speed in Turbo Mode : + 20 221 145 16 + 263 41 279 186 + + + msc2 + 604 + 10 + -1 + 173 221 20 16 + 263 194 279 214 + + + 12 158 538 1 + 200 33 201 571 + + + msc2 + 605 + + Popup + + + Auto + TRUE + + + TRUE + TRUE + + + 0 + TRUE + + + 1 + TRUE + + + 2 + TRUE + + + 3 + TRUE + + + 4 + TRUE + + + + 107 185 107 20 + 227 128 247 235 + + + Adjust this value if your Mac is slow. + Frame Skip : + 20 187 79 16 + 229 41 245 120 + + + msc2 + 606 + Allows to write to VRAM outside blank periods. + Allow Invalid VRAM Access + 18 89 223 18 + 131 39 149 262 + + + msc2 + 607 + Applies special hacks for games that can't be emulated correctly. + Apply Specific Game Hacks + 18 111 223 18 + 153 39 171 262 + + + 42 21 351 583 + + + tabs + 133 + 2 + 0 37 562 309 + + + osx_ + 801 + Choose whether open dialog should be shown when Snes9x is launched. + Open Choose ROM Image Dialog at Startup + 18 64 302 18 + 106 39 124 341 + + + osx_ + 802 + Shows time stamps on thumbnails in freeze/defrost screen. + Show Dates and Times in Freese State Selection Screen + 18 86 374 18 + 128 39 146 413 + + + Choose the behavior of Music Box: 'Sound Emulation Only' to only emulate the music system, and 'Whole Emulation' to also emulate the CPU. Music that depends on the CPU running will not sound right without 'Whole Emulation.' + Music Box : + 328 134 76 16 + 176 349 192 425 + + + osx_ + 803 + + + Sound Emulation Only + + + Whole Emulation + + + 326 158 177 39 + 200 347 239 524 + + + osx_ + 804 + Sets 'Turbo' button as a toggle switch. + Toggle Turbo Button + 18 20 207 18 + 62 39 80 246 + + + osx_ + 807 + When this option is on, Snes9x automatically loads the .ips or .ups file and patch the ROM image. + Use IPS / UPS Patch + 326 42 221 18 + 84 347 102 568 + + + osx_ + 808 + Shows messages from Snes9x on the game screen. When off, messages are put in the standard console. + Show Onscreen Information + 18 42 207 18 + 84 39 102 246 + + + osx_ + 809 + 3 + + + Keep on Emulation, Receive All Inputs + + + Keep on Emulation, Reject Any Inputs + + + Pause and Exit from Emulation Loop + + + 18 158 266 59 + 200 39 259 305 + + + + + osx_ + 805 + When this option is on, BS-X ROM is loaded first, then you launch BS games from the menu in BS-X. + Boot Up BS Games from BS-X + 326 64 221 18 + 106 347 124 568 + + + 42 21 351 583 + + + 5 21 351 583 + + + contentResID + 0 + tabEnabled + 1 + tabName + Graphics + userPane + + + + contentResID + 0 + tabEnabled + 1 + tabName + Sound + userPane + + + + contentResID + 0 + tabEnabled + 1 + tabName + File + userPane + + + + contentResID + 0 + tabEnabled + 1 + tabName + Accuracy + userPane + + + + contentResID + 0 + tabEnabled + 1 + tabName + Others + userPane + + + + + + 0 0 371 605 + + + + + + 1 + Value Size : + 11 22 68 16 + 22 253 38 321 + + + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + Connect to Server + + 80 40 212 332 + 0 0 768 1024 + + + + + BRes + 1 + BRes + Restore List + 34 57 152 20 + 403 276 423 428 + + + + TRUE + TRUE + + + 0 0 593 251 + + + DFLT + DFLT + Defaults + 20 211 93 20 + 211 20 231 113 + + + 1 + Player 1 + 169 215 48 13 + 215 169 228 217 + + + 1 + Player 2 + 251 215 48 13 + 215 251 228 299 + + + Lgnd + 0.000000 + TRUE + 145 214 16 16 + 214 145 230 161 + + + Lgnd + 1 + 0.000000 + TRUE + 227 214 16 16 + 214 227 230 243 + + + 0 0 251 593 + + + + 1 + Map : + -1 + 20 83 128 13 + 83 20 96 148 + + + + RSto + 1 + RSto + Stored Value + 11 140 86 15 + 140 253 155 339 + + + + + Outp + 1 + output + -2 + 156 272 186 13 + 272 156 285 342 + + + + + Auto Detect + TRUE + + + + + Cle1 + Cle1 + Clear + 507 60 70 20 + 60 507 80 577 + + + + CCTL + 103 + 1 + + Popup: + + + Auto Detect + TRUE + + + + Force PAL + TRUE + + + Force NTSC + TRUE + + + + 31 94 48 204 + + + + + + + 1 + Checksum (header) : + -1 + 20 230 128 13 + 230 20 243 148 + + + CCTL + 107 + 1 + Video System : + -1 + 33 6 46 87 + + + + + Edit + 130 + + + Undo + z + TRUE + undo + + + Redo + Z + TRUE + redo + + + TRUE + TRUE + + + Cut + x + TRUE + cut + + + Copy + c + TRUE + copy + + + Paste + v + TRUE + past + + + Delete + TRUE + clea + + + Select All + a + TRUE + sall + + + + + + + Mode + 1 + Mode + 3 + 3 + + + Hexadecimal + + + Signed Decimal + + + Unsigned Decimal + + + 11 45 117 62 + 45 253 107 370 + + + + + + BAdd + 1 + BAdd + Add to Cheat Entry... + 34 7 152 20 + 353 276 373 428 + + + Multi Tap + TRUE + EIp5 + + + + + + + Configure Controllers... + TRUE + Cpad + + + Snes9x + + _NSAppleMenu + Snes9x + 128 + + + About Snes9x + TRUE + 0 + abou + + + + + + + + + Client... + TRUE + Ncli + + + + + + UI_T + + 1 + 2 + + 2 + 242 0 207 329 + + + Drwr + Drwr + 0 + 3 + Screen + 256 + 127 300 60 18 + 300 369 318 429 + + + BWat + BWat + 0 + 3 + Watch + 512 + 127 268 60 18 + 268 369 286 429 + + + BSea + 1 + BSea + 1 + Search + 109 204 77 20 + 204 351 224 428 + + + + Math + 1 + Math + + Popup: + + + + ≠ + TRUE + + + > + TRUE + + + ≥ + TRUE + + + < + TRUE + + + ≤ + TRUE + + + + 108 115 79 17 + 115 350 132 429 + + + 1 + Address : + 11 270 53 14 + 270 253 284 306 + + + CTxt + 1 + TRUE + TRUE + 111 177 73 13 + 177 353 190 426 + + + BSto + 1 + BSto + Store Current Values + 34 229 152 20 + 229 276 249 428 + + + WTxt + 1 + 000000 + 64 270 48 14 + 270 306 284 354 + + + 1 + Comparison : + 11 117 87 16 + 117 253 133 340 + + + + RThs + 1 + RThs + This Value : + 11 176 81 15 + 176 253 191 334 + + + RLst + 1 + RLst + Last Value + 11 158 73 15 + 158 253 173 326 + + + + Size + 1 + Size + + Popup: + + + 1 Byte + TRUE + + + 2 Bytes + TRUE + + + 3 Bytes + TRUE + + + 4 Bytes + TRUE + + + + 108 20 79 17 + 20 350 37 429 + + + 0 242 329 449 + + + + + Pict + + 1 + 1 + 2 + 2 + + 0 0 512 478 + 0 0 478 512 + + + + + + + + + 0 0 328 168 + + + 1 + Address : + -1 + 16 20 83 13 + 20 16 33 99 + + + AEad + 1 + address + 107 20 96 13 + 20 107 33 203 + + + + 1 + Current Value : + -1 + 16 47 83 13 + 47 16 60 99 + + + + + + SHTc + 1 + SHTc + 2 + Cancel + 157 130 70 20 + 130 157 150 227 + + + 1 + Description : + -1 + 16 101 83 13 + 101 16 114 99 + + + AEde + 1 + TRUE + TRUE + 110 101 195 13 + 101 110 114 305 + + + 0 0 168 328 + + + + ComH + 1 + complement written in header + -2 + 156 251 186 13 + 251 156 264 342 + + + Freeze State + f + TRUE + Ofrz + + + + + PLNM + 3 + 56 92 122 16 + 92 56 108 178 + + + + QCTL + 101 + 1 + Double Size + 9 7 25 90 + + + + + + + + + FALSE FALSE @@ -872,279 +4778,118 @@ 80 40 340 316 0 0 768 1024 - + + + + + + Arrange in Front + TRUE + TRUE + 1572864 + frnt + + + + + + FALSE FALSE - TRUE - TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE FALSE + TRUE 1 7 - Cheat Finder - - 0 0 449 441 - - - Pane - - 1 - 1 - 2 - 2 - - 2 - 20 20 213 401 - 20 20 421 233 - - - UI_T - - 1 - 2 - - 2 - 242 0 207 329 - - - Drwr - Drwr - 0 - 3 - Screen - 256 - 127 300 60 18 - 300 369 318 429 - - - BWat - BWat - 0 - 3 - Watch - 512 - 127 268 60 18 - 268 369 286 429 - - - BSea - 1 - BSea - 1 - Search - 109 204 77 20 - 204 351 224 428 - - - Mode - 1 - Mode - 3 - 3 - - - Hexadecimal - - - Signed Decimal - - - Unsigned Decimal - - - 11 45 117 62 - 45 253 107 370 - - - Math - 1 - Math - - Popup: - - - = - TRUE - - - ≠ - TRUE - - - > - TRUE - - - ≥ - TRUE - - - < - TRUE - - - ≤ - TRUE - - - - 108 115 79 17 - 115 350 132 429 - - - 1 - Address : - 11 270 53 14 - 270 253 284 306 - - - CTxt - 1 - TRUE - TRUE - 111 177 73 13 - 177 353 190 426 - - - BSto - 1 - BSto - Store Current Values - 34 229 152 20 - 229 276 249 428 - - - WTxt - 1 - 000000 - 64 270 48 14 - 270 306 284 354 - - - 1 - Comparison : - 11 117 87 16 - 117 253 133 340 - - - RSto - 1 - RSto - Stored Value - 11 140 86 15 - 140 253 155 339 - - - RThs - 1 - RThs - This Value : - 11 176 81 15 - 176 253 191 334 - - - RLst - 1 - RLst - Last Value - 11 158 73 15 - 158 253 173 326 - - - 1 - Value Size : - 11 22 68 16 - 22 253 38 321 - - - Size - 1 - Size - - Popup: - - - 1 Byte - TRUE - - - 2 Bytes - TRUE - - - 3 Bytes - TRUE - - - 4 Bytes - TRUE - - - - 108 20 79 17 - 20 350 37 429 - - - 0 242 329 449 - - - UI_B - - 2 - 2 - - 2 - 242 346 207 95 - - - BAdd - 1 - BAdd - Add to Cheat Entry... - 34 7 152 20 - 353 276 373 428 - - - BRem - 1 - BRem - Remove from List - 34 32 152 20 - 378 276 398 428 - - - BRes - 1 - BRes - Restore List - 34 57 152 20 - 403 276 423 428 - - - 346 242 441 449 - + RecordSMVControl + + + - 0 0 441 449 + 0 0 55 433 - 80 40 521 489 + 80 40 135 473 0 0 768 1024 - - - 3__L - 3__L - 0 - 908 - 4 - TRUE - 32768 - 98 26 28 28 - 32 762 60 790 + + + + + 5P : + 20 116 28 16 + 116 20 132 48 - - Name - 3 - 219 92 118 16 - 92 219 108 337 + + + TRUE + TRUE + + FALSE + FALSE + TRUE + TRUE + TRUE + FALSE + -1 + 1 + Game Window + + 0 0 512 478 + + + + 0 0 478 512 + + 80 40 558 552 + 0 0 768 1024 + + + + 1 + Type : + -1 + 20 125 128 13 + 125 20 138 148 + + + + + + + Chse + 18 158 16 16 + 158 18 174 34 + + + + Super Scope + TRUE + EIp4 + + + + + + + Pnum + 2 + 52 68 26 16 + 68 52 84 78 + + + Record Movie... + TRUE + MVrc + + + + + QCTL 102 @@ -1152,37 +4897,178 @@ Overscan 9 99 25 168 - - - BChk - 1 - 0 - 805 - 4 - 33024 - 236 104 28 28 - 152 277 180 305 + + + Config + + Config + 134 + + + Configure Keyboard... + TRUE + Ckey + + + + TRUE + TRUE + + + Automatic Fire... + TRUE + Caut + + + TRUE + TRUE + + + Controllers Preset + TRUE + + Controllers Preset + 201 + + + #1 + TRUE + CPr1 + + + #2 + TRUE + CPr2 + + + + #4 + TRUE + CPr4 + + + #5 + TRUE + CPr5 + + + + + + - - DEF2 - DEF2 - Restores the default settings. - Defaults - 579 372 81 20 - 414 600 434 681 + + Emulation + + Emulation + 131 + + + Run + r + TRUE + Erun + + + TRUE + TRUE + + + Software Reset + TRUE + Esrs + + + Hardware Reset + TRUE + Erst + + + TRUE + TRUE + + + Input Device + TRUE + + Input Device + 202 + + + Pad + TRUE + EIp1 + + + Mouse (Port 1) + TRUE + EIp2 + + + Mouse (Port 2) + TRUE + EIp3 + + + + + + + Justifiers (Two Players) + TRUE + EIp8 + + + + + + - - 8__X - 8__X - 0 - 1406 - 4 - TRUE - 32768 - 232 40 28 28 - 338 574 366 602 + + Name + 3 + 219 92 118 16 + 92 219 108 337 - + + + + Lice + 1 + licensee + -2 + 156 314 186 13 + 314 156 327 342 + + + + Stat + 2 + 345 68 72 16 + 68 345 84 417 + + + + + 1 + Licensee : + -1 + 20 314 128 13 + 314 20 327 148 + + + Freeze State to... + F + TRUE + 1179648 + Ofrd + + + + + + + FALSE FALSE FALSE @@ -1191,1165 +5077,579 @@ FALSE 1 7 - Preferences - - 0 0 605 371 - - - tabs - 128 - 21 5 562 346 - - - tabs - 129 - 2 - 0 37 562 309 - - - grap - 2 - Toggles between scaling full screen graphics to the current screen resolution or changing the screen resolution to fit Snes9x's needs. - Switch Monitor Resolution - 18 42 192 18 - 84 39 102 231 - - - grap - 1 - Toggles full screen/windowed mode. Press esc key to hide full screen window and pause the game. - Full Screen Mode - 18 20 192 18 - 62 39 80 231 - - - - grap - 5 - Toggles transparency effects on/off. Transparency effect is used in almost all games so this option is just for hack. - Transparency Effects - 18 86 192 18 - 128 39 146 231 - - - grap - 6 - Uses 16,777,216 colors. - Use 32 Bit Color - 326 183 193 18 - 225 347 243 540 - - - grap - 7 - G__7 - Stretches the image to fill the screen in full screen mode. - Stretch Image in Full Screen Mode - 18 205 241 18 - 247 39 265 280 - - - OpenGL Option : - 20 155 111 16 - 197 41 213 152 - - - grap - 9 - 3 - - Popup: - - - Blocky - TRUE - - - TV - TRUE - - - Smooth - TRUE - - - Super Eagle - TRUE - - - 2xSaI - TRUE - - - Super 2xSaI - TRUE - - - EPX - TRUE - - - hq2x - TRUE - - - hq3x - TRUE - - - hq4x - TRUE - - - NTSC Composite - TRUE - - - NTSC S-Video - TRUE - - - NTSC RGB - TRUE - - - NTSC Monochrome - TRUE - - - NTSC+TV Composite - TRUE - - - NTSC+TV S-Video - TRUE - - - NTSC+TV RGB - TRUE - - - NTSC+TV Monochrome - TRUE - - - - 327 19 215 20 - 61 348 81 563 - - - Choose the image scaling filter which is applied to the raw SNES image. - Video Mode : - -1 - 228 21 89 16 - 63 249 79 338 - - - grap - 11 - Synchronizes the render timing to the monitor's vertical refresh rate. - Sync to Vertical Blank - 18 183 241 18 - 225 39 243 280 - - - grap - 10 - When this option is on, the rendering process is separated from the emulation thread (except blocky and smooth modes). - Multitask - 326 64 193 18 - 106 347 124 540 - - - grap - 12 - Keeps the screen height always 239/478, for some games that change screen height frequently. - Keep Overscanned Height - 326 86 193 18 - 128 347 146 540 - - - grap - 13 - G_13 - Adds a warp effect like a CRT-based television. - Use Screen Curvature - 326 205 193 18 - 247 347 265 540 - - - grap - 14 - 2 - 10 - 397 226 144 22 - 268 418 290 562 - - - The degree of curvature. - Warp : - -2 - 345 228 45 16 - 270 366 286 411 - - - 12 131 538 4 - 173 33 177 571 - - - - grap - 16 - The aspect ratio of above option: the left is proportional and the right is full width of the monitor. - Aspect Ratio : - 38 228 88 16 - 270 59 286 147 - - - grap - 8 - G_FL - Choose the Core Image filter. - Filter... - 460 160 82 20 - 202 481 222 563 - - - grap - 4 - Applies additional Core Image effect after the image filter is applied. - Use Core Image - 326 161 120 18 - 203 347 221 467 - - - 42 21 351 583 - - - tabs - 130 - 2 - 0 37 562 309 - - - snd_ - 203 - S__3 - Enables stereo sound instead of mono. - Stereo - 18 80 152 18 - 122 39 140 191 - - - snd_ - 204 - Swaps the left and right stereo channels. - Reverse Stereo - 34 102 136 18 - 144 55 162 191 - - - snd_ - 202 - Enables 16-bit playback instead of 8-bit. - 16 Bit Playback - 18 58 152 18 - 100 39 118 191 - - - snd_ - 201 - Tries and ensures all available samples are buffered so there are no overruns. - Synchronize - 18 20 152 18 - 62 39 80 191 - - - snd_ - 210 - Safer from crackling noise, but time-lag becomes more noticeable. - Allow Lag - 414 109 85 18 - 151 435 169 520 - - - snd_ - 205 - 4 - - Popup: - - - 48000 Hz - TRUE - - - 44100 Hz - TRUE - - - 35000 Hz - TRUE - - - 32000 Hz - TRUE - - - 30000 Hz - TRUE - - - 22050 Hz - TRUE - - - 16000 Hz - TRUE - - - 11025 Hz - TRUE - - - 8000 Hz - TRUE - - - - 415 19 127 20 - 61 436 81 563 - - - snd_ - 206 - 5 - - Popup: - - - 20 ms - TRUE - - - 40 ms - TRUE - - - 60 ms - TRUE - - - 80 ms - TRUE - - - 100 ms - TRUE - - - 120 ms - TRUE - - - 140 ms - TRUE - - - 160 ms - TRUE - - - 180 ms - TRUE - - - 200 ms - TRUE - - - - 415 79 127 20 - 121 436 141 563 - - - snd_ - 211 - 6 - - Popup: - - - 8 ms - TRUE - - - 16 ms - TRUE - - - 32 ms - TRUE - - - - TRUE - TRUE - - - System - TRUE - - - - 415 49 127 20 - 91 436 111 563 - - - The real SNES is 32000 Hz. Any values other than 32000 Hz will cause resampling. - Playback Rate : - -1 - 275 21 130 16 - 63 296 79 426 - - - Make sure this value is smaller than the mix buffer length. - Output Interval : - -1 - 275 51 130 16 - 93 296 109 426 - - - Too short length will cause crackling noise. - Mix Buffer Length : - -1 - 275 81 130 16 - 123 296 139 426 - - - snd_ - 207 - 2 - 80 - 322 140 219 22 - 182 343 204 562 - - - snd_ - 208 - TRUE - 10 - 2 - 32000 - 31000 - 33000 - 322 170 219 22 - 212 343 234 562 - - - Volume of the whole Snes9x sounds. - Volume : - -1 - 226 142 85 16 - 184 247 200 332 - - - 1 - Hz - -1 - 526 192 16 16 - 234 547 250 563 - - - Adjusts the sound rate through resampling. For every Input Rate samples generated by the SNES, Playback Rate samples will be produced. - Input Rate : - -1 - 226 172 85 16 - 214 247 230 332 - - - snd_ - 209 - 1 - 32000 - -1 - 465 192 59 16 - 234 486 250 545 - - - S_EF - S_EF - Opens 'Sound Effect' dialog. - Effect... - 20 140 100 20 - 182 41 202 141 - - - 42 21 351 583 - - - tabs - 131 - 2 - 0 37 562 309 - - - othe - 401 - 3 - - Popup: - - - Snes9x Folder - TRUE - - - ROM Folder - TRUE - - - Application Support Folder - TRUE - - - TRUE - TRUE - - - None Selected - TRUE - TRUE - - - TRUE - TRUE - - - Other... - TRUE - F_FL - - - - 201 19 222 20 - 61 222 81 444 - - - othe - 402 - TRUE - TRUE - 205 62 73 16 - 104 226 120 299 - - - Choose the folder where Snes9x will look for files. - Save Data in : - -1 - 79 21 112 16 - 63 100 79 212 - - - sec after Modified - -1 - 289 62 116 16 - 104 310 120 426 - - - Updates SRAM file when SRAM contents are modified. This may cause frequent disk access. - Auto Save SRAM : - -1 - 79 62 112 16 - 104 100 120 212 - - - 1 - (0 : Disable) - -1 - 414 64 69 16 - 106 435 122 504 - - - 42 21 351 583 - - - tabs - 132 - 2 - 0 37 562 309 - - - Changes HDMA timing and will 'fix' some games' glitches, but breaks many other games. The default value is 100. - HDMA Timing Hack : - 20 59 133 16 - 101 41 117 174 - - - msc2 - 601 - TRUE - TRUE - 164 59 74 16 - 101 185 117 259 - - - Note : These Hacks Need to Reopen ROM Image to Achieve Effects. - 20 21 456 16 - 63 41 79 497 - - - msc2 - 603 - Turb - 3 - 1 - 15 - 201 219 13 22 - 261 222 283 235 - - - The speed when turbo mode is on. Modify in-game with Fn+T, Fn+Y. - Speed in Turbo Mode : - 20 221 145 16 - 263 41 279 186 - - - - 12 158 538 1 - 200 33 201 571 - - - msc2 - 605 - - Popup - - - Auto - TRUE - - - TRUE - TRUE - - - 0 - TRUE - - - 1 - TRUE - - - 2 - TRUE - - - 3 - TRUE - - - 4 - TRUE - - - - 107 185 107 20 - 227 128 247 235 - - - - msc2 - 606 - Allows to write to VRAM outside blank periods. - Allow Invalid VRAM Access - 18 89 223 18 - 131 39 149 262 - - - msc2 - 607 - Applies special hacks for games that can't be emulated correctly. - Apply Specific Game Hacks - 18 111 223 18 - 153 39 171 262 - - - 42 21 351 583 - - - tabs - 133 - 2 - 0 37 562 309 - - - osx_ - 801 - Choose whether open dialog should be shown when Snes9x is launched. - Open Choose ROM Image Dialog at Startup - 18 64 302 18 - 106 39 124 341 - - - osx_ - 802 - Shows time stamps on thumbnails in freeze/defrost screen. - Show Dates and Times in Freese State Selection Screen - 18 86 374 18 - 128 39 146 413 - - - - osx_ - 803 - - - Sound Emulation Only - - - Whole Emulation - - - 326 158 177 39 - 200 347 239 524 - - - osx_ - 804 - Sets 'Turbo' button as a toggle switch. - Toggle Turbo Button - 18 20 207 18 - 62 39 80 246 - - - osx_ - 807 - When this option is on, Snes9x automatically loads the .ips or .ups file and patch the ROM image. - Use IPS / UPS Patch - 326 42 221 18 - 84 347 102 568 - - - osx_ - 808 - Shows messages from Snes9x on the game screen. When off, messages are put in the standard console. - Show Onscreen Information - 18 42 207 18 - 84 39 102 246 - - - osx_ - 809 - 3 - - - Keep on Emulation, Receive All Inputs - - - Keep on Emulation, Reject Any Inputs - - - Pause and Exit from Emulation Loop - - - 18 158 266 59 - 200 39 259 305 - - - Choose the behavior of Snes9x when it is in back of other applications. - When in Background : - 20 134 146 16 - 176 41 192 187 - - - osx_ - 806 - Saves the sizes and positions of the game window and dialogs so they come back to the same place. - Save Window Size and Position - 326 20 221 18 - 62 347 80 568 - - - osx_ - 805 - When this option is on, BS-X ROM is loaded first, then you launch BS games from the menu in BS-X. - Boot Up BS Games from BS-X - 326 64 221 18 - 106 347 124 568 - - - 42 21 351 583 - - - 5 21 351 583 - - - contentResID - 0 - tabEnabled - 1 - tabName - Graphics - userPane - - - - contentResID - 0 - tabEnabled - 1 - tabName - Sound - userPane - - - - contentResID - 0 - tabEnabled - 1 - tabName - File - userPane - - - - contentResID - 0 - tabEnabled - 1 - tabName - Accuracy - userPane - - - - contentResID - 0 - tabEnabled - 1 - tabName - Others - userPane - - - + Core Image Filter Setting + + 0 0 373 81 + + + Filter : + 20 22 44 16 + 22 20 38 64 + + + 12 60 349 1 + 60 12 61 361 - 0 0 371 605 + 0 0 81 373 - 80 39 451 644 + 80 40 161 413 0 0 768 1024 - - - Pad + + + 1 + Revision : + -1 + 20 293 128 13 + 293 20 306 148 + + + + CRC + 1 + crc32 + -2 + 156 356 186 13 + 356 156 369 342 + + + 0 0 437 192 + + + IP__ + 86 20 118 16 + 20 86 36 204 + + + 1 : + 20 20 19 16 + 20 20 36 39 + + + 2 : + 20 44 19 16 + 44 20 60 39 + + + 3 : + 20 68 19 16 + 68 20 84 39 + + + 4 : + 20 92 19 16 + 92 20 108 39 + + + + IP__ + 1 + 86 44 118 16 + 44 86 60 204 + + + IP__ + 2 + 86 68 118 16 + 68 86 84 204 + + + IP__ + 3 + 86 92 118 16 + 92 86 108 204 + + + IP__ + 4 + 86 116 118 16 + 116 86 132 204 + + + Stat + 345 20 72 16 + 20 345 36 417 + + + Stat + 1 + 345 44 72 16 + 44 345 60 417 + + + + Stat + 3 + 345 92 72 16 + 92 345 108 417 + + + Stat + 4 + 345 116 72 16 + 116 345 132 417 + + + Name + 219 20 118 16 + 20 219 36 337 + + + Name + 1 + 219 44 118 16 + 44 219 60 337 + + + Name + 2 + 219 68 118 16 + 68 219 84 337 + + + + Name + 4 + 219 116 118 16 + 116 219 132 337 + + + OKAY + OKAY + 1 + Play + 347 152 70 20 + 152 347 172 417 + + + CNSL + CNSL + 2 + Cancel + 265 152 70 20 + 152 265 172 335 + + + Pnum + 52 20 26 16 + 20 52 36 78 + + + Pnum + 1 + 52 44 26 16 + 44 52 60 78 + + + + Pnum + 3 + 52 92 26 16 + 92 52 108 78 + + + Pnum + 4 + 52 116 26 16 + 116 52 132 78 + + + + 0 0 192 437 + + + Core Image Filter... TRUE - EIp1 + Ocif - - ScoT - ScoT - 0 - 829 - 4 - TRUE - 32768 - 190 100 28 28 - 398 854 426 882 - - - - AGPT - Sets GL_TEXTURE_PRIORITY to 0.0. - AGP Texturing - 34 148 203 18 - 148 34 166 237 - - - - - File - - File - 129 - - - Open ROM Image... - o + + + Epop + + Popup: + + + Apple's Matrix Reverb TRUE - open + Revb - - Open Multiple ROM Images... - O + + Apple's Graphic Equalizer TRUE - 1179648 - Mult - - - Open Recent - TRUE - Frec - - - TRUE - TRUE - - - Close - w - TRUE - clos - - - TRUE - TRUE - - - ROM Information - i - TRUE - Finf + GrEQ + 20 234 40 447 - - - 4_Up - 4_Up - 0 - 1000 - 4 - TRUE - 32768 - 42 40 28 28 - 192 62 220 90 + + LINE + 60 12 61 455 + + + + + + + + 3 + TRUE + + + + SizC + 1 + calculated rom size + -2 + 156 146 186 13 + 146 156 159 342 + + + + + 0 0 308 242 + + + 3 + COPY + © Copyright 1996-2011 Snes9x developers Snes9x is a Super Nintendo Entertainment System emulator that allows you to play most games designed for the SNES on your PC. Please visit http://www.snes9x.com/ for up-to-the-minute information and help on Snes9x. Nintendo is a trade mark. + 1 + 20 134 268 88 + 134 20 222 288 + + + 132 + 1095782476 + 2117687422 + 122 12 64 64 + 12 122 76 186 + + + VERS + 1 + versionstr + 1 + 51 110 206 16 + 110 51 126 257 + + + NAME + Snes9x + 1 + 62 85 184 18 + 85 62 103 246 + + + 0 0 242 308 + + + + TRUE + TRUE + + + + + Window + + _NSWindowsMenu + Window + + + Minimize + m + TRUE + TRUE + mini + + + Minimize All + m + TRUE + TRUE + 1572864 + mina + + + Zoom + TRUE + zoom + + + + Bring All to Front + TRUE + TRUE + bfrt + + + + + + + + UI_B + + 2 + 2 + + 2 + 242 346 207 95 + + + + BRem + 1 + BRem + Remove from List + 34 32 152 20 + 378 276 398 428 + + + + 346 242 441 449 + + + + + + + + + + + + Clip + 1 + Clip + Copy to Clipboard + 204 384 137 20 + 384 204 404 341 + + + + + + 2P : + 20 44 28 16 + 44 20 60 48 + + + + + + CCTL + 105 + 1 + Memory Type : + -1 + 8 6 21 87 + + + + + + + MPan + 4098 + 85 19 309 22 + + + MNAM + Cart A name + 8 3 290 16 + 22 93 38 383 + + + 19 85 41 394 + + + + TRUE + TRUE + + + Defrost State from... + D + TRUE + 1179648 + Odfd + + + + + + + + + : + 70 62 7 16 + 62 70 78 77 + + + QCTL + 104 + 1 + + Popup: + + + 0 + TRUE + + + 1 + TRUE + + + 2 + TRUE + + + + + 5 + TRUE + + + + 8 258 25 302 + + + + + + Cle0 + Cle0 + Clear + 507 20 70 20 + 20 507 40 577 + + + + + + + + + 1 + SRAM Size : + -1 + 20 188 128 13 + 188 20 201 148 + + + + + + + + + + + + + + + + + PCTL + 102 + 1 + Export to QuickTime Movie at a Time + 7 102 23 319 + + + + + + + + + + + + SWAP + SWAP + Swap + 20 110 70 20 + 110 20 130 90 + + + + + + + + + + + + + + + + + + + _NSMainMenu S9xMenu - - Snes9x - - _NSAppleMenu - Snes9x - 128 - - - About Snes9x + + + File + + File + 129 + + + Open ROM Image... + o TRUE - 0 - abou + open + + + Open Multiple ROM Images... + O + TRUE + 1179648 + Mult + + + Open Recent + TRUE + Frec + + + TRUE + TRUE + + + Close + w + TRUE + clos + + + + ROM Information + i + TRUE + Finf - Edit - - Edit - 130 - - - Undo - z - TRUE - undo - - - Redo - Z - TRUE - redo - - - TRUE - TRUE - - - Cut - x - TRUE - cut - - - Copy - c - TRUE - copy - - - Paste - v - TRUE - past - - - Delete - TRUE - clea - - - Select All - a - TRUE - sall - - - - - - Emulation - - Emulation - 131 - - - Run - r - TRUE - Erun - - - TRUE - TRUE - - - Software Reset - TRUE - Esrs - - - Hardware Reset - TRUE - Erst - - - TRUE - TRUE - - - Input Device - TRUE - - Input Device - 202 - - - - Mouse (Port 1) - TRUE - EIp2 - - - Mouse (Port 2) - TRUE - EIp3 - - - Super Scope - TRUE - EIp4 - - - Multi Tap - TRUE - EIp5 - - - Multi Taps (Both Ports) - TRUE - EIp6 - - - Justifier - TRUE - EIp7 - - - Justifiers (Two Players) - TRUE - EIp8 - - - - - - - - - Config - - Config - 134 - - - Configure Keyboard... - TRUE - Ckey - - - Configure Controllers... - TRUE - Cpad - - - TRUE - TRUE - - - Automatic Fire... - TRUE - Caut - - - TRUE - TRUE - - - Controllers Preset - TRUE - - Controllers Preset - 201 - - - #1 - TRUE - CPr1 - - - #2 - TRUE - CPr2 - - - #3 - TRUE - CPr3 - - - #4 - TRUE - CPr4 - - - #5 - TRUE - CPr5 - - - - - - + + + Netplay @@ -2365,79 +5665,23 @@ - - Cheat - - Cheat - 132 - - - Apply Cheats - TRUE - Hapl - - - TRUE - TRUE - - - Cheat Entry... - TRUE - Hent - - - Cheat Finder... - TRUE - Hfnd - - - - + Option Option 133 - - Freeze State - f - TRUE - Ofrz - - - Defrost State - d - TRUE - Odfr - - - TRUE - TRUE - - - Freeze State to... - F - TRUE - 1179648 - Ofrd - - - Defrost State from... - D - TRUE - 1179648 - Odfd - + + + + + TRUE TRUE - - Record Movie... - TRUE - MVrc - + Play Movie... TRUE @@ -2466,15 +5710,9 @@ TRUE Osrm - - TRUE - TRUE - + - - TRUE - TRUE - + Music Box TRUE @@ -2483,924 +5721,278 @@ - - Window - - _NSWindowsMenu - Window - - - Minimize - m - TRUE - TRUE - mini - - - Minimize All - m - TRUE - TRUE - 1572864 - mina - - - Zoom - TRUE - zoom - - - TRUE - TRUE - - - Bring All to Front - TRUE - TRUE - bfrt - - - Arrange in Front - TRUE - TRUE - 1572864 - frnt - - - - + - - - 1 - Set the number of presses per second that an automatic fire button receives. - Automatic Fire Speed - FALSE - 20 322 310 70 - - - Slid - 2 - TRUE - 16 - 10 - 1 - 16 - 16 28 215 26 - 392 57 418 272 - - - Num_ - 2 - 1 - 10 - -1 - 242 35 19 13 - 399 283 412 302 - - - 1 - / sec - 265 35 29 13 - 399 306 412 335 - - - 364 41 434 351 - - - YChk - 22 - 0 - 816 - 4 - 33024 - 206 74 28 28 - 122 577 150 605 - - - 1 - Set whether, when automatic fire is enabled, 'TC' must also be held down to activate automatic fire. - Automatic Fire is Active Only While 'TC' is Pressed - FALSE - 20 164 310 148 - - - Left - 222 - 0 - 814 - 4 - 33024 - 16 74 28 28 - 280 57 308 85 - - - Up - 222 - 0 - 812 - 4 - 33024 - 46 44 28 28 - 250 87 278 115 - - - Down - 222 - 0 - 813 - 4 - 33024 - 46 104 28 28 - 310 87 338 115 - - - Righ - 222 - 0 - 815 - 4 - 33024 - 76 74 28 28 - 280 117 308 145 - - - AChk - 222 - 0 - 819 - 4 - 33024 - 266 74 28 28 - 280 307 308 335 - - - YChk - 222 - 0 - 816 - 4 - 33024 - 206 74 28 28 - 280 247 308 275 - - - - Sele - 222 - 0 - 823 - 4 - 33024 - 123 74 28 28 - 280 164 308 192 - - - Star - 222 - 0 - 822 - 4 - 33024 - 159 74 28 28 - 280 200 308 228 - - - XChk - 222 - 0 - 818 - 4 - 33024 - 236 44 28 28 - 250 277 278 305 - - - LChk - 222 - 0 - 820 - 4 - 33024 - 102 30 28 28 - 236 143 264 171 - - - RChk - 222 - 0 - 821 - 4 - 33024 - 180 30 28 28 - 236 221 264 249 - - - 206 41 354 351 - - - 7__A - 7__A - 0 - 1307 - 4 - TRUE - 32768 - 262 70 28 28 - 368 282 396 310 - - - Sele - 111 - 0 - 811 - 4 - 33024 - 123 74 28 28 - 280 164 308 192 - - - - - - RCTL - 102 - 1 - 2 - 7 152 23 178 - - - IP__ - 1 - 86 44 118 16 - 44 86 60 204 - - - Sele - 2222 - 0 - 823 - 4 - 33024 - 123 74 28 28 - 280 494 308 522 - - - RCTL - 106 - 1 - Reset - 7 358 23 406 - - - Left - 111 - 0 - 802 - 4 - 33024 - 16 74 28 28 - 280 57 308 85 - - - - RCTL - 101 - 1 - 1 - 7 114 23 140 - - - PLNM - 1 - 56 44 122 16 - 44 56 60 178 - - - - RChk - 2 - 0 - 821 - 4 - 33024 - 180 30 28 28 - 78 221 106 249 - - - - - 6_Lf - 6_Lf - 0 - 1202 - 4 - TRUE - 32768 - 12 70 28 28 - 222 676 250 704 - - - CCTL - 101 - 1 - - Popup: - - - Auto Detect - TRUE + + + + + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + ROM Information + + 0 0 362 422 + + + + + 1 + Contents : + -1 + 20 62 128 13 + 62 20 75 148 - - TRUE - TRUE + + + 1 + Size (calculated) : + -1 + 20 146 128 13 + 146 20 159 148 - - Force LoROM - TRUE + + 1 + Speed : + -1 + 20 104 128 13 + 104 20 117 148 - - Force HiROM - TRUE + + 1 + Game Code : + -1 + 20 41 128 13 + 41 20 54 148 + + + 1 + Checksum (calculated) : + -1 + 20 209 128 13 + 209 20 222 148 + + + + 1 + Complement (header) : + -1 + 20 251 128 13 + 251 20 264 148 + + + 1 + Video Output : + -1 + 20 272 128 13 + 272 20 285 148 + + + + 1 + Region : + -1 + 20 335 128 13 + 335 20 348 148 + + + + Name + 1 + name + -2 + 156 20 186 13 + 20 156 33 342 + + + Code + 1 + code + -2 + 156 41 186 13 + 41 156 54 342 + + + + Regi + 1 + region + -2 + 156 335 186 13 + 335 156 348 342 + + + + Vers + 1 + revision + -2 + 156 293 186 13 + 293 156 306 342 + + + Cont + 1 + contents + -2 + 156 62 186 13 + 62 156 75 342 + + + Map + 1 + map + -2 + 156 83 186 13 + 83 156 96 342 + + + Spee + 1 + speed + -2 + 156 104 186 13 + 104 156 117 342 + + + SizH + 1 + rom size written in header + -2 + 156 167 186 13 + 167 156 180 342 + + + + SRAM + 1 + sram size + -2 + 156 188 186 13 + 188 156 201 342 + + + SumH + 1 + checksum written in header + -2 + 156 230 186 13 + 230 156 243 342 + + + + SumC + 1 + calculated checksum + -2 + 156 209 186 13 + 209 156 222 342 + + + + Type + 1 + type + -2 + 156 125 186 13 + 125 156 138 342 + + + 1 + CRC32 : + -1 + 20 356 128 13 + 356 20 369 148 + + + + 0 0 422 362 - 6 94 23 204 + 80 40 502 402 + 0 0 768 1024 - - - - - 1 - Player 5 - FALSE - 342 152 302 140 - - - 5_Lf - 5_Lf - 0 - 1102 - 4 - TRUE - 32768 - 12 70 28 28 - 222 354 250 382 - - - - 5_Dn - 5_Dn - 0 - 1101 - 4 - TRUE - 32768 - 42 100 28 28 - 252 384 280 412 - - - 5_Rt - 5_Rt - 0 - 1103 - 4 - TRUE - 32768 - 72 70 28 28 - 222 414 250 442 - - - 5__A - 5__A - 0 - 1107 - 4 - TRUE - 32768 - 262 70 28 28 - 222 604 250 632 - - - 5__Y - 5__Y - 0 - 1104 - 4 - TRUE - 32768 - 202 70 28 28 - 222 544 250 572 - - - 5__B - 5__B - 0 - 1105 - 4 - TRUE - 32768 - 232 100 28 28 - 252 574 280 602 - - - 5Sel - 5Sel - 0 - 1111 - 4 - TRUE - 32768 - 119 70 28 28 - 222 461 250 489 - - - 5Srt - 5Srt - 0 - 1110 - 4 - TRUE - 32768 - 155 70 28 28 - 222 497 250 525 - - - 5__X - 5__X - 0 - 1106 - 4 - TRUE - 32768 - 232 40 28 28 - 192 574 220 602 - - - 5__L - 5__L - 0 - 1108 - 4 - TRUE - 32768 - 98 26 28 28 - 178 440 206 468 - - - 5__R - 5__R - 0 - 1109 - 4 - TRUE - 32768 - 176 26 28 28 - 178 518 206 546 - - - 152 342 292 644 + + + + + + + + + + + + + + + FALSE + TRUE + TRUE + FALSE + 1 + 7 + Cheat Finder + + 0 0 449 441 + + + Pane + + 1 + 1 + 2 + 2 + + 2 + 20 20 213 401 + 20 20 421 233 + + + + + 0 0 441 449 + + 80 40 521 489 + 0 0 768 1024 - - 132 - 1095782476 - 2117687422 - 122 12 64 64 - 12 122 76 186 - - - 8__R - 8__R - 0 - 1409 - 4 - TRUE - 32768 - 176 26 28 28 - 324 518 352 546 - - - 2_Lf - 2_Lf - 0 - 814 - 4 - TRUE - 32768 - 12 70 28 28 - 76 354 104 382 - - - Pnum - 3 - 52 92 26 16 - 92 52 108 78 - - - XChk - 1 - 0 - 806 - 4 - 33024 - 236 44 28 28 - 92 277 120 305 - - - CHAS - 18 98 16 16 - 98 18 114 34 - - - MPan - 1 - 4098 - 85 59 309 22 - - - MNAM - 1 - Cart B name - 8 3 290 16 - 62 93 78 383 - - - 59 85 81 394 - - - - BChk - 2222 - 0 - 817 - 4 - 33024 - 236 104 28 28 - 310 607 338 635 - - - 2__A - 2__A - 0 - 819 - 4 - TRUE - 32768 - 262 70 28 28 - 76 604 104 632 - - - 1 - Player 7 - FALSE - 20 298 302 140 - - - - 7_Up - 7_Up - 0 - 1300 - 4 - TRUE - 32768 - 42 40 28 28 - 338 62 366 90 - - - 7_Dn - 7_Dn - 0 - 1301 - 4 - TRUE - 32768 - 42 100 28 28 - 398 62 426 90 - - - 7_Rt - 7_Rt - 0 - 1303 - 4 - TRUE - 32768 - 72 70 28 28 - 368 92 396 120 - - - - 7__Y - 7__Y - 0 - 1304 - 4 - TRUE - 32768 - 202 70 28 28 - 368 222 396 250 - - - 7__B - 7__B - 0 - 1305 - 4 - TRUE - 32768 - 232 100 28 28 - 398 252 426 280 - - - 7Sel - 7Sel - 0 - 1311 - 4 - TRUE - 32768 - 119 70 28 28 - 368 139 396 167 - - - 7Srt - 7Srt - 0 - 1310 - 4 - TRUE - 32768 - 155 70 28 28 - 368 175 396 203 - - - 7__X - 7__X - 0 - 1306 - 4 - TRUE - 32768 - 232 40 28 28 - 338 252 366 280 - - - 7__L - 7__L - 0 - 1308 - 4 - TRUE - 32768 - 98 26 28 28 - 324 118 352 146 - - - 7__R - 7__R - 0 - 1309 - 4 - TRUE - 32768 - 176 26 28 28 - 324 196 352 224 - - - 298 20 438 322 - - - 4__Y - 4__Y - 0 - 1004 - 4 - TRUE - 32768 - 202 70 28 28 - 222 222 250 250 - - - - LChk - 1 - 0 - 808 - 4 - 33024 - 102 30 28 28 - 78 143 106 171 - - - - - LChk - 111 - 0 - 808 - 4 - 33024 - 102 30 28 28 - 236 143 264 171 - - + + Popup: - + Auto Detect TRUE - - - Force PAL + + TRUE + TRUE + + + Force no Header TRUE - - Force NTSC + + Force Header TRUE - - 3P : - 20 68 28 16 - 68 20 84 48 - - - 1 - Player 8 - FALSE - 342 298 302 140 - - - 8_Lf - 8_Lf - 0 - 1402 - 4 - TRUE - 32768 - 12 70 28 28 - 368 354 396 382 - - - 8_Up - 8_Up - 0 - 1400 - 4 - TRUE - 32768 - 42 40 28 28 - 338 384 366 412 - - - 8_Dn - 8_Dn - 0 - 1401 - 4 - TRUE - 32768 - 42 100 28 28 - 398 384 426 412 - - - 8_Rt - 8_Rt - 0 - 1403 - 4 - TRUE - 32768 - 72 70 28 28 - 368 414 396 442 - - - 8__A - 8__A - 0 - 1407 - 4 - TRUE - 32768 - 262 70 28 28 - 368 604 396 632 - - - 8__Y - 8__Y - 0 - 1404 - 4 - TRUE - 32768 - 202 70 28 28 - 368 544 396 572 - - - 8__B - 8__B - 0 - 1405 - 4 - TRUE - 32768 - 232 100 28 28 - 398 574 426 602 - - - 8Sel - 8Sel - 0 - 1411 - 4 - TRUE - 32768 - 119 70 28 28 - 368 461 396 489 - - - 8Srt - 8Srt - 0 - 1410 - 4 - TRUE - 32768 - 155 70 28 28 - 368 497 396 525 - - - - 8__L - 8__L - 0 - 1408 - 4 - TRUE - 32768 - 98 26 28 28 - 324 440 352 468 - - - - 298 342 438 644 - - - XChk - 2222 - 0 - 818 - 4 - 33024 - 236 44 28 28 - 250 607 278 635 - - - Popup: - - - Private - TRUE - - - Cached - TRUE - - - Shared - TRUE - - - - - LChk - 11 - 0 - 808 - 4 - 33024 - 102 30 28 28 - 78 473 106 501 - - - - __TC - __TC - 0 - 838 - 4 - TRUE - 32768 - 84 26 28 28 - 324 748 352 776 - - - - + + + + + + + + FALSE FALSE FALSE @@ -3414,2732 +6006,20 @@ 11 53 7 - Players List - - 0 0 198 192 - - - 1P : - 20 20 28 16 - 20 20 36 48 - - - 2P : - 20 44 28 16 - 44 20 60 48 - - - - 4P : - 20 92 28 16 - 92 20 108 48 - - - - PLNM - 56 20 122 16 - 20 56 36 178 - - - - PLNM - 2 - 56 68 122 16 - 68 56 84 178 - - - - PLNM - 4 - 56 116 122 16 - 116 56 132 178 - - - ok - 1 - OK - 108 152 70 20 - 152 108 172 178 - - - 0 0 192 198 - - 80 40 272 238 + Add to Entry + + 80 40 248 368 0 0 768 1024 - - - - - - - 1 - Common - FALSE - 664 298 302 140 - - - _DeF - _DeF - 0 - 826 - 4 - TRUE - 32768 - 48 63 28 28 - 361 712 389 740 - - - - __FF - __FF - 0 - 824 - 4 - TRUE - 32768 - 190 26 28 28 - 324 854 352 882 - - - MouR - MouR - 0 - 851 - 4 - TRUE - 32768 - 48 100 28 28 - 398 712 426 740 - - - ScoC - ScoC - 0 - 831 - 4 - TRUE - 32768 - 262 100 28 28 - 398 926 426 954 - - - _SPC - _SPC - 0 - 828 - 4 - TRUE - 32768 - 190 63 28 28 - 361 854 389 882 - - - ScoP - ScoP - 0 - 830 - 4 - TRUE - 32768 - 226 100 28 28 - 398 890 426 918 - - - _Snp - _Snp - 0 - 827 - 4 - TRUE - 32768 - 226 63 28 28 - 361 890 389 918 - - - _Esc - _Esc - 0 - 837 - 4 - TRUE - 32768 - 262 63 28 28 - 361 926 389 954 - - - MouL - MouL - 0 - 850 - 4 - TRUE - 32768 - 12 100 28 28 - 398 676 426 704 - - - _Frz - _Frz - 0 - 825 - 4 - TRUE - 32768 - 12 63 28 28 - 361 676 389 704 - - - Ofsc - Ofsc - 0 - 832 - 4 - TRUE - 32768 - 154 100 28 28 - 398 818 426 846 - - - __Fn - __Fn - 0 - 833 - 4 - TRUE - 32768 - 12 26 28 28 - 324 676 352 704 - - - _Alt - _Alt - 0 - 834 - 4 - TRUE - 32768 - 48 26 28 28 - 324 712 352 740 - - - - FFUp - FFUp - 0 - 836 - 4 - TRUE - 32768 - 262 26 28 28 - 324 926 352 954 - - - FFDn - FFDn - 0 - 835 - 4 - TRUE - 32768 - 226 26 28 28 - 324 890 352 918 - - - 298 664 438 966 - - - - - DEF1 - DEF1 - Restores the default settings. - Defaults - 579 372 81 20 - 414 600 434 681 - - - Left - 1111 - 0 - 802 - 4 - 33024 - 16 74 28 28 - 280 387 308 415 - - - 1 - Size (calculated) : - -1 - 20 146 128 13 - 146 20 159 148 - - - VERS - 1 - versionstr - 1 - 51 110 206 16 - 110 51 126 257 - - - PCTL - 102 - 1 - Export to QuickTime Movie at a Time - 7 102 23 319 - - - - 6_Dn - 6_Dn - 0 - 1201 - 4 - TRUE - 32768 - 42 100 28 28 - 252 706 280 734 - - - 6Sel - 6Sel - 0 - 1211 - 4 - TRUE - 32768 - 119 70 28 28 - 222 783 250 811 - - - Popup: - - - 0 - TRUE - - - 1 - TRUE - - - 2 - TRUE - - - 3 - TRUE - - - 4 - TRUE - - - 5 - TRUE - - - - - 1 - Size (header) : - -1 - 20 167 128 13 - 167 20 180 148 - - - - - - - - - 1 - Licensee : - -1 - 20 314 128 13 - 314 20 327 148 - - - - 6Srt - 6Srt - 0 - 1210 - 4 - TRUE - 32768 - 155 70 28 28 - 222 819 250 847 - - - RChk - 1 - 0 - 809 - 4 - 33024 - 180 30 28 28 - 78 221 106 249 - - - 0 0 723 472 - - - Ftab - 256 - 21 5 680 449 - - - Ftab - 257 - 2 - 0 37 680 412 - - - 1 - Set whether automatic fire is enabled for each controller button. - Enable Automatic Fire - FALSE - 20 6 310 148 - - - Left - 1 - 0 - 802 - 4 - 33024 - 16 74 28 28 - 122 57 150 85 - - - Up - 1 - 0 - 800 - 4 - 33024 - 46 44 28 28 - 92 87 120 115 - - - Down - 1 - 0 - 801 - 4 - 33024 - 46 104 28 28 - 152 87 180 115 - - - Righ - 1 - 0 - 803 - 4 - 33024 - 76 74 28 28 - 122 117 150 145 - - - AChk - 1 - 0 - 807 - 4 - 33024 - 266 74 28 28 - 122 307 150 335 - - - YChk - 1 - 0 - 804 - 4 - 33024 - 206 74 28 28 - 122 247 150 275 - - - - Sele - 1 - 0 - 811 - 4 - 33024 - 123 74 28 28 - 122 164 150 192 - - - Star - 1 - 0 - 810 - 4 - 33024 - 159 74 28 28 - 122 200 150 228 - - - - - - 48 41 196 351 - - - 1 - Set whether pressing 'Alt' in conjunction with a controller button in-game toggles its automatic fire on/off. - Allow 'Alt' to Toggle Enable/Disable Automatic Fire - FALSE - 350 6 310 148 - - - Left - 11 - 0 - 802 - 4 - 33024 - 16 74 28 28 - 122 387 150 415 - - - Up - 11 - 0 - 800 - 4 - 33024 - 46 44 28 28 - 92 417 120 445 - - - - Righ - 11 - 0 - 803 - 4 - 33024 - 76 74 28 28 - 122 447 150 475 - - - AChk - 11 - 0 - 807 - 4 - 33024 - 266 74 28 28 - 122 637 150 665 - - - - BChk - 11 - 0 - 805 - 4 - 33024 - 236 104 28 28 - 152 607 180 635 - - - Sele - 11 - 0 - 811 - 4 - 33024 - 123 74 28 28 - 122 494 150 522 - - - Star - 11 - 0 - 810 - 4 - 33024 - 159 74 28 28 - 122 530 150 558 - - - XChk - 11 - 0 - 806 - 4 - 33024 - 236 44 28 28 - 92 607 120 635 - - - - RChk - 11 - 0 - 809 - 4 - 33024 - 180 30 28 28 - 78 551 106 579 - - - 48 371 196 681 - - - 1 - Set whether, when automatic fire is enabled, 'TC' must also be held down to activate automatic fire. - Automatic Fire is Active Only While 'TC' is Pressed - FALSE - 20 164 310 148 - - - - Up - 111 - 0 - 800 - 4 - 33024 - 46 44 28 28 - 250 87 278 115 - - - Down - 111 - 0 - 801 - 4 - 33024 - 46 104 28 28 - 310 87 338 115 - - - Righ - 111 - 0 - 803 - 4 - 33024 - 76 74 28 28 - 280 117 308 145 - - - AChk - 111 - 0 - 807 - 4 - 33024 - 266 74 28 28 - 280 307 308 335 - - - YChk - 111 - 0 - 804 - 4 - 33024 - 206 74 28 28 - 280 247 308 275 - - - BChk - 111 - 0 - 805 - 4 - 33024 - 236 104 28 28 - 310 277 338 305 - - - - Star - 111 - 0 - 810 - 4 - 33024 - 159 74 28 28 - 280 200 308 228 - - - XChk - 111 - 0 - 806 - 4 - 33024 - 236 44 28 28 - 250 277 278 305 - - - - RChk - 111 - 0 - 809 - 4 - 33024 - 180 30 28 28 - 236 221 264 249 - - - 206 41 354 351 - - - 1 - Set whether a button's input is inverted - that is, Snes9x acts as though the button is pressed if and only if it is not pressed. - Button Input is Inverted - FALSE - 350 164 310 148 - - - - Up - 1111 - 0 - 800 - 4 - 33024 - 46 44 28 28 - 250 417 278 445 - - - Down - 1111 - 0 - 801 - 4 - 33024 - 46 104 28 28 - 310 417 338 445 - - - Righ - 1111 - 0 - 803 - 4 - 33024 - 76 74 28 28 - 280 447 308 475 - - - AChk - 1111 - 0 - 807 - 4 - 33024 - 266 74 28 28 - 280 637 308 665 - - - YChk - 1111 - 0 - 804 - 4 - 33024 - 206 74 28 28 - 280 577 308 605 - - - BChk - 1111 - 0 - 805 - 4 - 33024 - 236 104 28 28 - 310 607 338 635 - - - - Star - 1111 - 0 - 810 - 4 - 33024 - 159 74 28 28 - 280 530 308 558 - - - XChk - 1111 - 0 - 806 - 4 - 33024 - 236 44 28 28 - 250 607 278 635 - - - LChk - 1111 - 0 - 808 - 4 - 33024 - 102 30 28 28 - 236 473 264 501 - - - RChk - 1111 - 0 - 809 - 4 - 33024 - 180 30 28 28 - 236 551 264 579 - - - 206 371 354 681 - - - - - 42 21 454 701 - - - Ftab - 258 - 2 - 0 37 680 412 - - - 1 - Set whether pressing 'Alt' in conjunction with a controller button in-game toggles its automatic fire on/off. - Allow 'Alt' to Toggle Enable/Disable Automatic Fire - FALSE - 350 6 310 148 - - - Left - 22 - 0 - 814 - 4 - 33024 - 16 74 28 28 - 122 387 150 415 - - - Up - 22 - 0 - 812 - 4 - 33024 - 46 44 28 28 - 92 417 120 445 - - - Down - 22 - 0 - 813 - 4 - 33024 - 46 104 28 28 - 152 417 180 445 - - - Righ - 22 - 0 - 815 - 4 - 33024 - 76 74 28 28 - 122 447 150 475 - - - AChk - 22 - 0 - 819 - 4 - 33024 - 266 74 28 28 - 122 637 150 665 - - - - BChk - 22 - 0 - 817 - 4 - 33024 - 236 104 28 28 - 152 607 180 635 - - - Sele - 22 - 0 - 823 - 4 - 33024 - 123 74 28 28 - 122 494 150 522 - - - Star - 22 - 0 - 822 - 4 - 33024 - 159 74 28 28 - 122 530 150 558 - - - XChk - 22 - 0 - 818 - 4 - 33024 - 236 44 28 28 - 92 607 120 635 - - - LChk - 22 - 0 - 820 - 4 - 33024 - 102 30 28 28 - 78 473 106 501 - - - RChk - 22 - 0 - 821 - 4 - 33024 - 180 30 28 28 - 78 551 106 579 - - - 48 371 196 681 - - - 1 - Set whether automatic fire is enabled for each controller button. - Enable Automatic Fire - FALSE - 20 6 310 148 - - - Left - 2 - 0 - 814 - 4 - 33024 - 16 74 28 28 - 122 57 150 85 - - - Up - 2 - 0 - 812 - 4 - 33024 - 46 44 28 28 - 92 87 120 115 - - - Down - 2 - 0 - 813 - 4 - 33024 - 46 104 28 28 - 152 87 180 115 - - - Righ - 2 - 0 - 815 - 4 - 33024 - 76 74 28 28 - 122 117 150 145 - - - AChk - 2 - 0 - 819 - 4 - 33024 - 266 74 28 28 - 122 307 150 335 - - - YChk - 2 - 0 - 816 - 4 - 33024 - 206 74 28 28 - 122 247 150 275 - - - BChk - 2 - 0 - 817 - 4 - 33024 - 236 104 28 28 - 152 277 180 305 - - - Sele - 2 - 0 - 823 - 4 - 33024 - 123 74 28 28 - 122 164 150 192 - - - Star - 2 - 0 - 822 - 4 - 33024 - 159 74 28 28 - 122 200 150 228 - - - XChk - 2 - 0 - 818 - 4 - 33024 - 236 44 28 28 - 92 277 120 305 - - - LChk - 2 - 0 - 820 - 4 - 33024 - 102 30 28 28 - 78 143 106 171 - - - - 48 41 196 351 - - - - 1 - Set whether a button's input is inverted - that is, Snes9x acts as though the button is pressed if and only if it is not pressed. - Button Input is Inverted - FALSE - 350 164 310 148 - - - - Up - 2222 - 0 - 812 - 4 - 33024 - 46 44 28 28 - 250 417 278 445 - - - Down - 2222 - 0 - 813 - 4 - 33024 - 46 104 28 28 - 310 417 338 445 - - - Righ - 2222 - 0 - 815 - 4 - 33024 - 76 74 28 28 - 280 447 308 475 - - - AChk - 2222 - 0 - 819 - 4 - 33024 - 266 74 28 28 - 280 637 308 665 - - - YChk - 2222 - 0 - 816 - 4 - 33024 - 206 74 28 28 - 280 577 308 605 - - - - - Star - 2222 - 0 - 822 - 4 - 33024 - 159 74 28 28 - 280 530 308 558 - - - - LChk - 2222 - 0 - 820 - 4 - 33024 - 102 30 28 28 - 236 473 264 501 - - - RChk - 2222 - 0 - 821 - 4 - 33024 - 180 30 28 28 - 236 551 264 579 - - - 206 371 354 681 - - - - - 42 21 454 701 - - - 5 21 454 701 - - - contentResID - 0 - tabEnabled - 1 - tabName - Player 1 - userPane - - - - contentResID - 0 - tabEnabled - 1 - tabName - Player 2 - userPane - - - - - - 0 0 472 723 - - - ComH - 1 - complement written in header - -2 - 156 251 186 13 - 251 156 264 342 - - - 0 0 362 422 - - - 1 - Cart Name : - -1 - 20 20 128 13 - 20 20 33 148 - - - - 1 - Contents : - -1 - 20 62 128 13 - 62 20 75 148 - - - - - 1 - Speed : - -1 - 20 104 128 13 - 104 20 117 148 - - - 1 - Game Code : - -1 - 20 41 128 13 - 41 20 54 148 - - - 1 - SRAM Size : - -1 - 20 188 128 13 - 188 20 201 148 - - - 1 - Checksum (calculated) : - -1 - 20 209 128 13 - 209 20 222 148 - - - 1 - Checksum (header) : - -1 - 20 230 128 13 - 230 20 243 148 - - - 1 - Complement (header) : - -1 - 20 251 128 13 - 251 20 264 148 - - - 1 - Video Output : - -1 - 20 272 128 13 - 272 20 285 148 - - - 1 - Revision : - -1 - 20 293 128 13 - 293 20 306 148 - - - 1 - Region : - -1 - 20 335 128 13 - 335 20 348 148 - - - 1 - Map : - -1 - 20 83 128 13 - 83 20 96 148 - - - Name - 1 - name - -2 - 156 20 186 13 - 20 156 33 342 - - - - Lice - 1 - licensee - -2 - 156 314 186 13 - 314 156 327 342 - - - Regi - 1 - region - -2 - 156 335 186 13 - 335 156 348 342 - - - Outp - 1 - output - -2 - 156 272 186 13 - 272 156 285 342 - - - Vers - 1 - revision - -2 - 156 293 186 13 - 293 156 306 342 - - - Cont - 1 - contents - -2 - 156 62 186 13 - 62 156 75 342 - - - Map - 1 - map - -2 - 156 83 186 13 - 83 156 96 342 - - - Spee - 1 - speed - -2 - 156 104 186 13 - 104 156 117 342 - - - SizH - 1 - rom size written in header - -2 - 156 167 186 13 - 167 156 180 342 - - - SizC - 1 - calculated rom size - -2 - 156 146 186 13 - 146 156 159 342 - - - SRAM - 1 - sram size - -2 - 156 188 186 13 - 188 156 201 342 - - - SumH - 1 - checksum written in header - -2 - 156 230 186 13 - 230 156 243 342 - - - - SumC - 1 - calculated checksum - -2 - 156 209 186 13 - 209 156 222 342 - - - 1 - Type : - -1 - 20 125 128 13 - 125 20 138 148 - - - Type - 1 - type - -2 - 156 125 186 13 - 125 156 138 342 - - - 1 - CRC32 : - -1 - 20 356 128 13 - 356 20 369 148 - - - CRC - 1 - crc32 - -2 - 156 356 186 13 - 356 156 369 342 - - - Clip - 1 - Clip - Copy to Clipboard - 204 384 137 20 - 384 204 404 341 - - - 0 0 422 362 - - - 1 - Player 2 - FALSE - 342 6 302 140 - - - - 2_Up - 2_Up - 0 - 812 - 4 - TRUE - 32768 - 42 40 28 28 - 46 384 74 412 - - - 2_Dn - 2_Dn - 0 - 813 - 4 - TRUE - 32768 - 42 100 28 28 - 106 384 134 412 - - - 2_Rt - 2_Rt - 0 - 815 - 4 - TRUE - 32768 - 72 70 28 28 - 76 414 104 442 - - - - 2__Y - 2__Y - 0 - 816 - 4 - TRUE - 32768 - 202 70 28 28 - 76 544 104 572 - - - 2__B - 2__B - 0 - 817 - 4 - TRUE - 32768 - 232 100 28 28 - 106 574 134 602 - - - 2Sel - 2Sel - 0 - 823 - 4 - TRUE - 32768 - 119 70 28 28 - 76 461 104 489 - - - 2Srt - 2Srt - 0 - 822 - 4 - TRUE - 32768 - 155 70 28 28 - 76 497 104 525 - - - 2__X - 2__X - 0 - 818 - 4 - TRUE - 32768 - 232 40 28 28 - 46 574 74 602 - - - 2__L - 2__L - 0 - 820 - 4 - TRUE - 32768 - 98 26 28 28 - 32 440 60 468 - - - 2__R - 2__R - 0 - 821 - 4 - TRUE - 32768 - 176 26 28 28 - 32 518 60 546 - - - 6 342 146 644 - - - - - - - - - - 3_Dn - 3_Dn - 0 - 901 - 4 - TRUE - 32768 - 42 100 28 28 - 106 706 134 734 - - - - Stat - 3 - 345 92 72 16 - 92 345 108 417 - - - - - - - - - - 3__B - 3__B - 0 - 905 - 4 - TRUE - 32768 - 232 100 28 28 - 106 896 134 924 - - - - - NEW_ - NEW_ - - 1 - 2 - - New - 432 20 103 20 - 20 432 40 535 - - - - 2 : - 20 44 19 16 - 44 20 60 39 - - - Pnum - 1 - 52 44 26 16 - 44 52 60 78 - - - - - SfUI - 2 - - - Enab - Enab - Enable this Effect - 73 18 91 154 - - - Epop - - 20 234 40 447 - - - Choose the Effect to Configure : - 22 20 38 224 - - - LINE - 60 12 61 455 - - - 0 0 99 467 - - - 0 0 99 467 - - - - - - - - - - - - - - - PANE - 1000 - 2 - - - RCTL - 108 - 1 - Players to Record : - 8 7 21 110 - - - RCTL - 109 - 1 - Comment : - 33 7 46 67 - - - RCTL - 107 - 1 - TRUE - TRUE - 33 77 46 422 - - - - - RCTL - 103 - 1 - 3 - 7 190 23 216 - - - RCTL - 104 - 1 - 4 - 7 228 23 254 - - - RCTL - 105 - 1 - 5 - 7 266 23 292 - - - - 0 0 57 433 - - - 0 0 55 433 - - - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - Core Image Filter Setting - - 0 0 373 81 - - - Filter : - 20 22 44 16 - 22 20 38 64 - - - - 0 0 81 373 - - 80 40 161 413 - 0 0 768 1024 - - - Pnum - 2 - 52 68 26 16 - 68 52 84 78 - - - - - - - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - ROM Information - - 80 40 502 402 - 0 0 768 1024 - - - - - - - - - - - - - - CCTL - 106 - 1 - Interleave Mode : - -1 - 8 214 21 308 - - - - - - - - - 4_Rt - 4_Rt - 0 - 1003 - 4 - TRUE - 32768 - 72 70 28 28 - 222 92 250 120 - - - - - - 3 - COPY - © Copyright 1996-2011 Snes9x developers Snes9x is a Super Nintendo Entertainment System emulator that allows you to play most games designed for the SNES on your PC. Please visit http://www.snes9x.com/ for up-to-the-minute information and help on Snes9x. Nintendo is a trade mark. - 1 - 20 134 268 88 - 134 20 222 288 - - - QCTL - 103 - 1 - Compression... - 7 319 27 424 - - - - - - - - - - - - - - - - - - - - - - - - NoTR - GL_TEXTURE_2D is used even if GL_TEXTURE_RECTANGLE_EXT is available. - Don't Use Rectangle Texture - 34 104 203 18 - 104 34 122 237 - - - - DEL_ - DEL_ - - 1 - 2 - - Delete - 432 52 103 20 - 52 432 72 535 - - - - - - Chse - 18 158 16 16 - 158 18 174 34 - - - - Stat - 1 - 345 44 72 16 - 44 345 60 417 - - - - - - - - - - - - FALSE - FALSE - TRUE - TRUE - TRUE - FALSE - -1 - 1 - Game Window - - 0 0 512 478 - - - Pict - - 1 - 1 - 2 - 2 - - 0 0 512 478 - 0 0 478 512 - - - 0 0 478 512 - - 80 40 558 552 - 0 0 768 1024 - - - - : - 70 22 7 16 - 22 70 38 77 - - - - - - - - OpenGL Settings : - 20 80 131 16 - 80 20 96 151 - - - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - Automatic Fire - - 80 40 552 763 - 0 0 768 1024 - - - - - - SWAP - SWAP - Swap - 20 110 70 20 - 110 20 130 90 - - - - Name : - -1 - 20 53 63 16 - 53 20 69 83 - - - - - - - CCTL 104 1 - - Popup: - - - Auto Detect - TRUE - - - TRUE - TRUE - - - Force no Header - TRUE - - - Force Header - TRUE - - - + 31 315 48 425 - - - - - - - - - - - - - - - - - 4__X - 4__X - 0 - 1006 - 4 - TRUE - 32768 - 232 40 28 28 - 192 252 220 280 - - - - - BRSR - - 1 - 1 - 2 - 2 - - 40 - - - CHK_ - chbx - 327681 - 1 - 30 - 30 - - - ADDR - 327681 - 1 - 84 - 84 - Address - - - VALU - 327681 - 1 - 65 - 65 - Value - - - DESC - 327681 - 1 - 196 - 196 - -2 - Description - - - 1 - FALSE - FALSE - 17 - 20 20 396 232 - 20 20 252 416 - - - - - - - - - 12 58 233 1 - 58 12 59 245 - - - - - - - - - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - 1 - 7 - OpenROMControl - - - - PANE - 1000 - 2 - - - CCTL - 105 - 1 - Memory Type : - -1 - 8 6 21 87 - - - - CCTL - 103 - 1 - - 31 94 48 204 - - - CCTL - 107 - 1 - Video System : - -1 - 33 6 46 87 - - - - - CCTL - 108 - 1 - Header : - -1 - 33 214 46 308 - - - - 0 0 56 433 - - - 0 0 54 433 - - 80 40 134 473 - 0 0 768 1024 - - - - - - - - - - - - - - - - - - - - 3_Up - 3_Up - 0 - 900 - 4 - TRUE - 32768 - 42 40 28 28 - 46 706 74 734 - - - FALSE - TRUE - TRUE - FALSE - 1 - 7 - Cheat Entry - - 0 0 555 272 - - - - - - ALL_ - ALL_ - - 1 - 2 - - Enable All - 432 92 103 20 - 92 432 112 535 - - - 0 0 272 555 - - 80 40 352 595 - 0 0 768 1024 - 555 - 272 - - - - - - - - - - 1 : - 20 20 19 16 - 20 20 36 39 - - - - - - - 3__R - 3__R - 0 - 909 - 4 - TRUE - 32768 - 176 26 28 28 - 32 840 60 868 - - - - Server IP : - -1 - 20 23 63 16 - 23 20 39 83 - - - 0 0 986 491 - - - - - 1 - Player 3 - FALSE - 664 6 302 140 - - - 3_Lf - 3_Lf - 0 - 902 - 4 - TRUE - 32768 - 12 70 28 28 - 76 676 104 704 - - - - - - - 3__Y - 3__Y - 0 - 904 - 4 - TRUE - 32768 - 202 70 28 28 - 76 866 104 894 - - - - 3Sel - 3Sel - 0 - 911 - 4 - TRUE - 32768 - 119 70 28 28 - 76 783 104 811 - - - 3Srt - 3Srt - 0 - 910 - 4 - TRUE - 32768 - 155 70 28 28 - 76 819 104 847 - - - 3__X - 3__X - 0 - 906 - 4 - TRUE - 32768 - 232 40 28 28 - 46 896 74 924 - - - - - 6 664 146 966 - - - 1 - Player 4 - FALSE - 20 152 302 140 - - - 4_Lf - 4_Lf - 0 - 1002 - 4 - TRUE - 32768 - 12 70 28 28 - 222 32 250 60 - - - - 4_Dn - 4_Dn - 0 - 1001 - 4 - TRUE - 32768 - 42 100 28 28 - 252 62 280 90 - - - - - - 4__B - 4__B - 0 - 1005 - 4 - TRUE - 32768 - 232 100 28 28 - 252 252 280 280 - - - 4Sel - 4Sel - 0 - 1011 - 4 - TRUE - 32768 - 119 70 28 28 - 222 139 250 167 - - - 4Srt - 4Srt - 0 - 1010 - 4 - TRUE - 32768 - 155 70 28 28 - 222 175 250 203 - - - - 4__L - 4__L - 0 - 1008 - 4 - TRUE - 32768 - 98 26 28 28 - 178 118 206 146 - - - 4__R - 4__R - 0 - 1009 - 4 - TRUE - 32768 - 176 26 28 28 - 178 196 206 224 - - - 152 20 292 322 - - - - - CLRa - 1 - CLRa - Clear All - 21 453 85 20 - 453 21 473 106 - - - PRES - 1 - Preset #n - 130 456 95 13 - 456 130 469 225 - - - 1 - Player 6 - FALSE - 664 152 302 140 - - - - 6_Up - 6_Up - 0 - 1200 - 4 - TRUE - 32768 - 42 40 28 28 - 192 706 220 734 - - - - 6_Rt - 6_Rt - 0 - 1203 - 4 - TRUE - 32768 - 72 70 28 28 - 222 736 250 764 - - - 6__A - 6__A - 0 - 1207 - 4 - TRUE - 32768 - 262 70 28 28 - 222 926 250 954 - - - 6__Y - 6__Y - 0 - 1204 - 4 - TRUE - 32768 - 202 70 28 28 - 222 866 250 894 - - - 6__B - 6__B - 0 - 1205 - 4 - TRUE - 32768 - 232 100 28 28 - 252 896 280 924 - - - - - 6__X - 6__X - 0 - 1206 - 4 - TRUE - 32768 - 232 40 28 28 - 192 896 220 924 - - - 6__L - 6__L - 0 - 1208 - 4 - TRUE - 32768 - 98 26 28 28 - 178 762 206 790 - - - 6__R - 6__R - 0 - 1209 - 4 - TRUE - 32768 - 176 26 28 28 - 178 840 206 868 - - - 152 664 292 966 - - - - - 0 0 491 986 - - - - - - PANE - 1000 - 2 - - - QCTL - 101 - 1 - Double Size - 9 7 25 90 - - - - - QCTL - 104 - 1 - - 8 258 25 302 - - - QCTL - 105 - 1 - Frame Skip : - -1 - 10 184 23 253 - - - 0 0 35 433 - - - - - - - - Cle0 - Cle0 - Clear - 507 20 70 20 - 20 507 40 577 - - - - - - - - - - - - - - - - Stat - 4 - 345 116 72 16 - 116 345 132 417 - - - - - MNAM - Cart A name - 8 3 290 16 - 22 93 38 383 - - - - - - - - - - - - - - - - - - - - - - - - NAME - Snes9x - 1 - 62 85 184 18 - 85 62 103 246 - - - - - - - - - - - - - - - - - - - - - - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - Extra Options - - 0 0 257 216 - - - BMrk - All frames are drawn without adjusting times. Make sure 'Synchronize' in 'Sound' tab in 'Preferences' dialog is turned off. - Benchmark Test - 18 20 133 18 - 20 18 38 151 - - - - - Storage Hint : - 36 178 90 16 - 178 36 194 126 - - - CSAp - Sets GL_STORAGE_SHARED_APPLE to 1. - Client Stroage - 34 126 203 18 - 126 34 144 237 - - - Hint - Sets GL_TEXTURE_STORAGE_HINT_APPLE. - 2 - - 134 176 103 20 - 176 134 196 237 - - - - - 0 0 216 257 - - 80 40 296 297 - 0 0 768 1024 - - - - - - - - 0 0 308 242 - - - - - - - 0 0 242 308 - - - - - - + + FALSE FALSE @@ -6154,22 +6034,18 @@ 0 0 597 150 - - Slot A - 20 22 42 16 - 22 20 38 62 - + Slot B 20 62 42 16 62 20 78 62 - - + : - 70 62 7 16 - 62 70 78 77 + 70 22 7 16 + 22 70 38 77 + Cho0 Cho0 @@ -6185,13 +6061,7 @@ 60 407 80 495 - - Cle1 - Cle1 - Clear - 507 60 70 20 - 60 507 80 577 - + ok 1 @@ -6206,16 +6076,23 @@ 425 110 70 20 110 425 130 495 - + + MPan + 1 4098 - 85 19 309 22 + 85 59 309 22 - + + MNAM + 1 + Cart B name + 8 3 290 16 + 62 93 78 383 + - 19 85 41 394 + 59 85 81 394 - 0 0 150 597 @@ -6223,313 +6100,20 @@ 80 40 230 637 0 0 768 1024 - - OKAY - OKAY - 1 - Play - 347 152 70 20 - 152 347 172 417 - - - - - - - - - - - - - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - FALSE - 1 - 7 - Clients List - - 0 0 437 192 - - - IP__ - 86 20 118 16 - 20 86 36 204 - - - - - - - 5 : - 20 116 19 16 - 116 20 132 39 - - - - IP__ - 2 - 86 68 118 16 - 68 86 84 204 - - - IP__ - 3 - 86 92 118 16 - 92 86 108 204 - - - IP__ - 4 - 86 116 118 16 - 116 86 132 204 - - - Stat - 345 20 72 16 - 20 345 36 417 - - - - Stat - 2 - 345 68 72 16 - 68 345 84 417 - - - - - Name - 219 20 118 16 - 20 219 36 337 - - - Name - 1 - 219 44 118 16 - 44 219 60 337 - - - Name - 2 - 219 68 118 16 - 68 219 84 337 - - - - Name - 4 - 219 116 118 16 - 116 219 132 337 - - - - CNSL - CNSL - 2 - Cancel - 265 152 70 20 - 152 265 172 335 - - - Pnum - 52 20 26 16 - 20 52 36 78 - - - - - - Pnum - 4 - 52 116 26 16 - 116 52 132 78 - - - - 0 0 192 437 - - 80 40 272 477 - 0 0 768 1024 - - - - - - - - - - - - - - - - - - - - - - - - - CLNM - TRUE - TRUE - 97 53 172 16 - 53 97 69 269 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - 1 - 7 - SoundEffectUI - - 80 40 179 507 - 0 0 768 1024 - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - FALSE - TRUE - 1 - 7 - RecordSMVControl - - 80 40 135 473 - 0 0 768 1024 - - - - - - - - - - PCTL - 101 - 1 - Read Only - 7 7 23 80 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + FALSE FALSE FALSE @@ -6538,31 +6122,162 @@ FALSE 1 7 - Configure Controllers - - 80 40 571 1026 + Keyboard Layout + + 80 40 331 633 0 0 768 1024 - - - - - - - - - - - + + + + + + + Popup: + + + + TRUE + TRUE + + + Force LoROM + TRUE + + + Force HiROM + TRUE + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + CCTL + 108 + 1 + Header : + -1 + 33 214 46 308 + + + PLNM + 4 + 56 116 122 16 + 116 56 132 178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PLNM + 1 + 56 44 122 16 + 44 56 60 178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SfUI + 2 + + + + + Choose the Effect to Configure : + 22 20 38 224 + + + + 0 0 99 467 + + + + + + + + FALSE FALSE @@ -6595,43 +6310,218 @@ 80 40 110 367 0 0 768 1024 - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - + + + + + + + + + + + + + + + + 3P : + 20 68 28 16 + 68 20 84 48 + + + + + + + + + + + + + - - - - - - - - + + + + + CCTL + 101 + 1 + + 6 94 23 204 + + + + + PLNM + 56 20 122 16 + 20 56 36 178 + + + + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + Extra Options + + 80 40 296 297 + 0 0 768 1024 + + + + + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + Music Box + + 80 40 326 392 + 0 0 768 1024 + + + + + + + + + + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + 1 + 7 + Preferences + + 80 39 451 644 + 0 0 768 1024 + + + + + + + + + + + + + + + - + + + + + + + + + + + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + 1 + 7 + SoundEffectUI + + + + + 0 0 99 467 + + 80 40 179 507 + 0 0 768 1024 + + + + + + + + + + + + + + + + + + + + + FALSE + TRUE + TRUE + FALSE + 1 + 7 + Cheat Entry + + 80 40 352 595 + 0 0 768 1024 + 555 + 272 + + + + + + + + + + + + + QCTL + 105 + 1 + Frame Skip : + -1 + 10 184 23 253 + + + + + + FALSE FALSE @@ -6647,50 +6537,43 @@ 80 40 322 348 0 0 768 1024 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - + + + + + + + + + + + + + + + PANE + 1000 + 2 + + + + + + + + 0 0 35 433 + + + 0 0 33 433 + + + + + + FALSE FALSE @@ -6705,134 +6588,106 @@ 1 7 QTMovControl - - - - - 0 0 33 433 - + 80 40 113 473 0 0 768 1024 - - - - - - - - - - - - - - - - NOT_ - NOT_ - 2 - Cancel - 110 92 70 20 - 92 110 112 180 - - - - - 0 0 292 132 - - - - - OK__ - OK__ - 1 - Connect - 192 92 80 20 - 92 192 112 272 - - - - - - - 0 0 132 292 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + PANE + 1000 + 2 + + + + CCTL + 106 + 1 + Interleave Mode : + -1 + 8 214 21 308 + + + + + + + + + 0 0 56 433 + + + 0 0 54 433 + + + + + + + + + + + - + + + + + + + + + + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + 1 + 7 + OpenROMControl + + 80 40 134 473 + 0 0 768 1024 + + + ok + 1 + OK + 108 152 70 20 + 152 108 172 178 + + + + + + + + + FALSE FALSE FALSE @@ -6842,794 +6697,945 @@ FALSE 1 7 - Connect to Server - - 80 40 212 332 + Clients List + + 80 40 272 477 0 0 768 1024 - - - - - - - + + PLNM + 2 + 56 68 122 16 + 68 56 84 178 + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + 4P : + 20 92 28 16 + 92 20 108 48 + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + 0 0 198 192 + + + + + + + + + + + + + + 0 0 192 198 + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + TRUE + FALSE + 11 + 53 + 7 + Players List + + 80 40 272 238 + 0 0 768 1024 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - + + + - - - - - - - + + - - + + + + + + + + + + + + + - - - - - - - - - + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + About @@ -7684,5 +7690,5 @@ IBCarbonFramework - 2271 + 2296 diff --git a/macosx/mac-os.h b/macosx/mac-os.h index 7cc23462..f25bb334 100644 --- a/macosx/mac-os.h +++ b/macosx/mac-os.h @@ -238,6 +238,7 @@ enum VIDEOMODE_BLOCKY, VIDEOMODE_TV, VIDEOMODE_SMOOTH, + VIDEOMODE_BLEND, VIDEOMODE_SUPEREAGLE, VIDEOMODE_2XSAI, VIDEOMODE_SUPER2XSAI, diff --git a/macosx/mac-prefs.cpp b/macosx/mac-prefs.cpp index a127fa2d..1d5aa4d8 100755 --- a/macosx/mac-prefs.cpp +++ b/macosx/mac-prefs.cpp @@ -267,6 +267,7 @@ enum iOpenGLBlocky = 1, iOpenGLTVMode, iOpenGLSmoothMode, + iOpenGLBlendMode, iOpenGLEagleMode, iOpenGL2xSAIMode, iOpenGLSuper2xSAIMode, @@ -308,7 +309,7 @@ static PrefList prefList[] = { 'gl32', &gl32bit, sizeof(bool8 ) }, { 'glst', &glstretch, sizeof(bool8 ) }, { 'draw', &drawingMethod, sizeof(long ) }, - { 'vmod', &videoMode, sizeof(int ) }, + { 'Vmod', &videoMode, sizeof(int ) }, { 'MPmt', &multiprocessor, sizeof(bool8 ) }, { 'VSNC', &vsync, sizeof(bool8 ) }, { 'H239', &drawoverscan, sizeof(bool8 ) }, @@ -592,6 +593,10 @@ void ConfigurePreferences (void) SetControl32BitValue(ctl, iOpenGLSmoothMode); break; + case VIDEOMODE_BLEND: + SetControl32BitValue(ctl, iOpenGLBlendMode); + break; + case VIDEOMODE_SUPEREAGLE: SetControl32BitValue(ctl, iOpenGLEagleMode); break; @@ -954,6 +959,11 @@ void ConfigurePreferences (void) videoMode = VIDEOMODE_SMOOTH; break; + case iOpenGLBlendMode: + drawingMethod = kDrawingBlitGL; + videoMode = VIDEOMODE_BLEND; + break; + case iOpenGLEagleMode: drawingMethod = kDrawingBlitGL; videoMode = VIDEOMODE_SUPEREAGLE; diff --git a/macosx/mac-render.cpp b/macosx/mac-render.cpp index 9bb6bd8f..60341293 100644 --- a/macosx/mac-render.cpp +++ b/macosx/mac-render.cpp @@ -1245,7 +1245,7 @@ static inline void RenderBlitScreen (Blitter Fn, int x, int sW, int sH, int cW, uint8 *tmpBuffer = blitGLBuffer + (1024 * 512 * 2); int aligned = ((ntsc_width + 2) >> 1) << 1; (Fn) ((uint8 *) buf, sW * 2, tmpBuffer, 1024 * 2, sW, sH); - S9xBlitPixHiResMixedTV16(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, cH); + S9xBlitPixMixedTV1x2(tmpBuffer, 1024 * 2, blitGLBuffer, 1024 * 2, aligned, cH); cH *= 2; } @@ -1581,6 +1581,22 @@ static void S9xPutImageBlitGL (int width, int height) { default: case 2: + if (videoMode == VIDEOMODE_BLEND) + { + if (width <= 256) + { + copyWidth = width * 2; + copyHeight = height; + blitFn = S9xBlitPixBlend2x1; + } + else + { + copyWidth = width; + copyHeight = height; + blitFn = S9xBlitPixBlend1x1; + } + } + else if (height <= 256) { if (width <= 256) @@ -1591,7 +1607,7 @@ static void S9xPutImageBlitGL (int width, int height) switch (videoMode) { default: - case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; + case VIDEOMODE_TV: blitFn = S9xBlitPixTV2x2; break; case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; @@ -1605,13 +1621,13 @@ static void S9xPutImageBlitGL (int width, int height) { copyWidth = width; copyHeight = height * 2; - blitFn = S9xBlitPixHiResTV16; + blitFn = S9xBlitPixTV1x2; } else { copyWidth = width; copyHeight = height; - blitFn = S9xBlitPixSmall16; + blitFn = S9xBlitPixSimple1x1; } } } @@ -1619,7 +1635,7 @@ static void S9xPutImageBlitGL (int width, int height) { copyWidth = width; copyHeight = height; - blitFn = S9xBlitPixSmall16; + blitFn = S9xBlitPixSimple1x1; } break; @@ -1635,7 +1651,7 @@ static void S9xPutImageBlitGL (int width, int height) { copyWidth = width; copyHeight = height; - blitFn = S9xBlitPixSmall16; + blitFn = S9xBlitPixSimple1x1; } break; @@ -1658,7 +1674,7 @@ static void S9xPutImageBlitGL (int width, int height) { copyWidth = width; copyHeight = height; - blitFn = S9xBlitPixSmall16; + blitFn = S9xBlitPixSimple1x1; } break; diff --git a/unix/x11.cpp b/unix/x11.cpp index 5066f8f6..8b35b1c0 100644 --- a/unix/x11.cpp +++ b/unix/x11.cpp @@ -793,7 +793,7 @@ void S9xPutImage (int width, int height) { copyWidth = width * 2; copyHeight = height; - blitFn = S9xBlitPixDoubled16; + blitFn = S9xBlitPixSimple2x1; } else { @@ -802,9 +802,9 @@ void S9xPutImage (int width, int height) switch (GUI.video_mode) { - case VIDEOMODE_BLOCKY: blitFn = S9xBlitPixScaled16; break; - case VIDEOMODE_TV: blitFn = S9xBlitPixScaledTV16; break; - case VIDEOMODE_SMOOTH: blitFn = S9xBlitPixSmooth16; break; + case VIDEOMODE_BLOCKY: blitFn = S9xBlitPixSimple2x2; break; + case VIDEOMODE_TV: blitFn = S9xBlitPixTV2x2; break; + case VIDEOMODE_SMOOTH: blitFn = S9xBlitPixSmooth2x2; break; case VIDEOMODE_SUPEREAGLE: blitFn = S9xBlitPixSuperEagle16; break; case VIDEOMODE_2XSAI: blitFn = S9xBlitPix2xSaI16; break; case VIDEOMODE_SUPER2XSAI: blitFn = S9xBlitPixSuper2xSaI16; break; @@ -821,16 +821,15 @@ void S9xPutImage (int width, int height) switch (GUI.video_mode) { - default: blitFn = S9xBlitPixHiRes16; break; - case VIDEOMODE_TV: blitFn = S9xBlitPixHiResTV16; break; + default: blitFn = S9xBlitPixSimple1x2; break; + case VIDEOMODE_TV: blitFn = S9xBlitPixTV1x2; break; } } else { copyWidth = width; copyHeight = height; - - blitFn = S9xBlitPixSmall16; + blitFn = S9xBlitPixSimple1x1; } blitFn((uint8 *) GFX.Screen, GFX.Pitch, GUI.blit_screen, GUI.blit_screen_pitch, width, height);