PLCC 44 PROM programming with TL866
Even the retro world is moving away from the regular DIP packaging sometimes. The Atari Falcon, and third party ROM boards from Exxos, use the 27C4096 PROM in PLCC packaging to hold TOS (the operating system).
The TL866 with its DIP40 socket cannot obviously handle these, but a quick search shows us that there exists many adapter packages available to purchase that will sort out various types of popular socket formats. Including 44 pin PLCC.
However, the most common such adapter isn’t meant for PROMs, but for micro controllers (like the AT89C51 used for the example below). While the pin assignment is almost the same, for the critical purpose of programming the NC pins are swapped.
$ minipro -p AT27C4096@DIP40 -r test.bin
Found TL866A 03.2.86 (0x256)
Invalid Chip ID: expected 0x1E00F400, got 0xFFFFFFFF (unknown)
(use '-y' to continue anyway at your own risk)
If we want to program PROMs with this adapter, we need to perform a slight modification.
Simply, but carefully, bridge pins 12-13 and 33-34 on the PLCC adapter (not the DIP!) and off you go.
$ minipro -p AT27C4096@DIP40 -w dualtos_swapped.img
Found TL866A 03.2.86 (0x256)
VPP=13.5V, VDD=6.5V, VCC=5V, Pulse=100us
Chip ID OK: 0x1E00F400
Writing Code... 77.79Sec OK
Reading Code... 5.58Sec OK
Verification OK
Happy programming.
TL866 firmware updater macOS support
I own a TL866CS IC programmer. Wonderful device – I truly recommend it (and I assume its successor is even better). It’s been known for many years that the company who made them had one hardware revision, and limited the CS revision compared to the A revision purely in firmware.
That limitation has of course been hacked for almost as long as the device has existed. Someone going by the name “radioman” detailed many years ago how the bootloader could be reflashed from CS version to A, after which the original software and firmware updates will see the device as the A model in all aspects. To get access to the in-circuit programming abilities, you additionally have to solder a header to the mainboard.
radioman’s software is open source, and exists for Linux (QT) and Windows (.NET/QT). People say it works great under parallells or VirtualBox for macOS users.
But that’s no fun, is it?
I spent the last week changing out libudev for macOS’ native IOKit library in the QT codebase. That’s the only change needed, since libusb has good macOS support. My macOS pull request has now also been accepted and merged into master by radioman.
Open source working as intended. And my TL866CS has become a TL866A.
Kokoon Relax headphones review
[this post has been updated, see additional edits being made at the bottom]
April 2018 I saw a Facebook ad for a pair of headphones that sounded like the perfect match for my needs. I’m a severe insomniac, and a frequent flier. I’ve had the same pair of Sony MDR-NC32NX in-ear noise canceling headphones for a decade, and I was looking for something new.
Yesterday they arrived. Now, this was originally a Kickstarter (and I have seen that not all backers have gotten theirs yet) but when I ordered they expected to ship them in July the same year. Delays happen.
Now, for the rest of this review. If you’re looking for the best sound quality, or the best noise cancelation, these are not the headphones for you. My circles tell me the Sony WH-1000XM3 would be what you’re looking for. If you’re however looking for an extremely slim profile with a focus on helping with relaxation and insomnia – keep reading.
After having unpacked them, and tried them on (wow – they’re heavy!) I charged them up and started to play around. Connecting them to my iPhone was no problem (they’re Bluetooth) and the Kokoon Relax app is nicely laid out for you to download calming soundscapes to have in the background. This worked well during the evening yesterday.
Later at night, I connected them to my Macbook Pro (again, wirelessly) when going to sleep. I listened to some tv-series and Youtube episodes, and then decided to try to go to sleep. No matter what audio source you’re listening to, they’re supposed to detect when you have fallen asleep and turn down the sound a few minutes after.
I’m a side sleeper, which Kokoon has this to say about:
Earbuds and bulky noise canceling headphones will make it difficult to sleep for side sleepers. By relocating the headphone electronics from the ear cups to the headband, we have been able to achieve the lowest possible profile, maintaining the natural shape and characteristics of the head in bed. Combining this with cushioning has enabled us to ensure the headphones are comfortable.
… yeah, no. I have the perfect pillows to support this (soft and deep) but there’s no way I can side sleep with these comfortably at home in my bed. That’s a bummer, because that was one of my hopes. However, I still need a pair of headphones for when I’m traveling, and I don’t always upgrade to business class so sit-sleeping is still a thing.
This morning (day of use #1) I was unable to connect the headphones to my phone when leaving in the morning. The battery had run flat, which I now realize is because while the headphones can detect that you take them off (and pause the audio) the ability to turn themselves off is still a feature in development. I then charged them at work, and tried again on the way home. I was still not able to connect – until I tried re-pairing them with the phone.
This caused me to believe that they can only be recognized by one device at a time – but this also turned out to be wrong. When back home, the audio kept disconnecting from the phone and at one point connected to the computer (where a Youtube video started playing automatically). So I had to turn off Bluetooth on the computer. But I still have had no luck this evening – the few times I’ve managed to connect the headphones to the phone I’ve had a few minutes at the most before they suddenly disconnect (and turn off – with a very unpleasant audible ‘pop’ in your ears) and I have problems connecting them back again.
I now tried to hard-reset (power+action buttons for some 10 seconds) them a second time but it seems the battery has run flat.
Conclusion after unpacking day and 1st day of use is: Wow, this is a very very unfinished product.
Day #2 to #4:
Alright, so I’ve learnt that whenever I want to switch between phone and computer use I need to press the action button for a few seconds and reconnect through the Bluetooth menu. That’s not extremely problematic, I can live with it. Besides that I’ve only had a single surprising issue where the headphones disconnected from the computer while I was watching a show. A press of the power button made them come back alive.
I’ve also made it a habit to charge them whenever possible since I believe they have issues when at near low charge, which I’m of the impression happens a lot quicker than I would’ve expected.
So what now? The only thing I’m currently using them for is as a pair of regular Bluetooth headphones. I can’t side sleep with them, the EEG stuff seems unfinished (I know the app claims I fell asleep once when I listened to music, which I decidedly did not) and the ANR (Automatic Noise Reduction) is barely noticeable and I’m even unsure if it’s active. In this case I compare to my old Sonys which were truly awesome at it, but also a lot more noticeable (“pressure” on the eardrums).
Additionally, they make my outer ears hurt after a while, which the headphones I use when playing Playstation VR or my precious “office headphones” didn’t. Not sure why this is yet.
Day #5 to #9:
Regular usage as Bluetooth headphones has worked fine these days, although that’s not really what I bought them for. Just now I’m unable to get them to work though, which I think is connected to having taken them off allowing the automatic music-pause to kick in. After that they’re “dead”. Can’t turn them on, can’t reconnect them to something else, charging doesn’t make a difference, even the hard-reset button combination seems to do nothing.
Will try charging them for many hours, followed by trying to deplete them completely, and see what happens. Since I’m not a Kickstarter customer I do have consumer protection to use if necessary.
Day #10 and #11:
Continuing from above, after they had stopped responding, charging didn’t work. The green led blinked as if they were charging, but after many hours it still hadn’t turned solid green indicating they were fully charge. I tried to see if anything had changed as to responding to any button presses, which it hadn’t, and then let battery run out flat instead.
That worked fine – the next day I could charge them and they went solid green in the expected timeframe. However, they’re still not responding to any keypresses (power on, hard reset by pressing both buttons for an extended amount of time etc) and there’s no LED activity whatsoever.
My conclusion is that they’re bricked. I will now contact Kokoon to let them know these headphones are going back and I expect a full refund. This will be fun.
April 10th
Final update: I today received the refund for the headphones, and I want to credit Kokoon for being swift about it. They initially wanted to send out a replacement but I simple wrote back that I wasn’t a Kickstarter backer but a regular customer, and the headphones didn’t match the spec I had been told when ordering them (besides being completely dead after 9 days).
I bought the Sony WH-1000XM3 instead a while back and they’re absolutely amazing.
GrafX2 SDL2 version for macOS 64-bit

update 21/7: I’ll make regular builds of this, and hope to have it completely automated soon. They can be found here (link might change in the future):
original post: 12 hours ago SDL2 support was merged into the popular retro graphics program GrafX2. Here’s a fully distributable macOS x86_64 binary (only tested on macOS High Sierra) built from that.
Thanks to evil/DHS for letting me know of the new SDL2 support, even before it was actually merged ;)
(If you try to build from source yourself there are edits I’ve done on my local branch to make it build and include the support libraries/frameworks. Ask away)
Batterieliminera Ljusbox TORLEIF från Jysk

När jag fyllde år fick jag en ljusbox från Jysk av familjen. Barnen tycker den är helfestlig eftersom man kan skriva egna saker med hjälp av de medföljande bokstäverna, och den passade alldeles utmärkt på nattduksbordet. Den är, precis, stark nog att kunna fungera som sänglampa – än har inte åldern kommit ifatt min förmåga att kunna läsa böcker i dämpat ljus.
Däremot drivs den enbart av batteri (6st AA). För att ha den som långvarig mysbelysning kändes det suboptimalt, så idag satte jag mig och byggde om den.
6st 1.5V batterier betyder att den drivs med 9V. Jag hade redan en sådan nätadapter liggande, annars kan de köpas från Kjell & Company, där jag även köpte honkontakten för chassimontage.
Här kan man stanna, om man inte längre vill ha kvar möjligheten att använda batterier. Eftersom jag har gott om DPDT-switchar liggande var det dock inte mycket merjobb att lägga till möjligheten att växla mellan nät- och batteridrift.
Efter att ha öppnat upp ljusboxen (den är knäppt på, använd en flat skruvmejsel och bänd försiktigt tills du lyckats lyfta upp en kant. Skruvarna på baksidan håller enbart fast batterihållaren och behöver inte tas bort) så ser vi snabbt att konstruktionen är väldigt enkel. Batteripacket är kopplat minus direkt till LED-slingan, och pluspolen går via strömbrytaren.
Vi återkommer strax till omkopplingen, men först sätter vi dit de nya kontakterna. Jag använder en liten dremel för den här typen av arbete, samt en nagelfil av metall för att göra fyrkantiga hål fyrkantiga. Desto mer tid man lägger ner på att få det snyggt, desto bättre blir det. Här lade jag ner medelmycket tid.
Och därmed är vi framme vid omkopplingen. Batteripackets minus samt pluspol går till de två lödöronen på ena sidan switchen, och till den andra sidan kopplar vi plus och minus från DC-honan. Mitten på switchen kopplas minus till LED-slingan, och plus kopplas via strömbrytaren.
Och sedan är vi klara. Tack vare DPDT-switchen finns det inget problem i att ha både batteri samt nätadapter inkopplade samtidigt, även om det är lämpligt att enbart ha det senare för att inte riskera att oanvända batterier ligger och läcker.
En av bilderna här är tagen med batteridrift, en med nätdrift.
(Och som ni förstår öppnade jag raskt upp ljusboxen igen och flyttade in kablarna till kanten … )
Atari ST wakestate nudger
I’ve added yet a new little description to Projects – a circuit and modification to “nudge” wakestates on Atari STs without needing to power cycle.
Atari ST new video modes

I’ve done an extended writeup of a little project I’ve been working on and off on for the last few months. Extending the video modes of an old Atari ST in new and interesting ways.
Going from 4 colors to 16 might not sound much with today’s tech, but for us oldies this is pretty fascinating ;)
Hatari macOS nightly builds
For a few years now I’ve helped out the excellent Hatari Atari 16/32 bit emulator project with macOS builds. However, the Hatari release cycle is about once every year and I’ve myself noticed that the developments that take place in between are very useful and so I’ve sporadically made development builds available as well. Sometimes. When I’ve felt like it.
Of course, I can do better. While I don’t have a 24/7 macOS server running, and thus can’t completely automate a nightly build setup, my laptop will now try to produce new builds (whenever the source repository has changed) during other usage and publish them here: Hatari macOS nightly builds.
Please let me know if you find this useful, and if there are any changes I could do to make it even better.
The tale of high density Atari mystery
The Atari ST, like other computers at the time, had Dual Density disk drives with 720KB of storage. DD for short. Since High Density (1.44MB) appeared shortly after, Atari used such drives in the more top of the lines models Mega STE and TT. Additionally, us enthusiasts and hardware hackers added HD capability to the regular ST and STE range since it was neat to store twice the amount of data on suitable disks (and it worked pretty well cutting a hole in DD disks tricking the drives into thinking they were HD, even though the magnetic layer is slightly different).
All the above is of course very well known. However, recently I’ve managed to dig up some less well known information as well as adding new discoveries about our dear 30 year old hardware. This is a post about that.
Atari used several different makes of DD drives in the ST computers, but one of the more common is the Epson SMD-380. For the higher end models with HD support Atari however used one model exclusively, the Epson SMD-340. For after market HD modifications of ST:s one drive in particular became quite popular, the Sony MPF-920. If you search online for kits and instructions, that’s the drive you’ll find the most info on.
It’s not only the drive that decides whether to write in Double Density or High Density however. The data needs to be clocked faster through the drive onto the disk, and so it’s not enough just swapping in and out the drives mentioned above to choose between DD and HD support. A neat little trick is that the floppy controller used by Atari, the 1772 (made by WD and VL), outputs a DD capable signal when clocked at 8MHz and HD when clocked at 16. In a regular ST it’s always clocked at 8MHz, and in the Mega STE and TT Atari used carefully tested chips that could do 16MHz (and later elected to produce a variant themselves, known as the AJAX chip, that was designed to run at 16).
The way to get HD support in a regular ST is thus to clock the floppy controller at 16MHz when writing/reading an HD disk. I might be misremembering, but I think my own first HD mod needed manual selection through a switch and so I needed to select the right position depending on the disk I used. A much better option is of course to ask the drive if there’s a DD or HD disk inserted, and switch clock speed depending on that. This is what’s well documented for the Sony MPF-920 and is how the many different “HD kits” know what to select.
Now here’s where things start to get confusing. In many places you can find documentation to the effect of pin 2 of the floppy interface being a density select signal. An output. While that might be true for some drives, my research says that it’s an input. The Atari Mega STE and TT (the Epson 340 drive) does not get told whether there’s an DD or HD disk in the drive, and yet they still have full support for both formats. This part of the mystery took me to an old discussion thread from 2008 which seems to be the first time someone actually looked into how this was done. There’s a memory mapped register, handled by a PAL chip, that the Atari operating system (TOS) writes to to set the clock frequency of the floppy controller. The logical conclusion is thus that TOS switches frequency when encountering errors and retries.
In that sense, the after market ST mods did a much better job. The drive told a piece of circuitry what it should use and the clock frequency was then set correctly. Many many ST top cases have been horribly butchered to make room for the normal eject button of most HD drives instead of Atari’s nice slanted cutout.
Of course, I wanted to make my tricked out STE (see other posts) read HD disks as well, since I spend a lot of time archiving lost treasures and sometimes come across HD disks. I did not want to butcher the top casing though.
Idea: Use the same HD drive as Atari. The front plate and eject button of the Epson 340 and 380 are interchangeable, and the Epson 340 can still be found used online (and after some digging I found that it was also sold by Hewlett Packard under their brand as D2035-60011). I also bought an HD-kit from exxos that seemed to handle some obscure effects (steprate issues) adding HD to ST:s can cause.
Here’s where I realized that although it’s easy to find where to pick the density detect signal on other drives (like the Sony) absolutely no one seemed to have ever done it on Atari’s HD drive of choice (!). After some measuring and tracing I found the spots to use, and although the drive can be set to handle density internally I also only got it to work if giving the drive its own density detect signal as input on the density select pin #2, and told it to use the external signal (jumper 1-2 & 5-13).
Since I have two drives internally (an HxC and the internal floppy) and a switch to choose which is A: and B: respectively, I also had to create a logic table on which signals should select which input and density. The result was (disregard the wiring on the image, I don’t seem to have one from the final conclusion) that the kit should get post-switch signals and D1 should get density detect from the drive. With all this done, my STE now has full DD and HD support – with a beautiful and newly refurbished Epson 340 as the internal drive. I save my case cutting for LCD displays, SD card slots and USB ports ;)
DD: YM DS0 —— no switch —— HD-kit DS0 —— cable DS0 (8MHz) = floppy A:
DD: YM DS1 —— no switch —— HD-kit DS1 —— cable DS1 (8MHz) = HxC B:
DD: YM DS0 ———— switch ———— HD-kit DS1 —— cable DS1 (8MHz) = HxC A:
DD: YM DS1 ———— switch ———— HD-kit DS0 —— cable DS0 (8MHz) = floppy B:
HD: YM DS0 —— no switch —— HD-kit DS0 —— cable DS0 (16MHz) = floppy A:
HD: YM DS1 —— no switch —— HD-kit DS1 —— cable DS1 (8MHz) = HxC B:
HD: YM DS0 ———— switch ———— HD-kit DS1 —— cable DS1 (8MHz) = HxC A:
HD: YM DS1 ———— switch ———— HD-kit DS0 —— cable DS0 (16MHz) = floppy B:
(Oh, and since Atari had their own way of handling media change detect – knowing when a new disk had been inserted and you needed to re-read the FAT – a lot of disks have been trashed from the use of non-compliant drives. The exxos kit above has an optional workaround in that it always forces a re-read, but the best solution is of course to use the same HD drive as Atari did, and not having to use any media change workarounds at all)
Fountain of Youth – the two month update
Today it’s exactly two months since I started on my “Elysium Basis” regime. Since quite a few of my friends have asked me to write an update on my thoughts about it – here it is.
I’m still of the opinion that I have more energy. I’m also confident in the “smoother skin” effect, although I’m unsure as to whether it’s because it actually is or if I just, for some reason, experience it to be.
Just as before I’ve stayed away from researching what effects I should/could expect, only looking them up once I’ve noticed a change to see if others might’ve as well. And so the third thing I’ve noticed so far is …
Alright. Before I write this I need to make a disclaimer: The effect is very slight – I do not think it will become noticeable to anyone but myself. I’d hate for anyone I know to rush out and by these supplements just because of this blog post, so please, don’t.
With that said, I seem to have some hair regrowth where the hairline has receded over the last decade. Some. A little. Most likely not noticeable if you don’t, like me, see my face in the mirror every day.
Now on to the negatives, if they are. I think my energy levels are lower than what they were a few weeks ago. I also have some “body ache”. I’ve seen others claim that this could happen if you have a methylation pathway problem, and indeed I do. Thanks to “DNA-testing” (SNP, through 23andme and Genetic Genie) I know that I have homozygote mutations affecting my methylation. I’m not sure what to make of this, currently I’m waiting to see if it gets better/worse. Since I suffer from SAD I also know better than to make too much about what I feel during the darkest months of the year (I’m no longer on SSRIs as described in that post).
tl;dr: I’m still taking NR+Pterostilbene, and will continue to do so for the moment.