CROSS LIB - A universal 8-bit library and some games built with it
CROSS LIB - A universal 8-bit library and some games built with it
Cross-Lib and games built with it (e.g., Chase, Shoot, Bomber, Snake, Horde, Verbix, Shuriken, Stinger, Trex)
by Fabrizio Caruso ([email protected])
Cross-Lib is a WORA (Write Once Run Anywhere) framework for vintage systems, i.e., you code your game in C once and Cross-Lib builds the very same game for about 200 vintage systems (console, computers, etc.) with the very same code.
Read the Disclaimer.
Cross-Lib-HD is an equivalent backward-compatible framework, still work-in-progress:
http://github.com/Fabrizio-Caruso/CROSS-LIB-HD
Its goal is to provide a higher number of redefinable tiles, while maintaining the same API's and possibly the same number of supported targets as Cross-Lib.
Cross-Lib-HD is not meant to replace Cross-Lib because the latter can provide slightly smaller binaries, a higher number of colors and a higher number of targets with real graphics. A game with the need for a higher number of tiles may require Cross-Lib-HD, whereas games with a lower number of tiles will work on both but on Cross-Lib may get a better color pallette and/or graphics on some very limited targets.
Article [in English], first published in C.A.L.L. Apple Volume 3 Number 1 (January 2023): C.A.L.L.-Apple
Article [in French], first published in the French magazine "Programmez! Hors série #6": Programmez!
Click on the links below to play the games on your browser.
Cross-Lib can be used to build games for more than 200 different vintage systems (computers, consoles, arcade boards, pocket calculators, etc.). An almost complete list of the supported systems with their status is in: Supported Systems
Some supported vintage CPU architectures are:
GBZ80Intel 8080/85Intel 8086MOS 6502 Motorola 6803 Motorola 6809RCA 1802TMS 9900Zilog 80Cross-Lib has also some support for vintage 16-bit and 32-bit systems and the native host PC.
For a more complete list of architectures you can look at: Architectures
Cross-Lib runs under any POSIX-like environment such as
Cross-Lib requires a POSIX environment with at least
If you want to produce interactive binaries for the native terminal you need a native compiler (gcc or any other compiler such as clang) with ncurses or ncursesw.
In order to build binaries for a supported vintage system, the corresponding cross-compiler has to be installed (see the list of supported targets to see which compiler is required).
The current set of supported cross-compilers is:
CC65,Z88DK (SCCZ80 and ZSDCC),CMOC,LCC1802,TMS9900-GCCACK, VBCC,CC6303Partially supported cross-compilers:
GCC-Z8K,XTC68GCC-ATARI-ST,GCC-AMIGA,For more details click on Compilers
Very few targets use special tools to generate tape/disk/cartridge images. Some of these tools are built from source on the fly the first time they are required. Most require gcc or g++.
In order to generate disk images for the Apple][ and derivative targets Cross-Lib uses ac.jar for which java is necessary.
To generate tape images for the CoCo 1/2 and Dragon 32/64 targets Cross-Lib uses bin2cas.pl for which perl is required.
An actual installation is not necessary because Cross-Lib is made of scripts and a C source library, which is compiled on the fly when building binaries for target systems.
Moreover even installing the required compilers may not be necessary because Cross-Lib can be used through GitHub Codespaces (with preinstalled compilers) on any browser.
Additionally you can also use it with
For the details click on Installation
xl SCRIPTInside the project main directory, you find the src and the build directories:
src contains the source code and all other files that are necessary to build the games and the examples;build is supposed to be empty at first and it is the target directory for the build process.First of all you need to be in the src directory.
From src you can use the xl script to do different operations on projects.
xl is used as follows:
xl You can get help with:
xl help You can build games and examples with :
xl
For example xl snake vic20 builds the snake for the Commodore Vic 20 +16K and xl stinger builds stinger for the native terminal.
For more details click on XL script
Cross-Lib provides a full tool-chain to build universal vintage 8-bit games.
Cross-Lib provides:
xl.When a game is built for a specific target, the Cross-Lib tool-chain will automatically:
The user has to:
xl script (see below).For more details click on Build
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/HARDWARE_AGNOSTIC_CODE.md
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/CROSS_LIB_APIS.md
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/HOW_TO_LOAD.md
Cross-Lib would not exist without the cross-compilers and the support of their developers and the support of some people who have helped me handle the input/output of some targets.
A partial list of the people who have helped in found in Credits
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for non-commercial applications, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
For example I do not authorize selling hardware, software, firmware or any other product that contains any part of Cross-Lib and/or its games (e.g., pre-loaded disks, tapes, cartridges, etc.). On the other hand I authorize people to load the games in the most convenient way for their personal use.
No open issues yet, or sync has not completed.