Jump to content
IGNORED

Pharaoh's Curse


sarnau

Recommended Posts

I've never really wrote any code for the Atari 400/800 computers, so this is my first look into the hardware and software by using Pharaoh's Curse as a learning example. 6502 I knew via the C64, etc, but I knew almost nothing about the graphics and sound capabilities.
 

Documented source code for Pharaoh's Curse for the Atari 400/800 computers. Requires the CA65 assembler to compile. I am using a Macintosh, but it should work on other operating systems as well or with trivial changes. I also wrote some Python scripts to extract the artwork, etc. If you like to have a look into the earlier development of games, this seems to be fun.

https://github.com/sarnau/PharaohsCurse

Interesting "cheat": press Control-Shift-9 to immediately "win" the game… It shows the end of game animations.

I also attach all 16 levels as an image. That was generated by one of my scripts.
 

levels.png

  • Like 16
  • Thanks 4
Link to comment
Share on other sites

Synapse games often had similar protection attributes - checksum of code to prevent tampering, poll disk drive and not work if drive present/not present depending on original media type.

I believe some also used illegal opcodes which is more towards confusing reverse-engineering efforts than efficiency.

Some also used undocumented OS calls which made them partially or totally incompatible with XL machines.

 

One game I'd like to see reverse engineered is Spelunker.  From what I've seen, it uses encryption for most of the disk which should be easily removed.  If new levels could be made it would invigorate that game.

  • Like 4
Link to comment
Share on other sites

i also did work on Electronic Arts games (Seven Cities of Gold is interesting, because two versions with different copy protection schemes exist). EA in Atari used some of the most interesting protections so far: the game loader is written in FigForth and some 6502. Later versions even encrypt the PCODE. Plenty of checksums as well and ROM/RAM checks to avoid hacking.

  • Like 4
Link to comment
Share on other sites

7 hours ago, sarnau said:

EA in Atari used some of the most interesting protections so far: the game loader is written in FigForth and some 6502.

Very interesting. I knew long ago that some EA protections use pseudo code. I even fully reverse engineered the MULE pseudo code loader. But I had no idea it was based on FigForth, or any Forth dialect, for that matter.

 

I understand this wasn't developed by EA. You will find almost the same protection, with the same, or very similar, PCODE, in some later Synapse releases. I've been told by a former EA employee that this was implemented by an external developer. I was curious and I asked his name. He didn't remember, unfortunately, but he remembered it was an extremely clever guy.

 

Edited by ijor
Link to comment
Share on other sites

FigForth was open-source and the 6502 code is available. You will find that they clearly used the _exact_ code and just stripped the symbols. I will publish the Code, because it is actually interesting to see how they checked for "illegal" ROM patches and tested the actual copy protection.

  • Like 1
Link to comment
Share on other sites

1 hour ago, sarnau said:

FigForth was open-source and the 6502 code is available. You will find that they clearly used the _exact_ code and just stripped the symbols.

Open source, but not public domain, I guess? Because there is no copyright notice in the protection. I am wondering if they had a valid legal license. I assume EA wouldn't use unlicensed copyright code, at least not knowingly, but may be they were not aware since the protection was implemented by a third party. And probably nobody realized it was based on FigForth, until now ...

 

Quote

I will publish the Code, because it is actually interesting to see how they checked for "illegal" ROM patches and tested the actual copy protection.

 

IIRC there are three different variants. I'm talking about releases with the older, Skew Align based, protection (never checked the software side of the later protection, so called SuperTrack). The earliest version, used in Worms?, is not compatible with XL/XE machines, it requires a 400 or 800. I don't recall the difference between the two later versions. May be one didn't check for PAL/NTSC?

 

Edited by ijor
Link to comment
Share on other sites

It was a different times. But FigForth was AFAIK in the public domain: "September 1980
This public domain publication is provided through the courtesy of Forth Interest Group, P.O. Box 1105, San Carlos, CA 94070.
Further distribution must include this notice."

EA used Forth even for 6502 assembly loaders without any Forth code in it. It must have been horrible to read as source code, because the opcodes and parameters are in reverse… How do I know? Well, 6502 Forth routines always start with a pointer to the beginning of the assembly code. In assembly code nobody would do that, because that pointer serves no purpose, but the Forth compiler generates it, so there you have it.

The track alignment protection is clearly older than the overlapping sectors within a track. You can see that the code evolved (they added encryption, etc). But even within the same scheme the code changed, e.g. "Murder on the Zinderneuf" is older than "The Seven Cities of Gold" and has therefore slightly older source code, e.g. they all have a check for the Atari 1200XL (yes!), but only Seven Cities of Gold detects the 600/800XL correctly.

Does anybody have a list of all EA games for the Atari 8-Bits?

  • Like 2
Link to comment
Share on other sites

3 hours ago, sarnau said:

The track alignment protection is clearly older than the overlapping sectors within a track. You can see that the code evolved (they added encryption, etc).

Of course that the Skew Align protection is older. Not only that the Supertrack is a much more advanced protection, also the titles are later releases.

 

Quote

But even within the same scheme the code changed, e.g. "Murder on the Zinderneuf" is older than "The Seven Cities of Gold" and has therefore slightly older source code, e.g. they all have a check for the Atari 1200XL (yes!), but only Seven Cities of Gold detects the 600/800XL correctly.

That's what I was saying, there are variants. There are two Murder on the Zinderneuf releases. The older one use the oldest variant that doesn't run on later computers (same as the one used in Worms?), the newer release has the fixed, updated, loader. Murder on the Zinderneuf and Seven Cities of Gold are the only two EA titles (as far we know) with two different releases that affect the loader or copy protection.

Edited by ijor
Link to comment
Share on other sites

I never used an Atari 400/800 during its hay days – except for 2 days as a loaner. I was in the C64 camp during that time (and later the Atari ST/TT before eventually ending up on the Mac). So I am reading the Atari documentation, etc. for the very first time now!

It seems while a couple of EA games are available as ATX files, a lot are not. Or not in a functional state. Or I simply can't find them. I found a couple of originals plus I found both copies of Seven Cities of Gold and a few others, but I am simply missing a lot as well.

Some are pretty clear: e.g. Hard Hat Mac seems _identical_ to the first version of Seven Cities of Gold. 100% the same protection.

Edited by sarnau
Link to comment
Share on other sites

15 hours ago, em_kay said:

any more after that ? I've got as far as synistops <space bar> <space bar> 2 but havent had any luck finding the next character if there is even one

I only knew about these three listed here.

https://www.ataricompendium.com/game_library/easter_eggs/a48/a48pharaohscurse.html

 

I knew about them way before the web was a thing. Maybe I read about it on a bbs back in the day.

Link to comment
Share on other sites

35 minutes ago, sarnau said:

Thanks a lot, that was extremely helpful!

No problem. All the work was done by people in this thread: Atari 8-bit Software Preservation - Thread

 

They have a website too, but it seems to be down at the moment: Atari 8-bit Software Preservation - Website

 

Somebody hosts an archive with all the files too.

 

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...