From 1972f9bf70db9f05b622311090da274109c6a48e Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Wed, 15 Oct 2008 21:12:43 +0000 Subject: [PATCH] Flips the XFB around and some other things git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@881 8ced0084-cf51-0410-be5f-012b33b47a6e --- Binary/linux/GameIni/GMSE01.ini | 2 +- Binary/linux/GameIni/GZLE01.ini | 4 ++-- Binary/linux/GameIni/GZLP01.ini | 8 ++++---- Source/Core/Common/Src/Common.h | 15 ++++++++------- Source/Core/Core/Src/HW/EXI.cpp | 5 ++++- Source/Core/Core/Src/HW/EXI_Device.cpp | 8 ++++++++ Source/Core/Core/Src/HW/EXI_Device.h | 1 + Source/Core/Core/Src/HW/EXI_DeviceMic.cpp | 14 ++++++++++---- Source/Core/Core/Src/HW/EXI_DeviceMic.h | 13 +++++++++---- Source/Plugins/Plugin_VideoOGL/Src/XFB.cpp | 8 ++++---- 10 files changed, 51 insertions(+), 27 deletions(-) diff --git a/Binary/linux/GameIni/GMSE01.ini b/Binary/linux/GameIni/GMSE01.ini index 3821a2ce73..e41bf13036 100644 --- a/Binary/linux/GameIni/GMSE01.ini +++ b/Binary/linux/GameIni/GMSE01.ini @@ -86,7 +86,7 @@ Spin Jump Gravity - Normal Speed 00B80454 08000000 4240E10C 058E3EB3 -+Insane heat waves Crazy colors everywhere! +Insane heat waves Crazy colors everywhere! 00B80485 08000000 043AA070 41200000 diff --git a/Binary/linux/GameIni/GZLE01.ini b/Binary/linux/GameIni/GZLE01.ini index 116c27c71f..ecfbb6282e 100644 --- a/Binary/linux/GameIni/GZLE01.ini +++ b/Binary/linux/GameIni/GZLE01.ini @@ -69,7 +69,7 @@ Hold A to swim fast 123ED84A 00000100 0435D548 41900000 -+Run/Swim/Crawl fast Hold A +Run/Swim/Crawl fast Hold A 01E06820 08000000 4A3ED84A 00000100 0435CEEC 42480000 @@ -420,4 +420,4 @@ Press R to Jump Press R to Mega Jump 01E019BC 08000000 0A3ED84A 00000020 -863E4410 00000003 \ No newline at end of file +863E4410 00000003 diff --git a/Binary/linux/GameIni/GZLP01.ini b/Binary/linux/GameIni/GZLP01.ini index c51d7bb00f..699ae05f16 100644 --- a/Binary/linux/GameIni/GZLP01.ini +++ b/Binary/linux/GameIni/GZLP01.ini @@ -56,7 +56,7 @@ Super Hookshot 123ED84A 00000140 040F2898 8001004C -+Teleport to Fire Mountain up R Y +Teleport to Fire Mountain up R Y 01E05660 08000000 4A3ED84A 00000828 043E440C 482F85A1 @@ -69,7 +69,7 @@ Hold A to swim fast 123ED84A 00000100 0435D548 41900000 -+Run/Swim/Crawl fast Hold A +Run/Swim/Crawl fast Hold A 01E06820 08000000 4A3ED84A 00000100 0435CEEC 42480000 @@ -412,7 +412,7 @@ Have Complete Triforce USE THIS CODE AFTER BEATING THE TOWER OF THE GODS 01E019B8 08000000 003C4CC6 000000FF -+Press R to Jump +Press R to Jump 01E019BB 08000000 0A3ED84A 00000020 863E4410 00000001 @@ -420,4 +420,4 @@ Have Complete Triforce USE THIS CODE AFTER BEATING THE TOWER OF THE GODS Press R to Mega Jump 01E019BC 08000000 0A3ED84A 00000020 -863E4410 00000003 \ No newline at end of file +863E4410 00000003 diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 2fcb2e5613..1280b3dc30 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -261,13 +261,14 @@ namespace // it is very risky to mix _SECURE_SCL=0 and _SECURE_SCL=1 compiled libraries // it is possible that you overwrite memory if you do it - -#ifndef _SECURE_SCL - #error Please define _SECURE_SCL=0 in the project settings -#else - template struct CompileTimeAssert; - template<> struct CompileTimeAssert {}; - CompileTimeAssert<_SECURE_SCL==0> x; +#ifdef _WIN32 + #ifndef _SECURE_SCL + #error Please define _SECURE_SCL=0 in the project settings + #else + template struct CompileTimeAssert; + template<> struct CompileTimeAssert {}; + CompileTimeAssert<_SECURE_SCL==0> x; + #endif #endif } diff --git a/Source/Core/Core/Src/HW/EXI.cpp b/Source/Core/Core/Src/HW/EXI.cpp index e1baf353e7..61922c5838 100644 --- a/Source/Core/Core/Src/HW/EXI.cpp +++ b/Source/Core/Core/Src/HW/EXI.cpp @@ -44,7 +44,10 @@ void Init() g_Channels[0].AddDevice(EXIDEVICE_MEMORYCARD_A, 0); g_Channels[0].AddDevice(EXIDEVICE_IPL, 1); g_Channels[1].AddDevice(EXIDEVICE_MEMORYCARD_B, 0); - //g_Channels[1].AddDevice(EXIDEVICE_MIC, 0); + #if 0 + g_Channels[0].AddDevice(EXIDEVICE_ETH, 2); + #endif + //g_Channels[1].AddDevice(EXIDEVICE_MIC, 0); g_Channels[2].AddDevice(EXIDEVICE_AD16, 0); } diff --git a/Source/Core/Core/Src/HW/EXI_Device.cpp b/Source/Core/Core/Src/HW/EXI_Device.cpp index b681d944b1..60f0853de6 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.cpp +++ b/Source/Core/Core/Src/HW/EXI_Device.cpp @@ -22,6 +22,9 @@ #include "EXI_DeviceMemoryCard.h" #include "EXI_DeviceAD16.h" #include "EXI_DeviceMic.h" +#if 0 +#include "EXI_DeviceEthernet.h" +#endif #include "../Core.h" @@ -148,6 +151,11 @@ IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice) case EXIDEVICE_MIC: return new CEXIMic(1); break; + #if 0 + case EXIDEVICE_ETH: + return new CEXIETHERNET(); + break; + #endif } return NULL; } diff --git a/Source/Core/Core/Src/HW/EXI_Device.h b/Source/Core/Core/Src/HW/EXI_Device.h index e929209d19..4fa09d0a10 100644 --- a/Source/Core/Core/Src/HW/EXI_Device.h +++ b/Source/Core/Core/Src/HW/EXI_Device.h @@ -55,6 +55,7 @@ enum TEXIDevices EXIDEVICE_IPL, EXIDEVICE_AD16, EXIDEVICE_MIC, + EXIDEVICE_ETH, }; extern IEXIDevice* EXIDevice_Create(TEXIDevices _EXIDevice); diff --git a/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp b/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp index 1b173510c6..0a3bfdccea 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceMic.cpp @@ -43,7 +43,7 @@ CEXIMic::CEXIMic(int _Index) //status = MC_STATUS_BUSY | MC_STATUS_UNLOCKED | MC_STATUS_READY; m_uPosition = 0; formatDelay = 0; - ID= 0x0a000000; + ID = 0x0a000000; } @@ -106,11 +106,17 @@ void CEXIMic::TransferByte(u8 &byte) ;//byte = 0x80; // dummy cycle else byte = (u8)(ID >> (24-(((m_uPosition-2) & 3) * 8))); - break; + break; case cmdStatus: { - u16 Status = 0x0; // 0x80 if you want button pressed forever - byte = (u8)(Status >> (24-(((m_uPosition-2) & 3) * 8))); + byte = (u8)(Status.U16 >> (24-(((m_uPosition - 2) & 3) * 8))); + } + break; + case cmdSetStatus: + { + Status.U8[m_uPosition - 1] = byte; + if(m_uPosition == 2) + printf("Status is 0x%04x\n", Status.U16); } break; default: diff --git a/Source/Core/Core/Src/HW/EXI_DeviceMic.h b/Source/Core/Core/Src/HW/EXI_DeviceMic.h index 8df85160a2..81583a8a23 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceMic.h +++ b/Source/Core/Core/Src/HW/EXI_DeviceMic.h @@ -32,9 +32,9 @@ private: enum { - cmdID = 0x00, - cmdStatus = 0x40, - cmdArrayToBuffer = 0x53, + cmdID = 0x00, + cmdStatus = 0x40, + cmdSetStatus = 0x80, cmdSetInterrupt = 0x81, cmdWriteBuffer = 0x82, cmdReadStatus = 0x83, @@ -53,10 +53,15 @@ private: int interruptSwitch; bool m_bInterruptSet; int command; - int status; + union uStatus + { + u16 U16; + u8 U8[2]; + }; int Index; u32 m_uPosition; u32 formatDelay; + uStatus Status; //! memory card parameters unsigned int ID; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/XFB.cpp b/Source/Plugins/Plugin_VideoOGL/Src/XFB.cpp index 167f5916b8..56e3dc3152 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/XFB.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/XFB.cpp @@ -144,10 +144,10 @@ void XFB_Draw(u8 *xfb_in_ram, u32 width, u32 height, s32 yOffset) GL_REPORT_ERRORD(); glBegin(GL_QUADS); - glTexCoord2f(width, height + yOffset); glVertex2f(-1,-1); - glTexCoord2f(width, 0 + yOffset); glVertex2f(-1,1); - glTexCoord2f(0, 0 + yOffset); glVertex2f(1,1); - glTexCoord2f(0, height + yOffset); glVertex2f(1,-1); + glTexCoord2f(width, height + yOffset); glVertex2f(1,-1); + glTexCoord2f(width, 0 + yOffset); glVertex2f(1,1); + glTexCoord2f(0, 0 + yOffset); glVertex2f(-1,1); + glTexCoord2f(0, height + yOffset); glVertex2f(-1,-1); glEnd(); glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);