User talk:Háčky: Difference between revisions
From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
Chickasaurus (talk | contribs) No edit summary |
|||
Line 30: | Line 30: | ||
Great add Háčky. Thanks for sharing. :) May I ask how you found the vending machine glitch? Did you find it by accident, thanks to the Pokémon Red disassembly, or documented somewhere else? If the code is documented in the Pokémon Red disassembly, may you share the relevant assembly please? Thanks in advance. [[User:Chickasaurus|Chickasaurus]] ([[User talk:Chickasaurus|talk]]) 21:55, 22 September 2015 (UTC) | Great add Háčky. Thanks for sharing. :) May I ask how you found the vending machine glitch? Did you find it by accident, thanks to the Pokémon Red disassembly, or documented somewhere else? If the code is documented in the Pokémon Red disassembly, may you share the relevant assembly please? Thanks in advance. [[User:Chickasaurus|Chickasaurus]] ([[User talk:Chickasaurus|talk]]) 21:55, 22 September 2015 (UTC) | ||
:I saw it mentioned on [[Talk:Vending Machine#Buying lemonade with less than $350?]]. The code is disassembled in [https://github.com/iimarckus/pokered/blob/master/engine/menu/vending_machine.asm engine/menu/vending_machine.asm] but not fully documented. The key part is: | |||
xor a | |||
ld [hMoney], a | |||
ld [hMoney + 2], a | |||
ld a, $2 | |||
ld [hMoney + 1], a | |||
call HasEnoughMoney | |||
jr nc, .enoughMoney | |||
:This stores the BCD value 00 02 00 in hMoney and checks if you have that amount, rather than the actual price of the item you’ve selected. I’d guess that the vending machine was originally programmed to sell one item for {{pdollar}}200 and someone forgot to change that part of the code when adding the other drinks. —[[User:Háčky|Háčky]] ([[User talk:Háčky|talk]]) 22:43, 22 September 2015 (UTC) |
Revision as of 22:43, 22 September 2015
Welcome to Bulbapedia, Háčky! | |
By creating your account you are now able to edit pages, join discussions, and expand the community-driven Pokémon encyclopedia. Before you jump in, here are some ground rules:
| |
Thank you, and have a good time editing here! |
Music Collection
Those two tracks that are duplicates - I presume they are not supposed to be? I might suggest contacting Apple regarding the error, and I may do the same. CycloneGU (talk) 06:04, 24 December 2014 (UTC)
Vending machine glitch
Great add Háčky. Thanks for sharing. :) May I ask how you found the vending machine glitch? Did you find it by accident, thanks to the Pokémon Red disassembly, or documented somewhere else? If the code is documented in the Pokémon Red disassembly, may you share the relevant assembly please? Thanks in advance. Chickasaurus (talk) 21:55, 22 September 2015 (UTC)
- I saw it mentioned on Talk:Vending Machine#Buying lemonade with less than $350?. The code is disassembled in engine/menu/vending_machine.asm but not fully documented. The key part is:
xor a ld [hMoney], a ld [hMoney + 2], a ld a, $2 ld [hMoney + 1], a call HasEnoughMoney jr nc, .enoughMoney
- This stores the BCD value 00 02 00 in hMoney and checks if you have that amount, rather than the actual price of the item you’ve selected. I’d guess that the vending machine was originally programmed to sell one item for $200 and someone forgot to change that part of the code when adding the other drinks. —Háčky (talk) 22:43, 22 September 2015 (UTC)