Retro CPC Dongle – Part 35

Time for a quick update. I’ve integrated the SDRAM controller, the byte cache, and created some logic to map some of the SDRAM address space to the CPC ROM enable line. I also created some logic to allow the support CPU to push data into the SDRAM. This means that the support CPU can alter the ROM configuration of the CPC2 based on a user-set configuration.

To test the set-up, I created an example ROM that when booted by the CPC, it copies itself to address 0x4000, then dumps 64 bytes of memory at 0x4000. This will test the SDRAM controller, the cache and the cache replacement algorithm. Here’s the output.

Booting a dynamically installed ROM

Continue reading

Retro CPC Dongle – Part 34

Following a summary of the timing closure challenges in my last post, here’s a few more lessons learned from the process of trying to get my SDRAM and DMA controller to run at their fastest possible speed.

A lot of my timing closure process involved changing the RTL code and checking the effect on the timing. It’s a slow and laborious process, so here’s a list of my findings so you can save the hours of compilation time that it took me to test these.

Continue reading

Retro CPC Dongle – Part 33

Hello CPC fans! Has it really been 4 months since my last post? How time flies. Thanks to codepainters for the prompt to get going on my next post, and for reminding me that there are readers following the progress of this project.

I spent the first 3 months of this year refining the caching SDRAM controller and chasing timing closure issues. The SDRAM controller and it’s byte cache worked absolutely fine in simulation but failed to work reliably when I put the design in silicon at high speed. The sort of random and unpredictable behaviour I saw is usually indicative of timing issues, (especially when it worked at lower speeds), so I turned my attention to the timing reports from Quartus. This was new ground for me. I knew that IO timing was something that I should pay attention to, but until today my designs generally ran at sub 50MHz speeds where there’s enough timing slack to not notice the issues. However, on every design I’ve ever produced, at least one or two of the Timequest reports were in red, meaning that there were timing violations and hidden problems waiting to rear up when I least wanted them to. Continue reading

Reliable Wake-on-LAN

Wake-on-LAN is a great tool and allows your home PC to seem almost cloud-like. You can switch on your PC without needing to touch it, and have it available when you need it without it using power constantly.

However, there are some drawbacks. It won’t work from a cold-start, that is the first time you power cycle the PC. On some motherboards, it won’t work if you issue a shutdown command, and Windows and Linux can operate differently, even on the same motherboard. It does seem to work well for the suspend modes (S1-S3), but then you’re consuming more power than an S5 soft-off state. Of course, if you suspend and then lose AC power not only can you not restart, it may also corrupt your system.

Then, of course, it’s called wake-on-LAN, not sleep-on-LAN, so there’s no way to turn it off again. “Ah-ha”, you might say, “log on remotely and issue a shutdown command”.

Raspberry Pi Zero W

 

That’s all possible if your machine hasn’t crashed or frozen, with a kernel panic or just the old-fashioned BSOD. What about a simple reset? These things are taken for granted when you’re physically near the machine.

After years of struggling with variable levels of success with W-O-L, I decided to fix the problem by fitting a second PC inside my home computer. It’s not as silly as it sounds, because of the internet-of-things and the truly amazing work of the Raspberry Pi foundation.

Continue reading

“Got Your Back”

if_Drive-Backup_79136Back-ups are one of those things that everyone knows that they need, but seldom puts much time or effort into setting up and maintaining properly. My previous safety net was CrashPlan, who are exiting from the consumer back up space. This left me in a difficult place to try and find a cloud provider that supports large server backups from Linux at a consumer price.

I looked at Amazon Cloud Storage ($60 per TB per year), Google ($240 per TB per year), and Backblaze B2 at $60 per TB per year (I didn’t consider Azure, given my Linux infrastructure). While Amazon may seem a safer bet on the surface, I found their EC2 pricing unnecessarily confusing, not transparent, and potentially a “runaway” cost as everything has a price per unit. This led me to believe the consumer cloud pricing may just be a transient offer in their quest for per-byte/second billing of computing, storage and networking cloud services. I needed something that had been around for a while, had simple pricing and a focused offering. Backblaze B2 fits those criteria. Continue reading

Retro CPC Dongle – Part 32

Well, as promised in my last CPC2 post, I finished the next build of the CPC2 board and learned a lot of things during the process. Somethings worked, some things didn’t, but every build is giving me a wealth of knowledge of product design, fault diagnosis and rectification work. Yes, de-solder braid really was my best friend in this build!

Finally, a working board (click here for large)
Bottom side of board (click here for large)

Continue reading

Arduino ISP

As a brief reprieve from my main CPC2 project, I sidetracked into Arduino programming to solve a problem on the CPC2. I need to create an interface to a memory card, with only two wires. To do this, I’m going to use an Atmel (Microchip) ATtiny841 to interface between the memory card SPI interface and a two-wire serial UART. To program this device without spending heaps of money on a dedicated programmer, I’ll use an Arduino to program the Tiny. This post covers setting up an Arduino to write a bootloader into another Arduino or Atmel chip. To test this process, I used an Freetronics EtherTen to program a Freetronics Eleven that had a damaged bootloader.  I’m using version 1.8.5 of the Arduino IDE.

Continue reading