Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Handle Zig panics |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
88241cf9c2f8358427d8c7ebdb1a0805 |
| User & Date: | ryno 2025-01-30 04:35:47.064 |
Context
|
2025-01-30
| ||
| 10:29 | Put literally anything on the screen check-in: d5c698fc12 user: ryno tags: trunk | |
| 04:35 | Handle Zig panics check-in: 88241cf9c2 user: ryno tags: trunk | |
| 04:33 | Fix SC64 USB print (i.e. actually wait for previous USB writes to finish before starting another one), and document / packed-struct-inate some more fields check-in: 7871e478a6 user: ryno tags: trunk | |
Changes
Changes to src/main.zig.
| ︙ | ︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
// BEGIN EVERYTHING ELSE
/// N64 ROM entry point. IPL3 calls this function after initializing
/// RDRAM and loading our code into it.
export fn __start() linksection(".boot") noreturn {
Debug.init();
Debug.print("All your Nintendo 64 are belong to us.\n");
const dmem_test_pat: [16]u8 align(4) = .{
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xba, 0xbe
};
PI.writeBytes(dmem, &dmem_test_pat);
while (true) {}
}
// END EVERYTHING ELSE
| > > > > > > > > > > > > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
// BEGIN EVERYTHING ELSE
/// N64 ROM entry point. IPL3 calls this function after initializing
/// RDRAM and loading our code into it.
export fn __start() linksection(".boot") noreturn {
Debug.init();
Debug.print("All your Nintendo 64 are belong to us.\n");
Debug.print("This is another message from Zig.\n");
const dmem_test_pat: [16]u8 align(4) = .{
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xde, 0xad, 0xbe, 0xef, 0xca, 0xfe, 0xba, 0xbe
};
PI.writeBytes(dmem, &dmem_test_pat);
while (true) {}
}
pub fn panic(
msg: []const u8,
_: ?*std.builtin.StackTrace,
_: ?usize
) noreturn {
Debug.print("PANIC: ");
Debug.print(msg);
Debug.print("\n");
while (true) {}
}
// END EVERYTHING ELSE
|