English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 02 September 2017, 06:53   #1
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Battlechess Modification

Hi.

Is it at all possible that the game Battlechess can be modded/fixed so that the CPU thinking time can be sped up?

I have got my kids playing it and wanted them to play it without that 4-8 second wait on every turn of the CPU.
ransom1122 is offline  
Old 02 September 2017, 09:31   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
I have disassembled the code & reassembled it once. It looks like C so maybe some parts could be sped up. But the easiest way would be to play on winuae fastest possible
jotd is offline  
Old 02 September 2017, 09:35   #3
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Yeah I know but the kids play it with the raspberry Pie on the tv... and the thinking time is still there even with JIT etc etc
ransom1122 is offline  
Old 02 September 2017, 10:04   #4
Schlachtwerk
68k RULEZ
 
Schlachtwerk's Avatar
 
Join Date: Jul 2010
Location: Germany
Posts: 199
Raspberry Pi is fast like hell with jit i testet it on my Pi 3
Schlachtwerk is offline  
Old 02 September 2017, 10:24   #5
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
No, on a 68040 setup with JIT set on fastest, there is still a 5-6 second CPU thinking time. play it a little and you will notice it when the cpu has heaps of movement possibilities.
ransom1122 is offline  
Old 02 September 2017, 10:29   #6
Schlachtwerk
68k RULEZ
 
Schlachtwerk's Avatar
 
Join Date: Jul 2010
Location: Germany
Posts: 199
Do you know chess is a game of thinking not of fast play
Schlachtwerk is offline  
Old 02 September 2017, 10:36   #7
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Quote:
Originally Posted by Schlachtwerk View Post
Do you know chess is a game of thinking not of fast play
Yes of course. But a CPU is a CPU not a Human. I dont want to watch 7 seconds of waiting each time the cpu thinks. This is why ive asked if its possible to speed up the cpus thikning time. Obviously a 2 player game takes time to think.
ransom1122 is offline  
Old 02 September 2017, 10:51   #8
hipoonios
Amiga Hardcore Gamer
 
hipoonios's Avatar
 
Join Date: Apr 2005
Location: Sweden
Age: 46
Posts: 1,207
Set the difficulty level to 1 to cut down the thinking time
hipoonios is offline  
Old 02 September 2017, 11:05   #9
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
It is set as 1
ransom1122 is offline  
Old 02 September 2017, 19:43   #10
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
As I said it is written in C, so some routines are probably sub-optimal. What could be done if we had the tools with WinUAE would be to low-level profile it. Then we'd be able to optimize some loops that are called a lot, use registers, etc... That could make a difference on a real amiga, maybe less on emulation.
jotd is offline  
Old 02 September 2017, 20:21   #11
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
This thread is quite funny really; and shocking at the same time.

...just tell your kids to be a bit more patient; they can think hard about the next move / moves while the CPU is computing

I mean, that's how we all played the game in the old days; now at least you can speed up stuff via emulation
DamienD is offline  
Old 02 September 2017, 21:19   #12
spudje
Registered User
 
Join Date: Dec 2014
Location: Netherlands
Posts: 1,406
We were kids when this game originally was released and accepted the waiting time
spudje is offline  
Old 03 September 2017, 01:14   #13
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
I am happy to accept the waiting time but the question still arises on wether the game can be modified?
ransom1122 is offline  
Old 03 September 2017, 07:17   #14
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Normaly, chess programs don't get to execute faster in faster hardware. They "think" better in faster hardware.

So, usually, there is a number of seconds associated with a Level, say:
Level 1, 5
Level 2, 10
Level 3, 20
Level 4, 40

The time needed for the move stays the same on faster hardware, it's just that the chess program will calculate more in the same time.

TL;DR Someone would have to alter the time association with the "Levels".
alkis is offline  
Old 03 September 2017, 13:02   #15
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
Or just use a chess program with lower or adjustable thinking time. VChess for example where you can set time in seconds, minutes, hours or infinity. BattleChess its 3D view becomes boring after some time and confuses only. Further I don`t like to wait for the CPU.
daxb is offline  
Old 03 September 2017, 13:28   #16
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
DamienD: I can't disagree. Remember the 8-bit days when you were OK to wait for characters to crawl across the screen (or loading times with cassettes or floppies for the luckiest). I've recoded/revamped an old 8-bit game (adventure/action), and I had to adapt it because the sluggishness had become unbeareable.

to answer ransom1122: yes it CAN be modified. But will it speed up the game noticeably? that I'm not sure. And recoding parts would have to work perfect, because subtle bugs could be difficult to detect.
jotd is offline  
Old 03 September 2017, 13:31   #17
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
Quote:
Originally Posted by ransom1122 View Post
I am happy to accept the waiting time but the question still arises on wether the game can be modified?
Yes it can. Which version of Battle Chess are you using?

I looked at BattleChess 83904 bytes long dated 14-Jul-88 on "Battle Chess (Europe).ipf", see https://edgeemu.net/details-58761.htm

The maximum thinking time is 5 × 2^(level - 1) seconds for levels 1-9. So e.g. for level 1 it's 5 seconds, for level 6 it's 5 × 2^5 = 160 seconds.

Use a binary file editor to search for these bytes: 7005 322C
They should be at byte offset $8D00 in the BattleChess file. Change the 7005 to 7001 and save the file. That changes the maximum time to 1 × 2^(level - 1). So for level 1 it would only think for 1 second.

I've uploaded the modified file to The Zone and (delete ! from URL after pasting into your web browser):
Code:
https://www.media!fire.com/file/ml0ay7wwmish8iy/BattleChess_fast.lha
Untested by me, and I think I missed out another bit of code to patch, so let me know if it doesn't seem to work (or thinks for three seconds instead of 1).

Last edited by mark_k; 03 September 2017 at 13:40.
mark_k is offline  
Old 03 September 2017, 13:39   #18
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Im happy to use the ipf on my pc. But Amiberry on raspberry pie doesn't support ipf. Can you make an adf please?
ransom1122 is offline  
Old 03 September 2017, 13:58   #19
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
You can just use an ADF-reading program in WinUAE to create an ADF from the IPF.

I think I missed patching another bit of code which limits the think time to a minimum of 3 seconds. Second try uploaded to The Zone and
Code:
https://www.media!fire.com/file/19kzbcz7l072lj1/BattleChess_fast_try2.lha
mark_k is offline  
Old 03 September 2017, 17:46   #20
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
Quote:
Originally Posted by mark_k View Post
Use a binary file editor to search for these bytes: 7005 322C
They should be at byte offset $8D00 in the BattleChess file. Change the 7005 to 7001 and save the file. That changes the maximum time to 1 × 2^(level - 1). So for level 1 it would only think for 1 second.
Testet it with BattleChess 84716 bytes 08-07-96. Does not work.
daxb is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
SX1 Modification xArtx Hardware mods 0 10 February 2015 17:06
Catweasel And Drive Modification Loedown support.Hardware 11 04 February 2010 02:31
BattleChess CD32 Kitty support.Games 8 10 October 2009 09:40
A little modification... lelezetec request.UAE Wishlist 63 02 October 2009 23:10
Battlechess Contest (EAB vs A500) Bloodwych Nostalgia & memories 67 14 August 2003 14:37

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.35668 seconds with 13 queries