User talk:Háčky: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
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!
Bulbapedia bulb.png

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:

  • Be nice to everyone. It's in the code of conduct.
  • Make good edits. Preview them before you save to make sure they're perfect the first time around.
  • Use wikicode and link templates when adding content to a page.
  • Use proper grammar and spelling, and read the manual of style.
  • You can't create a userpage until you've added to the encyclopedia. It's a privilege. See the userspace policy.
  • Use talk pages to resolve editing disputes. Don't "edit war," or constantly re-edit/undo the same thing on a page.
  • If you have a question about something, be proactive. Take a look at our FAQ. If you're still stuck, ask for help. The staff won't bite.
  • Sign all talk page posts with four tildes (~~~~). This will turn into your name and the time you wrote the comment.
  • For more handy links, see the welcome portal.
Thank you, and have a good time editing here!
  SnorlaxMonster 10:18, 2 December 2014 (UTC)  
 

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)