hello there,
i'm trying to create a code where i only have to change a certain bit.
(the other 7 bits of that byte at that address shall keep their old value)
as i'm more used to playstation 2 code formats, i'll give an example how it is done there (type 7 code)
MH2 Enable Symbol Colors
705D4ADA 00000040
MH2 Disable Symbol Colors
705D4ADA 000200BF
short explanation:
1.
at address 0x005D4ADA, do (loaded databyte OR 0x40) => write result to 0x005D4ADA
=> or in other words: bit 7 is set to 1 and all other bits remain the same
2.
at address 0x005D4ADA, do (loaded databyte AND 0xBF) => write result to 0x005D4ADA
=> or in other words: bit 7 is set to 0 and all other bits remain the same
is there an equivalent in gecko
i couldnt find anything at http://geckocodes.org/index.php?arsenal=1
(if its there, then i couldnt figure it out by the explanations given)
thanks alot for answers
[EDIT]: Solution Overview (ba+ memory)
i'm trying to create a code where i only have to change a certain bit.
(the other 7 bits of that byte at that address shall keep their old value)
as i'm more used to playstation 2 code formats, i'll give an example how it is done there (type 7 code)
MH2 Enable Symbol Colors
705D4ADA 00000040
MH2 Disable Symbol Colors
705D4ADA 000200BF
short explanation:
1.
at address 0x005D4ADA, do (loaded databyte OR 0x40) => write result to 0x005D4ADA
=> or in other words: bit 7 is set to 1 and all other bits remain the same
2.
at address 0x005D4ADA, do (loaded databyte AND 0xBF) => write result to 0x005D4ADA
=> or in other words: bit 7 is set to 0 and all other bits remain the same
is there an equivalent in gecko
i couldnt find anything at http://geckocodes.org/index.php?arsenal=1
(if its there, then i couldnt figure it out by the explanations given)
thanks alot for answers
[EDIT]: Solution Overview (ba+ memory)
- Code:
Set certain bits to 0
82010001 xxxxxxxx
86300001 000000zz
84010001 xxxxxxxx
Set certain bits to 1
82010001 xxxxxxxx
86200001 000000yy
84010001 xxxxxxxx
xxxxxxxx: ba+address of 8 bit value which contains the bits to be changed
yy: bit to be set to 1 (ex.: yy=0xD1=[binary:]11010001 => changes bit 1;5,7,8 to 1)
zz=0xFF - yy: bit to be set to 0 (ex.: zz=0xFF - yy= 0xFF - 0xD1 = 0x2E=[binary:]00101110 => changes bit 1;5,7,8 to 0)
Last edited by viciousShadow on 4/18/2014, 11:32 am; edited 3 times in total