6 and 2 decode Algorithm

6 posts / 0 new
Last post
Offline
Last seen: 1 week 2 days ago
Joined: Nov 19 2023 - 15:28
Posts: 175
6 and 2 decode Algorithm

Hello, 

Continuing my effort to build and efficient disk emulator I need to read the assemnly code of one sector, 

I have a python script that can dissamble any 6502 code. I need to decode nibble 6 and 2. 

I am looking ideally for a python script that we a function that take the NIB buffer of 342 char and return the 256 binary code

I have a bit search on github but nothing suitable of easy to extract

 

Thanks

Vincent  

Offline
Last seen: 1 week 6 days ago
Joined: Jan 31 2024 - 06:40
Posts: 212
I guess you chose the wrong

I guess you chose a wrong path. Are you statring to value more your real floppy drive? 

Offline
Last seen: 1 week 2 days ago
Joined: Nov 19 2023 - 15:28
Posts: 175
no ;)I am at the same time

no ;)

I am at the same time studying very carefully copy protection and if you take for ex Commando, the protection is on sector 0D track 0, there are 00 after 2xE7 and a check on a byte sequence. This is one of the typical copy protection with on purpose desync and using the 00 as data...

 I want to understand why my emulator is not passing the test and I want to change to code to have debug on screen to better see what is happening.

 

I have also seen that Apple II with modify rom and not passing the test of copy protection game. 

So I need this to do some asm stuff directly on the game soft. 

 

But if it does not exist I will spent some time to build my own lib of nibble function. 

 

Offline
Last seen: 1 week 2 days ago
Joined: Nov 19 2023 - 15:28
Posts: 175
For the one who might need it

For the one who might need it... 

a C version ported to python... 

Package icondecodeSector.py_.zip

 

 

S.Elliott's picture
Online
Last seen: 59 min 41 sec ago
Joined: Jun 23 2022 - 16:26
Posts: 230
Another sample of the E7 protection
VIBR wrote:

no ;)

I am at the same time studying very carefully copy protection and if you take for ex Commando, the protection is on sector 0D track 0, there are 00 after 2xE7 and a check on a byte sequence. This is one of the typical copy protection with on purpose desync and using the 00 as data..

 

It's doesn't directly address your problem, but there's some detailed discussion of the E7 copy-protection technique in the blog post Two-disk replica of Prince of Persia  along with NIB files of the original Prince of Persia diskettes.

Unfortunately, you probably can't adapt the blogpost's method of working around that particular copy-protection problem...but you'll undoubtedly be interested in step-by-step outline of how the code performs the E7 signature-check.

 

Plus some old  old  scribbled notes on how Prince of Persia disguised its signature as E7's by using those hidden 0's 

Offline
Last seen: 1 week 2 days ago
Joined: Nov 19 2023 - 15:28
Posts: 175
Thanks S.Elliott, very

Thanks S.Elliott, very interesting, and yes my goal is to make my emulator to pass all the copy protection like the DISK II without any hack, crack or bit alteration. 

I am struggling on something and I do not know what it is and I am building a set of tools to understand. In the end, I will find the abvious like always ;)

But for now, I am trying to build some tools to help me understand: 

- A game with very simple copy protection like Commado (E7 + reverse string checking after slip bit)

- Piece of software in the TOME of copy protection

 

Vincent

 

Log in or register to post comments