[Coco] Strange results reading the palette registers on Coco3

William Astle lost at l-w.ca
Mon Dec 5 00:40:35 EST 2011


Only the bottom 6 bits of value read from the palette registers is 
valid. The top two bits will be somewhat random.

Also, LPEEK and LPOKE are not doing what you think they are doing. You 
need to be using PEEK and POKE.

On 11-12-04 09:08 PM, Robert Gault wrote:
> Has anyone seen this on their own systems?
> Coco3 with or without MPI, with or without disk controller
> POKE&HFFB0,0:PRINT PEEK(&HFFB0)
> result is $40
> POKE&HFFB0,255:PRINT PEEK(&HFFB0)
> result is $7F
>
> However if memory is read with an ml program, the result is different.
>
> START CLRA
> STA $FFB0
> LDB $FFB0
> LDA #255
> STA $FFB0
> LDA $FFB0
> STD DATA
> RTS
> DATA RMB 2
> END START
>
> If the above is run with appropriate values for DATA and from Basic you:
> PRINT PEEK(DATA), PEEK(DATA+1)
> the result is $3F and 0.
>
> Just to confuse matters more:
> LPOKE&HFFB0,0:PRINT LPEEK(&HFFB0)
> result is 0
> LPOKE&HFFB0,255:LPEEK(&HFFB0)
> result is 255
>
> No matter how you look at this, something is very wrong.
>
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list