-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
The original 24 x24 pixel image is as follows:

After executing w4 run cart.wasm, the displayed image is as follows:

I executed w4 png2src demo.png --as and copied the code into main.ts as follows:
import * as w4 from "./wasm4";
const demoWidth = 24;
const demoHeight = 24;
const demoFlags = 1; // BLIT_2BPP
const demo = memory.data<u8>([0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x80, 0x00, 0x1a, 0x90, 0x00, 0x02, 0x80, 0x00, 0x1a, 0x90, 0x00, 0x02, 0x80, 0x00, 0x15, 0x50, 0x00, 0x02, 0x80, 0x00, 0x15, 0x50, 0x00, 0x02, 0x80, 0x00, 0x3f, 0xf0, 0x00, 0x02, 0x80, 0x00, 0x3f, 0xf0, 0x00, 0x02, 0x80, 0x00, 0x3f, 0xf0, 0x00, 0x02, 0x80, 0x00, 0x3f, 0xf0, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]);
export function update(): void {
w4.blit(demo, 0, 0, demoWidth, demoHeight, demoFlags);
}The color of the pixel where blue should appear is not displayed.
Did I make a mistake in my operation?
Metadata
Metadata
Assignees
Labels
No labels