From ba03dcb0739482390458039c1f550e6043e4e0aa Mon Sep 17 00:00:00 2001 From: porkness Date: Wed, 13 Feb 2013 12:21:45 +0800 Subject: [PATCH 01/27] Add a simple Chinese translation for Windows Also moved original one to en_US to make sure it switch automatically --- Windows/ppsspp.rc | Bin 15905 -> 55702 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 71f7cf2e36975ffd8272b206763dace3915ba1f1..d6c8ce113f70cfb5da0c2d63c598161a81785986 100644 GIT binary patch literal 55702 zcmeI5TZ~;-d4M;Ri(*JYqT-=1JsG5lqdNB39^VkEn9RjCo}14Z-*A+PFEeA4@z|R2 z#7-!2QV9VvU`G{@(yBZ*JXEUs#!GpjLIOo9MYIo91rsz@I|Ahm+@|JFah*V_B6 zeLcs{I9Q{ZeP*A%*ZSB0|Lec6wch;Qj$}vDN~V&F$+=`Txty%Y?_zRQ?j4tVYsq?Y zCRvvMMw364pH{MzEF>%PyDImu%Jsb5Ta_#Ct;?r#^0_7d(b~o2iafJD*&==HkiQ?1 zJ1g?dvOIa-JvY$x?)KzDGLZA^HTV8`>FJvEU{BKa=KRrdw~}!g^^%Mld|pVlCdZOa z@>m3KYcg)d(xQC(h{MsM8#8#`nv5h9$;o6sX-kWpWJcO)3th(L&R8-jKeYMh^3%$F zb57c5CkN$?@nl-we@yzDlzY>1@0eT<%Kg@zJNnc?`Twx=cPQB=-*x1X$9Fe5I@D2%VS2!6)o z2ReYM5&4~xQS;x3;A+O<^`zVxayZn#!-4_*v^&`?c-SIu%_XPgd1x>u|IN$qxZInN z7N+G2b?uu8Y5Syn%X6pXSHC;q-kO!?XN3~8sk@^B%dE6=*tHfuuPsbTYw$$)&74sE zu<+OsfuSw$^UN0cJt_ToShZK~&dW2Sjwk5}7#U3(I(=?VpqPAZBdvXNbFjWKc$OIfb!<@)Q{2XWPc8 zhTWavS}k{k8ka?mKxM-o+z8LpzT!!-w!5o+Ml#`eDh~gEj0?SXMaD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013 23:07:02 +0100 Subject: [PATCH 02/27] Fix antialiasing option --- Qt/EmuThread.cpp | 4 ++-- Qt/mainwindow.cpp | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Qt/EmuThread.cpp b/Qt/EmuThread.cpp index 0246fb9fb4..44c3fc6366 100644 --- a/Qt/EmuThread.cpp +++ b/Qt/EmuThread.cpp @@ -189,8 +189,8 @@ void EmuThread::run() coreParameter.enableDebugging = true; coreParameter.printfEmuLog = false; coreParameter.headLess = false; - coreParameter.renderWidth = 480 * g_Config.iWindowZoom; - coreParameter.renderHeight = 272 * g_Config.iWindowZoom; + coreParameter.renderWidth = (480 * g_Config.iWindowZoom) * (g_Config.SSAntiAliasing + 1); + coreParameter.renderHeight = (272 * g_Config.iWindowZoom) * (g_Config.SSAntiAliasing + 1); coreParameter.outputWidth = dp_xres; coreParameter.outputHeight = dp_yres; coreParameter.pixelWidth = pixel_xres; diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 66d3d194f1..057463968a 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -248,6 +248,7 @@ void MainWindow::UpdateMenus() ui->action_AF4x->setChecked(g_Config.iAnisotropyLevel == 4); ui->action_AF8x->setChecked(g_Config.iAnisotropyLevel == 8); ui->action_AF16x->setChecked(g_Config.iAnisotropyLevel == 16); + ui->action_Simple_2xAA->setChecked(g_Config.SSAntiAliasing); ui->action_Show_FPS_counter->setChecked(g_Config.bShowFPSCounter); bool enable = !Core_IsStepping() ? false : true; @@ -311,6 +312,18 @@ void MainWindow::SetZoom(float zoom) { PSP_CoreParameter().pixelWidth = pixel_xres; PSP_CoreParameter().pixelHeight = pixel_yres; + PSP_CoreParameter().outputWidth = pixel_xres; + PSP_CoreParameter().outputHeight = pixel_yres; + + if (g_Config.SSAntiAliasing) + { + zoom *= 2; + PSP_CoreParameter().renderWidth = 480 * zoom; + PSP_CoreParameter().renderHeight = 272 * zoom; + } + + if (gpu) + gpu->Resized(); } void MainWindow::on_action_FileLoad_triggered() @@ -613,10 +626,14 @@ void MainWindow::on_action_OptionsFullScreen_triggered() int height = (int) QApplication::desktop()->screenGeometry().height(); PSP_CoreParameter().pixelWidth = width; PSP_CoreParameter().pixelHeight = height; - PSP_CoreParameter().renderWidth = width; - PSP_CoreParameter().renderHeight = height; PSP_CoreParameter().outputWidth = width; PSP_CoreParameter().outputHeight = height; + + int antialias = 1; + if (g_Config.SSAntiAliasing) antialias = 2; + PSP_CoreParameter().renderWidth = width * antialias; + PSP_CoreParameter().renderHeight = height * antialias; + pixel_xres = width; pixel_yres = height; dp_xres = pixel_xres; From 3ac471eb2f737d2aca93a456b638631af4e68c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Miko=C5=82ajczyk?= Date: Wed, 13 Feb 2013 23:08:55 +0100 Subject: [PATCH 03/27] Rearrangement of Qt menu --- Qt/mainwindow.cpp | 16 ++++++ Qt/mainwindow.h | 4 ++ Qt/mainwindow.ui | 127 +++++++++++++++++++++++++++++----------------- 3 files changed, 101 insertions(+), 46 deletions(-) diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 057463968a..c951d70f53 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -250,6 +250,8 @@ void MainWindow::UpdateMenus() ui->action_AF16x->setChecked(g_Config.iAnisotropyLevel == 16); ui->action_Simple_2xAA->setChecked(g_Config.SSAntiAliasing); ui->action_Show_FPS_counter->setChecked(g_Config.bShowFPSCounter); + ui->action_Stretch_to_display->setChecked(g_Config.bStretchToDisplay); + ui->action_Sound->setChecked(g_Config.bEnableSound); bool enable = !Core_IsStepping() ? false : true; ui->action_EmulationRun->setEnabled(g_State.bEmuThreadStarted ? enable : false); @@ -1011,3 +1013,17 @@ void MainWindow::on_action_Show_FPS_counter_triggered() g_Config.bShowFPSCounter = !g_Config.bShowFPSCounter; UpdateMenus(); } + +void MainWindow::on_action_Stretch_to_display_triggered() +{ + g_Config.bStretchToDisplay = !g_Config.bStretchToDisplay; + UpdateMenus(); + if (gpu) + gpu->Resized(); +} + +void MainWindow::on_action_Sound_triggered() +{ + g_Config.bEnableSound = !g_Config.bEnableSound; + UpdateMenus(); +} diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 81603a641f..9b83c867ae 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -167,6 +167,10 @@ private slots: void on_action_Show_FPS_counter_triggered(); + void on_action_Stretch_to_display_triggered(); + + void on_action_Sound_triggered(); + private: void loadLanguage(const QString &language); void createLanguageMenu(); diff --git a/Qt/mainwindow.ui b/Qt/mainwindow.ui index 78eeedfad9..a167aad884 100644 --- a/Qt/mainwindow.ui +++ b/Qt/mainwindow.ui @@ -71,10 +71,6 @@ - - - - @@ -96,7 +92,7 @@ - &Log Levels + Lo&g Levels @@ -130,54 +126,77 @@ - - - Zoom - - - - - - - Language + &Language - + - Anisotropic filtering + &Video - - - - - + + + &Anisotropic filtering + + + + + + + + + + &Zoom + + + + + + + + + + + + + + + + + + + - - + + + Co&ntrols + + + + + + + &Core + + + + + + + + + + + + - - - - - - - - - - - - - - - @@ -339,12 +358,12 @@ - Keyboard &Controls + &Keyboard - &Toggle Full Screen + &Toggle fullscreen F12 @@ -401,7 +420,7 @@ true - &Show Debug Statistics + Show &debug statistics @@ -461,7 +480,7 @@ true - &Ignore illegal reads/writes + I&gnore illegal reads/writes @@ -580,12 +599,12 @@ - GamePad Controls + &Gamepad - &Run on load + Run on loa&d @@ -659,7 +678,23 @@ true - Show FPS counter + Show &FPS counter + + + + + true + + + S&tretch to display + + + + + true + + + &Sound emulation From ddb7d849b34836bcb12d8f16e6b32597f1c621b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Miko=C5=82ajczyk?= Date: Wed, 13 Feb 2013 23:50:52 +0100 Subject: [PATCH 04/27] Update translation files --- Qt/languages/ppsspp_cn.ts | 289 ++++++++++++++++---------------- Qt/languages/ppsspp_de.ts | 337 ++++++++++++++++++++------------------ Qt/languages/ppsspp_en.ts | 329 ++++++++++++++++++++----------------- Qt/languages/ppsspp_fr.ts | 335 +++++++++++++++++++------------------ Qt/languages/ppsspp_pl.ts | 265 ++++++++++++++++-------------- Qt/languages/ppsspp_tc.ts | 289 ++++++++++++++++---------------- 6 files changed, 977 insertions(+), 867 deletions(-) diff --git a/Qt/languages/ppsspp_cn.ts b/Qt/languages/ppsspp_cn.ts index da1d206f1c..7e628dd6f7 100644 --- a/Qt/languages/ppsspp_cn.ts +++ b/Qt/languages/ppsspp_cn.ts @@ -3,10 +3,6 @@ Controls - - Controls - 控制器 - Controls @@ -71,10 +67,6 @@ New function name: - - New function name : - 新函数名称: - CtrlMemView @@ -126,17 +118,9 @@ Set new value: - - Set new value : - 设置新值: - Debugger_Disasm - - Dialog - 对话框 - Disassembler @@ -351,10 +335,6 @@ Debugger_VFPU - - Dialog - 对话框 - VFPU @@ -520,400 +500,425 @@ (&E)模拟 - + Debu&g (&G)调试 - + &Options (&O)选项 - &Log Levels - (&L)日志级别 - - - G3D - + HLE - + Default 默认 - - Zoom - 缩放 - - - - Language - 语言 - - - - Anisotropic filtering + + Lo&g Levels - + + &Language + + + + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help (&H)帮助 - + &Open... (&O)打开... - + &Close (&C)关闭 - + - - - + Quickload state 快速读档 - + F4 F4 - + Quicksave state 快速存档 - + F2 F2 - + &Load State File... (&L)读取存档... - + &Save State File... (&S)保存存档... - + E&xit (&X)退出 - + &Run (&R)运行 - + F7 F7 - + &Pause (&P)暂停 - + F8 F8 - + R&eset (&E)重置 - + &Interpreter (&I)解释器 - + &Slightly Faster Interpreter (&S)较快的解释器 - + &Dynarec (&D)动态重编译 - + Load &Map File... (&M)读取Map文件... - + &Save Map File... (&S)保存Map文件... - + &Reset Symbol Table (&R)重置符号表 - + &Disassembly (&D)汇编视图 - + Ctrl+D Ctrl+D - + &Log Console (&L)查看控制台日志 - + Ctrl+L Ctrl+L - + Memory &View... (&V)内存视图... - + Ctrl+M Ctrl+M - - Keyboard &Controls - (&C)键盘与控制 + + &Keyboard + - - &Toggle Full Screen - (&T)全屏幕 + + &Toggle fullscreen + - + + Show &debug statistics + + + + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + F12 F12 - + &Buffered Rendering (&B)渲染缓冲 - + F5 F5 - + &Hardware Transform (&H)硬件加速 - + F6 F6 - + &Linear Filtering (&L)线性过滤 - + &Wireframe (experimental) (&W)使用线框 (实验性选项) - + &Display Raw Framebuffer (&D)显示 Raw 原始缓冲 - - &Show Debug Statistics - (&S)显示调试统计 - - - + Screen &1x &1倍窗口 - + Ctrl+1 Ctrl+1 - + Screen &2x &2倍窗口 - + Ctrl+2 Ctrl+2 - + Screen &3x &3倍窗口 - + Ctrl+3 Ctrl+3 - + Screen &4x &4倍窗口 - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) (&F)高速闪存 (动态重编译,不稳定) - - &Ignore illegal reads/writes - (&I)忽略非法读取/写入 - - - + &Go to http://www.ppsspp.org/ (&G)转到 http://www.ppsspp.org/ - + &About PPSSPP... (&A)关于 PPSSPP... - + &Use VBO (&U)使用 VBO - - - + + + Debug 调试 - - - + + + Warning 警告 - - - + + + Error 错误 - - - + + + Info 信息 - - GamePad Controls - 手柄控制 - - - - &Run on load - (&R)加载后立即执行 - - - + D&ump next frame to log (&U)将下一帧转储至日志 - + &Vertex Cache (&V)顶点缓存 - + Memory View Texture... 内存纹理视图... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations 未翻译 diff --git a/Qt/languages/ppsspp_de.ts b/Qt/languages/ppsspp_de.ts index 9ae06e04b2..d079c15859 100644 --- a/Qt/languages/ppsspp_de.ts +++ b/Qt/languages/ppsspp_de.ts @@ -391,7 +391,7 @@ Select - + Select @@ -499,400 +499,425 @@ - + Debu&g - + &Options &Optionen - &Log Levels - - - - G3D - + HLE - + Default Standard - - Zoom + + Lo&g Levels - - Language - Sprache - - - - Anisotropic filtering + + &Language - + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help &Hilfe - + &Open... &Öffnen... - + &Close &Schließen - + - - + Quickload state Schnellladen - + F4 - + Quicksave state Schnellspeichern - + F2 - + &Load State File... &Lade Spielstand... - + &Save State File... &Speichere Spielstand... - + E&xit - + &Run &Starte - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter &etwas scnellerer Interpreter - + &Dynarec - + Load &Map File... Lade &Map Dateien... - + &Save Map File... &Speichere Map Dateien... - + &Reset Symbol Table &Setze Symboltabelle zurück - + &Disassembly - + Ctrl+D - + &Log Console &Log Konsole - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - Tastatur &Tastenbelegung - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_en.ts b/Qt/languages/ppsspp_en.ts index 5d3846f784..47519c0180 100644 --- a/Qt/languages/ppsspp_en.ts +++ b/Qt/languages/ppsspp_en.ts @@ -499,400 +499,425 @@ - + Debu&g - + &Options - &Log Levels - - - - G3D - + HLE - + Default - - Zoom + + Lo&g Levels - - Language + + &Language - - Anisotropic filtering + + &Video - + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help - + &Open... - + &Close - + - - + Quickload state - + F4 - + Quicksave state - + F2 - + &Load State File... - + &Save State File... - + E&xit - + &Run - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter - + &Dynarec - + Load &Map File... - + &Save Map File... - + &Reset Symbol Table - + &Disassembly - + Ctrl+D - + &Log Console - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_fr.ts b/Qt/languages/ppsspp_fr.ts index 9b18ae76b0..ce5006357e 100644 --- a/Qt/languages/ppsspp_fr.ts +++ b/Qt/languages/ppsspp_fr.ts @@ -499,400 +499,425 @@ &Emulation - + Debu&g Debu&g - + &Options &Options - &Log Levels - Niveaux de &logs - - - G3D - + HLE - + Default Défaut - - Zoom + + Lo&g Levels - - Language - Langue - - - - Anisotropic filtering + + &Language - + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help &Aide - + &Open... &Ouvrir... - + &Close &Fermer - + - - + Quickload state - + F4 - + Quicksave state - + F2 - + &Load State File... - + &Save State File... - + E&xit &Quitter - + &Run - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter - + &Dynarec - + Load &Map File... - + &Save Map File... - + &Reset Symbol Table - + &Disassembly - + Ctrl+D - + &Log Console - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_pl.ts b/Qt/languages/ppsspp_pl.ts index d052a3702a..930d85663c 100644 --- a/Qt/languages/ppsspp_pl.ts +++ b/Qt/languages/ppsspp_pl.ts @@ -7,7 +7,7 @@ Controls Controls window title - Układ klawiszy + Układ klawiszy @@ -499,400 +499,425 @@ &Emulacja - + Debu&g &Debugger - + &Options &Opcje - &Log Levels - P&oziomy logowania - - - G3D G3D - + HLE HLE - + Default Domyślne - - Zoom - Zoom + + Lo&g Levels + &Poziomy logowania - - Language - Język + + &Language + &Język - - Anisotropic filtering - Filtrowanie anizotropowe + + &Video + &Wideo - + + &Anisotropic filtering + &Filtrowanie anizotropowe + + + + &Zoom + &Powiększenie + + + + Co&ntrols + S&terowanie + + + + &Core + Jądr&o + + + &Help Pomo&c - + &Open... &Otwórz... - + &Close &Zamknij - + - - + Quickload state Wczytaj stan - + F4 F4 - + Quicksave state Zapisz stan - + F2 F2 - + &Load State File... &Wczytaj plik stanu... - + &Save State File... &Zapisz plik stanu... - + E&xit Wyj&dź - + &Run &Uruchom - + F7 F7 - + &Pause &Pauza - + F8 F8 - + R&eset &Reset - + &Interpreter &Interpreter - + &Slightly Faster Interpreter &Szybszy interpreter - + &Dynarec R&ekompilacja (Dynarec) - + Load &Map File... &Wczytaj plik mapy... - + &Save Map File... &Zapisz plik mapy... - + &Reset Symbol Table Zresetuj &tablicę symboli - + &Disassembly &Deasembler - + Ctrl+D Ctrl+D - + &Log Console &Konsola logowania - + Ctrl+L Ctrl+L - + Memory &View... Widok &pamięci... - + Ctrl+M Ctrl+M - - Keyboard &Controls - Ustawienia &klawiatury + + &Keyboard + &Klawiatura - - &Toggle Full Screen - &Pełny ekran + + &Toggle fullscreen + Pełny &ekran - + + Show &debug statistics + Pokaż &statystyki + + + + I&gnore illegal reads/writes + I&gnoruj błędne odczyty/zapisy + + + + &Gamepad + &Pad + + + + Run on loa&d + Uruchom po &załadowaniu + + + + Show &FPS counter + Pokaż licznik &FPS + + + + S&tretch to display + &Rozciągnij obraz + + + + &Sound emulation + &Emulacja dźwięku + + + F12 F12 - + &Buffered Rendering &Buforowane renderowanie - + F5 F5 - + &Hardware Transform Sprzętowa &transformacja - + F6 F6 - + &Linear Filtering Filtrowanie &liniowe - + &Wireframe (experimental) &Widok siatki (eksperymentalny) - + &Display Raw Framebuffer Wyświetl &surowy framebuffer - - &Show Debug Statistics - Pokaż statystyki &emulacji - - - + Screen &1x &1x - + Ctrl+1 Ctrl+1 - + Screen &2x &2x - + Ctrl+2 Ctrl+2 - + Screen &3x &3x - + Ctrl+3 Ctrl+3 - + Screen &4x &4x - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) S&zybka pamięć (wymagany Dynarec, niestabilne) - - &Ignore illegal reads/writes - &Ignoruj nieprawidłowe odczyty/zapisy - - - + &Go to http://www.ppsspp.org/ &Idź do http://www.ppsspp.org - + &About PPSSPP... &O PPSSPP... - + &Use VBO Użyj &VBO - - - + + + Debug Debug - - - + + + Warning Ostrzeżenia - - - + + + Error Błędy - - - + + + Info Info - - GamePad Controls - Ustawienia pada - - - - &Run on load - Uruchom po &załadowaniu - - - + D&ump next frame to log Z&rzuć następną ramkę do logu - + &Vertex Cache &Cache wierzchołków - + Memory View Texture... - + Simple 2xAA Prosty antyaliasing 2x - + Off Wyłączone - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x - - Show FPS counter - Pokaż licznik FPS - - - + No translations Brak tłumaczeń diff --git a/Qt/languages/ppsspp_tc.ts b/Qt/languages/ppsspp_tc.ts index 2b760daad7..a42937ece9 100644 --- a/Qt/languages/ppsspp_tc.ts +++ b/Qt/languages/ppsspp_tc.ts @@ -3,10 +3,6 @@ Controls - - Controls - 控制器 - Controls @@ -71,10 +67,6 @@ New function name: - - New function name : - 新函數名稱: - CtrlMemView @@ -126,17 +118,9 @@ Set new value: - - Set new value : - 設置新值: - Debugger_Disasm - - Dialog - 對話框 - Disassembler @@ -351,10 +335,6 @@ Debugger_VFPU - - Dialog - 對話框 - VFPU @@ -520,400 +500,425 @@ (&E)模擬 - + Debu&g (&G)除錯 - + &Options (&O)選項 - &Log Levels - (&L)日誌級別 - - - G3D - + HLE - + Default 默認 - - Zoom - 縮放 - - - - Language - 語言 - - - - Anisotropic filtering + + Lo&g Levels - + + &Language + + + + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help (&H)幫助 - + &Open... (&O)打開... - + &Close (&C)關閉 - + - - - + Quickload state 快速讀檔 - + F4 F4 - + Quicksave state 快速存檔 - + F2 F2 - + &Load State File... (&L)讀取存檔... - + &Save State File... (&S)保存存檔... - + E&xit (&X)退出 - + &Run (&R)運行 - + F7 F7 - + &Pause (&P)暫停 - + F8 F8 - + R&eset (&E)重置 - + &Interpreter (&I)解釋器 - + &Slightly Faster Interpreter (&S)較快的解釋器 - + &Dynarec (&D)動態解釋器 - + Load &Map File... (&M)讀取Map文件... - + &Save Map File... (&S)保存Map文件... - + &Reset Symbol Table (&R)重置符號表 - + &Disassembly (&D)反彙編器 - + Ctrl+D Ctrl+D - + &Log Console (&L)查看控制台日誌 - + Ctrl+L Ctrl+L - + Memory &View... (&V)內存視圖... - + Ctrl+M Ctrl+M - - Keyboard &Controls - (&C)鍵盤與控制 + + &Keyboard + - - &Toggle Full Screen - (&T)全屏幕 + + &Toggle fullscreen + - + + Show &debug statistics + + + + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + F12 F12 - + &Buffered Rendering (&B)渲染緩衝 - + F5 F5 - + &Hardware Transform (&H)硬件加速 - + F6 F6 - + &Linear Filtering (&L)線性過濾 - + &Wireframe (experimental) (&W)使用線框 (實驗性) - + &Display Raw Framebuffer (&D)顯示原始?緩衝 - - &Show Debug Statistics - (&S)顯示除錯資料 - - - + Screen &1x &1倍窗口 - + Ctrl+1 Ctrl+1 - + Screen &2x &2倍窗口 - + Ctrl+2 Ctrl+2 - + Screen &3x &3倍窗口 - + Ctrl+3 Ctrl+3 - + Screen &4x &4倍窗口 - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) (&F)高速閃存 (動態重編譯,不穩定) - - &Ignore illegal reads/writes - (&I)忽略非法讀取/寫入 - - - + &Go to http://www.ppsspp.org/ (&G)轉到 http://www.ppsspp.org/ - + &About PPSSPP... (&A)關於 PPSSPP... - + &Use VBO (&U)使用 VBO - - - + + + Debug 除錯 - - - + + + Warning 警告 - - - + + + Error 錯誤 - - - + + + Info 信息 - - GamePad Controls - 手柄控制 - - - - &Run on load - (&R)加載後立即執行 - - - + D&ump next frame to log (&U)將下一幀轉儲至日誌 - + &Vertex Cache (&V)頂點緩存 - + Memory View Texture... 內存紋理視圖... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations 未翻譯 From b0690f6ab86c74d9c8776afbdee1bdd885cff20a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 13 Feb 2013 08:04:47 -0800 Subject: [PATCH 05/27] Enable Comp_VPFX. --- Core/MIPS/ARM/ArmCompVFPU.cpp | 5 +++++ Core/MIPS/ARM/ArmJit.h | 5 +++-- Core/MIPS/MIPSTables.cpp | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 218da28757..216044a854 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -20,6 +20,11 @@ namespace MIPSComp { + void Jit::Comp_VPFX(u32 op) + { + DISABLE; + } + void Jit::Comp_SVQ(u32 op) { DISABLE; diff --git a/Core/MIPS/ARM/ArmJit.h b/Core/MIPS/ARM/ArmJit.h index a5bd368f7d..d3e4d9524e 100644 --- a/Core/MIPS/ARM/ArmJit.h +++ b/Core/MIPS/ARM/ArmJit.h @@ -103,13 +103,14 @@ public: void Comp_FPU3op(u32 op); void Comp_FPU2op(u32 op); void Comp_mxc1(u32 op); - void Comp_Mftv(u32 op); - void Comp_VDot(u32 op); void Comp_DoNothing(u32 op); void Comp_SV(u32 op); void Comp_SVQ(u32 op); + void Comp_VPFX(u32 op); + void Comp_VDot(u32 op); + void Comp_Mftv(u32 op); ArmJitBlockCache *GetBlockCache() { return &blocks; } diff --git a/Core/MIPS/MIPSTables.cpp b/Core/MIPS/MIPSTables.cpp index 8e1b0a0f1a..d38882a0e3 100644 --- a/Core/MIPS/MIPSTables.cpp +++ b/Core/MIPS/MIPSTables.cpp @@ -613,12 +613,12 @@ const MIPSInstruction tableVFPU4[32] = //110100 00000 xxxxx MIPSInstruction tableVFPU5[8] = //110111 xxx { - INSTR("vpfxs",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxs",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxt",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxt",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxd", &Jit::Comp_Generic, Dis_VPFXD, Int_VPFX, IS_VFPU), - INSTR("vpfxd", &Jit::Comp_Generic, Dis_VPFXD, Int_VPFX, IS_VFPU), + INSTR("vpfxs",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxs",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxt",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxt",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxd", &Jit::Comp_VPFX, Dis_VPFXD, Int_VPFX, IS_VFPU), + INSTR("vpfxd", &Jit::Comp_VPFX, Dis_VPFXD, Int_VPFX, IS_VFPU), INSTR("viim.s",&Jit::Comp_Generic, Dis_Viim,Int_Viim, IS_VFPU), INSTR("vfim.s",&Jit::Comp_Generic, Dis_Viim,Int_Viim, IS_VFPU), }; From 4789a8e5eb8cb4242c1da5fdef085e3c3f0e6b35 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 13 Feb 2013 21:05:24 -0800 Subject: [PATCH 06/27] Oops, can't have CONDITIONAL_DISABLE here, no op. --- Core/MIPS/x86/CompFPU.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/MIPS/x86/CompFPU.cpp b/Core/MIPS/x86/CompFPU.cpp index 03503769b1..e29aabe9d6 100644 --- a/Core/MIPS/x86/CompFPU.cpp +++ b/Core/MIPS/x86/CompFPU.cpp @@ -166,8 +166,6 @@ enum void Jit::CompFPComp(int lhs, int rhs, u8 compare, bool allowNaN) { - CONDITIONAL_DISABLE; - MOVSS(XMM0, fpr.R(lhs)); CMPSS(XMM0, fpr.R(rhs), compare); MOVSS(M((void *) ¤tMIPS->fpcond), XMM0); From abe390e6f3a25b6b54ab16bea99595a13bfe5057 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 13 Feb 2013 23:56:10 -0800 Subject: [PATCH 07/27] Add some checks for fpu/vfpu writing to $0. --- Core/MIPS/MIPSInt.cpp | 4 ++-- Core/MIPS/MIPSIntVFPU.cpp | 19 ++++++++++--------- Core/MIPS/x86/CompFPU.cpp | 15 +++++++++------ Core/MIPS/x86/CompVFPU.cpp | 25 +++++++++++++------------ 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 3c593aeb20..9fb5d01308 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -517,8 +517,8 @@ namespace MIPSInt switch((op>>21)&0x1f) { - case 0: R(rt) = FI(fs); break; //mfc1 - case 2: R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 + case 0: if (rt != 0) R(rt) = FI(fs); break; //mfc1 + case 2: if (rt != 0) R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 case 4: FI(fs) = R(rt); break; //mtc1 case 6: currentMIPS->WriteFCR(fs, R(rt)); break; //ctc1 diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index b2b7d07831..edfa630ec3 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1336,15 +1336,16 @@ namespace MIPSInt switch ((op >> 21) & 0x1f) { case 3: //mfv / mfvc - if (imm < 128) { - R(rt) = VI(imm); - } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc - R(rt) = currentMIPS->vfpuCtrl[imm - 128]; - } else if (rt == 0 && imm == 255) { - // This appears to be used as a CPU interlock by some games. Do nothing. - } else { - //ERROR - maybe need to make this value too an "interlock" value? - _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + // rt = 0, imm = 255 appears to be used as a CPU interlock by some games. + if (rt != 0) { + if (imm < 128) { + R(rt) = VI(imm); + } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc + R(rt) = currentMIPS->vfpuCtrl[imm - 128]; + } else { + //ERROR - maybe need to make this value too an "interlock" value? + _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + } } break; diff --git a/Core/MIPS/x86/CompFPU.cpp b/Core/MIPS/x86/CompFPU.cpp index e29aabe9d6..1e6b01d465 100644 --- a/Core/MIPS/x86/CompFPU.cpp +++ b/Core/MIPS/x86/CompFPU.cpp @@ -311,12 +311,15 @@ void Jit::Comp_mxc1(u32 op) switch((op >> 21) & 0x1f) { case 0: // R(rt) = FI(fs); break; //mfc1 - // Cross move! slightly tricky - fpr.StoreFromRegister(fs); - gpr.Lock(rt); - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), fpr.R(fs)); - gpr.UnlockAll(); + if (rt != 0) + { + // Cross move! slightly tricky + fpr.StoreFromRegister(fs); + gpr.Lock(rt); + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), fpr.R(fs)); + gpr.UnlockAll(); + } return; case 2: // R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 19c9725cb0..66092e867f 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -334,18 +334,19 @@ void Jit::Comp_Mftv(u32 op) { switch ((op >> 21) & 0x1f) { case 3: //mfv / mfvc - if (imm < 128) { //R(rt) = VI(imm); - fpr.StoreFromRegisterV(imm); - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), fpr.V(imm)); - } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); - } else if (rt == 0 && imm == 255) { - // This appears to be used as a CPU interlock by some games. Do nothing. - } else { - //ERROR - maybe need to make this value too an "interlock" value? - _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + // rt = 0, imm = 255 appears to be used as a CPU interlock by some games. + if (rt != 0) { + if (imm < 128) { //R(rt) = VI(imm); + fpr.StoreFromRegisterV(imm); + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), fpr.V(imm)); + } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); + } else { + //ERROR - maybe need to make this value too an "interlock" value? + _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + } } break; From 3b58cc27bdfa437977ad5bd80d27683d6e3a4f37 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 14 Feb 2013 00:02:15 -0800 Subject: [PATCH 08/27] Oops, vfpu was missing CONDITIONAL_DISABLEs. --- Core/MIPS/x86/CompVFPU.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 66092e867f..2f06fec83c 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -56,6 +56,7 @@ const u32 GC_ALIGNED16( signBitLower[4] ) = {0x80000000, 0, 0, 0}; void Jit::Comp_VPFX(u32 op) { + CONDITIONAL_DISABLE; int data = op & 0xFFFFF; int regnum = (op >> 24) & 3; switch (regnum) { @@ -142,7 +143,7 @@ void Jit::ApplyPrefixD(const u8 *vregs, u32 prefix, VectorSize sz, bool onlyWrit static u32 GC_ALIGNED16(ssLoadStoreTemp[1]); void Jit::Comp_SV(u32 op) { - // DISABLE; + CONDITIONAL_DISABLE; s32 imm = (signed short)(op&0xFFFC); int vt = ((op >> 16) & 0x1f) | ((op & 3) << 5); @@ -208,6 +209,8 @@ void Jit::Comp_SV(u32 op) { void Jit::Comp_SVQ(u32 op) { + CONDITIONAL_DISABLE; + int imm = (signed short)(op&0xFFFC); int vt = (((op >> 16) & 0x1f)) | ((op&1) << 5); int rs = _RS; @@ -329,6 +332,8 @@ void Jit::Comp_VDot(u32 op) { } void Jit::Comp_Mftv(u32 op) { + CONDITIONAL_DISABLE; + int imm = op & 0xFF; int rt = _RT; switch ((op >> 21) & 0x1f) From 4eca76e0cc48cf653a7313a84ec4d3d8910caf6a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 14 Feb 2013 00:25:32 -0800 Subject: [PATCH 09/27] Check for s/t/d prefix reg changes in jit. --- Core/MIPS/ARM/ArmCompVFPU.cpp | 4 ++++ Core/MIPS/ARM/ArmJit.h | 1 + Core/MIPS/x86/CompVFPU.cpp | 28 ++++++++++++++++++++++++++++ Core/MIPS/x86/Jit.h | 1 + 4 files changed, 34 insertions(+) diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 216044a854..432874e9cc 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -44,4 +44,8 @@ namespace MIPSComp DISABLE; } + void Jit::Comp_Vmtvc(u32 op) { + DISABLE; + } + } diff --git a/Core/MIPS/ARM/ArmJit.h b/Core/MIPS/ARM/ArmJit.h index d3e4d9524e..26988388b9 100644 --- a/Core/MIPS/ARM/ArmJit.h +++ b/Core/MIPS/ARM/ArmJit.h @@ -111,6 +111,7 @@ public: void Comp_VPFX(u32 op); void Comp_VDot(u32 op); void Comp_Mftv(u32 op); + void Comp_Vmtvc(u32 op); ArmJitBlockCache *GetBlockCache() { return &blocks; } diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 2f06fec83c..c4b0e28072 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -364,6 +364,15 @@ void Jit::Comp_Mftv(u32 op) { } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc //currentMIPS->vfpuCtrl[imm - 128] = R(rt); gpr.BindToRegister(rt, true, false); MOV(32, M(¤tMIPS->vfpuCtrl[imm - 128]), gpr.R(rt)); + + // TODO: Optimization if rt is Imm? + if (imm - 128 == VFPU_CTRL_SPREFIX) { + js.prefixSKnown = false; + } else if (imm - 128 == VFPU_CTRL_TPREFIX) { + js.prefixTKnown = false; + } else if (imm - 128 == VFPU_CTRL_DPREFIX) { + js.prefixDKnown = false; + } } else { //ERROR _dbg_assert_msg_(CPU,0,"mtv - invalid register"); @@ -377,4 +386,23 @@ void Jit::Comp_Mftv(u32 op) { } } +void Jit::Comp_Vmtvc(u32 op) { + CONDITIONAL_DISABLE; + int vs = _VS; + int imm = op & 0xFF; + if (imm >= 128 && imm < 128 + VFPU_CTRL_MAX) { + fpr.MapRegV(vs, 0); + MOVSS(M(¤tMIPS->vfpuCtrl[imm - 128]), fpr.RX(vs)); + fpr.ReleaseSpillLocks(); + + if (imm - 128 == VFPU_CTRL_SPREFIX) { + js.prefixSKnown = false; + } else if (imm - 128 == VFPU_CTRL_TPREFIX) { + js.prefixTKnown = false; + } else if (imm - 128 == VFPU_CTRL_DPREFIX) { + js.prefixDKnown = false; + } + } +} + } \ No newline at end of file diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index 89b3abc09e..e39b93868e 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -141,6 +141,7 @@ public: void Comp_VPFX(u32 op); void Comp_VDot(u32 op); void Comp_Mftv(u32 op); + void Comp_Vmtvc(u32 op); void Comp_DoNothing(u32 op); From a88a7214bf5fc67876976cb2eaa81c365e5c032a Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 14 Feb 2013 07:57:00 -0500 Subject: [PATCH 10/27] Fix parentheses placement in case SCE_UTILITY_SAVEDATA_TYPE_SINGLEDELETE. --- Core/Dialog/PSPSaveDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 2732991d5e..ecb032d694 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -738,7 +738,7 @@ int PSPSaveDialog::Update() status = SCE_UTILITY_STATUS_FINISHED; break; case SCE_UTILITY_SAVEDATA_TYPE_SINGLEDELETE: - if(param.Delete(param.GetPspParam()), param.GetSelectedSave()) + if(param.Delete(param.GetPspParam(), param.GetSelectedSave())) { param.GetPspParam()->result = 0; } From d0ab1c8ffcee88fb1390fa1016f218c8b9eff3e1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 14 Feb 2013 08:32:37 -0800 Subject: [PATCH 11/27] Set VertexReader's vtype_ to prevent oddness. --- GPU/GLES/TransformPipeline.cpp | 2 +- GPU/GLES/VertexDecoder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 10aeb3ef2d..d63269572e 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -454,7 +454,7 @@ void TransformDrawEngine::SoftwareTransformAndDraw( float fog_end = getFloat24(gstate.fog1); float fog_slope = getFloat24(gstate.fog2); - VertexReader reader(decoded, decVtxFormat); + VertexReader reader(decoded, decVtxFormat, vertType); for (int index = 0; index < maxIndex; index++) { reader.Goto(index); diff --git a/GPU/GLES/VertexDecoder.h b/GPU/GLES/VertexDecoder.h index 6e006d7398..611068eef7 100644 --- a/GPU/GLES/VertexDecoder.h +++ b/GPU/GLES/VertexDecoder.h @@ -186,7 +186,7 @@ public: class VertexReader { public: - VertexReader(u8 *base, const DecVtxFormat &decFmt) : base_(base), data_(base), decFmt_(decFmt) {} + VertexReader(u8 *base, const DecVtxFormat &decFmt, int vtype) : base_(base), data_(base), decFmt_(decFmt), vtype_(vtype) {} void ReadPos(float pos[3]) { switch (decFmt_.posfmt) { From 743014a293c1dba8533491111d504713e046cd73 Mon Sep 17 00:00:00 2001 From: Sacha Date: Fri, 15 Feb 2013 02:18:27 +1000 Subject: [PATCH 12/27] Cache flushing for iOS --- Common/ArmEmitter.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Common/ArmEmitter.cpp b/Common/ArmEmitter.cpp index ec3e7655be..0e3e8bdb93 100644 --- a/Common/ArmEmitter.cpp +++ b/Common/ArmEmitter.cpp @@ -22,11 +22,16 @@ #include #include -// For cache flushing on Symbian/Blackberry +// For cache flushing on Symbian/iOS/Blackberry #ifdef __SYMBIAN32__ #include #endif +#ifdef IOS +#include +#include +#endif + #ifdef BLACKBERRY #include #endif @@ -185,13 +190,13 @@ void ARMXEmitter::FlushIcache() void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end) { #ifdef __SYMBIAN32__ - User::IMB_Range( start, end); + User::IMB_Range(start, end); #elif defined(BLACKBERRY) msync(start, end - start, MS_SYNC | MS_INVALIDATE_ICACHE); -#else -#ifndef _WIN32 - __builtin___clear_cache (start, end); -#endif +#elif defined(IOS) + sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start); +#elif !defined(_WIN32) + __builtin___clear_cache(start, end); #endif } From 4feefda8d050632a9799626d4ad5ddb8a778675d Mon Sep 17 00:00:00 2001 From: Sacha Date: Fri, 15 Feb 2013 02:30:10 +1000 Subject: [PATCH 13/27] Symbian build fix: use glib for atomics. --- Common/Atomic_GCC.h | 4 ++++ Qt/Settings.pri | 1 + 2 files changed, 5 insertions(+) diff --git a/Common/Atomic_GCC.h b/Common/Atomic_GCC.h index c6f508cc3d..2ee4622da1 100644 --- a/Common/Atomic_GCC.h +++ b/Common/Atomic_GCC.h @@ -20,6 +20,8 @@ #ifdef BLACKBERRY #include +#elif defined(__SYMBIAN32__) +#include #endif #include "Common.h" @@ -79,6 +81,8 @@ inline void AtomicStore(volatile u32& dest, u32 value) { inline void AtomicStoreRelease(volatile u32& dest, u32 value) { #ifdef BLACKBERRY atomic_set(&dest, value); +#elif defined(__SYMBIAN32__) + g_atomic_int_set(&dest, value); #else __sync_lock_test_and_set(&dest, value); // TODO: Wrong! This function is has acquire semantics. #endif diff --git a/Qt/Settings.pri b/Qt/Settings.pri index f6f24b6c87..953e138ec3 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -42,6 +42,7 @@ symbian: { MMP_RULES -= "ARMFPU softvfp+vfpv2" MMP_RULES += "ARMFPU vfpv2" QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment + INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis/glib-2.0 DEFINES += __MARM_ARMV6__ CONFIG += 4.6.3 } From 2301a3b49ee8d2f23eabd0ba508d5ad2cd9a96dd Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 15 Feb 2013 00:30:02 +0100 Subject: [PATCH 14/27] Flip texcoord vertically when texturing from FBO to compensate for OpenGL coordinate systems --- GPU/GLES/DisplayListInterpreter.cpp | 15 ++++++++++----- GPU/GLES/ShaderManager.cpp | 5 ++++- GPU/GLES/TextureCache.cpp | 29 +++++++++++++++++++++++------ GPU/GLES/TextureCache.h | 1 + GPU/GLES/TransformPipeline.cpp | 2 ++ GPU/GLES/VertexShaderGenerator.cpp | 6 ++++++ GPU/GPUState.h | 2 ++ 7 files changed, 48 insertions(+), 12 deletions(-) diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index d1a8f606db..039fc97910 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -542,22 +542,26 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { break; case GE_CMD_TEXTUREMAPENABLE: - gstate_c.textureChanged = true; + if (diff) + gstate_c.textureChanged = true; break; case GE_CMD_LIGHTINGENABLE: break; case GE_CMD_FOGCOLOR: - shaderManager_->DirtyUniform(DIRTY_FOGCOLOR); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOLOR); break; case GE_CMD_FOG1: - shaderManager_->DirtyUniform(DIRTY_FOGCOEF); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOEF); break; case GE_CMD_FOG2: - shaderManager_->DirtyUniform(DIRTY_FOGCOEF); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOEF); break; case GE_CMD_FOGENABLE: @@ -618,6 +622,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_TEXADDR6: case GE_CMD_TEXADDR7: gstate_c.textureChanged = true; + shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET); break; case GE_CMD_TEXBUFWIDTH0: @@ -667,7 +672,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_TEXSIZE0: gstate_c.curTextureWidth = 1 << (gstate.texsize[0] & 0xf); - gstate_c.curTextureHeight = 1 << ((gstate.texsize[0]>>8) & 0xf); + gstate_c.curTextureHeight = 1 << ((gstate.texsize[0] >> 8) & 0xf); shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET); //fall thru - ignoring the mipmap sizes for now case GE_CMD_TEXSIZE1: diff --git a/GPU/GLES/ShaderManager.cpp b/GPU/GLES/ShaderManager.cpp index c3a91cebf4..6a985c8446 100644 --- a/GPU/GLES/ShaderManager.cpp +++ b/GPU/GLES/ShaderManager.cpp @@ -138,6 +138,7 @@ LinkedShader::LinkedShader(Shader *vs, Shader *fs) glUniform1i(u_tex, 0); // The rest, use the "dirty" mechanism. dirtyUniforms = DIRTY_ALL; + use(); } LinkedShader::~LinkedShader() { @@ -264,8 +265,10 @@ void LinkedShader::updateUniforms() { // Texturing if (u_uvscaleoffset != -1 && (dirtyUniforms & DIRTY_UVSCALEOFFSET)) { - float uvscaleoff[4] = { gstate_c.uScale, gstate_c.vScale, gstate_c.uOff, gstate_c.vOff}; + float uvscaleoff[4] = {gstate_c.uScale, gstate_c.vScale, gstate_c.uOff, gstate_c.vOff}; if (gstate.isModeThrough()) { + // We never get here because we don't use HW transform with through mode. + // Although - why don't we? uvscaleoff[0] /= gstate_c.curTextureWidth; uvscaleoff[1] /= gstate_c.curTextureHeight; uvscaleoff[2] /= gstate_c.curTextureWidth; diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index fdfb3f4257..4b964a274e 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -24,9 +24,20 @@ #include "TextureCache.h" #include "../Core/Config.h" -// If a texture hasn't been seen for 200 frames, get rid of it. +// If a texture hasn't been seen for this many frames, get rid of it. #define TEXTURE_KILL_AGE 200 -float maxAnisotropyLevel ; + +u32 RoundUpToPowerOf2(u32 v) +{ + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return v; +} TextureCache::TextureCache() { lastBoundTexture = -1; @@ -681,22 +692,28 @@ void TextureCache::SetTexture() { TexCache::iterator iter = cache.find(cachekey); TexCacheEntry *entry = NULL; + gstate_c.flipTexture = false; + if (iter != cache.end()) { entry = &iter->second; // Check for FBO - slow! if (entry->fbo) { + int w = 1 << (gstate.texsize[0] & 0xf); + int h = 1 << ((gstate.texsize[0] >> 8) & 0xf); + fbo_bind_color_as_texture(entry->fbo, 0); UpdateSamplingParams(*entry, false); int fbow, fboh; fbo_get_dimensions(entry->fbo, &fbow, &fboh); - // Almost certain this isn't right. - gstate_c.curTextureWidth = fbow; - gstate_c.curTextureHeight = fboh; + // This isn't right. + gstate_c.curTextureWidth = w; //w; //RoundUpToPowerOf2(fbow); + gstate_c.curTextureHeight = h; // RoundUpToPowerOf2(fboh); + gstate_c.flipTexture = true; + entry->lastFrame = gpuStats.numFrames; return; } - //Validate the texture here (width, height etc) int dim = gstate.texsize[0] & 0xF0F; diff --git a/GPU/GLES/TextureCache.h b/GPU/GLES/TextureCache.h index 881e672902..bb1958c365 100644 --- a/GPU/GLES/TextureCache.h +++ b/GPU/GLES/TextureCache.h @@ -101,5 +101,6 @@ private: u16 *clutBuf16; int lastBoundTexture; + float maxAnisotropyLevel; }; diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index d63269572e..c20b60e130 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -642,6 +642,8 @@ void TransformDrawEngine::SoftwareTransformAndDraw( memcpy(&transformed[index].x, v, 3 * sizeof(float)); transformed[index].fog = fogCoef; memcpy(&transformed[index].u, uv, 2 * sizeof(float)); + if (gstate_c.flipTexture) + transformed[index].v = 1.0f - transformed[index].v * 2.0f; for (int i = 0; i < 4; i++) { transformed[index].color0[i] = c0[i] * 255.0f; } diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index f9da12ed74..b5a5edb19e 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -60,6 +60,9 @@ void ComputeVertexShaderID(VertexShaderID *id, int prim) id->d[0] |= ((int)enableFog) << 2; id->d[0] |= doTexture << 3; id->d[0] |= (hasColor & 1) << 4; + if (doTexture) + id->d[0] |= (gstate_c.flipTexture & 1) << 5; + if (CanUseHardwareTransform(prim)) { id->d[0] |= 1 << 8; id->d[0] |= (hasNormal & 1) << 9; @@ -139,6 +142,7 @@ void GenerateVertexShader(int prim, char *buffer) { bool hasColor = (gstate.vertType & GE_VTYPE_COL_MASK) != 0 || !hwXForm; bool hasNormal = (gstate.vertType & GE_VTYPE_NRM_MASK) != 0 && hwXForm; bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough() && !gstate.isModeClear(); + bool flipV = gstate_c.flipTexture; DoLightComputation doLight[4] = {LIGHT_OFF, LIGHT_OFF, LIGHT_OFF, LIGHT_OFF}; if (hwXForm) { @@ -396,6 +400,8 @@ void GenerateVertexShader(int prim, char *buffer) { // ILLEGAL break; } + if (flipV) + WRITE(p, " v_texcoord.y = 1.0f - v_texcoord.y;\n"); } // Compute fogdepth diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 516042e892..ca036b2506 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -238,6 +238,8 @@ struct GPUStateCache float uScale,vScale; float uOff,vOff; + bool flipTexture; + float zMin, zMax; float lightpos[4][3]; float lightdir[4][3]; From dfbb7debca8a4660362c8efcb580e2d50900c832 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 15 Feb 2013 00:30:49 +0100 Subject: [PATCH 15/27] Try to make SW t&l more similar to HW t&l. --- GPU/GLES/TransformPipeline.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index c20b60e130..64b7493563 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -223,7 +223,7 @@ Lighter::Lighter() { globalAmbient.GetFromRGB(gstate.ambientcolor); globalAmbient.GetFromA(gstate.ambientalpha); materialAmbient.GetFromRGB(gstate.materialambient); - materialAmbient.a = 1.0f; + materialAmbient.GetFromA(gstate.materialalpha); materialDiffuse.GetFromRGB(gstate.materialdiffuse); materialDiffuse.a = 1.0f; materialSpecular.GetFromRGB(gstate.materialspecular); @@ -283,7 +283,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ bool doSpecular = (comp != GE_LIGHTCOMP_ONLYDIFFUSE); bool poweredDiffuse = comp == GE_LIGHTCOMP_BOTHWITHPOWDIFFUSE; - float dot = toLight * norm; + float dot = toLight.Normalized() * norm; // Clamp dot to zero. if (dot < 0.0f) dot = 0.0f; @@ -300,7 +300,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ } Color4 lightDiff(gstate_c.lightColor[1][l], 0.0f); - Color4 diff = (lightDiff * *diffuse) * (std::max(dot, 0.0f) * lightScale); + Color4 diff = (lightDiff * *diffuse) * (dot * lightScale); // Real PSP specular Vec3 toViewer(0,0,1); @@ -309,22 +309,21 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ if (doSpecular) { - Vec3 halfVec = toLight; - halfVec += toViewer; + Vec3 halfVec = (toLight + toViewer); halfVec.Normalize(); dot = halfVec * norm; - if (dot > 0) + if (dot > 0.0f) { Color4 lightSpec(gstate_c.lightColor[2][l], 0.0f); - lightSum1 += (lightSpec * *specular * (powf(dot, specCoef_) * lightScale)); + lightSum1 += (lightSpec * *specular * (powf(dot, specCoef_) * (dot * lightScale))); } } dots[l] = dot; if (gstate.lightEnable[l] & 1) { - Color4 lightAmbient(gstate_c.lightColor[0][l], 1.0f); - lightSum0 += lightAmbient * *ambient + diff; + Color4 lightAmbient(gstate_c.lightColor[0][l], 0.0f); + lightSum0 += lightAmbient + diff; } } @@ -547,14 +546,6 @@ void TransformDrawEngine::SoftwareTransformAndDraw( if (gstate.lightingEnable & 1) { // Don't ignore gstate.lmode - we should send two colors in that case - if (reader.hasColor0()) { - reader.ReadColor0(litColor0); - } else { - litColor0[0] = (gstate.materialambient & 0xFF) / 255.f; - litColor0[1] = ((gstate.materialambient >> 8) & 0xFF) / 255.f; - litColor0[2] = ((gstate.materialambient >> 16) & 0xFF) / 255.f; - litColor0[3] = (gstate.materialalpha & 0xFF) / 255.f; - } if (gstate.lmode & 1) { // Separate colors for (int j = 0; j < 4; j++) { From 6b2798579692cdb23a26d38b6affd68b1fc8fe49 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 15 Feb 2013 18:43:37 +0800 Subject: [PATCH 16/27] Fix missing character in FF Type-0 in SW T&L --- GPU/GLES/TransformPipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 64b7493563..05297137b6 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -283,7 +283,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ bool doSpecular = (comp != GE_LIGHTCOMP_ONLYDIFFUSE); bool poweredDiffuse = comp == GE_LIGHTCOMP_BOTHWITHPOWDIFFUSE; - float dot = toLight.Normalized() * norm; + float dot = toLight * norm; // Clamp dot to zero. if (dot < 0.0f) dot = 0.0f; From 25562bcea312e3808d4438113339179bc2dcc648 Mon Sep 17 00:00:00 2001 From: porkness Date: Fri, 15 Feb 2013 20:40:16 +0800 Subject: [PATCH 17/27] Update rc file and update to new version --- Windows/ppsspp.rc | Bin 55938 -> 55936 bytes native | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index e43b900747a0d2905639a4c72e450567abd749d6..ae0ec17aca726288296c2fedbdc44e6521e70732 100644 GIT binary patch delta 9 QcmZqL%G|J(c|*f302J2*eE Date: Fri, 15 Feb 2013 22:49:13 +0800 Subject: [PATCH 18/27] Fix HW T&L crash in FF type-0 --- GPU/GLES/VertexShaderGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index b5a5edb19e..d5cb6c1e2c 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -401,7 +401,7 @@ void GenerateVertexShader(int prim, char *buffer) { break; } if (flipV) - WRITE(p, " v_texcoord.y = 1.0f - v_texcoord.y;\n"); + WRITE(p, " v_texcoord.y = 1.0 - v_texcoord.y;\n"); } // Compute fogdepth From f6f2927526abf63ce4d0aef227ff02ec648cbc4d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 15 Feb 2013 00:28:45 -0800 Subject: [PATCH 19/27] Add curlies around DISABLE/CONDITIONAL_DISABLE. --- Core/MIPS/x86/CompALU.cpp | 4 ++-- Core/MIPS/x86/CompFPU.cpp | 4 ++-- Core/MIPS/x86/CompLoadStore.cpp | 4 ++-- Core/MIPS/x86/CompVFPU.cpp | 9 +++------ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Core/MIPS/x86/CompALU.cpp b/Core/MIPS/x86/CompALU.cpp index 1f80c714d7..e7da034134 100644 --- a/Core/MIPS/x86/CompALU.cpp +++ b/Core/MIPS/x86/CompALU.cpp @@ -32,9 +32,9 @@ using namespace MIPSAnalyst; // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE Comp_Generic(op); return; +//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { diff --git a/Core/MIPS/x86/CompFPU.cpp b/Core/MIPS/x86/CompFPU.cpp index 1e6b01d465..f5ac3226ea 100644 --- a/Core/MIPS/x86/CompFPU.cpp +++ b/Core/MIPS/x86/CompFPU.cpp @@ -34,9 +34,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { diff --git a/Core/MIPS/x86/CompLoadStore.cpp b/Core/MIPS/x86/CompLoadStore.cpp index eb37eb9666..f0dc88e1d2 100644 --- a/Core/MIPS/x86/CompLoadStore.cpp +++ b/Core/MIPS/x86/CompLoadStore.cpp @@ -35,9 +35,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index c4b0e28072..ad53308406 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -28,9 +28,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } #define _RS ((op>>21) & 0x1F) @@ -202,8 +202,7 @@ void Jit::Comp_SV(u32 op) { break; default: - _dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted"); - break; + DISABLE; } } @@ -381,8 +380,6 @@ void Jit::Comp_Mftv(u32 op) { default: DISABLE; - _dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted"); - break; } } From ccad259ae5c5436cfff8f1ef837b3368a0ee28b2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 15 Feb 2013 01:12:43 -0800 Subject: [PATCH 20/27] Keep track of VFPU prefixes and flush them in jit. --- Core/MIPS/x86/CompVFPU.cpp | 24 +++++++++++----------- Core/MIPS/x86/Jit.cpp | 28 ++++++++++++++++++++++++++ Core/MIPS/x86/Jit.h | 41 ++++++++++++++++++++++++++------------ 3 files changed, 68 insertions(+), 25 deletions(-) diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index ad53308406..5ef039b99f 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -62,19 +62,17 @@ void Jit::Comp_VPFX(u32 op) switch (regnum) { case 0: // S js.prefixS = data; - js.prefixSKnown = true; + js.prefixSFlag = JitState::PREFIX_KNOWN_DIRTY; break; case 1: // T js.prefixT = data; - js.prefixTKnown = true; + js.prefixTFlag = JitState::PREFIX_KNOWN_DIRTY; break; case 2: // D js.prefixD = data; - js.prefixDKnown = true; + js.prefixDFlag = JitState::PREFIX_KNOWN_DIRTY; break; } - // TODO: Defer this to end of block - MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_SPREFIX + regnum]), Imm32(data)); } @@ -114,7 +112,7 @@ void Jit::ApplyPrefixST(u8 *vregs, u32 prefix, VectorSize sz) { } void Jit::ApplyPrefixD(const u8 *vregs, u32 prefix, VectorSize sz, bool onlyWriteMask) { - _assert_(js.prefixDKnown); + _assert_(js.prefixDFlag & JitState::PREFIX_KNOWN); if (!prefix) return; int n = GetNumVectorElements(sz); @@ -345,6 +343,8 @@ void Jit::Comp_Mftv(u32 op) { gpr.BindToRegister(rt, false, true); MOV(32, gpr.R(rt), fpr.V(imm)); } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc + // In case we have a saved prefix. + FlushAll(); gpr.BindToRegister(rt, false, true); MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); } else { @@ -366,11 +366,11 @@ void Jit::Comp_Mftv(u32 op) { // TODO: Optimization if rt is Imm? if (imm - 128 == VFPU_CTRL_SPREFIX) { - js.prefixSKnown = false; + js.prefixSFlag = JitState::PREFIX_UNKNOWN; } else if (imm - 128 == VFPU_CTRL_TPREFIX) { - js.prefixTKnown = false; + js.prefixTFlag = JitState::PREFIX_UNKNOWN; } else if (imm - 128 == VFPU_CTRL_DPREFIX) { - js.prefixDKnown = false; + js.prefixDFlag = JitState::PREFIX_UNKNOWN; } } else { //ERROR @@ -393,11 +393,11 @@ void Jit::Comp_Vmtvc(u32 op) { fpr.ReleaseSpillLocks(); if (imm - 128 == VFPU_CTRL_SPREFIX) { - js.prefixSKnown = false; + js.prefixSFlag = JitState::PREFIX_UNKNOWN; } else if (imm - 128 == VFPU_CTRL_TPREFIX) { - js.prefixTKnown = false; + js.prefixTFlag = JitState::PREFIX_UNKNOWN; } else if (imm - 128 == VFPU_CTRL_DPREFIX) { - js.prefixDKnown = false; + js.prefixDFlag = JitState::PREFIX_UNKNOWN; } } } diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index dc6a789830..24a3000f11 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -109,6 +109,34 @@ void Jit::FlushAll() { gpr.Flush(); fpr.Flush(); + FlushPrefixV(); +} + +void Jit::FlushPrefixV() +{ + if ((js.prefixSFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_SPREFIX]), Imm32(js.prefixS)); + js.prefixSFlag = (JitState::PrefixState) (js.prefixSFlag & ~JitState::PREFIX_DIRTY); + } + + if ((js.prefixTFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_TPREFIX]), Imm32(js.prefixT)); + js.prefixTFlag = (JitState::PrefixState) (js.prefixTFlag & ~JitState::PREFIX_DIRTY); + } + + if ((js.prefixDFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_DPREFIX]), Imm32(js.prefixD)); + + _dbg_assert_msg_(JIT, sizeof(bool) <= 4, "Bools shouldn't be that big?"); + const size_t bool_stride = 4 / sizeof(bool); + for (size_t i = 0; i < ARRAY_SIZE(mips_->vfpuWriteMask); i += bool_stride) + MOV(32, M((void *)&mips_->vfpuWriteMask[i]), Imm32(*(u32 *)&js.writeMask[i])); + + js.prefixDFlag = (JitState::PrefixState) (js.prefixDFlag & ~JitState::PREFIX_DIRTY); + } } void Jit::WriteDowncount(int offset) diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index e39b93868e..080375ba7b 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -48,6 +48,14 @@ struct JitOptions struct JitState { + enum PrefixState + { + PREFIX_UNKNOWN = 0x00, + PREFIX_KNOWN = 0x01, + PREFIX_DIRTY = 0x10, + PREFIX_KNOWN_DIRTY = 0x11, + }; + u32 compilerPC; u32 blockStart; bool cancel; @@ -62,22 +70,28 @@ struct JitState u32 prefixT; u32 prefixD; bool writeMask[4]; - bool prefixSKnown; - bool prefixTKnown; - bool prefixDKnown; + PrefixState prefixSFlag; + PrefixState prefixTFlag; + PrefixState prefixDFlag; void PrefixStart() { - prefixSKnown = false; - prefixTKnown = false; - prefixDKnown = false; + prefixSFlag = PREFIX_UNKNOWN; + prefixTFlag = PREFIX_UNKNOWN; + prefixDFlag = PREFIX_UNKNOWN; } void EatPrefix() { - prefixSKnown = true; - prefixTKnown = true; - prefixDKnown = true; - prefixS = 0xE4; - prefixT = 0xE4; - prefixD = 0x0; - writeMask[0] = writeMask[1] = writeMask[2] = writeMask[3] = false; + if ((prefixSFlag & PREFIX_KNOWN) == 0 || prefixS != 0xE4) { + prefixSFlag = PREFIX_KNOWN_DIRTY; + prefixS = 0xE4; + } + if ((prefixTFlag & PREFIX_KNOWN) == 0 || prefixT != 0xE4) { + prefixTFlag = PREFIX_KNOWN_DIRTY; + prefixT = 0xE4; + } + if ((prefixDFlag & PREFIX_KNOWN) == 0 || prefixD != 0x0 || writeMask[0] || writeMask[1] || writeMask[2] || writeMask[3]) { + prefixDFlag = PREFIX_KNOWN_DIRTY; + prefixD = 0x0; + writeMask[0] = writeMask[1] = writeMask[2] = writeMask[3] = false; + } } }; @@ -155,6 +169,7 @@ public: void ClearCacheAt(u32 em_address); private: void FlushAll(); + void FlushPrefixV(); void WriteDowncount(int offset = 0); // See CompileDelaySlotFlags for flags. From b9506c9568e535b3b52b564f1ffc932a358d859c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 14 Feb 2013 23:47:03 -0800 Subject: [PATCH 21/27] Minor cleanup for vdot in x86 jit. --- Core/MIPS/x86/CompVFPU.cpp | 7 ++++++- Core/MIPS/x86/Jit.h | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 5ef039b99f..a0698aee82 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -288,7 +288,13 @@ void Jit::Comp_SVQ(u32 op) void Jit::Comp_VDot(u32 op) { DISABLE; + // WARNING: No prefix support! + if (js.MayHavePrefix()) { + Comp_Generic(op); + js.EatPrefix(); + return; + } int vd = _VD; int vs = _VS; @@ -306,7 +312,6 @@ void Jit::Comp_VDot(u32 op) { MOVSS(XMM0, fpr.V(sregs[0])); MULSS(XMM0, fpr.V(tregs[0])); - float sum = 0.0f; int n = GetNumVectorElements(sz); for (int i = 1; i < n; i++) { diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index 080375ba7b..b452f9ad97 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -78,6 +78,17 @@ struct JitState prefixTFlag = PREFIX_UNKNOWN; prefixDFlag = PREFIX_UNKNOWN; } + bool MayHavePrefix() const { + if (!(prefixSFlag & PREFIX_KNOWN) || !(prefixTFlag & PREFIX_KNOWN) || !(prefixDFlag & PREFIX_KNOWN)) { + return true; + } else if (prefixS != 0xE4 || prefixT != 0xE4 || prefixD != 0) { + return true; + } else if (writeMask[0] || writeMask[1] || writeMask[2] || writeMask[3]) { + return true; + } + + return false; + } void EatPrefix() { if ((prefixSFlag & PREFIX_KNOWN) == 0 || prefixS != 0xE4) { prefixSFlag = PREFIX_KNOWN_DIRTY; From 2b441f16385dd5a2a549fce639bf1c8f80f076b6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 15 Feb 2013 00:29:40 -0800 Subject: [PATCH 22/27] Initial implementation of jit vadd/vsub/vdiv/vmul. --- Core/MIPS/ARM/ArmCompVFPU.cpp | 5 +++ Core/MIPS/ARM/ArmJit.h | 1 + Core/MIPS/MIPSTables.cpp | 8 ++-- Core/MIPS/x86/CompVFPU.cpp | 73 ++++++++++++++++++++++++++++++++++- Core/MIPS/x86/Jit.h | 1 + 5 files changed, 83 insertions(+), 5 deletions(-) diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 432874e9cc..34bfa08029 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -35,6 +35,11 @@ namespace MIPSComp DISABLE; } + void Jit::Comp_VecDo3(u32 op) + { + DISABLE; + } + void Jit::Comp_Mftv(u32 op) { DISABLE; diff --git a/Core/MIPS/ARM/ArmJit.h b/Core/MIPS/ARM/ArmJit.h index 26988388b9..730a6938ce 100644 --- a/Core/MIPS/ARM/ArmJit.h +++ b/Core/MIPS/ARM/ArmJit.h @@ -110,6 +110,7 @@ public: void Comp_SVQ(u32 op); void Comp_VPFX(u32 op); void Comp_VDot(u32 op); + void Comp_VecDo3(u32 op); void Comp_Mftv(u32 op); void Comp_Vmtvc(u32 op); diff --git a/Core/MIPS/MIPSTables.cpp b/Core/MIPS/MIPSTables.cpp index d38882a0e3..fd8291bef1 100644 --- a/Core/MIPS/MIPSTables.cpp +++ b/Core/MIPS/MIPSTables.cpp @@ -478,17 +478,17 @@ const MIPSInstruction tableCop1BC[32] = const MIPSInstruction tableVFPU0[8] = { - INSTR("vadd",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), - INSTR("vsub",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vadd",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vsub",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), INSTR("vsbn",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vsbn, IS_VFPU), {-2}, {-2}, {-2}, {-2}, - INSTR("vdiv",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vdiv",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), }; const MIPSInstruction tableVFPU1[8] = { - INSTR("vmul",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vmul",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), INSTR("vdot",&Jit::Comp_VDot, Dis_VectorDot, Int_VDot, IS_VFPU), INSTR("vscl",&Jit::Comp_Generic, Dis_VScl, Int_VScl, IS_VFPU), {-2}, diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index a0698aee82..79c98bcb8c 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -285,7 +285,6 @@ void Jit::Comp_SVQ(u32 op) } } - void Jit::Comp_VDot(u32 op) { DISABLE; @@ -333,6 +332,78 @@ void Jit::Comp_VDot(u32 op) { js.EatPrefix(); } +void Jit::Comp_VecDo3(u32 op) { + DISABLE; + + // WARNING: No prefix support! + if (js.MayHavePrefix()) + { + Comp_Generic(op); + js.EatPrefix(); + return; + } + + int vd = _VD; + int vs = _VS; + int vt = _VT; + VectorSize sz = GetVecSize(op); + + u8 sregs[4], tregs[4], dregs[4]; + GetVectorRegs(sregs, sz, vs); + GetVectorRegs(tregs, sz, vt); + GetVectorRegs(dregs, sz, vd); + + void (XEmitter::*xmmop)(X64Reg, OpArg) = NULL; + switch (op >> 26) + { + case 24: //VFPU0 + switch ((op >> 23)&7) + { + case 0: // d[i] = s[i] + t[i]; break; //vadd + xmmop = &XEmitter::ADDSS; + break; + case 1: // d[i] = s[i] - t[i]; break; //vsub + xmmop = &XEmitter::SUBSS; + break; + case 7: // d[i] = s[i] / t[i]; break; //vdiv + xmmop = &XEmitter::DIVSS; + break; + } + break; + case 25: //VFPU1 + switch ((op >> 23)&7) + { + case 0: // d[i] = s[i] * t[i]; break; //vmul + xmmop = &XEmitter::MULSS; + break; + } + break; + } + + if (xmmop == NULL) + { + Comp_Generic(op); + js.EatPrefix(); + return; + } + + int n = GetNumVectorElements(sz); + // We need at least n temporaries... + if (n > 2) + fpr.Flush(); + + for (int i = 0; i < n; ++i) + MOVSS((X64Reg) (XMM0 + i), fpr.V(sregs[i])); + for (int i = 0; i < n; ++i) + (this->*xmmop)((X64Reg) (XMM0 + i), fpr.V(tregs[i])); + for (int i = 0; i < n; ++i) + MOVSS(fpr.V(dregs[i]), (X64Reg) (XMM0 + i)); + + fpr.ReleaseSpillLocks(); + + js.EatPrefix(); +} + void Jit::Comp_Mftv(u32 op) { CONDITIONAL_DISABLE; diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index b452f9ad97..2d5f9ef3c1 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -165,6 +165,7 @@ public: void Comp_SVQ(u32 op); void Comp_VPFX(u32 op); void Comp_VDot(u32 op); + void Comp_VecDo3(u32 op); void Comp_Mftv(u32 op); void Comp_Vmtvc(u32 op); From f95e66eb98c5a86d49306b2e8d743664d45196b2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 15 Feb 2013 01:53:53 -0800 Subject: [PATCH 23/27] Forget cached prefixes when calling generic. It may eat them, or maybe always does? --- Core/MIPS/MIPSTables.cpp | 4 ++-- Core/MIPS/x86/Jit.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/MIPS/MIPSTables.cpp b/Core/MIPS/MIPSTables.cpp index fd8291bef1..ea58c8de4c 100644 --- a/Core/MIPS/MIPSTables.cpp +++ b/Core/MIPS/MIPSTables.cpp @@ -363,11 +363,11 @@ const MIPSInstruction tableCop2[32] = INSTR("mfc2", &Jit::Comp_Generic, Dis_Generic, 0, OUT_RT), {-2}, INSTR("cfc2", &Jit::Comp_Generic, Dis_Generic, 0, 0), - INSTR("mfv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, 0), + INSTR("mfv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, IS_VFPU), INSTR("mtc2", &Jit::Comp_Generic, Dis_Generic, 0, IN_RT), {-2}, INSTR("ctc2", &Jit::Comp_Generic, Dis_Generic, 0, 0), - INSTR("mtv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, 0), + INSTR("mtv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, IS_VFPU), {Cop2BC2}, INSTR("??", &Jit::Comp_Generic, Dis_Generic, 0, 0), diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index 24a3000f11..0a859ca2ae 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -287,6 +287,10 @@ void Jit::Comp_Generic(u32 op) } else _dbg_assert_msg_(JIT, 0, "Trying to compile instruction that can't be interpreted"); + + // Might have eaten prefixes, hard to tell... + if ((MIPSGetInfo(op) & IS_VFPU) != 0) + js.PrefixStart(); } void Jit::WriteExit(u32 destination, int exit_num) From e42e7bf22e17d057d86d45d225b05f795cd50cc6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 15 Feb 2013 09:50:07 -0800 Subject: [PATCH 24/27] Don't flush all regs in mfvc, just prefixes. --- Core/MIPS/x86/CompVFPU.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 79c98bcb8c..e693afbba1 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -420,7 +420,7 @@ void Jit::Comp_Mftv(u32 op) { MOV(32, gpr.R(rt), fpr.V(imm)); } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc // In case we have a saved prefix. - FlushAll(); + FlushPrefixV(); gpr.BindToRegister(rt, false, true); MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); } else { From b21d358f1ba031c8e10796ece4665d94fe7a9348 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 15 Feb 2013 19:28:40 +0100 Subject: [PATCH 25/27] Default JIT to on. --- Core/Config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 18ea2bc499..9b5cfe94b5 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -55,7 +55,7 @@ void CConfig::Load(const char *iniFileName) general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false); IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU"); - cpu->Get("Core", &iCpuCore, 0); + cpu->Get("Core", &iCpuCore, 2); cpu->Get("FastMemory", &bFastMemory, false); IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics"); From c695d8dbf1d6d3635bad7c2ef4df42ebeb435a6b Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 15 Feb 2013 20:17:47 +0100 Subject: [PATCH 26/27] Yet another UV fix --- GPU/GLES/VertexDecoder.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/GPU/GLES/VertexDecoder.h b/GPU/GLES/VertexDecoder.h index 611068eef7..0be7140f13 100644 --- a/GPU/GLES/VertexDecoder.h +++ b/GPU/GLES/VertexDecoder.h @@ -254,13 +254,8 @@ public: break; case DEC_FLOAT_2: - if (isThrough()) { - uv[0] = f[0]; - uv[1] = f[1]; - } else { - uv[0] = f[0] * 2.0f; - uv[1] = f[1] * 2.0f; - } + uv[0] = f[0] * 2.0f; + uv[1] = f[1] * 2.0f; break; case DEC_U16A_2: From 456172c5a6d240e212555fdb22ff8980a5948085 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 15 Feb 2013 21:41:29 +0100 Subject: [PATCH 27/27] Small optimizations and fixes to vertex decoder --- GPU/GLES/TransformPipeline.cpp | 12 ++++++++---- GPU/GLES/VertexDecoder.cpp | 33 +++++++++++++++++---------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 05297137b6..85fa40b631 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -283,8 +283,13 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ bool doSpecular = (comp != GE_LIGHTCOMP_ONLYDIFFUSE); bool poweredDiffuse = comp == GE_LIGHTCOMP_BOTHWITHPOWDIFFUSE; - float dot = toLight * norm; - + float distanceToLight = toLight.Length(); + float dot = 0.0f; + if (distanceToLight > 0.0f) + { + toLight /= distanceToLight; + dot = toLight * norm; + } // Clamp dot to zero. if (dot < 0.0f) dot = 0.0f; @@ -292,10 +297,9 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ dot = powf(dot, specCoef_); float lightScale = 1.0f; - float distance = toLight.Normalize(); if (type != GE_LIGHTTYPE_DIRECTIONAL) { - lightScale = 1.0f / (gstate_c.lightatt[l][0] + gstate_c.lightatt[l][1]*distance + gstate_c.lightatt[l][2]*distance*distance); + lightScale = 1.0f / (gstate_c.lightatt[l][0] + gstate_c.lightatt[l][1]*distanceToLight + gstate_c.lightatt[l][2]*distanceToLight*distanceToLight); if (lightScale > 1.0f) lightScale = 1.0f; } diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index 8bfc77a451..6e68bdec48 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -144,18 +144,16 @@ void VertexDecoder::Step_WeightsFloat() const void VertexDecoder::Step_TcU8() const { - u8 *uv = (u8*)(decoded_ + decFmt.uvoff); - const u8 *uvdata = (const u8*)(ptr_ + tcoff); - uv[0] = uvdata[0]; - uv[1] = uvdata[1]; + u16 *uv = (u16*)(decoded_ + decFmt.uvoff); + const u16 *uvdata = (const u16*)(ptr_ + tcoff); + *uv = *uvdata; } void VertexDecoder::Step_TcU16() const { - u16 *uv = (u16 *)(decoded_ + decFmt.uvoff); - const u16 *uvdata = (const u16*)(ptr_ + tcoff); - uv[0] = uvdata[0]; - uv[1] = uvdata[1]; + u32 *uv = (u32 *)(decoded_ + decFmt.uvoff); + const u32 *uvdata = (const u32*)(ptr_ + tcoff); + *uv = *uvdata; } void VertexDecoder::Step_TcU16Through() const @@ -305,7 +303,7 @@ void VertexDecoder::Step_NormalS16() const xorval = 0xFFFF; const s16 *sv = (const s16*)(ptr_ + nrmoff); for (int j = 0; j < 3; j++) - normal[j] = sv[j] ^ xorval ; + normal[j] = sv[j] ^ xorval; normal[3] = 0; } @@ -330,9 +328,10 @@ void VertexDecoder::Step_NormalS8Morph() const if (gstate.reversenormals & 1) { multiplier = -multiplier; } - const s8 *sv = (const s8*)(ptr_ + onesize_*n + nrmoff); + const s8 *bv = (const s8*)(ptr_ + onesize_*n + nrmoff); + multiplier *= (1.0f/127.0f); for (int j = 0; j < 3; j++) - normal[j] += (sv[j]/32767.0f) * multiplier; + normal[j] += bv[j] * multiplier; } } @@ -346,9 +345,10 @@ void VertexDecoder::Step_NormalS16Morph() const if (gstate.reversenormals & 1) { multiplier = -multiplier; } - const float *fv = (const float*)(ptr_ + onesize_*n + nrmoff); + const s16 *sv = (const s16 *)(ptr_ + onesize_*n + nrmoff); + multiplier *= (1.0f/32767.f); for (int j = 0; j < 3; j++) - normal[j] += fv[j] * multiplier; + normal[j] += sv[j] * multiplier; } } @@ -425,9 +425,10 @@ void VertexDecoder::Step_PosS8Morph() const float *v = (float *)(decoded_ + decFmt.posoff); memset(v, 0, sizeof(float) * 3); for (int n = 0; n < morphcount; n++) { + float multiplier = 1.0f / 127.0f; const s8 *sv = (const s8*)(ptr_ + onesize_*n + posoff); for (int j = 0; j < 3; j++) - v[j] += (sv[j] / 127.f) * gstate_c.morphWeights[n]; + v[j] += (float)sv[j] * (multiplier * gstate_c.morphWeights[n]); } } @@ -437,9 +438,9 @@ void VertexDecoder::Step_PosS16Morph() const memset(v, 0, sizeof(float) * 3); for (int n = 0; n < morphcount; n++) { float multiplier = 1.0f / 32767.0f; - const short *sv = (const short*)(ptr_ + onesize_*n + posoff); + const s16 *sv = (const s16*)(ptr_ + onesize_*n + posoff); for (int j = 0; j < 3; j++) - v[j] += (sv[j] * multiplier) * gstate_c.morphWeights[n]; + v[j] += (float)sv[j] * (multiplier * gstate_c.morphWeights[n]); } }