News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Nworc

Hidden source code of game loader revealed

Started by Nworc, 01:28, 30 January 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nworc

Hi guys,

I stumbled about something that I want to share with you. Today I received a game for the CPC by mail that I got from a retro shop: Shogun - the disk version.

Okay, what is the first thing you do when you bought a game? Okay, I mean apart from checking that the disk is not stuffed with sand or the like.

Right: the first thing you do is to fire up the disk editor and have a look. And yes - bingo - deleted files in user area &E5. Nice. More than half of the disk space is still free - and the block numbers point to areas on the disk which are not occupied by the files which are visible. Veeery nice.

The files even have interesting names like DLOADER, TLOADER, D-MAKER, TESTER ... could it really be that the maker of the disk just had some of the development files on the master disk that he just *deleted* before he gave it to the firm that would produce the disks for the market?

Hard to believe! So let's try to recreate these files. I tell you - as I opened DLOADER into a text editor, I found exactly the asm source code of the disk loading routine - with commentary on the deccoding scheme! Hey, funny. This is the first time I could see the comments of the dude writing such a protection routine (okay this one is silly, but anyway) and to me it's an interesting read as it gives some hint into the thinking of someone writing such a routine.

Isn't it ridiculous that you find this stuff on the product which was sold? I thought: what could have gone wrong. As there is also a disk and tape maker on the disk, could it possibly be that the dude gave instructions on how they should start the duplication program on the disk - but what they did is that they just copied the whole disk!  Maybe   :laugh:

The disk loading program is protected, it decodes itself, it's self modifying, it's calling itselve at program locations which are not the opcodes but the parameters and trying to do all sort of stuff just to look odd. Very funny. I just don't know why all that effort - as the disk is easily copyable by even the simplest copy program.

Okay, this is the story, I hope you enjoyed it. I'm not sure if it's okay to publish the code or parts of the code here, but if you own the game, you know where to find the files.

PS: that was the french version.

Powered by SMFPacks Menu Editor Mod