Commodore 64 screen code to PETSCII code conversion

(extended)
Screen code
(dec, hex)
Change
(dec, hex)
PETSCII code
(dec, hex)
0-31$00-$1F+64$4064-95$40-$5F
32-63$20-$3F0$0032-63$20-$3F
64-93$40-$5F+128$80192-223$C0-$DF
96-127$60-$7F+64$40160-191$A0-$BF
128-159$80-$9F-128$800-31$00-$1F
160-191$A0-$BF-64$C096-127$60-$7F
192-223$C0-$DF-64$C0128-159$80-$9F
224-254$E0-$FE0$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.