CTPCI Project



Français


Schematic from Rodolphe...

2005 July 31. Rodolphe Czuba start a PCI extention project for the CT60, a board with a bridge PLX 9054 who is compatible with the PLX 9080 used on the MILAN.

Because in 2005 the TOS is a sort of graphical open firmware, the TOS must boot with the PCI main devices (like screen, mouse and keyboard).
So I have planned two mains drivers inside the CT60 PCI TOS:

The PCI drivers are loaded with the CT60 Flash Tool in HEX format (S record) at the top of the flash, so the Atari Diagnostics are not valid when the PCI drivers are loaded.
A third driver for IDE seems also planned.


New CT60 Software Package:


2006 January 26. There are lot of work for add PCI support (PCI BIOS, drivers, etc...) inside the TOS, nevertheless since some months I wait the hardware for test the Radeon driver (the main driver).

The PCI (X)BIOS is finished since 2005 August but not tested.
CTPCI hardware registers mapping (configuration and slots interrupts) are needed for finish this part.
Some specific PLX XBIOS calls (like dma_setbuffer, dma_buffoper, read_mailbox and write_mailbox) are added to the original PCI (X)BIOS calls. The PLX is also the first device of the PCI (X)BIOS so it's possible to install and use his interrupts and not only PCI slots.

The Radeon driver is finished to write since 2005 October but not tested.
In 2005 November a solution was found for test and debug the fVDI part and the TOS calls, the current alpha release works with a 65K x 640 x 480 Videl screen!
The fVDI driver is inside the TOS but can also be called by a latest version of fVDI installed inside the AUTO folder (radeon.sys). The fVDI implemention inside the TOS is reduced to the minimum code size, the TOS calls are rewrited but use always the original VDI variables and structures. So for example the true type fonts are unimplemented.
The accelerated hardware functions today are mouse, blitting (screen copy), lines, filling, and virtual screen. The XBIOS installed only by the TOS driver update screen functions (like Physbase, Vsetscreen, Vsetmode, Montype, Vgetsize, and Vsetrgb) and the new CT60CONF.CPX can set boot/default screen with 256 or 65K colors in:

The driver has also 32M colors modes but the TOS can't use these modes.
The driver test the host bridge endian from the PCI (X)BIOS, so the host can swap bytes or the radeon board can swap bytes (actually the PCI (X)BIOS boot configure the PLX for swap bytes so all PCI boards can work in Intel format, the PCI himself has a Intel format).

The USB driver is in progress, but paused because it's better to wait the hard and finish the first driver.


Installation inside the tower:


We need free space for install the maximum of 3 PCI boards (4 now).
Personnaly I have planned to use these 3 boards:


The boards who wait the CTPCI...


Before the motherboard moved...


PCI on the evaluation board M5484LITE:


After 3 months without working (I need hardware), and at the beginning of April, Mark Duckworth send a mail about a donated Coldfire evaluation board for Atari developments, the M5484LITE. I was very interrested :-). This board has:

There are lot of work for run a TOS on a Coldfire, but it's a method for me to test the PCI bios and the Radeon driver. The second reason is for a contribution to the Atari community on the Atari Coldfire Project.

For the keyboard, it was easy to change Eiffel for replace the serial port by the CAN bus, for do this prototype I have installed on the FALCON a PIC18F242 (16 bits) who replace the PIC16F876 (14 bits), the CAN version exist only on the 18F familly, I have used a PIC18F258 for the M5484LITE.

For the TOS, I have rewrited the XBIOS with drivers for the serial port, the IKBD from CAN, the MFP chip with the GPT and SLT timers on the Coldfire, the flash parameters, etc...
The CF68KLIB used is the 68030 target, the MMU of the Coldfire is useful for protect the TOS copied in SDRAM. Like the CT60 we found the pseudo STRAM with the cache in writethrough, and the SDRAM with the cache in copyback.

2006 June 3. The TOS works until starting GEM, the CompactFlash is detected but writing his registers not works, the PCI bios works for configuration, the VDI cannot be used because blitter hardware not exist, so we need to use the Radeon with fVDI, and an ATX power supply must be connected on the M5484LITE.
Now there are two targets, the ct60tos.bin and the firetos.hex.


The debug on the M5484LITE board and Eiffel 2.0 CAN version...

2006 June 28. After rebuild the PCI TOS with X86EMU added for init the Sapphire board correctly with his VGA Bios, the (X)BIOS works on the board with a screen selected at 1024 x 768 x 65K colors and also in 256 colors.
The next step is to test the VDI inside the TOS, because actually the CompactFlash not works.


Le boot with the Sapphire (Radeon 7500) in 1024 x 768 x 65K and the M5484LITE board...

2006 August 18. After add a 2 MB ram-disk, a TFTP loader with a file list inside a TFTP.INF, because I had some problems with the GEMDOS and the Coldfire, I have finally after some changes used BDOS (from Emutos). The desktop works below theses lines in 1280 x 1024 x 65K colors, sure there are always some bugs (for example the state SELECTED inside the menus, the transparent graphic modes not accelerated actually, but the TOS works just quite enough. As weel as I have tried with success Aniplayer (without sound ;-) ). The screen modes in 256 colors works also. Actually I havn't tried fVDI and RADEON.SYS inside the AUTO folder. The fVDI part used here is inside the TOS and use his variables.
The next step ? Fix bugs and maybe try again on the CTPCI ?


The TFTP loader and the GEM in 1280 x 1024 x 65K colors...

2006 September 10. Set ram-disk size to 8 MB. Rewriting texts fonctions of fVDI in Coldfire opcodes. Modification of TOS for working in 16M colors, the color icons are displayed in monochrome. CT60CONF.CPX can select video modes in 256 / 65K / 16M colors for the boot and/or the file NEWDESK.INF. Kronos and Vdibench returns good results for the texts in 1280 x 1024 x 16M colors.

2006 October 6. Writing a desk accessory jpegsnap.acc (nothing worked before). Add a tftpsend directory on the desktop for send files to the TFTP server. Better speed for the SDRAM. MiNT tested with succes (the modifications are inside the M5484LITE.readme file).



A screen capture with jpegsnap.acc in 1280 x 1024 x 16M with the M5484LITE board...

2006 December 8. Finally the CompactFlash works, the driver inside the TOS can install until 14 partitions on the CompactFlash. An IDE emulation is in progress. The protocoles XHDI and SCSIDRV are also inside the TOS.
Modification at the XBIOS video modecode for get different frequency (56, 60, 70, 85 Hz). Build a CPX for test all video modes.
Acceleration of the Radeon driver and the TOS VDI (based on fVDI).
The next step is to write an ethernet driver for MiNT, try NFS, and especially make DRM to the Radeon driver for get OpenGL hardware acceleration.



The CPX for test all video modes and the latest benchs...

2006 December 28. Now I have a 2nd graphic board, a Sapphire Radeon 9250 128 MB - 64 bits.
VDI Texts (v_gtext, v_justified), lines (v_pline, v_bar), filling (v_bar, v_recfl), and copy (vrt_cpyfm, vro_cpyfm) are now at the maximum speed :-).
The TOS himself call the accelerated functions and bypass fVDI.
The driver is always compatible with fVDI, but backward compatibility seems broken since fVDI 1.14 (vwk structure).
Filling works also with user color patterns (vsf_updat), and text rotation works (vst_rotation) like the original TOS. This features actually not works inside fVDI.
This is the results with Kronos:

Kronos test Radeon 7500 Radeon 9250
VDI_CIRCLE 3943.662 (op/sec) 3943.662 (op/sec)
VDI_ARC 27164.179 (op/sec) 27164.179 (op/sec)
VDI_BAR 44250.000 (op/sec) 44250.000 (op/sec)
VDI_ELLARC 25200.000 (op/sec) 25200.000 (op/sec)
VDI_ELLIPSE 3582.090 (op/sec) 3582.090 (op/sec)
VDI_ELLPIE 637.168 (op/sec) 637.168 (op/sec)
VDI_PIESLICE 800.000 (op/sec) 802.974 (op/sec)
VDI_RBOX 19085.714 (op/sec) 19085.714 (op/sec)
VDI_PLINE 100756.219 (op/sec) 96280.000 (op/sec)
VDI_FILLAREA 1390.909 (op/sec) 1390.909 (op/sec)
VDI_GTEXT 15000.000 (op/sec) 15020.000 (op/sec)
VDI_JUSTIFIED 5914.191 (op/sec) 5973.333 (op/sec)
VDI_BLITTING 80881.188 (op/sec) 44346.000 (op/sec)

There are little speed differences between the CT60-100 and the M5484LITE, so I think get the same results on the CTPCI.



The Sapphire Radeon 7500 All-In-Wonder VE 64 MB - 128 bits (at left) and the Sapphire Radeon 9250 128 MB - 64 bits (at right)

2007 January 24. Integration of VIDIX inside the TOS with some new XBIOS functions beetween 400 and 417:

Now, it's possible to play movies in full screen with Aniplayer :-) (my current screen is 1280 x 1024 x 16M), actually RGB and YUV (MPEG for example) output formats.
I have tried without success bus mastering with the Radeon, so I use the DMA (there are 16 channels on the Coldfire and 2 channels on the CTPCI PLX 9054 bridge).
Now I try to get TV on the Sapphire All-In-Wonder VE 64 MB PCI (Radeon 7500).
DirectFB seems a better choice for get 3D hardware acceleration (supported by Mesa).

2007 February. Suspended working on the Radeon board. We are in 2007, so why try to get analog TV on the Sapphire All-In-Wonder VE?
New plans for integration of a real time OS and a TCP/IP stack for add new Coldfire tools.
The choice is FreeRTOS and lwIP.

2007 March. Add an HTTP server, html pages are in flash memory.
Moved the PCI part of the TOS in flash compressed to LZ format. After decompress the TOS, now there are two parts:

The compressed part is stored always from 0xE00000 to 0xEEFFFF (CT60 TOS compatibility with the parameters inside flash at 0xEF0000 to 0xEFFFFF).

2007 April. Add a TFTP and a FTP server using the internal 8 MB ram-disk.
Add a command line shell using the serial port (terminal) or a Telnet server.

Juin 2007. There are no real bus error (or Access Fault) on Coldfire like the MC68060, so unused zone are now protected by the MMU.
There are two stacks on the Coldfire V4e (Supervisor and User), so I make some changes inside the CF68KLIB for run himself in supervisor and run FreeRTOS tasks (TOS himself is a task) in user.
With this feature, I thing get more programs running under the CF68KLIB.

2007 July. Some plans for add an AC97 codec on the Coldfire PSC2.
To be continued...

2007 October. With GlueStick (socket BSD using lwIP), add the STiK functions and his cookie.
It's also possible to get, by a direct call, the functions of the TCP/IP stack with a 'SOCK' cookie:

Tested with AFTP (STiK) and a rebuild version of Highwire (BSD socket using lwIP and the 'SOCK' cookie).

2007 December. Try to add a VNC server.

2008 Jannuary. Add the M54455EVB target, the makefile can create three targets:

The evaluation board M54455EVB is a complete Atari: Unfortunately the v4m has no FPU, and the board is a little bit expensive.
Rebuild the TOS for use: This target will be untested actually because I have no board and I cannot get enough peoples interrested for this new adventure.

2008 May. Fix some bugs inside the TCP/IP stack.

2008 June. Add a new command for trace instructions handled by the CF68KLIB for easily found why some programs not like it.
Fix arbiter timeout (Access Fault simulation from an interrupt).

2008 July. Moved all FreeRTOS tasks in native Coldfire code excepted the TOS who runs under the CF68KLIB.
Add breakpoints commands for the TOS task of FreeRTOS.
When there are lot of consecutive crashs of the TOS, the task is killed for try to get an easy debug with with the command line shell of FreeRTOS.
Add a command for trace traps TOS calls.

2008 August. Try a PCI riser with the M5484LITE, unfortunately this model is just 5V compatible on his two user sockets. Cut the I/O traces for solve the problem so the security is removed., because the Coldfire support only 3V3. Some PCI boards can be inserted in all PCI slots but their PCI buffers are in 5V, for verify the board compatibility you can put the the board in the M5484LITE slot because the ATX power put himself in security if the PCI board has his buffers in 5V (I/O pins).
Add an Ethernet Realtek RTL 8139 PCI board with the Radeon board, and make some tests without success under MiNT (rtl8139 driver).



The PCI riser

2008 September. Fix an Ethernet bug inside the FEC driver of the MCF548X.
Add a grafical display of the FreeRTOS tasks inside the HTTP server.
If the URL isn't found inside the flash memory pages, the HTTP server search the file in c:\html\.
Add USB Mass Storage on the MCF548X USB device, this feature uses the 8 MB ram-disk. The Coldfire v4e USB is a little bit bugged, but I have tried with success on iMac, Mac-Mini and also a Visiosat TVT 250 USB.
The best news, Rodolphe works again on the CTPCI!

2008 October. Boot possible on the ram-disk from a disk updated with USB Mass Storage device, this is the procedure:

Renunciation of VNC server (motivation and free space in the flash memory).


Archive Version Size Computer
CT60 Configuration, TOS & Tools ct60_pci.lzh 1.04 alpha 2008 October 20 5.7 MB CT60 and M5484LITE

This archive contains the latest CT60 TOS (with/without PCI) and also a CPX and FLASH060 for the latest CT63 (new flash memory), sure it's an unfinished release, but there are some bugs fixed since the latest official release without PCI (the v1.03c).
There are also Eiffel and JpegSnap.
If you want test on the CT60 the fVDI TOS driver without PCI board (like me), there are just two valid videls graphic modes in 65K colors: 640 x 480 (50 MHz videl clock) and 320 x 240 (25 MHz videl clock), just load pci.hex after the ct60tos.bin. The are a question for start the test or not.

This update contains also a disassembler (key 'd') and a memory dump (key 'm') where it's possible to use it when crash arrives. A little tool for debugging...