How would I change from Gray Scale mode to the normal palettes?

BowersIndustry

New member
Hello! So I have this script that can put the NES in gray scale mode. But I want the user to be able to go back to normal palettes with the press of a button.
Here is my gray scale code,
LDA soft2001
ORA #%11111110
STA soft2001
I need some way to to change it back.
I've tried,
LDA soft2001
ORA #%11111110
STA soft2001
When I put an "AND" in the "change to normal" code, it will change to the gray scale mode and then right back to the palettes. Idk what to do.
 

SciNEStist

Well-known member
To grayscale:
Code:
 LDA soft2001
 ORA #%00000001
 STA soft2001

to go back:
Code:
 LDA soft2001
 AND #%11111110
 STA soft2001
 

BowersIndustry

New member
To grayscale:
Code:
 LDA soft2001
 ORA #%00000001
 STA soft2001

to go back:
Code:
 LDA soft2001
 AND #%11111110
 STA soft2001
When I do that, it doesn't change to gray scale mode. And the set to normal code isn't set to any input like the gray scale is. It just doesn't work.
 

BowersIndustry

New member
Nvm I got it to work with the timers
LDA soft2001
AND #%00000001
BEQ +nope
LDA gameTimerTicks
CLC
ADC #$01
STA gameTimerTicks
BCC +doWhatever
LDA soft2001
AND #%11111110
STA soft2001
+doWhatever
LDA gameTimerLo
ADC #$00
STA gameTimerLo
LDA gameTimerHi
ADC #$00
STA gameTimerHi
+nope
 
Top Bottom