Limit on size of GRAPHICS.DAT?

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Limit on size of GRAPHICS.DAT?

Post by Gambit37 »

Is there a limit on the size of the GRAPHICS.DAT?

I can load my current file which has swelled to 514KB. However, if I replace a graphic so that it goes to 525KB, CSBWin crashes when I click on the 'Dungeon' button.

Are there any checks in the original code that could be removed. Perhaps it's more complicated than that....?

Hope it's fixable, I still have a long way to go before all my new gfx are imported...
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Additionally, on the 514KB file, once I click on the 'Enter' button, the doors open and I then get a Windows messagebox saying System Error 44 and the game exits.

I am thinking maybe the limit is 512KB?

EDIT: Tested a file of 510KB and it was fine, no errors, game plays normally.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Ship the thing to me and I will try to figure it out.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post by PaulH »

I used to get the system 44 error after I had accidently resized a graphic. Have you managed to resize any of the separate graphics from DMout, and make them larger, and if so, how?
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Oh yes, most of them are resized -- but that's not a problem if you hex edit 0558.dat to reflect the new sizes. This is a massively customised file that has all kinds of new sized images in it. No, the problem I believe is the overall FILE size of the .dat.

Mr. Stevens, I am sending you some sample GRAPHICS.DATS of differing sizes as I type this.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Incidentally, the file I am changing is the End Game Scroll -- by saving it out from Photoshop with different amounts of dithering, I can easily generate GRAPHICS.DATS of differing sizes. It's the file dmout0005.bmp as generated by Rain's DMEXTRACT program.

I am wondering if perhaps there is an upper limit on the amount of memory any SINGLE graphic takes? Hmmmm... maybe I could get the GRAPHICS.DAT bigger by adding lots of smaller images and see if that also causes the problem...
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Try CSBwin9.8v22.

There were really two problems. Graphic number 5 was bigger than
32767 and the total sizes of <something> was too big. I doubled the
size of memory allocated (from 1 meg to 2) and 'un-signed' the graphic
sizes. I do not understand the memory allocation and things might break
again. It may come to pass that I will need to study it a bit.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”