French...Morocco? Algeria? A gun made of parts, or repaired with native made parts? Rifled or smoothbore musket? 20 Bore? Conversion? The proof marks are too worn for me to recognize them. The roundhead screw on the cock is of a later date than the rest of the weapon. The pictograph on the lockplate forward of the cock may well be the tell-tale indication of the origin. It indicates a forward revolving motion, and is incorporated onto the cock as well.
Hard to tell from photo, but decorative (?) bands on the stock seem to be brass wire wrapping bordered by brass pins.
NSDM could indicate a Dutch origin...
I'm going to bed. Hopefully, later today I will be able to read the riddle solved by one of us far more knowledgeable than I.
Richard/Grumpa