Home | Not logged in


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

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

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

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

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

0 comments

Interative Universe Map


Written by Stephen
January 08, 2020

This is another project from the backlog that I hadn't had time to post about. Written sometime in summer 2019 is my interactive universe map. It is a Google-Maps-like interface for browsing a 600MB image which was created by astronomers by stitching together many pictures from the Hubble telescope.

For the frontend, I am using Leaflet. It is a Javascript library for viewing raster maps. Essentially, it looks for 256x256 tiles at /z/x/y, where z is the zoom level and (x, y) are the coordinates of the picture. Zoom level 0 is the original image(scaled down, of course). Zoom level 1 consists of four images - one for each quadrant of the original picture. This pattern repeats down until the max zoom level of z=7.

Originally, I wrote a Node.JS server to dynamically generate each tile as it was requested. However, I was unable to manipulate a 600MB image quickly enough for this to be viable. I ended up writing a Python script to generate every tile, which could be served st...

0 comments

Victr - A Real Estate Site


Written by Stephen
December 10, 2019

This is not a new project, but I hadn't posted it yet so here it is.

Victr is a site that finds houses and apartments(and land) on Kijiji and makes it extremely easy to search through. The main feature is that you can put in an address, and filter based on houses within X minutes driving or walking distance. As far as I can tell, no other sites do this; probably because it would be expensive if using an API.

To get around the whole API issue, I'm hosting everything myself. Even the map tiles are generated by me. The address lookup and routing engine are running on Nominatim and OSRM, respectively.

The backend is written in Ruby on Rails, and the frontend is written in Angular. I'm not very good at Angular so the code base is a huge mess. I'm pretty happy with the backend, though it could still be cleaned up.

I originally started writing Victr over the summer, but I have not done much lately. The next big feature would be to scrape realtor.ca. I am not sur...

3 comments

A New Website


Written by Stephen
December 06, 2019

I have switched my website yet again.

The first version ran on Wordpress. Though it had many features, I found it to be bloated and slow - and very overkill for what I was doing.

The second version was entirely static HTML. Although much more minimalist and faster, it didn't look great, and it was tedious to maintain.

This is now the third version of my website. I have written a blogging platform entirely from scratch in Ruby on Rails. This makes it a lot more convenient to use. It also opens up the possibility of comments, which I am happy to have back (I have not had them since Wordpress). I call this new platform Pressr. It is open source.

I am still working to add features to Pressr every day. I would like for it to be a powerful platform, while still being lightweight and efficient.

Pressr on Git

0 comments

Dissecting a Kaypro II ROM from 1983


Written by Stephen
May 25, 2019

A few weeks ago, I stumbled upon an ad for a Kaypro II with dead floppy drives. For the cost of shipping, they were willing to give it away. As someone who loves luggables, I knew I had to have it. The Kaypro II has the following specs:

  • Z80 CPU @ 2.5MHz
  • 64KB of RAM
  • 2KB of ROM
  • Direct linear framebuffer access to VRAM

The seller was also nice enough to send a stack of 5.25" diskettes. I believe they have lost their magnetism, as (after fixing the Kaypro drives) the files on them were corrupted. So, I have to find another 5.25" drive that I can use to put images on the disks. In the meantime, why not hack the ROM?

Now, ROM hacking is new to me. I understand the concept, but do not have any of the required tools, such as an EEPROM reader. But I do have an Arduino, so I figured I could ...

0 comments

Gravitational Physics Engine


Written by Stephen
November 09, 2018

I have written my own gravitational engine! Although it started in python, I quickly ported it to C for a huge performance benefit.

The general idea is that it starts with a large array of 'stars'. Each is given some angular momentum. Then, the stars are gravitationally simulated over a period of time. This has led to some really cool effects!

Features:

  • Multithreading support
  • Customizable parameters through the command line
  • Autosaving and loading
  • Very low memory usage (Under 16MB for 100k stars)
  • High performance

Here is a simulation I did with n=1000 stars:

Here's another one with n=10k stars. This one turned out really well. The stars quickly form two galaxies, one much bigger than the other. Not only does the big one appear to be a spiral galaxy for a short period of time, but it also rips the small...

0 comments