Cross-Lib: a universal framework to code for 200 8-bit vintage systems

I am the author of Cross-Lib (GitHub - Fabrizio-Caruso/CROSS-LIB: CROSS LIB - A universal 8-bit library and some games built with it), which 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, 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.
The game binaries for about 200 different targets are in:

1 Like

Very interesting indeed - must be a lot of work there. Very pleased to see the BBC Micro supported!

@EdS BBC Micro support is only initial, i.e., I manage to compile my games for it but graphics is currently (only) characters. BBC Micro is harder because I need to do everything from scratch as there is no direct support on any MOS 6502 compiler.

1 Like

Ah yes, compiling for 6502 has long been bit of a weak spot. But check this recent comment:
“the existing landscape of 6502 compilers (llvm-mos, gcc-6502, vbcc, cc65)”
which hints that we might have as many as 5 to choose from these days.

Oh, but maybe it’s not the compiler you’re concerned about - is it specific support for the Beeb? There’s a library which might be of interest:
https://stardot.org.uk/forums/viewtopic.php?f=53&t=12565

@EdS it is no longer a matter of just compiler-support. For the BBC Micro and Master, I use VBCC which “supports” them somehow.
The problem is time. If I have to implement everything from scratch, it takes longer. I do this when there is no library support. BBC has no significant library support on any dev-kit. So if I want to implement graphics (which in Cross-Lib means programmable tiles), I need to implement it myself. Same for input and sound. I can do it, but it takes time.
I am doing this for 200 targets.

Ah, yes, that makes sense. I wonder if the nice people over on Stardot might include one or two who could contribute, or help in some way.

It’s probably a simpler thing than your library, but the AGD ports for Atom and Beeb might give a hint as to what’s possible and how much ingenuity might be available:
Some more progress updates on Beeb AGD

1 Like

Thanks. I will take a look at it. People at Stardot have given me some hints.
So I have some information. It is a matter of plugging in the good rom routines (or create new ones) in order to have real graphics, working real-time input and some simple sounds.

The problem is time. I am on 200 fronts at the same time. If I only spent 2 days per target, it would take me on average more than 1 year if I could work on it every single day.

1 Like

200 is a very impressive number - I salute you!

1 Like