Page 1 of 1

PR 1.3.1 pre-release 2

Posted: December 7th, 2014, 8:12 pm
by David
Here is the new version.
The changes are:

Code: Select all

-------------------------------------------------
PR v1.3.1 pre-release 2 (released 2014-12-07)
-------------------------------------------------
- PR now won't round up palette colors from 254 and 255 to 256.
+ Added support for PoP2 waves.
- In a partial import, no conversion was done.
- In a partial import, no checksum bytes were written.
- PR now won't crash if I give a directory name without a trailing backslash.
- PR will remove a trailing backslash from the DAT path.
+ Added TXT4 decoding/encoding.

Re: PR 1.3.1 pre-release 2

Posted: December 7th, 2014, 10:03 pm
by Norbert
Thanks David.
You've put a lot of hours into creating and improving PoP related software. :)

I've moved your post into a new thread, its own thread about pre-release 2.

In August 2013, after you published pre-release 1, I wrote: "[...] and will wait with 'announcing it' (Facebook/Twitter/front pages) until it's no longer pre-release." I think maybe I should ignore that it's called a pre-release and just announce pre-release 2, because a lot has changed since 1.3. ;) Agreed?

Re: PR 1.3.1 pre-release 2

Posted: December 8th, 2014, 4:43 pm
by David
Norbert wrote:I think maybe I should ignore that it's called a pre-release and just announce pre-release 2, because a lot has changed since 1.3. ;) Agreed?
Agreed! :)

Re: PR 1.3.1 pre-release 2

Posted: August 12th, 2016, 8:40 am
by lvcabral
When extracting the graphics from SNES VPALACE.DAT (that uses WDA) I always get only the first 5 resources in color, the rest are converted as B&W and with the patterns scrambled (see image). Any clue about this issue?

EDIT: Just noticed that the VPALACE from mod 47 (Pirates of Persia) also has the same issue.

Image

Re: PR 1.3.1 pre-release 2

Posted: August 13th, 2016, 10:07 am
by David
lvcabral wrote:When extracting the graphics from SNES VPALACE.DAT (that uses WDA)
For such VPALACE.DAT files, you need to make a new resources.xml this way:
* Make a copy of the original resources.xml with a different name.
* In that, copy the "walls" section from "vdungeon" to "vpalace", overwriting the original.

Also, PR has a command-line option to use this custom xml instead of "resources.xml".

Re: PR 1.3.1 pre-release 2

Posted: August 14th, 2016, 5:14 am
by lvcabral
David wrote:
lvcabral wrote:When extracting the graphics from SNES VPALACE.DAT (that uses WDA)
For such VPALACE.DAT files, you need to make a new resources.xml this way:
* Make a copy of the original resources.xml with a different name.
* In that, copy the "walls" section from "vdungeon" to "vpalace", overwriting the original.

Also, PR has a command-line option to use this custom xml instead of "resources.xml".
Thanks David,

It worked perfectly, I already updated my conversion tools to support wda mode for palace.
https://github.com/lvcabral/PoPSpritesConverter

Image

Re: PR 1.3.1 pre-release 2

Posted: September 10th, 2017, 11:56 am
by Norbert
I ran into an issue when exporting PoP2.

For 'debugging' purposes I added this to the start of pop2decompress():

Code: Select all

printf ("pop2decompress: %i, %i\n", inputSize, verify);
./pr -f --resource=pop2.xml --export=/home/norbert/test/resources PoP2/ROOFTOPS.DAT
Running this gets stuck:
Spoiler: show
[...]
pop2decompress: 679, 22
pop2decompress: 580, 21
pop2decompress: 674, 22
pop2decompress: 655, 21
pop2decompress: 4016, 232
pop2decompress: 1786, 45
pop2decompress: 688, 26
pop2decompress: -4, 30007
[It now hangs here and does not continue.]
Running this finishes successfully:
./pr -f --resource=pop2.xml --export=resources PoP2/ROOFTOPS.DAT
Spoiler: show
[...]
pop2decompress: 679, 22
pop2decompress: 580, 21
pop2decompress: 674, 22
pop2decompress: 655, 21
pop2decompress: 4016, 232
pop2decompress: 1786, 45
pop2decompress: 688, 26
pop2decompress: -4, 0
pop2decompress: 9037, 122
pop2decompress: 2557, 32
pop2decompress: 1003, 34
pop2decompress: 325, 54
pop2decompress: 366, 54
pop2decompress: 364, 54
pop2decompress: 355, 54
pop2decompress: 11767, 320
pop2decompress: 13667, 320
pop2decompress: 16957, 298
Result: 131 files successfully exported (131)
The former appears to get stuck at either shap04167.bmp or shap04168.bin.
The -4 value looks suspicious.
(All of this might be related to this?)

Re: PR 1.3.1 pre-release 2

Posted: September 17th, 2017, 11:01 am
by David
Norbert wrote: ./pr -f --resource=pop2.xml --export=/home/norbert/test/resources PoP2/ROOFTOPS.DAT
Running this gets stuck:
[...]
Running this finishes successfully:
./pr -f --resource=pop2.xml --export=resources PoP2/ROOFTOPS.DAT
So, the only difference is the export path?
That's odd.

This is what PR does for me on Windows: (with the --verbose option)
Spoiler: show
[...]
pop2decompress: 679, 22
pop2decompress: 580, 21
pop2decompress: 674, 22
pop2decompress: 655, 21
pop2decompress: 4016, 232
pop2decompress: 1786, 45
pop2decompress: 688, 26
Error in file shap04166.bmp (code -26)
Error in file shap04167.bmp (code -26)
pop2decompress: 9037, 122
pop2decompress: 2557, 32
pop2decompress: 1003, 34
pop2decompress: 325, 54
pop2decompress: 366, 54
pop2decompress: 364, 54
pop2decompress: 355, 54
pop2decompress: 11767, 320
pop2decompress: 13667, 320
pop2decompress: 16957, 298
Result: 131 files successfully exported (131)
The problem is that those two resources are almost empty in PoP2 v1.0, they contain only two bytes: 00 00.
The game interprets this as a zero-height image (the first two bytes store the height), and does not try to process it further.
PR, however, does not skip these.

I added them as bitmaps to pop2.xml because PoP2 IR *does* have actual images with these resource IDs.

What should PR do when it finds a zero-height bitmap?
Should it export them as a 0×0 BMP? (Is that even valid?)
Or just don't export them at all?

Either way, most PoP2 (and PoP1) DAT files have plenty of such resources.
Would it be a good idea to mark them as bitmaps instead of binary in the XMLs?
Norbert wrote:The -4 value looks suspicious.
That is the "remaining" size of the 2-byte resource after subtracting the 6 bytes of the header.
Norbert wrote:(All of this might be related to this?)
The palettes? I don't think so.

EDIT: For now, I chose not to export them at all:
https://github.com/NagyD/PR/commit/010c ... 25b8f582ed
Please try if it works for you.

Re: PR 1.3.1 pre-release 2

Posted: September 17th, 2017, 7:22 pm
by Norbert
David wrote:EDIT: For now, I chose not to export them at all:
https://github.com/NagyD/PR/commit/010c ... 25b8f582ed
Please try if it works for you.
The Makefile appears to only copy resources.xml to bin/.
If I knew how to fix this, I'd say how, but I've tried fixing this and didn't succeed.

Anyway, yeah, both commands now work. Neither hangs the program.
The program reports 131 exported files.
I count 130 files (26 .bin, 101 .bmp, 2 .pal, 1 .pal.more).

Re: PR 1.3.1 pre-release 2

Posted: September 23rd, 2017, 12:25 pm
by David
Norbert wrote: September 17th, 2017, 7:22 pm The program reports 131 exported files.
I count 130 files (26 .bin, 101 .bmp, 2 .pal, 1 .pal.more).
It seems that the empty images are also counted, even though no files are exported for them.
And actually, *resources* are counted, to the .pal.more and its related .pal is counted as one.

So, of the 131 resources, only 129 are exported into 130 files.

How important is to fix this?
I have a fix that counts successfully exported *resources* (not files), and it says 129 at the end.

Re: PR 1.3.1 pre-release 2

Posted: September 23rd, 2017, 4:13 pm
by Norbert
David wrote: September 23rd, 2017, 12:25 pmHow important is to fix this?
Not important.
The Makefile probably is though.

Re: PR 1.3.1 pre-release 2

Posted: September 24th, 2017, 1:28 pm
by David
Norbert wrote: September 17th, 2017, 7:22 pm The Makefile appears to only copy resources.xml to bin/.
If I knew how to fix this, I'd say how, but I've tried fixing this and didn't succeed.
Done: https://github.com/NagyD/PR/commit/e90b ... 2dc5ce2d9a
This works for me under Linux.

(I wonder what you were doing wrong.)

Re: PR 1.3.1 pre-release 2

Posted: May 12th, 2018, 1:33 pm
by David
I guess I need to make a new release because people are complaining about errors that were already fixed in the source: https://github.com/NagyD/PR/issues/1
What version number should this new release have?

Re: PR 1.3.1 pre-release 2

Posted: May 12th, 2018, 6:06 pm
by Norbert
David wrote: May 12th, 2018, 1:33 pmWhat version number should this new release have?
Version 1.3.1 makes sense, seeing the previous was pre-release 2 for 1.3.1. :)
Normally, we'd be at v1.4+ by now, but you went to v1.3.1 pre-release for some reason. ;)