• Please review our updated Terms and Rules here

Dice endgames

yevrowl

Member
Joined
Jun 26, 2022
Messages
31
Location
Kiev
Thanks to the help and advice of kind people on this and other forums, we managed to complete the program for the formation of chess endgames. Supports all known graphics adapters from the 1980s, except MDA (without OGA). You can read more about the purpose of the program on Wikipedia.



Known issues:
• Occasionally can impose a piece in the 4th pair.
• Sometimes does not give a piece to white or black.
• Can form positions that are not consistent with the rules.

Thank you all for your support and attention!
 

Attachments

  • chess.zip
    48.5 KB · Views: 9
Thanks for sharing it!

I'm just a bit confused by some acronyms. For instance, I don't know what AX is regarding graphics cards, and what's its relationship with EGA. What are DCGA, GDC and OGA? I guess HICC is Hercules In Color Card.
 
Last edited:
Thanks a lot, it's nice to read a good review.

DCGA — Double Size CGA (Toshiba J3100).
GDC — Goldstar GDC-212M (available in PCEm).
OGA — Orchid Graphics Adapter.
HICC — Hercules InColor Card.
 
In line 103 you have:

Code:
IF vid = 5 THEN SCREEN 1

If I'm not mistaken, 5 corresponds to Olivetti in your program.

Maybe you would want to use SCREEN 4, which starts actual Olivetti/AT&T 640x400 mode, instead of the more generic CGA SCREEN 1.
 
Hi. Plantronics in QuickBasic isn't the easiest thing to do since you need to access the video ram directly to do so. Here is a demo program that fills the video with random pixels. The way Plantronics works is that there are two planes of data and like CGA the data is interlaced. So the first page of ram is in two parts, so when you load data you only load every other line. The first page of Plantronics data is 4 bit and the second page is 4 bit giving 16 bits of information. I did not make one of these for the 16 color mode, but in the 640x200x4 color mode you have two planes with 1 bit each giving 2 bits per pixel or 4 colors. Anyway this is how they combine:

Picture1.png

Deriving the 16 color version would be straightforward. Anyway, the pain is in the fact that you need to figure out the screen you want, map the pixels and then use bit manipulation to get graphics on the screen - no simple lines or PSETs for you.

Here is code that just fills the memory with random characters.


Code:
SCREEN 1
CLS
RANDOMIZE TIMER

OUT 989, 16   '16 320x200x16 Plant, 32 640x200x4 Plant
OUT 984, 14

DEF SEG = 47104  '1st Page of Video Ram

'First Frame - Data is Interlaced

FOR g = 0 TO 80 * 100 - 1
  POKE g, INT(RND * 255)
NEXT g

'Second Frame
FOR g = 8192 TO 16190
  POKE g, INT(RND * 255)
NEXT g

DEF SEG = 48128  '2nd Page of Video Ram

FOR g = 0 TO 80 * 100 - 1
  POKE g, INT(RND * 255)
NEXT g

'Second Frame
FOR g = 8192 TO 16190
  POKE g, INT(RND * 255)
NEXT g


'This section lets you change the background color or palette in 640x200x4
rep2:
LOCATE 21, 1: INPUT c
IF c = 999 THEN END
OUT 985, c
OUT 984, 14
GOTO rep2
 
Back
Top