Wednesday, February 3, 2021

RETROCOMPUTING & MSX2

 Assembly of an MSX2 compatible computer based on an original work by Sergey Kiselev.

github.com/skiselev/omega/blob/master/

The small problem is that making such a printed circuit individually is not profitable. Generally having 5 copies made, as I did, doesn't cost much more and it's certainly less 'stupid' in terms of transport.

So here I am with 5 circuit boards on the desk from the Omega computer motherboard:


And of course a big box full of components to be placed and soldered by hand :


Obviously, this requires a certain financial and time investment to make these motherboards. Spending all that time for a single bord wouldn't have been really interesting. 

If all goes well with the build, maybe I'll save two boards for myself. It will therefore remain available for enthusiasts who would like to discover this type of computer.

Compared to the new FPGA versions, these boards offer real cartridge ports. They are therefore easier to use. It is also possible to make your own vintage style extension cartridges!

I report that games continue to be released for these platforms...


Sunday, January 31, 2021

The inevitable MC68000 Single Board Computer

Since the mid-1980s and the announcement of the Sinclair QL, which 'never happened', I have always been interested in the Motorola 68000. My means did not allow me to buy a Mac, but I could have buy a QL. In short...


OldComputers.net

 And then the time passed and I got down to the PC. So I never owned, either, atari of the ST range :

Wikipédia

Then the years passed again and in the early 2000s, I decided to develop my own 68000 board. Nothing very complicated. A 68000, RAM, ROM, real time clock, LCD display and serial port plus a small extension connector. Which gives this schematic: 



This schematic has some small errors, especially on the side of the MC68B50 serial converter. However, nothing serious since once corrected on the board, the system worked fairly quickly.

The PCB : 


Originally, this board was designed to operate at 10MHz. Once the operation was validated, I have not touched this system since 2004. It has now been over 15 years. 

Since a few months, I decided to take up the subject of processor boards. This is the reason of this blog dedicated to retro-computing, with current technology.

Fortunately, I kept all of the project files. In addition, all the logic of the board is contained in a PLD so that it is possible to modify the behavior of the system. 

Wen I wanted to put this board back into service, I noticed that it no longer included the 10MHz oscillator. 

Impossible to find him. On the other hand I had a version of 16MHz. So I looked to see if it was possible to adapt the board to this new frequency.

As I am using EPROM emulators with very short access time, I have not changed the DTACK delay. I only modified the generation of the Baud Rate and took the opportunity to go from 9600 baud to 19200 baud. 

At 16MHz, the clock speed is a little too fast for the 68B50 which is given for 1.5MHZ. Well, 1.6MHz should pass. 

And here we are!



I was able to reprogram without difficulty the circuit EPM128SLC84-15 with version 13.01 of Quartus II. I short, the programmable circuit diagram with Quartus :




By resuming the study of this circuit, I noticed with surprise that I had used the graphics method plus the Verilog coding. I don't use these methods at all today. I go exclusively through VHDL coding. 

Anyway the modification of the source code took me only a few minutes, programming of the CPLD included. 

The modification of this system was also an opportunity for me to test the new Momik ROM emulators :

(Fee advertising)

This emulator can emulate up to 27C040 type EPROMs. Originally this board was intended to work with AT29C040A type Flashes. I had to accommodate the differences between these two types of circuits. 

The result is that this system works great at 16MHz with two of these EPROM emulators. After successfully restarting this board using the two Momik EPROM emulators, I programmed two FLASH AT29C040A for fully autonomous operation this time. 

In fact, this is the first time this microcomputer has operated in this way. I had never inserted a real AT29C040A until now : 



Despite the fact that the 68000 used is a 12MHz version and that with a frequency of 16MHz, the serial converter is also slightly over clocked, everything works perfectly. I am satisfied with the result. And the hours spent studying this system at the time are not wasted!


Saturday, December 5, 2020

uPF--2? In fact, an uPF--1 in FPGA!

A few months ago, I started switching from the uPF--1 compatible kit based on Z80 from Wichit Sirichote to a version fully integrated in an FPGA. Basically, this kit is interesting, but has some shortcomings which make it rather inefficient to use : 


As you can see, this kit uses a keyboard consisting of standard and low-end tactile switches. This certainly allows the product to be offered at a low price, but in fact makes its use very inconvenient.

It is impossible to hit the keys quickly, which makes repetitive operations tedious and therefore does not allow efficient use of this kit. 

For me, the first thing to do was therefore to offer a keyboard with real keys like the Cherry key. But I thought it was a bit 'silly' to integrate this new keyboard to the FPGA board for several reasons. The first is that it would force me to develop a large board with actually few components on it. The second reason is that in fact, this type of keyboard could be used for other kits without having to develop a new version again, for new kits. Also, I developed this:


This is a prototype on which I integrated a connector for real-time debugging. The finalized version will not include this connector but only the 'audio' type connector allowing this keyboard to be connected to the processor board by a serial type link.

Obviously, this way of doing things requires the implementation of a serial link into the FPGA. This does not present a problem, knowing that it is possible to modify the source code of the monitor to integrate this interface. In the end, the whole thing looks like this:


the third reason was to offer a real serial link for file transfer. In fact, on the original kit, the serial link is directly managed by the processor thanks to the use of a bit of an input / output port. Bit detection is performed using timers in the form of code loops. Therefore, even at 2400 bits per second, after a certain number of bytes received, synchronization is lost. The result is that it is not possible to properly load a hex file from a PC to the kit. The received file is systematically corrupted!

Once again I built a real serial ports into the FPGA and modified the monitor to use this new device. It is therefore now possible to load a file at a speed of 38400 bits per second, or 3840 characters per second without problem. I did not push the communication speed any further because the processor still has to handle this flow of byte. On the FPGA board, the serial port will be USB compatible. Because the RS232 standard for this kind of kit is really not practical these days.

Here is a very basic example of sending a message on the display, downloaded then executed on the kit :


Note that the latest version of the source code provided by Wichit Sirichote is incomplete. Some functions do not perform correctly and require rewriting. So I did this work, in addition to that necessary to take into account the new material like serial ports and others... 

I am very satisfied with the result:



And now? It's time to move on to making the FPGA board. In order to work more efficiently with development software, I am in the process of remaking a PC based on a Ryzen 9 3900X processor. My current machine is equipped with an Intel Dual Core E5800 @ 3.2GHz from 2012. A bit outdated today! A good processor in its time but, anyway : bye bye intel ;-)


Monday, November 23, 2020

Reader of vintage PAL (next)

As I presented in a previous post, I wanted to make a small application capable of reading old PLDs in a simple way. I didn't want to venture into creating a controllable USB interface with a PC. Too complicated and too time consuming, especially with Windows programming. I could have used an Arduino-based system as well, but the DIY 'side' didn't really inspire me. I preferred to use a more 'serious' system. So I decided to use the powerful COLOR MAXIMITE 2 microcomputer as a base.


This system uses a powerful Basic interpreter and allows easy use of files on SDcard.

To be able to physically read several types of PAL, I developed a small interface, based on the computer's I / O connector. The circuit is very simple and is based around the use of the SPI bus associated with a MCP23S17 type port expander from Microchip.


Nothing very complicated on this circuit. In fact, it is possible to obtain a printed circuit board of reduced size which connects directly to the port of the CMM2.


The PCB, once made and equipped with all the components, looks like this:


The PCB is fairly easy to build despite a few surface mount components. I am thinking of putting this small development in open access but have not yet decided in what form.

Once this extension has been completed, and the first operational tests with the CMM2 computer validated, I was able to write the first program. In order to not complicate this first program, I deliberately 'restricted' its use to 10in / 8out type PAL, such as 10H8.

' PAL READER CONFIGURATION : 10 INPUTS, 8 OUTPUTS
' -----------------------------------------------------------------------------
' Signals defines
CONST CS  = 27  ' /CS for the MCP
CONST C0  = 29  ' PIN no 1
CONST C1  = 31  ' PIN no 11
CONST RST = 33  ' /RST for the MCP
CONST PWR = 7   ' Power signal for the board
CONST DLY = 1   ' Value of temporisation for SPI chronos
'
' Abstract for the PAL
' --------------------
' PIN no 1  : C0 (I)
' PIN no 2  : A7 (I) [BUS GPAx of the MCP]
' PIN no 3  : A6 (I)          //
' PIN no 4  : A5 (I)          //
' PIN no 5  : A4 (I)          //
' PIN no 6  : A3 (I)          //
' PIN no 7  : A2 (I)          //
' PIN no 8  : A1 (I)          //
' PIN no 9  : A0 (I)          //
' PIN no 11 : C1 (I)
' PIN no 12 : B7 (O) [BUS GPBx of the MCP]
' PIN no 13 : B6 (O)          //
' PIN no 14 : B5 (O)          //
' PIN no 15 : B4 (O)          //
' PIN no 16 : B3 (O)          //
' PIN no 17 : B2 (O)          //
' PIN no 18 : B1 (O)          //
' PIN no 19 : B0 (o)          //
'
' Globales variables init
TYPE$  = "10IN 8OUT"
ADDR_X = 1023        ' 1024 possibilities
PORT_A = &B00000000  ' GPBA => OUTPUT     
PORT_B = &B11111111  ' GPBB => INPUT
FILE_$ = "Pld type: " + TYPE$ + " at: " + DATETIME$(NOW)
' Signals configuration and INIT. 
'
' *** IMPORTANT : Respect the order of this sequence ***
'
SETPIN PWR, DOUT : PIN(PWR) = 0
SETPIN RST, DOUT : PIN(RST) = 0
SETPIN CS,  DOUT : PIN(CS)  = 0
SETPIN C0,  DOUT : PIN(C0)  = 0
SETPIN C1,  DOUT : PIN(C1)  = 0
' Display home page
PRINT "********************************************"
PRINT "*             PAL READER V1.0              *"
PRINT "*                                          *"
PRINT "* BE SURE TO CONNECT THE INTERFACE FIRST ! *"
PRINT "*                                          *"
PRINT "*        Copyright SillyCony 2020.         *" 
PRINT "*                                          *"
PRINT "*                "+TYPE$+"                 *"
PRINT "*                                          *"
PRINT "********************************************"
' Wait for keystroke
PRINT : INPUT "Press 'ENTER' to start when ready"; Misc : PRINT
' Start of the process
  ' Open file. If existe : overwrite the file
  OPEN TYPE$ + ".pld" FOR OUTPUT AS #1
  ' Powering the board : *** respect the sequence ***
  PIN(PWR) = 1 : PIN(CS)  = 1 : PIN(RST) = 1
  ' Open the SPI PORT at 3.125MHz, MODE 0:0, ONE byte 
  SPI OPEN 3125000, 0, 8
  ' MCP23S17 configuration
  McpConfig
  ' Reading loop 
  PRINT "-> Reading... "
  DO WHILE ADDR_X
    PRINT ".";  
    ' Configure all the signals for the PAL
    Port_A_Out : Port_B_Out : Port_C_Out
    ' Write in file the PAL return   
    PRINT #1, BIN$(ADDR_X, 10) + " " + BIN$(Port_B_In(), 8)
    ' Next 'address'
    ADDR_X = ADDR_X - 1
  LOOP 
  ' Write Date & Time 
  PRINT #1, "" : PRINT #1, FILE_$ : PRINT #1
  ' Close the file
  CLOSE #1
  ' Message
  PRINT : PRINT : PRINT " -> Reading terminated. ";
' Shutdown the board: *** respect the sequence ***
PRINT "Shutdown the board."
SPI CLOSE : PIN(C0)  = 0 : PIN(C1)  = 0 : PIN(RST) = 0 : PIN(CS)  = 0 : PIN(PWR) = 0
' Programm END
' -------------------------------------------------------------------------------------------------
FUNCTION Port_B_In() AS INTEGER
  LOCAL Misc
  PIN(CS) = 0 : PAUSE DLY
  Misc = SPI(&B01000001) : Misc = SPI(&H13) : Port_B_In = SPI(&H13)
  PIN(CS) = 1 : PAUSE DLY
END FUNCTION
' -------------------------------------------------------------------------------------------------
SUB Port_A_Out
  LOCAL Misc
  Misc = ADDR_X AND &B0111111110 : Misc = Misc / 2
  PIN(CS) = 0 : PAUSE DLY 
  SPI WRITE 3, &B01000000, &H14, Misc 
  PIN(CS) = 1 : PAUSE DLY
END SUB
' -------------------------------------------------------------------------------------------------
SUB Port_B_Out
  LOCAL Misc
  Misc = ADDR_X AND &B000000000
  IF Misc <> 0 THEN
  PIN(CS) = 0 : PAUSE DLY  
  SPI WRITE 3, &B01000000, &H15, Misc
  PIN(CS) = 1 : PAUSE DLY
  ENDIF
END SUB
' -------------------------------------------------------------------------------------------------
SUB Port_C_Out
  LOCAL Misc
  Misc = ADDR_X AND &B0000000001
  IF Misc = 0 THEN : PIN(C1) = 0 : ELSE : PIN(C1) = 1 : ENDIF
  Misc = ADDR_X AND &B1000000000
  IF _DataTemp = 0 THEN : PIN(C0) = 0 : ELSE : PIN(C0) = 1 : ENDIF
END SUB
' -------------------------------------------------------------------------------------------------
SUB McpConfig
  ' Force Chip Address to 000
  PIN(CS) = 0 : PAUSE DLY
  SPI WRITE 3, &B11110001, &H0A, &B00001000 
  PIN(CS) = 1 : PAUSE DLY
  ' CONFIGURE PORT A
  PIN(CS) = 0 : PAUSE DLY
  SPI WRITE 3, &B01000000, &H00, PORT_A
  PIN(CS) = 1 : PAUSE DLY
  ' CONFIGURE PORT B PULL UP by default
  PIN(CS) = 0 : PAUSE DLY 
  SPI WRITE 3, &B01000000, &H0D,&HFF
  PIN(CS) = 1 : PAUSE DLY
  ' CONFIGURE PORT B
  PIN(CS) = 0 : PAUSE DLY 
  SPI WRITE 3, &B01000000, &H01, PORT_B 
  PIN(CS) = 1 : PAUSE DLY
END SUB
' -------------------------------------------------------------------------------------------------
(Sorry but there is no coloring class for the Basic language).
 
Again, there is nothing very complicated in this source. Please note that I am using the CMM2 via the USB serial port on my PC, equipped with the 'Tera Term' software. CMM2 also has the possibility of being used in exactly the same way, in complete autonomy, directly with a VGA screen and a USB keyboard. Graphical instructions can also be used to enhance the 'user experience'.


At the end, a file is generated in the form : 

Address                                                              Data
A09 A08 A07 A06 A05 A04 A03 A02 A01 A00    D07 D06 D05 D04 D03 D02 D01 D00

I did not generate a particular format, but it is still very easy to do from the Basic source, for example to use this data with the 'Logic Friday' utility, which allows the generation of the equations corresponding to these data.


Please do not hesitate to send me your comments :

Monday, November 9, 2020

Retro keyboard.

Last month I published an article on the Z80 processor based kit from Wichit Sirichote. In this article I mentioned the type of keyboard used and the fact that I found it unsuitable for this kind of use. Which is why I decided to develop a more suitable keyboard by myself : 


Since this publication I have developed the software for the keyboard processor using a real time debugger. The processor used is a low cost generic processor without peripheral. For the moment it is not placed on the printed circuit board because the emulation is made thanks to the 20 pin connector visible on the image below :



The characteristics of this keyboard are on the one hand the use of Cherry type keys and on the other hand the code output via a serial port. I didn't want to develop a keyboard outputting the code in parallel : too many signals to connect. And it would have been necessary to develop a keyboard for each computer considered.

As expected, it will suffice to develop a small serial / parallel converter for the processor board to which the keyboard will be connected. This greatly reduces the cost of such an adaptation. I plan to do this for the Omega motherboard I was talking about in the previous article.

https://www.retrobrewcomputers.org

The keyboard provides the code for the key pressed. In order to perform tests, I simply made sure that the generated codes were display characters based on the letter 'A' : 


The keyboard does not produce the space code... This test actually comes from the keyboard output. I have to say that the feel provided by the keys is very similar to what one feels with a standard computer keyboard. The goal is reached...

It now remains to convert the Wichit Sirichote kit into an FPGA-based system. I have already implemented this kit on a Digiasic board but I would like to develop a new board with a more recent FPGA and with an I / O port compatible with the MPF1.




Wednesday, October 28, 2020

Retro Computing.

Is retro computing something you just do for fun? Certainly, but not only!

The microcomputers of the 80s were open and easy to program, often in Basic, but also in assembly language. It was quite easy to create cartridges or expansion boards for them. Everyone remembers the Commodores, Atari, Apple, Sinclair, BBC etc etc...


In short, a time of great creative freedom. All this gradually disappeared with the hegemonic position of the PC(IBM) / Microsoft 'association'.


Is it possible to regain some freedom again in this digital world? Yes of course. By resuming and 
continuing the great road of creation abandoned in the early 90s. How? by taking up some good ideas from the time and developing them :


There were a lot of good ideas in the 80s. But, if we take the case of 8-bit machines, the MSX standard was a very good initiative since it allowed a good stadardization of the computers, while preserving a good freedom of design. This standard was originally initiated, among others, by Microsoft : 


To enter the MSX scene, It is obviously possible to equip yourself with some new MSX machines based on an FPGA, but I think that in the introduction, a machine created such as at the time would be a good starting point.


All this written, it remains to find an effective solution to launch into the realization of an MSX machine. Fortunately, Sergey Kiselev has recreated a great MSX computer motherboard called Omega :

My own Omega main board issue.

The Omega computer is not based on any computer that has existed but only on the MSX 2 standard. Therefore, it is necessary to obtain a whole set of obsolete components but still available on the Net.

It may take a little time to build this board but the months ahead should leave time for this task. In the end, it should look like this :

https://www.retrobrewcomputers.org

I am thinking of using my own keyboard version with this Omega.

A good introduction to the MSX standard with the Yamaha CX5M computer, recently published :


Of course there were some great 16/32-bit machines as well, Amiga, 520ST, but that's another story...



Monday, October 26, 2020

Retro keyboard.

Iin 2016, Wichit Sirichote created learning kits for different types of microprocessors, including the Z80 : 


This kind of kit is very interesting but suffers from some problems in my opinion. The first of these, and certainly the most important, is the keyboard. The tactile switches used are not suitable for precise, regular and comfortable typing. These are front panel switches, intended to configure a device, but certainly not to serve as an element of 'dialogue' with a computer. 

I'm not even talking about the self-adhesive plastic film where the key symbols are printed. It just makes typing painful : 


So I decided to create a keyboard equipped with real input keys. For this, I start by creating a prototype of what should be the type of keyboard that I will use for my future developments :


After a few days of waiting, I received the printed circuit board and soldered the components that will allow me to perform the programming of the on-board microprocessor :


Why an embedded microprocessor on this keyboard? Because this will allow the development of a keyboard, I hope, adaptable to a large number of materials, without having to recreate it each time.