Sony PictureBook PCG-C1S
Another eBay impulse-buy, this little guy came to me quickly (although AusPost is struggling during these 'unprecedented times') and in pretty good condition! It's a PCG-C1S, being the the second PictureBook model ever released.
You can see by the single mono front speaker that they didn't focus too much on multimedia. Also no memory card slots or jog dials. Sporting a 266mmx Pentium CPU, there wasn't really much horsepower to play media with anyway! The internal drive had already been upgraded from 8.1g to 20g and the ram was maxed out with 2 64mb modules.
I used my previous knowledge of booting the PCG-CD51A to get Windows 98 installed... but struggled to find a stand-alone driver for the NeoMagic 256 AV video card that'd present the correct mode for the 1024x480 resolution.
So I went digging for an Application Recovery CD and found one for a PCG-C1X on webarchive. Not being an exact match, I was a little wary... and spent way too much time trying to boot and restore the system image. Instead, I then checked the Application CD #1 and found all the required drivers on it! You could download the pack and dig in, but an easier method is just to download this zip with all the drivers in it. I've also renamed the folders in the other directory to make it obvious as to what they are.
There's an installer in the video driver folder, but just do the usual upgrade driver process through device manager.
CMOS Battery Replacement
The BIOS reported all-too-often that the system clock was wrong, so it was time to replace the battery. Remove ALL screws underneath the unit. Once the screws are out, flip the unit back over and pry the keyboard up. Be very careful not to lever the keys up as they'll easily pop off and end up across the room. Next, take out the three screws that were under the keyboard and pry the whole case apart.
Removing the existing battery pack is actually quite a challenge! There's a huge piece of double-sided tape and it could easily destroy the mainboard if you just try to lever the battery pack out. Instead, I dissected the pack...
Oh shit...
The bloody cells had corroded.. I mean, why am I surprised? Let's hope it hasn't travelled too far. The plug on the mainboard end is so small that it's hard to determine if there's any of the usual green-tinge. Either way, I went hunting and a replacement battery-pack was found on eBay. It was actually for a Dell, but the cell specifications matched. Unfortunately, the plug was too large. Instead of finding another more-correct version, I chose to splice the plug over from the dead battery pack.
This has worked well, regardless of the fact that the new battery pack already had a tarnished ground wire which required extra heat to get soldered.
DOS Gaming
Loading up the DarkSeed ISO saw a garbled colour screen on execution. The whole system was then frozen. Using this version worked fine though!
DOOM worked fine also, although configuring sound was a little touch-and-go. If you tried to choose Adlib for music, then no SFX would play... and Soundblaster FM produced no music. Switching back to General MIDI and SB for SFX got beautiful music, but then the SFX stopped? A reboot with the same config saw it all working again. Seems the SB Emulation can get in a muddle and nothing like a good 'ol CTRL-ALT-DEL for Windows 98 SE to the rescue.
Linux on the PictureBook
I'd previously done this with a PCG-C1VX, and that all worked fine once the modeline was added, but this version of the PictureBook required a bit of extra work. The modes were already listed in the X11 config, but on boot, X11 would error saying that the modes won't display correctly on the LCD panel!
There's a console app called dccxinfos that lists the available modes reported by the display hardware and our mode wasn't listed! (Yes yes, the above screenshot was taken after correcting the configuration!) So, the trick, after a lot of googling, was to add the overrideValidateMode command in the config. Here's the juicy bit:
Finally, the LILO boot screen menu is stuck at 800x600 and runs off the page, but editing /etc/lilo.conf and setting the vga option on the linux kernel load line worked for further booting.
vga=769
just run lilo after editing the file above and reboot.
Trans-Australian Railway Brochure Circa 1965
This item was picked up recently from a vintage shop in Colac. Finally, we're allowed to travel! Nothing like how we used to, though...
It's a 4-panel fold-out, with a full map on the back.
As usual, here's a better resolution version of the full-width map.
1952 Tokyo Railway Map
Next up from the box'o'paraphernalia, a map of Tokyo Railways from Charles E. Tuttle Company. This seems to have been produced in 1952!
The map is usually folded into a single pane, but I stretched it out for that first scan above. Mainly so you can see the penciled in 25c price tag up top-right. I don't even remember where I acquired this from, but I'm sure I paid more than that.
Note that the pop-up doesn't show the image in the best quality... use this high-res version instead.
The shot above is a stitched-together image from 9 A4 scans. I used Hugin to do the stitching, using the tutorial here. '10' is the magic number for focal length and it did a pretty magic job!
Tenshodo HO Model Railway Catalogue
Another from the found-at-flea-market and needs-to-be-preserved box. This actually came with a single A4 insert of pricings from a Melbourne hobby shop in pounds and shillings... and I lost it. Pretty angry.
Beautiful rolling-stock. Interestingly with an inclusion of Japanese Freight cars! But no Japanese locomotives.
Akane HO Brass Catalog
Another item in the box'o'crap that belongs somewhere safe. This was found at a flea market here in Australia.
Some now-beautifully-expensive rolling stock!
Countrylink Paraphernalia
Back in the day, someone had a plan to upgrade the Canberra - Sydney rail fleet to X2000... or somesuch... The X2000 was shipped from the Scandies to Australia and strapped onto an XPT power car.
I happened to be there when the unit came to Canberra. Here's the pamphlet as proof:
Wait, no, I suppose this is the actual proof...
Oh! They also handed out rulers... one of mine seems to have enjoyed a bake in the sun.
And here's a sticker of the actual unit that was powering the set... making the whole process pointless...
They weren't handed out at the same time... I just happened to have all of this in boxes and feel it's wasted there. More to come.
PIKO VT135 Repairs
This happened to be another impulse buy from eBay... and I fully blame COVID. Anyway, it's a super-cool 4-wheel VT135 DMU (or Verbrennungstriebwagen) from the German brand PIKO.
The 'shell doesn't stay on chassis' defect was pre-communicated, but something else wasn't:
It's missing an eye!
They seem to be a triangular piece of transparent acrylic with a small hemisphere on one face. How hard can that be to design and print? I jumped straight into Tinkercad after a quick session with the ruler and whipped up the following:
5mm x 5mm x 5mm triangular block and a 2.8mm diameter hemisphere. I added a cylinder behind as the thickness of the VT135's shell caused a version without the cylinder to sit too far in. Once printed, the item was tested out...
It didn't look toooooo bad... it's a little more opaque than the originals. The first shot above shows the very first print with no cylinder on the left and a 'shit print' on the right. Rule #1: clean the print bed after each print! Anyway, a third print was beautiful and its performance was as follows:
It ended up being much brighter! Maybe I should replace the other three to even it all out... or maybe I'll try and work out how to printer clearer 3D models. You can find the STL here.
HoneyBee Mega Drive Controller Directions At 45°?
I've been fixing a bulk load of SMS/SMS2/MegaDrive stuff and one of these controllers was thrown in with a note stating "Erratic Directions."
Externally everything checked out, so I opened it up and continuity-tested the cable and plug. No issues there! I tested it again on the SMS2 that I had available and realised that I could get the directions I wanted by mashing in the corners of the D-PAD... what gives? I opened it right up...
What's going on here? The actual D-PAD circuit board contacts aren't in an NESW orientation? They're a box, flat on the ground? I continuity-tested for the UP button and it turns out to be the top-right pad. Just to confirm I wasn't bonkers, I put the rubber-contact-thingy back in the D-PAD housing and sure-enough, the pads match the pads!
So wait, to get the direction I want, I REALLY DO have to mash in the corners of the D-PAD. This is BY DESIGN. I wasn't a very good gamer when I was young, and this system was available to me at that time. The range is Competition Pro, so I assume this was an answer to the kiddies who held the controller at 45-deg in their left hand and mashed the other buttons with their right? Google is giving me nothing.
NOTE: just looking at that first picture, you can see where your thumb is meant to rest. This easily hints at where UP is. Can someone please point me to documentation where this is made clear that the directions are 45-deg clockwise rotated?
Build Your Own Macintosh Classic!
Man, somehow I google'd across this link on creating your own Macintosh Classic and decided I'd do it myself. I'd already sunk cost into my own Kickstart'd Creality CR-6 SE printer and decided wtf, how hard can it be? The article even had a BOM that included all of the other physical components required. I placed the order, it arrived, COVID happened, box was stored, everything was forgotten.
Come Melbourne's lockdown #6 and I'm bashing through everything in the received-but-not-touched list. What to do first? Print the case. If that doesn't work, then who could care less about the tech purchased?
And with the printing, I screwed up! Make sure to configure your print settings with supports everywhere, not just 'touching base' or whatever the boring default is, as it won't work. I had to scrape the top inner frame of the display window to get it to not look too saggy!
The floppy disk is an insert and, as per the instructions, I added a white sticky-label to make it actually look like a floppy label. Once in the case it looks great!
Required Hardware
First off, we'll be using a Raspberry Pi Zero W, an old IDE cable and a 640x480 VGA screen for inside the case. Outside, some form of USB Keyboard and Mouse will be required to get everything installed. The Pi Zero is a very bare-bones unit and you'll need to get out the soldering iron, find some headers and solder up the GPIO interface.
From there, you just need to plug in the IDE cable and test it out. I did this first with just the standard RasPi install.
It worked fine... and was hilariously small.
Installing RetroPie
So, long-story-short, I tried the latest RasPiOS + yada and although the UI was lovely, the speed was shite. I then tried compiling my own BasiliskII and it just chuggggged. So, what's the answer? THIS IS THE INTERTUBES, someone has already done this: let me present to you RetroPie! Now, this is an amazing front-end + engines for Linux, to the point where configuration is out-of-the-box, but not so much for what we're about to do.... there's a bit of screwing around required!
First off, to get that Pi Zero W to boot, you're going to need to flash an SD card. On Windows, use the official Raspberry Pi Imager and choose RetroPie from the Emulators sub-menu.
Grab the card, a USB KB/Mouse and a display and boot the Pi. If everything works, you should be at a prompt to configure a gamepad?!
This was a little confusing for me as I didn't really care for a gamepad on this system at all. RetroPie expects you'll be playing Bubble Bobble, Snow Bros and Metal Slug, so it demands a controller configuration on installation. And so, with our goal being to play A-Train on System 7.5.5, we don't need a gamepad, but we'll still need to configure a device. This device will be a stock-standard keyboard and we'll need to tread lightly when mapping the buttons.
To get started, hold down a key on your keyboard for about 5 seconds. From there, please map the D-PAD directions to the arrow keys on your keyboard and then start=enter and select=space. From there, you can either spend time holding down any key to skip the association or just choose any key (don't choose the same key each time) to map to the millions of buttons. Once you succeed, the OK button will be highlighted and you get to press the key you mapped to button A.. do you remember?
If all is well, you'll have hit the screen above. This, in all it's glory, is RetroPie as a shell, with no engines underneath. Before we install engines, let's make sure we have full connectivity. Make sure that Configuration is showing under the RetroPie banner (use left and right buttons to select it) and then press the A button. You should see the following list:
From here, scroll all the way down to raspi-config (yes yes, the shot above doesn't show this highlighted!) and press A. You'll get thrown back to a console and raspi-config will load up in all of it's ncurses-glory. From here, configure wireless and enable SSH. Note that you'll be back to standard keyboard key mapping, so don't try and use the A button... just stick with your standard cursors keys and enter... escape'ing when you choose the wrong adventure.
Meanwhile, if you happen to select the wrong wireless country, you can hit escape to the main menu and re-select it in the Localization sub-menu by selecting WLAN Country.
SSH is under Interfaces and, once enabled, the configuration app will ask you to reboot. Do this. Finally, SSH in with your favourite terminal client using the credentials pi/raspberry.
.***. Sunday, 5 September 2021, 10:51:22 ***** Linux 5.4.72+ armv6l GNU/Linux `***' |*| Filesystem Size Used Avail Use% Mounted on |*| /dev/root 30G 2.5G 26G 9% / ..|*|.. Uptime.............: 0 days, 00h14m35s .*** * ***. Memory.............: 97496kB (Free) / 247472kB (Total) *******@@** Running Processes..: 88 `*****@@**' IP Address.........: 192.168.1.57 `*******' Temperature........: CPU: 48°C/118°F GPU: 48°C/118°F `"""' The RetroPie Project, https://retropie.org.uk pi@classicpi:~ $
From here, let's cut over to the VGA display. This is done via the following:
pi@classicpi:~ $ cd ~/ pi@classicpi:~ $ git clone https://github.com/tianyoujian/MZDPI.git Cloning into 'MZDPI'... remote: Enumerating objects: 323, done. remote: Counting objects: 100% (32/32), done. remote: Compressing objects: 100% (22/22), done. remote: Total 323 (delta 15), reused 26 (delta 10), pack-reused 291 Receiving objects: 100% (323/323), 1.54 MiB | 599.00 KiB/s, done. Resolving deltas: 100% (165/165), done. pi@classicpi:~ $ cd MZDPI/vga pi@classicpi:~/MZDPI/vga $ sudo chmod +x mzdpi-vga-autoinstall-online pi@classicpi:~/MZDPI/vga $ sudo ./mzdpi-vga-autoinstall-online ... setup setup ... Setting up libgtk2.0-0:armhf (2.24.32-3+rpt1) ... Setting up matchbox-keyboard-im (0.1+svn20080916-12) ... Setting up libgail18:armhf (2.24.32-3+rpt1) ... Setting up libgtk2.0-bin (2.24.32-3+rpt1) ... Setting up libgail-common:armhf (2.24.32-3+rpt1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libgdk-pixbuf2.0-0:armhf (2.38.1+dfsg-1) ... Processing triggers for mime-support (3.62) ... Processing triggers for libc-bin (2.28-10+rpi1) ... ZERO-W CM 2B 3B 3B+ CM3 pi@classicpi:~/MZDPI/vga $ sudo reboot
From here, reboot and disconnect your HDMI screen.
System RAM
I did note that my system was only reporting 256mb total system memory when it had 512mb on-board?
pi@classicpi:~ $ free total used free shared buff/cache available Mem: 247468 48468 91656 2932 107344 146248 Swap: 102396 0 102396
Turns out the boot configuration is allocating 256mb to Video RAM!? Let's fix that... we don't need anywhere near that much RAM for a 640x480 screen. Here's the important part in /boot/config.txt.
[all] gpu_mem_256=128 gpu_mem_512=64 gpu_mem_1024=256
The three lines are the settings related to actual system RAM. We care about gpu_mem_512 and, as you can see, it's setting VRAM to 256mb! Change that to 64 and reboot. Don't try any lower as RetroPie will struggle badly.
Install Basilisk II
Jump back into SSH and start up RetroPie's setup application. Note that you can also do this through the front end if you're working directly on the unit.
pi@classicpi:~ $ ls RetroPie RetroPie-Setup pi@classicpi:~ $ cd RetroPie-Setup/ pi@classicpi:~/RetroPie-Setup $ ls AUTHORS COPYRIGHT.md logs README.md retropie_setup.sh CONTRIBUTING.md LICENSE.md platforms.cfg retropie_packages.sh scriptmodules pi@classicpi:~/RetroPie-Setup $ sudo ./retropie_setup.sh
From here, you'll be warned you shouldn't have paid for this... and I hope you didn't.
You'll find Basilisk II (package:basilisk) under opt and Mini vMac (package:minivmac) under experimental. Note you'll also find OpenTTD under opt... I might try that for fun. All packages will ask you a few questions, I always default to install from binary.
After installing each package, you'll be brought back to that packages sub-menu offering options for the already-installed package... without it telling you that it installed correctly. Slightly confusing, but just press the TAB key to get Back highlighted below and then hit Enter.
Go and install anything else you're after, whilst you're here, and then choose the reboot option at the bottom. You'll then get a final warning, of which you'll only need to heed if you've been tinkering with the front-end whilst waiting for this stuff to install... I should've mentioned above that you shouldn't do this!
So... reboot!
Configuring Basilisk II
This took a little bit of working-out before I got it how I liked it. Emulators on RetroPie have configuration/data in multiple places. ROMs (of which Basilisk II needs) are in the main users' (pi, in this case) home directory, whereas configuration is in the /opt/retropie folder. We'll be tinkering around everywhere to get this to work.
Although we've installed the Basilisk II package, the individual configuration file for it hasn't been created yet. To make it appear, we need to actually kick off Basilisk II once and let it error back to the RetroPie menu. Do this now by going back to RetroPie and selecting Start from the Macintosh menu. If everything worked, there'll now be a configuration file located in /opt/retropie/configs/macintosh/.
Next, download the fundamental items to get Basilisk II to work: ROM, OS 8.1 ISO. Expand both items locally and then copy them across to the ~/RetroPie/roms/macintosh folder. Rename the ROM file to mac.rom and the ISO file to anything you want, but make sure it matches the configuration below. Also make sure the CD image is read-only:
pi@classicpi:~/RetroPie/roms/macintosh $ chmod -w macos_81.iso pi@classicpi:~/RetroPie/roms/macintosh $ ls -l total 935696 -r-xr--r-- 1 pi pi 420229120 Sep 5 12:01 macos_81.iso -rwxr--r-- 1 pi pi 1048576 Sep 5 11:35 mac.rom -rw-r--r-- 1 root root 0 Sep 5 11:06 Start.txt
We'll also need to create a harddisk file which we will format and install OS 8.1 onto inside the emulator. The following command will create a 512mb blank file.
pi@classicpi:~/RetroPie/roms/macintosh $ dd if=/dev/zero of=disk.img bs=1024k count=512 512+0 records in 512+0 records out 536870912 bytes (537 MB, 512 MiB) copied, 63.6174 s, 8.4 MB/s
Note that we've called it disk.img. This is because the RetroPie configuration specifies this file on the command line and we'll just use that, instead of adding more config. We do have to do a few other configuration changes, so open up /opt/retropie/configs/macintosh/basiliskii.cfg with nano and update the settings as follows. Note that, if you want to change the allocated RAM, you should use a proper 8-byte value, so lookup the value here and update the config accordingly.
displaycolordepth 0 extfs / seriala /dev/ttyS0 serialb /dev/ttyS1 ether slirp udptunnel false udpport 6066 bootdrive 0 bootdriver 0 ramsize 67108864 frameskip 6 modelid 14 cpu 4 fpu false nocdrom false nosound false noclipconversion false nogui false jit false jitfpu false jitdebug false jitcachesize 0 jitlazyflush false jitinline false keyboardtype 5 keycodes false mousewheelmode 1 mousewheellines 3 dsp /dev/dsp mixer /dev/mixer ignoresegv false idlewait true disk macos_81.iso
The 'extfs' option defines the location of the 'Unix' drive that appears on the desktop. Note that, although there is an 'extfs' option configured above, RetroPie overrides this on the command line and sets it to the directory where we've just copied everything to. It's a great mechanism for copying files into the emulated machine, so you can copy extra things into this folder and then access them in Basilisk II. You can even do it while it's running... just close and re-open the Unix folder.
With the configuration saved, you should be able to choose start from RetroPie and ...
Hah, it booted and OS 8.1 is installing. Slowly!
Getting Audio Out Of A Pi Zero W
This wasn't easy! The Pi Zero W is a tiny board, missing many of the standard components so save cost. One of the components missing is an audio-out jack, but fortunately we can wire one up to the alread-in-use GPIO header. One note before you read any of the following: The pin numbering on the header is different to the connected pin numbers on the main CPU. Most of the time, when sites talk about GPIO18 or GPIO19, they actually mean the pin on the CPU and not GPIO Header pin 18 or 19! Grab and build the tools here and then run the gpio readall command:
pi@classicpi:~ $ gpio readall +-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 2 | 8 | SDA.1 | ALT2 | 1 | 3 || 4 | | | 5v | | | | 3 | 9 | SCL.1 | ALT2 | 1 | 5 || 6 | | | 0v | | | | 4 | 7 | GPIO. 7 | ALT2 | 1 | 7 || 8 | 0 | ALT2 | TxD | 15 | 14 | | | | 0v | | | 9 || 10 | 0 | ALT2 | RxD | 16 | 15 | | 17 | 0 | GPIO. 0 | ALT2 | 0 | 11 || 12 | 0 | ALT5 | GPIO. 1 | 1 | 18 | | 27 | 2 | GPIO. 2 | IN | 1 | 13 || 14 | | | 0v | | | | 22 | 3 | GPIO. 3 | ALT2 | 0 | 15 || 16 | 0 | ALT2 | GPIO. 4 | 4 | 23 | | | | 3.3v | | | 17 || 18 | 0 | ALT2 | GPIO. 5 | 5 | 24 | | 10 | 12 | MOSI | ALT0 | 0 | 19 || 20 | | | 0v | | | | 9 | 13 | MISO | ALT0 | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | | 11 | 14 | SCLK | ALT0 | 0 | 23 || 24 | 0 | ALT2 | CE0 | 10 | 8 | | | | 0v | | | 25 || 26 | 1 | ALT2 | CE1 | 11 | 7 | | 0 | 30 | SDA.0 | ALT2 | 1 | 27 || 28 | 1 | ALT2 | SCL.0 | 31 | 1 | | 5 | 21 | GPIO.21 | ALT2 | 0 | 29 || 30 | | | 0v | | | | 6 | 22 | GPIO.22 | ALT2 | 0 | 31 || 32 | 1 | ALT2 | GPIO.26 | 26 | 12 | | 13 | 23 | GPIO.23 | ALT2 | 1 | 33 || 34 | | | 0v | | | | 19 | 24 | GPIO.24 | ALT5 | 0 | 35 || 36 | 0 | ALT2 | GPIO.27 | 27 | 16 | | 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | ALT2 | GPIO.28 | 28 | 20 | | | | 0v | | | 39 || 40 | 0 | ALT2 | GPIO.29 | 29 | 21 | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+
So, there's a lot to take-in above. Note it's mirrored, so start outside-in when reading. On both outside columns are the GPIO pins of the BCM CPU. We're looking for 18 and 19 in these columns. Above, I've already actually configured the unit for sound, so you'll see that these are configured for ALT5. To understand ALT5, you can read the GPIO mappings here, but just understand that both need to be ALT5 for PWM to come out of 18 and 19. These then map to header-pins 12 and 35 respectively. You'll find these two numbers in the inner two columns on the table above.
Next, we'll need a bit of physical hardware to interface with the GPIO header. Fortunately, since I have used an old IDE cable, we already have a point to connect into! The IDE cable has the middle header on the Raspberry Pi, one end on the LCD and, on the final end, we'll need to tap into pins 35 and 12. From these pins, we'll wire into a low-pass filter as per the circuit schematic here.
The VGA project specifically left GPIO18 and 19 free to let us have audio out, but they aren't enabled just yet. To do this, we'll need to edit /boot/config.txt once more and tell it to send PWM out the required pins. Add the following line to the very bottom of the file:
dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2
The first note here is that func2=2 somehow equals ALT5, which is what we want. The second is that, with any future changes of boot config by any software, you should review this file and make sure this configuration is still at the bottom! Once confirmed, reboot and double-check that headphones are selected in raspi-config.
Save and exit and see what happens when you test with:
aplay /usr/share/sounds/alsa/Front_Center.wav
If the sound is quiet, then use alsamixer to adjust the volume.
┌───────────────────────────────────────── AlsaMixer v1.1.8 ──────────────────────────────────────────┐ │ Card: bcm2835 Headphones F1: Help │ │ Chip: Broadcom Mixer F2: System information │ │ View: F3:[Playback] F4: Capture F5: All F6: Select sound card │ │ Item: Headphone [dB gain: 1.25] Esc: Exit │ │ │ │ │ │ │ │ ┌──┐ │ │ │ │ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ │▒▒│ │ │ ├──┤ │ │ │OO│ │ │ └──┘ │ │ 90 │ │ <Headphone > │ │ │ │ │ └─────────────────────────────────────────────────────────────────────────────────────────────────────┘
Bump the volume up to 90%.
Networking
So, TCP/IP to the internet should just work. AppleTalk to local ethernet devices probably won't work as AppleTalk packets don't survive over Wireless. I don't know why... but it's the same thing that happened when I was mucking around with physical LocalTalk adapters. Since I have another Pi on the network providing AppleTalk shares, I have the option to create a VPN and route AppleTalk over it to make it show up in Chooser auto-magically... but on a first attempt, the effort required is huge. I'll stick with manual IP entry for now, as that works fine!
The End Result
The screen is hilariously small, but games can be played!
The Pi Zero has just enough CPU to run OS 8.1 and A-Train. Audio works great and the MIDI sounds fine!
Shares are mounted via AppleTalk to the NAS and all is well!
IBM 45U0018 POS Keyboard
I saw this unit on eBay and couldn't resist. It really did remind me of the department store POS keyboards and I remember them being clicky. I checked the photos on the auction and saw that it had a non-standard socket and no cable included. You can download the drivers/configuration-utility here.
The main keys are fixed, but the surrounding keys have optional translucent key 'covers' where inserts have been placed for special functions. Some of them even cover standard keyboard keys.
But yeah, back to the socket, and do excuse the photo...
It's very similar to a standard IDC Header, but in-set which makes it really difficult to use anything other than IBM's proprietary cables. After a lot of googling, I found that there's both a USB and PS/2 cable version available.
Unfortunately, these weren't actually available anywhere... and if they were, the cost was out of control. It seems that these keyboards could also just dock onto the POS system above the till, so it's possible that the cable was only required if you wanted to mount the keyboard elsewhere. Anyway, a cable would be too easy... I'm sure we can work this out!
What does it look like on the inside?
With the hunch that the port supported PS/2 and USB, the keyboard was opened to work out the pinout. Opening it was actually very easy with just 6 small screws on the back. A large plate comes off and then there's just a bit of foil-cardboard shielding over the main circuit board.
Inside, of note, were a TUSB2046B IC and a STM32F103VBT6 Microcontroller with V0326_PF.bin programmed into it. The first IC happens to be the brains for a USB 4-port hub and provided a huge hint for determining the unit's wiring. I started tracing along the pins and the table below is the result.
Note that, when looking at the back of the keyboard into the socket when the keyboard is UPSIDE-DOWN on a flat surface, I've started Pin 1 from the top-right, with pin 6 then being top-left, pin 7 bottom-right and pin 12 bottom-left. This turned out to be silly as all the wires are in vertical pairs. Note this has been updated from the great resource at sharktastica.
Pin # | Connected To | Notes | USB Cable |
---|---|---|---|
1 | Pin 1 of T-46 aka TPS73633DBV | Voltage supply for the power regulator. Must be 5v! | Pin 1 - Red |
2 | Pin 1 of TUSB2046B | DP0 = Root port USB differential data plus. DP0 paired with DM0 constitutes the upstream USB port. | Pin 3 - Green |
3 | NC? | ||
4 | Pin 3 (or 6) of U4 | U4 is not populated. | |
5 | Pin 64 (PC7) of STM32F103VBT6 Microcontroller | PS/2 Keyboard Clock | |
6 | Pin 48 (PB11) of STM32F103VBT6 Microcontroller | PS/2 Mouse Clock | |
7 | GND | Pin 4 - Black | |
8 | Pin 2 of TUSB2046B | DMO = Root port USB differential data minus. DM0 paired with DP0 constitutes the upstream USB port. | Pin 2 - White |
9 | NC? | ||
10 | Pin 2 (or 7) of U4 | U4 is not populated. | |
11 | Pin 66 (PC9) of STM32F103VBT6 Microcontroller | PS/2 Keyboard Data | |
12 | Pin 52 (PB13) of STM32F103VBT6 Microcontroller | PS/2 Mouse Data |
Ok, so that's easy for the USB connection.. just wire the 'upstream' pins, +5v and GND into a spare USB cable. The other 2-pair of wires which run into the Microcontroller must be for the PS/2 mouse and keyboard? I wonder which is clock and which is data? There are plenty of images online showing microcontroller-to-PS/2-port hookups, so I'll try that after USB.
Hooking Up USB
USB cables contain 4 wires. First you need two wires for a very standard 5v DC rail and then you need two more wires to transmit and receive data. As you can see from the table above, we have all of these already mapped out. This was all very straight-forward thanks to the documentation for the TUSB2046B USB Root Hub IC. I grabbed a bunch of spare parts from the box'o'junk and started wiring something together. The USB cables I first tried to use happened to be power-only? No data lines! No wonder someone else threw them out.
Too short anyway! So instead, I remembered I had a mini USB socket in another tray'o'junk and set to wiring that up...
I plugged it into my RasPi 400 and it evicted all USB devices...
Sep 2 17:04:30 raspberrypi kernel: [63187.047153] usb usb2-port1: over-current change #1 Sep 2 17:04:30 raspberrypi kernel: [63187.202027] usb 1-1-port1: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.278524] usb usb2-port2: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.438880] usb 1-1-port2: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.518607] usb usb2-port3: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.678902] usb 1-1-port3: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.758546] usb usb2-port4: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.918864] usb 1-1-port4: over-current change #1 Sep 2 17:04:31 raspberrypi kernel: [63187.998562] usb usb2-port1: over-current change #2 Sep 2 17:04:32 raspberrypi kernel: [63188.238478] usb usb2-port2: over-current change #2 Sep 2 17:04:32 raspberrypi kernel: [63188.478480] usb usb2-port3: over-current change #2 Sep 2 17:04:32 raspberrypi kernel: [63188.718503] usb usb2-port4: over-current change #2 Sep 2 17:04:32 raspberrypi kernel: [63188.890074] usb 1-1-port1: over-current change #2
Ooops! Why am I chewing too much power? I google'd around and couldn't find an easy solution to inject my own power, as all answers indicated VCC needed to stay connected. Looking at my wiring again, I realised that this error was bound to happen as I'd wired the polarity around the wrong way! So, after correcting that...
Sep 2 18:44:47 raspberrypi kernel: [69203.309095] usb 1-1.3: new full-speed USB device number 9 using xhci_hcd Sep 2 18:44:47 raspberrypi kernel: [69203.443182] usb 1-1.3: New USB device found, idVendor=0451, idProduct=2046, bcdDevice= 1.25 Sep 2 18:44:47 raspberrypi kernel: [69203.443193] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Sep 2 18:44:47 raspberrypi kernel: [69203.449815] hub 1-1.3:1.0: USB hub found Sep 2 18:44:47 raspberrypi kernel: [69203.452677] hub 1-1.3:1.0: 4 ports detected Sep 2 18:44:47 raspberrypi kernel: [69203.779047] usb 1-1.3.4: new full-speed USB device number 10 using xhci_hcd Sep 2 18:44:47 raspberrypi kernel: [69203.922725] usb 1-1.3.4: New USB device found, idVendor=04b3, idProduct=4604, bcdDevice= 3.26 Sep 2 18:44:47 raspberrypi kernel: [69203.922734] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Sep 2 18:44:47 raspberrypi kernel: [69203.922741] usb 1-1.3.4: Product: IBM Retail USB Alphanumeric POS Keyboard Sep 2 18:44:47 raspberrypi kernel: [69203.922747] usb 1-1.3.4: Manufacturer: (c) Copyright IBM Corp. 2008 Sep 2 18:44:47 raspberrypi kernel: [69203.922752] usb 1-1.3.4: SerialNumber: 44T4011-200811231006420977000036 Sep 2 18:44:47 raspberrypi kernel: [69203.935428] input: (c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.0/0003:04B3:4604.000D/input/input18 Sep 2 18:44:47 raspberrypi kernel: [69204.000545] hid-generic 0003:04B3:4604.000D: input,hidraw4: USB HID v1.00 Keyboard [(c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard] on usb-0000:01:00.0-1.3.4/input0 Sep 2 18:44:47 raspberrypi kernel: [69204.008558] hid-generic 0003:04B3:4604.000E: hiddev97,hidraw5: USB HID v1.00 Device [(c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard] on usb-0000:01:00.0-1.3.4/input1 Sep 2 18:44:47 raspberrypi kernel: [69204.016919] hid-generic 0003:04B3:4604.000F: hiddev98,hidraw6: USB HID v1.00 Device [(c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard] on usb-0000:01:00.0-1.3.4/input2 Sep 2 18:44:47 raspberrypi kernel: [69204.035363] input: (c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.5/0003:04B3:4604.0010/input/input19 Sep 2 18:44:47 raspberrypi kernel: [69204.036075] hid-generic 0003:04B3:4604.0010: input,hidraw7: USB HID v1.00 Mouse [(c) Copyright IBM Corp. 2008 IBM Retail USB Alphanumeric POS Keyboard] on usb-0000:01:00.0-1.3.4/input5 Sep 2 18:44:47 raspberrypi mtp-probe: checking bus 1, device 10: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4" Sep 2 18:44:47 raspberrypi mtp-probe: bus: 1, device: 10 was not an MTP device Sep 2 18:44:48 raspberrypi mtp-probe: checking bus 1, device 10: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3.4" Sep 2 18:44:48 raspberrypi mtp-probe: bus: 1, device: 10 was not an MTP device
HAHA. It just worked. It's very loosely-clicky, but not bad at all. Hilariously sounds like the registers at David Jones. The trackpad and touchpoint actually work beautifully as well. Very impressive. I assume there's further commands that could be sent to change LEDs, use the peripherals, but I don't need it.
PS/2 Wiring
I didn't feel like plugging this into a PC and restarting it 17 times to work out the wiring, so I used an Arduino Uno instead! Unfortunately, no combination of pairs would get the unit to produce any output. I'll have to do some more digging at some point in the future... a cop-out, I know, but I'm happy with USB for now!
UPDATE: There's a pinout here at sharktastica.
Printing a proper plug
I searched Thingiverse and found a very nice set of IDC Plug Frames. I then dragged that frame into Tinkercad and stretched it to make it fit better. The result is here.
From there, I used standard 'single' jumper wires to build the 6x2 inner plug and glued them in place. I then soldered up a spare USB cable.
Perfect! Note there's still plenty of these keyboards on eBay from a WA seller. Highly recommended!