[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116570":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":8,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},116570,"red_two","gminustwo\u002Fred_two","gminustwo",null,"C++",231,13,1,20,0,17,116,81,90.34,"MIT License",false,"main",[],"2026-11-22 07:31:52","2026-11-23 20:41:30","# Red Two\n\n[![release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fgminustwo\u002Fred_two?filter=v%2A&sort=semver&display_name=tag&label=release&color=orange)](https:\u002F\u002Fgithub.com\u002Fgminustwo\u002Fred_two\u002Freleases\u002Flatest)\n[![downloads](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002Fgminustwo\u002Fred_two\u002Ftotal?label=downloads&color=brightgreen)](https:\u002F\u002Fgithub.com\u002Fgminustwo\u002Fred_two\u002Freleases)\n\nA static recompilation of **Star Wars: Rogue Squadron II – Rogue Leader** (GameCube) for PC.\n\nThe game's own PowerPC code is translated to C++ ahead of time and runs on a native runtime\nthat stands in for the console's hardware. **No game data is included**: you need your own disc\nimage of the USA release (`GSWE64`, revision 0), for the downloads as for your own build.\n\n**Downloads**: Windows (zip) and Linux \u002F Steam Deck (AppImage) builds are on the\n[Releases](..\u002F..\u002Freleases) page. They contain the game's code in recompiled form, none of its data:\nstart it and choose your disc image (`.iso`, `.gcm`, `.rvz` or `.wia`, wherever it is) on the\nlauncher's disc page: type or paste its path, pick it in the file dialog, or find it in the\nbuilt-in browser (controller-friendly). Red Two remembers it; one next to the program is also\nfound by itself.\nOr build Red Two yourself (below): the build recompiles the game from your disc. The Windows zip\nis portable (everything of yours stays in its `user` folder) and brings the Visual C++ runtime\nwith it; it needs a CPU with AVX2 (Intel Haswell \u002F AMD Ryzen or newer) and says so otherwise.\n\n> Status: playable on Windows and Linux (also packaged as an AppImage for the Steam Deck):\n> menus, cutscenes and missions at full speed with graphics (Aurora), sound (an emulation of the\n> MusyX audio DSP), controls, saving, save states, widescreen, mods, cheats and RetroAchievements.\n\n## Building (Windows)\n\nRequirements: Visual Studio 2022 Build Tools (C++), CMake 3.25+, Ninja, clang-cl (LLVM).\n\n```powershell\n# 1. Build: recompiles the game straight from your disc image (RVZ, WIA, ISO or GCM)\npowershell -ExecutionPolicy Bypass -File tools\\build.ps1 -Disc \"\u003Cyour Rogue Leader.rvz>\"\n\n# 2. Run\nbuild\\windows\\red_two.exe --disc \"\u003Cyour Rogue Leader.rvz>\"\n```\n\nWithout `--disc` the game takes the disc chosen in the launcher before (F1 > DISPLAY > Game disc),\nelse looks for `orig\\GSWE64.iso`, `orig\\GSWE64.rvz`, `GSWE64.rvz`, `GSWE64.iso` and any GSWE64\nimage next to the program or in the user folder, else the launcher asks for it.\n`tools\\rvz.py` (Python + libzstd) can still extract a disc or convert it to ISO.\n\nThe code generated from your disc ends up in `build\u002F` and is yours alone: never share it.\n\n`tools\\make_release_win.ps1` packs a build into `build\\RedTwo-windows-x64.zip` (the program, its\nsymbols, DLLs, a readme) for your own use on another PC.\n\n## Building (Linux) and the Steam Deck AppImage\n\nRequirements: clang, lld, CMake 3.25+, Ninja, git, and SDL3's build dependencies (X11, Wayland,\nxkbcommon, ALSA \u002F PulseAudio \u002F PipeWire, udev and D-Bus development packages). Ubuntu 24.04 (also\nunder WSL2) works; the result needs glibc 2.38 or later (SteamOS 3.6+).\n\n```bash\ntools\u002Fbuild_linux.sh --disc \"\u003Cyour Rogue Leader.rvz>\"     # -> build\u002Flinux\u002Fred_two\n# an AppImage: the AppImage type 2 runtime (github.com\u002FAppImage\u002Ftype2-runtime, runtime-x86_64),\n# mksquashfs and patchelf\ntools\u002Fmake_appimage.sh --runtime runtime-x86_64 --icon \u003C256x256 png>   # -> build\u002Flinux\u002FRedTwo-x86_64.AppImage\n```\n\nOn the Steam Deck: copy the AppImage and your disc image (`.rvz` \u002F `.iso`, any name) into the\nsame folder (or the disc into `~\u002FEmulation\u002Froms\u002Fgc`), make the AppImage executable, and add it\nto Steam as a non-Steam game. The first start on a Deck is fullscreen with the picture as wide\nas the screen. Settings, saves, states and logs live in `~\u002F.local\u002Fshare\u002FRed Two\u002F`.\n\n### Playing\n\n- **Launcher**: Red Two opens on its settings (the same pages as the in-game menu) before the\n  game starts. Start game (the first row) or the controller's START launches it. Turn off\n  \"Show launcher at start\" there to go straight into the game from then on; the in-game menu\n  (F1 or Back) has the same switch and \"Back to launcher\". `--launcher` \u002F `--no-launcher` override\n  the setting for one start. A reset from the menu goes straight back into the game.\n- Gamepads work through SDL (with rumble), also while the window is in the background. On an\n  Xbox-style pad the face buttons follow the GameCube positions: A = A (fire), X (left) = B,\n  B (right) = X, Y = Y; LT\u002FRT = L\u002FR, RB = Z, right stick = C-stick, Menu = Start. Keyboard: WASD or arrows steer, Space = A (fire),\n  Left Shift = B, E = X, Q = Y, R = Z, 1\u002F2 = L\u002FR, Enter = Start, IJKL = C-stick, TFGH = D-pad.\n- The game's button prompts show your controller's buttons (the one each GameCube button is\n  bound to, e.g. \"PRESS (Y)\" and SELECT CRAFT's \"(B) > pilot\"): the PlayStation symbols on a\n  PS3 \u002F PS4 \u002F PS5 controller, the Xbox buttons on any other. F1 > Controls > Button prompts\n  picks Automatic, Xbox, PlayStation or the original GameCube ones. The C-stick icon stays.\n- **Control stick** (F1 > Controls): stick sensitivity (25-200%) and a round deadzone (0-50%,\n  both sticks; the output grows from zero at its edge, so small aiming moves are smooth), with a\n  meter showing the stick and what the game gets.\n- F11 or Alt+Enter toggles fullscreen; `--fullscreen` starts that way.\n- **Graphics** (F1, DISPLAY): internal resolution up to 4K, 4x MSAA anti-aliasing (from the next\n  start; WebGPU offers no other sample count) and anisotropic filtering up to 16x.\n- **Where your files are**: on Windows a `user` folder next to `red_two.exe` (the zip has one)\n  holds settings, the memory card, save states, logs, texture packs, codes and the shader cache,\n  so the folder can live anywhere (another drive, a NAS). An install that has no `user` folder\n  but an older `%APPDATA%\\Red Two` keeps using that one; create `user` to make it portable (its\n  first start copies the settings, controls and memory card over). Linux: `~\u002F.local\u002Fshare\u002FRed Two\u002F`.\n- **Cheats** (F1 > Cheats): invincibility, infinite lives, infinite bombs, perfect mission\n  stats (the results screen says 0:01, every enemy destroyed, 100% accuracy, no friendlies or\n  lives lost and 100% targeting computer efficiency, and the medal is awarded for those), and\n  all craft (every craft a mission allows waits in its hangar). **Passcodes**: the game's own\n  unlocks without typing codes - all missions, all tech upgrades, ace mode, art gallery, music\n  hall, documentary, audio commentary, credits, black and white - kept in the game's save as\n  if the codes had been entered.\n- **RetroAchievements** (F1 > Achievements): log in with your retroachievements.org account\n  (only the login token is stored) or take Dolphin's login; softcore only, so save states and\n  cheats stay usable. Unlocks pop up in the top right corner.\n- **Reset game**, **Back to launcher** and **Quit to desktop** are at the top of the menu's first page.\n- **Save states**: Back + RB saves, Back + LB loads, Back + D-pad right \u002F left picks the slot\n  (8 slots; keyboard F5 \u002F F8, F7 \u002F F6). F1 > Controls has the slot, save \u002F load buttons and the\n  hotkeys, each any combination of buttons (or keys) held together: pick the row, press A, hold\n  the buttons, let go. On a controller Back alone (released with nothing else pressed) still\n  opens the menu. States live in the user folder's `states` and also load after a restart, but\n  only into the same build of Red Two (a rebuild makes them \"OLD\"). The memory card is not part\n  of a state: loading one does not undo the game's own saves.\n- Saves go to the user folder's `saves\u002FGSWE64_A.raw` (slot A; the game formats a new card). A\n  `.raw` card from Dolphin or Nintendont can be copied there as it is, whatever its size (59 to\n  2043 blocks). `R2_CARD_A=\u003Cpath>` uses another card image.\n- **Mods** (F1, MODS tab): texture packs in Dolphin's format go in the user folder's\n  `textures\\` (a `GSWE64` folder inside, exactly as in Dolphin's\n  `Load\\Textures`; `.dds` and `.png`, mip files and wildcards work), or stay wherever you unpacked\n  them: MODS -> Texture pack folder opens a folder browser (d-pad \u002F stick, A opens, X goes up, B\n  back) - pick the pack's folder (the one holding `GSWE64`, or `GSWE64` itself), e.g. in Downloads\n  or on an SD card. Back + D-pad up (F9) turns the texture packs off and on again at once, to\n  compare (rebindable in Controls). Gecko \u002F Action Replay codes and\n  patches go in the user folder's `codes.ini` (Dolphin's GameSettings format) and can be switched\n  in the menu. The game is recompiled ahead of time, so codes that change its code (Gecko C2\n  \"insert ASM\", writes into code) cannot work; the menu marks them as not supported.\n- **Importing from Dolphin**: MODS -> IMPORT FROM DOLPHIN, or\n  `red_two.exe --import-dolphin[=saves,textures,codes] --console`. Red Two finds Dolphin's user\n  folder (AppData, Documents, a portable install, the registry, a custom Load folder in\n  `Dolphin.ini`) and brings over this game's newest save (from GCI folders or `.raw` cards; the\n  previous card is kept in `saves\\backup`, and the game restarts), its texture packs (copied) and\n  its codes (with their on\u002Foff states). `R2_DOLPHIN_DIR=\u003CUser folder>` points it elsewhere.\n- **Shaders** (F1, DISPLAY -> PERFORMANCE): \"Prepare shaders at start\" (on) compiles every shader\n  the game has used on this device before it starts; off, the game starts at once and objects may\n  pop in while their shaders compile. \"Ubershaders\" (on; off on a Steam Deck's first start) draws\n  not-yet-compiled objects with a generic shader instead of skipping them.\n- `R2_NO_AUDIO=1` runs without sound. Every session writes a log to the user folder's `logs`\n  (Linux: `~\u002F.local\u002Fshare\u002FRed Two\u002Flogs`); `--console` shows it in a console window on Windows.\n\n## Reporting a problem\n\nOpen an issue on the [Issues](..\u002F..\u002Fissues\u002Fnew\u002Fchoose) page and pick **Bug report** (or **Feature\nrequest** for an idea): the form asks for what helps. Please check the open issues first, and\nreport one problem per issue. What to have at hand:\n\n- **Red Two's version**: under the menu's title (F1, or the controller's Back \u002F Select), e.g.\n  \"VERSION 1.2\". Newer versions may already fix it: the menu offers updates at the top of its\n  first page.\n- **What happened and where**: the mission (or menu, cutscene) and the moment, whether it happens\n  every time, and how to get there.\n- **The session log (required)**: a bug report needs the log of the play session where the\n  problem happened. Every start of Red Two writes a new one, named by the date and time it\n  started, so if you started Red Two again afterwards, the newest log is from that later start:\n  pick the right one by its date and time, and drag it into the issue. It's in:\n  - Windows: `user\\logs` next to `red_two.exe` (an older install without a `user` folder:\n    `%APPDATA%\\Red Two\\logs`)\n  - Steam Deck \u002F Linux: `~\u002F.local\u002Fshare\u002FRed Two\u002Flogs`\n\n  It lists your settings, the frame rate every 30 seconds, and what the game was doing in a\n  freeze or a crash. It also shows folder paths, which can include your user name: edit those\n  out if you like.\n- **Your setup**: the controller (and whether Steam starts Red Two), your display and aspect\n  ratio, a texture pack if you use one.\n- **A screenshot or a short video** for anything you can see.\n\nA save state from just before the problem can help too, but states only load into the build that\nmade them: mention that you have one, and we'll ask for it if needed.\n\n## How it works\n\n`tools\u002Frvz.py` and `src\u002Fcommon\u002Fdisc_image.cpp` read the disc; the recompiler (`src\u002Frecompiler`)\nfinds the game's functions in `main.dol` without symbols and writes them out as C++ - including the\nsecond executable the game hides inside `main.dol` and runs from its own demand-paged virtual\nmemory. The runtime (`src\u002Fruntime`) stands in for the console: the CPU state and MMU, threads on\nhost fibers, the GameCube's hardware at the register level (video, disc, audio DSP, ARAM, memory\ncard, controllers), and a bridge that hands the GPU command stream to\n[Aurora](https:\u002F\u002Fgithub.com\u002Fencounter\u002Faurora) for rendering. Names we gave the game's functions are\nin `config\u002FGSWE64\u002Fsymbols.txt`.\n\n## Legal\n\nRed Two is released under the [MIT License](LICENSE). It covers this repository's own code\nonly, not the game's code that a build (and the prebuilt downloads) contain in recompiled form.\n\nThis repository contains no code or assets from the game. Star Wars and Rogue Leader are\ntrademarks of Lucasfilm Ltd.; GameCube is a trademark of Nintendo. This project is not\naffiliated with or endorsed by them.\n","Red Two 是一款将任天堂 GameCube 游戏《星球大战：侠盗中队 II — 侠盗领袖》静态重编译为 PC 原生 C++ 程序的开源模拟器替代方案。它通过 Ahead-of-Time（AOT）方式将游戏原始 PowerPC 机器码翻译为优化的 x86-64 C++ 代码，并运行于轻量级原生运行时之上，完整支持图形（Aurora 渲染）、MusyX 音频 DSP 模拟、手柄控制、存档\u002F存档状态、宽屏、MOD 加载及 RetroAchievements 成就系统。项目不包含任何游戏数据，需用户自行提供 USA 版本光盘镜像（GSWE64，rev0）。适用于希望在现代 Windows\u002FLinux（含 Steam Deck）平台以高性能、低延迟方式运行该经典 GameCube 游戏的技术爱好者与怀旧玩家。",2,"2026-11-24 04:53:55","CREATED_QUERY"]