Sargon Android

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

mephisto
Posts: 430
Joined: Mon Apr 03, 2006 10:10 am
Location: England

Sargon Android

Post by mephisto »

Bill Foster has done a great job producing his Sargon UCI for Windows. https://github.com/billforsternz/retro-sargon

Is there anyone here who could and would be prepared to convert Sargon to run on Android?
What's my next move? - to the fridge for another beer !!
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Sargon Android

Post by Ras »

mephisto wrote: Wed Mar 03, 2021 9:56 amIs there anyone here who could and would be prepared to convert Sargon to run on Android?
The Sargon version for PC works by converting the original Z80 assembly to x86 assembly, and that won't run on Android devices because they have an ARM CPU. Converting to ARM will also be a lot harder because the Z80 was an extension to the 8080, and the 8086 was somewhat close to the 8080 so that assembly source translation tools existed. ARM however is something entirely different.
Rasmus Althoff
https://www.ct800.net
mephisto
Posts: 430
Joined: Mon Apr 03, 2006 10:10 am
Location: England

Re: Sargon Android

Post by mephisto »

Ok many thanks
What's my next move? - to the fridge for another beer !!
User avatar
mclane
Posts: 18749
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: Sargon Android

Post by mclane »

But you can run sargon on the mobile phone in a dos Emulator. There you can even choose between 1,2,3,4 and 5.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon Android

Post by Bill Forster »

Ras wrote: Wed Mar 03, 2021 10:17 am
mephisto wrote: Wed Mar 03, 2021 9:56 amIs there anyone here who could and would be prepared to convert Sargon to run on Android?
The Sargon version for PC works by converting the original Z80 assembly to x86 assembly, and that won't run on Android devices because they have an ARM CPU. Converting to ARM will also be a lot harder because the Z80 was an extension to the 8080, and the 8086 was somewhat close to the 8080 so that assembly source translation tools existed. ARM however is something entirely different.
You are basically right, but just for the record, the source assembly translation tools didn't really exist - this held me up for 10 years until I decided that it was not so hard to just write the necessary tools myself. It only took a few days, a tiny part of the overall project. The biggest problem was that the Spracklens used TDL assembler not a real Z80 assembler which has caused problems for people ever since. I basically wrote new (TDL -> Z80 or x86) and (Z80 -> x86) translators specifically for the job.

I have been working with a guy who is getting Sargon 1978 running on his Z80 Microprofessor (from deep in his cupboard I presume:). He felt he could finally take on the project now a version of the program in standard Z80 mnemonics is available. It's still a challenge getting the program to run on a Z80 system other than the Jupiter system the program was originally written for. After this experience (which is ongoing) I am tempted to provide a simplified Z80 version, with all graphics etc stripped out and a basic console interface with an absolute minimum of system specific routines. It wouldn't use the clever location tricks that the Spracklens rely on with their assembler. For completeness it would come with a standard Z80 emulator program for running on modern computers, and it would be synced to my x86 version with a set of reference games for comparison.
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon Android

Post by Bill Forster »

mephisto wrote: Wed Mar 03, 2021 9:56 am Bill Foster [actually Forster] has done a great job producing his Sargon UCI for Windows. https://github.com/billforsternz/retro-sargon

Is there anyone here who could and would be prepared to convert Sargon to run on Android?
Thanks for your nice words. The Sargon 1978 project has a life of its own (see my other post). I might be tempted to convert the program to standard C as well and then it really could run on anything. It's quite a big job, but it would be a lot of fun (just like the project to date). The temptation would then be to start improving the program. The trouble is that if eventually getting a strong(ish - say 2500 rather than Sargon's current 1300) program this way would be way more work than simply starting from scratch and bring less kudos because naysayers would say - "It wasn't an original engine!".
User avatar
mclane
Posts: 18749
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: Sargon Android

Post by mclane »

The spracklens did their engine for fidelity and later for saitek.

Using 6502 in all kind of mhz and later 68000 and 68020 and even 68040 and other heavy motorola machinery.

Under saitek they began again on a sparc cpu and it had a rating of 2200 elo.

Then they stopped doing computerchess.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
Bill Forster
Posts: 76
Joined: Mon Sep 21, 2015 7:47 am
Location: New Zealand

Re: Sargon Android

Post by Bill Forster »

mclane wrote: Tue Mar 09, 2021 7:45 am The spracklens did their engine for fidelity and later for saitek.

Using 6502 in all kind of mhz and later 68000 and 68020 and even 68040 and other heavy motorola machinery.

Under saitek they began again on a sparc cpu and it had a rating of 2200 elo.

Then they stopped doing computerchess.
Good point I try to always say "Sargon 1978" instead of "Sargon" but sometimes I forget. It's a shame that their book has code for the weakest engine they ever produced. It would have been even more fun working on a program that could play strong chess.
User avatar
Scally
Posts: 232
Joined: Thu Sep 28, 2017 9:34 pm
Location: Bermondsey, London
Full name: Alan Cooper

Re: Sargon Android

Post by Scally »

Hi all,

We have Sargon I running in Lua as part of our “script_engines” suite of Picochess Chess Engines.

Image
(Click on the thumbnail for a larger image)

We have 4 levels of play from Plymax 1 to 4.


Cheers,

Al.
mephisto
Posts: 430
Joined: Mon Apr 03, 2006 10:10 am
Location: England

Re: Sargon Android

Post by mephisto »

Hi Bill

First I must apologize for the surname mistake. My surname is Whitby and I once got a letter saying Mr Shitby. Infact the sender wrote Mr Shitby three times in the letter. So I suppose just missing your 'R' out isn't that bad but I still apologize 😬

You must keep Sargon as original as possible. That is what makes it so original and enjoyable to play against. If you want to make it stronger then just convert Sargon II.

Again many thanks for a great addition to our UCI engine list.

Regards
Bryan with a 'Y' 😄
What's my next move? - to the fridge for another beer !!