Bug at 2400 bauds saving speed ?

Page 1/2
| 2

By Jer86

Supporter (5)

Jer86's picture

13-05-2023, 16:25

Hi All,

I'm new here and my first attempt to post was not successful apparently !

Nevertheless, I would like to expose you the strange behavior that I recently discovered in OpenMSX 18.
When saving to wav at 1200 bauds and after reloading, no problem occurs whatever the file types (BASIC, ASCII, Binary...)
However, when saving speed is set to 2400 bauds, the data are completely corrupted after load... except in ASCII mode, which works fine at 2400 bauds !
Even though no I/O error occurs, a simple 1 instruction BASIC program (like 10 PRINT"HELLO") is listed as garbage after CLOAD.
To investigate a little bit, I opened the 1200 and 2400 bauds versions of the 2 wav files of the same program. After adjusting the playback rates so that the 2 lengths of encoded data portions matched, I realized that even if the beginnings and ends were identical and in phase, there was a sensible shift (several bit cycles) in the middle!
That seems to show that 2400 baud rate is not constant and "oscillate" during saving in comparison with 1200 bauds rate.
And of course, "normal" 2400 bauds files (audio dumps or wav generated from archive) are loaded perfectly.

Is this bug reproducible by other users ?

Thanks

Login or register to post comments

By cjs

Expert (110)

cjs's picture

14-05-2023, 06:26

How did you switch an MSX machine between 1200 and 2400 baud? I looked around the wiki and the 'net but didn't find any obvious answers. (This is something that could be added to the Wiki, which mentions (on that and other pages) the two speeds, but doesn't mention how to change them.

By Jipe

Paragon (1614)

Jipe's picture

14-05-2023, 08:00

Wiki
CSAVE "Filename",BaudRate
Parameters
Filename is the specific name of the BASIC program to be saved in tokenized mode. The format of file name is case sensitive and limited to 6 characters without extension. "Filename" can be replaced by a alphanumeric variable containing the name.
BaudRate specifies the baud rate at which the program should be saved, which can be either 1 (1200 baud) or 2 (2400 baud). Default value is 1. Do not put the comma if this parameter is omitted

By Jipe

Paragon (1614)

Jipe's picture

14-05-2023, 08:05

other way Wink
https://www.msx.org/wiki/SCREEN
cassettesspeed = BaudRate

By cjs

Expert (110)

cjs's picture

14-05-2023, 08:52

Doh! I actually wrote this down myself in my personal notes on Oct. 30 last year, and had already forgotten about it.

Thanks for the helpful replies.

By sdsnatcher73

Prophet (3961)

sdsnatcher73's picture

14-05-2023, 10:48

So please report the issue on https://github.com/openMSX/openMSX/issues and upload any wavs as evidence.

By Manuel

Ascended (19469)

Manuel's picture

14-05-2023, 14:25

Yes, I'd like to know what exactly you did, on which MSX machine and which commands you used to switch baudrate. Then we can investigate.

I just tested it as follows on a Philips NMS 8250:
- openMSX: cassetteplayer new 1200.wav
- BASIC: 10 PRINT"Hello World!": GOTO 10
- BASIC: CSAVE"1200"
- openMSX: cassetteplayer rewind
- BASIC: CLOAD?
- openMSX: cassetteplayer new 2400.wav
- BASIC: CSAVE"2400",2
- openMSX: cassetteplayer rewind
- BASIC: CLOAD?
- openMSX: emulate a Toshiba HX-10 and cassetteplayer 2400.wav
- BASIC: CLOAD
- check program. Looks fine.
I didn't find any problem.

By Jer86

Supporter (5)

Jer86's picture

14-05-2023, 15:29

I tested on Canon V-20 and NMS 8250, same problem.
I switched cassette rate with screen,,,1 or screen,,,2, and used the CSAVE, SAVE"cas:" or BSAVE"CAS:" commands
Rather than manipulate wav with openMSX, I used catapult and CLOAD? leads to "Verify error" !
I just tested with your set of commands, same problem.

On the advice of SDSnatcher I opened an issue on github with wav files samples to investigate.

By Jer86

Supporter (5)

Jer86's picture

14-05-2023, 16:10

I just installed openMSX 18 (freshly downloaded from the official site) on another PC with a different hardware configuration and another OS (windows 10 instead of Windows 7), which had "never seen" openMSX.
Same problem, and I realized that the content of the corrupted 2400 bauds basic file can differ from time to time after saving !

By Manuel

Ascended (19469)

Manuel's picture

14-05-2023, 16:17

Can you try the latest development build?

By Jer86

Supporter (5)

Jer86's picture

14-05-2023, 16:31

I will try...

Page 1/2
| 2