The case law on the Second Amendment is thin, and the interpretation of the Amendment has undergone some changes over time. The laws regarding weaponry have mutated with those changes.
The Supreme Court of the United States did not have occasion to interpret the Second Amendment until 1939, when it issued an opinion in United States v. Miller, 307 US 174. In that case, the defendants were charged with violation of the National Firearms Act requiring registration of sawed-off shotguns. That act, passed in 1934, was an attempt to deal with the possession and use of machine guns and other weapons by the gangs that had operated during Prohibition. The lower court had dismissed the indictments on the theory that the Second Amendment barred prosecution, and not shockingly, the defendants did not stick around to reply to the appeals by the Government, so the Supreme Court’s opinion is somewhat tainted by the fact that it was based only on briefing by the Government.
In Miller, the Court opined that the “prefatory clause” (“A well regulated Militia, being necessary to the security of a free State, …”) gave scope to the Amendment. Thus, the purpose of the Amendment being to make certain that militias could exist unhampered, the Court held that weapons like sawed-off shotguns could be registered and taxed, since they did not bear reasonable relationship to running a militia. A number of Court of Appeals cases in the years after that both followed this reasoning, and showed that it had some potential flaws.
There grew up a significant opposing movement among legal writers, that the Amendment was an individual right, not limited to the prefatory clause. This group of writers noted that the “operative clause” ("… the right of the people to keep and bear Arms shall not be infringed.") did not have any limiting language in it. Further, the Second Amendment is placed among a number of amendments in the “Bill of Rights” which are all personal rights. This group of writers asserted that the Amendment bars the Federal Government (and probably, by incorporation into the 14th Amendment’s Due Process Clause, the states) from regulating firearms of any kind. Among the authors who wrote about this concept prior to 2008 was Antonin Scalia.
In 2008, everything changed. The Supreme Court issued it’s holding in District of Columbia v. Heller, 554 US 570, striking down a law applicable to the District banning handguns entirely, and placing all other firearms under significant restrictions. In reaching its determination, the opinion extensively reviews the concepts of “keep and bear arms” and “well-regulated militia” through the centuries before and after the Revolution. The Court decided that the Second Amendment is an individual right, and that the government was not able to regulate handguns on the basis that they were not relevant to forming a well-regulated militia.
In the opinion, the Court did try to limit the extent of its decision through dicta (things said by the Court that have no precedential value, since they aren’t relevant to the case in front of it, but which can be used to guide future courts in understanding what the Court wanted), saying that their opinion should not be considered to preclude keeping felons from possessing guns, or the mentally ill, or banning possession on school grounds and in government buildings, etc. Justice Scalia’s comments on “dangerous and unusual weapons” has already been noted above. Since this is dicta, and since the words “shall not be infringed” are arguably a stronger injunction than “abridging” or “respecting”, speculation is strong that, presented with actual cases testing those types of limits, the Court might have to retreat from them. Certainly, that is the view of the NRA.
Not long after Heller, the Court held that the Second Amendment’s right also is a limit on state power (McDonald v. Chicago, 561 US 742 (2010)). There were four justices who would incorporate it to the Due Process clause of the 14th Amendment as a function of “liberty”; Justice Thomas preferred to incorporate it using the Privileges and Immunities Clause.
So as you can see, prior to the 1930s, no one knew quite what the Amendment precluded for certain. From the '30s to the turn of the Century, it was thought the Amendment allowed for reasonable restrictions on firearms by type, allowing registration, taxation, and even outright bans, as well as carving out certain individuals from the right (felons, mentally ill, those on school grounds, etc.). After 2008, the Amendment appears to have little tolerance for government limitations on firearms. Still, the Supreme Court in Heller did attempt to preserve some of the traditional limitations government has employed. It is still to be determined exactly how they will fare.