Quantity only arbitrary code execution

From Glitch City Wiki
Jump to navigation Jump to search

Though bulky, the player can use a RAM writer with arbitrary code execution with item quantities, as an alternative method to using items. This can be ideal for the expanded inventory, due to it having many hex:00 items. However, it takes more space.

The player must be careful when swapping the hex:00 items with each other, as this attempts to merge the stacks the player has. Instead, the player may want to switch a different item in the desired place, before switching the hex:00 into that place.

Code

nop
ld bc,xx??
nop
ld hl,xx??
nop
ld de,xx??
nop
ld l,d
nop
ld [hl],b
nop
ret

This maps as the following items:

  • (hex:00 item) x1
  • (any item you want) x(value e.g. 21; Mew)
  • (hex:00 item) x33
  • (any item you want) x(address byte 1; big endian e.g. 208)
  • (hex:00 item) x17
  • (any item you want) x(address byte 2; big endian e.g. 88)
  • (hex:00 item) x106
  • (hex:00 item) x112
  • (hex:00 item) x201

Credits

  • Torchickens (Evie)