Retromaster’s Electronics Projects

…related to old computers and other assorted stuff…

Archive for November, 2010

Cumulus and Custom Disk Routines

Posted by retromaster on November 29, 2010

At the suggestion of Dbug, I tried out some Oric games and demos that use their own disk access routines instead of the standard OS ones. The behaviour I have seen with these disk images has been consistent with the Oricutron emulator, so I can say that Cumulus is capable of running fine with custom disk routines.

I’ve also made an improvement to the Cumulus design, by getting rid of the 74221 and the associated components. Instead of replicating the circuitry inside the Microdisc, I used an oversampling approach as suggested by Torlus here. I used an 32Mhz clock to sample the incoming ϕ2 clock, apply a digital filter (to prevent glitches that cause instability) and digitally synthesize the associated signals (i.e. MAP, Bus Output Enable, etc.). This approach has been quite promising,  and it looks like the 74221-based circuitry can be eliminated successfully.

One thing I’ve noticed is that, using Cumulus directly attached to the Oric expansion port places a lot of mechanical stress on the connectors. Of course, this is not because of the weight of the Cumulus PCB, but due to the forces applied during SD card insertion and removal. Realising that this will be much more of a problem with the next PCB, which will integrate the LCD and the buttons, I’ve decided to connect Cumulus to the Oric expansion port through a very short length (a few cms) of ribbon cable. This will also allow me to put the board in an enclosure and the PCB can be wider than the expansion port.

So much for good news, though. Unfortunately, Cumulus still seems to exhibit occasional data corruption issues. For example, in demos, this can be in the form of some screens displaying garbage, the music going bad, or even crashes. A number of possible causes come to my mind, including Oric bus signal integrity issues, problems with ϕ2 clock related signals, board issues, CPLD-PIC interoperation or even PIC firmware problems or SD card access issues. I hope that I’ll be able to solve the data corruption issue with some heavy debugging during this week. I’ve come a long way with Cumulus, but I do realize that is basically useless if it does not work reliably.


Posted in Projects, Retrocomputing | Tagged: , , , | 4 Comments »

Cumulus and Sedoric 3

Posted by retromaster on November 25, 2010

In my post yesterday, I had said that Sedoric 3 disks were not working with Cumulus. Actually, that turned out not to be true, due to a stupid mistake on my part (mostly due to my being not very familiar with the Oric software environment).

The disk images I was trying to get to boot were actually “slave” disks, so they were not bootable at all. Since I had never tried those disks on an emulator (and never had a real Microdisc unit), the “DOS is altered” message misled me into thinking that Cumulus was at fault.

So, booting first with a Sedoric 3 Master disk gave the results in the shots above. To be able to switch disk images, I implemented a rudimentary method that goes through all images in the root directory of the SD card on press of a button.

Now that the basic functionality is working, it’s time to think about where to go next:

0. There is still a bug (probably with the Oric bus) that causes occasional boot failures or crashes. This is much less in frequency than before, but it still needs to be fixed of course.
1. There are quite a few commands missing from the WD179X implementation on the PIC. Also the whole behaviour of the floppy emulator could be made more “floppy-like”, with more accurate timings, for example. Multiple drive support is possible.
2. A proper UI that makes use of the LCD and buttons is part of the specs.
3. A new PCB design that consolidates all existing design elements into a compact, single board, and fixes existing problems (couple of missing traces, etc.) is necessary.

Posted in Projects, Retrocomputing | Tagged: , , , , , | 7 Comments »

Cumulus Booted First Game

Posted by retromaster on November 24, 2010

I checked the Oric Bus lines with the oscilloscope and it seemed that there could be some signal integrity problems (overshoot, excessive oscillation, maybe even crosstalk). So I decided to remove the ribbon cable in between Cumulus and the Oric and connect Cumulus directly to the Oric by means of a makeshift male-male adapter.

The result was a huge improvement. Now I am able to boot Oric DOS disks without problems. Sedoric 1 disks also work (like the above L’Aigle d’Or). Unfortunately, Sedoric 3 still does not boot. It sometimes crashes with garbage on the screen, or other times, I get the Sedoric copyright boot text but also a warning that says “DOS is altered”, and it is stuck there. A commented disassembly of Sedoric 3 would have been very helpful at this stage… Anyway, it looks like I am getting quite close :).

Getting Sedoric 3 to boot is the first priority now. Once I get that to work, I might work on a new PCB design that gets rid of the separate UI daughterboard and puts everything on one compact, integrated board. To be able to do that, I’ll need to figure out if the cable can be left in place (solving the signal integrity issues in some other way), as that has a direct bearing on the mechanical properties of the board.

Posted in Projects, Retrocomputing | Tagged: , , , , , | 6 Comments »

Cumulus Further Progress

Posted by retromaster on November 22, 2010

Cumulus doesn’t work quite reliably yet, but here is a screenshot of it booting into Oric DOS.

I’ve implemented the seek/step/restore commands, together with the read sector and read address commands. This seems to be the bare minimum for the Microdisc ROM to boot the OS. Unfortunately, there is a random error with the Oric Bus that causes miserable crashes (the screen filling up with garbage, etc.). When it does not happen, I can get the Oric to boot the OS. Most of the time, it does not work, though.

Getting to this stage took a fair bit of debugging and some important modifications. My original CPLD implementation contained an almost exact replica of the original Microdisc schematics. I found out that this did not work very well with the CPLD in some cases. For example, the WD179X contain an edge-trigger /WE input that controls writes to internal registers. This, however, is a problem with an XC95 CPLD, because signal transitions in the /WE line (gated clock into register flip-flops) cause random glitches. My guess is that this behaviour is due to the much higher speed of the CPLD compared to the 74-series logic chips used in the original Microdisc design. The solution here is to use a single, system-wide clock (the CPU bus clock) into all flip-flop clock inputs and use the /WE line only as an enable control. Similar issues arose also in the interface between the MCU and the CPLD, and the solution was the same.

Anyway, getting back to the currently unsolved problem I mentioned above… I modified the original Microdisc ROM to create a test ROM that will hopefully help me debug the issue. It uses the original routines in the Microdisc ROM to continuously read sectors from emulated floppy into RAM and it compares them against copies stored in the ROM. This test ROM usually works fine for several sectors, but eventually, and invariably, I see the same bus glitches occurring with this setup as well. Hopefully, I’ll soon solve this issue and I’ll have a first working prototype of Cumulus in my hands.

Posted in Projects, Retrocomputing | Tagged: , , , , , , , | Leave a Comment »

Cumulus Progress

Posted by retromaster on November 11, 2010

Here is the Atmos with the Cumulus board displaying the “insert system disc” message running the original Microdisc ROM.

Getting to this stage took a fair bit of debugging. First, I had to further tweak the MAP signal timing to make sure that all RAM accesses (including the hidden upper 16k) worked fine. Then I needed to solve a couple of problems with the CPLD code (minor changes, but critical for operation, nevertheless).

At this point, the LA shows that the CPU is stuck in an infinite loop, waiting for an IRQ, right after the first command having been issued to the WD1793. This is perfectly normal, as the floppy controller emulation code (on the PIC side) is not in place yet. That is the first item that I will be addressing in the upcoming days.

On a side note, I have also solved the instability and video flicker issues I mentioned in a previous post. It turned out to be due to the original Atmos power adapter not being able to provide enough juice to power both the Atmos and Cumulus, causing the 5V line to oscillate. Switching to an adapter with a higher current rating (1A at 9V DC) solved the problem. So, apparently, Cumulus will not require a separate power supply connection, but a single, more powerful supply will be required to power both from the Atmos DC power jack.

The debugging process here on this project also gave me the idea to design and build a specialized logic analyzer for projects such as this one. It would be very wide (perhaps up to 48 or 64 channels), but not very fast. It would be intended for the expansion connectors on retro computers, perhaps in a pass-through fashion, by means of custom-made adapters. A SDRAM module could be used for deep storage and a small MCU for USB communication with a PC host. A small FPGA would handle the capture operations and provide and coordinate access to SDRAM storage. Presence of an FPGA would also make triggering very flexible.

Posted in Projects, Retrocomputing | Tagged: , , , , , | 4 Comments »

Cumulus LCD Interface

Posted by retromaster on November 1, 2010

I built a user interface daughterboard for Cumulus. It contains a Nokia 6610 LCD screen and a few buttons (I haven’t installed the buttons yet). I decided to give this some priority at this point since it should be quite helpful for debugging.

I chose the Nokia 6610 screen because it’s readily available, cheap, and easy to drive with an SPI interface, with a lot of examples on the net. On the downside, it’s rather small and slow, but I think it’s still quite a bit better than using a character LCD module.

The board contains a LM2660 in voltage-doubler configuration to supply the backlight voltage. It generates 10V from the 5V input from the Cumulus mainboard, and a 120 Ohm series resistor limits the current, with the voltage drop over the backlight being approximately 7V. One interesting quirk is that, the LM2660 datasheet specifies a Schottky diode being required for oscillator startup, but in my case, it seems the diode actually prevented the LM2660 from working. I am not sure what could be the cause of this.

Another issue I had to solve (probably due to my misinterpretation of the LCD pinout) is that connecting the 3.3V pins to the 3.3V supply from the Cumulus mainboard caused the contrast to be completely bogus. Disconnecting the 3.3V supply (leaving only the backlight supply) fixed the issue.

I managed to get both the Epson and Phillips controllers to work. The built-in 18F46K20 SPI module supports only 8-bit transmission. However, the EUSART module can transmit 9 bits in synchronous mode. So, I used the EUSART module. There is one problem, though. The bit order is reversed. This is not a problem for fixed values like commands but care must be taken when transmitting coordinates or color values. It should still perform significantly better than bit banging.

Posted in Projects, Retrocomputing | Tagged: , , , , , , , , , | Leave a Comment »