Monday, 19 October 2009

And now....with USB!

Been too busy recently to do much with this but had a couple of mammoth wirewrapping and code hacking sessions this last week.

What I've done is add a Vinculum VDIP2 module. This makes interfacing with USB storage devices (and other USB devices) a doddle, it's got its own firmware that handles all the FAT32 misery and just presents you with a few simple APIs to open, seek, read, write bytes to and from files etc.

I was given the inspiration by RetroClinic's DataCentre interface for the BBC Micro. This lets you fill up a USB stick with all your favourite games as disk images and use them from the BBC just like normal disks.

So far I've kept the interface dead simple, and use a PIO and bit-banging to do all the bus signals, though I'll probably have a go at marrying this up closer to the z80 bus directly to speed up larger transfers. (Though it only takes a couple of seconds to load up a full 32k)

The biggest challenge has been to port CP/M. There's not a lot of room in the BIOS area to fit in all the stuff I'd like so I think I may have to cheat and move some of the code for accessing the Vinculum into ROM to free up a bit more RAM and allow for a little image file selection menu.

Anyway here's a couple screen shots of CP/M 2.2 running (via a serial link). It's read-only so far, though to save me constanly corrupting my usb sticks when I make a mistake!

Sunday, 13 September 2009

fungal fun

When I got back from Retro Reunited today (wish I could have stayed longer), I decided to pick out a beeb from my spares pile to fit a new DataCentre card to and take down to London as my one allowed "toy" in the flat!

But I was confronted when I pulled the machines from the shelf with something that looked like a scene from the Donald Sutherland version of the Invasion of the Body Snatchers!

I've got 4 beebs all covered in this stuff! I've started by dismantling one and giving it a very good clean with IPA but so far all I've been rewarded with is a folorn beeeeeeeeeeeeeep!

Looks like I need to get the damp sorted out!


Sunday, 30 August 2009

Lo-Res Graphics!

The machine has been running reliably for some time now - running a "Dewdney's game of life" program continuously for 5 days at 5Mhz - it should be good for six but I haven't got a crystal handy!

Anyway now its going reliably I decided to add a PIO chip which was very easy - those lads at Zilog made some very nice and easy chips! But then I needed something for the PIO to do so I decided to build something to interface with one of my other hobbies - NBTV (narrow bandwidth television).

I've already built a televisor (a mechanical television) and concocted my own colour standard so why not build a "graphics card" that can output NBTV signals! So far the graphics card comprises ten resistors and a transistor to combine 7 bits output by the PIO into a single analogue voltage (2 bits for R, G and B and another bit for sync).

An interrupt routine runs off the CTC which outputs a pixel every 50uS. This works ok but jumps about a fair bit if there are any other interrupts for the serial port or the other CTC timers.

A program can run (slowly) in the foreground and update the contents of the screen. The resolution is 48x32 pixels with 64 grey tones.

Next up I'm going to add colour and make a proper graphics card that generates NMIs instead of interrupts so that the other interrupts don't mess with the timing!

Tuesday, 11 August 2009

Improved memory logic

After a bit of a redesign I've now got both CMOS and NMOS working at 4MHz reliably. It turns out that the memory board logic had too long a propagation to the ROM and RAM0 lines - caused by having two cascade '138s and lots of '02s and '04s in the way.

After a bit of head scratching I've now got the control logic down to the attached diagram and this seems to be a lot more reliable at speed and leaves a nice WINDOW signal which will be used as the window for the graphics memory when I get round to trying out the VGA card.


Saturday, 8 August 2009

Working again

I've now got everything working at 4MHz with either the NMOS or CMOS part. This after much messing around!

I've now got a "proper" clock module giving 8MHz as the main clock and drive all the other chips from the XTAL/2 line (to get proper 50/50 duty cycle). Also the clock is now buffered seperately before going to the bus.

I still am getting the odd glitches though that disturb interrupt operation but I'm not sure why!

Anyway I've now added a CTC chip and am exercising this with some code. More schematics and code to follow soon....

Monday, 3 August 2009

Once step step back

The step forward:

I've now got IM2 mode interrupts working - and a decent improvement in throughput!

The mistake I'd made was in the buffering of the Z80, not the software. When an IM0 or IM2 interrupt happens the z80 asserts /IORQ and /M1 together and the device puts the vector on the bus which the z80 reads, however the z80 doesn't assert /RD so my old buffering logic was not letting it through! I've now changed the buffers to work on /WR and WR instead of /WR and /RD. (new bits in blue boxes on the schema).

The step back:

I bought a CMOS z80 (8MHz) from ebay in the hope of improving on my clock speed but this hasn't worked out, the new part is only capable of 2MHz! No idea why yet though I think I'll try adding some pull-ups to the data lines between the buffers and the z80....can't hurt can it?