Cold Water

Reviving a Sony CDP-991

Let's do a hardware related project for a change. A few days ago, I found my good old CD player from the time when I was in my early twenties. It's a CDP-991. Sony has produced them around 1991.

I still remember when I was in a HiFi store and gave the CDP-991 a try. I brought my "horror CD" with me. It had a few deep scratches from a careless handling of mine. My old CD player at home could play track 1 with a lot of skipping, and capitulated on the next tracks. I wondered how the CDP-991 would play it. Maybe it would play track 1 with almost no skips, and even a bit of the next tracks? I was flabbergasted when the player was totally unimpressed of the scratches, and just flawlessly played all the tracks. I bought the CDP-991 on the spot. 😁

It was the component of my HiFi equipment that I was most proud of. And even many years later - in the times of mp3 players, smartphones, and streaming - I never had the guts to throw it away. It sat in a cardboard box, buried in a storage room, patiently waiting for me to rediscover it. Now is the time...

Today I have turned on my good old CD player for the first time after maybe 15 years, and it just started up. I was happy to see the display light up again.

However, 27 years surely left its marks on the device. Let's find out how bad the damage is.

First Problem: Amnesia

Feed me! The CDP-991 is equipped with a feature Sony calls "custom file". The player is able to recognize up to 185 discs. One could set the CD title, delete boring tracks, and store individual index marks. One could even customize the "NO DISC" text. I have changed it to "-FEED ME-" back in the old days, as a reference to Audrey II from the musical Little Shop of Horrors.

This custom text was gone now, and the player greeted me with the standard "NO DISC" again.

I wasn't too much surprised of that. Today we are used to store large amounts of data on SD cards, which retain them for tens of years without power. At the time the player was built, EEPROMs were the only non-volatile memories on the market. They could barely store a few bytes, far from 185 disc titles. For those amounts of data, it was more common to use static RAM and a backup battery.

I expected that the battery was empty and due for a replacement. Even worse, leaking battery acid could have damaged the PCB. I opened the case and looked for a backup battery, but found none. So I hoped to obtain a circuit diagram and find out more about how the player stores its data. After just a few minutes, I found the official service manual as downloadable PDF in an excellent quality. The internet is awesome!

The manual had good news for me. Instead of a battery, Sony has used a 0.1F capacitor, which is able to retain data in the static RAM for about a month without AC power. It ran out of energy long ago, but all I had to do was to reconnect the player to the mains to charge it again.

Of course, the first thing I did was changing the "NO DISC" text back to "-FEED ME-".

The first problem is fixed. Next step: Open the tray.

An Arduino TV Simulator

SimTV: Arduino Uno and RGB shield A simple method to keep burglars away from your home is a TV simulator. It's basically a device with some bright RGB LEDs showing color patterns that resemble those of a telly turned on. They are sold at many electronic retailers. However, some customer reviews say that the color patterns do not look very realistic, with some distinctive flashes and colors that are usually not to be seen on a regular movie. Besides that, the color patterns often repeat after about half an hour.

Actually, distinctive color patterns that repeat after a short time, are a major disadvantage. Experienced burglars might recognize the color patterns and figure out it's a TV simulator. This would rather be an invitation than a deterrent.

So, let's build a better TV simulator ourselves. It's also more fun than buying something ready.

Read this article...
Back again...

After a GDPR hiatus, the shredzone is back!

I used the time for a total redesign and a cleanup. The design is now responsive, so you can enjoy the articles on the big screen as well as on your smartphone. I have removed all the unnecessary stuff that were modern in blogs 10 years ago, but actually just cluttered the screen (like the calendar and the tag cloud).

There are a few bugs left and some features missing. I will take care of them in the next couple of weeks.

Anyhow, I hope you like the new design!

By the way: The shredzone turns 20 this year. Congratulations! 🎂

Wednesday, July 11, 2018
Errors in GitLab SonarQube plugin

The sonar-gitlab-plugin is an useful plugin to connect SonarQube with GitLab. After pushing, the branch is inspected by SonarQube, and code smells are immediately commented in the commit.

Unfortunately, the error messages of that plugin are a little difficult to understand. It took me a while to collect this little cookbook of error fixes.

  • Unable found project for null project name
    In SonarQube, as Administrator, select the project. Then in Administration ⭢ General Settings ⭢ GitLab, enter the project ID of your project and save it. The project ID is the group name in GitLab, followed by a slash and the name of the project, e.g. shred/timemachine.

  • Unable found project for mygroup/myproject
    In SonarQube, check that the project ID is correct and there are no spelling mistakes. In GitLab, make sure that SonarQube's GitLab user is actually a member of the project, and that the user has Developer rights. I hit a strange bug in GitLab here. The SonarQube user was a member of the project, but still this error occured. When logging in as the SonarQube user, the project was not on the roll of projects. Removing and adding Developer rights to the user didn't help. The only thing that finally worked was to add the SonarQube user to a different project, even if just for a moment. It seems to be a caching problem in GitLab.

  • Multiple found projects for mygroup/myproject
    You should never see this error, but if you do, be more specific with the projectID.

Recovering old ZX Spectrum tapes, Part 2

The ZX Spectrum was a comparable cheap home computer, and thus the tape loading and saving mechanisms have not been very sophisticated. The tape recording is just a stream of short waves (0 bit) and long waves (1 bit). The stream starts with a leader signal (a series of even longer waves) and a single sync pulse. So, in the theory, reading a tape recording means measuring single wave lengths, by taking the time between two zero-crossings, and converting them into a sequence of bytes.

But then again, we are dealing with 1980's analog technique. In practice, we will find signals like this. A click produced an additional zero-crossing that is to be ignored. Also, the amplitudes and DC offsets change all the time.

And pooof... There went another week of nightly hacking Python code, having very close looks at audio waves, and searching for clues about why tzxwav won't behave like I expect it to behave. But I think the result is worth looking at now! tzxwav now reads almost all of my tape samples without those dreaded CRC errors. If there are CRC errors, the sample was usually so damaged that it would need manual restauration.

And as a bonus, it is now almost twice as slow as before. 🤭 But speed was never a goal anyway, as people are likely to convert their old tapes only once.