Menu

#51 RGB linearity error on decoding Japanese multi-platform formats

None
closed-fixed
5
2024-04-30
2019-10-03
SD Snatcher
No

There's a catch when recovering palette values from the Japanese multi-platform image files: only the number of bits/channel supported by the target platform must be decoded, because most encoders will set the unused the lower bits to zero.

If the palette is just read as pure 8bit/channel, the RGB linearity will be affected and the max value per (R,G,B) channel won't be 255. Intermediary values will all be squeezed too.

This means that, for each platform, this is the number of higher palette bits to be decoded:

  • MSX2: R:3,G:3,B:3
  • PC-98: R:4,G:4,B:4
  • PC-88 analog (aka "PC88 V2"): R:4, G:4, B:4
  • PC-88VA: R:5,G:6,B:5
  • X68000: R:5,G:6,B:5, but the 6th bit of the G must be copied as a 6th bit for R and B too
  • FM-Towns: R:5,G:5,B:5
  • Mac: R:8,G:8,B:8
  • PC98SA: R:8,G:8,B:8

I attached here a reference .SC5 file, and the same image converted to MAG/Pi/PIC using different converters. This way you can compare how off RECOIL decodes the palette from the reference SC5 file. It's an MSX2 file, but all platforms are affected similarly.

1 Attachments

Discussion

  • SD Snatcher

    SD Snatcher - 2019-10-03

    Here are some more files, created with a different encoder that has a different palette scaling.

     
  • SD Snatcher

    SD Snatcher - 2023-12-17

    PC-98: R:4,G:4,B:4

    I forgot to mention that this is only for the 16-color mode of the PC-98.

     
  • SD Snatcher

    SD Snatcher - 2024-04-29

    Could you please take a look at this issue? I've noticed that some Japanese users are confused with the incorrect colors...

     
  • Piotr Fusik

    Piotr Fusik - 2024-04-30
    • status: open --> closed-fixed
    • assigned_to: Piotr Fusik
    • Group: -->
     
  • Piotr Fusik

    Piotr Fusik - 2024-04-30

    Please test at https://recoil.sourceforge.net/web.html

    RECOIL doesn't know "PC98SA". Do you have sample files for it?

     

Log in to post a comment.