Home | Not logged in

1999 Corolla Ham Radio Install

Written by Stephen
July 27, 2022

I've finally gotten around to installing a ham radio in my daily driver (a 1999 Toyota Corolla).

I opted to go with a Yaesu FTM-350 for several reasons. First of all, it has built in APRS. I think this will be useful for road trips. Second of all, the head is detached from the base. My car is fairly small so I figured this would give me more flexibility for installation.

Here's the head unit mounted on my dash. Even though I printed the mount in PETG, it melted in the hot sun, which is why the screen is facing down. I have since mounted the head directly to my dash using double-sided tape.

Below the head unit is an array of powerpole connectors. The first two go to the battery. The third is disconnected. The fourth goes to the ham radio. Bridging the two connections allows the radio to be powered from the...

1 comments Categories: Uncategorized

More work on the 68000

Written by Stephen
December 02, 2020

After a long hiatus due to school, I've finally had time to put some more work into the 68000 tablet.

I was able to write a driver for the LCD screen, as well as some commands for writing text and controlling individual pixels. I tested this by drawing images manually over a serial connection. I also attempted to write a function to draw a Mandelbrot fractal on the display, but it kept crashing. I looked through the generated assembler code, but everything looked fine. So, I started to investigate.

Reliability issues

After adding the Mandelbrot code, I noticed other functions behaving strangely. For example, attempting to call sleep() would often - but not always! - cause the board to reboot. At this point, I decided to add actual error handling to the board. Now, an exception would print a message stating the cause to the serial bus, and would halt execution. After adding this, calling the Mandelbrot function would halt the board with an "invali...

0 comments Categories: 68000-sbc

xBASIC - A programming language written in Rust

Written by Stephen
November 10, 2020

I have written a programming language, which I call xBASIC. It is loosely based off of QBasic, and is meant to be easy to learn.

The interpreter exists as a Rust library. This makes it easy to add user-definable logic into your Rust program. Since this is the main goal, it is designed to gracefully handle bad or malicious code. For example, it supports setting a CPU limit to prevent infinite loops from using a lot of CPU time. A basic REPL is also included.

Also, it is possible to call xBASIC code from Rust code, and call Rust code from xBASIC (but only the functions you define as xBASIC-callable).

The interpreter consists of a compiler and virtual machine. This makes it quite fast in comparison to languages which walk the AST.

For more information, and to see what the syntax looks like, check out the git repository!

0 comments Categories: Uncategorized

68000 Tablet - First Program!

Written by Stephen
May 27, 2020

I finally have enough parts to start running programs on my 68000 tablet. The only thing I'm missing is the 68681, which is required to use the serial port.

I did had to make a small modification to the board to get it running though. I decided to switch from EPROMs to EEPROMs, and the new EEPROMs had a slightly different pinout. The only thing I had to change was to assert the ~WE pin HIGH so that I could actually read from the chip. This was done by running a wire from each ~WE pin to the VCC pin of an unused socket. Other than that, the board has no significant bugs!

As a simple test, I thought I'd blink a light. My source code is below:

Basically, we define two infinite loops: one at 0x1000, and one at 0x2000. The timer interrupt fired roughly 386 times per second, so we count the number of times it fires and use that to call the timer_rollover branch roughly once per second. When it fires, we flip between 0x1000 and 0x2000.

Video below. I put a box...

0 comments Categories: 68000-sbc

68000 Tablet - First test

Written by Stephen
April 21, 2020

I have finally received enough parts to run a basic test of the 68000 tablet computer I designed. The main thing that I was waiting on was female headers, so that I could install the 68000 into the board. Here it is running:

I don't have enough parts for the address decoding circuit, so I'm unable to use ROM or RAM (nor has the ROM arrived). Instead, I used 16 220 ohm resistors to pull the data bus to 0x00. This corresponds to the instruction OR.b #0, d0, which does nothing. The result of this is that the CPU races up the memory address space, executing the same instruction as it does so. The green LEDs are connected to the address bus, and we can see it counting up in binary, looping back to 0 when the bus overflows.

A few other jumpers can be seen around the board, pulling CPU pins high and low to compensate for chips that aren't installed...

0 comments Categories: 68000-sbc

68000 Tablet - PCB Has Arrived!

Written by Stephen
March 13, 2020

Quick update to my 68000 tablet - The PCB has arrived! Even though I knew the dimensions of it, it's a lot bigger than I was expecting.

Here is the empty board, which arrived earlier today. I have added some parts on, as you can see here:

So far, I have found several problems.

  • The CPU socket on the PCB is slightly too wide. However, I can easily bend the pins slightly out so that it still fits. Turns out that it is the right size, it just requires a socket to fit properly.

  • The barrel jack is backwards (facepalm). Also, the holes are slightly too small. This isn't a concern, because I w...

0 comments Categories: 68000-sbc

68000 Tablet Update

Written by Stephen
February 22, 2020

I have ordered some parts for the 68000 Tablet I have designed. The most expensive part was the PCB - it was $90 CAD for 5 tablet boards, as well as 5 programmer boards. About half of that cost was shipping. I also put together a BOM, of which most of the parts come from Ebay, along with some from Digikey. It's crazy how fast the cost of a few dozen logic gates add up! I placed the Ebay order, but not the one with Digikey. The latter will arrive within a day or two from shipment, so it's not as high of a priority.

I made a few part substitutions to save money. I swapped out the 1MB of RAM for 256K. This brings RAM cost from $14 to $8. I'm also using an EEPROM where the ROM goes. Again, I swapped out the 1MB for 256KB. One thing is that the A17 line connects directly up to the WE line, which is active low. This means that when the computer turns on, it will overwrite its ROM immediately. I will probably just not connect WE and leave it floating. I haven't had problems doing th...

0 comments Categories: 68000-sbc

New Project: A 68000-based tablet

Written by Stephen
February 20, 2020

My favourite retro-computing devices are those that are portable. The TRS-80 model 100 is especially interesting to me; it is a tablet computer released in 1983. I few days ago, I decided I should design my own portable computer.

Anyone who knows me in person knows that I am an avid supporter of the Motorola 68000, and other 68000-based CPUs. In my opinion, they are a much better design than the x86 architecture we are stuck with. For this reason, I decided to base my tablet around this CPU. Even though it was released in 1979, it is a very capable computing device. A 23 bit address bus and 16 bit data bus provides access to up to 16MB of address space, without having to use memory banking. Internally, the CPU is fitted with a large array of 32 bit general-purpose registers - 8 of them! That doesn't even include the 7 address registers and stack pointer register. Amazingly, this 40 year old CPU is still in production and used regularly; that's how good it is.

After pic...

0 comments Categories: 68000-sbc

Proxmox Backups can be Dangerous

Written by Stephen
February 04, 2020

A few days ago, I learned that Proxmox automated backups can actually cost uptime.

For this post to make any sense, I should start by explaining how my servers are set up. I will only talk about my Proxmox servers, because the other servers are irrelevant to this story. I have a Proxmox cluster which consists of two hosts. One of the hosts contains an HBA, which is connected to about 20TB worth of disks. The HBA is passed through to a VM, which runs an NFS server, among other things. Both of my Proxmox hosts connect to the NFS server, which is used only for backups. It sounds pretty janky, but it's honestly not that bad.

Every night at midnight, a scheduled backup runs for most VMs. The way that it works in Proxmox, each host will back up 1 VM at a time to the NFS server. For me, that means 2 VMs are backed up at a time. Unfortunately, on Friday night the disk used for backups in the NFS server stopped responding. This shouldn't be a big deal - the backup would fail, o...

0 comments Categories: Uncategorized

CaaS - Cats as a Service

Written by Stephen
January 10, 2020

Imagine there was an API where you could get random cat pictures from the internet. This sounds like an amazing idea, but it doesn't exist! So I decided to build it myself.

The basic idea was as follows. First, train an AI to differentiate between cats and not-cats. Then, I could feed it random pictures off the internet, and it would discard non-cat pictures. The cat pictures would be saved, to be served by the API.

Most of the AI work was already done for me. I found this project, which is designed to classify cat and dog pictures. Nothing really had to be done to the code. When training the model, I just gave it non-cat pictures, rather than dog pictures. My computer is not optimized for AI training(I used my CPU) so I was not able to train the model as much as I would like.

I was also planning on distributing the classification over many computers. For this, I set up a Rails API that would a...

0 comments Categories: Uncategorized