Looking for a DVD player? I’ll build it with Linux, it’s very easy!

A friend wants an easy way to entertain his son or show him some DVDs. He is 2-3 years old so expectations are low. According to him the best option is to buy this portable DVD player with NES emulation support.

What? That screen is so bad! This to your kid eyes! I’m on it! I have an unused IBM ThinkPad in the basement, I’ll convert it into a Linux-based children’s video player/console in no time! Piece of cake!

First of all, I clean up after years of use: ew. The used masks are great and take away all the accumulated dirt with a few passes.

Then I update the BIOS to the latest version. The new bootlogo that appears at power up is aesthetically uglier, before there was the “vintage” Intel Pentium logo, now it’s modern.

The logo that appeared before (on the left) was very retro and I liked it better.

Well, anyway to see from the changelog a lot of things have changed so I leave it alone. I should have taken some pictures to document it.

Time to choose the operating system. Ten years ago I put Windows 7 but with a Windows XP skin because without Aero support it was aesthetically horrendous. But it was already a problem at the time: it refused to install because the PAE instructions were missing. To install it was quite complex. I absolutely don’t remember which processor it has. I bought it in 2009 in Japan, used, already 5 years old. I remember “Pentium 1.4 Ghz” of maybe 1.6. So it’s probably a Pentium M “Banias”, because the next ones have a numerical name. It doesn’t have 64-bit support. Ubuntu no longer exists at 32 bits. Oops!

Debian still has a 32 bit distribution! I take a 32 gb USB stick and flash on it the offline debian installation dvd, 4 gb. It won’t start. After 30 minutes or so, what if 32gb is too big? It’s too big. At the time, a 32 GB pendrive was pure science fiction. I flash the CD version of Debian in an old 1GB pen.

But you need the Internet to install properly. This computer does not have Wi-Fi. I have to get an Ethernet cable and connect it directly to the router.

In the meantime I try to see the status of the battery. According to Windows it is 255% charged, a sign that something is wrong (I should have taken a picture…). The battery of the internal clock is already gone and will have to be replaced, who knows the status of main one. I want to measure how long it lasts. I load the Debian setup, unplug it and start the stopwatch. Incredibly, it lasts over 40 minutes… and my phone memory is full! I stop the recording, I’ll try later on to see how long the gameplay lasts.

After finding the Ethernet cable, it’s time to start the installation. I’m really curious to see how the games above will run. At the time I bought this computer based solely on one parameter: price. I had assumed that this was a Pentium 4 Mobile, instead it is a “Pentium M”. The Pentium M, we read on Wikipedia, is not a low-power version of Pentium 4, but an evolution of Pentium 3, almost a Pentium 2. I’m a little demoralized. I thought I had a bomb, but I have a wreck. At this point I don’t even know if he’s got a DVD player instead of a CD! Anyway, it’s extremely quiet. Doubtful. Isn’t the fan probably broken?

The fan’s broken. Now it doesn’t turn on anymore, it says “Fan error” when it turns on. But it only takes a couple of knocks to start it up again. I’ll have to take it all apart and clean it up.

I do the basic installation, without including anything, just command-line tools. Once finished, I login, and type the first command:

sudo apt install xorg mednafen retroarch

I’m being offered an avalanche of packages, the installation will be long.

I type startx and then retroarch

The sadness. Just the user interface of Retroarch runs at 5 FPS, really in slow motion…

I’ll try installing Firefox and VLC to see how YouTube goes:

sudo apt install firefox-esr vlc

After a startx and then firefox the result is that even at 360p it’s too slow.

The audio is not installed, the guides are not clear and contradict each other. I go with a (definitely not correct)

sudo apt install pulseaudio alsa-tools alsa-utils alsaplayer-text alsaplayer-daemon alsaplayer-oss

After a reboot (faster to figure out how to restart the pulseaudio or alsa server) the audio works!

I’ll try a DVD, it looks like I have a DVD reader, thank goodness! Pirated DVDs work, but original ones don’t. You have to load the css libraries to read them.

While I’m trying to find out how to remove copy protection from the DVDs I’ve regularly purchased, I install Dosbox, SCUMMVM, Gcompris (great opensource preschool game).

I can’t install libcss, the library to read the original DVDs. I give up, anyway the child who will use this system will not be given them (for fear that it will ruin them, being too young)

I enable automatic login on the basis of this guide.

sudo nano /etc/systemd/logind.conf

change #NAutoVTs=6 to NAutoVTs=1, then:

sudo systemctl edit getty@tty1

(which creates a file in /etc/systemd/system/[email protected]/ called override.conf )

Then you paste this:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux

enable and restart:

systemctl enable [email protected]
reboot

I install thunar (a kind of “file explorer”) to have the possibility to manage files with a graphical interface

sudo apt install thunar

Retroarch is so slow even with the rgui interface (the raw, DOS-style one) that it is totally unusable. It’s time to download some milestones of emulation.

sudo apt install zsnes pcsxr gngb nestopia

PCSX can’t decently emulate even Ridge Racer, even at the lowest resolution.

Mednafen sees the joypad inside Mednaffe (the configuration utility) and allows you to assign buttons, but then during the game it doesn’t see it. And then it doesn’t support Super Game Boy emulation.

Nestopia emulates Super Mario Bros. in slow motion as well.

GNgb works fine…. after losing half an hour for configuration exclusively via command line, it has glitches that make many games unplayable.

ZSNES works perfectly! Exactly as I remembered when 20 years ago I used it on a PC much less powerful than this one. Even in full screen and with filters!

Regarding video playback.

VLC is choppy with any kind of video, whether it’s a HD h264 or a 20-year-old crappy quality DiVX.

Mplayer (a version abandoned years ago) instead can play any video, even HD and h264, very smoothly.

So, I think this is the cause: the updated versions of emulators and media players use too many resources, I need obsolete versions to use this PC. Stuff like Visual Boy Advance, Bleem, Media Player Classic 6.4.

For Windows these ancient versions are easily found, for Linux it’s too hard. I lost an afternoon for nothing: it’s time to format everything and put Windows XP. I will then find a way to make it childproof

In the meantime, however, my friend is leaning more and more towards the 65 euro DVD player, there you just have to put the disc and press play…. but it’s less versatile! 😉

Go back to the 80s

Reading the “historical” articles on Filfre.net and watching the Halt and Catch fire TV series, I got hit by nostalgia, from when I was playing with my AMD 386 DX, still in service until the end of the 90s.

So, I immediately downloaded PCem and 86box, searching for the BIOS ROMs of my old PCs. I got a lot of problems, but I will talk about that another time. Then I found IBMulator and I immediately reminded my friend and his old PS/1. Even if when it was introduced (1990) was already incredibly outdated (a 286 CPU when you could buy a PC with a 486… of course with a much higher price), I was impressed because of its “simplified” OS, very fast to load.

In a few minutes, I found all the files on https://ps1stuff.wordpress.com/download/downloads-for-type-2011/ (even n my language!!!) and I immediately did a manual restore on the empty virtual disk (if you bought a new system at the time, this was already done in the factory, you just needed to turn it on)

This emulator is awesome, it simulates all the disk and floppy noises, and also the CRT screen. But it also simulates the fan noise, that at the time was very noisy 😅

I got some initial problem to let it load the OS from the floppy. That error “press F1” at the start, means something changed in the system, for example, more memory, or a new hard drive, you need to confirm by running the “configuration” program.

In total, I took about 15 minutes, to copy 5 megabytes from 4 floppy disks… so slow! I forgot this part!

What does “root” means?

In computer terms, with root we can mean:

  • Root as user
  • Root as in file path

If we mean root as an user, we mean the main user, the one with the “master” control of the machine. For example, if you have root on Android, it means you can do whatever you want it it.

If you mean root as a file path, it’s the base, just place the file outside any folder. If you’re using the D: drive, by saying “place the file in root”, it means just place it on D:

How to convert a VM from VirtualBox to KVM

Converting the virtual machine images is very easy, but many guides suggest you to convert  from VDI to RAW and then from RAW to QCOW2. It doesn’t really make sense, you’ll waste double the time, and it’s gonna be hours if the drive is big.

To convert from VDI to QCOW2 just use qemu-img:

qemu-img convert -f vdi -O qcow2 [VBOX-IMAGE.vdi] [KVM-IMAGE.qcow2]

If the virtual machine was Windows-based, probably will crash at first boot, because of the virtual hardware changes, and because there are no virtio drivers installed (unless you make a VM with IDE emulation)

For fix the BSOD at boot you can do onf of this:

Personally I chose the first option, but then I had to install again hundreds and hundreds of security updates, it would have been better if I installed the patch before migrating.

Update: I noticed that the converted Windows XP VM uses the cpu at 100% even when idle. This is a nasty bug that would take ages to fix. I tried to force enabling ACPI, but all I can get is a BSOD on boot. I’ll just scratch the VM and rebuild it…

How to do a quick CPU benchmark on Linux

With Enki (a Brain Training app for coders – if you want to try iy, and you need an invite, you can my code: MAGNE985) I found a quick benchmark to for Linux, to see the speed of a CPU core.
dd if=/dev/zero bs=1M count=1024 | md5sum
This line tells the CPU to calculate an md5 hash for an 1gb of “zeroes” and measure how long it takes. For example, on the Pentium G3420 that I have in my office I get this:
dd if=/dev/zero bs=1M count=1024 | md5sum
1073741824 byte (1,1 GB) copiati, 2,10036 s, 511 MB/s dd if=/dev/zero bs=10M count=2048 | md5sum
21474836480 byte (21 GB) copiati, 49,0278 s, 438 MB/s
while on an Intel Xeon W3520 (my web server) I get this:
dd if=/dev/zero bs=1M count=1024 | md5sum
1073741824 bytes (1.1 GB) copied, 2.79137 s, 385 MB/s

dd if=/dev/zero bs=10M count=2048 | md5sum
21474836480 bytes (21 GB) copied, 56.9042 s, 377 MB/s
Hey! It takes 10 seconds more! What? An expensive Xeon is slower than a cheaper Pentium????
Yes, the server is outdated, but I did not expect to have such a difference! It is time to change my web server!
confronto-xeon

How to solve the Adobe Shared Technologies failed install problem

I wanted to try the Photoshop Elements demo (it’s on sale for cyber monday for just $40!), but it wasn’t working.

Searching on the Internet, it looks like it’s a common problem to have an error like those:

 “The wizard was interrupted before Adobe Photoshop Elements could be installed. Below mentioned application has failed to install: Shared Technologies.”

“The Adobe Premiere Elements installation wizard was interrupted while installing Shared Technologies.”

“The installation process has encountered an error while installing Shared Technologies.”

Why? The reason is simple, but it’s not explained by the error message.

The installer does not run correctly if it has more than 255 characters in the file path.

This is because, usually, the setup is run from d:\setup.exe , and a few people gets the error.

Instead, when you download a demo from the Internet, you can run it from a long path, as this:

c:\users\myusername\download\programms\demo\image-editing\photoshop\setup\unzipped\setup\setup.exe

The file path it’s too long, and it doesn’t work.

So, if you get this error while installing Adobe Shared Technologies, move the setup in another folder, for example c:\temp

Photoshop can’t save file – disk full

Sunday I upgraded my Windows Home server with a new 2TB hdd, because it was becoming full.

Then, I saved an image in Photoshop 7, and i get an error “Disk full”

What?? The server has more than 1.3 TB free!

I search for a solution from Adobe and I find:

“Adobe recommends that you not save directly to servers, because writing directly to servers adds a level of complexity to the function of saving.”

Oh, great! They won’t fix the bug!

It happens that Photoshop has a known bug from year 2002 that won’t save a file in a disk that has more than 1 TB free!

How to fix the problem? Unfortunately, the only way is to create an huge garbage file to have less than 1 TB free.

How to create an huge garbage file in a short time? It’s very easy, using the command prompt! 👍

First open the command prompt with administrative privileges (On Vista and Windows 7, select “run as administrator”, on XP and below, just run it)

Then, write:

net use z: \\server\yoursharename

The share will be temporarily connected as z:, and going in z: and writing dir this comes out:

Z:\>dir
Directory Z:\

17/01/2011  19:31    <DIR>          .
17/01/2011  19:31    <DIR>          ..

0 File              0 byte
0 Directory  1.282.964.344.832 byte available

We must have less than 1000 billions of bytes available to have Photoshop working on this drive, so we have to create a file that has a size of at least 283 billions of bytes.

For creating an huge file in seconds, we use fsutil, that has this syntax:

Z:\>fsutil file createnew file.name 12000

Where 12000 is the size in bytes

I wrote this è:

Z:\>fsutil file createnew photoshop.bug 290000000000
The file Z:\photoshop.bug has been created
Z:\>dir
Directory Z:\

24/05/2011  10:59    <DIR>          .
24/05/2011  10:59    <DIR>          ..
24/05/2011  10:59   290.000.000.000 photoshop.bug
1 File 290.000.000.000 byte
0 Directory  992.930.263.040 byte available

After that, Photoshop 7 allowed to save files in that location 😉

The best video converter EVER!

SUPER is an awesome video converter. It can convert any kind of video without problems. Even rare containers like *.NSV, *.STR, *.VIV!

It can produce any video format:

super1

Once chosen the video container format, we choose the video codec, the audio codec, the video resolution, the framerate, the bitrate, and presto! In just a few minutes, it converts ANYTHING!

super2

SUPER (acronym of “Simplified Universal Player Encoder & Renderer”), can be downloaded from the official Website, but, that Website is a kind of a mess, so you can download it from here (version updated to April 2009).

Update 18th august 2016: their latest installer contains adware. Be careful and read carefully what are you agreeing to, don’t install toolbars and other useless and deceiving adware.