C-ONE BOOT


OVERVIEW | TECHNICAL | SF.NET PROJECT PAGE | BROWSE CVS


Description

This project develops the code in the C-ONE's boot ROM. The boot ROM is responsible for configuring the main FPGA and loading any ROM images that it needs to start. It can also preload applications into system RAM, and an animated power on logo is included as an example of this. Finally, it can load a program into its own environment and execute it after it's done booting the main system.

Architecture

The C-ONE motherboard has two FPGAs. The smaller one, an Altera ACEX EP1K30, is configured from the on board Flash ROM at power up. The larger FGPA, an ACEX EP1K100, needs to be configured before the computer can start. In order to be as flexible as possible, the smaller FPGA hosts a boot environment that loads the configuration files from disk. This allows you to easily swap between several different configurations. C-ONE Architecture It also means that upgrading the C-ONE with new hardware configurations is as simple as putting new boot files on a floppy or your hard drive.

The 1K30 contains a clone of an Amstrad CPC, with a RISC CPU that is capable of emulating both a Z80 and a 6502. It can address 1 MB of RAM from the Multimedia SIMM. The CPC core has access to all the I/O devices it needs to boot the system. You can also quit the boot process, get a basic prompt, and use it as a CPC computer.

The C1 can program the on board Flash ROM in system. This means that every aspect of the C1 is user upgradeable, except for the CPLDs (these require a JTAG interface and cable).

Boot Procedure

The code starts with the first controller and selects the first device. It then tries to find the boot files in the first partition on that device. If it can't find the boot files, it proceeds to the next device. If there are no more devices on that controller, it proceeds to the next controller, until there are no more controllers.

The following boot devices are supported:

Controller Device Filesystems Status
Floppy 1.44 MB 3.5" HD drive FAT12 not implemented
IDE Hard Disk/Compact Flash FAT12, FAT16, FAT32 working
IDE CD-ROM ISO9660 working
ROM Flash ROM Custom ROMFS working
  SourceForge.net Logo

News

Tobias Gubener's code changes merged with CVS, docs updated
    magervalp - 2004-09-29 05:49   -   C-ONE boot code
The code changes Tobias Gubener needed to do to get the boot code to run on his CPC core have been merged with the CVS tree. The tech docs on the c1boot site have been updated to reflect the changes.
[Read More/Comment]

Tech details on flash programming posted
    magervalp - 2003-08-18 09:31   -   C-ONE boot code
The C-ONE boot homepage has been updated with a detailed I/O memory map, and information on how to write to the flash rom:

http://c1boot.sourceforge.net/c1flash.shtml
[Read More/Comment]

Keyboard and volume name code fixed
    magervalp - 2003-06-18 06:08   -   C-ONE boot code
The hw bug in the keyboard FIFO was fixed, so the boot menu works correctly now. A small bug relating to FAT volume names was fixed - the code would end up in an endless loop if the volume name entry had the Archived attribute bit set.
[Read More/Comment]

[News archive]

In order to boot successfully, the configuration files need to adhere to these rules:

It should be noted that on FAT and ISO9660 drives, only the 8.3 filename is used. VFAT, Joliet, and other extensions are silently ignored.

As an example, this is what the C64 mode configuration files could be called if they were on an MS-DOS drive mounted as D:

D:\BOOT\0DESC.TXT           ; description for boot menu
D:\BOOT\0DRIVE.BIN          ; executed in the drive cpu after booting
D:\BOOT\0FPGA.RLE           ; RLE compressed FPGA core
D:\BOOT\0R000000.BIN        ; the main FPGA core is loaded as a rom
D:\BOOT\0R051000.BIN        ; char rom at $1000
D:\BOOT\0R059000.BIN        ; char rom at $9000
D:\BOOT\0R05A000.BIN        ; basic rom
D:\BOOT\0R05D000.BIN        ; char rom at $d000
D:\BOOT\0R05E000.BIN        ; kernal rom

After the FPGA has been configured and the memory images loaded, one of two things happen. If an xDRIVE.BIN file was found, it's loaded and executed. If no such file was found, the /DMA line of the 65816 is set high (allowing it to start), and the drive CPU sits in an endless loop.

Known Bugs

In the current version of the boot rom, the following doesn't work as advertised:

Developers

License

The C-ONE boot code is available under the standard BSD license:

Copyright © 2003-2004, the C-ONE Boot Project
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Links

http://c64upgra.de/c-one/
The official home page of the C-ONE
http://groups.yahoo.com/group/CommodoreOne/
The C-ONE mailing list
http://www.cling.gu.se/~cl3polof/c1/
Pictures of my development board