Hello.
I originally started on this a few years ago and after working on it on and off for years I've finally got a version of the Mercenary for the C64 disassembled and the basics reverse engineered!
The code assembles with 64TASS runs with SYS 16384 and starts after the intro just before crashing into the planet.
The sound is a bit knackered but the actual game should be fully playable.
Hopefully its of interest to some of you and if anyone has any questions I'll try and answer.
Let me know if anyone is interested in working on an eventual complete reverse engineer.
Thanks, Ian.
Reverse engineered C64 Mercenary
Re: Reverse engineered C64 Mercenary
Having trouble adding the attachment so the code is at
https://github.com/Ian-McG-1970/c64/tree/main/Mercenary (Novagen) Disassembly V10
Let me know if there are any problems getting access.
Thanks, Ian.
https://github.com/Ian-McG-1970/c64/tree/main/Mercenary (Novagen) Disassembly V10
Let me know if there are any problems getting access.
Thanks, Ian.
- TheHighlander
- Baa!

- Posts: 56
- Joined: Wed Jun 22, 2022 10:24 pm 0
- Location: The Netherlands
Re: Reverse engineered C64 Mercenary
I'm getting this when I click the link..
The main branch of c64 does not contain the path Mercenary.
The main branch of c64 does not contain the path Mercenary.
The Highlander
https://www.youtube.com/c/TheHighlander71
https://www.youtube.com/c/TheHighlander71
- TheHighlander
- Baa!

- Posts: 56
- Joined: Wed Jun 22, 2022 10:24 pm 0
- Location: The Netherlands
Re: Reverse engineered C64 Mercenary
Heh...I just had a look at your github.
It looks as though you are using folders for code versioning. The point of git IS code versioning. Which means that if you want to work on a specific version of your code you create what is called a "branch". You can switch between these branches at will and git will restore the version of your code of the branch you pick.
I searched several folders but I couldn't really find any actual code, bar a list of variable definitions.
Mercenary is a fantastic piece of code. It pushes the C64 to do things it doesn't appear to be meant to do, so it'd be interesting to have a proper look at the code. It would be even better if the assemble was ACME style. Then you could use C64Studio do to source code debugging which is a really powerful tool if you're reverse engineering of such an iconic game.
It looks as though you are using folders for code versioning. The point of git IS code versioning. Which means that if you want to work on a specific version of your code you create what is called a "branch". You can switch between these branches at will and git will restore the version of your code of the branch you pick.
I searched several folders but I couldn't really find any actual code, bar a list of variable definitions.
Mercenary is a fantastic piece of code. It pushes the C64 to do things it doesn't appear to be meant to do, so it'd be interesting to have a proper look at the code. It would be even better if the assemble was ACME style. Then you could use C64Studio do to source code debugging which is a really powerful tool if you're reverse engineering of such an iconic game.
The Highlander
https://www.youtube.com/c/TheHighlander71
https://www.youtube.com/c/TheHighlander71
Re: Reverse engineered C64 Mercenary
Obviously something went a bit wrong.
If you look at
https://github.com/Ian-McG-1970/c64
There are multiple versions of the disassembly with the latest being
Mercenary (Novagen) Disassembly V11
Containing file
m_0140_cfff_v35.tas
If there are still problems Ill include the file when I get a chance.
If you look at
https://github.com/Ian-McG-1970/c64
There are multiple versions of the disassembly with the latest being
Mercenary (Novagen) Disassembly V11
Containing file
m_0140_cfff_v35.tas
If there are still problems Ill include the file when I get a chance.
Re: Reverse engineered C64 Mercenary
hopefully source file is attached and to compile just needs renamed from .txt to .tas
- Attachments
-
- m_0140_cfff_v35_tas.txt
- (371.32 KiB) Downloaded 122 times
Re: Reverse engineered C64 Mercenary
I think it's reasonably well documented - for me anyway.
The maths routines are identified (log conversion, sin and cos calculations, rotations, multiplication, division, perspective, etc).
The object draw routines documented (draw object, draw line, draw point, etc).
The object definitions have been found (the 64 objects that can be interacted with).
The ground structures have been found (256 structures shown on the map (bridges, airports, buildings etc) there are 256 objects but many are duplicated).
he main game loop is shown and the game plays all the way through.
The horizon calculation has been found and needs more understanding.
The roads still need documented and the structure drawing shares a load of code with the object drawing.
The underground rooms need found (they are treated as structures).
The Benson processing and actual adventure part of the game has hardly been looked at.
I would like to reverse engineer the whole game but it's takes a long time to do!
Any help would be appreciated and if anyone would like to document it to the same level as Mark Moxon has already done with Elite / Aviator / Revs then that would be excellent!
The maths routines are identified (log conversion, sin and cos calculations, rotations, multiplication, division, perspective, etc).
The object draw routines documented (draw object, draw line, draw point, etc).
The object definitions have been found (the 64 objects that can be interacted with).
The ground structures have been found (256 structures shown on the map (bridges, airports, buildings etc) there are 256 objects but many are duplicated).
he main game loop is shown and the game plays all the way through.
The horizon calculation has been found and needs more understanding.
The roads still need documented and the structure drawing shares a load of code with the object drawing.
The underground rooms need found (they are treated as structures).
The Benson processing and actual adventure part of the game has hardly been looked at.
I would like to reverse engineer the whole game but it's takes a long time to do!
Any help would be appreciated and if anyone would like to document it to the same level as Mark Moxon has already done with Elite / Aviator / Revs then that would be excellent!
- TheHighlander
- Baa!

- Posts: 56
- Joined: Wed Jun 22, 2022 10:24 pm 0
- Location: The Netherlands
Re: Reverse engineered C64 Mercenary
I've seen Mark's Elite which is amazing. Another example of a complex game that pushed the envelope.
Thanks for the copy of that disassembly. Might have a closer look at that.
Thanks for the copy of that disassembly. Might have a closer look at that.
The Highlander
https://www.youtube.com/c/TheHighlander71
https://www.youtube.com/c/TheHighlander71