Subscribe via RSS
25Nov/212

NEC PC-9801VX – Tear-down

I've always been fascinated by the older Japanese beige desktops and couldn't resist another impulse-buy when I saw this PC-9801VX show up on eBay. It was cheap, as it was listed as junk, until the shipping cost doubled the price. Regardless, I took the gamble, as I have a copy of A-Train for the PC-98 that needs a home.

20211124 174537

It arrived quickly, as postage from Japan can only currently be done via expensive couriers. Before long it was plugged into the step-down converter and failed to do anything good. From what I understand, on power up these machines are meant to PI-PO from their internal speakers... Of which this one did not!

A quick tear down saw the cause... but more on that later. What was I thinking?; purchasing such a huge beige boxen of junk. Fortunately, the tear down also saw that it came with surprises! The list included: a 4MB o'RAM CBUS board, an 8MB o'RAM CBUS board, a SCSI CBUS board and a SASI CBUS board. Also, two 5 1/2" floppy drives which can't be scoffed at... if they work.

20211124 174737 20211124 174728 20211124 174708 20211124 174812

After a lot of research, it turns out that this unit is actually a 286, when purchased new. There's a lot of information online, but most of it is in Japanese. Fortunately, Wikipedia has a great article on the PC-98 series of machines and, if you scroll down far enough, you'll see this unit listed as an 80286 @ 8 or 10 MHz. BUT! What's that random sticker on the front?

20211125 095514

A 486, you say? In a 286 motherboard? I didn't quite believe it when I saw the photos on the auction... but opening it up showed that there was a slot for CPU upgrades and, well yes, you can actually put a myriad of faster CPUs in there! This one just happened to have a 486 upgrade.

20211125 095550

Nice. This opens up the game-play and MS Windows opportunities... if only I can get it to run.

Why wouldn't it boot?

Unfortunately, once down to the board, the CMOS battery proved to be the cause of failing to post. Excuse the awful photo, but I was in a state of buyer's remorse...

20211103 170605

You can see the green.. all the way into the CPU slot (middle-bottom) and, well, even further off the edges of the photo. The battery was quickly removed, but the damage was far-spread. Without schematics, tracing those corroded lines would be a nightmare. But what if I could find a replacement?

Buyee to the rescue

Turns out I had a cart of things to purchase from Japan, so I bit the bullet and purchased a junk spare motherboard for this machine. Yes, junk! That's all that was available online... no one in their right-mind would list these boards as 100% brand-new and ready-to-roll. I threw in a LAN card and a terribly-yellowed keyboard, just to double-down on my losses if everything failed! These also arrived in quick succession as Buyee charges like a wounded bull for shipping and uses top-notch couriers.

20211117 150338

The board was inspected and, to my surprise, was somehow perfectly clean. As above, you can see that the battery had corrosion, but it hadn't spread! Compared to the other board, it was a beautiful site.

20211123 215959

20211123 220027

Shit photo, I agree... but above you can see the difference of the areas under the battery. Top being the newly-acquired board, bottom being the one I may have half-attacked with isopropyl and a toothbrush. Maybe, now that I have a working board, I can trace everything on it and check on the old... but honeslty, even in 1986 these boards were so bloody complex that I don't believe I have the skills to re-trace all of those traces.

But does it work?

Everything was assembled hastily... First flick of the switch, nothing... crickets. After a re-seat of everything that could be re-seated, I flicked it again. During the re-seating, I'd also turned the front volume dial up to MAXXX and, on pressing the power a seriously neighbour-annoying PIIIII-POOO PAAAAAAAAAAAAAA was emitted... Of course, the glee of the first two notes was murdered when that last note came out, deafening and disturbing, lasting until I hit the power switch.

Third flick, after another re-seat... PI-PO! Shit, that sounded perfect... I just had nothing plugged in to any video outputs.

Making it output video

This vintage beast loves its archaic refresh rates (more info here). RGB is 15khz or possibly 24khz, but nothing a new monitor will approve of. This video card has three output ports and you'll find the pin-outs here. I hacked together a 5-pin DIN to RCA plug cable (same as the Megadrive, actually, just without sound) and hooked it from the video card's top Mono output port to my 4:3 Samsung LCD.

It worked! But the picture wasn't great... maybe this is NTSC? Probably. I re-installed my capture card and tested out VLC with correct NTSC_J settings.

pc-9801-memcheck pc-9801-basic-startpc-9801-scsi-bios

It @#$%#$$# works! That last shot is with the SCSI card in... so it's found the TEXACO BIOS (is that the oil company? where did this machine come from?!) and tried to enumerate SCSI devices. I had none for it... so I removed ALL CBUS cards and tried to boot my A-Train floppy...

pc-9801-floppy-boot-attempt

First drive found nothing, and when nothing is found the machine just boots into the BASIC prompt. After a reboot with the floppy in drive B, it produced the above and stalled. It actually sounded pretty bad... but diagnosing the floppy drives is a whole-nother post, of which I'll tackle later.

In the meantime, if you want to know more about these machines, check out NEC PC98 Basic Reference. The amount of information in there is amazing!

(Update: The floppy drives live!)

Filed under: Retro 2 Comments
12Nov/210

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.

DSC04193

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.

20211112 205239

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.

20211107 092925 20211107 093027 20211107 093356

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...

20211107 093655

Oh shit...

20211107 093702

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.

20211107 092715 20211107 093500 20211107 120041

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!

20211112 210841 20211112 210852 20211112 211014

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!

20211112 182856

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:

20211112 183023

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.

Filed under: Vaio No Comments
9Nov/210

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...

TA-1

TA-2

TA-3

TA-4

It's a 4-panel fold-out, with a full map on the back.

map

As usual, here's a better resolution version of the full-width map.

Filed under: AUS No Comments
8Nov/210

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!

Tokyo Railway Map - Cover

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.

Tokyo Railway Map

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!

Filed under: JPN No Comments
7Nov/210

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... and I found it!. See the end of the post.

tenshodo-2 tenshodo-1

tenshodo-3 tenshodo-4

tenshodo-5 tenshodo-6

tenshodo-7 tenshodo-8

tenshodo-9 tenshodo-10

tenshodo-11 tenshodo-12

tenshodo-13 tenshodo-14

tenshodo-15 tenshodo-16

tenshodo-17 tenshodo-18

tenshodo-19 tenshodo-20

Beautiful rolling-stock. Interestingly with an inclusion of Japanese Freight cars! But no Japanese locomotives. And now, the prices:

No conversions or adjustments for inflation... apologies.

Filed under: MRR No Comments
5Nov/210

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.

akane-3 akane-4

akane-2 akane-1

akane-5 akane-6

akane-9 akane-10

akane-12 akane-11

akane-7 akane-8

Some now-beautifully-expensive rolling stock!

Filed under: MRR No Comments
4Nov/212

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:

X2000-1

X2000-2

X2000-3

X2000-4

Wait, no, I suppose this is the actual proof...

Image

Oh! They also handed out rulers... one of mine seems to have enjoyed a bake in the sun.

Image

And here's a sticker of the actual unit that was powering the set... making the whole process pointless...

xpt stickers

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.

Filed under: AUS 2 Comments
12Sep/213

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.

20210912 133354 20210912 133403 20210912 133420

20210912 133438

The 'shell doesn't stay on chassis' defect was pre-communicated, but something else wasn't:

20210912 133445

It's missing an eye!

20210912 133525

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:

VT135-Light-Pipe

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...

20210912 141201 20210912 143947 20210912 133549

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:

20210912 144507

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.

Filed under: MRR 3 Comments
10Sep/212

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."

received 898562814076309

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...

received 544488250168490

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!

20210910 181650 (1)

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?

Filed under: Retro 2 Comments
6Sep/213

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?

DSC03952 DSC03954 DSC03951

DSC03955

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!

DSC04001

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.

DSC03989

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.

DSC03996

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.

rpimg1

rpimg2 rpimg3 rpimg4

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?!

DSC04126

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.

DSC04128

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?

DSC04132

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:

DSC04127

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.

packages-1

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.

packages-2 packages-3 packages-4

packages-5

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.

packages-6

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!

reboot-2

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 ...

DSC04107

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.

DSC04105

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.

audio-1

audio-2 audio-3 audio-4

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!

241118466 361998575428700 6298152496122914924 n

The Pi Zero has just enough CPU to run OS 8.1 and A-Train. Audio works great and the MIDI sounds fine!

241139049 609410486890269 6802814062589133231 n

Shares are mounted via AppleTalk to the NAS and all is well!

Filed under: Apple 3 Comments