Neuroprotect

From Software Archive
Revision as of 00:45, 24 November 2026 by Enigma (talk | contribs) (Description of Neuroprotect: same check as TIMEX)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Neuroprotect

This analysis is based on the state of the wiki from 24 Nov 2026.

Neuroprotect was created by Snacky of Genesis Project and is based on TIMEX V3. On this wiki it is on Rubicon (1991). The disk feature and the check are those of TIMEX: sector 18 of track 18 has a data block with weak bits.

Description of Neuroprotect by Zibri / RamJam

In short: the drive reads the raw data of track 18 sector 18 twice. The two reads must differ, and two fixed byte rows must be found behind the weak area.

The sector

 sync  header of track 18 sector 18  gap  sync  one or two bytes  weak area  AA FA 65 AA  ...  7C DD A9 55 CB 77 5D 57 6E 4B  GCR bytes
  • The header is normal. The data block starts with an area without proper flux changes. The drive reads other bits there on every turn (weak bits), and the bits behind it arrive shifted by a different amount each time.
  • Behind the weak area the block holds two fixed byte rows and then normal GCR bytes.
  • CBM DOS reports a read error for the sector.

The check

Drive memory of Game Graphics Designer II (TIMEX V1). The routine of Rubicon (Neuroprotect) is the same byte for byte:

$0400  20 0A F5  JSR $F50A        ; ROM: find the data block of the sector
$0403  50 FE     BVC $0403
$0405  B8        CLV
$0406  AD 01 1C  LDA $1C01        ; read 256 raw bytes
$0409  99 00 07  STA $0700,Y      ; keep them
$040C  C8        INY
$040D  D0 F4     BNE $0403
$040F  20 0A F5  JSR $F50A        ; find the data block again
$0412  50 FE     BVC $0412
$0414  B8        CLV
$0415  AD 01 1C  LDA $1C01
$0418  D9 00 07  CMP $0700,Y      ; compare with the first read
$041B  D0 06     BNE $0423        ; a difference: go on
$041D  C8        INY
$041E  D0 F2     BNE $0412
$0420  4C A0 EA  JMP $EAA0        ; all equal: reset the drive

$0423  20 46 04  JSR $0446        ; search the four bytes AA FA 65 AA in the first read
$0426  30 05     BMI $042D        ; found
$0428  20 5E 04  JSR $045E        ; not found: shift the 256 bytes by one bit
$042B  D0 F6     BNE $0423        ; and search again, at most nine times
$042D  A9 09     LDA #$09         ; then the same with ten bytes
$042F  8D 80 04  STA $0480
$0432  A9 76     LDA #$76
$0434  8D 4F 04  STA $044F
$0437  A9 09     LDA #$09
$0439  8D 4A 04  STA $044A
$043C  20 46 04  JSR $0446
$043F  30 2E     BMI $046F        ; found: go on with the loader
$0441  20 5E 04  JSR $045E
$0444  D0 F6     BNE $043C

$0446  AE 81 04  LDX $0481        ; start position
$0449  A0 03     LDY #$03
$044B  BD 00 07  LDA $0700,X      ; compare with the table, last byte first
$044E  D9 72 04  CMP $0472,Y
$0451  D0 05     BNE $0458
$0453  E8        INX
$0454  88        DEY
$0455  10 F4     BPL $044B
$0457  60        RTS
$0458  EE 81 04  INC $0481        ; next position
$045B  D0 E9     BNE $0446
$045D  60        RTS
$045E  A2 00     LDX #$00         ; shift all 256 bytes right by one bit
$0460  7E 00 07  ROR $0700,X
$0463  E8        INX
$0464  D0 FA     BNE $0460
$0466  CE 80 04  DEC $0480
$0469  F0 01     BEQ $046C
$046B  60        RTS
$046C  4C A0 EA  JMP $EAA0        ; nine shifts without a hit: reset the drive
$046F  4C 85 04  JMP $0485
  • Two reads of the same 256 raw bytes are compared. On a copy with fixed bits they are equal and the drive is reset.
  • Then the two byte rows are searched in the data of the first read. Because the weak area shifts the bits, the search is repeated with the data moved by one bit, up to nine times. If a row is not found, the drive is reset.
  • Behind the second row the routine decodes GCR bytes and writes one of them into the code that follows, so the content of the block is needed too.
  • A reset drive does not answer the loader any more; the program on the C64 crashes.

Copying

  • A sector copy stops at the read error of this sector.
  • A copy of the raw track has fixed bits in place of the weak area and fails the comparison. A copy needs an area that reads differently on every turn, followed by the two byte rows.

Verification on this wiki

  • Rubicon (Source 2): on a copy in which the weak area of the sector is replaced by fixed bits the drive is reset and the program crashes; the original loads.
  • The routine in the drive memory of Rubicon is equal to that of Game Graphics Designer II (TIMEX). The drive memory of Rubicon also holds a greeting text of the author dated 3/11/1991.
  • The search for the byte rows of this check in all G64 images is described on the TIMEX page.

Pages that refer to this protection