Commodore 64 PETSCII code to screen code conversion

(extended)
PETSCII code
(dec, hex)
Change
(dec, hex)
Screen code
(dec, hex)
0-31$00-$1F+128$80128-159$80-$9F
32-63$20-$3F0$0032-63$20-$3F
64-95$40-$5F-64$C00-31$00-$1F
96-127$60-$7F+64$40160-191$A0-$BF
128-159$80-$9F+64$40192-223$C0-$DF
160-191$A0-$BF-64$C096-127$60-$7F
192-223$C0-$DF-128$8064-95$40-$5F
224-255$E0-$FF0$00224-255$E0-$FF

Notes:

  1. This suggested conversion table is theoritical, created for the sake of a bijective conversion. It has never been actually implemented by Commodore.