Changes

Jump to: navigation, search

PAL16L8

23 bytes added, 26 June
/* PAL Type Detection */
== PAL I/O port ==
Note that no settings are stored in the Gate Array itself regarding register 3, but (MMR). But the PAL and Gate Array share an I/O port addressso that it appears to be the same chip to the programmer.
Bit14 of the PAL selection address can be at 0 or 1 on CPCs equipped with CRTCs 3, 4.
30 IF PEEK(&4000)=&C7 THEN PRINT"PAL chip absent/inactive":END
40 OUT &3FFF,&C7
50 IF PEEK(&4000)=&C7 THEN PRINT"PAL I/O layout Bit 14IO Bit14=0 PAL Selectselected":GOTO 8060 IF PEEK(&4000)=&C0 THEN ELSE PRINT"PAL I/O layout Bit 14IO Bit14=0 PAL not selected":GOTO 8070 PRINT"Error!"80 60 OUT &7F00,&C0:POKE &C000,&C070 OUT &7F00,&C3:POKE &4000,&C3:OUT &7F00,&C3C090 80 IF PEEK(&4000C000)=&C3 THEN PRINT"Valid RAM mode &C3" ELSE PRINT"Invalid RAM mode &C3"
</pre>
5,801
edits