Oric games : assembly port to C

Posted: December 14, 2008 in Games
Tags:

At defense-force.org forums (a site that id dedicated to Oric Atmos, and whose name comes from an old well-known game), a member explains he succeeded porting Oric assembly games to C (the resulting code is based on the crossplatform SDL library), through a semi-automatic process : 
I disassemble the game then I convert it to C using a custom awk script. Then I try to make it compile, and work.
It’s not possible to handle JMP outside procedures automatically. goto instruction only works within the procedure (and there’s no such thing as a procedure in assembler, specially in the eighties ).
Sometimes code must be duplicated/rearranged. Delay loops must also be patched as well as the inputs. So a minimum of understanding of the game inner workings is required.

And about some particular issues :
how to handle self modified or auto-generated code ?
You cannot handle SMC. There was none in Xenon or Zorgon’s, but there was some in Zebbie and I had a little trouble with it. But it was rather easy to find by hand. (But I could detect it by marking the non-data sections and checking them when I write into the memory at run-time). 

We can then download conversions of the following games : Xenon 1, Zorgon’s Revenge (the sequel), and Zebbie.
We can also look again at these old games (and download tapes images for emulators) at oricgames.com.

I would be pleased if the author added a Axayacatl port, as I could then do an iPhone port from the C code produced (the iPhone version of MAME still uses SDL, and even without that we may be able to map SDL APIs to iPhone SDK Cocoa&C APIs).

Advertisements
Comments
  1. HREO says:

    thx for u good post
    http://www.4roz.com
    فور روز

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s