Replies: 6 comments 24 replies
-
Can you get a screenshot of either of these programs running on Linux or FreeBSD?
Yes this should be easily converted - depending on the glyphs used. If the actual unicode glyphs exist on either PC-98 or IBM PC, then we should somewhat easily be able to handle converting 16-bit unicode to CP 437 (or PC-98's charset). If the glyphs do not exist, then the only option might be to draw the characters using Nano-X from a unicode font, which would be a lot of work. |
Beta Was this translation helpful? Give feedback.
-
@tyama501 Maybe it will be fun to try compiling this chess game with the new enhanced toolchain from: https://github.com/ghaerr/8086-toolchain |
Beta Was this translation helpful? Give feedback.
-
I quickly compiled up your chess game with max heap and ran it on ELKS, pulling in the debug malloc using the following extra source file added to the compilation:
I then ran it on the console after setting sysctl to turn on malloc debugging, and it comes up and runs, with the unicode output being interpreted by my macOS Terminal:
After that, the computer runs and I see from the output that the program does hundreds of mallocs (here is short list):
Etc etc. So it is very apparent that the program allocates way more than 55K of heap, which then causes it to run out of memory. The good news is that we now have our malloc/free under control so the program does not crash. However, compiling this in large model under Watcom won't solve this problem - as the program needs more than 64k heap. Even moving to the current "arena malloc" code isn't going to immediately solve this problem because arena malloc, while working in large model with an external data segment heap, only allows for a single 64k heap, which will likely be used up by this program. So the solution is 1) I need to extend the arena malloc to allow for multiple 64k arenas of memory to be allocated, and 2) the program will need to be compiled in large model using OWC. And even then we hope that the "AI.h" part of the program doesn't end up using way more memory than is available on real mode ELKS. This will be a very good test program to get the multi-arena heap working :) |
Beta Was this translation helpful? Give feedback.
-
I see that in Ai.h there are several loops:
Maybe if you can put 99 as a variable for all of these and then reduce it to 10? Honestly there are not many comments and variable names are short and not very descriptive ... |
Beta Was this translation helpful? Give feedback.
-
Or maybe here:
100 can be reduced? |
Beta Was this translation helpful? Give feedback.
-
@toncho11 was wondering whether this ASCII chess game might be able to be compiled and run using the new toolchain, so I tried it. With a few hacks, our toolchain preprocessed, compiled, assembled and linked successfully. I didn't try running it because of the few problems, but they could be worked around with a little more work. Of course, the results will be very similar to the IA16 version: the program will quickly run out of memory. Here were the hacked changes:
and then produced the following warnings (which are fine):
Basically, C86 doesn't support:
Overall, I'm pleasantly surprised that our toolchain got this far, and produced an executable! |
Beta Was this translation helpful? Give feedback.
-
I found ASCII chess game.
ASCII-Chess
https://github.com/Parigyan/ASCII-Chess
Forked and enhancement
https://github.com/matthew1796/ASCII-Chess
It uses unicode like
printf("\u2588\u2588\u2588\u2588\u2588\u2588\u2588");
for chess grid.
Currently our console cannot display unicodes,
but it may work if we replace with some other ascii codes
and using OpenWatcom?
Beta Was this translation helpful? Give feedback.
All reactions