In the offset "0x1dbe" we can see this code
00 1a f4 68 ori.b #0x68,(A2)
This code it is referent to the apples function (when you touch a apple you gain 1 apple)
now let's go to the offset "0x1d96"
00 1a f5 16 ori.b #0x16,(A2)+
This is the code for the black lamp, when you touch it, the lamp explodes and damages nearby enemies
Now let's go again to the "0x1dbe" offset and change the values of "00 1a f4 68" to "00 1a f5 16". With this change every time that you pick up an apple it will explode like a black lamp. We can change all the entities function with this logic. We can make a projectile of a enemie restore our health, make an enemy sell you items or even make an item like an apple damage you.
Here is the list of the entities function
note: incomplete
0x1CC2
flagpole
00 1A FD 84
0x1CC6
00 1A FF 82
0x1CCA
iago
00 1A ED 86
0x1CCE
boss iago
00 1A ED A6
0x1cd2
bat
00 1A E9 C6
0x1CD6
pot thrower
00 1A E9 DA
0x1CDA
snake 2 stage
00 1A E9 C6
0x1CDE
00 1A E7 22
0x1CE2
00 1A E7 22
0x1CE6
knife juggler
00 1A E9 C6
0x1CEE
statue
00 1A E9 A8
0x1CF2
?
00 1A EB 7A
0x1CF6
snake of the snake charmer
00 1A E9 C6
0x1CFA
snake charmer
00 1A E9 DA
0x1CFE
?
00 1A E9 C6
0x1D02
jaffar cobra
00 1A F1 10
0x1D06
jaffar
00 1A F1 10
0x1D0A
?
00 1A E9 C6
0x1D0E
apple thief
00 1A EB FE
0x1D12
apple thief power
00 1A E9 78
0x1D16
skeleton
00 1A E9 C6
0x1D1A
ghost
00 1A E9 C6
0x1D1E
monkey statue red
00 1A EA 48
0x1D22
monkey statue red
00 1A EA 48
0x1D26
monkey statue red - first
00 1A E9 E0
0x1D2A
monkey statue second
00 1A EA 00
0x1D2E
monkey statue red - last
00 1A EA 24
0x1D32
Fazahl
00 1A E9 C6
0x1D36
Zagoolien that walk in coal
00 1A E7 96
0x1D3A
hakin normal
00 1A E7 96
0x1D4E
Fazahl
00 1A E9 C6
0x1D42
Zagoolien normal
00 1A E7 96
0x1D46
hakin standing still
00 1A E7 96
0x1D4A
pot that give you gem
00 1A EE CA
0x1D4E
?
00 1A EE DE
0x1D62
save abu
00 1A F4 00
0x1D66
pot
00 1A E9 C6
0x1D6A
?
00 1A EB FE
0x1D6E
fish spit
00 1A EE 40
0x1D72
prohectile of knife juggler, Fazahl, Gazeem, Razoul
00 1A EE 40
0x1D76
statue projectile
00 1A EE 40
0x1D7A
barrel
00 1A ED A8
0x1D7E
fire of cave boss
00 1A EE 18
0x1D82
skeleton bones
00 1A EE 40
0x1D86
lava splash
00 1A EB 7C
0x1D8A
?
00 1A F4 A0
0x1D8E
genie tokens
00 1A F4 D8
0x1D92
?
00 1A F4 68
0x1D96
black lamp
00 1A F5 16
0x1D9A
3 scrab of the 2 stage
00 1A F3 44
0x1D9E
00 1A F4 A0
0x1DA2
00 1A F4 A0
0x1DA6
gem
00 1A F2 28
0x1DAA
gem bonus stage
00 1A F2 1E
0x1DAE
beat the level
00 1A F3 44
0x1DB2
00 1A F3 84
0x1DB6
scrab
00 1A F2 B0
0x1DBA
scrab
00 1A F2 FA
0x1DBE
apple
00 01 F4 68
0x1DC2
abu token
00 1A F3 C2
0x1DC6
apple slice
00 1A F2 64
0x1DCA
checkpoint
00 1A E6 4C
0x1DCE
genie hearth
00 1A EF 12
0x1DD2
00 1A EE E0
0x1DD6
life
00 1A EF 5C
0x1DDA
flute
00 1A EF B0
0x1DDE
flute
00 1A EF DC
0x1DE2
flute
00 1A F0 08
0x1DE6
flute
00 1A F0 34
0x1DEA
?
00 1A F0 60
0x1DEE
?
00 1A F0 8C
0x1DF2
?
00 1A F0 B8
0x1DF6
genie hand spring
00 1A FC D2
0x1DFA
genie spring
00 1A FC 4E
0x1DFE
genie ballon
00 1A F8 F6
0x1E02
genie ballon
00 1A F8 F6
0x1E06
stationary genie hand plataform
00 1A F7 9E
0x1E0A
rotary genie hand plataform
00 1A F7 9E
0x1E0E
giant rock of the rug ride
00 1A F7 F2
0x1E12
falling block stage 2 (1)
00 1A F5 90
0x1E16
falling block stage 2 (2)
00 1A F5 90
0x1E1A
00 1A F5 90
0x1E1E
00 1A F5 90
0x1E22
spawn ghost
00 1A E9 C6
0x1E26
?
00 1A F5 3E
0x1E2A
00 1A F5 4A
0x1E2E
00 1A F5 56
0x1E32
00 1A F5 62
0x1E36
?
00 1A F6 38
0x1E3A
?
00 1A F6 AC
0x1E3E
00 1A F6 DC
0x1E42
00 1A F6 DC
0x1E46
00 1A F8 1C
0x1E4A
00 1A F8 1C
0x1E4E
00 1A F8 94
0x1E52
dromedary
00 1A FB F4
0x1E56
last dromedary
00 1A FB F4
0x1E5A
flamingo
00 1A F7 40
0x1E5E
flamingo
00 1A F7 40
0x1E62
00 1A F9 78
0x1E66
00 1A F9 78
0x1E6A
00 1A F9 78
0x1E6E
00 1A F9 78
0x1E72
00 1A EE 40
0x1E76
magic rope
00 1A FB 36
0x1E7A
magic rope
00 1A FB 36
0x1E7E
magic rope
00 1A FB 36
0x1E82
magic rope
00 1A FB 36
0x1E86
magic rope
00 1A FB 36
0x1E8A
magic rope
00 1A FB 36
0x1E8E
?
00 1A FA 84
0x1E92
?
00 1A FA 84
0x1E96
plataform cave
00 1A F9 F6
0x1E9A
plataform cave (falling)
00 1A F9 F6
0x1E9E
chain ball
00 1A EB DC
0x1EA2
spike in the ground (2 stage)
00 1A EB 7C
0x1EA6
spike wall
00 1A EB DC
0x1EAA
fire of the cobra jaffar
00 1A E9 D4
0x1EAE
pot that contain the magic rope ?
00 1A E9 C6
0x1EB2
giant rock
00 1A EB A4
0x1EB6
peddler’s stall
00 1A FE 1C
0x1EBA
?
00 1B 65 BE
0x1EBE
00 1A BF 9A
0x1EC2
apple splat
00 1A BF 8E
0x1EC6
00 1A C0 EE
0x1ECA
boss dying
00 1A C1 02
0x1ECE
enemie die
00 1A C1 B4
0x1ED2
00 1A C4 58
0x1ED6
00 1A C4 58
0x1EDA
?
00 1A BF 8E
1EDE
?
00 1A BF 8E
0x1EE2
00 1A C4 58
0x1EE6
00 1A C4 58
0x1EEA
00 1A C4 58
0x1EEE
?
00 1A C6 0E
0x1EF2
00 1A C4 58
0x1EF6
00 1A C4 58
0x1EFA
?
00 1A C2 BC
0x1EFE
?
00 1A C4 E8
0x1F02
?
00 1A C4 E8
0x1F06
sub boss dying
00 1A C1 D0
0x1F0A
00 1A C6 14
0x1F0E
00 1A C4 58
0x1F12
00 1A C4 58
0x1F16
00 1A C4 58
0x1F1A
00 1A C4 DE
0x1F1E
00 1A C4 DE
0x1F22
00 1A C4 08
0x1F26
00 1A C4 32
0x1F2A
00 1A C4 44
0x1F2E
00 1A C3 50
0x1F32
00 1A C3 18
0x1F36
00 1A C2 E0
0x1F3A
00 1A C3 50
0x1F3E
00 1A C3 34
0x1F42
00 1A C2 FC
0x1F46
00 1A BF F0
0x1F4A
00 1A C0 3E
0x1F4E
00 1A C0 5A
0x1F52
00 1A C0 76
0x1F56
00 1A C0 7C
0x1F5A
00 1A C0 98
0x1F5E
00 1B 65 BE
0x1F62
00 1A C4 58
0x1F66
00 1A C6 3C
0x1F6A
00 1B 65 BE
0x1F6E
00 1A C6 A2
0x1F72
00 1A C6 A2
0x1F76
00 1A C6 76
0x1F7A
00 1A C6 82
0x1F7E
00 1A C6 A2