Live data from Hacker News

Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

ofrak.com

11–20 of 56 posts

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#11
post #7

I'm computer literate (and know some basic assembly) but wow I did not get it

Hey, any specific questions? I'd be happy to explain anything that needs clarification. More broadly, any thoughts on how to make the game clearer? I know that a manual describing the instructions would help. But other ideas are welcome as well!

Maybe a way to break down a game after it happened, or maybe a sandbox mode to try arbitrary things

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#12
post #7

I'm computer literate (and know some basic assembly) but wow I did not get it

Hey, any specific questions? I'd be happy to explain anything that needs clarification. More broadly, any thoughts on how to make the game clearer? I know that a manual describing the instructions would help. But other ideas are welcome as well!

I don't understand what "rotate the instruction order" keys do. I tried pressing them in many circumstances and nothing happens

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#13
post #12
post #7

Earlier quoted context omitted.

Hey, any specific questions? I'd be happy to explain anything that needs clarification. More broadly, any thoughts on how to make the game clearer? I know that a manual describing the instructions would help. But other ideas are welcome as well!

I don't understand what "rotate the instruction order" keys do. I tried pressing them in many circumstances and nothing happens

Yeah, I may have sacrificed clarity for concision in this case.

To answer by way of example, if you are given "add R1, R2, R3" rotating to the right will result in "add R2, R3, R4". As another example, rotating "mov LR, R0" to the left will give "mov R12, SP".

In other words, rotating right changes every register RN in the instruction to be the register R(N + 1). Left changes RN to R(N - 1).

My hope was that if it was not clear from reading, it would be after testing things out. But hearing that this may not be the case is helpful feedback!

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#14
post #12
post #7

Earlier quoted context omitted.

Hey, any specific questions? I'd be happy to explain anything that needs clarification. More broadly, any thoughts on how to make the game clearer? I know that a manual describing the instructions would help. But other ideas are welcome as well!

I don't understand what "rotate the instruction order" keys do. I tried pressing them in many circumstances and nothing happens

Just figured it out. If you select "Adjust Difficulty" and increase the max gadget size (number of instructions that can fall at once) you change their order with these keys.

P.S. thank you for nerd sniping me with this game, I love the idea and execution (pun slightly intended)!

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#15
post #13
post #12

Earlier quoted context omitted.

I don't understand what "rotate the instruction order" keys do. I tried pressing them in many circumstances and nothing happens

Yeah, I may have sacrificed clarity for concision in this case. To answer by way of example, if you are given "add R1, R2, R3" rotating to the right will result in "add R2, R3, R4". As another example, rotating "mov LR, R0" to the left will give "mov R12, SP". In other words, rotating right changes every register RN in the instruction to be the register R(N + 1). Left changes RN to R(N - 1). My hope was that if it wa…

Oh, my bad, I misread your question.

See a reply to your original comment: it changes the order for gadgets larger than one instruction. The default is one, but originally it was three, so the instructions stuck.

I will make those confusing instructions only show up when the gadget size is greater than one! This feels like a good change to make based on this feedback.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#16
post #14
post #12

Earlier quoted context omitted.

I don't understand what "rotate the instruction order" keys do. I tried pressing them in many circumstances and nothing happens

Just figured it out. If you select "Adjust Difficulty" and increase the max gadget size (number of instructions that can fall at once) you change their order with these keys. P.S. thank you for nerd sniping me with this game, I love the idea and execution (pun slightly intended)!

Thanks for the kind words! This comment helped me realize that I had misunderstood the parent commenter's question.

I have just pushed an update so that the up/down arrow keys only show up in the instructions if the max gadget size is greater than one.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#17

This is really cool! So far I have a high score of 65612 :) Some feedback: - When opening the help menu, it wasn't obvious how to close it (I think the only way is by pressing '?') - I like the Goblin music! - It's a pretty nice interface to play with the instructions and I appreciate the color coding. It would be neat if there was a "sandbox mode" where you could preview the effects of running an instruction, and ma…

I like the idea of sandbox mode!

I'm definitely much quicker at reading ARM assembly after playing a few hours of this game over the course of making it.

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#19
ASM years ago. MOV'ing without any initial data feels unnerving. WASM and JupyterLite would be cool, too.

Category:Instruction_set_listings has x86 but no aarch64: https://en.wikipedia.org/wiki/Category:Instruction_set_listi...

/? jupyter asm [kernel]:

- "Introduction to Assembly Language Tutorial.ipynb" w/ the emu86 jupyter kernel which shows register state after ops: https://github.com/gcallah/Emu86/blob/master/kernels/Introdu...

- it looks like emu86 already also supports RISC, MIPS, and WASM but not yet ARM: https://github.com/gcallah/Emu86/blob/master/assembler/WASM/...

- DeepHorizons/iarm: https://github.com/DeepHorizons/iarm/blob/master/iarm_kernel... https://github.com/DeepHorizons/iarm/blob/master/iarm/arm_in... MOV https://github.com/DeepHorizons/iarm/blob/master/tests/iarm/... :

> IArm is an ARM interpreter for the ARMv6 THUMB instruction set (More specifically for the ARM Cortex M0+ CPU). It supports almost 100% of the instructions, and some assembler directives. There is also its Jupyter kernel counterpart so it can be used with Jupyter notebooks.

- JupyterLite > Adding other kernels; emu86, iarm, WASM, : https://jupyterlite.readthedocs.io/en/latest/howto/configure... [... https://github.com/jupyterlite/jupyterlite/discussions/968#d... ]

"Ask HN: How did you learn x86-64 assembly?" (2020) re: HLA, : https://news.ycombinator.com/item?id=23931373 re: the Diaphora bindiff tool and ghidra, which has GDB support now FWIU: https://news.ycombinator.com/item?id=36454485

Re: Show HN: Tetris, but the blocks are ARM instructions that execute in the browser

#20
As a programmer with practically 0 experience in working with assembly, this is a pretty cool tool to learn! I've been holding a cheatsheet in another tab to find out what each instruction is doing.

Kudos for building this, very cool!

edit: getting -4.8 billion as a high score because of my first segfault was... a disappointment, though. :-P

Post reply on HN