nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
179 stars 14 forks source link

wrong character as a result of .seq export & import #158

Closed nurpax closed 5 years ago

nurpax commented 5 years ago

If I export @manuelvio 's King image as .seq and then import it back, some characters change.

Here are the screenshots. Note the appearance of "pi" characters in the left eye.

Any ideas @sixofdloc or @manuelvio?

Original:

image

Export/imported:

image

sixofdloc commented 5 years ago

It traces back to a bug in https://github.com/sixofdloc/PETSCII2SEQ/blob/master/petout.c There are a few exceptions it needs, line 130 should add 0x40, not 0x80, I believe. I'll have to manually test every possible char. The one at the bottom middle of the image I caught earlier this week , that's 0x5f not being converted, when it needs to be 0xdf.

nurpax commented 5 years ago

I guess one could have an automated test that generates all possible screen code combinations, converts to seq and imports the seq and checks that the two match?

manuelvio commented 5 years ago

Good catch. Definitely +1 for the automated test, I'll check the chars too and send a PR.