TOKYO — Nintendo is making money again courtesy of a weaker yen but its business selling game machines is ailing, with sales of its flagship Wii U console still lackluster.

Nintendo reported an 8.6 billion yen ($88 million) quarterly profit Wednesday, a reversal from losses the previous year, thanks to a cheaper yen that offset the damage from dipping sales.

April-June sales sank nearly 4 percent to 81.5 billion yen ($832 million) as it managed to sell just 160,000 of its new Wii U video-game console worldwide.

Nintendo Co. has sold 3.61 million Wii U machines since they went on sale late last year, and stuck to its target of selling 9 million Wii U units over the fiscal year through March 2014.

Nintendo has in the past lowered its sales goals for the Wii U, which has a touch-screen tablet controller called GamePad and a TV-watching feature called TVii.

One thing Nintendo has going in its favor is the yen's recent weakness. A cheap yen is a boon for Japanese exporters such as Nintendo as it boosts the value of overseas earnings when converted into yen.

The company suffered red ink of 17.2 billion yen in the April-June quarter last year, partly because the yen was stronger then.

The Kyoto-based maker of Super Mario and Pokemon games got a nearly 17 billion yen ($173 million) gain from the yen's decline against the dollar and the euro for the April-June period.

What's more crucial for Nintendo is how its machines and games do during the holidays, including the year-end shopping season, when children and the young-at-heart may receive Nintendo products as gifts.

Such sales hinge on the popularity of game software in the pipeline.

Nintendo said new Wii U games are coming in the latter half of the year such as "The Legend of Zelda: The Wind Waker HD" and "Donkey Kong Country: Tropical Freeze."

"Pikmin 3," the latest in another popular series, went on sale in Japan and Europe in July, and is set to go on sale in the U.S. in August, according to Nintendo.

Video games have been hurt in recent years by the popularity of smartphones and other devices that also deliver online entertainment.

But Nintendo has repeatedly insisted that game machines aren't cellphones and make up a different entertainment category.

Nintendo's 3DS hand-held machines held up relatively well in sales despite the passage of time, selling 1.4 million units in April-June. Nintendo is expecting to sell 18 million 3DS machines around the world for the fiscal year through March 2014.