Fun with RF & PAL TVs

Since I was a kid growing up in Canada, everything was NTSC. And my first computer the Commodore 64 was of course NTSC based. My parents refused to get me a monitor, so I had to use the RF modulator to get it to work on a TV. In north America we had these RF modulators on the back of the TV’s to connect our systems up (Atari, Commodore, Nintendo, SEGA etc..)

Vintage Atari 2600 Colecovision C64 Computer Switch Box RF Adapter

And the picture looked terrible, it was an antenna so it was suspectable to all kinds of RF emission interference, grounding issues and all kind of all around problems. It’s no wonder I had 20/20 vision as a kid, but it was absolutely destroyed because I was even forbidden to buy a proper monitor.

So thanks to patreon and ebay, I found this amazing bundle for 49GBP, a Commodore 64, plus tape drive. The catch being it didn’t include any proper cables, so I went to Tesco and bought an RF lead. I have this weird LG TV, a LG 50PC1D 50in Plasma TV. The original list price was an eye watering £1800! I got it used a while back for a more reasonable £130.

Lots of Inputs!

While I was at Tesco, I didn’t see any kinds of RF boxes. I was hoping I could just plug the cable directly from the TV into the Commodore C64, and it turns out that is exactly how it works.

With the cable plugged in, I was able to eventually get an image. I found out that the LG is more than capable of locking the RF image from the Commodore 64, and it looks awesome!

One man and his Droid over the RF on the LG 50PC1D

It’s a lot better than I was expecting. Clearly RF on a ‘modern’ TV works great.

Of course getting this to work wasn’t all that intuitive, and again probably because I’ve only delt with NTSC TV’s where the channel would be locked to either 3 or 4. Not so in Europe.

Channel 4

So setting the TV to channel for, and the band to ‘cable’ you can see the distinct border of the basic screen. The image of course is useless but you can see it trying. And that is because after letting the TV scan and find the picture on it’s own it’s actually channel 36.

Messing with the image options I found that there is 3 systems to choose from:

System L

You can see the image trying to form under System L, but it’s obviously no good

System BG

While the image looks better, the speakers erupt with absolute static. And the image is a bit faint, but immediately recognizable. It does look better in person however.

System I

And finally we have System I, over V/UHF on Channel 36.

I don’t know if this will help anyone trying to get anything working. Maybe it’s only relevant for people new to PAL territories like me.

Pi1541 adventure!

Enter the Pi1541! What makes this different from the SD2IEC is that this emulates both the 6502 processor of the 1541 drive, it also emulates the two 6522 chips as well giving far stronger emulation. Is this enough to satisfy CP/M? Or is my issue something deeper?

Cleaned up a little

So in my continuing adventure of stuff arriving for my Commodore 64 project, I took the opportunity to pull the keyboard apart and clean it. I didn’t do any weird retrobrite thing, as I don’t care that this looks 30+ years old. And I haven’t swapped out any further caps just yet, although I did also get a big box of random caps ranging from 0.1 to 220uF, so I can probably do all the small stuff on the board when I feel like it next.

It took a bit extra effort to get this far.

The IEC cables had finally arrived, and that means I could connect up the Pi1541 hat I bought and get this project going.

Although it’s the latest ‘rev 4’ board, it doesn’t support the Pi4 (does anything support the Pi4? What an evolutionary dead end!), auction did include the LCD display, but no software, and no serial cable. The cooler looking one I wanted was all assembled in Poland and they are unable to ship.

Bummer.

Anyways, turns out the software is written by one Stephen White, who doesn’t get any cut of the board sales, but in turn I guess they aren’t bundling the software either… I’d have imagined it’d be some kind of 1+1 thing, but it’s not to be. I guess it’s also why so many people keep on thinking you can buy a PiZero for $5 or so, when they are much closer to $25.

Anways, getting the initial part of the board working was just a matter of reading Steve’s site, and following which files to be download, and where to be placed onto a FAT32 formatted SD card. This is one of those ‘bare metal’ type projects, so this also doesn’t run Linux.

Unfortunately for me the Pi1541 didn’t do ANYTHING on powering on, that is until I connected the HDMI cable. And yeah what a let down. And even worse when trying to load anything it’d just hang. So frustraiting!

But thanks to this post by jerrykurtz over on lemon64, I was able to put together this fragment to get it working (for me!)

deviceID = 8
splitIECLines = 1
scrollHighlightRate = 0.07
ChargenFont = chargen
OnResetChangeToStartingFolder = 1
GraphIEC = 1
SoundOnGPIO = 1
SoundOnGPIODuration = 1000
SoundOnGPIOFreq = 1200
LCDName = ssd1306_128x64
LcdLogoName = 1541classic
i2cBusMaster = 1
IgnoreReset = 1

Now this of course works for my v4 hat, and the way I like it. Also keep in mind that if the C64 isn’t detected it will appear to hang after loading the chargen ROM. It took a while to figure that out, until I just turned on the c64 to see what would happen. I also hate having it change disks when I power cycle, so IgnoreReset was a great feature, well for me anyways.

I fired up CP/M, and yeah it’s doing the same thing. So it turns out that it’s not the SD2IEC adapter that I have. I’m kind of mixed about this, on the one hand that’s great as the SD2IEC’s are significantly cheaper and easier to come by, at the same time I had hoped a little that the bigger investment of the Pi1541 would make the difference. At least it’ll be the difference for stuff like Ghosts’N’Goblins Arcade.

CP/M Planetfall

One interesting thing is that SOFT80 is now faster, getting somewhere between 1-3cps. It’s still totally unplayable, but I guess that’s progress?

Still waiting for the dead test cart to see if it tells me anything useful.

Waiting for the deadtest

So since CP/M is acting all wrong, there is clearly something up with the C64. I hadn’t opened it yet, and I almost regret doing so as despite it ‘working’ it was a MESS!

After separating the case halves, and unplugging the top LED, I saw that capacitor C66 had exploded. There was some faint hint of staining from the top, but I didn’t expect it to be something like this.

The board was disgusting, like the cap had something spilt onto it? Then it ruptured? or did it rupture? it still powered on and ‘worked’ despite this gunk.

Isopropyl is in short supply still, so I did something probably dumb, I took a 50% baiju a brush and gave it a quick rinse.

Cleaned up board

with all the fuzz removed it’s a 250469 REV.B… which I understand is a pretty late model. It’s one of the short boards, which not a lot of chips, which I’d hope means fewer things to fault, although at the same time, some of these chips are going to be impossible to source.

Also, I should add that I found various C64 schematics online, and none had a 470uF cap for C66. Maybe I’m going crazy? I found an E-bay auction for replacement caps, and yep, they also have a 470uF in there. Am I crazy?

TONEREX 50v 470uF(M)

Now I was hoping that being in Hong Kong, that means I could actually find some retail shop actually selling capacitors. So I went around the audiophile places and scored this higher voltage cap for a whopping $5 USD! The store owner was insistent that this was for ‘high end audio gear’ and not my toy 80’s computer. That this thing was somehow some magical ‘audio only’ capacitor. Has anyone heard such a thing? Is this like audiophile grade SATA cables?!

Massive cap installed!

So I replaced the cap, and NOTHING. The power led turns green and that’s about it. I had to dig up a simple volt meter and yeah power is going places. I gave up and went home for the night. Turned it on this morning expecting a POP or further disappointment, and it fired up.

A bit of digging around I found HeadAlign v1.1, which I transferred to the SD2IEC, and much to my amazement the stupid tape drive started working, although it was a full screw turn out of alignment, and it looked normal (no picture). I rewinded the tape, and loaded up Hans Kloss, and it worked!

Sadly CP/M still is printing far too many things to the screen. I guess I need to replace more caps, and keep on waiting for that dead test cart to get a bit of a further hint. Although my soldering skills are terrible.

Big plans going nowhere

Ever since I found that ‘cheap’ Commodore 64 online I’ve been wanting to try something. The machine came with a tape drive, so I ordered some ‘cheap’ reproduction tape game, to see if it worked.

1530 mech

While it almost works, it sees the program on the tape, the thing stalls out. Granted it being dated to 1991 probably means the belts are beyond usable. I am having a friend proxy some belts for me as nobody will ship them to Hong Kong (pandemic didn’t have any real effect there).

While this machine is a newer ‘C’ model, I’ve had seen this auction pop on and off on Ebay from time to time advertising a refactored and improved CP/M cart advertising that it works on all models. I’ve read somewhere that post 128 that they finally had figured it out, far too late to matter. But maybe with this new cartridge things could work?

I managed to get a SD2IEC board delivered from Germany, which uses external USB power, so it won’t tax the C64 PSU (I should look, is there an ATX to C64 PSU?). I can load some silly games and stuff seemingly okay. I haven’t bothered with GEOS, as I used it far too much when I had to, and it’s just far too slow to even dream of being usable. Anyways with the SD2IEC it came with ZERO instructions but I did find the page with the needed firmware, and the ‘FB64.PRG’ program to have it browse the SD card and mound D64 images as needed.

I have to admit, ever since I did that article about “Running CP/M on the Commodore 64” I’ve been dying to try this on real hardware. With all the excitement in the room, I mounted the CP/M disk, and held my breath as the *’s went across the screen….

DDDDDDDDDOOOOOOOOOOBBBLE TROUBLEEEEEEEEEEEE

And, well something isn’t right. I tried a bunch of images I could find online, and they all do the same thing. They print far too many characters on the screen from time to time. Clearly it’s some timing/IRQ issue. Something to do with the VIC chip.

Despite the screen being corrupt, it is running, and it does let you run commands, it’s just the output is being doubled (or 10x!) up.

So I tried the soft80 program which will setup an 80 column CP/M experience. It didn’t matter what version I used, the old one from the 80’s or the patched up one from Luis Antoniosi, they all do the same thing, which is run at a blistering 1cps.

I thought it’d be fun to stream this old beast playing the CP/M version of planetfall, but at 1cps I just can’t do it. Which is just a shame. I haven’t tried a regular C64 Infocom game, as the 40 cols was always crazy, but I guess it’s the fallback.

I know these things are so rare, but I had high hopes for this thing.

So close, and yet so far away.

Edilbert Kirk’s Z-Machine for CBM computers

I never heard of this one before, but it’s legit!… As long as you have expanded your RAM, Edilbert’s Z-Machine opens up the world of Infocom to a whole host of machines:

  • C64
  • C128
  • CBM 4032
  • CBM 8032
  • CBM 8096 / CBM 8296
  • VC-20 (32K / 40K)
  • +4
Sweet looking 8296 from xAD / nIGHTFALL‘s post on nightfallcrew.org

I’ve never seen the more advanced ‘European Business’ PET’s before, I’ve only dealt with the incredibly limited PET 2001-8C Chiclet keyboard models that were so insanely limited. It wasn’t until much later I saw the dual disk drives (4040’s??) that could have helped those machines so much more, but that was that. I’d been asked as a kid to make an electronic card file on an 8kb machine with a single tape drive. Sadly 8 year old me didn’t know about loading and saving sequential records on tape. Or maybe luckily as I can only imagine how insanely slow this would have been, and or tedious to not only save and update, but find things.

Anyways I thought I’d fire up some mythical 8296 beast with 128Kb of RAM. Attaching the disk image, and firing up “LOADER”, you can watch it load up as much as possible into memory:

And once it’s loaded up, the Z-Machine is active!

Now granted I don’t have a PET to test with, but using VICE, I can happily say that for an 8bit machine, this is incredibly fast. Maybe it’s the disk subsystem interface, as the VIC-20/C64 have an absolutely dreadful interface, but yeah wow playing HHGTTG on a non C64!

You can find downloads over at “PET FOOD“.

Anyways this is pretty neat, and all new to me. Just like the Tandy CoCo 6809 interpreter source being found was as well.

Bare Metal Vice

From the site:

BMC64 is a bare metal fork of VICE’s C64 emulator optimized for the Raspberry Pi. It has 50hz/60hz smooth scrolling, low video/audio latency and a number of other features that make it perfect for building your own C64 replica machine.

I had to pick up some bits and bobs as there is some circuits I wanted to try to build, and oddly enough the electronic store I went to had some Pi’s! I bought 2 zero’s and 2 three’s! They aren’t cheap, sadly but I honestly doubt any zero’s actually ever sold for  Â£5, and these cost me $168! Each! (just under £20!).

Anyways since I had nothing to do with these things, I already ordered a 1541 hat for the Commodore 64c, so I’ll need a 3 for that, but I was looking around and ran into the bmc64!

You do have to drop in your BIOS files manually, which is the only tedious bit, then dump over your taps’ and d64’s. My 3 boots up in a few seconds straight to the BASIC screen, like it’s 1983!

I was expecting it to be a lot of work, and it really was a SNAP. Not that I have any shortage of machines, or tiny machines to run VICE, but this running on metal is honestly kind of exciting.

I’d have loaded it on the zero, but it uses some mini HDMI port, and all I have is regular HDMI cables. I also picked up some heat sinks for the CPU’s as no doubt, no idle loops means it’ll get toasty.

It’s something I’d encourage people to check out, if anything to see how versatile a bare metal program can be for the pi’s.. Although apparently they screwed up the 4, it’s too different from the 0/2/3 for some reason.

Pitty.

The price of Commodore 64’s is getting out of control.

I’ve been looking on and off the last year, and they all seem to be $100 USD minimum for one that is either ‘as-is’ or broken. Good working ones are selling for double or more.

I’ve been disappointed, as I haven’t played with one in years.

Commodore 64 C

And then as a fluke I found an auction for a kind of beat up Commodore 64c for a mere £40! Naturally shipping it to Hong Kong was going to cost more than that, and with all the Wuhan Flu thing going on, I really didn’t expect it to show up any time soon. Yet, one week after I bought it, the Commodore arrived!

It’s a little dirty, but overall it feels okay. I was a bit nervous if it would even turn on. However as it was in the UK, the power supply is already 220v, and the TV I have in the office is PAL (it should have had SCART too, but they sent me the UK one, not the continental one ….)

Now for those who have never setup a PAL Commodore before, they output to CHANNEL 4. The cable to the TV (LEAD, lol!) has 2 different ends to it, so only one side goes to the TV, and the other to the equipment. Unlike NTSC, there is no channel 3/4 select, nor is there an external RF modulator, it’s all contained in the 64c’s chassis.

Nice.

I had to wave my phone around for a bit to get the TV to scan the analog band with the Commodore powered up, but after 5 minutes, it finally had done it’s scan and I could behold the hew of the blue screen.

It looks much better in person, but yeah there it is. I haven’t’ had time to do much else, but I wanted to share this quick bit.

I also got a datasette with it, but I’m oddly enough out of audio cassettes. It feels so weird to have no software for a machine.

Asking some suppliers I was able to get some 10 packs of 60 minute tapes for å…ƒ 27.5, or approximately $3.75 for a pack of 10. If this were 1982 I could be a media mogel! But in 2020 I suspect that I can measure the demand for new tapes on one finger.

I have big plans for this little thing. Although amateur surgery may be part of it.

Just picked up a sealed copy of Captain Blood!

31 years old!

It’s from Italy, and apparently was originally boxed for the Amiga, and then re-purposed for the Commodore 64. Compared to American ‘big box’ releases of the era, it’s a tiny box. A few of my SIM games are behind, it along with some DVD cases I picked up in China.

29,900 Lira?

I guess the price makes sense if the final exchange rate of the Lira was
1,276:1 USD
back in the winter of 1988, making this copy $23 USD. Although I’m pretty sure when I bought mine I had to pay some $40 CAD. Yay.

I don’t think Captain blood really made it to tape, so it’s really not all that surprising then that this disk version has sat in it’s box for so long. Every time I’d seen anything Commodore in Italy or even the EU it was always tape. Such a shame too, as that means no Infocom.

Normally I wouldn’t even bother with something like this, as I have images for every release there was, but this is a sealed copy. Apparently there is a poster inside of many of the European releases. Although I’m unsure if this one does. It’s been sealed for some 31 years so far. Although it’d make a great poster to frame.

I’ve been trying to clean up the Mega ST I have, but it appears to be dead. Nothing seems to be on the video out, and it’s not lighting up or spinning the disk. I guess this means I’ll need some kind of logic probe. Well after I find my volt meter to see if I’m getting the correct voltage. The Atari doesn’t seem so complicated so I guess an ATX power supply can be rigged to output the 5/12v.

After tracking down the library source, I’ve focused my GCC stuff on version 1.30 as it’s the same base version that was used in the x68000 port, and didn’t suffer from any struct packing that I remember. And of course the never ending stress of day jobs.

Running CP/M on the Commodore 64!

 

CP/M cartridge retail box

Back in 1983 there was this great idea of expanding the Commodore 64 with the then popular (but declining) base of serious business software from the CP/M side of the world by creating a cartridge with a z80 processor inside, and a special port of the CP/M operating system that would take over the C64 letting you run real programs like Fortran, Cobol and the far better (and updated) Microsoft Basic v5!

However as always the major failing of CP/M was the massively different and incompatible diskettes of every platform.  The Commodore 64, lacking in RS-232 ports, and it’s incredibly incompatible 1541 drive rendered it nearly impossible for the average home user to transfer any programs in the specially formatted CP/M diskettes for the cartridge.  Not being able to read a standard 1541 diskette would prove to be it’s undoing.

While messing around in Vice, I saw that this cartridge is emulated now!  A quick search led me to zimmers.net where I was able to then locate the needed cpm.d64.gz, and I was booted up into CP/M and of course that hit the first snag which is of course, where is the software?

Well another search brought me to the package ‘ctools‘ which I quickly built on the Linux subsystem for Windows (I had to add -fpermissive to get it compile..), and now I could take that CP/M diskette delete the contents, and for the heck of it insert in Zork.. Of course where to find Zork along with other CP/M software?  The zip zork123_80.zip can be located on retroarchive.org, even fun things like Microsoft BASIC v5.21 (Interpreter), along with the manual.

CP/M only recognized a single drive, so you have to swap diskettes (Such a typical Commodore 64 experience), and here we go!

via Vice

Naturally the Commodore 64’s 40 column mode is… terrible.

However even back in 1984, a fine program aptly called soft80.com sets up the Commodore 64 in high resolution graphics mode, and emulates an 80 column mode.  Even better, the magic for the most part happens on the 6502 side, meaning it doesn’t take away from the precious memory on the CP/M side.

Zork 1 under CP/M / Soft80

Its worth noting that although Infocom games are dreadfully slow on the Commodore 64, playing under CP/M is also dreadfully slow, taking some 10-15 seconds to complete a command.

At least under emulation there is the warp mode.  And what took an hour to put together would have been months no doubt in the 1980’s ending in the CP/M cartridge going into a drawer to never be seen again.

A Z80 on a cart is pretty interesting.  It would have been interesting if other CPUs had made their way, a 68000 would have been interesting to have bridge the 8 bit world out, or even if Commodore had tried to put an 8088 onto that card, as early PC’s were nowhere near the 640kb hard disk wielding monsters they would become much later.  Naturally one could only dream of the power of an 80386 or the once vaunted NS32016

Commodore Programming Languages

While looking for nothing in particular, I came across Glenn Holmer’s excellent site which has an excellent collection of languages for the Commodore 8bit computers.

And among them was the first C compiler I’d ever owned, SUPER-C!

SUPER-C

Towards the end of the effective life of the Commodore 64, people started to dump expensive software on the cheap.  It was a great time to go to the World of Commodore, and see all the great vendors and wares.  And of course feel that ever pervasive shift to the Amiga.  It was where I picked up this fun little binder:

And what about programming in C?

Super-C CCP

It boots up into a CP/M like environment, complete with drive letters.  You can write programs to either be loaded up from the BASIC ROM environment, or the CCP environment.  On the one hand it’s pretty cool, it includes a simple text editor, and the compiler and linker.  But one thing is for sure, using this with a single 1541 is incredibly slow.  The touted Commodore 128 version with REU support would have made it’s insanely slow speeds a little more tolerable.  That and having multiple machines would have been a must.

As interesting as it was to look at, if you really wanted to do anything with C on the Commodore 64, seriously use cc65. There is something to be said for using a cross compiler when you are running at GHZ vs the 6502’s 1Mhz.