Cross-Chase

Anything QL Software or Programming Related.
RWAP
RWAP Master
Posts: 2461
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Cross-Chase

Postby RWAP » Mon Apr 16, 2018 9:26 pm

I see that Fabrizio Caruso has released a game "Cross-Chase" for a wide range of 8 bit platforms - the source code appears on GitHub - https://github.com/Fabrizio-Caruso/CROSS-CHASE

Does anyone fancy seeing if this could be ported to the QL? It is written in C with user defined graphics for the characters.

I suppose the real issue here is that the z88DK does not implement a QL compiler (so far as I know) but perhaps it could be ported to c68. Fabrizio says that it should really just be a matter of running the code through an ANSI C compiler... (famous last words)


RWAP
RWAP Master
Posts: 2461
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Cross-Chase

Postby RWAP » Mon Apr 16, 2018 9:59 pm

Fabrizio has said that if the cross-compilers work, then, so long as it supports conio.h or QL supports some of the standad terminal codes (e.g., 52) then a simple graphics version is just a matter of recompilation.


Derek_Stewart
QL Wafer Drive
Posts: 1062
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Cross-Chase

Postby Derek_Stewart » Wed Apr 18, 2018 10:05 am

RWAP wrote:Fabrizio has said that if the cross-compilers work, then, so long as it supports conio.h or QL supports some of the standad terminal codes (e.g., 52) then a simple graphics version is just a matter of recompilation.


HI RIch,

The game looks OK, but if it relies on "conio.h", I think there is a problem, as this is MSDOS library file, and is not ANSI C library file Wikipedia says:

conio.h - Wikipedia wrote:conio.h is a C header file used mostly by MS-DOS compilers to provide console input/output. It is not part of the C standard library or ISO C, nor is it defined by POSIX. This header declares several useful library functions for performing "console input and output" from a program.


The question is can conio.h be implemented on C68, maybe using the discussion:

https://opensourceforu.com/2014/03/writ ... -gnulinux/

I am not sure how to compile a library file, so back to the C68 manual.


Regards,

Derek
Fabrizio
ROM Dongle
Posts: 12
Joined: Thu Apr 19, 2018 11:09 am

Re: Cross-Chase

Postby Fabrizio » Thu Apr 19, 2018 1:00 pm

Hi everyone!

My game does not rely on anything for graphics, sound and input (keyboard/joystick).

The game code is hardware-agnostic. It depends on CROSS LIB (my abstraction layer) where I implement the graphics, sound and input.

For graphics I have many "plug-ins" and I can implement one more for the QL as long as whatever toolkit is available provides something to display on the screen and it is close to ANSI compliant.

For example I have a graphic plug-ins for old terminals (e.g., adm3a, VT52, VT100,etc.), for memory mapped text mode graphics (e.g., most 6502 targets like Commodore, Atari, Oric, etc.),
I have a plugin that replies on conio, a plugin that relies on TGI lib in CC65, a plugin that relies on sprite lib for most Z80 targets, etc....

conio.h is just one case and my abstraction layer can be used without any conio support.

Fabrizio


Fabrizio
ROM Dongle
Posts: 12
Joined: Thu Apr 19, 2018 11:09 am

Re: Cross-Chase

Postby Fabrizio » Sun Jun 10, 2018 11:31 pm

Hi everyone,

I would like to try qdos-gcc but so far I have not been able to get it to compile a simple hello world file.
Ideally I would like to run it under Cygwin.

To just see if it is capable of compiling my game, I have tried the dockerized version but with not much luck.
I have managed to install it through docker with the pull command but the compiler cannot be executed successfully:
$ docker run xora/qdos-gcc qdos-gcc ./hello.c
qdos-gcc: ./hello.c: No such file or directory
qdos-gcc: No input files

the hello.c is there and I can also place it elsewhere but I get the same error message.
qdos-gcc --version does produce the expected result:
$ docker run xora/qdos-gcc qdos-gcc --version
2.95.3

What am I doing wrong?


Fabrizio
ROM Dongle
Posts: 12
Joined: Thu Apr 19, 2018 11:09 am

Re: Cross-Chase

Postby Fabrizio » Fri Jul 13, 2018 12:20 pm

Hi

I would like to compile my game for the Sinclair QL with QDOS-GCC but I have not understood how to run the compiler inside the docker.

Who could help me on this?

Let us say I have put a trivial "Hello World" hello.c file into /c/Retro/hello.c, then I get:

$ docker run xora/qdos-gcc qdos-gcc -v /c/Retro/hello.c
qdos-gcc: /c/Retro/hello.c: No such file or directory
Reading specs from /usr/local/lib/gcc-lib/qdos/2.95.3/specs
gcc version 2.95.3 20010315 (release)

I have also tried:
$ docker run -v /c/Retro/hello.c -w /build -u $USER xora/qdos-gcc qdos-gcc -o hello hello.c
Unable to find image 'qdos-gcc:latest' locally
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: pull access denied for qdos-gcc, repository does not exist or may require 'docker login'.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

Brizio@DESKTOP-I20P8HM MINGW64 /c/Program Files/Docker Toolbox
$ docker run -v /c/Retro/hello.c -w /build xora/qdos-gcc qdos-gcc -o hello hello.c
qdos-gcc: hello.c: No such file or directory
qdos-gcc: No input files


Could someone please tell which command I should use to compile hello.c placed at /c/Retro/hello.c ?

Fabrizio


RWAP
RWAP Master
Posts: 2461
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Cross-Chase

Postby RWAP » Fri Jul 13, 2018 8:20 pm

I have no experience of docker and alas I have never used gcc on the QL.

I guess the problem is down to the fact that a QL has no understanding of directories nor does it support / as a directory divider.

When you say you have created a file /c/Retro/hello.c - where is this on the QL?

How is /usr/local/lib/gcc-lib/qdos/2.95.3/specs stored on the QL ?

I assume if you enter:

DIR flp1_

You will find a file called
usr_local_lib_gcc-lib_qdos_2.95.3_specs

Maybe the easiest thing is to upload the folder or qxl.win file you are attaching to the emulator so that we can try to understand what is happening - unfortunately, the people who did a lot of work porting C and GCC to the QL manay many years ago are no longer active in the QL World (or even still around?)


User avatar
XorA
Super Gold Card
Posts: 510
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Cross-Chase

Postby XorA » Fri Jul 13, 2018 8:29 pm

RWAP wrote:I have no experience of docker and alas I have never used gcc on the QL.

I guess the problem is down to the fact that a QL has no understanding of directories nor does it support / as a directory divider.

When you say you have created a file /c/Retro/hello.c - where is this on the QL?

How is /usr/local/lib/gcc-lib/qdos/2.95.3/specs stored on the QL ?

I assume if you enter:

DIR flp1_

You will find a file called
usr_local_lib_gcc-lib_qdos_2.95.3_specs

Maybe the easiest thing is to upload the folder or qxl.win file you are attaching to the emulator so that we can try to understand what is happening - unfortunately, the people who did a lot of work porting C and GCC to the QL manay many years ago are no longer active in the QL World (or even still around?)


Its not on a QL, he is trying to use docker on windows which is totally unknown to me, and probably everyone here.


Derek_Stewart
QL Wafer Drive
Posts: 1062
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Cross-Chase

Postby Derek_Stewart » Fri Jul 13, 2018 9:43 pm

Hi,

Would compiling the game with C68 in QL environment be more effective than using QDOS-GCC.

I did look at trying to port the game to the QL using C68. But got stuck with the screen driver code.

I will revisit thd game code and see if I can get the game ported.


Regards,

Derek
Fabrizio
ROM Dongle
Posts: 12
Joined: Thu Apr 19, 2018 11:09 am

Re: Cross-Chase

Postby Fabrizio » Fri Jul 13, 2018 11:36 pm

I am using docker because I though it was the simplest way to get to compile my game. I am open to other possibilities.

I am not "porting my game" to the QL. I just want to compile it "as it is" for the QL and add the necessary bits to my universal tool-chain:
https://github.com/Fabrizio-Caruso/CROSS-CHASE

The idea of my project is that you can use my tool-chain to just recompile a game WITHOUT any porting other than re-compilation
as long as you use the tool-chain library that provides the required abstraction layer.

I can compile my game for more than 120 different 8 bit systems including nearly all computers, consoles, handhelds and pocket calculators.
I have now added the 32 bit PC and I would like to add 16 bit computers.



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 2 guests