AMNS / Nightingale

Nightingale music notation software.
Mozilla Public License 2.0
11 stars 3 forks source link

Nightingale for Intel CPUs: problems opening files #172

Closed donbyrd closed 3 years ago

donbyrd commented 6 years ago

Trying to open an existing Ngale file on Intel CPUs gives a series of strange error messages and, on Don's MacBook Air, crashes or at best displays just the background image; on his old white MacBook, it hangs. This is probably Endian-related.

donbyrd commented 6 years ago

The problem is much nastier than I thought because Ngale files contain lots of bitfields. The behavior of bitfield I/O across platforms is not well-defined, and in fact reading the bitfield I've been testing with -- <firstMNNumber> -- on an Intel processor gives totally bizarre results. It's clearly picking bits from the short that includes <firstMNNumber> in a weird way, not just swapping the bytes. By far the most reasonable solution I can think of: a new file format, format "N106", that doesn't use bitfields at all!

donbyrd commented 3 years ago

This problem has been fixed gradually over the last year or so with the development of file format "N106" which doesn't use bitfields. Ngale for Intel processors still doesn't, and very likely never will, open "N105" format files, so, for use on Intel Macs, they must be converted on a machine running PowerPC Ngale (either a real PowerPC or one with the Rosetta PowerPC emulator). To my knowledge, recent builds of Intel Ngale can open any N106-format file; however, the N106 format is not yet settled and almost certain to change, so Intel Ngale will need to be rebuilt.