Subscribe via RSS

Python: Close Files If You’re Going To Open Them

I've been trying to archive some videos off Youtube lately, using yt-dlp. It's an amazing tool, but my target files have been episodes in parts. Usually four parts and Plex really hates jogging through... so what to do? Combine the files together with ffmpeg. The code was meant to be pretty simple (and 98% of it was written by ChatGPT... whoops)...

def concat_episodes(episode_name, concat_files):
    plfile = "file_list.txt"
    f = open(plfile, "w", encoding="utf-8")
    for filename in concat_files:
        f.write("file '" + filename + "'\r\n")
    concat_command = f"ffmpeg -stats -safe 0 -f concat -i {plfile} -c copy '{episode_name}'"
    print(concat_command), shell=True)

But no amount of wrangling would get ffmpeg to work. The concat filter kept throwing: Invalid data found when processing input. No amount of "-safe 0", relative paths or absolute paths worked! No permissions... no cwds or shell arguments. If I let the python script drop to the shell, then the same line pasted (since I printed it out) worked perfectly fine! What the?

OH RIGHT. I missed the memo that I should be closing a file so that it lands on disk... prior to trying to open it in another process!:

def concat_episodes(episode_name, concat_files):
    plfile = "file_list.txt"
    f = open(plfile, "w", encoding="utf-8")
    for filename in concat_files:
        f.write("file '" + filename + "'\r\n")
    concat_command = f"ffmpeg -stats -safe 0 -f concat -i {plfile} -c copy '{episode_name}'"
    print(concat_command), shell=True)

The file was still open and not flushed to disk... so ffmpeg would always open an empty file! This has been a public service announcement.


Random HDMI Capture Cards

I can't believe I'm calling these cards retro, but they are! They're all early 00s and the drivers are only for Windows XP and Vista? How random... I had no idea there were cheap PCI-E HDMI Capture cards back then. I would not have had any reason for them back then, and hardly do today, but I'd picked them up in a Hard Off somewhere across Japan for 1$ each and thought I should finally test them out.


First up is a DRECAP DC-HC1. It's tiny and came with a low-profile case bracket. I unscrewed the bracket and loosely placed it in my machine, making sure to NOT move the HDMI cable once connected.

Whilst looking for drivers... actually, prior to that, whilst trying to ID the card (there are no valid serial numbers or other identifying marks), I found other cards that also seemed to be identical. I then stumbled across this blog post which indicated that the base card was a Timeleak HD72A and that the drivers could be found here.

With the correct drivers installed, everything worked nicely!


The second card was identified via Yodobashi Camera product listing! How cool. Out of stock! Knowing the product name, I then went googling for drivers. It turns out the original site is long gone and, since their support page had ugly javascript, webarchive can't help to find drivers.

I stumbled across this blog post with great info on installation. It turns out you can use the Monster X3A drivers here for this card. The X3A only has one port, so it seems we'll only use the closest port to the motherboard? ... it actually turned out that any port on the card worked! Unfortunately, sound didn't.

Mucking around with Composite Signals

As that I couldn't get audio from the second card, I went with using the bracket of it on the first card! I wasn't ready to have a loose card hanging around inside my PC's case.

The HDMI port, by total fluke, lined up 98% and cables were securely connected. From there, I purchased this little beast for AU12$ on eBay...

And you know what? It works nicely! Here's a Sega Master System II hooked up. I've got a switch to toggle the PAL/NTSC pin, so when you see (and hear) it switch from PAL 60 to PAL you'll know why!

Nice... No more mucking around with other TVs... I can now use this to continue the long chain of Atari and Sega mods/repairs.

Filed under: Retro No Comments

Christmas ’94, Tandy-Style!

This turned up on eBay and I couldn't resist! Recently I'd found stamp books and Australia Philotelic Assoc orders forms, amongst Lego Catalogue order forms (unfulfilled, I must admit!), but nothing from Tandy. I saw this for sale and new it needed to be preserved!


Filed under: Retro No Comments

LocalTalk Ethernet Bridge

I've tried it before, back then resorting to a hardware solution, but this time I wanted to get Apple's software LocalTalk Bridge working. The setup was meant to be simple... I had RetroNAS running in VirtualBox on my actual NAS, ethernet-over-power to the dinner table to a Centris 660AV, which in turn was connected to a Macintosh LC via LocalTalk.

Appletalk was configured and working, but for some reason I'd chosen to use the Modem Port on both machines. I then installed LocalTalk Bridge 2.1 and, initially, nothing worked ... Chooser just locked up and didn't show anything.

Anyway, the short answer is that LocalTalk Bridge ONLY works with the printer port. Don't try and use the Modem Port! I suppose the icon says it all? Anyway, I could've avoided the effort if I'd just read a proper tutorial like this one from retro apple computing.

Filed under: Apple 1 Comment

Apple IIe – Booting A Z80 Microsoft Softcard Clone

So this card was part of the recent bundle'o'Mac and I honestly thought it was just a lowly 80-column text module. Turns out it's a lot more than that! Sure, it's a clone, but it happens to be a Z-80 SoftCard, based on the Microsoft Softcard.

It seems that you need to slap it in slot 4 or 7 and boot relevant software... let's give it a go!

Hardware Installation

Before we get near the machine, let's reset the card to factory default! Make sure all four dipswitches are in the OFF position, as per the photo above. Just for fun, here's the meaning of the four switches, in case you need to tinker:

Switch Function when ON
1-1 Disable address translation.
1-2 Higher priority DMA devices cause SoftCard to relinquish bus.
1-3 Pass NMI line to Z80.
1-4 Pass IRQ line to Z80.

Finally, don't forget to clean the edge connector with isopropyl alcohol, just to make sure there'll be no issues with conductivity once inserted.

Next, we need to get to the innards of your computer. Fortunately, all machines in the Apple II line-up make this part really easy. Make sure everything is turned off and remove the top cover from your machine. Regardless of your model, it'll be two clips at the rear of the top panel.

We're going to choose Slot 4 for this card...

It's the slot directly to the right of the 'Auxiliary Slot' and the card only fits one way. Once inserted, you can either leave the case open so we can see the LED turn on when the card is alive... or work in a clean environment and close everything up!


Before booting up, I'd recommend a full review of the CP/M reference. As with everything Apple II, we'll need a boot disk to get started. For today's post, we'll be using Microsoft Softcard CP/M Disk #1 in Drive 1. Thanks to this machine having two floppy drives, we can also insert whatever-we-want-to-run in Drive 2.

The CPM disks were written using ADTPro via serial from my Windows 11 laptop. I then slapped the first one in the first drive and cold-restarted the machine.

It was a beautiful site, albeit a little underwhelming. I initially had the case off and watched the monitor whilst the unit (very quickly) booted. I then looked back into the chassis of the Apple IIe and the LED on the Z80 board was dark... was it even used? I mean, the fact that CP/M was booted, and displaying on the monitor, should've proven that it did work... but no LED made me sad. I then typed dir...

And, yey! We're in DOS... no more weird Apple OS. Second yey was that... out of the corner of my eye, I saw the LED on the Z80 card flicker! So it only illuminates when it's being used? I rebooted the machine, watching the LED this time, and saw that this was the case: the LED flickered along nicely as CP/M booted.

We're up and running, what next?

Someone on Reddit already asked the question and a great answer was provided: ZORK! Can we boot from Drive A: and play from Drive B:?

Ooops... sorry, that was loaded from A:\. Here's a sample from B:\...

Or write a novel like George on WordStar 4.0. Don't forget to also try and recall your Douglas Adams Knowledge and boot up The Hitchhikers Guide to the Galaxy (1984, Infocom).

It works!

Filed under: Apple No Comments

Apple IIe – Capacitors and Games!

This unit came in a recently-acquired bunch of Apple memorabilia. I was actually meant to be purchasing a Mac LC (I'll post on that later, when I'm happy with the unit... it's being a pest), but the seller mentioned that he "had some other stuff", and I happily offered bullion which was happily accepted. I was lucky enough to also receive an A2M2010P monitor, which quickly cooked itself after I applied power.

The shot above is the end result... there was quite a bit of work to get to that point!


I replaced all capacitors in the PSU of the Apple IIe. I know some say "if it ain't obviously broke/damaged, then don't replace", but I wanted to be able to slap a sticker on the PSU saying "totally recapped in 2023". Which I did...

With these cleaned up, the voltages were optimal. Note that there are two RIFA capacitors that REALLY need to be replaced.

A2M2010P Monitor

This green monocrome beast needed love. I was stupid enough at the start to just power it up and, although it worked for 5 minutes, one of the RIFA capacitors let out its magic smoke pretty quickly.

All were replaced and the screen was restored to its former glory.

65C02 Enabled Keyboard Light?

Here I was thinking the light labelled 65C02 on the bottom-left of the keyboard was some kind of indicator that the CPU was in some turbo mode? It's not. It's a bloody power LED and mine was dark! It's a bit of a hassle to get to: all of the base screws, lift the shell, 4 screws from the keyboard and you're there.

The LED is encased and should actually be removable with a good tug. It's actually seated in two pipes, which are soldered into the PCB. Unfortunately, one of the legs was totally fused in, so I de-soldered the lot.

The LED unit must have had a resistor in series as, when I initially soldered a LED direct, the current was way too strong! Instead I soldered a 470ohm resistor in series and got some illumination. I'd probably recommend a 330ohm, as the 470ohm is a little dull. It'll totally depend on your LED though. I should've also checked the supply voltage, but I assume it's 5v.

Getting Data Onto It!

I love it when my own articles come up when I'm trying to get something done. It seems that I've used ADTPro before with an Apple IIc to bootstrap and write floppy images. This unit didn't have serial, so I had to go another way and load images via the cassette port. All I needed was something that could play audio from Apple ][ Disk Server via a standard 3.5mm audio cable.

The instructions were simple. Boot the machine with no disks inserted, or no disk controller at all, and type LOAD at the prompt. Hit play on the audio device and watch the magic. The caveats? Make sure you plug the cable into the correct port. The correct port is the one right next ot the joystick port, where the arrow is pointing out of the little cassette tape! I may have spent a little too much time reviewing schematics and components on the board... wondering why there was nothing happening... (I had it plugged into the wrong port...)

Secondly, don't use a shitty audio device. My phone couldn't play the audio files loud enough. Neither could a Dell Inspiron 910. Finally my GPD Win Max 2 blasted the audio out and a disk was written! Many actually. If your audio is too low then you'll either get "Err", "ErrErr", "Error", "CHKSUM ERROR" or "Base 0x9xxx yada yada" errors... All of these mean MORE VOLUME PLEASE.

Which Games?

There's plenty of sites that think they have the best list of games on earth. I went for randoms! Bubble Bobble is a hilarious port... terrible really!

Price of Persia is fantastic... the motion is so smooth and the soundtrack is great.

I must admit that I was very impressed with the floppy drives that came with the bundle. The slimline black unit needed to warm up a bit, but operated perfectly after it got itself seeking. The apple-branded hulk just worked!

Filed under: Apple No Comments

Hey BeBox, My SMB Network Hates You!

Sheesh. After getting the machine up and running, getting it on the network was next-level shite! The BeBox, with BeOS 4.5 PPC, comes with an optional folder and, included in there, is an experimental folder containin an application known as WON. This stands for World 'O Networking (I REALLY blame this use of O' for my apostrophicities in this entire blog as I was introduced to WON back in '99) and is a CIFS implementation. Running the setup app easily installs it, but opening the newly placed World 'O Networking icon on the desktop does nothing but tell me that my CIFS Master Browser didn't exist.

Do excuse the crappy photo...

In this day'n'age, there's no #@%#$%'n reason for a CIFS browser to exist on anyone's network. We have random french-named services to say 'hello' to eachother and list eachother in eachother's network lists. There's no need for this (now inappropriate) client/server (master/slave) relationship. Of course, should we expect BeOS 4.5 PPC to be up with the times? No. So? Let's just try the cifsmount call from the command line.

$cifsmount \\\\\\public [user] [password] ./testMountFolder
General OS Error -1

General OS error? Awful. Fortunately, my NAS can log the snot out of Samba, so I turned on verbosity. Whenever BeOS tried to access the share, the following was visible:

[2022/12/19 14:37:58.602852,  2, pid=6552, effective(0, 0), real(0, 0)] ../../source3/smbd/reply.c:708(reply_special)                                                                                                                                                     
  netbios connect: name1=AS6604T-BDE6   0x20 name2=BEBOX          0x0                                                                                                                                                                                                     
[2022/12/19 14:37:58.603018,  2, pid=6552, effective(0, 0), real(0, 0)] ../../source3/smbd/reply.c:749(reply_special)                                                                                                                                                     
  netbios connect: local=as6604t-bde6 remote=bebox, name type = 0                                                                                                                                                                                                         
[2022/12/19 14:37:58.613129,  0, pid=6552, effective(0, 0), real(0, 0)] ../../source3/smbd/negprot.c:600(reply_negprot)                                                                                                                                                   
  negprot protocols not 0-terminated

Nice! It actually says BEBOX!. Somehow, samba does nothing after that line. It doesn't say "ERROR"... but it also doesn't continue? Checking the code...

	if (req->inbuf[size-1] != '\0') {
		DEBUG(0, ("negprot protocols not 0-terminated\n"));
		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);

Oh yup. That's a hard-stop. It seems that the CIFS implementation on BeOS hasn't null-terminated a string as it sent it to Samba. We'll need to build the code and rip this out, or rollback to an older version. SMB is running as a package on my NAS and ... I assume there's source somewhere, but every time I've SSH'd into that console the tools I need don't exist, so let's virtualise this shit.

Samba Proxies or Virtual Box?

We have two options here. Spin up a RedHat Linux (~7.0) version and just start Samba on that (it works, I tried it!) or spin up a possibly awesome docker image and "re-share" our existing security-conscious shares. Yes, I got the VM going, but I wasn't happy with an entire VM running endlessly for no reason when my retro machines were off. I also hated the need to cleanly bring-up and shut-down the machine, not to mention the speed of interaction.

So, I went for a Docker image. I'm running an Asustor Lockerstor AS6600T which has a neatly packaged version of Docker and Portainer running. It's currently doing all sorts of things and adding a samba container wasn't going to hurt. The only real consideration was that, even though I was using a macvlan to get real IPs for my containers, I still had not successfully managed to get the NAS to talk directly into the hosted docker containers. I was initially surprised by this, but it turns out that's by-design... docker images aren't 'allowed' to see the metal they're hosted on. Although there's articles mentioning how to fix this (and a slightly different one here), I couldn't get it to work. Therefore, a 'samba proxy' wont actually work... as it needs to be able to SMB mount the host's share(s) and share those forward via it's own SMB server.

Fortunately, we don't have to fret yet. It occurred to me that I can simply mount the host's drives in the docker image and use David Personette's Samba Server container to share those! There's no need to actually proxy anything.

Samba Versions

This negprot 0-termination check has been in Samba since r24001, which was around 15 years ago, which equates to something around Samba 3.1. Docker can run older Linux versions, but only until around 8 years ago. Centos 5 might work, but you'll be hard-pressed finding functional package repos once it's installed. Alpine Linux is the way to go, but there's only docker images going back to 3.1, which doesn't line up with Samba 3.1! If we can't use a version of Samba (in Docker, anyway) that doesn't include the check, then maybe we can remove the check from a newer version? We just need to make sure the newer version supports SMB v1.0 (LANMAN, CIFS, etc..) and it turns out support for these older protocols was removed in version 4.11+.

As that David's container is build on the latest Alpine, it includes Samba 4.18 and this is obviously too new. It turns out that the last version of Samba before 4.11 is v4.18.10 and it's conveniently included in Alpine v3.10. Thanks for Docker's customisable recipes, we can modify David's Dockerfile, adjusting the top line to peg the Alpine base image version to this. Finally, we also need to make sure that the install scripts don't get Samba from the base Alpine 3.10 repo as we actually want to custom-build the APKs and carve out the zero-termination check.

I was initially going to download the source of Samba and try to build/install it myself in a new docker container... but I realised that it would be a tonne of extra work as there's probably distro-specific guff that needs to be configured/carried-out. So instead, as above, I chose to roll my own APK using the APK recipe from the Alpine repo.

Adding a package to Alpine Linux to make Docker better again

If you want to actually build the APK yourself, then here's a basic run-through. I've taken the package recipe from the alpine packages store and made a few changes. You'll find them here. Mainly just a sed script to hack out the 0-termination check.

If you don't want to bother compiling your own APK with this modification, then you can just download the already-compiled APK here. The only reason you'd want to do the next chunk yourself is if you don't trust my hard work. I wont be offended if that's the case.

I started by spinning up a new docker container...

sudo docker run --name apk-builder -v /volume1/Public:/public-share  -it alpine:3.10

Note that I've mapped a local drive. You'll want to do this as otherwise you'll have to work out a better way to get the compiled APKs out. Once up, you'll be already at the console and you can get started...

apk add --update alpine-sdk wget nano sudo
adduser builder

At this point you'll need to give builder a good password. Once done, continue to set up the APK build environment. Note that the sed line injects the rule to sudoers for the user builder at line 80. If you're doing this on a tainted Docker container (not the fresh one I just built) then you might want to be wary as to which line you insert on.

sed -i "80i builder ALL=(ALL) ALL" /etc/sudoers
sudo -lU builder
addgroup builder abuild
mkdir -p /var/cache/distfiles
chmod a+w /var/cache/distfiles
chgrp abuild /var/cache/distfiles
chmod g+w /var/cache/distfiles

We've done all we need to as root, so switch to builder:

su builder

And then generate your signing keys which'll be used when compressing the APK...

abuild-keygen -a -i

You'll need to type in builder's password for the key storage. Finally, go into the dir and download the APKBUILD files from my server. Please do check out the files downloaded... specifically APKBUILD! The hack to remove the 0-term if statement is already contained inside. It's simply a sed line requesting the deletion of lines 599-605 in negprot.c.

cd /tmp

Finally, kick it off. Go grab a coffee.

abuild -r

The build takes around 20 minutes on my quad core i3 NAS. The build is nice as it tells you the progress via the files-completed numbers at the start of each line.

[3287/5138] Linking bin/default/source3/
[3288/5138] Linking bin/default/source3/
[3289/5138] Linking bin/default/source3/
[3290/5138] Linking bin/default/source3/
[3292/5138] Linking bin/default/source3/
[3294/5138] Linking bin/default/source3/
[3295/5138] Linking bin/default/source3/
[3297/5138] Linking bin/default/source3/
[3299/5138] Linking bin/default/source3/
[3301/5138] Linking bin/default/source3/
[3303/5138] Linking bin/default/source3/
[3306/5138] Linking bin/default/source3/
[3308/5138] Linking bin/default/source3/
[3310/5138] Linking bin/default/source3/
[3312/5138] Linking bin/default/source3/auth/
[3313/5138] Linking bin/default/source3/auth/
[3316/5138] Linking bin/default/source3/auth/
[3318/5138] Linking bin/default/source3/auth/
[3320/5138] Linking bin/default/source3/modules/
[3323/5138] Linking bin/default/source3/modules/
[3325/5138] Linking bin/default/source3/modules/
[3327/5138] Linking bin/default/source3/modules/
[3329/5138] Linking bin/default/source3/modules/
[3331/5138] Linking bin/default/source3/modules/
[3333/5138] Linking bin/default/source3/modules/
[3335/5138] Linking bin/default/source3/modules/
[3337/5138] Linking bin/default/source3/modules/
[3339/5138] Linking bin/default/source3/modules/
(93/105) Purging tevent (0.9.39-r0)
(94/105) Purging talloc (2.2.0-r0)
(95/105) Purging tdb-libs (1.3.18-r0)
(96/105) Purging libbz2 (1.0.6-r7)
(97/105) Purging gdbm (1.13-r1)
(98/105) Purging xz-libs (5.2.4-r0)
(99/105) Purging readline (8.0.0-r0)
(100/105) Purging sqlite-libs (3.28.0-r3)
(101/105) Purging lz4-libs (1.9.1-r1)
(102/105) Purging keyutils-libs (1.6-r1)
(103/105) Purging libverto (0.3.1-r0)
(104/105) Purging libsasl (2.1.27-r4)
(105/105) Purging db (5.3.28-r1)
Executing busybox-1.30.1-r5.trigger
OK: 184 MiB in 56 packages
>>> samba: Updating the /x86_64 repository index...
>>> samba: Signing the index...

Once built, you'll end up with a bunch of APKs in /home/builder/packages.

~/packages/x86_64 $ ls
APKINDEX.tar.gz                            samba-dev-4.10.18-r0.apk
libsmbclient-4.10.18-r0.apk                samba-doc-4.10.18-r0.apk
libwbclient-4.10.18-r0.apk                 samba-heimdal-libs-4.10.18-r0.apk
pam-winbind-4.10.18-r0.apk                 samba-libnss-winbind-4.10.18-r0.apk
py3-samba-4.10.18-r0.apk                   samba-libs-4.10.18-r0.apk
samba-4.10.18-r0.apk                       samba-libs-py3-4.10.18-r0.apk
samba-client-4.10.18-r0.apk                samba-pidl-4.10.18-r0.apk
samba-client-libs-4.10.18-r0.apk           samba-server-4.10.18-r0.apk
samba-common-4.10.18-r0.apk                samba-server-libs-4.10.18-r0.apk
samba-common-libs-4.10.18-r0.apk           samba-server-openrc-4.10.18-r0.apk
samba-common-server-libs-4.10.18-r0.apk    samba-test-4.10.18-r0.apk
samba-common-tools-4.10.18-r0.apk          samba-winbind-4.10.18-r0.apk
samba-dc-4.10.18-r0.apk                    samba-winbind-clients-4.10.18-r0.apk
samba-dc-libs-4.10.18-r0.apk               samba-winbind-krb5-locator-4.10.18-r0.apk

Copy these all somewhere to your local drive, as we'll need to use them for the Docker container creation. If you are rolling this yourself, then your Dockerfile/docker-compose.yaml will need to map a local volume to the folder where all of these files are. If you're not rolling them yourself, then use the zip that's in this Dockerfile.

The container script uses David's as a base, but sets Alpine to 3.10 and uses Samba from my APKs. It also does a lot of mucking around with smb.conf. Prior to that configuration mucking around, BeOS would get past the negprot issue only to bring up another error:

Allowed connection from (
init_oplocks: initializing messages.
Transaction 0 of length 72 (0 toread)
netbios connect: name1=   0x20 name2=               0x0
netbios connect: local= remote=, name type = 0
Transaction 0 of length 51 (0 toread)
switch message SMBnegprot (pid 1071) conn 0x0
Requested protocol [NT LM 0.12]
reply_negprot: No protocol supported !
Server exit (no protocol supported)

Seems that NT LM 0.12 is NT LAN Manager 2.1, or somesuch. I'd thought about digging back into negprot.c and checking the reply_negprot function, but a quick google lead to something very obvious... configuration!


As always, someone has already faced this issue and it seems that all they had to do was set the 'lowest' protocol that the server would accept, via a setting? David's smb.conf had a default minimum of SMB2_10, which seems to mean that we only supported Windows 7 and above? Wowzers. For those not clicking links, here's the protocol limitation options:

Option Description
LANMAN1 First modern version of the protocol. Long filename support.
LANMAN2 Updates to Lanman1 protocol.
NT1 Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
SMB2 Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available.
SMB2_02 The earliest SMB2 version. (Windows Vista and higher)
SMB2_10 Windows 7 SMB2 version.
SMB2 By default selects the SMB2_10 variant.
SMB3 The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
SMB3_00 Windows 8 SMB3 version.
SMB3_02 Windows 8.1 SMB3 version.
SMB3_11 Windows 10 SMB3 version.

There's actually a really cool piece of code explaining all this in the negprot.c source file:

/* these are the protocol lists used for auto architecture detection:

WinNT 3.51:
protocol [PC NETWORK PROGRAM 1.0]
protocol [XENIX CORE]
protocol [MICROSOFT NETWORKS 1.03]
protocol [LANMAN1.0]
protocol [Windows for Workgroups 3.1a]
protocol [LM1.2X002]
protocol [LANMAN2.1]
protocol [NT LM 0.12]

protocol [PC NETWORK PROGRAM 1.0]
protocol [XENIX CORE]
protocol [MICROSOFT NETWORKS 1.03]
protocol [LANMAN1.0]
protocol [Windows for Workgroups 3.1a]
protocol [LM1.2X002]
protocol [LANMAN2.1]
protocol [NT LM 0.12]

protocol [PC NETWORK PROGRAM 1.0]
protocol [LANMAN1.0]
protocol [Windows for Workgroups 3.1a]
protocol [LM1.2X002]
protocol [LANMAN2.1]
protocol [NT LM 0.12]

protocol [PC NETWORK PROGRAM 1.0]
protocol [LANMAN1.0]
protocol [Windows for Workgroups 3.1a]
protocol [LM1.2X002]
protocol [LANMAN2.1]
protocol [NT LM 0.12]
protocol [SMB 2.001]

protocol [PC NETWORK PROGRAM 1.0]
protocol [XENIX CORE]
protocol [LANMAN1.0]
protocol [LM1.2X002]
protocol [LANMAN2.1]

protocol [NT LM 0.12]
protocol [SMB 2.002]
protocol [SMB 2.???]

  * Modified to recognize the architecture of the remote machine better.
  * This appears to be the matrix of which protocol is used by which
  * product.
       Protocol                       WfWg Win95 WinNT Win2K OS/2 Vista OSX
       PC NETWORK PROGRAM 1.0          1     1     1     1     1    1
       XENIX CORE                                  2           2
       MICROSOFT NETWORKS 3.0          2     2
       DOS LM1.2X002                   3     3
       MICROSOFT NETWORKS 1.03                     3
       DOS LANMAN2.1                   4     4
       LANMAN1.0                                   4     2     3    2
       Windows for Workgroups 3.1a     5     5     5     3          3
       LM1.2X002                                   6     4     4    4
       LANMAN2.1                                   7     5     5    5
       NT LM 0.12                            6     8     6     6    6    1
       SMB 2.001                                                    7
       SMB 2.002                                                         2
       SMB 2.???                                                         3
  * 09/29/95
  *  Win2K added by matty 17/7/99

#define PROT_PC_NETWORK_PROGRAM_1_0		0x0001
#define PROT_XENIX_CORE				0x0002
#define PROT_MICROSOFT_NETWORKS_3_0		0x0004
#define PROT_DOS_LM1_2X002			0x0008
#define PROT_MICROSOFT_NETWORKS_1_03		0x0010
#define PROT_DOS_LANMAN2_1			0x0020
#define PROT_LANMAN1_0				0x0040
#define PROT_WFWG				0x0080
#define PROT_LM1_2X002				0x0100
#define PROT_LANMAN2_1				0x0200
#define PROT_NT_LM_0_12				0x0400
#define PROT_SMB_2_001				0x0800
#define PROT_SMB_2_002				0x1000
#define PROT_SMB_2_FF				0x2000
#define PROT_SAMBA				0x4000
#define PROT_POSIX_2				0x8000

#define ARCH_WIN95    ( ARCH_WFWG | PROT_NT_LM_0_12 )
			PROT_LM1_2X002 | PROT_LANMAN2_1 | PROT_NT_LM_0_12 )
#define ARCH_VISTA    ( ARCH_WIN2K | PROT_SMB_2_001 )
#define ARCH_SAMBA    ( PROT_SAMBA )
#define ARCH_CIFSFS   ( PROT_POSIX_2 )
#define ARCH_OSX      ( PROT_NT_LM_0_12 | PROT_SMB_2_002 | PROT_SMB_2_FF )

/* List of supported protocols, most desired first */
static const struct {
	const char *proto_name;
	const char *short_name;
	NTSTATUS (*proto_reply_fn)(struct smb_request *req, uint16_t choice);
	int protocol_level;
} supported_protocols[] = {
	{"SMB 2.???",               "SMB2_FF",  reply_smb20ff,  PROTOCOL_SMB2_10},
	{"SMB 2.002",               "SMB2_02",  reply_smb2002,  PROTOCOL_SMB2_02},
	{"NT LANMAN 1.0",           "NT1",      reply_nt1,      PROTOCOL_NT1},
	{"NT LM 0.12",              "NT1",      reply_nt1,      PROTOCOL_NT1},
	{"POSIX 2",                 "NT1",      reply_nt1,      PROTOCOL_NT1},
	{"LANMAN2.1",               "LANMAN2",  reply_lanman2,  PROTOCOL_LANMAN2},
	{"LM1.2X002",               "LANMAN2",  reply_lanman2,  PROTOCOL_LANMAN2},
	{"Samba",                   "LANMAN2",  reply_lanman2,  PROTOCOL_LANMAN2},
	{"DOS LM1.2X002",           "LANMAN2",  reply_lanman2,  PROTOCOL_LANMAN2},
	{"LANMAN1.0",               "LANMAN1",  reply_lanman1,  PROTOCOL_LANMAN1},
	{"MICROSOFT NETWORKS 3.0",  "LANMAN1",  reply_lanman1,  PROTOCOL_LANMAN1},

So, is it just as-simple-as setting the lowest bloody value and rebooting? I edited the Dockerfile and updated the injected smb.conf configuration:

    echo '   # Security' >>$file && \
    echo '   client ipc max protocol = SMB3' >>$file && \
    echo '   client ipc min protocol = LANMAN1' >>$file && \
    echo '   client max protocol = SMB3' >>$file && \
    echo '   client min protocol = LANMAN1' >>$file && \
    echo '   server max protocol = SMB3' >>$file && \
    echo '   server min protocol = LANMAN1' >>$file && \

And it worked! Finally! BeOS has connected to my NAS with a reasonably-recent version of linux and Samba! Sure, commenting out the zero-termination might reinstate a bug that can be exploited, but this service will never be public. Meanwhile, World 'O Networking still hated me... but that's OK, at least I can now transfer files!

Giving Docker a Hostname

As you can see above, all interactions with the new samba docker server are via IP. It turns out that the --hostname field that you configure in Docker only applies internally to the docker container. It's not exported! Googlin' around, I found a great stack overflow article describing the same issue, with many "can't do that" responses.

It's not until you scroll a few answers down that you'll see a --net-alias flag that seems to do want I want. Just a note, it's --alias if you're using docker network connect and --net-alias when using docker compose. I added the required configuration to the Dockerfile and spun up a new instance.

    external: true

mynet has been set up using the instructions over here, which were pertinent to getting PiHole running in an adjacent Docker container. The rest of the configuration was borrowed from here.

I honestly hoped this would get Samba showing up on the local LAN with a hostname, but no such luck! I wonder if the docker network is preventing promiscuous traffic or somesuch... Maybe I'll spin this up on a physical machine on the network just to rule a few things out.

But what about that CIFS Browser error?

Oh yeah, I would still love WON to actually list my computers... can I do it? It seems that you can configure Samba to be a CIFS Server with a single local master = yes in the configuration file. Unfortuantely this didn't work... neither did wins support = yes. I'll have to keep fighting to get my WORKGROUP listed.

Filed under: Retro No Comments

Osaka Station Updates – May, 2023

During the last decade, JR West has managed to remove a freight yard, sink the Umeda freight line, build new platforms and connect these platforms internally to Osaka Station. They've even implemented an AI Face Detection gate so you don't have to tap.

The Umeda area had been slated for redevelopment for quite a while, but the heavily-used freight yard and rail line had to be removed. After Suita was upgraded to cope with the freight that was handled in Umeda, the yard could be removed, but the line could not. The line was still used by limited express trains to the airport and Wakayama.

Instead of removing the line, the plan was to sink it and create a separate station, known as Ume-Kita (North Umeda), underground. At some point during the planning, the idea changed and it was decided that the underground platforms and rail alignment should be moved close enough to Osaka Station, to become a single entity. Making this change to the design was honestly a perfect idea and well-needed for anyone transiting around Kansai.

Umeda Freight Yard

The Umeda freight line runs direct between Shin-Osaka Station and Fukushima Station. Umeda Freight Yard used to be in the middle of this, directly north-west of Osaka Station. The Umeda Freight Line was also used by the Kuroshio and Airport Limited Express trains, with the only stops in central-Osaka being at Tennoji and Shin-Osaka Stations. The latter, although great for transferring to the Shinkansen, wasn't optimal for anyone wanting to get into the northern area of the Osaka loop line.

Here's what the area used to look like back in 2009/2010 when the freight yard was operational. The Umeda freight line is on the far side, running down the edge of the yard, with Osaka Station in the bottom-right of the image.

It was a pretty magical area with the limited express trains bolting between the freight (more photos here)... but that's all history as Suita was extended to cope with the freight capacity removed here.

New Construction

Without depairing too much, the new design is perfect for both passengers and freight nerds! First there's the ability to ride the Higashi Osaka Line from Osaka station and secondly the freight to-and-from Ajikawaguchi still runs... actually, there are now more freight trains than ever. Even better, due to the sinking of the line, the incline required to enter/exit the underground station platforms has required freight trains occasionally have a banker loco on the rear!

To check it all out, I first took a Osaka East Line service from Shin-Osaka to Osaka Station. These services used to terminate at Osaka Station, but now travel along the Umeda freight line and terminate at the new platforms.

From the Nakatsu area, the rail starts to descend into the station. It's two tracks on this side of the platforms, but each split into two, forming two island platforms with rails either side. Only the platform closest to the main Osaka Station building has a full glass platform wall. I assume they're getting around to installing these on the other platforms. Thankfully they weren't installed yet on the Shin-Osaka bound side!

As that all of the limited express trains stop, and the locals terminate, any 'passes' showing on the board will be freight!

As mentioned above, the Kuroshio bound for Shin-Osaka was to come through first. I was hoping forthe dolphin, but got a newer set instead...

And then it was freight time!

Excuse the lighting... here's a video instead.

And another...

And the dolphin!

And that was what. I never managed to get down there when there was a banker engine attached.

Checking the area out on-foot

A few days later I decided to take the subway to Nakatsu Station and check out the area on foot. Something became very apparent (and it's happening in Melbourne too): as soom as a railway is sunken into the ground, the area around the tracks becomes inaccessible. Sure, it's the same around the inclines/declines for elevated rail, but once the rail is in the air then there's space underneath to do things with. I suppose, this is also true if you cover the rails... but in Melbourne they haven't.

Fortunately, everything is still under construction, meaning that they'll hopefully add better access to allow crossing the railway line. Also fortunate is that this area was always a ground-level freight yard and was never cross-able.

There's still quite a bit of infrastructure to remove... and you can see they've quickly hacked away other things. Meanwhile, here's a great comparison. Here's what the Hankyu overpass looks like now:

Compared to 2009/2010:

There are two buildings that match in that shot, the rest are demolished (in the old) or brand new (in the new.) Anyway, I kept dawdling around...

And of course, everywhere needs art... including the new entrance to the new platforms from the above-ground.

It was actually drawing quite a crowd.

Filed under: JPN No Comments

PC-98 – 110-Pin CenterCOM ME1500 Ethernet Adapter

This gets a special mention after getting the PCMCIA slot working on this machine. Since my NS/A only has one PCMCIA slot, it's nice to be able to have ethernet on the 110-pin port and SCSI in the PCMCIA. Or vice-versa!

What I can't believe is that Allied Telesis still has a FULL list of drivers for all of their archaic hardware. Thank you Allied Telesis, from the entire retro community! Just in case that site does go down, the drivers for this device are over here for safe-keeping.

Once downloaded, just make it available to the MS LAN Manager setup interface. Clear your current configuration and then choose to add an unlisted driver...

Yet again, set up TCP/IP with DHCP as the default...

And Bob's your uncle! Transmission!

The bloody thing worked perfectly and now I have my single PCMCIA slot free for SCSI. Actually, it'd be nice if they made the rear 110-pin port daisy-chain-able. All of these devices should have the matching rear socket to add more devices... just like the C-Bus slots.

Filed under: Retro No Comments

Yamashina, Kyoto – May, 2023

Stumbling across this area was nearly an accident. Somehow, back in the day whilst probably browsing Facebook and pinning random locations on Google Maps, I'd left a 'favourite' on this canal. Whilst planning things to do during my final days of this most recent trip to Japan, I chose to visit this area as my rail pass had expired and it was easy to get to from Shin-Osaka. It's also easy to get to from Kyoto or Otsu by taking the Keihan Keishi Line, which is actually the same line that runs down the middle of the street in Otsu city.

Getting up to the Canal

Lake Biwa Canal was used back in the day for freight and water, but nowadays is just used to supply drinking water and power a hydro dam. It's actually located high up on the side of a mountain, so there's a bit of a walk involved. Starting from either JR or Keihan Keishi Line, exit at Yamashina Station and start walking to the west, beside the bicycle parking lot.

Once you cross through the underpass above, you'll climb the local street to get up to the canal.

It's mildly steep, so take it easy. But once on the canal, it's flat land all the way around to the photography spot. On the way, you'll pass the observation deck which faces back to Yamashina Station. It's great for viewing trains, but the view is a little limited.

Continue along the canal...

And keep an eye out to your left, as after around a 10 minute walk you'll stumble across...

This amazing view! Further along the canal you'll find Myooji Bridge and then toilets. And also random boat tours!

But yeah, we're not here for that... we're here for:

And don't forget to look down...

But you'll be distracted again momentarily by either a limited express, freight or passenger. They just don't stop!

The heavens then opened up and it rained quite heavily. If the forecast says ANY percentage of rain (on the day it was 2%), then take an umbrella. Don't even bother to gamble! The maple leaves are beautiful and offer no form of shelter.

And, of course, the rain came when the Fukuyama Rail Express came!

And then the Kangaroo Liner came through!

That was around 2 hours between 9 and 11am in the morning on a Tuesday. I can only recommend to check timetables and determine a sweet spot as to when to see the most trains. At the start, there was one other photographer up there, but he seemed to understand the rain was coming and left before it arrived!

I returned via Yamashina Station and, as always, a freight appeared out of nowhere...

And a final note, make sure to ride in the first car of any train you take in Japan.

There's always something to see on the Tokaido line!

Filed under: JPN No Comments