Skip to content

Commit bb20c8c

Browse files
committed
feat(platform): add xbox
1 parent a08d02e commit bb20c8c

6 files changed

Lines changed: 136 additions & 91 deletions

File tree

‎build.md‎

Lines changed: 57 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ SDKs and [Mist++](https://github.grady.link/mistpp) installed.
7676
toolchain. It includes every SDL2 thing you might need.
7777
- **For webOS**, all you need is the webosbrew Native SDK installed to your home
7878
directory and ares-cli.
79+
- **For Original Xbox**, you'll need [nxdk](https://github.com/xboxDev/nxdk) and
80+
[nxdk-sdl3_audio](https://github.com/Ryzee119/nxdk-sdl3/tree/nxaudio).
7981

8082
> [!NOTE]
8183
> DevkitPro's install instructions are available at:
@@ -130,6 +132,10 @@ done with `cmake`, though the exact commands differ between platforms:
130132
> [!NOTE]
131133
> Creating the `build` directory and using the `LIBRETRO=ON` flag is required
132134
> for libretro builds.
135+
- **For Original Xbox**, you need to run
136+
`cmake -B build/xbox -DCMAKE_TOOLCHAIN_FILE="$NXDK_DIR/share/toolchain-nxdk.cmake" -DXBOX=ON && cmake --build build/xbox`.
137+
> [!NOTE]
138+
> Original Xbox requires the `XBOX=ON` flag.
133139
134140
## Final Packages
135141

@@ -183,22 +189,23 @@ The audio backend to be used. Can be one of `sdl2`, `sdl1`, `sdl3`, `libpulse`,
183189

184190
#### Supported Audio Engines
185191

186-
| Platform | `sdl1` | `sdl2` | `sdl3` | `libpulse` | `winmm` | `nds` | `libretro` | `headless` |
187-
| --------- | ------ | ------ | ------ | ---------- | ------- | ----- | ---------- | ---------- |
188-
| Windows | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
189-
| macOS | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
190-
| Linux/BSD | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
191-
| 3DS | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
192-
| DS | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
193-
| Wii U | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
194-
| Wii | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
195-
| GameCube | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
196-
| Switch | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
197-
| Vita | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
198-
| PSP | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
199-
| PS4 | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
200-
| webOS | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
201-
| Libretro | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
192+
| Platform | `sdl1` | `sdl2` | `sdl3` | `libpulse` | `winmm` | `nds` | `libretro` | `headless` |
193+
| ------------- | ------ | ------ | ------ | ---------- | ------- | ----- | ---------- | ---------- |
194+
| Windows | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
195+
| macOS | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
196+
| Linux/BSD | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
197+
| 3DS | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
198+
| DS | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
199+
| Wii U | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
200+
| Wii | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
201+
| GameCube | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
202+
| Switch | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
203+
| Vita | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
204+
| PSP | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
205+
| PS4 | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
206+
| webOS | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
207+
| Libretro | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
208+
| Original Xbox | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
202209

203210
The default value depends on the renderer being used[^1] (see below):
204211

@@ -267,22 +274,23 @@ The allowed modes depend on the platform you are building for:
267274

268275
#### Supported Dependency Modes
269276

270-
| Platform | `source` | `system` | `fallback` |
271-
| --------- | -------- | -------- | ---------- |
272-
| Windows | ✅ | ✅ | ✅ |
273-
| macOS | ✅ | ✅ | ✅ |
274-
| Linux/BSD | ✅ | ✅ | ✅ |
275-
| 3DS | ❌ | ✅ | ✅ |
276-
| DS | ❌ | ✅ | ✅ |
277-
| Wii U | ❌ | ✅ | ✅ |
278-
| Wii | ✅ | ✅ | ✅ |
279-
| GameCube | ❌ | ✅ | ✅ |
280-
| Switch | ❌ | ✅ | ✅ |
281-
| Vita | ❌ | ✅ | ✅ |
282-
| PSP | ❌ | ✅ | ✅ |
283-
| PS4 | ❌ | ✅ | ✅ |
284-
| webOS | ❌ | ❌ | ✅ |
285-
| Libretro | ✅ | ✅ | ✅ |
277+
| Platform | `source` | `system` | `fallback` |
278+
| ------------- | -------- | -------- | ---------- |
279+
| Windows | ✅ | ✅ | ✅ |
280+
| macOS | ✅ | ✅ | ✅ |
281+
| Linux/BSD | ✅ | ✅ | ✅ |
282+
| 3DS | ❌ | ✅ | ✅ |
283+
| DS | ❌ | ✅ | ✅ |
284+
| Wii U | ❌ | ✅ | ✅ |
285+
| Wii | ✅ | ✅ | ✅ |
286+
| GameCube | ❌ | ✅ | ✅ |
287+
| Switch | ❌ | ✅ | ✅ |
288+
| Vita | ❌ | ✅ | ✅ |
289+
| PSP | ❌ | ✅ | ✅ |
290+
| PS4 | ❌ | ✅ | ✅ |
291+
| webOS | ❌ | ❌ | ✅ |
292+
| Libretro | ✅ | ✅ | ✅ |
293+
| Original Xbox | ❌ | ✅ | ✅ |
286294

287295
### `SE_DOWNLOAD`
288296

@@ -328,22 +336,23 @@ The renderer backend to be used. Can be one of `sdl1`, `sdl2`, `sdl3`, `opengl`,
328336

329337
#### Supported Renderers
330338

331-
| Platform | `sdl1` | `sdl2` | `sdl3` | `opengl` | `opengl_core` | `gdi` | `d3d9` | `citro2d` | `gl2d` | `headless` |
332-
| --------- | ------ | ------ | ------ | -------- | ------------- | ----- | ------ | --------- | ------ | ---------- |
333-
| Windows | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
334-
| macOS | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
335-
| Linux/BSD | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
336-
| 3DS | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
337-
| DS | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
338-
| Wii U | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
339-
| Wii | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
340-
| GameCube | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
341-
| Switch | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
342-
| Vita | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
343-
| PSP | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
344-
| PS4 | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
345-
| webOS | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
346-
| Libretro | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
339+
| Platform | `sdl1` | `sdl2` | `sdl3` | `opengl` | `opengl_core` | `gdi` | `d3d9` | `citro2d` | `gl2d` | `headless` |
340+
| ------------- | ------ | ------ | ------ | -------- | ------------- | ----- | ------ | --------- | ------ | ---------- |
341+
| Windows | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
342+
| macOS | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
343+
| Linux/BSD | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
344+
| 3DS | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ |
345+
| DS | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
346+
| Wii U | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
347+
| Wii | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
348+
| GameCube | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
349+
| Switch | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
350+
| Vita | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
351+
| PSP | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
352+
| PS4 | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
353+
| webOS | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
354+
| Libretro | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
355+
| Original Xbox | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
347356

348357
Defaults to `citro2d` on 3DS, `gl2d` on NDS, `opengl_core` on PC (except for
349358
Windows which defaults to `d3d9`) and Libretro, and `sdl2` on everything else.

‎docker.md‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,19 @@ When finished, it should look something like this: ![image](pictures/result.png)
210210
After a successful build, your exported files will appear directly in the
211211
`ScratchEverywhere` folder.
212212

213-
| Platform | File Types |
214-
| ---------------- | --------------------------------------------- |
215-
| **3DS** | `.3dsx` and `.cia` |
216-
| **Wii U** | `.rpx` and `.wuhb` |
217-
| **Vita** | `.vpk` |
218-
| **PS4** | `.pkg` |
219-
| **Switch** | `.nro` |
220-
| **PSP** | `.zip` |
221-
| **DS** | `.nds` |
222-
| **GameCube/Wii** | `.dol` |
223-
| **webOS** | `.ipk` |
224-
| **PC** | `scratch-*` (Unix/macOS) <br>`.exe` (Windows) |
213+
| Platform | File Types |
214+
| ----------------- | --------------------------------------------- |
215+
| **3DS** | `.3dsx` and `.cia` |
216+
| **Wii U** | `.rpx` and `.wuhb` |
217+
| **Vita** | `.vpk` |
218+
| **PS4** | `.pkg` |
219+
| **Switch** | `.nro` |
220+
| **PSP** | `.zip` |
221+
| **DS** | `.nds` |
222+
| **GameCube/Wii** | `.dol` |
223+
| **webOS** | `.ipk` |
224+
| **Original Xbox** | `.iso` and `.xbe` |
225+
| **PC** | `scratch-*` (Unix/macOS) <br>`.exe` (Windows) |
225226

226227
You can now copy these files to your console and install or launch them like any
227228
other homebrew app!

‎index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ features:
3939
<a href="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-pc.yml"><img src="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-pc.yml/badge.svg" alt="PC Nightly Build"></a>
4040
<a href="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-webos.yml"><img src="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-webos.yml/badge.svg" alt="webOS Nightly Build"></a>
4141
<a href="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-libretro.yml"><img src="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-libretro.yml/badge.svg" alt="Libretro Nightly Build"></a>
42+
<a href="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-xbox.yml"><img src="https://github.com/ScratchEverywhere/ScratchEverywhere/actions/workflows/nightly-xbox.yml/badge.svg" alt="Original Xbox Nightly Build"></a>
4243
<a href="https://discord.gg/Y2gf5vZHpJ"><img alt="Discord" src="https://img.shields.io/discord/1408875318248345612?style=flat&logo=discord&label=Discord%20Server&link=https%3A%2F%2Fdiscord.gg%2FY2gf5vZHpJ"></a>
4344
</p>

‎install.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,34 @@ Directory -> Cores.
243243
> The `gl` driver is currently broken with the SE! core.
244244
245245
Then it should be as simple as loading the core and opening a Scratch project!
246+
247+
## Original Xbox
248+
249+
Download the `scratch-xbox.zip` file from the
250+
[Releases tab](https://github.com/ScratchEverywhere/ScratchEverywhere/releases)
251+
or
252+
[nightly build](https://nightly.link/ScratchEverywhere/ScratchEverywhere/workflows/nightly-ps4/main/Scratch%20Everywhere!%20Original%20Xbox%20Nightly.zip).
253+
254+
The `.zip` file contains two formats:
255+
256+
### XISO (`scratch-xbox.iso`)
257+
258+
> [!IMPORTANT]
259+
> The XISO currently does not work on Xemu due to issues with audio. You'll need
260+
> to manually build it with the `headless` audio mode; see the
261+
> [build guide](/build.md).
262+
263+
This file is primarily used with Xemu. Place Scratch projects in
264+
`E:\ScratchEverywhere` on the emulated HDD following the
265+
[official Xemu documentation](https://xemu.app/docs/ftp/).
266+
267+
Then it should be as simple as opening it in Xemu!
268+
269+
### XBE (`default.xbe`)
270+
271+
**This is the recommended format to use.**
272+
273+
This file is used with real modded Xboxes. Copy it wherever you'd like, and
274+
place Scratch projects in `E:\ScratchEverywhere`.
275+
276+
Then it should be as simple as running `default.xbe`!

‎intro.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ implementation of the Scratch runtime. In simpler words, it's a way to run
55
Scratch projects on old homebrew consoles.
66

77
The project supports 3DS, DS, DSi, Wii U, Wii, GameCube, Switch, Vita, PSP, PS4,
8-
webOS (for LG TVs), Libretro (RetroArch), Windows, Linux, and macOS!
8+
webOS (for LG TVs), Libretro (RetroArch), Original Xbox, Windows, Linux, and
9+
macOS!

0 commit comments

Comments
 (0)