Madrid man charged with firing pistol inside house