Sorry, I was wrong
I was checking .allMap
I havent relly tried this out physically. I was just reading the code. And trying it out by hand. I am trying to learn how to write and read assembly code right now.
With A+B = Select code
Using 0x3 for button mask and 0x7 for XOR mask.
A+Select pressed shouldnt go through because of the check.
B+Select pressed shouldnt go through as well.
This is because of: cmp r1, #0
Sorry about that. I'm still trying to learn this stuff.
Also, I think its possible that register R2 gets overwritten when multiple .anyMap and .allMap calls are true.
Eg.
A + B -> Start
B -> Y, Y->B
If code written in this order, then user presses A+B
A+B -> Start call goes through writes to R2
B -> Y, Y -> B call goes through overwrites R2
Instead it should have been:
A+B as A+Y as button pressed since B is Y
To be specific
In this case if A + B are pressed, Y is pressed since @B -> Y, Y -> B call is last and overwrites R2.
I hope this helps
Edit: Formatting and other stuff
I was checking .allMap
I havent relly tried this out physically. I was just reading the code. And trying it out by hand. I am trying to learn how to write and read assembly code right now.
With A+B = Select code
Using 0x3 for button mask and 0x7 for XOR mask.
A+Select pressed shouldnt go through because of the check.
B+Select pressed shouldnt go through as well.
This is because of: cmp r1, #0
Sorry about that. I'm still trying to learn this stuff.
Also, I think its possible that register R2 gets overwritten when multiple .anyMap and .allMap calls are true.
Eg.
A + B -> Start
B -> Y, Y->B
If code written in this order, then user presses A+B
A+B -> Start call goes through writes to R2
B -> Y, Y -> B call goes through overwrites R2
Instead it should have been:
A+B as A+Y as button pressed since B is Y
To be specific
Code:
@ A + B -> Select
ldr r3, =0x3 @011
ldr r4, =0x7 @111
bl .allMap
@ B -> Y, Y -> B
ldr r3, =0x801
ldr r4, =0x801
bl .anyMap
In this case if A + B are pressed, Y is pressed since @B -> Y, Y -> B call is last and overwrites R2.
I hope this helps
Edit: Formatting and other stuff
Last edited by rolim91,