reminisce about bbc micro & electron games like chuckie egg, repton, elite & exile

Related forum: adventures

Posts: 95
Joined: Wed Jun 21, 2006 1:20 am


Postby joachim » Sat May 27, 2017 11:19 pm

Well, I misspent my Friday afternoon finding out how Syncron stores its map data, since I've never seen screenshot maps of it. The EOR encryption was easy to remove, but I was surprised to find there isn't just a table of 64 bitmaps for the 64 game objects, and I had to find the rendering code (this was the hard part!) and read it all in order to understand how it works.

  • Each level is an impressive 512x4 cells each of which can hold 64 different objects. That means that despite the small width, they're more like Ravenskull/Pipeline levels in size than Repton levels. They aren't bit-packed (one of the spare bits is needed for bombed/unbombed status anyway) so each level takes up 2k.
  • That means there can't really be the 16 levels there pretend to be! Levels 5–8 are just levels 1–4 flipped vertically, and levels 9–16 are 1–8 flipped horizontally.
  • Each map object is rendered onto 1/32 of the screen: as a bitmap it would be 256 bytes. Instead of spending 16k to store images for 64 objects this way, the game has a dictionary of 220 smaller bitmaps, each the size of one 6845 character (4x8 pixels; 8 bytes), and each object is made by combining 32 of these small bitmaps. This reduces the storage to 2k for the table of 64 objects, plus 1¾k for the dictionary.
Overall I'm quite impressed by the amount of graphic variety that was shoehorned into the maps. Although I had been half expecting that there would be yet another layer of indirection, by building the map out of a dictionary of repeating "panels" each of which contained perhaps 16 or 32 objects.

If only there were a little more of a playable game to go along with it!

Here's Python code that takes the Stairway To Hell disk image and generates map PNGs:

Code: Select all

from PIL import Image

start_sector = 0x22
data_length = 0x5800

crypt_key = 0x74c7-0x1f00
crypt_end = 0x7400-0x1f00

map_data = 0x2700-0x300
icon_data = 0x4700-0x300
pixel_data = 0x5000-0x300
palette = {
  0x00:  (0x00, 0x00, 0x00),  # black
  0x08:  (0x00, 0x00, 0xff),  # blue
  0x80:  (0xff, 0x00, 0xff),  # magenta
  0x88:  (0xff, 0xff, 0x00),  # yellow

map_height = 0x4000
map_width = 128

with file("Syncron.ssd", "r") as f:
  # Load game file*256)
  data_encrypted =

  # Decrypt game file
  data = bytearray(data_length)
  for n in xrange(data_length):
    b = ord(data_encrypted[n])
    if n < crypt_end:
      y = n % 256
      b = b ^ 0xaa ^ ord(data_encrypted[crypt_key + y]) ^ y
    data[n] = chr(b)

  # Generate maps
  for map_num in xrange(4):
    image ='RGB', (map_width*2, map_height))
    imgdata = []
    for y in xrange(map_height):
      for x in xrange(map_width):
        map_icon = data[map_data + map_num*0x800 + (y//32)*4 + (x//32)]
        char_num = data[icon_data + map_icon*32 + ((y%32)//8)*8 + ((x%32)//4)]
        byte = data[pixel_data + char_num*8 + (y%8)]
        pixel = (byte << (x%4)) & 0x88
    image.putdata(imgdata)'syncron_map%i.png' % (map_num + 1,))

(521.42 KiB) Downloaded 29 times
Last edited by joachim on Sun May 28, 2017 12:30 am, edited 1 time in total.

User avatar
Posts: 1831
Joined: Sun Nov 11, 2007 10:11 pm

Re: Syncron

Postby davidb » Sat May 27, 2017 11:51 pm

Nice work! :D

It's a shame that there isn't that much to distinguish between the levels. Perhaps if they'd had different colour schemes, it might also have helped a bit. :)

Posts: 95
Joined: Wed Jun 21, 2006 1:20 am

Re: Syncron

Postby joachim » Sun May 28, 2017 12:20 am

davidb wrote:It's a shame that there isn't that much to distinguish between the levels. Perhaps if they'd had different colour schemes, it might also have helped a bit. :)

Yes! A lot of those 64 tile types are for scenic variation, but ultimately it's not enough to cover 4 huge levels.

Another thing that could work, with just a little more memory, is to modify the dictionary of bitmaps between levels. Maybe 1k of changed data and your game has a whole new graphical style.

I keep feeling there's a lot of unfulfilled potential in this game. Master/SWRAM expanded edition, anyone?

User avatar
Posts: 1810
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK

Re: Syncron

Postby jms2 » Sun May 28, 2017 5:55 am

Great work!

The four levels do look pretty much identical, which is a pity given how much memory they occupy.

I remember reading that Syncron is barely a game at all: Gary Partis wrote it as a tech demo. I think he sometimes appears on these forums actually.

User avatar
Kecske Bak
Posts: 671
Joined: Wed Jul 13, 2005 7:03 am
Location: Treddle's Wharf, Chigley

Re: Syncron

Postby Kecske Bak » Sun May 28, 2017 8:22 am

All Syncron really needed to make a better game out of it was waves of ships to move in formation over the maps. It also has a nasty bug - if you approach runways from the same direction repeatedly the ship moves further and further up or down the screen until the game becomes unplayable. You had to remember to approach runways from alternate directions each time to keep the ship in the same position.

I always loved the effect when you bombed the HQ - both the sound and visuals were really satisfying.

Return to “software: classic games”

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests