Atom   FPGA   III                    bij Keith Howell

( De belevenissen van Keith met zijn FPGA zijn erg interessant. Daarom heb ik hem, aannemend dat de lezers dit opprijsstellen, verzocht om voor Elan een artikel over zijn vorderingen te schrijven. De redactie is verheugd opnieuw een bijdrage van hem te kunnen presenteren. H. )

Henk asked me about putting some text together from our email conversations for an article. I didn't think this was such a good idea, because a lot of them involve me scratching my head and thinking out loud. Reproducing a 'vintage' computer is a bit like doing a vintage aircraft. You would spend a lot of time with pencil and paper thinking how to do things, or fiddling with bits and bobs. Most people are most interested when you get stages done. So everytime I make progress, I update my site.*

It isn't worth documenting some of the newer features in detail because they are subject to change. And nobody else needs to know because I'm the only one with a machine that has them. All the Atom-compatible features are already well documented.

What's new? The sound output bit is working, and wired to the TV sound input. So no need to fit a buzzer to the PCB. The TV adds volume control. RAM paging (see attachement) is implemented now, so you can access the full 512K RAM as 1 of 32 RAM pages (16K) at 4000 to 7FFF. ROM paging is implemented as 1 of 64 Flash ROM pages (4K) at AXXX, and similar independent paging at EXXX. There is no RAM paging at those locations, this would have added complexity and not be that useful since there is plenty of paged RAM elsewhere and the ROM pages are mainly for storing utility ROMs.

Video RAM paging has been extended so that the CPU and VDU have independent pages. This allows the CPU running original firmware to be writing to one page while the VDU displays another. This allows the user to be shown a series of completed images, and not a continual re-drawing process.

What to do with 512K RAM? No existing software needs it, so I'm not in a hurry to add 256-megabyte DRAM modules! It would just be a waste of power, and need a custom PCB. You can do animation tricks, and have many pre-drawn screens. E.g. a virtual spaceship could rapidly flip between screens for front/back view, weapons, passenger lists, radar, engine room, etc. There is enough for 60 graphics screens, or 640 text screens! Also you could store longer documents when word-processing! Or scroll around a big image. Or have a RAM disk. Or store sounds (60 seconds of 8kbytes/second speech, 4 kHz telephone quality).

Henk mentioned it could be interesting to see what goes on at the 'kitchen sink' or bedroom desk in reality. Lots of frowning, staring at screens, and drinking coffee. Sometimes problems appear that cannot be solved by logical thought alone: one time I was baffled for a while, then noticed that two CPU pins I had soldered seemed neither high or low logic voltages. A known good version failed, so I changed the CPU and it started working again! Another time I thought I had a bug, the ROM CS signal always inactive. However, this was just an artefact of my digital multimeter. It does not see very narrow logic-high pulses. I looked at the inverted signal and the meter showed this as high with short pulses low.

Looking at my Atom there is about 350 sq. cm. of board, about the same as the original Atom without the keyboard. However mine does use fewer connections, less power and provides better video and more memory. 512K RAM in 1982 technology (6116 chips) would fill a board 27.2 x 11.2 inches (over 2 square feet!). There is enough ROM for 64 utility ROMs! I wonder if that many exist?

The I2C bus is a Dutch invention that allows peripherals to be read over just 2 wires. It simplifies board design, and chip interfacing. I've added an I2C bus port and have addressed a serial EEPROM with it. There are many interesting I2C chips around. I have added an I2C port.

A real-time clock (RTC) is essential for data logging, date stamping, or just being an alarm clock. You will need one for applications like switching things on at preset times. Heating, lights, radio, coffee-maker. You might get it to switch on the TV just before your favourite show, or when you want it to tell you about something important. The RTC is accessed through the I2C bus.

Smooth vertical text scrolling was a nice addition: there is a counter for the character-cell scan lines. Normally this become zero at the top of a video frame, but this value is now programmable. Thus the top row can start part-way down the characters, and finishing earlier causes following rows to start earlier too. It feels easier for the eye to follow smooth-scrolling text than text that jumps a line at a time. Smooth horizontal scrolling is possible but a bit harder. It is more useful for graphics. For example, you might have a game where the background is a 360 degree panorama. Horizontal scrolling would allow the player to view this without it needing to be re-drawn. Unfortunately it requires the video RAM to be organised in a suitable way, which the Atom does not. The video address sequencer would require major changes, and the RAM would no longer match the Atom's expectations.

I feel I have created the all the logic for an Atom plus some useful extra features. This sets the foundation for other work. So what to do next? One can keep making things more complicated, but I want to make something more interesting than a microcontroller but not as complex as an embedded PC. This minimises the power consumption and circuit complexity. There is not a great deal of incentive to write software such as flash filing systems or programming languages, since most development work is best done on a PC. The Atom is now more useful as a target system.

Decisions to add new features depend on weighing up pros and cons. For example, a hardware cursor circuit could fit in the FPGA but then you need a mouse interface to go with it. Software to use it is a lot of work to write, though there is some about.

Better sound output would be nice to have, since the original Atom has only a software-toggled buzzer. However, there is no existing software that uses more than this. It might be least effort to use an external chip like the AY38910 if someone desires it. The AY38910/AY38912 were popular sound chips, and still obtainable today. Best Electronics ( www.best-electronics-ca.com/ ) sell Atari spares, including the AY38910 for $11.75 and the POKEY for $5. Both should be easy to interface, and do not need separate DACs. They also sell other old chips like the 6850, SCC, SCSI and FDC chips.

They AY38910 has limited ability to play sampled wave forms, though I have heard the Atari ST play some Star Trek sounds by varying the volume register. This only has 16 levels, so the quality is not great.

Implementing sound generation in VHDL is limited to digital logic, but is possible in principle. The Atom had no sound chip, so there is no design compatibility constraint but it would be wise to emulate an existing chip. Any digital implementation will eventually need a DAC, so I added a 2-channel 8-bit serial DAC. This appears to be putting out correct voltages, but even machine code is not fast enough to get audio waveforms. Some hardware will be needed to transfer the data bits and perhaps DMA data as well. There is plenty of scope for designing complex sound generator logic.

BBC BASIC is much better than Atom BASIC, allowing better variable names than just single letters. Acorn made an expansion board for this, and should not be too difficult to build in to this project. BBC BASIC has been well tested in its time, and there is probably more source code for this than other candidates like Lee Davison's Enhanced BASIC. Atom BASIC does have the advantage that it is small enough to fit inside the FPGA, allowing it to be used as a system for programming further firmware into external ROMs.

Programmable fonts become possible after firmware has been moved off the FPGA. This would allow the system to be tailored to have lower case letters, or national variants of the ASCII code. Change that $ to a £, (but not a Euro!). I spent some time investigating foreign alphabets at www.unicode.org and www.omniglot.com, which proved quite interesting. It is very lucky that Western characters can be rendered in a small character cell. Other alphabets need larger cells.

Teletext fonts are certainly possible, though teletext attributes like colour, flashing, double-height would be a bit tricky.

LCD output opens the door to portable Atom computing. I designed it to use quarter-VGA screens (320x240). These are available in many variants (monochrome, colour). They are often almost as expensive as full-VGA screens, due to their smaller market. However, these screens are much better than the abysmal displays used in portable game machines like the Gameboy and Gameboy Advance.

Perhaps the most intriguing possibility is adding internet access. I have some bits to stick a 16c552 chip on, that would let me talk to it through a terminal program, cutting and pasting programs much easier than with the target system's editors. It needs another stacked PCB and thus won't fit in the case I currently have, though that can be solved by buying a bigger case.

The Atom is hardly suitable for viewing the internet, though perhaps it would be able to read text-only email. More practical applications would be those were the Atom is send data for display. For instance, it could be sent transport timetables, hotel room availability, simple maps, etc. for display in railway stations or tourist info stands, or hotel rooms. The latter often already have TVs.

Readers are invited to suggest ideas for what they would most want to see working next.

Cheers, Keith

........................

Tot zover het nieuws van het FPGA front. OP zijn website is meer over dit onderwerp te lezen.
Kopieer één van de onderstaande links in uw browser:


*   http://www.howell1964.freeserve.co.uk/logic/acorn_atom_project.htm

Het bezoeken waard dus. H.

TERUG.GIF

Attachement

ROM Maps

This is a provisional map of where things are placed in the 256K ROM device.
So far, only the Atom BASIC has been loaded.

Atmel sector   +0 +1 +2 +3  
Memory
block 2
0 Mousebox pcharme Econet unknown Atom Space

 

4 gags werom Demo salfaa
8 Combox axr1 Toolkit Windows
12 BASIC Floating
Point
DOS Kernel
16         BBC Space
This had two 16K ROMs by default,
and up to four 16K paged ROMs.
e.g. for DOS, co-processor, etc.
20        
24 BBC BASIC 4
28 BBC MOS 1.2
Memory
block 1
32         Atari Space
very provisional idea!
36        
40 Cartridge space
44 RFU (4K) I/O OS & Maths (10K)
48         My space
52        
Parameters
& Boot block
56 Parameter block Parameter block
60 Boot block
      --- ---