informal lose (your) marbles - to start acting in a strange way and forgetting things.
He's pretty old but he still has all his marbles, if that's what you mean.
have all (one's) marbles
To be mentally sound or stable. Now that I've gotten a good night's sleep, I'm starting to feel like I have all my marbles again.Grandma still has all her marbles, in spite of her other health problems.
have all one's marbles
Fig. to have all one's mental faculties; to be mentally sound. (Very often with a negative or said to convey doubt.) I don't think he has all his marbles.Do you think Bob has all his marbles?