Here is new game port I have been working on last few weeks: Pentagram. For those who doesn't know this game, Pentagram is final game in Sabreman saga, and it is a sequel to well known Knight Lore.
To play the game, use Altirra emulator and run pg.obx. On the title screen, press 1 to play with keyboard and press 2 to play with (emulated) Kempston joystick. Then press 0 to start the game. Other input means (Cursor Joystick and Interface II) are not emulated.
Game was ported from Spectrum. For the purpose of porting, I have developed simple static recompiler which takes Spectrum Z80 code and produces equivalent 6502 code. Created code is slow and unoptimized, but it is mostly working correctly. Recompiler is not designed to produce 100% correct 6502 code, but instead it can detect several situations which require manual intervention, like A register being read by Z80 instruction and not set by previous instruction. Also, I have developed a tool to verify correctness of the code. It runs both Spectrum and Atari versions in parallel using Z80 and 6502 emulators and compares memory accesses (read and writes) of both versions and reports differences. It skips all opcode reads (as these are obviously different) and for memory reads it checks if given address from Z80 version is properly mapped to 6502 version.
Game is slower at this moment as Spectrum version, but it is almost not optimized, so this is expected at this point. Hopefully it can be brought to better speeds later. Game is also not much tested, so there may be some gameplay issues.
For those interested in development, I included source code:
- pg_disassembly.txt: Pentagram disassembly found here: http://retrospec.sgn...lker/filmation/
- z80.asm: defines and routines used by Z80 recompiler
- spectrum.asm: defines and routines used to emulate Spectrum I/O on Atari (at this moment screen, keyboard, joystick and buzzer are emulated, colours are not)
- pentagram_atari.asm: Atari 6502 code of Pentagram
- pg.asm: main asm file, assemble it with MADS to create game executable
Main routines in the game (which needs optimizing) are:
- PrintSprite, which renders the sprite, applying rotation if necessary
- LB58A, which render game objects and renders them when necessary
Feel free to send me your better optimized versions of these routines.
Happy New Year 2016!