The gunman behind Norway's 2011 massacres has told a court he had meant to kill the entire government and said he used meditation, video games and steroids to prepare for the attack.

Anders Behring Breivik, who killed 77 people last July, also said he had planned a far greater bloodbath with three, not one, car bombs and a death toll of several hundred people.

The 33-year-old far-right extremist also testified he had given his murder weapons names from Norse mythology, calling his rifle "Gungnir" after Odin's magical spear and his Glock pistol "Mjoelner" after Thor's hammer.

He also revealed he had spent a year playing video games, including World of Warcraft and a first-person shooting game, to prepare for what he believed would be a suicide mission.

Mr Breivik also practised a form of Japanese meditation daily since 2006 to help block out his emotions during the attacks, and used testosterone from April last year and anabolic steroids on the day of the attacks, he said.

During his killing spree he blew up a van filled with 950kg of explosives at the tower housing the offices of Labour Prime Minister Jens Stoltenberg, who was not present at the time.

He then travelled to Utoeya Island where, dressed as a police officer, he methodically shot for over an hour at hundreds of people at a Labour Party youth summer camp, taking 69 lives, mostly teenagers.

There were 569 people on the island that day, and Mr Breivik testified that he would have liked to kill them all.

He said he wanted to behead former premier Gro Harlem Brundtland and post a video of her execution on the internet.

Of the bomb attack in Oslo, he said, "the aim of the attack on the government buildings... was to kill the entire Norwegian government, including the PM... and everyone in the building".

Mr Breivik said that originally "the plan was three car bombs followed by a shooting".

He said he had considered placing a second bomb near the headquarters of the Labour Party, which he accuses of triggering a "Muslim invasion" with its generous immigration policies.

For the third location, he considered parliament, Norway's Aftenposten newspaper and City Hall, before deciding on the royal palace, although he insisted he had planned to warn the royal family so they would not be hurt.

He said he then planned to ride a motorcycle to a far-left squatter community, then to the Dagsavisen daily and finally to the headquarters of the Socialist Left Party, "executing as many people as possible" in each place.

"The plan was to not surrender before the whole plan had been carried out," he told the court. "It was a suicide mission where the probability of survival was equal to zero."

Because it turned out to be much more difficult than he expected to build bombs, he ended up only bombing the government offices and then heading to Utoeya, where "the goal was to kill everybody".

"I stand for Utoeya and what I did, and would still do it again," he said.

Survivors and victims' family members cried quietly, shaking their heads in disgust at some of the harshest words Mr Breivik has uttered in the trial.

He insisted he was "not a child murderer", and described the Utoeya victims as "category B" traitors because they held "leading positions" within the Labour party youth movement.

Earlier in the day, Mr Breivik answered questions from the prosecution about the year 2006, when he isolated himself to spend an average of 16 hours a day to play video games after returning to live with his mother at the age of 27.

"Some people dream about sailing around the world, some dream of playing golf. I dreamt of playing World of Warcraft," he told the court.

He insisted the game was very social, "pure entertainment (and) has nothing to do with July 22". He said it was a "hobby" and he decided to play it for a full year so as not to regret leaving a dream unfulfilled.

"I felt it was right to do this to prepare myself mentally to sacrifice my life," he told the court.

Mr Breivik also mentioned the game Call of Duty: Modern Warfare, which he said he had used as actual training for the shooting spree.

"It is a war simulator. It gives you an impression of how target systems work," he explained.

Calm and cooperative during questioning, Mr Breivik smiled several times while discussing target shooting techniques.

When confronted about his smiles by prosecutor Svein Holden, he acknowledged the survivors and victims' families watching were probably reacting "in a natural way, with horror and disgust".

Mr Breivik, charged with "acts of terror", has entered a plea of not guilty, saying his actions were "cruel but necessary".