I forget what you call them, but it was a world, like SMB and Zelda, etc. It was very like SMB (you collected things on each level), except you were some miner guy, and you went down shafts and got treasure and stuff. You could toss dynamite at baddies, some of whom would come out of green barrels and shoot a rifle at you. Ring a bell?
Ope, I found it. Third page of google. Gold Miner Joe.
http://www.arcadelab.com/miner.html