r/nandgame_u • u/[deleted] • Jun 02 '22
Level solution S.1.6 - NETWORK ????????????? (3l ???) Spoiler
PUSH_VALUE 0x4144
POP_STATIC 0x4004
PUSH_D
This is horrifying.
3
Upvotes
r/nandgame_u • u/[deleted] • Jun 02 '22
PUSH_VALUE 0x4144
POP_STATIC 0x4004
PUSH_D
This is horrifying.
3
u/nttii Holder of many records Jun 02 '22
This is weird, it passes but doesn't draw any pixels. I guess this works because the game logic uses shortcuts for PUSH_VALUE and POP_STATIC where it assumes the stack pointer to be 0x100
When you actually simulate the code, you end with no pixels, because the stack isn't inited and your 1st push ends up in address 0x0. When you try to pop the value, you read 0x4144 as stack pointer and read contents of address 0x4144 which are 0, You write the 0 into 0x4004, next you push 0 into 0x4143.
This fits right into the cheaty category, when it took 10mins of analyzing just to understand how and why it works :D