Copy protection: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
(How it works)
Line 1: Line 1:
The [[CDZ]]'s [[system ROM]] has copy protection functionalities based on error-checking of track 0.
The NeoGeo [[CDZ]]'s [[system ROM]] has a CD-ROM copy protection feature. Not all games use it.
 
=Method=
 
The copy detection method relies on the fact that most computer CD drives/burners automatically correct disc errors thanks to the available EDC and ECC fields in CD-ROM sectors.
 
In some games, SNK intentionally added data and code with correctable errors and its (correct) checksum value in the [[CPY.TXT]] file's sector. The system ROM detects the data's presence, computes its checksum, and compares it with the given one. If they match, it means the errors were corrected (probably by a burner) and the system doesn't allow loading the game.
 
Is error correction disabled just when loading CPY.TXT ? See disasm.
 
For example in [[Art of Fighting 3 - The Path of the Warrior]], the following data is appended to CPY.TXT:
 
A header:
 
<pre>
0F BA 4E 45 4F 2D 47 45 4F 00 03 02 ...
</pre>
 
And valid {{Chipname|68k}} code:
 
<pre>
clr.l  d0
clr.l  d1
tst.l  $10F782
beq    $12601C
bset    #0,d1
tst.l  $10F77E
beq    $126028
bset    #1,d1
cmp.b  $12600A,d1
beq    $126030
addq.l  #1,d0
rts
</pre>
 
* 0F BA: Checksum of the error-corrected data
* 4E 45 4F 2D 47 45 4F 00: "NEO-GEO", 0
* 03: D1 check
* 02: ?
 
When is that code executed ? What is $10F782 and $10F77E ? RTS with D0=1 means fail ?
 
=Patching=
 
The patching tutorial commonly found online tells to replace the first two occurences of the letter "g" with "f" after the "NEO-GEO" string.
 
This actually turns the BEQ instructions into BNE, preventing the branches.
 
=Game list=
 
Since the NeoGeo CDZ came out in 1996, it is unclear if pre-1996 games had new masters made to use the protection or if SNK planned to use it since the beginning (makes no sense ?).
 
{|class="wikitable"
!Title||CDZ protection||In-game protectionDate||
|-
|[[Art of Fighting 3 - The Path of the Warrior]]||Yes||Yes
|-
|[[Breakers]]||Yes||No
|-
|[[Brikin'Ger / IronClad]]||Yes||No
|-
|[[Fatal Fury 3 - Road to the Final Victory]]||No||Yes
|-
|[[Real Bout Fatal Fury]]||Yes||Yes
|-
|[[Real Bout Fatal Fury Special]]||Yes||Yes
|-
|[[Real Bout Fatal Fury 2 - The Newcomers]]||Yes||Yes
|-
|[[Pleasure Goal]]||Yes||No
|-
|[[The King of Fighters '95]]||No||Yes
|-
|[[The King of Fighters '96]]||Yes||Yes
|-
|[[The King of Fighters '96 Collection]]||Yes||Yes
|-
|[[The King of Fighters '97]]||Yes||Yes
|-
|[[The King of Fighters '98 - The Slugfest]]||Yes||Yes
|-
|[[The King of Fighters '99 - Millennium Battle]]||Yes||Yes
|-
|[[The Last Blade]]||Yes||Yes
|-
|[[The Last Blade 2]]||Yes||Yes
|-
|[[Magical Drop II]]||Yes||No
|-
|[[Metal Slug X - Super Vehicle-001]]||Yes||No
|-
|[[Metal Slug 2 - Super Vehicle-001/II]]||Yes||No
|-
|[[Neo Drift Out - New Technology]]||Yes||No
|-
|[[Neo Geo CD Special]]||No||Yes
|-
|[[Neo Turf Masters]]||Yes||No
|-
|[[Ninja Master's]]||Yes||No
|-
|[[Ragnagard]]||Yes||No
|-
|[[Robo Army]]||No||Yes
|-
|[[Samurai Shodown III]]||Yes||Yes
|-
|[[Samurai Shodown IV - Amakusa's Revenge]]||Yes||Yes
|-
|[[Samurai Shodown RPG]]||Yes||Yes
|-
|[[Soccer Brawl]]||No||Yes
|-
|[[Stakes Winner]]||Yes||No
|-
|[[Super Sidekicks 3 - The Next Glory]]||No||Yes
|-
|[[Twinkle Star Sprites]]||Yes||No
|}
 
(List from [http://strider.mjjprod.free.fr/blog/index.php?post/2009/01/03/Les-protections-sur-Neo-Geo-CD])
 


To do: Details.


[[Category:Code]]
[[Category:CD systems]]
[[Category:CD systems]]

Revision as of 23:22, 9 February 2017

The NeoGeo CDZ's system ROM has a CD-ROM copy protection feature. Not all games use it.

Method

The copy detection method relies on the fact that most computer CD drives/burners automatically correct disc errors thanks to the available EDC and ECC fields in CD-ROM sectors.

In some games, SNK intentionally added data and code with correctable errors and its (correct) checksum value in the CPY.TXT file's sector. The system ROM detects the data's presence, computes its checksum, and compares it with the given one. If they match, it means the errors were corrected (probably by a burner) and the system doesn't allow loading the game.

Is error correction disabled just when loading CPY.TXT ? See disasm.

For example in Art of Fighting 3 - The Path of the Warrior, the following data is appended to CPY.TXT:

A header:

0F BA 4E 45 4F 2D 47 45 4F 00 03 02 ...

And valid 68k code:

clr.l   d0
clr.l   d1
tst.l   $10F782
beq     $12601C
bset    #0,d1
tst.l   $10F77E
beq     $126028
bset    #1,d1
cmp.b   $12600A,d1
beq     $126030
addq.l  #1,d0
rts
  • 0F BA: Checksum of the error-corrected data
  • 4E 45 4F 2D 47 45 4F 00: "NEO-GEO", 0
  • 03: D1 check
  • 02: ?

When is that code executed ? What is $10F782 and $10F77E ? RTS with D0=1 means fail ?

Patching

The patching tutorial commonly found online tells to replace the first two occurences of the letter "g" with "f" after the "NEO-GEO" string.

This actually turns the BEQ instructions into BNE, preventing the branches.

Game list

Since the NeoGeo CDZ came out in 1996, it is unclear if pre-1996 games had new masters made to use the protection or if SNK planned to use it since the beginning (makes no sense ?).

Title CDZ protection In-game protectionDate
Art of Fighting 3 - The Path of the Warrior Yes Yes
Breakers Yes No
Brikin'Ger / IronClad Yes No
Fatal Fury 3 - Road to the Final Victory No Yes
Real Bout Fatal Fury Yes Yes
Real Bout Fatal Fury Special Yes Yes
Real Bout Fatal Fury 2 - The Newcomers Yes Yes
Pleasure Goal Yes No
The King of Fighters '95 No Yes
The King of Fighters '96 Yes Yes
The King of Fighters '96 Collection Yes Yes
The King of Fighters '97 Yes Yes
The King of Fighters '98 - The Slugfest Yes Yes
The King of Fighters '99 - Millennium Battle Yes Yes
The Last Blade Yes Yes
The Last Blade 2 Yes Yes
Magical Drop II Yes No
Metal Slug X - Super Vehicle-001 Yes No
Metal Slug 2 - Super Vehicle-001/II Yes No
Neo Drift Out - New Technology Yes No
Neo Geo CD Special No Yes
Neo Turf Masters Yes No
Ninja Master's Yes No
Ragnagard Yes No
Robo Army No Yes
Samurai Shodown III Yes Yes
Samurai Shodown IV - Amakusa's Revenge Yes Yes
Samurai Shodown RPG Yes Yes
Soccer Brawl No Yes
Stakes Winner Yes No
Super Sidekicks 3 - The Next Glory No Yes
Twinkle Star Sprites Yes No

(List from [1])