cc65-Chess for Oric by [raxiss]
cc65-Chess for Oric by [raxiss]
Hello all! I'm very happy to present you our new release - cc65-Chess for Oric!
The game is compatible with Oric-1/Atmos/Pravetz-8D/Telestrat and comes in TAP format for easier usage.
The story: everything started from a message (comp.sys.apple2).
In 2014 Stefan Wessels created cc65-Chess for the C64. It was completely written in C using cc65.
The game and UI logic are separated from the actual board and UI rendering which allows easy porting across 8-bit platforms.
In January 2020 Oliver Schmidt ported cc65-Chess to the Apple II and this helped a lot to have in May 2020 the Oric port ready!
Oric related source code is freshly merged and can be found in the main github-repository. Compiled TAP file is available here.
Controls: arrows - move cursor, RETURN - pick/place, ESC or 'M' - menu, 'A' - show/hide attackers, 'D' - show/hide defenders.
Well, and because the port was really easy and fun, I decide to make a full finished game release! Enjoy it!
raxiss 2020/05
The game is compatible with Oric-1/Atmos/Pravetz-8D/Telestrat and comes in TAP format for easier usage.
The story: everything started from a message (comp.sys.apple2).
In 2014 Stefan Wessels created cc65-Chess for the C64. It was completely written in C using cc65.
The game and UI logic are separated from the actual board and UI rendering which allows easy porting across 8-bit platforms.
In January 2020 Oliver Schmidt ported cc65-Chess to the Apple II and this helped a lot to have in May 2020 the Oric port ready!
Oric related source code is freshly merged and can be found in the main github-repository. Compiled TAP file is available here.
Controls: arrows - move cursor, RETURN - pick/place, ESC or 'M' - menu, 'A' - show/hide attackers, 'D' - show/hide defenders.
Well, and because the port was really easy and fun, I decide to make a full finished game release! Enjoy it!
raxiss 2020/05
- Attachments
-
- cc65-Chess-raxiss-1.00.tap.zip
- (20.71 KiB) Downloaded 331 times
Re: cc65-Chess for Oric by [raxiss]
Question: Does the game uses a lot of memory for the AI? I was wondering if that would help to auto-detect the presence of a disk controller to use the upper 16k of ram for additional search tree capabilities?
EDIT: I made it my Oric software Tweet of the day https://twitter.com/DefenceForceOrg/sta ... 8682178560
EDIT: I made it my Oric software Tweet of the day https://twitter.com/DefenceForceOrg/sta ... 8682178560
Re: cc65-Chess for Oric by [raxiss]
The intro is great !! It says that the pulp fiction music comes from a midi file .. I long to see how you managed to play a midi file on an Oric.
The level at chess is poor as it could be exepcted from a 8 bits machine but the rules of the games seem to be properly implemented (as far as i could see).
At first I foundd that the keyboard handling was making the games allmost unplayable . But in fact I had not understand that when we select a piece with space, it considers that we are trying to move the piece at the same place (so it writes in red) and then we can select the destination for this piece.
Here's where I am at the moment in my first game at level very hard: I think I'm gonna mate it soon .. it made two terrible mistakes and now I think it can no longer defend the position.
niark niark
Thank you for this game !! and congratulation for the port .. I long to have a look at the source code
The level at chess is poor as it could be exepcted from a 8 bits machine but the rules of the games seem to be properly implemented (as far as i could see).
At first I foundd that the keyboard handling was making the games allmost unplayable . But in fact I had not understand that when we select a piece with space, it considers that we are trying to move the piece at the same place (so it writes in red) and then we can select the destination for this piece.
Here's where I am at the moment in my first game at level very hard: I think I'm gonna mate it soon .. it made two terrible mistakes and now I think it can no longer defend the position.
niark niark
Thank you for this game !! and congratulation for the port .. I long to have a look at the source code
Re: cc65-Chess for Oric by [raxiss]
Here's a soluce on how to beat it in 17 moves at level very hard on its Alekine's defense.
My 8th move is a very bad move .. but well .. it didn't punish me for that.
By the way, it seems not to be possible to start a new game once the previous on is over. I pressed Esc to go back to the menu but i failed to start a new game .. the board does not reset to its original position.
My 8th move is a very bad move .. but well .. it didn't punish me for that.
Code: Select all
1- E2-E4 G8-F6
2- E4-E5 F6-D5
3- D2-D4 E7-E6
4- C2-C4 C7-C6
5- C4*D5 C6*D5
6- F1-D3 H7-H6
7- D1-H5 H8-G8
8- D3-H7 G7-G6
9- H5-G4 G8-G7
10- C1*H6 A7-A5
11- H6*G7 G6-G5
12- G7-F6 D8-B6
13- H7-G8 A8-A6
14- G8*F7+ E8*F7
15- G4-H5+ F7-G8
16- H5-G6+ F8-G7
17- G6*G7 check mate
- ibisum
- Wing Commander
- Posts: 1652
- Joined: Fri Apr 03, 2009 8:56 am
- Location: Vienna, Austria
- Contact:
Re: cc65-Chess for Oric by [raxiss]
This is great, and I just want to acknowledge the 'edge' that this release has as a result of the care to graphical styling .. it could have been a bit of a boring chess game with just plain chars, but the styling of the board pieces and the font make all the difference to the 'feel', which I think is neat.
- coco.oric
- Squad Leader
- Posts: 720
- Joined: Tue Aug 11, 2009 9:50 am
- Location: North of France
- Contact:
Re: cc65-Chess for Oric by [raxiss]
Hello,
Thanks for this new game. Rax & Iss duo is the new best Oric Game Producers
I tried it (without sound) and it's a pleasure, even if my chess level seems to be lower than jb's one.
Thanks for this new game. Rax & Iss duo is the new best Oric Game Producers
I tried it (without sound) and it's a pleasure, even if my chess level seems to be lower than jb's one.
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
Historic owner of Oric, Apple II, Atari ST, Amiga
Re: cc65-Chess for Oric by [raxiss]
Yeah, very nice! I am very happy to see new good developments on the Oric.
Congratulations raxiss!!
Congratulations raxiss!!
Re: cc65-Chess for Oric by [raxiss]
I casted an interested glance at the source code of AI and I can see two different method to use an extra memory as a way to enhance the chess skill of the program:
The South Face: Add an opening book
The idea would be to store a tree of usual and popular first moves sequence?
There are plenty of such opening book on the internet in text format.
With such an opening book, the game could play a perfect chess in the opening part which is the most critical part and the part where the brute force computation can not replace experience acquired by human players across centuries of practice.
16k is enough to stored a valuable opening book if it is properly compressed.
The North Face: Make the thinking deeper
I don't know if the extra 16k can be used as stack, but ifis it the case then it could possible to make the AI think deeper.
The call to the thinking function is here:
https://github.com/StewBC/cc65-Chess/bl ... cpu.c#L596
The AI recursion occurs here:
https://github.com/StewBC/cc65-Chess/bl ... cpu.c#L541
The thinking recursion is configured through three different values:
- gMaxLevel: looking like the maximum depth of analysis
- gWidth: looking like the number of analysed possibilities at each depth
- gDeepThoughts:must be 1
https://github.com/StewBC/cc65-Chess/bl ... bals.c#L46
If we could change the 3 last value of this array from "16,3,1" into a combination where the 3 (gMaxLevel) is replaced by a higher value, it would clearly enhance the chess skill of the engine.. but it would lead to:
- a far longer thinking . so the 16 (gWidth) would have to be lowered
- a greedy consumption of ram . Not only for the stack, but also for the undo list which is declared here:
https://github.com/StewBC/cc65-Chess/bl ... undo.c#L40
Not sure the
Code: Select all
#define UNDO_STACK_SIZE 255
Re: cc65-Chess for Oric by [raxiss]
All things considered, that's stupid ...jbperin wrote: ↑Sat May 16, 2020 12:21 pm
I don't know if the extra 16k can be used as stack, but ifis it the case then it could possible to make the AI think deeper.
it would lead to:
- a far longer thinking . so the 16 (gWidth) would have to be lowered
- a greedy consumption of ram . Not only for the stack, but also for the undo list which is declared here:
https://github.com/StewBC/cc65-Chess/bl ... undo.c#L40
I don't think the memory is a real limitation in increasing the depth of thinking. The computation time will for sure become more limitating.
However, the cpu time could possibly be reduced by using precalculated index in the process of possible moves generation which starts here:
https://github.com/StewBC/cc65-Chess/bl ... ard.c#L135
In most function called in the move generator, the chess_board is accessed trough a two-dimension indexing :
Code: Select all
gChessBoard[y][x]
Code: Select all
gpChessBoard[position]
Code: Select all
#define MK_POS(y,x) ((y)*8+x)
we could replace part of code like this one:
Code: Select all
do {
x += dx;
y += dy;
--n;
if(x > 7 || y > 7)
break;
piece = gChessBoard[y][x];
if(NONE == piece || addDefenceMove || my_color != (piece & PIECE_WHITE))
gPossibleMoves[gNumMoves++] = ((y)*8+x);
// any non-emty tiles ends the scan
if(NONE != piece)
break;
} while(n);
Code: Select all
do {
piece = gpChessBoard[position];
if(NONE == piece || addDefenceMove || my_color != (piece & PIECE_WHITE))
gPossibleMoves[gNumMoves++] = position;
// any non-emty tiles ends the scan
if(NONE != piece)
break;
} while (position = next_fdiagonal_tile [position]) != NO_MORE_TILE);
next_fdiagonal1_tile , next_sdiagonal1_tile
next_fdiagonal2_tile , next_sdiagonal2_tile
next_vertical1_tile , next_vertical2_tile
and so on ..
Then we could transfert some cpu time load to memory load. That would allow to play with depth of thinking without exploding the computation duration.
So that we could have an Oric version of the chess game that kicks the ass of the Apple II version
Re: cc65-Chess for Oric by [raxiss]
Thanks to all for the nice words!
This definitely will keep the tempo of new release high (... if you only "can smell what the raxiss is cooking" ).
And the result is exactly 18319 ($478F) bytes for the engine. And having even more 16K can help for improving the AI, I think.
And having Apple][ badly beaten - that's what I want to see .
Here is how I won in 7 moves on 'Very Easy' level but this are all my chess skills too:
Else about the porting - it was really easy with the well structured code and the Apple][ implementation as template.
The intro was more challenging I put lot effort there to solve many small details as:
- use Arkos Tracker 2 AKY music player by Julien Névo a.k.a. Targhan/Arkos converted to 6502/Oric by Arnaud Cocquière a.K.a GROUiK/FRENCH TOUCH a.K.a Scalex, There was real bug in code but this 'music story' deserves whole new topic;
- be compatible with Oric-1 and Atmos/Pravetz-8D - no ROM functions are used;
- implement nice HIRES switching without ugly bars/lines on screen;
- implement 'Loading...' progressbar like animation 'ala Twilighte's magic trick';
- make the scrolling Text/Bitmap script controlled and frame synchronized;
- rax painted 3 chess-boards, 3 chess-pieces sets and 10 different dividers to select from;
- ... and lot lot more including fun!
This definitely will keep the tempo of new release high (... if you only "can smell what the raxiss is cooking" ).
All platform dependent functions are defined in plat.h. I've created a 'fake' platform with all these functions as empty:
Code: Select all
void plat_Init(void){}
void plat_UpdateScreen(void){}
char plat_Menu(char **menuItems, char height, char *scroller){}
void plat_DrawBoard(char clearLog){}
void plat_DrawSquare(char position){}
void plat_ShowSideToGoLabel(char side){}
void plat_Highlight(char position, char color, char cursor){}
void plat_ShowMessage(char *str, char color){}
void plat_ClearMessage(void){}
void plat_AddToLogWin(void){}
void plat_AddToLogWinTop(void){}
int plat_ReadKeys(char blocking){}
void plat_Shutdown(void){}
Congrats for the great source code analysis! It looks really promising!
And having Apple][ badly beaten - that's what I want to see .
Here is how I won in 7 moves on 'Very Easy' level but this are all my chess skills too:
Else about the porting - it was really easy with the well structured code and the Apple][ implementation as template.
The intro was more challenging I put lot effort there to solve many small details as:
- use Arkos Tracker 2 AKY music player by Julien Névo a.k.a. Targhan/Arkos converted to 6502/Oric by Arnaud Cocquière a.K.a GROUiK/FRENCH TOUCH a.K.a Scalex, There was real bug in code but this 'music story' deserves whole new topic;
- be compatible with Oric-1 and Atmos/Pravetz-8D - no ROM functions are used;
- implement nice HIRES switching without ugly bars/lines on screen;
- implement 'Loading...' progressbar like animation 'ala Twilighte's magic trick';
- make the scrolling Text/Bitmap script controlled and frame synchronized;
- rax painted 3 chess-boards, 3 chess-pieces sets and 10 different dividers to select from;
- ... and lot lot more including fun!
Re: cc65-Chess for Oric by [raxiss]
The demo is fantastic !
The game is nice to play.
The game is nice to play.
Re: cc65-Chess for Oric by [raxiss]
Excellent !! Yum .. Yum ..
Didn't know Dwayne Johnson was on Oric .. this guy is definitely cool
That might be an interesting challenge .. If i manage to recompile the project, i'll try the various ideas i've got on how to enhance the thinking part.
Yes
It offers some very interesting possibilities. DBug knows how to get 16 more kilobytes thanks to that.
Graphics are very nice and the text scrolling is so cool.. all that contributes to make the game very beautiful. Congratulations. and thanks again.iss wrote: ↑Sat May 16, 2020 6:22 pm - implement nice HIRES switching without ugly bars/lines on screen;
- implement 'Loading...' progressbar like animation 'ala Twilighte's magic trick';
- make the scrolling Text/Bitmap script controlled and frame synchronized;
- rax painted 3 chess-boards, 3 chess-pieces sets and 10 different dividers to select from;
- ... and lot lot more including fun!
One more jewel in Oric's patrimony.
Re: cc65-Chess for Oric by [raxiss]
When I try to build the project with instructions provided in the readme file, it says that there's no rule to build the target "cc65-chess.oric" required to build "cc65-Chess.tap".
Am i missing something ? (other than cleverness that I know I've been missing for more than 40 years now)
Am i missing something ? (other than cleverness that I know I've been missing for more than 40 years now)
Re: cc65-Chess for Oric by [raxiss]
Main repository was just updated by StewBC: https://github.com/StewBC/cc65-Chess
But there is a small bug somewhere, so for successful build follow this steps exactly.
1. Include 'path_to/cc65/bin' in your PATH environment variable
2. Download the repo (the used upper/lower case is important!) :
3. Change directory to 'cc65-chess'
4. Make the Oric target:
The result is: cc65-Chess.tap
Hope this helps!
But there is a small bug somewhere, so for successful build follow this steps exactly.
1. Include 'path_to/cc65/bin' in your PATH environment variable
2. Download the repo (the used upper/lower case is important!) :
Code: Select all
https://github.com/StewBC/cc65-Chess.git cc65-chess
4. Make the Oric target:
Code: Select all
make OPTIONS=optspeed all tap
Hope this helps!