Alexander Gromnitsky's Blog

Batocera 35 and Vontar X3

Air Date:
Latest update:

In the dining room there is an old (2013) 1080p telly with an old (2020) Android TV box connected to it. The TV box contains an ancient Amlogic S905X3 SoC inside. It has just enough power to play Youtube & 1080p movies from a network drive but not much else.

Some time ago I heard about repurposing this particular model (Vontar X3) as a retro-gaming console, but anticipating battles similar to those with openwrt-on-outers--where 2 devices with the exact same name have slightly different hardware revisions (& as a result, nothing works as expected)--I've been putting off the adventure.

The easiest Linux gaming distro to deploy is a French one called Batocera.1 Its wiki describes perfomance of a particular device in terms of console generation support:

Gén Consoles
3 NES
4 SNES, Sega Mega Drive
5 PlayStation (psx), PlayStation Portable (psp)

(I've skipped the irrelevant generations.)

In my tests, while the modest S905X3 runs most psx & psp games acceptably, some titles have such a perceived frame drop (that do not occur on a desktop PC running the same emulator as Batocera) that it makes them unplayable. The prominent unsuccessful examples are CTR: Crash Team Racing (psx) and MotorStorm: Arctic Edge (psp).

The last Batocera version for the Vontar X3 is 35 (the OS images for this device haven't been updated since '22). I dd'ed batocera-s905gen3-tvbox-gen3-35-20220910.img onto a 32GB SD card, inserted the card into the TV box, pressed its reset button with a toothpick, plugged in the power cable, & saw this:

The TV's info popups indicated that the resolution of this shaky image was 1080i (interlaced?) instead of the expected 1080p. I then tried 2 completely different (albeit much newer) TVs, as well as a capture card--none of them had any problems negotiating a proper resolution with Batocera.

After pointlessly suffering with various kernel parameters, I ended up with the following kludge to disable the interlaced mode:

  1. Connect the device to your LAN via the ethernet port. Batocera runs Avahi, hence we can just say

     $ ssh root@batocera.local
    

    (The password is 'linux'.)

  2. Run

     # batocera-resolution listModes | head -10
     max-1920x1080:maximum 1920x1080
     max-640x480:maximum 640x480
     0.0.1920x1080.60:HDMIA 1920x1080 60Hz (1920x1080i)
     0.1.1920x1080.60:HDMIA 1920x1080 60Hz (1920x1080)
     0.2.1920x1080.60:HDMIA 1920x1080 60Hz (1920x1080)
     0.3.1920x1080.60:HDMIA 1920x1080 60Hz (1920x1080i)
     0.4.1920x1080.50:HDMIA 1920x1080 50Hz (1920x1080)
     0.5.1920x1080.50:HDMIA 1920x1080 50Hz (1920x1080i)
     0.6.1920x1080.24:HDMIA 1920x1080 24Hz (1920x1080)
     0.7.1920x1080.24:HDMIA 1920x1080 24Hz (1920x1080)
    

    inside Batocera. Take a note of a mode you'd like to see.

  3. Turn the device off. Extract the SD card out of it & insert it into a PC. The card has 2 partition: the 1st one is fat32 that has batocera-boot.conf file. Add a line to it:

     es.resolution=0.1.1920x1080.60
    

The picture will still incessantly jerk from left to right, but only during the boot phase:

# batocera-info
Disk format: ext4
Temperature: 66°C
Architecture: tvbox-gen3
Model: Shenzhen Haochuangyi Technology Co., Ltd H96 Max
System: Linux 5.10.134
Available memory: 624/932 MB
Cpu model: ARMv8 Processor rev 0 (v8l)
Cpu number: 4
Cpu max frequency: 1908 MHz

There is little to add here. You copy your .nes/.sfc/.chd/.iso files to /userdata/roms/{nes,snes,psx,psp} either directly onto the 2nd partition of the SD card, or via ssh, or even smb, for Batocera runs Samba.


  1. I couldn't find any guidance on how to pronouce it: there is a type of beetles called /bə'tosərə/, but some youtubers say it as /bαto'sɛrα/.

Tags: untagged
Authors: ag

Sea-sickness

Air Date:
Latest update:

'[1852] In the regiment there was a Lieutenant Slaughter who was very liable to sea-sickness. It almost made him sick to see the wave of a table-cloth when the servants were spreading it.

'Soon after his graduation, Slaughter was ordered to California and took passage by a sailing vessel going around Cape Horn. The vessel was seven months making the voyage, and Slaughter was sick every moment of the time, never more so than while lying at anchor after reaching his place of destination.

'On landing in California he found orders which had come by the Isthmus, notifying him of a mistake in his assignment; he should have been ordered to the northern lakes. He started back by the Isthmus route and was sick all the way. But when he arrived at the East he was again ordered to California, this time definitely, and at this date was making his third trip. He was as sick as ever, and had been so for more than a month while lying at anchor in the bay.

'I remember him well, seated with his elbows on the table in front of him, his chin between his hands, and looking the picture of despair. At last he broke out, "I wish I had taken my father's advice; he wanted me to go into the navy; if I had done so, I should not have had to go to sea so much." Poor Slaughter! it was his last sea voyage. He was killed by Indians in Oregon.'

(From Personal Memoirs of U.S. Grant, Ch. XIV by Ulysses S. Grant.)


Tags: quote, usa
Authors: ag

Escape sequences in file names

Air Date:
Latest update:

How to annoy folks who use busybox:

$ touch `printf "\033[1;33m\033[44mhello"`
$ ls
''$'\033''[1;33m'$'\033''[44mhello'
$ tar cf 1.tar *hello
$ busybox tar tf 1.tar
hello
$ rpm -q busybox
busybox-1.36.1-8.fc41.x86_64
$  

Oopsie-daisy.

A simple ls|cat or ls|less -r produces the same effect.

This won't work with gnu tar & bsdtar, for they both properly escape escape sequences.


Tags: ойті
Authors: ag

Marc Rochkind on managers vs. programmers

Air Date:
Latest update:

This is the guy who wrote SCCS while working at Bell Labs.

Date: Wed, 3 Jul 2024 17:29:26 -0600
From: Marc Rochkind <mrochkind@gmail.com>
Newsgroups: gmane.org.unix-heritage.general
Subject: Re: Anyone ever heard of teaching a case study of Initial Unix?
Message-ID: <CAOkr1zXSefHKOqTCaGE7Zb_T09HD-s2pM9QfTW8PuMkLGioDGg@mail.gmail.com>

On Wed, Jul 3, 2024 at 9:27 AM Vincenzo Nicosia wrote:
> The programmers considered as "fungible workforce" by mainstream
> software engineering and project management theories are *paid* to
> to their programming job, and they mostly have to carry that job
> over working on prescribed objectives and timelines which have been
> decided by somebody else, managers who know nothing at all about
> software development. Personal interest in the project, passion,
> motivation, curiosity, creative power, sense of beauty, the joy of
> belonging to a community of likeminded people, are never part of the
> equation, at any point.

What a cynical take on software development! The logical error is to
assume that if something is sometimes true (e.g., "managers who know
nothing at all about software development") then it is always true.

My experience over many decades is quite different. Most often,
managers know software quite well. Where they fail is in their very
poor understanding of how to manage people.

The bias that operates in software development, and perhaps all
organizations, is that when there is a disagreement between management
and non-management (e.g., programmers), the non-managers usually
assume that they are always right and the managers are wrong.

I have never met a programmer or group of programmers who were always
right. Most often, they are ignorant of financing, regulatory
constraints, product schedules, commitments, staffing issues, and
everything else that isn't coding. (There are exceptions, but they are
uncommon.) Management, by definition, is the art and science of using
resources to reach an objective. Programmers generally are concerned
only with themselves as a resource and with their own personal
programming objective. It is unusual to find a programmer who
understands management.

Tags: quote
Authors: ag