I tried backing up MSX programs from cassette tape on Ubuntu

I protected the cassette tape containing the game program of the MSX software "Mystery House" at a used game store, so I tried to salvage the data inside.

The appearance of the cassette tape. It is a wonderful dish that traps the air of the early days of the game industry. IMG_20201115_112853079.jpg

please note

What to prepare

Connect the earphone of the radio cassette player and the microphone jack of the PC with an audio cable

Launch Audacity

Set sampling frequency to 44100

48000 seems to be fine audamenu3.jpg

Record

Start recording in Audacity

Start playing with radio cassette player

Take a look at the waveform

Use the CTRL + wheel to zoom in on the display to see the audio waveform. It's a so-called square wave. Screenshot from 2020-11-19 21-01-29.png On the other hand, another tape contained a sine wave-like waveform. Screenshot from 2020-11-19 21-05-06.png

Think about volume

In the case of a square wave, it seems that there is no problem even if the waveform swings up and down a little, but for a sine wave, it seems better to adjust the volume so that the apex of the mountain valley does not swing off. Let's record several times while adjusting the volume. If you can record nicely, select 16bit PCM from this menu. audamenu.jpg

Save to file

File> Export> Export as WAV audamenu2.jpg MSXCastools

Wine installation

MSXCastools is originally software for Windows and cannot be started by general methods. Therefore, here, install the compatibility layer "Wine (https://ja.wikipedia.org/wiki/Wine)" that can start software for Windows on Linux. sudo apt-get install wine

Launch MSXCastools

Start the command line, move to the MSXCastools folder, and start it with the following command. wine MSXcastoolsUI.exe Screenshot from 2020-11-19 21-20-37.png

Open WAV file

If you drag the Wav file you saved earlier to the part where "Drag file here" is written, the main screen will be displayed. Screenshot from 2020-11-19 23-22-41.png

tuning

Both check boxes at the top of the window are ON for the time being Click the button labeled "Push Here to canvert to cas" to save the cas format file. Adjust the three knobs and save several times until the file size is maximized.

Take a peek at the file

Start the console and change to the directory where the cas file is saved. Let's display the inside of the file with the hexdump command. (Sudo apt-get install hexdump if not installed)

hexdump -C ./MisteryHouse.cas

I can see what seems to be a command used in the game. It seems that the data was successfully retrieved. Screenshot from 2020-11-19 21-33-55.png

Try starting with emulation.

There are various MSX emulators, but for the time being, the WEB version of https://webmsx.org/ is convenient.

File loading

Select Load tape image from the icon at the bottom and select the cas file you created.

Screenshot_2020-11-19 WebMSX - The online MSX emulator.png cload When you enter the command "cload" to read data from the cassette and press the enter key, it seems that it was read successfully. Screenshot_2020-11-19 WebMSX - The online MSX emulator(1).png run! To run the loaded program, type run and press Enter or F5. Ah! Screenshot_2020-11-19 WebMSX - The online MSX emulator(2).png

It has started! It's a success!

afterwards

However, the additional load after the title screen was not successful. Looking back at the original audio data after a lot of trial and error ...

Hmmm, it seems that the tape has deteriorated and some parts of the signal are incomplete. Screenshot from 2020-11-19 21-47-30.png

However, I'm lucky to be able to extract some data from media that is more than 30 years old. If you still have the cassette tape of that time, please try it once before the playback method disappears.

See you soon! Screenshot_2020-11-19 WebMSX - The online MSX emulator(2).png

Recommended Posts

I tried backing up MSX programs from cassette tape on Ubuntu
I tried using YOLO v4 on Ubuntu and ROS
I tried node-jt400 (Programs)
Set up ansible-playbook on Ubuntu 20.04
I tried installing CentOS 8 on ESXi 6.7