sev wrote:Buddha wrote:Also what did you use to test your games as I don't know of
any AGI-interpreter that supports AGIPAL-files with more
than 6 bits per color component?
It may be my memory, but did not original AGIPAL hack just performed x & 0x3f on each color component without any checks? The disassembly could be rechecked and game screenshots compared.
I just happened to check the original AGIPAL-hack's
disassembly a little while ago with IDA and what it does
in the AGI003-file in sub_24F is that it just reads 192
bytes from the chosen AGIPAL-file straight into memory and
uses that data without any modification to set the palette.
Here's the palette setting part from it:
; ES:DX is already pointing to the AGIPAL-data's start
seg000:02B6 mov ax, 1012h
seg000:02B9 xor bx, bx
seg000:02BB mov cx, 64
seg000:02BE int 10h
; - VIDEO - SET BLOCK OF DAC REGISTERS (EGA, VGA/MCGA)
; BX = starting color register, CX = number of registers to set
; ES:DX -> table of 3*CX bytes where each 3 byte group represents one
; byte each of red, green and blue (0-63)
I suspect the weird layout of the AGIPAL-files is because
of VGA's mapping of the 16 EGA colors to the VGA-color
indices. Although I don't still understand how the color 6
(brown) would map correctly... The mapping from EGA color
index to VGA color index is this:
0 -> 0
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> 5
6 -> 20
7 -> 7
8 -> 56
9 -> 57
10 -> 58
11 -> 59
12 -> 60
13 -> 61
14 -> 62
15 -> 63
The original AGIPAL-hack I checked is the one made by
Dark Minister and it can be found at the FilePlanet at
http://dl.fileplanet.com/dl/dl.asp?Clas ... agipal.zip
Checked the disassembly of AGI Mouse v1.1 that has AGIPAL
support too. It does the palette changing exactly the
same way as the original AGIPAL hack by Dark Minister.
AGI Mouse v1.1 can be found at the FilePlanet at
http://dl.fileplanet.com/dl/dl.asp?Clas ... imse11.zip