From 0e304441e4f57f12f6cb63249333657f0deb1602 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Thu, 24 Dec 2020 12:22:38 +0100 Subject: add eCDP to romlist closes #885 --- src/ROMList.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ROMList.h') diff --git a/src/ROMList.h b/src/ROMList.h index 03252bb..c844a77 100644 --- a/src/ROMList.h +++ b/src/ROMList.h @@ -37,6 +37,7 @@ ROMListEntry ROMList[] = {0x43495941, 0x01000000, 0x00000001}, {0x434D5341, 0x01000000, 0x00000002}, {0x434E5341, 0x00800000, 0x00000002}, + {0x4352554A, 0x10000000, 0x00000006}, {0x43575A41, 0x02000000, 0x00000002}, {0x44323643, 0x04000000, 0x00000001}, {0x44324254, 0x04000000, 0x00000002}, -- cgit v1.2.3 From d6b0ff1edafad90cf1d7043e85e957c8dbf19e83 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Thu, 24 Dec 2020 12:34:40 +0100 Subject: fix last commit, account for little endian --- src/ROMList.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ROMList.h') diff --git a/src/ROMList.h b/src/ROMList.h index c844a77..b60cdd9 100644 --- a/src/ROMList.h +++ b/src/ROMList.h @@ -37,7 +37,6 @@ ROMListEntry ROMList[] = {0x43495941, 0x01000000, 0x00000001}, {0x434D5341, 0x01000000, 0x00000002}, {0x434E5341, 0x00800000, 0x00000002}, - {0x4352554A, 0x10000000, 0x00000006}, {0x43575A41, 0x02000000, 0x00000002}, {0x44323643, 0x04000000, 0x00000001}, {0x44324254, 0x04000000, 0x00000002}, @@ -4007,6 +4006,7 @@ ROMListEntry ROMList[] = {0x4A555143, 0x02000000, 0x00000002}, {0x4A555159, 0x08000000, 0x00000003}, {0x4A555241, 0x02000000, 0x00000003}, + {0x4A555243, 0x10000000, 0x00000006}, {0x4A555259, 0x00800000, 0x00000001}, {0x4A555341, 0x04000000, 0x00000003}, {0x4A555359, 0x00800000, 0x00000003}, -- cgit v1.2.3 From 7d448d911d862c06255873820aee32487fbc4943 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sat, 2 Jan 2021 11:38:06 +0100 Subject: use C++ style structs everywhere --- src/ARCodeFile.h | 10 ++++------ src/Config.h | 5 ++--- src/GPU.h | 5 ++--- src/GPU3D.h | 8 ++++---- src/GPU3D_OpenGL.cpp | 5 ++--- src/GPU3D_Soft.cpp | 4 ++-- src/NDS.h | 15 ++++++--------- src/ROMList.h | 5 ++--- src/Wifi.cpp | 5 ++--- src/frontend/qt_sdl/LAN_PCap.h | 5 ++--- 10 files changed, 28 insertions(+), 39 deletions(-) (limited to 'src/ROMList.h') diff --git a/src/ARCodeFile.h b/src/ARCodeFile.h index 374c56e..56dfff7 100644 --- a/src/ARCodeFile.h +++ b/src/ARCodeFile.h @@ -23,23 +23,21 @@ #include "types.h" -typedef struct +struct ARCode { char Name[128]; bool Enabled; u32 CodeLen; u32 Code[2*64]; - -} ARCode; +}; typedef std::list ARCodeList; -typedef struct +struct ARCodeCat { char Name[128]; ARCodeList Codes; - -} ARCodeCat; +}; typedef std::list ARCodeCatList; diff --git a/src/Config.h b/src/Config.h index 9fd7488..9671f16 100644 --- a/src/Config.h +++ b/src/Config.h @@ -26,7 +26,7 @@ namespace Config { -typedef struct +struct ConfigEntry { char Name[32]; int Type; @@ -34,8 +34,7 @@ typedef struct int DefaultInt; const char* DefaultStr; int StrLength; // should be set to actual array length minus one - -} ConfigEntry; +}; FILE* GetConfigFile(const char* fileName, const char* permissions); bool HasConfigFile(const char* fileName); diff --git a/src/GPU.h b/src/GPU.h index 377bd9e..1bbb9fe 100644 --- a/src/GPU.h +++ b/src/GPU.h @@ -150,14 +150,13 @@ void SyncDirtyFlags(); extern u32 OAMDirty; extern u32 PaletteDirty; -typedef struct +struct RenderSettings { bool Soft_Threaded; int GL_ScaleFactor; bool GL_BetterPolygons; - -} RenderSettings; +}; bool Init(); diff --git a/src/GPU3D.h b/src/GPU3D.h index 69b67fa..62fe92c 100644 --- a/src/GPU3D.h +++ b/src/GPU3D.h @@ -25,7 +25,7 @@ namespace GPU3D { -typedef struct +struct Vertex { s32 Position[4]; s32 Color[3]; @@ -43,9 +43,9 @@ typedef struct // TODO maybe: hi-res color? (that survives clipping) s32 HiresPosition[2]; -} Vertex; +}; -typedef struct +struct Polygon { Vertex* Vertices[10]; u32 NumVertices; @@ -74,7 +74,7 @@ typedef struct u32 SortKey; -} Polygon; +}; extern u32 RenderDispCnt; extern u8 RenderAlphaRef; diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp index 88ae77a..eb8fa62 100644 --- a/src/GPU3D_OpenGL.cpp +++ b/src/GPU3D_OpenGL.cpp @@ -70,7 +70,7 @@ struct GLuint ShaderConfigUBO; -typedef struct +struct RendererPolygon { Polygon* PolyData; @@ -82,8 +82,7 @@ typedef struct u32 EdgeIndicesOffset; u32 RenderKey; - -} RendererPolygon; +}; RendererPolygon PolygonList[2048]; int NumFinalPolys, NumOpaqueFinalPolys; diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp index d66eb76..7fcafb1 100644 --- a/src/GPU3D_Soft.cpp +++ b/src/GPU3D_Soft.cpp @@ -538,7 +538,7 @@ private: s32 ycoverage, ycov_incr; }; -typedef struct +struct RendererPolygon { Polygon* PolyData; @@ -548,7 +548,7 @@ typedef struct u32 CurVL, CurVR; u32 NextVL, NextVR; -} RendererPolygon; +}; RendererPolygon PolygonList[2048]; diff --git a/src/NDS.h b/src/NDS.h index 98a0f7d..46a57a4 100644 --- a/src/NDS.h +++ b/src/NDS.h @@ -54,13 +54,12 @@ enum Event_MAX }; -typedef struct +struct SchedEvent { void (*Func)(u32 param); u64 Timestamp; u32 Param; - -} SchedEvent; +}; enum { @@ -121,21 +120,19 @@ enum IRQ2_DSi_MicExt }; -typedef struct +struct Timer { u16 Reload; u16 Cnt; u32 Counter; u32 CycleShift; +}; -} Timer; - -typedef struct +struct MemRegion { u8* Mem; u32 Mask; - -} MemRegion; +}; extern int ConsoleType; extern int CurCPU; diff --git a/src/ROMList.h b/src/ROMList.h index b60cdd9..685d8a5 100644 --- a/src/ROMList.h +++ b/src/ROMList.h @@ -19,13 +19,12 @@ #ifndef ROMLIST_H #define ROMLIST_H -typedef struct +struct ROMListEntry { u32 GameCode; u32 ROMSize; u32 SaveMemType; - -} ROMListEntry; +}; ROMListEntry ROMList[] = diff --git a/src/Wifi.cpp b/src/Wifi.cpp index 2957007..4502f18 100644 --- a/src/Wifi.cpp +++ b/src/Wifi.cpp @@ -55,7 +55,7 @@ u16 RFData1; u16 RFData2; u32 RFRegs[0x40]; -typedef struct +struct TXSlot { u16 Addr; u16 Length; @@ -63,8 +63,7 @@ typedef struct u8 CurPhase; u32 CurPhaseTime; u32 HalfwordTimeMask; - -} TXSlot; +}; TXSlot TXSlots[6]; diff --git a/src/frontend/qt_sdl/LAN_PCap.h b/src/frontend/qt_sdl/LAN_PCap.h index 250b8e9..f636e12 100644 --- a/src/frontend/qt_sdl/LAN_PCap.h +++ b/src/frontend/qt_sdl/LAN_PCap.h @@ -24,7 +24,7 @@ namespace LAN_PCap { -typedef struct +struct AdapterData { char DeviceName[128]; char FriendlyName[128]; @@ -34,8 +34,7 @@ typedef struct u8 IP_v4[4]; void* Internal; - -} AdapterData; +}; extern AdapterData* Adapters; -- cgit v1.2.3