View Single Post
Old 11 November 2012, 16:15   #18
Going nowhere

Galahad/FLT's Avatar
Join Date: Oct 2001
Location: United Kingdom
Age: 44
Posts: 6,733
Originally Posted by Toni Wilen View Post
btw, AR2 has interesting copper pointer detection code. (Not anymore in AR3)

Something like this in pseudocode:

Get address of COPxLC from memory that stores all CPU custom accesses:
Run detection (COPxLC)
If detected: exit
address = 0
Run detection(address)
if detected: exit
address = address + 2
if (address = end of chip): exit
goto next

Detection code does:
Save LONG from address
Write Copper MOVE, 0x8001 to INTREQ, to address (LONG)
Write to COPxJMP
Enable Copper DMA
Disable Copper DMA
Restore old LONG value
Check if INTREQR bit 0 is set, if set, copper pointer found, exit

Really great idea but unfortunately it is too easy to detect by creating fake copper list.
Setting the copperlist $dff080 as $ffffffff makes AR2 crash on entry on button push. This however does not defeat AR3

Last edited by Galahad/FLT; 11 November 2012 at 16:40. Reason: muthfucking typo!
Galahad/FLT is offline  
Page generated in 0.04829 seconds with 9 queries