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:
@@ -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.
@@ -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.
Reference in New Issue
Block a user