English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Retrogaming General Discussion (https://eab.abime.net/forumdisplay.php?f=17)
-   -   Battlechess Modification (https://eab.abime.net/showthread.php?t=88477)

ransom1122 02 September 2017 06:53

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.

jotd 02 September 2017 09:31

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 ;)

ransom1122 02 September 2017 09:35

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

Schlachtwerk 02 September 2017 10:04

Raspberry Pi is fast like hell with jit i testet it on my Pi 3

ransom1122 02 September 2017 10:24

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.

Schlachtwerk 02 September 2017 10:29

Do you know chess is a game of thinking not of fast play

ransom1122 02 September 2017 10:36

Quote:

Originally Posted by Schlachtwerk (Post 1182038)
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.

hipoonios 02 September 2017 10:51

Set the difficulty level to 1 to cut down the thinking time :p

ransom1122 02 September 2017 11:05

It is set as 1

jotd 02 September 2017 19:43

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.

DamienD 02 September 2017 20:21

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 :p

I mean, that's how we all played the game in the old days; now at least you can speed up stuff via emulation :agree

spudje 02 September 2017 21:19

We were kids when this game originally was released and accepted the waiting time :)

ransom1122 03 September 2017 01:14

I am happy to accept the waiting time but the question still arises on wether the game can be modified?

alkis 03 September 2017 07:17

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".

daxb 03 September 2017 13:02

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. :)

jotd 03 September 2017 13:28

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.

mark_k 03 September 2017 13:31

Quote:

Originally Posted by ransom1122 (Post 1182134)
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).

ransom1122 03 September 2017 13:39

Im happy to use the ipf on my pc. But Amiberry on raspberry pie doesn't support ipf. Can you make an adf please?

mark_k 03 September 2017 13:58

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

daxb 03 September 2017 17:46

Quote:

Originally Posted by mark_k (Post 1182209)
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.


All times are GMT +2. The time now is 16:44.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04815 seconds with 10 queries