Jeff Thiele – Cold War Computing https://coldwarcomputing.com Retrocomputing Blog Thu, 18 Aug 2022 03:12:55 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 198232181 1802 RetroShield – SPI RAM https://coldwarcomputing.com/2022/01/25/1802-retroshield-spi-ram/ https://coldwarcomputing.com/2022/01/25/1802-retroshield-spi-ram/#respond Tue, 25 Jan 2022 23:57:17 +0000 https://coldwarcomputing.com/?p=224 In the original 1802 Monitor + Tiny Basic Arduino code by Erturk Kocalar, the memory map is divided into three sections: ROM, onboard RAM, and external/simulated RAM.

  • ROM is hardcoded in the Arduino’s program memory, is of variable length, and starts at address 0x0000.
  • Onboard RAM starts at 0x8000 and is 6K in length if SPI RAM is not used, or 2K in length if it is not. (The 4K difference is instead used for caching the SPI RAM.)
  • If SPI RAM is used, the remainder of the memory map to 0xFFFF is cached SPI RAM. If SPI RAM is not used, the remainder of the memory map to 0xFFFF is hardcoded to 0xFF.

Instructions for adding 128K SPI RAM to a RetroShield project can be found here, and a discussion of the caching scheme used in the default project is here.

My goal right now is to leave the functionality the same if SPI RAM is not used, but change the behavior when SPI RAM is used so that the full 64K memory map is cached SPI RAM. For now, the ROM will still be located in program memory, but will be copied into RAM at startup. The eventual goal is to have no ROM, instead having system software loaded from SD on startup.

The first change to the default project was to enable the SPI RAM:

////////////////////////////////////////////////////////////////////
// Options
//   USE_SPI_RAM: Enable Microchip 128KB SPI-RAM  (Details coming up)
//   USE_LCD_KEYPAD: Enable LCD/Keyboard Shield
//   outputDEBUG: Print memory access debugging messages.
//   TPB_SOFTWARE: Generate TPB internally so access SC0 signal. 
////////////////////////////////////////////////////////////////////
#define USE_SPI_RAM     1
#define USE_LCD_KEYPAD  0
#define outputDEBUG     0
#define TPB_SOFTWARE    1

Next, I changed the Memory Layout constants to match my desired layout:

////////////////////////////////////////////////////////////////////
// MEMORY LAYOUT
////////////////////////////////////////////////////////////////////

#if (USE_SPI_RAM)
  // 2K MEMORY
  //#define RAM_START   0x8000
  //#define RAM_END     0x87FF
  //byte    RAM[RAM_END-RAM_START+1];
  #define RAM_START 0x0000
  #define RAM_END   0xFFFF
#else
  // 6K MEMORY
  #define RAM_START   0x8000
  #define RAM_END     0x97FF
  byte    RAM[RAM_END-RAM_START+1];
#endif

I changed the code that reads memory so that if SPI RAM is enabled, all reads come from SPI RAM.

#if (USE_SPI_RAM)
    DATA_latched = cache_read_byte(uP_ADDR);
#else
    // ROM?
    if ( (ROM_START <= uP_ADDR) && (uP_ADDR <= ROM_END) )
    {
      DATA_latched = pgm_read_byte_near(rom_bin + (uP_ADDR - ROM_START));
    }
    else
    // Execute from RAM?
    if ( (RAM_START <= uP_ADDR) && (uP_ADDR <= RAM_END) )
      DATA_latched = RAM[uP_ADDR - RAM_START];
    else
      // Dummy 0xFF (eeprom style) out for unmapped memory locations
      DATA_latched = 0xFF;      
#endif

And the same for the code that writes memory.

    // Memory Write
#if (USE_SPI_RAM)
    cache_write_byte(uP_ADDR, DATA_latched);
#else
    if ( (RAM_START <= uP_ADDR) && (uP_ADDR <= RAM_END) )
      RAM[uP_ADDR - RAM_START] = DATA_latched;    
#endif

I added a function to copy the ROM from program memory to SPI-RAM.

#if (USE_SPI_RAM)
void rom_init() {
  unsigned int i;

  for(i=ROM_START; i<=ROM_END; i++) {
    cache_write_byte(i, pgm_read_byte_near(rom_bin + (i - ROM_START)));
  }

  Serial.print(i - ROM_START); Serial.println(" bytes of ROM copied to RAM.");
}
#endif

And finally, I added a call to this function inside the setup() function.

#if (USE_SPI_RAM)
  // Initialize memory subsystem
  spi_init();
  cache_init();
  rom_init();
#endif

]]>
https://coldwarcomputing.com/2022/01/25/1802-retroshield-spi-ram/feed/ 0 224
1802 RetroShield https://coldwarcomputing.com/2022/01/21/1802-retroshield/ https://coldwarcomputing.com/2022/01/21/1802-retroshield/#respond Fri, 21 Jan 2022 14:57:24 +0000 https://coldwarcomputing.com/?p=218

After receiving this Hackerbox, I was very intrigued by the idea of exploring vintage 8-bit CPUs via an Arduino Mega, and with WiFi no less. It turns out that 8bitforce has designed RetroShields for a variety of 8-bit microprocessors, including the RCA 1802 (aka COSMAC). I grabbed the Gerber files from here and submitted them to NextPCB. The PCBs took less than two weeks to arrive. Meanwhile, I ordered some 1802 chips off of EBay, which ultimately came from Hardware for Hackers. The SMD components needed to complete the assembly of the RetroShields were ordered from Amazon.

Assembly of the board required some SMD capacitors and resistors, and their values can be found on this schematic. Other than that, I added a socket for the 1802, two LEDs, and headers for the Arduino and individual 1802 pins.

The PCBs contain a warning that the software should be uploaded to the Arduino before attaching the RetroShield, so I installed this Tiny Basic sketch. After attaching the RetroShield and powering up the Arduino again, success! A menu is transmitted to the Arduino Serial Monitor, allowing a number of operations including Tiny Basic.

]]>
https://coldwarcomputing.com/2022/01/21/1802-retroshield/feed/ 0 218
November 2021 Timex/Sinclair Online User Group Meeting https://coldwarcomputing.com/2021/11/03/november-2021-timex-sinclair-online-user-group-meeting/ https://coldwarcomputing.com/2021/11/03/november-2021-timex-sinclair-online-user-group-meeting/#respond Wed, 03 Nov 2021 02:36:57 +0000 https://coldwarcomputing.com/?p=198 The Timex/Sinclair Online User Group met online for a couple of hours on Monday, November 21, 2021 and got to know each other a little bit as well as find out some of what’s going on in the modern Timex/Sinclair universe.

The Timex/Sinclair Online User Group meeting is an online event held by the Timex/Sinclair Place Facebook group, a group of people interested in all things Timex/Sinclair. The Timex/Sinclair 1000 and 2068 were 8-bit, Z80-based computers produced in the early-to-mid 1980s and were the American versions of the Sinclair ZX81 and ZX Spectrum home computers popular in Europe. Although largely incompatible with the ZX Spectrum from a software perspective, the family resemblance is nonetheless quite evident.

This was the second online meeting of the Timex/Sinclair Online User Group, with more planned for the future. The featured speakers this time around were Stewart Newfeld of Zebra Systems, who discussed composite video adapters and keyboard replacements he’s made available, and Jeff Burrell, who discussed his current video project.

A timeline index to the discussion topics is available in the comments for the video.

]]>
https://coldwarcomputing.com/2021/11/03/november-2021-timex-sinclair-online-user-group-meeting/feed/ 0 198
IRATA Online https://coldwarcomputing.com/2021/10/20/irata-online/ https://coldwarcomputing.com/2021/10/20/irata-online/#respond Wed, 20 Oct 2021 23:09:05 +0000 https://coldwarcomputing.com/?p=79

IRATA Online is a free PLATO service catering to retro-computing enthusiasts. It requires a free PLATOTerm client to access and while clients for modern Windows, Mac, and Linux platforms exist, IRATA Online has made available open-source clients for all sorts of 8- and 16-bit computers from the past.

Programmed Logic for Automated Teaching Operations, or PLATO, was originally a multi-user computer-based teaching platform developed at the University of Illinois in 1960. Within two decades, it was hosted on multiple networked mainframes with thousands of terminals around the world. In addition to providing interactive educational resources, PLATO also offered resources such as discussion forums, inter-user chat, and its own in-service programming language, TUTOR, that users could use to create their own lessons. Needless to say, where there is a programming language there will be games written in that language, and TUTOR was no exception.

In 1980, home computer software for accessing the PLATO system began to be distributed for many of the popular microcomputers of the era, with the system being marketed as a home education tool. It is this era on which IRATA Online is focused.

You can request a free account here to join the IRATA Online community.

]]>
https://coldwarcomputing.com/2021/10/20/irata-online/feed/ 0 79
The Amazing FujiNet! https://coldwarcomputing.com/2021/10/13/the-amazing-fujinet/ https://coldwarcomputing.com/2021/10/13/the-amazing-fujinet/#respond Wed, 13 Oct 2021 15:39:54 +0000 https://coldwarcomputing.com/?p=151 The FujiNet is an SIO peripheral for Atari 8-bit computers (400,800,XL,XE) that emulates many classic peripherals, and then some.

At its most basic level, the FujiNet can emulate an Atari disk drive and serve up disk images from an SD card. It can also act as a WiFi modem, with no need for an Atari 850 (RS232) interface. And since it has WiFi and can serve up disk images, why not serve up disk images from anywhere on the internet? Yep, it does that, too.

The FujiNet also emulates a variety of vintage printers, not just on the interface side but on the printing side as well. It doesn’t actually print anything, of course, but instead renders printouts as printer-realistic PDF files, which can be downloaded from the FujiNet’s built-in web server. The web server also allows for managing various settings of the FujiNet.

The fujiNet’s capabilities are also accessible from AtariBASIC.

On top of all that, the FujiNet also contains an emlated Z80 processor running CP/M which can be accessed via the emulated modem.

If you’d like to check one out, more information is available at the FujiNet website and you can purchase one from Vintage Computer Center (no affiliation).

]]>
https://coldwarcomputing.com/2021/10/13/the-amazing-fujinet/feed/ 0 151