Why not a ".TSX" Format for MSX Tapes?

Page 4/13
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9

Par NYYRIKKI

Enlighted (6091)

Portrait de NYYRIKKI

12-06-2014, 12:27

Quote:

Note that I'm not proposing plain .WAV as an alternative for .TZX but _clean_ _compressed_ WAV. That is a WAV file with only two possible values for the signal. So that is indeed a redundant file format (as you say 16 bits instead of 1), but after compression almost all this redundancy disappears! It almost doesn't matter whether you start from a 8-bit or 16-bit, stereo or mono, 8kHz or 44kHz WAV, after compression you end up with WAV.gz files of all about the same size (only a couple of kilobytes difference)!

Of course the WAV file has to be clean for this compression to work so well, and indeed you need to make a tool to clean them. But such a tool is very easy to make, and _MUCH_ easier than a tool to convert WAV to TZX. Existing WAV editors can probably already do the job, but a dedicated tool might be more convenient.

I think clean compressed WAV can be ok enough... But at least we definately need a speacial tool to create them. In theory you can clean WAV in music editor, but that is not easy at all as there are lot of things that need to be done: The DC voltage on the signal needs to be removed with filter, the data need to be cutted & normalized correctly to remove noise. Slow signal transitions & metadata need to be removed and output format need to be selected for best compression ratio.

I didn't mean that TZX could be used like it is for MSX, but some of the ideas could be used to create better alternative to CAS-file. If new file format would include silence information and different IDs for long and short header it would already be much better. If there could be also some way of storing RAW data streams (Pulse sequences) then it would be perfect. I like KISS-principle, but WAV is maybe even a bit too much that way. If you start to compress file like CAS and file like WAV it is still very clear what type of format is more size efficient although WAV compresses better.

Par Manuel

Ascended (19678)

Portrait de Manuel

12-06-2014, 12:36

NYYRIKKI: I think you actually proved my point. Your point is: CAS files can't properly store the original WAV data. That's correct, I agree. But my point was that *iff* the CAS properly represents the WAV data for that particular game, the conversion back to WAV is perfect.

Par NYYRIKKI

Enlighted (6091)

Portrait de NYYRIKKI

12-06-2014, 13:58

I have hard time following your point as CAS-files can't represent WAV data at all.

My point was: If CAS-file represents correctly the data, it is still possible that CAS-file can be loaded (by other than OpenMSX emulator), but WAV-file generated from the CAS-file can NOT be loaded by OpenMSX or real MSX because conversion from CAS -> WAV makes the loading timing sensitive and original timing information is missing.

... or are you trying to say that *iff* converting CAS to WAV happens to be possible in particular game, then OpenMSX does it correctly?

Par Manuel

Ascended (19678)

Portrait de Manuel

12-06-2014, 14:06

Suppose you have a simple csave'ed program. That program can be converted to CAS and converted back to WAV and it will load on all emulators that supports WAV. Correct?
Apparently, in this case, the CAS file correctly represents what was in the original program and thus there is a 'perfect' conversion possible back to WAV. Right?

Par NYYRIKKI

Enlighted (6091)

Portrait de NYYRIKKI

12-06-2014, 14:24

Manuel wrote:

Suppose you have a simple csave'ed program. That program can be converted to CAS and converted back to WAV and it will load on all emulators that supports WAV. Correct?

Yes, this it true for all BASIC programs. When loader is done on ML the story changes.

Quote:

Apparently, in this case, the CAS file correctly represents what was in the original program and thus there is a 'perfect' conversion possible back to WAV. Right?

Right.

My point: Because all working CAS-files can not be converted to working WAV-files doing such a conversion in between is not very good idea.

Par wouter_

Hero (535)

Portrait de wouter_

12-06-2014, 14:31

Manuel: you're saying that for _some_(*) CAS files the conversion is possible (CAS converted to WAV works correctly). NYYRIKKI is saying that it is not the case for _all_ CAS files, and he is right. We didn't think about that when we dropped the patched-CAS-loading-mechanism from openMSX.

(*) However it turns out that in practice _most_ CAS files do work. In fact I'm not aware of any existing counter example.

Par NYYRIKKI

Enlighted (6091)

Portrait de NYYRIKKI

12-06-2014, 16:03

I made a really simple example to demonstrate the problem

Type: RUN"CAS:"

It is kind of reversed effect compared to likely real world problem, but you should get the point.

Par mars2000you

Enlighted (6557)

Portrait de mars2000you

12-06-2014, 16:11

Nice test Smile

No any problem in blueMSX (direct support for CAS files with BIOS patching), but the final sentence is missing with openMSX ...

Par NYYRIKKI

Enlighted (6091)

Portrait de NYYRIKKI

12-06-2014, 16:33

Ah, ok then... Yes, it may have a small timing problem with 50Hz machines... But you got the point anyway. Smile

Edit: Fixed timing a bit...

Par wouter_

Hero (535)

Portrait de wouter_

12-06-2014, 17:00

I had a feeling you were going to create such a thing ;)
Nice job.

Page 4/13
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9