Ghouls and Ghosts Copy Protection

In this forum you'll find more information about the Pasti & VAPI Tools and the Preservation Project built around these tools. Come on in to find out more about it and discuss these projects.
Post Reply
mlynn1974
Atari Super Hero
Atari Super Hero
Posts: 764
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Ghouls and Ghosts Copy Protection

Post by mlynn1974 »

I hope this is the correct section.

Ghouls and Ghosts is available as 2 single-sided Pasti images. It works but I want to put the game in 1 Double Sided disk in plain .ST format. I know Automation hacked and packed this in Automation 199 but I thought I could do it for my own interest. The Automation version still has the annoying please insert disk B, press space to continue message which is easy to remove.

The problem is that when copied to one double sided disk the enemy sprites do not appear and when daggers are thrown they do not appear!

The 2 main files to change are: auto\boot.prg and ghouls.dat

This game uses an identical protection to Indiana Jones as described here:
http://www.markus-fritze.de/posts/2011/ ... t_crusade/
Does anyone know the proper name for this copy protection?

There is a CRC error on disk 1 track 79, sector 6.
I thought that the magic key might be read from track 78, stored in memory (dc.l) and then checked later in the game but that seems to not be the case.

I disassembled boot.prg using Easy Rider and put the key\magic value in the memory location and the old MOVE.L #0,D0 ; success.
I then reassembled boot.prg and put it on my double sided disk image, but that didn't work. I even merged the track buffer into the new boot.prg and that didn't work either. I'm stumped.

There is also a rather curious bit in this copy protection:

Code: Select all

0001888c: b0bc 0000 1784                 CMP.L    #$1784,D0         ;6020 bytes
00018892: 6e00 000a                      BGT      *+$C [$1889E]
This jumps to the fail case if the track is greater than 6020 bytes long, but a track would never be that length. Surely if the disk duplicator had written a long track which couldn't normally be written by an ST then this should be BLT fail.
Even 11 sectors would be 512*11=5632 bytes. I'm sorry if I'm missing something obvious here.

GHOULS.DAT doesn't read tracks 78 or 79 according to SteemDebug (Pasti Breakpoints). If we boot using the original disk 1, then insert the double sided copy as disk 2 and press space to continue the game works perfectly so all copy protection checks must have passed by that point.
Still got, still working: Atari 4Mb STe, MegaST 2, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: PC720B, Cumana CSA 354, Ultimate Ripper, Discovery Cartridge, Blitz Turbo, Synchro Express II (US and UK Versions).
User avatar
lotek_style
Mod(ul)erator
Mod(ul)erator
Posts: 2545
Joined: Sat May 11, 2002 2:39 pm
Location: germany
Contact:

Re: Ghouls and Ghosts Copy Protection

Post by lotek_style »

Did you try the D-Bug version?
lotek style / the sirius cybernetics corporation
- musician - ascii-artist - swapper - archivist -

.tSCc. - low-tech atari cyberpunks since 1990
http://www.tscc.de/ | http://demozoo.org/ | http://www.lotekstyle.de/ | http://ymrockerz.atari.org/
AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Ghouls and Ghosts Copy Protection

Post by AtariZoll »

I don't get what U did - is it now work perfectly or there is problem with daggers and sprites still ?
Since game uses own disk access code - so loads files not via TOS, problem is most likely that that code is done only for side A of floppy, and will not read from side B - what causes mentioned errors. So, you need to change floppy read code in game too.
Considering "annoying" floppy change requests and similar - that's just lazyness/rush of cracker, and not rare case.
Btw. Ghouls and Ghosts can be well packed, and then can fit even on 360KB floppy. That part is more interesting than copy protection removal.
And then you don't need to change floppy read code for both sides :-)
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.
User avatar
alien
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: Ghouls and Ghosts Copy Protection

Post by alien »

He did a track read. Tracks don't just contain the data of sectors, but also synchronization information, sector headers and gaps. As Markus Fritze said, the type of track on the disk cannot be written with a standard Atari ST. Psygnosis used a similar protection some of their early games. IIRC the Amiga could copy that type of disk.
Alien / ST-Connexion
User avatar
dlfrsilver
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2355
Joined: Mon Jan 31, 2005 1:41 am

Re: Ghouls and Ghosts Copy Protection

Post by dlfrsilver »

Ghouls'n'Ghosts 2 disks use a protection called EDC sector (aka Error Data Checksum Sector), if my memory serves me well.

But ppera is right, if the loader code is not modified to use both sides of the disk, it can't work.
Now SPS France representative since the 19th of June 2014. Proud to be an SPS member !
Atari 520 STF / Atari 1040 STF / Atari 520 STE / Atari 1040 STE / Atari Falcon 030 14mb + 8gb CF
mlynn1974
Atari Super Hero
Atari Super Hero
Posts: 764
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: Ghouls and Ghosts Copy Protection

Post by mlynn1974 »

Thanks for the advice. I haven't tried the D-Bug version.
I still have problems with the daggers and enemy sprites.
It definitely loads weapons.spr and weapons1.spr but I understand about the sector\side loading mentioned.

The code doesn't seem to use fread trap #14 so it's not a normal or particularly easy loader. It's a little bit more difficult than Outrun!
Still got, still working: Atari 4Mb STe, MegaST 2, 520STFM (x2), 2.5Mb STF, Atari 2600JR, Flashback 8 Gold.
Hardware: PC720B, Cumana CSA 354, Ultimate Ripper, Discovery Cartridge, Blitz Turbo, Synchro Express II (US and UK Versions).
AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Ghouls and Ghosts Copy Protection

Post by AtariZoll »

mlynn1974 wrote:...
The code doesn't seem to use fread trap #14 so it's not a normal or particularly easy loader. It's a little bit more difficult than Outrun!
Indeed. Not rare case that game using own floppy code, and a must if uses very low RAM, so TOS is not usable.
it is not so hard to write such code: http://atari-forum.com/viewtopic.php?f=68&t=26253
I have 2 side update of it too - used with some game floppy versions, combined with packing. Was simpler for me to use own code instead understanding game's loader. There are some really overcomplicated ones with very silly solutions.
Example: http://atari.8bitchip.info/ASTGA/P/potswco.php
Org. game is on 2 floppies - here all on single, fast load, depacking.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.
Post Reply

Return to “Pasti & VAPI”