1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2026-04-19 08:27:40 +00:00

cc7800: updated build, wasi fix

This commit is contained in:
Steven Hugg
2025-09-23 16:40:16 -05:00
parent 28390ce60e
commit a2f097461e
4 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -560,10 +560,10 @@ export class WASIRunner {
}
fd_prestat_get(fd: number, prestat_ptr: number) {
const file = this.fds[fd];
debug("fd_prestat_get", fd, prestat_ptr, file?.name);
debug("fd_prestat_get", fd, prestat_ptr, file?.name, file?.type);
if (file && file.type === FDType.DIRECTORY) {
const enc_name = new TextEncoder().encode(file.name);
this.poke8(prestat_ptr + 0, 0); // __WASI_PREOPENTYPE_DIR
this.poke64(prestat_ptr + 0, 0); // __WASI_PREOPENTYPE_DIR
this.poke64(prestat_ptr + 8, enc_name.length);
return WASIErrors.SUCCESS;
}
Binary file not shown.
+1
View File
@@ -47,6 +47,7 @@ export async function compileCC7800(step: BuildStep): Promise<BuildStepResult> {
if (errors.length) {
return { errors };
}
console.log(wasi.fs);
const combinedasm = wasi.fs.getFile(destpath).getBytesAsString();
putWorkFile(destpath, combinedasm);
}
Binary file not shown.