Skip to content

About

A decompilation of XeXMenu 1.2 for the Xbox 360: the original default.xex decompiled and rebuilt as readable C++ that builds with the Xbox 360 SDK and runs on a console.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

XeXMenu 1.2

The source code of XeXMenu 1.2, the Xbox 360 homebrew file manager and launcher, rebuilt by decompilation. The original default.xex was decompiled, and its code rewritten here as readable C++. Built with the Xbox 360 SDK, the result works on a console.

It has the whole app. It boots the ATG application, shows the sign-in UI, starts XUI and loads the skin named in the settings. The menu lists the skins, mounts and checks the devices, shows device usage, follows device notifications, cycles the panels with LB/RB and shows copy progress.

  • Discovery: finds the games, emulators and applications on the devices and reads each title's name from its nxeart package. It converts the package's art into icon.dds and nxebg.dds, switches lists with the D-pad, previews the selected title's background, runs again on Y and launches the selected title.
  • File browser: switches devices with the D-pad, toggles the .xex filter with a thumbstick and goes up a folder with B. A enters a folder or launches an .xex, and Start launches the folder's default.xex.
  • File box: copies, moves, pastes, deletes, makes a folder, or copies a DVD (it opens the tray and mounts the disc as Z:). Copies run on their own thread behind the progress panel. Patch clears the region, media and rating limits of an .xex or .dll in place, or of every one below a folder, and writes the new header digest.
  • Configuration panel: shows the SMC's temperatures and version, picks the skin, flips the three switches, and on A saves and starts the app again. The settings live in config.txt, in the signed-in user's "XeXLoader" save game, else in the package.
  • FTP server: SlimFTPd as the original has it. It reads ftpd.conf, mounts every device for every user in it (Flash is read-only except for the user flash) and stops before a launch.

In Xenia it matches the original. The first screen is the same, with no pixel different. The FTP server gives the same replies to login, listings and 17 other commands. Through 19 button presses across the menus, all 19 screens match pixel for pixel.

Layout

Path What it is
src/main.cpp The app object: start-up, the help overlay, the frame loop
src/scene.cpp The XUI module and the MyMainScene scene
src/menu.cpp The menu controller: devices, panels, button presses
src/devices.cpp Mounting devices and content packages
src/discovery.cpp The game, emulator and application lists
src/fileops.cpp The file box: copy, move, delete, new folder, DVD copy
src/filesystem.cpp Folder scans and the copy engine
src/config.cpp Reading and saving config.txt
src/systeminfo.cpp SMC temperatures and version, launching an .xex
src/xexpatch.cpp, src/rijndael.cpp The .xex patcher and its AES code
src/ftpd.cpp The FTP server: SlimFTPd's SlimFTPd.cpp with the original's changes, each one commented
src/xexmenu.h The shared state
src/atg/AtgHelp9328.cpp The SDK's help screen with the original's callout positions
third_party/ libconfig 1.3.2, SlimFTPd 3.181, and the few headers the SDK lacks for them
build.cmd, xex.xml The build script and the original's XEX settings

Each function rewritten from one in the original gives that function's address in its comment, as in HRESULT App::Render() // 820A6C10. Helpers without an address are the rebuild's own.

Build

  1. Install the Xbox 360 SDK. Its installer sets XEDK. I built and tested this with 2.0.21256; other SDK versions are untested.

  2. Get the source and build it from a Command Prompt:

    git clone https://github.com/XboxChef/XEXMenu-1.2.git
    cd XEXMenu-1.2
    build.cmd
    

    build.cmd uses the SDK's own compiler and linker. It builds the ATG framework from the SDK's Source\Samples\Common, then this source and third_party/, and writes out\default.xex. Nothing else needs downloading.

  3. To run it, put out\default.xex next to the Media\ folder, config.txt and ftpd.conf from your own copy of XeXMenu 1.2. The skins, fonts and help images are the original's and are not in this repository.

How the original is put together

  • main (820A6418) comes from the ATG sample framework, as does the rest of the ATG code (821A0F80-821A3740). That code is built from the SDK's Source\Samples\Common, not rewritten. Only the help screen differs between that SDK and the XDK 9328 copy the original links: the shoulder and trigger callouts sit 40 and 50 pixels lower. So src/atg/AtgHelp9328.cpp compiles the SDK's AtgHelp.cpp unchanged and moves those four rows at start-up.
  • The app object (823E01F0, vtable 82003B54) is an ATG::Application with three methods:
    • Initialize (820A69D8): loads the Arial_12 font and Help.xpr.
    • Update (820A6AE0): Back toggles help.
    • Render (820A6C10): draws the help overlay or the XUI frame, then presents.
  • A CXuiModule (823E0368) runs the XUI skin. The app registers one class, MyMainScene.
  • The app's own code runs from 820A0000 to 820B7907. Its 295 functions include 36 inlined from SDK headers and 59 built from SlimFTPd's unchanged permdb.cpp, userdb.cpp and vfs.cpp. The other 200 are rewritten here.
  • xex.xml copies the original's XEX settings: title FFFF0055, raw and unencrypted, no forced reboot, insecure sockets.

Third-party code

  • third_party/libconfig-1.3.2 is libconfig 1.3.2, unchanged (LGPL 2.1, see its COPYING.LIB). It is the version the original links, built the same way with its Windows code paths, and it exports its 50 functions at the same ordinals.
  • third_party/slimftpd-3.181 is SlimFTPd 3.181 by WhitSoft Development, unchanged (BSD, see its LICENSE.txt). The original's FTP code comes from it.
  • third_party/xbox fills in what the SDK lacks for them: windows.h, inttypes.h, an empty strsafe.h and _configthreadlocale.

License

The source here is licensed under the GNU Affero General Public License v3.0, see LICENSE. The code in third_party/ keeps its own license: libconfig is LGPL 2.1 and SlimFTPd is BSD. src/ftpd.cpp is based on SlimFTPd's SlimFTPd.cpp and keeps its BSD notice.

About

A decompilation of XeXMenu 1.2 for the Xbox 360: the original default.xex decompiled and rebuilt as readable C++ that builds with the Xbox 360 SDK and runs on a console.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages