Some spare time befor the holiday … I will not start with new Vectorblade stuff, so I thought I might do some “small” stuff I wanted to do for quite some while.
I think it was last year that John Hall, one of the original developers for the Vectrex, made his personal “vectrex stuff” available:
(From me personally at this point – THX!)
There you can find quite a lot of usefull information and stories about his time developing for vectrex. Amongst others the complete source codes for:
- Two BIOS editions
- Revision c of Minestorm
- Fortress of Narzod (revision B)
- Dark Tower
All sources are downloadable in the original form. They are written for an assembler called: ACT09 6809 assembler for a CP/M-based development system.
Yesterday I found and took the time to download the sources (again) and put them into a vide-assembleable format.
You can download the sources (for Minestorm, Fortress of Narzod and Dark Tower) in Vide compatible project format below.
Just a few words what I did:
- exclude all linker reference (commented out)
- replaced all „.“ with „_“ (a dot seems to have been a correct part of a variable – assi doesn’t like it)
- replaced pseudo opcode LINK with „include“
- ensured all RAM locations are declared „BSS“
- changed binary form from 00000000B to %00000000
- LDA X (and the like) statments changed to LDA ,X
- for the music there seems to have been a macro TEMPO, which was not included in the sources
the resulting note length information was manually edited and provided by myself
- I also added symbolic note values (which probably also were originally “included” with a file missing from the sources)
- made 2 new include files for BIOS, RAM and IO locations as in “RUM”
- identified missing VAR names and JSR locations and added them in an additional include “other.i”
The provided source code is the one for the BIOS version, starting at $e000, it does not make use of any include files – all locations and variables are declared within the source.
Due to being the “BIOS” version, there was no correct Vectrex header in the form “g GCC XXXX” – therefore the resulting binary file could not be played.
I changed the header to include a BIOS compatible version.
For the internal addresses to be comparable I changed the name so that the entry point to the cartridge remained the same. The “ENTRY” location is at address 0x0016. I did that so I could easily compare addresses and make sure I did everything alright. The current name is “MIN” (not MINE STORM).
The original name and position information is commented out. You can exchange them and minestorm will run with the correct name – only the entry – addresses will be different.
The resulting binary is 100% identical to the dumped binary which is provided with Vide. In order to be 100% the same binary I had to “trick” assi – to not do internal optimizations.
Quite a few location had source like:
Assi optimized this to:
The old ACT09 – assembler produced code like:
While the difference is not huge, (does not need more space) the resulting CRC 32 noticed the difference. For that reason I supplied an additional “<<” at the corresponding source locations – this forces assi to use 5bit addressing mode.
Fortress of Narzod
The sources provided by John Hall are for Revision B of the game. I have not found any dump of Revision B – and I don’t know if it ever was put into a production run (anyone know?).
For that reason it was not possible to generate a 100% compatible binary (and I did not try to trick assi with above mentioned pessimization). The resulting binary seems to work alright (but I only played the first level).
But the interesting thing remains – is this the final/bug fixed – never released version of Fortress of Narzod?
The changelog mentions following items:
- CORRECTED BLASTER COUNTER DURING TWO PLAYER MODE
- CORRECTED KILLER ABORT / TWO PLAYER SWITCHING
I admitt I never played the original in two player mode – so I can not confirm that there are/were any bugs.
The project files for Vide:
(will also be included in future Vide versions)