Even more connected

By apam |  Jun 10, 2020  | rc2014, retro-computer, z80, bbs, cp/m, esp-12

I just finished my second knock off of the official RC2014 ESP8266 module, and finally it works!

The first go, I had the wrong voltage regulator so the ESP module wasn’t receiving 3.3 volts. It was only getting 1.2 volts or something, so the whole thing didn’t work. There was also some tweaks to make to the first version of my PCB (the capacitor footprints were too small and I had the RX2-RX1 selection jumper thing around the wrong way).

So I ordered the correct voltage regulators and some new refined PCBs, and soldered it together.

The first thing I saw when I plugged in my programmer was the ESP module’s light blink, which meant it was powered up - I didn’t get that before. Next I programmed it with Zimodem, and fired it up and it just printed garbage on the screen.

So back to the code, there were a few tweaks I had to do.. but my Arduino IDE had stopped working. For whatever reason, 1.8.12 no matter which computer I tried wouldn’t work anymore with the ESP board definitions installed. Eventually I tried a nightly build and that worked, so on to the tweaks.

I needed to turn off “RS232_INVERTED” change the default BAUD to 115200 and add a delay to the serial port writing (ATS44=1)

After that it worked like a charm and I can dial out to my BBS … WITHOUT WIRES!!

Connected! Part Two

By apam |  Apr 28, 2020  | rc2014, retro-computer, z80, bbs, cp/m

Last post I got my RC2014 connected to my BBS using an Arduino Mega connected to a Laptop running tcpser. I could use QTerm to “dial” telnet BBSes and connect to them.

However, I wanted to remove the laptop running tcpser from the equation, and I have a WizNet ethernet shield, I thought I could use to have the arduino connect to the BBS itself.

It took a little while, but I eventually got it to work, with this attached sketch. It could probably be adapted for an UNO, just change the Serial1 to Serial.

I think it dropped characters because I’m not using CTS/RTS pins, I got around it by adding a 1ms delay between characters. It’s probably a bit slower, but then that’s part of the nostalgic feel…

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };


void setup() {
  // put your setup code here, to run once:
  Serial1.begin(115200);
  Ethernet.begin(mac);
}

EthernetClient client;
int gotIAC = 0;
int count = 0;
bool commandMode = true;
char tmpbuffer[64];
int bufferpos = 0;
char happyland[] = "magickabbs.com";
uint16_t happyland_port = 2023;

void writeser(char *str) {
  while (*str) {
    Serial1.write(*str);
    delay(1);
    Serial1.flush();
    str++;
  }
}
  
void loop() {

  if (commandMode) {
    count = Serial1.available();
    while (count--) {
       char inbyte = Serial1.read();
       if (inbyte == '\r' || inbyte == '\n') {
        if (inbyte == '\r' && Serial1.peek() == '\n') inbyte = Serial1.read();
        writeser("\r\n");
        if (bufferpos > 2) {
          if (toupper(tmpbuffer[0]) == 'A' && toupper(tmpbuffer[1]) == 'T') {
            if (toupper(tmpbuffer[2]) == 'Z') {
              bufferpos = 0;
              writeser("OK\r\n");
            } else
            if (toupper(tmpbuffer[2]) == 'D') {
              if (bufferpos > 3) {
                if (tmpbuffer[3] == '1') {
                  if (client.connect(happyland, happyland_port)) {
                    bufferpos = 0;
                    writeser("CONNECTED\r\n");
                    commandMode = false;
                  } else {
                    bufferpos = 0;
                    writeser("BUSY\r\n");
                  }
                } else if (toupper(tmpbuffer[3]) == 'T') {
                  uint16_t port = 23;
                  if (bufferpos > 4) {
                    for (int z = 4; z < bufferpos;z++) {
                      if (tmpbuffer[z] == ':') {
                        port = atoi(&tmpbuffer[z+1]);
                        tmpbuffer[z] = '\0';
                        break;
                      }
                    }
                    if (client.connect(&tmpbuffer[4], port)) {
                      bufferpos = 0;
                      writeser("CONNECTED\r\n");
                      commandMode = false;
                    } else {
                      bufferpos = 0;
                      writeser("BUSY\r\n");
                    }
                  } else {
                    bufferpos = 0;
                    writeser("ERROR\r\n");
                  }
                }
              }
            } else {
              bufferpos = 0;
              writeser("ERROR\r\n");
            }
          } else {
            bufferpos = 0;
            writeser("ERROR\r\n");
          }
        }
       } else {
        if (inbyte == '\b') {
          if (bufferpos > 0) {
            bufferpos--;
            tmpbuffer[bufferpos] = '\0';
            Serial1.write(inbyte);
          }
        } else {
          tmpbuffer[bufferpos++] = inbyte;
          tmpbuffer[bufferpos] = '\0';
          Serial1.write(inbyte);
        }
       }
    }
  } else {
    if (!client.connected()) {
      writeser("\r\n\r\nDISCONNECTED\r\n");
      commandMode = true;
      return;
    }
    
    count = client.available();
  
    if (count > 0) {
      while (count--) {    
        int inByte = client.read();
        if (gotIAC == 0) {
          if (inByte == 255) {
            gotIAC = 1;
          } else {
            Serial1.write(inByte);  
          }
        } else if (gotIAC == 1) {
          if (inByte == 255) {
            Serial1.write(inByte);
            gotIAC = 0;
          } else if (inByte == 240) {
            gotIAC = 3;
          } else {
            gotIAC = 2;
          }
        } else if (gotIAC == 2) {
          gotIAC = 0;
        } else if (gotIAC == 3) {
          if (inByte == 250) {
            gotIAC = 0;
          }
        }
        delay(1);
      Serial1.flush();
      }
    }
    count = Serial1.available();
    if (count > 0) {
       while (count--) {
          int inByte = Serial1.read();
          if (inByte == 255) {
            if (client.connected()) {
              client.write(inByte);
            }
          }
          if (client.connected()) {
            client.write(inByte);
          }
        }
    }
  }
}

Connected!

By apam |  Apr 25, 2020  | rc2014, retro-computer, z80, bbs, cp/m

Last night I started an attempt to connect to my BBS via an arduino mega. The first step was to get the second serial port on the SIO/2 module to communicate with the arduino so the arduino could communicate with the computer. I connected the RX and TX pins to the TX1 and RX1 of the mega respectivley and the ground to the ground. I then uploaded a simple sketch that would relay data from serial1 of the mega to serial0.

It didn’t work. I didn’t have a terminal capable of talking to the SIO/2 chip and had no idea where to find one.

The retro-comp google group came to the rescue with QTerm which had been modified to work with the SIO/2, once I had that it worked - almost first go. I did have to adjust the baud rate between the computer and the mega, as having it on 115200BPS resulted in dropped characters.

The next step was to install tcpser which acts like a modem, but instead you give it telnet addresses instead of phone numbers. Here it is all working:

Connected!

You can see the main menu of the BBS on the TV, which is connected to the Pi Serial Terminal of the RC2014. The laptop is connected to the mega and is running tcpser.

Here is the arduino sketch:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(38400);
  Serial1.begin(115200);
  
}

void loop() {
  // put your main code here, to run repeatedly:
 // read from port 1, send to port 0:
 int count = Serial1.available();
  while (count--) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
    Serial1.flush();
  }
}

This sketch was taken from the arduino website, but I modified it a bit. I added the count loop and the flush, I’m not sure if it’s necessary or not as I was experimenting when I was losing characters.

CP/M Games & Ansi Art

By apam |  Apr 23, 2020  | website, cp/m, ansi-art

I’ve added two new pages over the last few days, a page for my CP/M games for RC2014 based computers and a page with a gallery of my ANSI art.

You can see them by clicking the links in the top Nav Bar. I hope to add more games as time goes by, I plan to start by porting some of my door games, like Sudoku, Sea Battle and Mastermind.

My Wiki

By apam |  Apr 19, 2020  | website, wiki, netbsd

I shut down my Ghost BBS a few days ago, for those that don’t know, it was an Experimental BBS I had written in C++ for Windows. It worked well, and was fun but I got bored with it, and no one called it, so I just turned it off.

In it’s place I installed NetBSD and setup a wiki. It’s mostly just links that interest me at present, but I thought it would be a good place to store notes etc. If you want to have a look, it’s here : https://ghostbbs.hopto.org. You can’t edit it, and there is no signup enabled. I used the domain for ghost bbs, though I should have probably changed it to something else, but now I’ve got certificates, it’s too much effort.

Oh, it’s not hosted in the cloud, rather in the garage so it may or may not be up, depending on whether there are storms, I’ve gone away etc…

Computer No. 3

By apam |  Apr 14, 2020  | rc2014, retro-computer, z80

The capacitor I was missing for the SC108 arrived today (amoung other things), so I finished that. First try it didn’t work properly. CP/M wouldn’t load off the compact flash card, yet BASIC worked, the Small Computer Monitor worked, but loading CP/M caused it to freeze.

It must have been some dodgy soldering, because after resoldering some of it and trying again, it worked.

So here it is, small computer no 3. It consists of an SC108 CPU/ROM/RAM card, an SC104 SIO/2 Dual Serial Card, and Karlab 10e storage module (with a 128Mb Compact Flash Card)

Computer No. 3

There’s a few more things I want to do with this computer, I want to build the ESP32 module and load it with ZiModem so I can call out to BBSes. I’d also like to be able to attach a monitor / keyboard but we’ll see.

Been a While

By apam |  Apr 10, 2020  | website, rc2014, retro-computer, z80, z88dk, cp/m

It’s been a while since I’ve posted here, I took a bit of a break from the RC2014 based stuff as I didn’t really have any space to work on stuff. Now I do and I’m back in business :)

I built the SC104 (Z80 SIO/2 Serial module), an SC105 (Backplane) and started on an SC108 Z80 CPU/ROM/RAM card. I’ve also put together 2 more Compact Flash cards, and have ordered parts for a VGA Serial Terminal and a WiFi / ESP8266 Module.

The plan is to use these parts to build a third Z80 computer that will be able to run CP/M and connect to bulletin board systems. Whether it will work or not is another story. The compact flash modules both work, the SIO/2 module works (though I only tested the first port), the CPU card I was missing a capacitor so am waiting on that to be delivered before I can finish it and test it.

The VGA Serial Terminal I am waiting on parts for, and the WiFi / ESP8266 module, I’m waiting on everything. Unfortunatly Tindie had sold out of the WiFi module, so I have attempted to recreate it on EasyEDA and have ordered boards. Who knows if it will work! At least it will give me something to play with while I wait for the module to be restocked.

I’ve also written a game “Robot Chase” for CP/M which runs on my SC114, and should run on any RC2014 that can run CP/M. It’s based on a BASIC game in the book More BASIC Computer Games by David Ahl. You can download it here.

Moving to Hugo

By apam |  Dec 5, 2019  | website, hugo

I’m in the process of moving this site from a wordpress.com site to a Hugo generated site served by my VPS. This way I can use my domain name and not have to pay extra.

So far I’ve moved all the posts over, but still have to work on the about page and door page.

I’ll try and update a bit more often, I haven’t been doing much in the RC2014 area lately, but still am plugging away on MagickaBBS and my door games.

Pi Zero Terminal & The Missing Module

By apam |  Aug 20, 2019  | cp/m, rc2014, retro-computer, sc114, z80

Today I built 2 modules, The Pi Zero Terminal module, which allows me to use the RC2014 without a computer (well it uses a Raspberry Pi Zero, so still uses a computer I suppose).

It worked, but the mini OS on the SD-Card (for the zero) was compiled for use with a UK keyboard. Luckily the source is available online, so I could compile it with US keyboard support.

Pi Zero Terminal

I noticed I had a spare 40-pin header left over from the Pi Zero kit, and the missing module was missing headers (still waiting on them) so I decided to break it up and build this module.

It worked first go which I was pleased about. By worked, I mean booted CP/M just fine, however the RX and TX LEDs (The yellow and red LEDs) don’t seem to light up. Not sure if I have wired them incorrectly or if I’m not transmitting / receiving enough in my tests to get them to light up long enough to see.

The Missing Module

So what’s next? Well, I still haven’t gotten to my goal of connecting to a BBS with my Z80 computer, that’s going to require two serial ports, and some kind of wifi modem. So the next project will be to build a SIO/2 dual serial port module, a baseboard that can fit it and a new Z80 CPU module.

I have a few baseboards I bought on eBay, and am getting the CPU / RAM / ROM module and SIO/2 module printed. It’s mostly waiting for the parts to arrive now, and some I am yet to order.

SC114 Built

By apam |  Aug 16, 2019  | sc114, retro-computer, z80

SC114 Built

Today I built Stephen Cousins’ SC114 I had been waiting for the headers to arrive from China, but found I had some extra 40pin female headers from my RC2014 kit, and had a 6 pin male header from an Arduino.

It didn’t work when I plugged it in, but after scratching my head for a while I found a bad solder joint, so I fixed it and now it works. 🙂

I plan to use this with Karl Brokstad’s “61c The Missing Module” but I need to wait for the extra headers to arrive to build that.