NBA

Wallace helping Knicks on court and off

Despite the bad-boy rep, Knicks brass knew what kind of good teammate they would be getting in Rasheed Wallace.

When Wallace was with Mike Woodson in Detroit, according to a source, Wallace’s dedication was so strong, one time he wouldn’t take off his right sneaker and sock for four days for fear his twisted ankle would swell up.

The Knicks players are ready to sing Wallace’s praises too, and chant his name like Garden fans.

The Knicks’ new cult hero showed he still has game Monday night in his hometown of Philadelphia, and he’s not just a 6-foot-11 bearded curiosity. There was “Sheeeeed,” banging in two 3-pointers, including a third-quarter buzzer beater. Wallace sank a sweet left-baseline post-up in the third quarter and moved well laterally on defense and used his length. He got booed and cheered at the same time by his fellow Philadelphians as he helped the Knicks move to a perfect 3-0.

“I took off two years from the NBA,” Wallace said. “I didn’t take two years off, period.”

Even before the injury-wracked Amar’e Stoudemire returns in mid-December, Woodson will face his first rotation conundrum Friday when the unbeaten Knicks host the Mavericks. Backup center Marcus Camby is expected back just as Wallace’s role looks ready to increase. Where that leaves minutes for Camby is unclear.

Wallace hasn’t played in the first half yet. He got garbage time in the first two blowout wins, then entered late in the third quarter Monday with the Knicks already up by 20. He cemented his rotation status with 11 points in 13 minutes.

“A lot of guys don’t realize he didn’t walk away from the game because he couldn’t play,” Woodson said.

Wallace, 38, reportedly retired to be with his ailing mother in North Carolina, where he found time to run with UNC players, local high school studs and former Tar Heels such as Raymond Felton. But in October, he was not in good enough shape to even scrimmage during most of preseason.

Even before showing an on-court spark, Wallace had been a godsend in the locker room and on the bench. The Knicks sound as if they want to nominate Wallace, the NBA’s leader in technical fouls, for the Nobel Peace Prize.

“People have the wrong impression of him, 100 percent,” Smith said. “People just see him talking, yelling, screaming. They just think he’s just a wild person. He’s just a mild-mannered person trying to get everyone involved. That definitely should be expressed to everybody. He’s one of the smartest players I’ve ever played with. He’s making myself, [Carmelo Anthony] smarter and hungrier — the way he talks to us in the huddle, pulls us aside individually.”

Woodson now has another defensive coach on the bench. Before this season, Tyson Chandler was the only Knick who cared about defense.

“I could hear his voice from the bench, alerting me,” Chandler said. “He’s doing great things from the bench, and obviously what we’ve seen him bring to the game.”

Wallace is as flaky as he is volatile with refs. He calls Woodson “the wizard.” He has a reputation as a player who parties as hard as he plays.

After the season opener Friday, the former Trail Blazer said West Coast teams were at a disadvantage at the Garden.

“Especially if you were that West Coast team, it’s like, ‘OK, I’m out here for this one game or one night, so I’m going to go here and have some fun,’ and then that next day is the hard part because you got to play against a bunch of good athletes,” Wallace said.

But he is also a walking, talking defensive encyclopedia, believing communication is principal behind a good unit. He has stepped up as one of their leaders on a veteran team full of them.

“I’ve experienced it firsthand,” Smith said. “Him and Jason [Kidd], those guys have had the biggest effect on me so far, talking defense, watching my man, being in the right position. Those two guys are unbelievable, especially Rasheed.”

Now Camby is back and Woodson has to figure out how to get both of them time.

“So far the veterans have accepted their smaller roles,” Anthony said. “From the beginning of the season, training camp when we had our first meeting, it was the No. 1 message. Guys have to accept our roles. When older guys accept their roles, it makes it easier for everybody else.”

marc.berman@nypost.com