mirror of
https://github.com/decompme/decomp.me.git
synced 2026-01-28 16:29:08 -06:00
Add PSP platform (#958)
* Add PSP platform * black * Add credits for font used in PSP logo * Switch wine for wibo + bump version * use wine again for pspsnc.exe * bump asm-differ
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -87,7 +87,7 @@ jobs:
|
||||
poetry run python3 libraries/download.py
|
||||
- name: Install wibo
|
||||
run: |-
|
||||
wget https://github.com/decompals/wibo/releases/download/0.6.10/wibo && chmod +x wibo && sudo cp wibo /usr/bin/
|
||||
wget https://github.com/decompals/wibo/releases/download/0.6.12/wibo && chmod +x wibo && sudo cp wibo /usr/bin/
|
||||
|
||||
- name: Run backend tests
|
||||
run: |-
|
||||
|
||||
@@ -59,11 +59,11 @@ RUN apt-get -y update && apt-get install -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -sSL https://install.python-poetry.org/ | \
|
||||
POETRY_VERSION=1.6.1 POETRY_HOME=/etc/poetry python3.10 -
|
||||
POETRY_VERSION=1.6.1 POETRY_HOME=/etc/poetry python3.10 -
|
||||
|
||||
COPY --from=nsjail /nsjail/nsjail /bin/nsjail
|
||||
|
||||
COPY --from=ghcr.io/decompals/wibo:0.6.10 /usr/local/sbin/wibo /usr/bin/
|
||||
COPY --from=ghcr.io/decompals/wibo:0.6.12 /usr/local/sbin/wibo /usr/bin/
|
||||
|
||||
RUN add-apt-repository -y ppa:dosemu2/ppa && \
|
||||
apt-get update && \
|
||||
@@ -75,11 +75,11 @@ ARG ENABLE_MSDOS_SUPPORT
|
||||
ARG ENABLE_PS2_SUPPORT
|
||||
ARG ENABLE_WIN9X_SUPPORT
|
||||
RUN if [ "${ENABLE_MSDOS_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_PS2_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_WIN9X_SUPPORT}" = "YES" ]; then \
|
||||
[ "${ENABLE_PS2_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_WIN9X_SUPPORT}" = "YES" ]; then \
|
||||
dpkg --add-architecture i386 && apt-get update && \
|
||||
apt-get install -y -o APT::Immediate-Configure=false \
|
||||
wine; \
|
||||
wine; \
|
||||
fi
|
||||
|
||||
# msdos specific
|
||||
@@ -107,9 +107,9 @@ USER user
|
||||
|
||||
# initialize wine files to /home/user/.wine
|
||||
RUN if [ "${ENABLE_MSDOS_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_NDS_ARM9_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_PS2_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_WIN9X_SUPPORT}" = "YES" ]; then \
|
||||
[ "${ENABLE_NDS_ARM9_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_PS2_SUPPORT}" = "YES" ] || \
|
||||
[ "${ENABLE_WIN9X_SUPPORT}" = "YES" ]; then \
|
||||
wineboot --init; \
|
||||
fi
|
||||
|
||||
@@ -123,6 +123,7 @@ ARG ENABLE_N3DS_SUPPORT
|
||||
ARG ENABLE_N64_SUPPORT
|
||||
ARG ENABLE_NDS_ARM9_SUPPORT
|
||||
ARG ENABLE_PS1_SUPPORT
|
||||
ARG ENABLE_PSP_SUPPORT
|
||||
ARG ENABLE_SATURN_SUPPORT
|
||||
ARG ENABLE_SWITCH_SUPPORT
|
||||
|
||||
@@ -135,6 +136,7 @@ ENV ENABLE_N64_SUPPORT=${ENABLE_N64_SUPPORT}
|
||||
ENV ENABLE_NDS_ARM9_SUPPORT=${ENABLE_NDS_ARM9_SUPPORT}
|
||||
ENV ENABLE_PS1_SUPPORT=${ENABLE_PS1_SUPPORT}
|
||||
ENV ENABLE_PS2_SUPPORT=${ENABLE_PS2_SUPPORT}
|
||||
ENV ENABLE_PSP_SUPPORT=${ENABLE_PSP_SUPPORT}
|
||||
ENV ENABLE_SATURN_SUPPORT=${ENABLE_SATURN_SUPPORT}
|
||||
ENV ENABLE_SWITCH_SUPPORT=${ENABLE_SWITCH_SUPPORT}
|
||||
ENV ENABLE_WIN9X_SUPPORT=${ENABLE_WIN9X_SUPPORT}
|
||||
|
||||
@@ -125,6 +125,12 @@ ps2:
|
||||
- mwcps2-3.0b22-020716
|
||||
- mwcps2-3.0b22-020926
|
||||
|
||||
psp:
|
||||
- pspsnc_1.2.7503.0
|
||||
- mwccpsp_3.0.1_121
|
||||
- mwccpsp_3.0.1_147
|
||||
- mwccpsp_3.0.1_151
|
||||
|
||||
saturn:
|
||||
- cygnus-2.7-96Q3
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ from coreapp.platforms import (
|
||||
NDS_ARM9,
|
||||
PS1,
|
||||
PS2,
|
||||
PSP,
|
||||
SATURN,
|
||||
SWITCH,
|
||||
WIN9X,
|
||||
@@ -565,6 +566,32 @@ MWCPS2_30B22_020926 = MWCCCompiler(
|
||||
cc='${WINE} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
|
||||
)
|
||||
|
||||
# PSP
|
||||
PSPSNC_1_2_7503_0 = GCCCompiler(
|
||||
id="pspsnc_1.2.7503.0",
|
||||
platform=PSP,
|
||||
cc='${WINE} ${COMPILER_DIR}/pspsnc.exe -c -td=. ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"',
|
||||
)
|
||||
|
||||
MWCCPSP_CC = (
|
||||
'${WIBO} ${COMPILER_DIR}/mwccpsp.exe -c ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"'
|
||||
)
|
||||
|
||||
MWCCPSP_3_0_1_121 = MWCCCompiler(
|
||||
id="mwccpsp_3.0.1_121",
|
||||
platform=PSP,
|
||||
cc=MWCCPSP_CC,
|
||||
)
|
||||
MWCCPSP_3_0_1_147 = MWCCCompiler(
|
||||
id="mwccpsp_3.0.1_147",
|
||||
platform=PSP,
|
||||
cc=MWCCPSP_CC,
|
||||
)
|
||||
MWCCPSP_3_0_1_151 = MWCCCompiler(
|
||||
id="mwccpsp_3.0.1_151",
|
||||
platform=PSP,
|
||||
cc=MWCCPSP_CC,
|
||||
)
|
||||
|
||||
# N64
|
||||
IDO53 = IDOCompiler(
|
||||
@@ -1216,6 +1243,11 @@ _all_compilers: List[Compiler] = [
|
||||
GCC281_MIPSEL,
|
||||
GCC29166_MIPSEL,
|
||||
GCC2952_MIPSEL,
|
||||
# PSP
|
||||
PSPSNC_1_2_7503_0,
|
||||
MWCCPSP_3_0_1_121,
|
||||
MWCCPSP_3_0_1_147,
|
||||
MWCCPSP_3_0_1_151,
|
||||
# Saturn
|
||||
CYGNUS_2_7_96Q3,
|
||||
# PS2
|
||||
|
||||
@@ -24,7 +24,7 @@ class DecompilerWrapper:
|
||||
return f"decompiled({asm})"
|
||||
|
||||
ret = default_source_code
|
||||
if platform.arch in ["mips", "mipsee", "mipsel", "ppc"]:
|
||||
if platform.arch in ["mips", "mipsee", "mipsel", "mipsel:4000", "ppc"]:
|
||||
if len(asm.splitlines()) > MAX_M2C_ASM_LINES:
|
||||
return "/* Too many lines to decompile; please run m2c manually */"
|
||||
try:
|
||||
|
||||
@@ -256,7 +256,7 @@ PS1 = Platform(
|
||||
name="PlayStation",
|
||||
description="MIPS (little-endian)",
|
||||
arch="mipsel",
|
||||
assemble_cmd='mips-linux-gnu-as -march=r3000 -mabi=32 -o "$OUTPUT" "$INPUT"',
|
||||
assemble_cmd='mips-linux-gnu-as -EL -march=r3000 -mabi=32 -o "$OUTPUT" "$INPUT"',
|
||||
objdump_cmd="mips-linux-gnu-objdump",
|
||||
nm_cmd="mips-linux-gnu-nm",
|
||||
diff_flags=COMMON_DIFF_FLAGS + COMMON_MIPS_DIFF_FLAGS,
|
||||
@@ -285,6 +285,36 @@ PS1 = Platform(
|
||||
""",
|
||||
)
|
||||
|
||||
PSP = Platform(
|
||||
id="psp",
|
||||
name="PlayStation Portable",
|
||||
description="MIPS (little-endian)",
|
||||
arch="mipsel:4000",
|
||||
assemble_cmd='mips-linux-gnu-as -EL -march=r4000 -mabi=32 -o "$OUTPUT" "$INPUT"',
|
||||
objdump_cmd="mips-linux-gnu-objdump",
|
||||
nm_cmd="mips-linux-gnu-nm",
|
||||
diff_flags=COMMON_DIFF_FLAGS + COMMON_MIPS_DIFF_FLAGS,
|
||||
asm_prelude="""
|
||||
.macro .late_rodata
|
||||
.section .rodata
|
||||
.endm
|
||||
|
||||
.macro glabel label
|
||||
.global \label
|
||||
.type \label, @function
|
||||
\label:
|
||||
.endm
|
||||
|
||||
.macro jlabel label
|
||||
\label:
|
||||
.endm
|
||||
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
""",
|
||||
)
|
||||
|
||||
SATURN = Platform(
|
||||
id="saturn",
|
||||
name="Saturn",
|
||||
@@ -713,6 +743,7 @@ _platforms: OrderedDict[str, Platform] = OrderedDict(
|
||||
"n3ds": N3DS,
|
||||
"ps1": PS1,
|
||||
"ps2": PS2,
|
||||
"psp": PSP,
|
||||
"saturn": SATURN,
|
||||
"macosx": MACOSX,
|
||||
"msdos": MSDOS,
|
||||
|
||||
2
backend/poetry.lock
generated
2
backend/poetry.lock
generated
@@ -51,7 +51,7 @@ watchdog = "^2.2.0"
|
||||
type = "git"
|
||||
url = "https://github.com/simonlindholm/asm-differ.git"
|
||||
reference = "HEAD"
|
||||
resolved_reference = "77465bce442fed294b383a7a0e28ea7776ba9715"
|
||||
resolved_reference = "1786d0afc69d38586cba850834a7b5c649f2c0a4"
|
||||
|
||||
[[package]]
|
||||
name = "attrs"
|
||||
|
||||
@@ -28,6 +28,7 @@ const ICON_SOURCES = {
|
||||
"Saturn by JustDanPatrick": "https://upload.wikimedia.org/wikipedia/commons/archive/7/78/20220518145749%21Sega_Saturn_Black_Logo.svg",
|
||||
"MS-DOS by Microsoft": "https://commons.wikimedia.org/wiki/File:Msdos-icon.svg",
|
||||
"Windows 9x by Microsoft": "https://commons.wikimedia.org/wiki/File:Windows_Logo_(1992-2001).svg",
|
||||
"PerSPire Font by Sean Liew": "https://www.fontspace.com/sean-liew",
|
||||
}
|
||||
|
||||
type Contributor = {
|
||||
|
||||
@@ -8,6 +8,7 @@ import LogoN64 from "./n64.svg"
|
||||
import LogoNDS from "./nds.svg"
|
||||
import LogoPS1 from "./ps1.svg"
|
||||
import LogoPS2 from "./ps2.svg"
|
||||
import LogoPSP from "./psp.svg"
|
||||
import LogoSaturn from "./saturn.svg"
|
||||
import LogoSwitch from "./switch.svg"
|
||||
import UnknownIcon from "./unknown.svg"
|
||||
@@ -25,6 +26,7 @@ const ICONS = {
|
||||
"nds_arm9": LogoNDS,
|
||||
"ps1": LogoPS1,
|
||||
"ps2": LogoPS2,
|
||||
"psp": LogoPSP,
|
||||
"n3ds": LogoN3DS,
|
||||
"switch": LogoSwitch,
|
||||
"saturn": LogoSaturn,
|
||||
|
||||
4
frontend/src/components/PlatformSelect/psp.svg
Normal file
4
frontend/src/components/PlatformSelect/psp.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="40" height="40" version="1.1" viewBox="0 0 10.583 10.583" xmlns="http://www.w3.org/2000/svg">
|
||||
<path transform="matrix(.31836 0 0 .31836 18.483 8.9691)" d="m-58.059-15.449h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm-9.375 1.1719h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm-9.375 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm16.036-7.0313h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm-4.6875 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm-4.6875 1.1719h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm6.6609-7.0313h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm-9.375 1.1719h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm1.1719 0h1.1719v1.1719h-1.1719zm-9.375 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719zm0 1.1719h1.1719v1.1719h-1.1719z" fill="#19c6c6" aria-label="PSP"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -149,6 +149,11 @@
|
||||
|
||||
"psyq4.4-ccpsx": "CCPSX (PSYQ4.4: gcc 2.8.1 + aspsx 2.79)",
|
||||
|
||||
"mwccpsp_3.0.1_121": "MWCC 1.0 (3.0.1 121)",
|
||||
"mwccpsp_3.0.1_147": "MWCC 1.1 (3.0.1 147)",
|
||||
"mwccpsp_3.0.1_151": "MWCC 1.1 SP1 (3.0.1 151)",
|
||||
"pspsnc_1.2.7503.0": "SN 1.2.7503.0",
|
||||
|
||||
"wcc10.5": "Watcom Optimizing C i386 Compiler 10.5",
|
||||
"wpp10.5": "Watcom Optimizing C++ i386 Compiler 10.5",
|
||||
"wcc10.5a": "Watcom Optimizing C i386 Compiler 10.5a",
|
||||
|
||||
Reference in New Issue
Block a user