• 0 Posts
  • 24 Comments
Joined 4 months ago
cake
Cake day: June 23rd, 2024

help-circle




  • Nope. But I guess a mirror of WebAssembly Studio would still be the best starting point despite its slow development lately. The WAsm plugin for VSCodium was broken for me too.

    Note that unlike JS, WASM won’t run from file:// URLs; you need to run a local http server or commit to an online repo to run your code. There might be an about:config option to change this but many IDEs (incl. WA Studio, presumably) come with servers for this reason.


  • A forgotten one is webassembly.studio, an in-browser IDE for creating WASM projects with way less pain than other methods. It got discontinued the year I needed it for my school project. It was open source but I failed to rehost it myself and public mirrors only appeared after I spent days trying to make Emscripten work, tore my hair out over WebGL and then finally painfully built the whole thing with CSS (and a bit of JS; yes, it was indeed a disaster).













  • Popular myth but untrue.

    The ROM is exactly 40 kiB or 40 960 bytes. The NES outputs video at a resolution of 256×240=61 440 pixels. The game never switches palettes mid-frame and thus the highest possible number of colors (of the 64 available ones, of which 55 are distinct) in any screenshot is: 4 sprite palettes × 3 non-transparent colors per palette = 12 colors among all sprites; plus 4 background palettes × 3 selectable colors per palette + 1 selectable color shared between all palettes = 13 colors in the background; or 25 colors in total.

    Even one of the most basic lossless image formats, GIF, can use an n-bit palette of 2−1 arbitrary colors plus transparent, where 1≤n≤8. For n=5, we can store up to 31 colors at 5 bits per pixel, or 307 200 bits total, which is 38 400 bytes. The palette entries, size etc. will take about 200 bytes at most, and LZW compression built into the format (or even better, whatever PNG uses) can be used to reduce the file size further (significanly because there are huge areas filled with solid color or patterns).

    I’d bet it’s possible to make an NES ROM that does nothing but fill the screen with noise-like tiles and switches the colors mid-frame, likely in just 8 kiB of video ROM plus 2 kiB of program ROM, whose screenshots will never compress to below 10 kiB in PNG format, though.