Ok. So what’s interesting here, presumably, is that this isn’t a wasm GBA emulator (which also exist and work). This is the game itself compiled to wasm. Even though no official source code was ever published, there was a community based decompilation.
I did a Pokémon Crystal playthrough several months ago, still great games!
I used an emulator on my laptop with increased speed so it made everything like walking and combat way faster which was really nice and I probably would have given up if it wasn't for that
If anyone has emulator suggestions, I recently attempted a playthrough and found that midway through my copy of red, the game was corrupted? Oddest thing -- hadn't reading the point where you do the "Missingno trick" near cinnebar.
Anyways, I suspect the save got corrupted somehow but it made me swear off emulation and try a physical copy. (Which had the battery I replaced fail... it's been a comedy of errors).
There should be 2 options for speed, regular and sped up. Then there should be a key to speed the game up. When I was a kid, it was the space key for GBA. You could have the normal game and skip the boring parts fast.
What are considered the best games in WASM? I recently got into playing around with WASM - it would've been great if this technology was prevalent during the Flash games era
Cool! I like the speeding up feature. I suggest making the UI indicate that you can press the keys `z` and `x` on the keyboard to trigger the A and B buttons respectively, I figured that out by pressing on my keyboard the A and B keys and then all the letter keys.
Btw, it seems there's a crash when you choose "Pokemon" in the "Fight/Bag/Pokemon/Run" menu:
This is amazing. Are the left right up down controls a bit wonky? If I cycle through the letters in the name select menu it seem to buggily not actually go through it?
Really exciting to see more games ported to WASM. For anyone interested, I just did a HN post detailing a port I spent the last 5 days on - Xonotic, an arena FPS. Includes a technical writeup too:
Question to WASM and low level nerds: is this the sort of things LLMs are good at? Since the end verification is stable and conclusive and you can just "goal" this project into existence until this somewhat objective verification is met.
WASM is just a binary instruction format for a virtual stack machine. So instead of having many instruction sets for different CPUs and so on, you write for a portable VM (think of like JVM but lower level) that then can be ran on many CPUs and also on web browsers.
If there's already C code (for pokemon emerald there already was a decompiled C/ASM codebase), you usually just compile it and it works, or swap a few native dependencies with portable ones. If you have some ASM code already for some old architecture, then it's a pretty straight forward translation to WASM (not really, but iterable enough with LLMs). So yeah, you can have the first target for your thing to compile, then take a screenshot of first few frames for you to check visually and some framebuffer hashes for automatic verification and use those as an oracle for if it also works correctly. Then iterate a little more, maybe implement saving/loading and load a few checkpoints and register a few deterministic inputs and see some more framebuffer hashes, crashes, state checksums and you're good.
44 comments
[ 68.3 ms ] story [ 119 ms ] threadhttps://github.com/rh-hideout/pokeemerald-expansion
https://holy-lake-f6df.sdreyesg.workers.dev/
took me 3 hours with Opus. Opus knew the whole ISA, clock, bus quirks, etc. from their training without any external docs
I used an emulator on my laptop with increased speed so it made everything like walking and combat way faster which was really nice and I probably would have given up if it wasn't for that
If anyone has emulator suggestions, I recently attempted a playthrough and found that midway through my copy of red, the game was corrupted? Oddest thing -- hadn't reading the point where you do the "Missingno trick" near cinnebar.
Anyways, I suspect the save got corrupted somehow but it made me swear off emulation and try a physical copy. (Which had the battery I replaced fail... it's been a comedy of errors).
Btw, it seems there's a crash when you choose "Pokemon" in the "Fight/Bag/Pokemon/Run" menu:
https://i.ibb.co/tpVV8q83/poke-fight-menu.png
https://news.ycombinator.com/item?id=48428133
If there's already C code (for pokemon emerald there already was a decompiled C/ASM codebase), you usually just compile it and it works, or swap a few native dependencies with portable ones. If you have some ASM code already for some old architecture, then it's a pretty straight forward translation to WASM (not really, but iterable enough with LLMs). So yeah, you can have the first target for your thing to compile, then take a screenshot of first few frames for you to check visually and some framebuffer hashes for automatic verification and use those as an oracle for if it also works correctly. Then iterate a little more, maybe implement saving/loading and load a few checkpoints and register a few deterministic inputs and see some more framebuffer hashes, crashes, state checksums and you're good.
AND - I didn’t have to blow air on the cartridge connector for it to work?
Is this the future?