VOGONS


First post, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

Hi everyone,
I am the author of Cross-Lib (https://github.com/Fabrizio-Caruso/CROSS-LIB/).
Cross-Lib is a universal 8-bit framework to develop retro-games in C for about 200 different vintage consoles, computers and all sort of other devices (arcade boards, hacked toy computers, hand-helds, etc.). Cross-Lib is WORA, i.e., write once, (compile it) and run it anywhere. The *very same code* is capable of auto-adapting to all systems despite the hardware differences (colors, graphics, sounds, screen size, etc.). Cross-Lib supports simple graphics, roughly similar to that of a Sinclair ZX Spectrum or MSX 1 computer.

The way this is done, for the most part, is by providing an abstraction layer (a library with common APIs for all targets). Cross-Lib also uses scripts to handle graphics assets and automatically convert them for any system. Cross-Lib also include some scripts to produce template game code to speed up the initial development of a game.

So far I have written 5 games with it.

For example:
Cross Horde: https://github.com/Fabrizio-Caruso/CROSS-LIB/ … s/tag/XHorde1.0
Cross Snake: https://github.com/Fabrizio-Caruso/CROSS-LIB/ … s/tag/XSnake2.0

Other binaries are in:
https://github.com/Fabrizio-Caruso/CROSS-LIB/releases

Reply 1 of 14, by gerry

User metadata
Rank Oldbie
Rank
Oldbie

a quick read suggests a sort-of write once compile anywhere approach

anyway its interesting and I hope some others are using it too

one of the barriers to people using new dev tools, along with simply not knowing about it, is the lack of documentation and tutorials, especially these days people like to see 'my first game in library xyz' youtube tutorials and so on - it can make it difficult for authors to get noticed and gain users unless they do these things

i hope in any case there is success for you with it

Reply 2 of 14, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

Interesting... I have one idea in mind that I might in the distant future use it for, making a kind of menu system to a local BBS type networking setup.. all your vintage systems can connect to it, get same/familiar interface.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 3 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@gerry You do not *compile anywhere*. You compile it only on the modern PC under a POSIX environment (Windows/Cygwin, Linux, etc.).
So you can build the 200 versions of the universal game with one single command on one single PC and parallel compilation is supported to speed things up.

I have worked on both the documentation and on scripts to make some initial code generation.

API documentation: https://github.com/Fabrizio-Caruso/CROSS-LIB/ … OSS_LIB_APIS.md

I am still working on improving the way Cross-Lib can be used.

For example starting a new game project with some initial code is trivial:
./create_xl helloworld -> generates a helloworld example
./create_xl mygame game -> generates a template for a game
./create_xl mydemo demo -> generates a demo that uses most apis
./delete_xl <name> -> removes the project

P.S.:
Cross-Lib is "installed" by simply copying or cloning its repository (see link above) under any POSIX environment such as Cygwin/Windows or Linux on which "make", "python" and the desired cross-compilers are installed.

Last edited by Fabrizio Caruso on 2021-09-17, 07:23. Edited 1 time in total.

Reply 4 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@BitWrangler Cross-Lib is not meant to be used *by* the vintage systems, the binaries produced after compiling code written with Cross-Lib are.
It is meant to be used to produce binaries on a modern PC *for* the vintage systems. It is a set of tools made primarily by a C library that provides an abstraction layer for several different dev-kits and cross-compilers (and native compilers) to produce binaries on the PC for about 200 different vintage targets (and the modern PC terminal console).

Reply 5 of 14, by gerry

User metadata
Rank Oldbie
Rank
Oldbie

compile once (in parallel) and run on the chosen targets then 😀 even better

i like that you have demo games linked to browser emulators so people can see

it's a very good achievement!

i can imagine some wanting a step by step guide "from nothing installed to running my first game" for that a-z overview

Reply 6 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@gerry, I am working on it but it boils down to just copying or cloning my repository anywhere on your computer and following the instructions described on the README.md (github main page). The non-"installation" procedure is different depending on the environment chosen and there are several things that may be different but they are all trivial.

There is no much to install:
- Posix system (any Unix-like enviroment such as Linux, Windows+Cygwin, etc.)
- you need "make" and "python"
- you need to install some cross-compilers (depending on the architectures you want to support) and optionally a native C compiler
- you just copy the content of my repo somewhere

If you have installed a native compiler such as gcc (and ncurses), you can start with
make ncurses -f Makefile.snake -> Cross Snake for the PC terminal console

If you have installed CC65, you can try for example
make vic20 -f Makefile.horde -> Cross Horde for the Commodore VIC 20 (+8k)

If you have installed Z88DK, you can try for example:
make msx -f Makefile.snake -> Cross Snake for the MSX 1

A concrete example could be Ubuntu 20.04:

sudo apt-get update -y
sudo apt install make
sudo apt-install python

sudo apt-install cc65 (to install a recent enough version of CC65. Under previous Ubuntu such as 18.04 you need to download CC65 from their site)

git clone https://github.com/Fabrizio-Caruso/CROSS-LIB.git

sudo apt-install vice (to install an emulator)

make pet -f Makefile.snake (to compile a Commodore Pet version of Cross Snake)
make c16 -f Makefile.bomber (to compile a C16/116/+4 versino of Cross Bomber)

Reply 7 of 14, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++
Fabrizio Caruso wrote on 2021-09-17, 07:21:

@BitWrangler Cross-Lib is not meant to be used *by* the vintage systems, the binaries produced after compiling code written with Cross-Lib are.
It is meant to be used to produce binaries on a modern PC *for* the vintage systems. It is a set of tools made primarily by a C library that provides an abstraction layer for several different dev-kits and cross-compilers (and native compilers) to produce binaries on the PC for about 200 different vintage targets (and the modern PC terminal console).

Yes I understood that, I meant to use it to write a common front end to put on the vintage systems.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 8 of 14, by zyzzle

User metadata
Rank Member
Rank
Member

This project looks fascinating. An "abstraction layer" which makes code compatible with all 8-bit systems?! Wow.

Why do you not post binaries of the free sample games, compiled for the 200 systems? This would make things incredibly more useful. I'm on a DOS system, and getting a compilation toolchain is difficult to impossible.

In particular, I'm looking to try to create Colecovision binaries which will run on emulators in a DOS environment (ColEm emulator, for DOS).

Reply 9 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@zyzzle, The 5 games are more than samples. They are complete multi-level games. Most of them have several secrets and items to discover.
All my games and the whole project is open source and free (for non-commercial use).
Hundreds of binaries are available at the GitHub project site under the release section:
https://github.com/Fabrizio-Caruso/CROSS-LIB/releases
I cannot post 1000 binaries.

Some examples:
Cross Snake for the Amstrad CPC
https://github.com/Fabrizio-Caruso/CROSS-LIB/ … e_cpc_mode0.dsk

Cross Horde for the Commodore Vic 20 +8k
https://github.com/Fabrizio-Caruso/CROSS-LIB/ … ic20_exp_8k.prg

Cross Bomber for the Atari 8-bit
https://github.com/Fabrizio-Caruso/CROSS-LIB/ … atari_color.xex

More binary versions of the games can be built for more targets.

Reply 10 of 14, by zyzzle

User metadata
Rank Member
Rank
Member

Thanks kindly for the reply, Mr Caruso. I confess that I did not see the "releases" section and all of its "assets" on Github. I had only seen the source code to the fabulous games. Of course I was being somewhat fecetious in suggesting you post 200 versions of all 5 games! But, now that I see a "releases" section, that question is moot.

Reply 11 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@zyzzle, I hope you like my games and, above all, the project! The project is more about the library and the tools than the games. They are by-products and proofs of the fact that the library is usable to produce enjoyable games despite the limitations of a universal framework that cannot exploit specific features of a particular system (even though it can somehow but to a very limited extent).

Reply 12 of 14, by zyzzle

User metadata
Rank Member
Rank
Member

Yes, the power from a usability standpoint of making code compatible through an abstraction layer is fascinating... Many thanks. I'm certainly going to explore it and am glad you made it.

Reply 14 of 14, by Fabrizio Caruso

User metadata
Rank Newbie
Rank
Newbie

@leileilol, maybe... You mean a Congo Bongo clone?
With the only exception of Cross Bomber (which is a clone of Air Attack/Blitz) my other games are mostly original concepts.
My main interest now is improving the library before writing more games.