Latest V1.20 Version download here:
https://csdb.dk/release/?id=150001
Pentagram, the third and last Filmation Ultimate game is now available for the C64.
It runs almost as fast as the original Spectrum version and if you run it on a C128 in C64 mode it runs at the same speed as the Spectrum version.
Pentagram is the slowest of the 3 Filmation games (as it has more going on than the others) so a version of Knight Lore converted in the same way would run faster than this.
Mariusz did the original Z80 to 6502 conversion for the Atari 800 and I used his optimised 6502 source code and converted it to run on the C64.
Mariusz has done an amazing job of optimising the code for the 6502. This shows what’s possible when code is optimised to run on the 6502 rather than the 6502 almost trying to emulate the Z80.
None of the C64 video hardware (hardware sprites) was used in this conversion, it’s just plain CPU grunt and memory. To use hardware sprites you would have to re-write most of the games rendering engine.
The full 64k is open with around 4k spare for possible future optimisations.
The 4k under $D000 is used and holds part of the screen display and video data. The code is so modular it was easy to switch the IO in and out as required.
It would be possible to free up another 3k or so by using a slightly slower Updatescreen routine (less rolled out) and write the colour ram data directly into colour ram rather than somewhere else first.
Rather than use a normal bitmap screen I used 3 banks of chars with raster splits to emulate a 256x192 bitmap display. This had the advantage of saving a couple of k for the display (6k rather than 8k) and also the screen memory runs continually as a 8bit block so its quicker to calculate the screen addresses when bliting sprites etc.
As well as supporting the extra speed of the C128 I have also built in support for the second fire button on CGS joysticks for the pickup/drop function for all you CGS joystick fans out there!
It should work fine on both PAL and NTSC machines.
I’ve included the C64 source code as I’m new to asm coding I’m sure it can be improved on (I’m no Ninja coder!). It’s in Atari MADS format so you will have to compile it with that and then edit out the bytes 00,01,04,05 at the start of the created binary to create a runable C64 file.
I’ve played it all the way through (with mega jump and unlimited lives cheats) and haven’t found any problems yet. Please give it a try and let me know what you think.
-
emu
- Jack The Nipper

- Posts: 639
- Joined: Wed Jan 21, 2009 12:24 am
- Location: England, UK.
- Age: 54
Pentagram (Ultimate filmation game) now available for C64
Last edited by emu on Wed Aug 17, 2016 11:26 pm, edited 1 time in total.
- Neo-Rio
- Rick Dangerous

- Posts: 1734
- Joined: Tue Oct 21, 2003 4:03 am
Re: Pentagram (Ultimate filmation game) now available for C6
Amazing job!

sooooo.... what are you waiting for?!emu wrote:so a version of Knight Lore converted in the same way would run faster than this.
- robc
- William Wobbler

- Posts: 140
- Joined: Fri Jan 10, 2014 12:50 am
- Location: Melbourne, Australia
- Age: 42
- Contact:
-
filker
- Joe Blade

- Posts: 241
- Joined: Sat Nov 07, 2015 3:59 am
- Contact:
This is great, and a huge labor of work.
I took a glance at the code, and I think it's not much harder to convert this to use VDC. This way we can make it run at 2MHz all the time.
I took a glance at the code, and I think it's not much harder to convert this to use VDC. This way we can make it run at 2MHz all the time.
Ilker Ficicilar
CBM Projects: PS/2 keyb/mouse mods, RS232 tricks, LUnix etc.: http://cbm.ficicilar.name.tr/
CBM Projects: PS/2 keyb/mouse mods, RS232 tricks, LUnix etc.: http://cbm.ficicilar.name.tr/
- hammerhead
- Lemon64 Database Editor

- Posts: 3268
- Joined: Sun Jan 06, 2002 4:02 pm
- Location: Stockport, UK
- Age: 52
- Lasse
- C64 Games Programmer

- Posts: 4257
- Joined: Mon Jan 07, 2002 10:57 am
- Location: Finland
- Contact:
- Unkle K
- Team Member

- Posts: 1460
- Joined: Wed Jan 02, 2002 3:10 am
- Location: Australia
- Age: 43
-
emu
- Jack The Nipper

- Posts: 639
- Joined: Wed Jan 21, 2009 12:24 am
- Location: England, UK.
- Age: 54
Thanks for all your great comments. 
Mariusz did most of the cleaver stuff with his A800 conversion and was kind enough to release the source code to enable me to convert it to the 64.
Converting his code was much easier than I thought as he kept the Atari specific code separate from the main game code. You can see most of the Atari (and the original Z80 code) in the source file. Also the two (A800 and 64) machines are both 64k 6502 based machines and that's the hardware that's being used in this conversion (with a little bit of Sid!)
Interesting to note that the game renders the graphics to a buffer first upside down! The first version I had running had all the graphics running upside down!!
Yes Knight Lore and the other one would be nice converted in the same way, but a lot of work!!
Mariusz did most of the cleaver stuff with his A800 conversion and was kind enough to release the source code to enable me to convert it to the 64.
Converting his code was much easier than I thought as he kept the Atari specific code separate from the main game code. You can see most of the Atari (and the original Z80 code) in the source file. Also the two (A800 and 64) machines are both 64k 6502 based machines and that's the hardware that's being used in this conversion (with a little bit of Sid!)
Interesting to note that the game renders the graphics to a buffer first upside down! The first version I had running had all the graphics running upside down!!
Yes Knight Lore and the other one would be nice converted in the same way, but a lot of work!!
Last edited by emu on Wed May 04, 2016 7:49 pm, edited 1 time in total.
- malcontent
- Rick Dangerous

- Posts: 2859
- Joined: Thu Feb 25, 2010 9:52 pm
- Location: :noitacoL
- Age: 40
- Contact:
- PaulEMoz
- Rick Dangerous

- Posts: 1728
- Joined: Sat Dec 29, 2001 2:46 am
- Location: Near Newcastle, England
- Age: 52
- Contact:
- encore
- Rick Dangerous

- Posts: 1721
- Joined: Wed Jun 02, 2010 9:41 pm
- Location: .se
- Age: 42
- Contact:

