Cyclone and Libcyc library installation 20/09/99 Zip's enclosed files \cyclone Cyclone.exe Dos/Win95 file server and link program v2.0 config.cfg Cyclone's configuration file libcyc.a playstation library of file access and serial link functions v2.0 libcyc.a.lib *Fixed* (working) CodeWarrior equivalent of the above libcyc.h header for library auto1 example siocons and Cyclone execution batch files auto1.bat auto2 auto2.bat cyclone.txt overview of Cyclone config.txt explanation of the values used in the config file libcyc.txt library function descriptions linking.txt explanation of packet transfer function usage. readme.txt c'est moi! \cyclone\filedemo file server demonstration program \cyclone\linkdemo link demonstration program \cyclone\tankdemo demo version of Peter Dollochan's tank game \cyclone\libsrce libcyc library source code Cyclone is a PC program that provides file server and link-up possibilities to yaroze applications. The enclosed library, libcyc.a, allows you to make use of it's functionality in your own applications. This will allow your applications to load and save data files from/to the PC, and to link two playstations together, either via a PC modem connection or directly using a link cable. The Updated Libps.a library. The libcyc.a library makes use of the libps.a ioctl() function to setup and control the playstation serial port. This function was not included with the original version of libps.a included with the yaroze dev kit, so you'll need to get the updated version of the library before you can make use of the libcyc library functions, otherwise compiler errors relating to ioctl() will result. The update can be found at http://www.netyaroze-europe.com/yaroze/ftp/tools/dev/libps.zip. Installing the library and header. For GCC compilers, put libcyc.a and libcyc.h in the appropriate playstation Lib and Include directories, alongside libps.a and libps.h. CodeWarriors will need to do the same except you'll need the libcyc.a.lib library in your Lib directory instead, beside libps.a.lib. Note: In CodeWarrior applications, you must initialize the heap before using any of the cyclone library functions. There is an explanation of how to do this in the _psstart.c file included with all projects. To include the library in a GCC build, add '-lcyc' to the end of your GCC command line. eg gcc -o main main.c becomes gcc -o main main.c -lcyc or within your make file, something like: $(CC) $(LINKER) -o $@ $? becomes $(CC) $(LINKER) -o $@ $? -lcyc Then, from within your own playstation application, #include libcyc.h, and the library's functions will become available to you. libcyc.txt contains descriptions of how to use each function. Playstation/Cyclone execution. Siocons is used to download the playstation executable and any initial data files, when this has been completed, Cyclone is executed. The enclosed auto1/2 files show two ways of automatically executing Cyclone after the downloading has been completed. First method auto1: // siocons batch file local dload data.dat 80140000 // download initial data file(s) local load main // download the psx executable local dos Cyclone C:\psx\bin\config.cfg // run Cyclone, send GO local quit // terminates siocons auto1.bat: // PC batch file siocons auto1 // run siocons, then Cyclone Second method auto2: // siocons batch file local dload data.dat 80140000 // download initial data file(s) local load main // download the psx executable local quit // terminate siocons normally auto2.bat: // PC batch file siocons auto2 // siocons processes above file if not errorlevel 1 Cyclone C:\psx\bin\config.cfg // run Cyclone, send GO. In the first method, the 'local dos' command is used to execute Cyclone from within the siocons auto file. In the second method, if siocons exits normally Cyclone will be executed. I'd recommend using the second method because for reasons unknown at present, Cyclone crashes the PC if 'local dos Cyclone' is called without a previous call to 'local load main'. For Cyclone to be found and executed, it needs to be either in the current directory or along the PATH. Placing Cyclone in the same directory as siocons is ideal. Cyclone sends the GO command to the playstation and then enters it's command mode and accepts and processes commands from the playstation. The path and file name of Cyclone's config file can be given on the command line, if the config file is not found in the current directory, the command line one is used. What's new in Cyclone v2.0 All code re-written. The packet transfer code has been added, allowing for psx-to-psx and modem-to-modem connections between playstations Supports COM ports 1 - 4, and different IRQ's, see config file and config.txt. The config file's location can be specified on the command line. Cyclone cannot run without its config file. Checks are no longer made to make sure Cyclone gained control of the serial ports, both ports are not required for Cyclone to operate as a file server or to run test packet transfers. What's new in Libcyc v2.0 *13/9/99* CodeWarrior version of library now works! All code re-written. Packet transfer functions added, see libcyc.txt and linking.txt. Block transfer functions added, see libcyc.txt. cyc_printf() has been added, works in the same way as the standard playstation printf(). cyc_ping() added, allows the application to test it's connection type. chain_callback() added. The library needs to make use of the VSyncCallback() function, but if the application has a callback function of it's own, it can be chained to the library's function using chain_callback(). cyc_findfirst() and cyc_findnext() added, allows the application to obtain information on the files in the PC directory, such as file name, size, attributes and modification time/date. For more information on Cyclone an the libcyc library check out the following text files: cyclone.txt Gives a brief overview of Cyclone. config.txt Explains the values contained in Cyclones config file, cyclone.cfg. libcyc.txt Contains a description of all the playstation functions within the libcyc library. linking.txt Explains how the link-up and packet transfer functions can be used within yaroze applications. Bugs and things File and packet transfers are very stable in Win95, but multi-tasking should be avoided as this can disrupt the data flow between PC and playstation, particulary packet transfers. The amount of modem tests I've been able to carry out has been very limited, plus I only have USR/3Com modems so Cyclone may not work correctly with all makes of modem. When connecting playstations, make sure they are both running in the same video mode, either both PAL or NTSC. There's a problem when linking up the yaroze playstation to a gray playstation in NTSC video mode. The yaroze sends data slightly more often than the other playstation, I've not found a reason why, and link-ups between gray playstations don't exhibit the same problem. Acknowledgements Thanks to Peter Dollochan for all he's done in getting the packet transfer code off the ground, by taking time to write a link-able game, for the modem-to-modem transfer testing, and also for putting up with all the buggy versions of Cyclone/libcyc I sent him. That's about it, please send any feedback to:- hanno@btinternet.com Pete.