Close

Hello World

A project log for Reverse Engineering The Weather STAR 4000

The Weather STAR 4000: A Journey of reverse engineering the hardware to an iconic machine of the 1980s/90s.

techknighttechknight 07/16/2022 at 13:370 Comments

So up until this point, I had no knowledge or prior experience writing any 68K program C, ASM or otherwise. 

My background in programming up to this point was Visual Basic 6/VBScript and microcontroller ASM, as that's what I grew up with, VB being taught in school and ASM being self-taught. I didn't even know C yet, but i knew PHP and PHP is a C-like syntax. 

Now that the hardware engineering and reverse engineering is out of the way, we need to get some sort of program running on the 68K hardware to some degree. 

In the beginning, I chose ASM so I could get familiar with the 68K, and we needed a bootstrap anyways. We need some method of getting code running on the hardware and eventually downloaded into the machine to run in RAM. 

So, first and foremost there were two websites (one appears defunct now with broken SSL and blocked by malware services) that I learned a lot of programming aspects of the 68K and learned about VASM which is an assembler that is compatible with the m68K arch:

https://web.archive.org/web/20220606083430/https://www.chibiakumas.com/68000/

https://mrjester.hapisan.com/04_MC68/

I decided to start with the CPU card, I will worry about the graphics card later. I wanted to start writing a hello world example, at least to keep the watchdog happy on the CPU card. If the CPU card stayed alive, I knew it was running my program. 

Since I had the I/O card protocol and firmware written, That was one of the first things I tested when I assembled my hello world example. I used the LEDs on the I/O card as a visual indicator that code was running, and I can write the status of the LEDs. 

Not only is the watchdog happy, but I was able to write a byte value to the I/O card using the protocol I created and turn on an LED! 

I know this isn't a whole lot of fanfare, but this was a MAJOR milestone. I now have code running on the 68K CPU's ROM that was assembled by VASM and can communicate with other hardware! Now we have the proper building blocks for writing bootstrapping code and ultimately getting this machine running again

So, Hello World! 

Discussions