I am trying to have a go at getting Marcello Zaniboni's AI Tic Tac Toe https://www.marcellozaniboni.net/zxaittt/index.html working under the recently pimped-up SAM Coupé target but am getting screen corruption when running it, so I went back to the original ZX target and it seems to do the same, albeit in a slightly different way:
ZX: https://www.dropbox.com/s/ka7xfvx5l72qddo/ttt.png?dl=0
SAM: https://www.dropbox.com/s/1x8vzcu76dt7s ... 4.png?dl=0
It clearly used to compile and work under Z88DK (albeit in 2005) so is the code abusing something in Z88DK's printing routines - I can't see it doing anything paticulary naughty - or just plain broken?
Dan.
Tic Tac Woe
Re: Tic Tac Woe
Went and had a run and thought about this - I think it's this section:
It doesn't like the itoa() bit - If I replace it with a copy of the printAt(c, r, string) routine but for integers it's fine.
Onwards...
Dan.
Code: Select all
/* print an int at column c and row r */
void printIntAt(int c, int r, int value) {
#if defined SPECTRUM
signed char buffer[5];
itoa(buffer, value,0);
printAt(c, r, buffer);
#else
printf("\nFIX ME! (%d)\n", value);
#endif
}
Onwards...
Dan.
Re: Tic Tac Woe
That's due to a closer compliance to the POSIX C syntax, itoa() now works the way it should 

Re: Tic Tac Woe
Now working and building with appmake for ZX 
SAM Coupé version is nearly done, just need to test get a screen loading in manually (no support in appmake for this yet but request in) and then I'll pop it up on GitHub...

SAM Coupé version is nearly done, just need to test get a screen loading in manually (no support in appmake for this yet but request in) and then I'll pop it up on GitHub...
Re: Tic Tac Woe
Ack, the SAM one seems to force MODE 4 on startup which breaks loading the screen (which is MODE 3) and the text size, will raise a ticket.
Re: Tic Tac Woe
beautiful, Marcello (and Luciano) will love it!
Re: Tic Tac Woe
It's up!
Still need to make the build less clunky but that involves using other hacky tools (https://github.com/dandoore/mgtman) which can't do everything yet as I can't use appmake to build it yet (enhancement ticket is in
https://github.com/dandoore/danscstuff/tree/main/aittt
Still need to make the build less clunky but that involves using other hacky tools (https://github.com/dandoore/mgtman) which can't do everything yet as I can't use appmake to build it yet (enhancement ticket is in

https://github.com/dandoore/danscstuff/tree/main/aittt
Re: Tic Tac Woe
Hi
About mgtman
is it possible that you use the internal variable names for the header info?
then i would like to try to make a plusd version from there.
if possible.
cheers
About mgtman
is it possible that you use the internal variable names for the header info?
then i would like to try to make a plusd version from there.
if possible.
cheers