Search found 46 matches

by Marty2PB
Thu Feb 23, 2023 10:47 am
Forum: Coding Questions
Topic: Purebasics Integration ZIP Question (UncompressFile is -1)
Replies: 7
Views: 1261

Re: Purebasics Integration ZIP Question (UncompressFile is -1)

Yes. That's a good find. Many thanks for your feedback.

Besides reporting this as a feature, is there any way to intercept this decompression method in PB?

It would be a good tip for the Purebasic doc to include the methods. Otherwise you spend hours why the "uncompressfile" command always brings ...
by Marty2PB
Thu Feb 23, 2023 6:38 am
Forum: Coding Questions
Topic: Purebasics Integration ZIP Question (UncompressFile is -1)
Replies: 7
Views: 1261

Re: Purebasics Integration ZIP Question (UncompressFile is -1)

Yeah .. damned .. .... This was false in the Test. You right.

Code: Select all

If UncompressPackFile( 0, szPackEntryname) = -1
However it cant no uncompress. Other Zips worked fine but then exitsts Zips there cant uncompress. Can you Decompress the frfaq21b.zip with Purebasic. i use 5.73 LTS or PB 6.00 LTS?
by Marty2PB
Thu Feb 23, 2023 5:10 am
Forum: Coding Questions
Topic: Purebasics Integration ZIP Question (UncompressFile is -1)
Replies: 7
Views: 1261

Purebasics Integration ZIP Question (UncompressFile is -1)

I just working on a Archiv Converter Source (conv. to 7z) and I have a severals zip files from djgpp Repository that can't unpack with Uncompressfile and integrated ZIP support :shock:

But no Errors with 7z tool.

https://abload.de/img/bild_2023-02-23_024030fdin.png

Files are here: https ...
by Marty2PB
Tue Feb 14, 2023 8:46 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

This works now good :)



- Extract to given target directory
- Extract All or
- Extract single files by Name or Position Number
- External Content List usable outside of pbUnLZX

v-0.6
Adding: Verify Archive UnLZX::Verify_Archive(*LzxMemory)
Resault are BAD Crc's Only

Extracting WHDload LZX ...
by Marty2PB
Mon Feb 13, 2023 9:35 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ


You know that you have

ForEach List()
...
Next

This is much easier than RestList() ... NextElement()


Yes, that's right. I didn't have that on my radar at all. I did the routine this morning before I went to bed. But it's not even final yet. :wink:


To extract this file:

https://files ...
by Marty2PB
Mon Feb 13, 2023 9:59 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ


There were 2 points which took hours to find out:

1. One endif was placed wrong.
This resulted in only decode the first turn.
Small files were Ok, large files were only decoded up to 15k.

2. The right conversion from

if(!shift--)
{
shift += 16;
control += *source++ << 24;
control += *source ...
by Marty2PB
Mon Feb 13, 2023 3:01 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

Whoa.... how did you manage that so quickly?. I fall right off the chair. :D

I looked and searched for days. :shock:

Yes. The crc calc worked now. :D

PS:

Debug "UnLZX Purebasic Module v0.2 based on Amiga PowerPC Elf UnLZX 1.0 (22.2.98)"
Debug "Convertet by Infratec & Marty2PB"
Debug ...
by Marty2PB
Sat Feb 11, 2023 6:13 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

LZX Pack archives are opened and read by code with no read error memory address or other memory error. However, this does not work properly because the files are written, something is not right yet.
Although the reading and the position and size to be read are correct, a few characters are missing ...
by Marty2PB
Fri Feb 10, 2023 8:41 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ


If ( count = (*p\temp - *p\source + 16384) )
Should be

count = (*p\temp - *p\source + 16384)
If count


The corrected crc_calc:

Procedure crc_calc(*Memory.CRC_Memory, *UnLZX.LZX_ARCHIVE, length.i, *FileCalc.ascii = #Null, Modus.i = 0)

Protected *mem.Ascii, temp.q, *crc_table.CRC ...
by Marty2PB
Thu Feb 09, 2023 9:17 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

infratec wrote: Thu Feb 09, 2023 8:02 pm Hm ....

it works only if I use the x64 PB version.
With x86 I get CRC errors.

I will have a look.
Oh. That's strange. I haven't tested it with the PB x86 yet and i'm coding this in the 64-bit version.
Thank you for looking at this and for your time. :)
by Marty2PB
Thu Feb 09, 2023 7:14 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ


Can you provide a lzx file which works with your code?

Because I downloaded a few lzx files an I get CRC errors.

Example:
https://files.scene.org/view/demos/groups/abyss/ays-flve.lzx



do you mean CRCs bi Downloading or CRC from the PB Convertet Source
The Listings and CRC works but not ...
by Marty2PB
Thu Feb 09, 2023 1:13 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

infratec wrote: Wed Feb 08, 2023 11:53 pm
.c in PB is unicode, which is more or less a word and not a byte
Ah, ok. I got confused with that. :?
by Marty2PB
Thu Feb 09, 2023 1:11 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

Yes. You right. But the Signs are always shiftet. I somehow have a conversion error in there.


I upload the the Source to my Github Account. Too much Code. :D
https://github.com/MartyShepard/LHvSyst ... hiveLZX.pb
by Marty2PB
Wed Feb 08, 2023 11:36 pm
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

I'm well on my way :)

However, there are 2 functions with operands that I am unsure about converting to pb correctly.

First in the routine "Extract Normal" in C


do /* copy the overrun to the start of the buffer */
{
*destination++ = *temp++;
} while(--count);



i think in Purebasic


*p ...
by Marty2PB
Mon Feb 06, 2023 10:51 am
Forum: Windows
Topic: Conversion UnLZX (LZX decompress ) in C to PB Nativ
Replies: 35
Views: 6363

Re: Conversion UnLZX (LZX decompress ) in C to PB Nativ

Hello infratec :D
thanks for hint. Yes now ist works.

PS:
Thanks again for the help with the C64 disk and tape module. :wink:

Fred: Thank you :)