Difference between revisions of "Programming:Unlocking ASIC"
From CPCWiki - THE Amstrad CPC encyclopedia!
m (Added category) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | To unlock the ASIC, a 17-byte "unlock" sequence must be sent to the CRTC's selection port (&BC00) : | ||
+ | RQ00, 0, 255, 119, 179, 81, 168, 212, 98, 57, 156, 70, 43, 21, 138, STATE, <ACQ> | ||
+ | * RQ00 must be different from the value 0. | ||
+ | * STATE=205 for UNLOCK otherwise another value for LOCK. | ||
+ | * ACQ represents sending any value if STATE=205 (not needed otherwise). | ||
+ | |||
+ | |||
+ | = Z80 Assembler version = | ||
<pre> | <pre> | ||
;; This example shows how to unlock the ASIC | ;; This example shows how to unlock the ASIC | ||
Line 30: | Line 38: | ||
.sequence | .sequence | ||
defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee | defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee | ||
+ | </pre> | ||
+ | |||
+ | Note: As one may see, the nybbles in the sequence are based on two 4bit shift registers. For one reason or another, Amstrad has patented the verification mechanism ([[Media:Patent GB2243701A.pdf|GB2243701A]]). The patent seems to focus on ''verifying'' (rather than on ''sending'') the sequence, so its legal use is a bit unclear. | ||
+ | |||
+ | |||
+ | = BASIC version = | ||
+ | <pre> | ||
+ | 1000 RESTORE 1010:FOR I=0 TO 16:READ A:OUT &BC00,A:NEXT I:RETURN | ||
+ | 1010 DATA 255, 0, 255, 119, 179, 81, 168, 212, 98, 57, 156, 70, 43, 21, 138, 205, 238 | ||
</pre> | </pre> | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:CPC Plus]] | [[Category:CPC Plus]] |
Revision as of 13:48, 16 April 2024
To unlock the ASIC, a 17-byte "unlock" sequence must be sent to the CRTC's selection port (&BC00) : RQ00, 0, 255, 119, 179, 81, 168, 212, 98, 57, 156, 70, 43, 21, 138, STATE, <ACQ>
- RQ00 must be different from the value 0.
- STATE=205 for UNLOCK otherwise another value for LOCK.
- ACQ represents sending any value if STATE=205 (not needed otherwise).
Z80 Assembler version
;; This example shows how to unlock the ASIC ;; ;; This example is designed for CPC+ only and will ;; not work on CPC or KC Compact. ;; ;; This example will compile with the MAXAM assembler ;; or the built-in assembler of WinAPE32. org &8000 ;;-------------------------------------------------- ;; Unlock CPC+ additional features di ld b,&bc ld hl,sequence ld e,17 .seq ld a,(hl) out (c),a inc hl dec e jr nz,seq ei ret ;;---------------------------------------------------------- ;; this is the sequence to unlock the ASIC extra features .sequence defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee
Note: As one may see, the nybbles in the sequence are based on two 4bit shift registers. For one reason or another, Amstrad has patented the verification mechanism (GB2243701A). The patent seems to focus on verifying (rather than on sending) the sequence, so its legal use is a bit unclear.
BASIC version
1000 RESTORE 1010:FOR I=0 TO 16:READ A:OUT &BC00,A:NEXT I:RETURN 1010 DATA 255, 0, 255, 119, 179, 81, 168, 212, 98, 57, 156, 70, 43, 21, 138, 205, 238