From what I know, the samurai were originally heavy horse archers, and the Japanese embraced the shit out of muskets, having much greater firearm penetration than Europe. I thought I'd read somewhere that the samurai quickly adopted musket tactics, with each samurai having a bunch of retainers to provide him with a constant stream of loaded muskets.
Actually, Samurai rarely used muskets or other firearms. It is sometimes forgotten that there were actually two different classes of warrior in ancient and medieval Japan. The Samurai were basically the noble cavalry, originally trained as horse archers. Later, as combat on horseback became less common than foot combat, samurai tended to focus on their skills as swordsmen. They spent their lives training for war, and were highly skilled.
But there was a second type of warrior...a pure infantryman, of peasant stock, called the Ashigaru. It was the Ashigaru who made up the bulk of Japanese armies, originally as a mass of spearmen, and later as musketeers. Because they were not noblemen, they did not spend their lives training for war, and that is why they, rather than the Samurai, were equipped with muskets...any idiot could be taught to use one in a short time, and to equip the Samurai with them would have been a waste of a highly trained warrior.
Ashigaru did not become Ronin when their lords were killed. Instead, they simply took off their armor, lay down their weapons, and went home to resume their work as peasant farmers. It was the noble Samurai, who were bound to the lords by oath, and who had no other profession save war, who became Ronin.