Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3

COPY --from=nsjail /nsjail/nsjail /bin/nsjail

COPY --from=ghcr.io/decompals/wibo:1.0.0-beta.5 /usr/local/bin/wibo /usr/bin/
COPY --from=ghcr.io/decompals/wibo:1.0.1 /usr/local/bin/wibo /usr/bin/

# Patched mips binutils
RUN wget "https://github.com/decompals/binutils-mips-ps2-decompals/releases/download/v0.4/binutils-mips-ps2-decompals-linux-x86-64.tar.gz" \
Expand All @@ -96,6 +96,11 @@ RUN curl -sSL "https://github.com/encounter/gc-wii-binutils/releases/download/2.
bsdtar -xvf- -C /usr/bin \
&& chmod +x /usr/bin/powerpc-eabi-*

# Xbox 360 (Xenon) PowerPC binutils
RUN curl -sSL "https://github.com/encounter/xbox360-binutils/releases/download/2.45.1-1/linux-x86_64.zip" | \
bsdtar -xvf- -C /usr/bin \
&& chmod +x /usr/bin/powerpc-xenon-pe-*

# MSDOS specific
RUN wget "https://github.com/OmniBlade/binutils-gdb/releases/download/omf-build/omftools.tar.gz" \
&& tar xvzf omftools.tar.gz -C /usr/bin jwasm \
Expand Down
4 changes: 4 additions & 0 deletions backend/compilers/compilers.linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ win32:
- msvc8.0
- msvc8.0p

xbox360:
- msvc_ppc_14.00.2110
- msvc_ppc_16.00.11886.00

android_x86:
- ndk-r8e-gcc-4.4.3
- ndk-r8e-gcc-4.7
18 changes: 18 additions & 0 deletions backend/coreapp/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
SWITCH,
WIIU,
WIN32,
XBOX360,
Platform,
)
from django.conf import settings
Expand Down Expand Up @@ -1565,6 +1566,20 @@ def available_platforms() -> List[Platform]:
cc=BORLAND_MSDOS_CC,
)

CL_XBOX = '${WIBO} "${COMPILER_DIR}/cl.exe" /c /nologo ${COMPILER_FLAGS} /Fd"Z:/tmp/" /Bk"Z:/tmp/" /Fo"Z:${OUTPUT}" "Z:${INPUT}"'

MSVC_PPC_14_00_2110 = MSVCCompiler(
id="msvc_ppc_14.00.2110",
platform=XBOX360,
cc=CL_XBOX,
)

MSVC_PPC_16_00_11886_00 = MSVCCompiler(
id="msvc_ppc_16.00.11886.00",
platform=XBOX360,
cc=CL_XBOX,
)

ANDROID_R8E_443_C = GCCCompiler(
id="ndk-r8e-gcc-4.4.3",
platform=ANDROID_X86,
Expand Down Expand Up @@ -1817,6 +1832,9 @@ def available_platforms() -> List[Platform]:
# Borland, DOS
BORLAND_20_C,
BORLAND_31_C,
# Xbox 360
MSVC_PPC_14_00_2110,
MSVC_PPC_16_00_11886_00,
# GCC, Android
ANDROID_R8E_443_C,
ANDROID_R8E_47_C,
Expand Down
11 changes: 11 additions & 0 deletions backend/coreapp/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ def from_id(platform_id: str) -> Platform:
has_decompiler=True,
)

XBOX360 = Platform(
id="xbox360",
name="Xbox 360",
description="PowerPC 64-bit (big-endian)",
arch="ppc",
assemble_cmd='powerpc-xenon-pe-as -o "$OUTPUT" "$PRELUDE" "$INPUT"',
objdump_cmd="powerpc-xenon-pe-objdump",
nm_cmd="powerpc-xenon-pe-nm",
)

ANDROID_X86 = Platform(
id="android_x86",
name="Android x86",
Expand Down Expand Up @@ -291,6 +301,7 @@ def from_id(platform_id: str) -> Platform:
"msdos": MSDOS,
"wiiu": WIIU,
"win32": WIN32,
"xbox360": XBOX360,
"android_x86": ANDROID_X86,
}
)
2 changes: 1 addition & 1 deletion backend/coreapp/views/scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def cache_object(platform: Platform, file: File[Any]) -> Assembly:
obj_bytes = file.read()
is_elf = obj_bytes[:4] == b"\x7fELF"
is_macho = obj_bytes[:4] == b"\xcf\xfa\xed\xfe"
is_coff = obj_bytes[:2] in (b"\x4c\x01", b"\x64\x86")
is_coff = obj_bytes[:2] in (b"\x4c\x01", b"\x64\x86", b"\xf2\x01")
if not (is_elf or is_macho or is_coff):
raise serializers.ValidationError("Object must be an ELF, Mach-O, or COFF file")

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/PlatformSelect/PlatformIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import LogoSwitch from "./switch.svg";
import UnknownIcon from "./unknown.svg";
import LogoWiiU from "./wiiu.svg";
import LogoWin32 from "./win32.svg";
import LogoXbox360 from "./xbox360.svg";

/** In release-date order */
const ICONS = {
Expand All @@ -39,6 +40,7 @@ const ICONS = {
switch: LogoSwitch,
saturn: LogoSaturn,
dreamcast: LogoDreamcast,
xbox360: LogoXbox360,
android_x86: LogoAndroid,
};

Expand Down
72 changes: 72 additions & 0 deletions frontend/src/components/PlatformSelect/xbox360.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/locales/en/compilers.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
"msvc8.0": "Microsoft Visual C/C++ 8.0",
"msvc8.0p": "Microsoft Visual C/C++ 8.0 (Patched)",

"msvc_ppc_14.00.2110": "Microsoft C/C++ Compiler 14.00.2110 for PowerPC",
"msvc_ppc_16.00.11886.00": "Microsoft C/C++ Compiler 16.00.11886.00 for PowerPC",

"mwcc_20_72": "2.0 build 72 (MW 1.2base)",
"mwcc_20_79": "2.0 build 79 (MW 1.2sp2)",
"mwcc_20_82": "2.0 build 82 (MW 1.2sp2p3)",
Expand Down