Sets the internal memory of SMBX. ADDRESS is the memory address of the thing you want to change. Only a few addresses are known right now. OPERATION is the way you want to manipulate the memory (adding to it, multiplying from it, subtracting from it...) VALUE is what the value that OPERATION will perform on. DATA SIZE is the type of data in the NPC's memory. Check the reference at the bottom of the document to find the data size.


Known addresses: 0x00B2C8B4 - w = P switch freeze effect on or off 0x00B2C5A8 - w = Current coin count 0x00B2C5AC - f = Player lives 0x00B2C8C4 - w = "You have cheated" variable. 0xFFFF = you've cheated, 0x0 = you haven't cheated

There are 6 types of OPERATION to be performed on VALUE: OPERATION = 0 = Assign. VALUE will be set. OPERATION = 1 = Add. VALUE will be added to the current value. OPERATION = 2 = Subtract. VALUE will be subtracted from the current value. OPERATION = 3 = Multiply. The current value will be multiplied by VALUE. OPERATION = 4 = Divide. The current value will be divided by VALUE. OPERATION = 5 = XOR. The current value will have a bitwise exclusive-or operation performed on it against VALUE.

There are 5 types of DATA SIZE that can be set b = byte (1 byte of memory) w = word (2 bytes of memory) dw = double word (4 bytes of memory) f = float / decimal (4 bytes of memory) df = double float / double precision decimal (8 bytes of memory)


// Add 50 lives to the player life count