Author Topic: Converting VGA images to EGA  (Read 9153 times)

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: Converting VGA images to EGA
« Reply #60 on: September 04, 2015, 06:31:42 AM »
Wow, that's great!

Sorry I didn't have time to respond earlier... I could have told you that Gold Box games use gray as the color of the floor (the background color) in the combat tiles.

I'd like the background to be this color:

Red=103, Green=247, Blue=159

In hex, that would be #67F79F

See image below
Done.

On a different topic, the one this thread was started on - how did the gold box games turn a VGA image into an EGA one - do we know for sure that there isn't a second EGA image inside the files that hold the VGA images? I can't find any sort of spec for the pic.dax file format, and the code inside GBE makes it clear the format can hold both EGA and VGA images.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2183
    • Nol Drek's Web Site
Re: Converting VGA images to EGA
« Reply #61 on: September 05, 2015, 11:13:55 AM »
On a different topic, the one this thread was started on - how did the gold box games turn a VGA image into an EGA one - do we know for sure that there isn't a second EGA image inside the files that hold the VGA images? I can't find any sort of spec for the pic.dax file format, and the code inside GBE makes it clear the format can hold both EGA and VGA images.

I don't know if the PIC*.DAX files actually hold the EGA information or if the color displayed on the monitor is chosen to be the closest matching color when the game is running in EGA mode.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Converting VGA images to EGA
« Reply #62 on: September 28, 2015, 12:26:05 AM »
If you think that a given game contains both EGA and VGA pictures, run both EGA and VGA Viewers on the game directory.  If an individual file contains pictures in both formats, it might all show the pictures when you run both Viewers on it.

I imagine that a file containing pictures in both formats would still have one table of contents for all pictures
DaxDump prints out a list of all records in each file, compare that list with what each Viewer is showing. For the DaxDump program see:
http://ua.reonis.com/index.php?action=dlattach;topic=1033.0;attach=3688
It is a Command Prompt program.
(To get the entire print out and not just a bit of it, you will need to increase the Command Prompt's Screen Buffer Size. Click on the C:\_ logo, click on Properties and then go to the Layout tab. Under Screen Buffer Size choose a Height of 3,000 or whatever.)

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2183
    • Nol Drek's Web Site
Re: Converting VGA images to EGA
« Reply #63 on: September 28, 2015, 09:33:17 PM »
If you think that a given game contains both EGA and VGA pictures, run both EGA and VGA Viewers on the game directory.  If an individual file contains pictures in both formats, it might all show the pictures when you run both Viewers on it.

OK, I'll use the file "PIC1.DAX" from Treasure of the Savage Frontier as an example.

Running DAXVIEW, I see 12 images, all scrambled since DAXVIEW doesn't work with this file.
Running DAXVGA, I see 1 image, which I can tell is the first picture in the file, even though it's scrambled. For some reason, the number 9163 appears when DAXVGA terminates.
Running DAXDUMP, I see that this file contains 66 blocks which are the images and 6 blocks which are too small to be images, only 798 bytes each.
Running Goldbox Explorer, I see all 66 images as they should appear.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: Converting VGA images to EGA
« Reply #64 on: September 29, 2015, 03:05:22 AM »
6 blocks which are too small to be images, only 798 bytes each.
Those could be VGA palettes, which should be at least 3*256=768 bytes long, plus whatever miscellaneous/header data they need.

Post Scriptum - to further muddy the palette issues, it looks like those pic.dax files in the GSF are limited to 5 bits per pixel (32 colors, not the full 256) - possibly to stay compatible with the amiga version of the game graphics? I don't know.
« Last Edit: September 29, 2015, 03:34:04 AM by marainein »