This reminds me of a very old science fiction movie called the Blackhole.... I am pretty sure that is the name. A unique giant spaceship was able to stay close to the blackhole; I do not remember why they wanted to be close to it.
One of the heroes in the movie was a small robot that could shoot really well. I think he used two guns. A bad guy was a large robot that had superior technology.... and it was mean. It was a cool movie for the time period.