Late post, but....
I thought this would be helpful for anyone trying to understand Virus's code (like Demonic, maybe?)
Code:
ldrh r1, [r4]
ldrh r3, =0x1000
cmp r1, r3
blt DoNotStore @so we can't store trees/rocks/etc
ldrh r3, =0x5000
cmp r1, r3
bge DoNotStore @so we can't store buildings/etc
strh r1, [r0]
DoNotStore:
@replace the instructions we've overwritten
mov r1, #0x1
mov r0, r1
@now return
ldr r3,=0x2037599
bx r3
(modify instruction at store point in debugger code)
@this will let us branch to our own ASM code
ldr r1, =0x2000501
bx r1
Also, here's a better version. This one is the same length, but allows you to pick up items, dig holes, plant flowers, drop patterns, but not drop rocks/buildings
/bricks/etc...it also prevents your buildings from being removed.
Code:
E2000500 00000028
0B098801 D00A2905
0B0C8821 D0062C05
D004291B DD0129D2
DB0029FC 20018001
47184B00 02037599
02037590 47084900
02037594 02000501