Coding Questions and other Quandaries
#42
Nice work so far. When you are replacing a single instruction with a new single instruction, you don't need an Insert ASM (C2) Codetype. You can use a Word (32-bit) RAM Write (04 codetype) instead.

Code:
2873ef10 00000040
04179fa0 60840000
e0000000 00000000
2873ef10 00000000
04179fa0 60840001
e0000000 80008000

Also you can change the activator to allow pressing other buttons. A simple hex equation of FFFF - ZZZZ = YYYY (which is FFBF for your code)

2873ef10 ffbf0040

Btw equipping a button value of 0000 is not suppose to be done. If you want a hold-button-activator-only type of effect, place the RAM write that has the default instruction at top, then your activate-able code below like this...

Code:
04179fa0 60840001 #Default state of code being 'de-acivated'
2873ef10 ffbf0040 #16-bit If statement for button activator; allow other buttons being pressed
04179fa0 60840000 #Code, word RAM write
e0000000 80008000 #Final terminator

Also since you're only replacing a bit within the instruction, you could do a Byte RAM Write instead. Makes no real difference at the end of the day.

Code:
00179fa3 00000001 #Byte RAM Write, notice the address change of +3
2873ef10 ffbf0040
00179fa3 00000000 #Code on
e0000000 80008000
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Vega - 12-16-2021, 03:21 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)