Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4d97015
Build and Link on 3DS
IridescentRose Apr 28, 2026
5c860ea
Nintendo Switch build
IridescentRose Apr 28, 2026
3c9a0f3
Update .gitignore
IridescentRose May 26, 2026
10163c0
Get closer to working sample
IridescentRose May 26, 2026
1a020d8
Improve path finding
IridescentRose May 26, 2026
3303a4a
Audio
IridescentRose May 26, 2026
3a93ddb
Input
IridescentRose May 26, 2026
7b5345f
Switch graphics
IridescentRose May 26, 2026
e88eca4
First triangle
IridescentRose May 27, 2026
c8b1470
Fix 3DS Time
IridescentRose May 27, 2026
d0493bb
Textures working
IridescentRose May 30, 2026
124596f
Fix file IO
IridescentRose May 31, 2026
3b5c78e
Destroy Miniaudio, use SDL3
IridescentRose May 31, 2026
543c839
Dir iter, C patch.
IridescentRose Jun 2, 2026
2bbbd5d
link_libc
IridescentRose Jun 2, 2026
b7e0ab7
Fix seeking
IridescentRose Jun 2, 2026
0d1d96c
Fix crashes
IridescentRose Jun 2, 2026
b580843
Fix high FPS input
IridescentRose Jun 3, 2026
7556d5f
move matmul to shader
IridescentRose Jun 3, 2026
d077fdc
resolve some gpu issues
IridescentRose Jun 4, 2026
a220e0f
guarantee linear ram
IridescentRose Jun 4, 2026
7327272
Slow working diag
IridescentRose Jun 4, 2026
4a993a8
Better 3DS Panic
IridescentRose Jun 6, 2026
49953a9
Delete 3ds_gfx.zig
IridescentRose Jun 6, 2026
a88e1ce
Fix assert crash
IridescentRose Jun 6, 2026
b6dc174
Create 3ds_gfx.zig
IridescentRose Jun 6, 2026
39881f4
3DS GFX Rewrite
IridescentRose Jun 6, 2026
fbf4284
Improved demo
IridescentRose Jun 6, 2026
373768c
Add 3DS memory changes
IridescentRose Jun 6, 2026
2070d8d
Simplify memory
IridescentRose Jun 6, 2026
670df62
Simplify shader model
IridescentRose Jun 6, 2026
354d709
Delete Pipeline API
IridescentRose Jun 6, 2026
c854237
Cleanup C Libs
IridescentRose Jun 6, 2026
00864b9
Fix 3DS Hang
IridescentRose Jun 6, 2026
5b3b5cb
Simplify 3DS backend
IridescentRose Jun 6, 2026
7ab318a
Lessen corruption
IridescentRose Jun 6, 2026
f77f851
Mango 3DS GFX
IridescentRose Jun 7, 2026
e3bb37a
Fix 3DS C compile UB
IridescentRose Jun 7, 2026
ee47437
Fix Depth & UV
IridescentRose Jun 7, 2026
18c6e44
Vsync fix, VRAM fix
IridescentRose Jun 7, 2026
d03581b
Higher resolution 2D
IridescentRose Jun 7, 2026
8fa88cf
Fix closing crash
IridescentRose Jun 9, 2026
85a1b37
Thread & Async 3DS
IridescentRose Jun 9, 2026
a49c85b
Fix panic
IridescentRose Jun 9, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ zig-pkg
.claude
CLAUDE.md
*.log
*.wav
9 changes: 9 additions & 0 deletions LICENSE.zitrus
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This project's 3DS backend uses components from Zitrus:

Copyright © 2025 GasInfinity

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 changes: 13 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ pub fn build(b: *std.Build) void {
.overrides = overrides,
});

// Compile a Slang shader for the selected backend and embed it at compile time
Aether.addShader(ae_dep.builder, b, exe, config, "basic", .{
.slang = b.path("shaders/basic.slang"),
});

// Export the artifact (produces EBOOT.PBP for PSP, install artifact otherwise)
Aether.exportArtifact(ae_dep.builder, b, exe, config, .{
.title = "My Game",
Expand All @@ -83,7 +78,7 @@ pub fn build(b: *std.Build) void {
}
```

The first argument to `addGame`, `addShader`, and `exportArtifact` is the
The first argument to `addGame` and `exportArtifact` is the
dependency's builder (`ae_dep.builder`), and the second is your project's
builder (`b`). This lets Aether resolve its own internal dependencies (GLFW,
Vulkan, Slang, pspsdk) from its `build.zig.zon` while building artifacts that
Expand Down Expand Up @@ -117,11 +112,12 @@ const MyState = struct {
};

pub fn main(init: std.process.Init) !void {
const memory = try init.arena.allocator().alloc(u8, 32 * 1024 * 1024);
const memory = try init.gpa.alignedAlloc(u8, .fromByteUnits(16), 32 * 1024 * 1024);
defer init.gpa.free(memory);

var my_state: MyState = undefined;
var engine: ae.Engine = undefined;
try engine.init(init.io, memory, .{
try engine.init(init.io, init.environ_map, memory, .{
.memory = .{
.render = 8 * 1024 * 1024,
.audio = 2 * 1024 * 1024,
Expand Down Expand Up @@ -159,10 +155,17 @@ zig build run -Dgfx=opengl
# Build for PSP
zig build -Dtarget=mipsel-psp

# Build for 3DS
zig build -Dtarget=arm-3ds-eabihf

# Build in release mode
zig build -Doptimize=ReleaseFast
```

3DS builds default to a 4 MiB regular libctru/newlib heap and a 60 MiB
linear heap. Aether's process allocator uses linear memory on 3DS, so engine
pool allocations and GPU upload buffers come from the same memory class.

## Input System

Actions are registered by name and bound to one or more input sources:
Expand Down Expand Up @@ -190,11 +193,9 @@ const Vertex = struct {
});
pub const Layout = Rendering.Pipeline.layout_from_struct(@This(), &Attributes);
};

const MyMesh = Rendering.Mesh(Vertex);
```

Shaders are written in [Slang](https://shader-slang.com/) (`.slang` files), compiled at build time via `addShader`, and embedded into the binary. Vulkan consumes SPIR-V; OpenGL consumes GLSL 4.50. PSP targets ignore shaders entirely (fixed-function pipeline); the build system generates empty stubs.
Aether owns its built-in pipeline shaders as backend internals. Downstream games create pipelines from vertex layouts; the selected backend compiles and embeds the shader code it needs.

## Build API Reference

Expand All @@ -210,15 +211,6 @@ Creates a game executable with the engine module and platform dependencies wired
| `optimize` | `OptimizeMode` | Optimization level (default: `.Debug`) |
| `overrides` | `Config.Overrides` | Graphics/display mode overrides (default: `.{}`) |

### `Aether.addShader(owner, b, exe, config, name, paths)`

Compiles a Slang shader for the selected backend and embeds it into the executable. Vulkan gets SPIR-V, OpenGL gets GLSL 4.50, and PSP targets get empty stubs.

| Option | Type | Description |
|--------|------|-------------|
| `name` | `[]const u8` | Shader name (used for `@embedFile` lookup) |
| `paths.slang` | `LazyPath` | Path to the `.slang` source file |

### `Aether.exportArtifact(owner, b, exe, config, opts)`

Exports the build artifact. For PSP targets, produces an `EBOOT.PBP`. For desktop, installs the artifact normally.
Expand All @@ -233,7 +225,7 @@ Exports the build artifact. For PSP targets, produces an `EBOOT.PBP`. For deskto

### `Aether.Config.resolve(target, overrides) -> Config`

Resolves the full engine configuration (platform, graphics backend, audio, input) from the build target and any user overrides. Pass the result to `addShader` and `exportArtifact`.
Resolves the full engine configuration (platform, graphics backend, audio, input) from the build target and any user overrides. Pass the result to `exportArtifact`.

### `Aether.Config.Overrides`

Expand Down
Loading