15 September 2021, 18:19 | #201 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
|
Quote:
I dont remember exactly, it was many years ago and im still dead to check this. But perhaps packed data after 8 or 12 bytes was eored using value from 4 or 8 offset (it was length). Find decoding code in Track2File source. http://aminet.net/package/disk/misc/Track2File_src |
|
15 September 2021, 18:51 | #202 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,331
|
Interestingly XFDdecrunch crashes when unpacking Pyradcor's LOB packed files using 68000 CPU but works with 68020 CPU.
|
15 September 2021, 19:05 | #203 | |
CaptainM68K-SPS France
|
Quote:
I sent AlexH the file 1Map_texts.amb fully repacked from the v1.10 done by pyrdacor. Let's see if it crash. |
|
16 September 2021, 00:34 | #204 |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
Thanks to Nico Bendlin we found the reason. The pre-68020 CPUs don't allow odd (non word-aligned) data addresses. And as Ambermoon reads the data as long-words it crashes on such CPUs. This happens when either the uncompressed or compressed data size is odd.
I will adjust my packer tomorrow to fix this and then we try if it works with the older CPUs. Last edited by Pyrdacor; 16 September 2021 at 00:41. |
16 September 2021, 00:39 | #205 | |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
Quote:
Every compressor can work and compress differently. There is no "correct" compression output or encoding. Important is only that the output can be decompressed by the decompressor. When the LOB header is missing, this is not an error as well. The AMNP container format has optional LOB compression so it is totally valid to not LOB compress some sub-files. For small files the compression often makes no sense. My packer only uses LOB if it is necessary (some containers require it) or reduces the size in relation to uncompressed data. For example the packer won't compress files smaller than 20 bytes. But as I said this is totally valid for AMNP files. |
|
16 September 2021, 00:54 | #206 |
Autistic 'n IRN!
Join Date: Jul 2012
Location: -
Posts: 2,978
|
Ambermoon.net and my love of the Amiga game Ambermoon - Article dev remake special by Pyrdacor
http://www.indieretronews.com/2021/0...miga-game.html |
16 September 2021, 01:12 | #207 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
|
Quote:
And yes all word/longword data must be stored at even addreses, if no special read/write word/longword routine is used on 68000. Odd lenghts/offsets must be padded. |
|
16 September 2021, 01:53 | #208 | |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
Quote:
The AMNP container only forces encryption (JH) but the compression (LOB) is optional for each sub-file. So either you have LOB+JH files or just JH files. In the latter case, there is no LOB header as the file is not compressed at all. |
|
16 September 2021, 02:57 | #209 | |
CaptainM68K-SPS France
|
Quote:
My test was simple : 1) the original tools must be able to process your files 2) I used Metallic AMB extractor, and after checking the files => i found errors. 3) I use the original LOB packer (running on Atari ST) to decrunch your files => it crashed. 4) I compared as asked by Don Adan v1.07 files crunched/decrunched with LOB packer v3.70 to see if the recrunch was identical. When i did the same between v1.07 and v1.10 on the same files, the crunched content was not matching. In the end, it only worked on 68020 by luck. The LOB packer compression on Ambermoon was made to work on 68000 & 680x0. I have just finished to build a new set of ADF of your patched version v1.10 with all files crunched with LOB packer type 6 (MSS scheme). As a result, the game fully works with A500 1Mb + 2 drives Yay ! For those who want to try : https://we.tl/t-2OAXPwKhkO Last edited by dlfrsilver; 16 September 2021 at 03:05. |
|
16 September 2021, 04:12 | #210 |
Speedbump gimme goosebump
|
Works here with my setup, congrats guys! Maybe I'll wait until Pyrdacor reprocesses the files himself and updates the ADF set from his repository. Having said that, it seems you nailed it dlfr.
Last edited by SquawkBox; 16 September 2021 at 05:19. |
16 September 2021, 05:15 | #211 |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
@dlfrsilver: It doesn't work by luck. My implementation is fine beside the word alignment which is basically adding a 0 byte to the end of files with odd size. It has nothing to do with the algorithm but is rather caused by a hardware limitation and the way Ambermoon implemented the decruncher/data copy routine.
I explained this to you at several places and Nico did too. So if you would have been patient for 1 day it would have worked with my packer too. But if you managed to do it the hard way, fine. And again: Crunched content has not to be identical to be valid. I will create a 1.10 version today as well with my fixed packer. Then we can check if it works. Anyway, thanks for your effort. Last edited by Pyrdacor; 16 September 2021 at 07:09. |
16 September 2021, 07:21 | #212 |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
To show that crunched content can differ, here an example:
To compress the data 44 44 44 44 you can do so with f0 44 44 44 44 or 80 44 03 01. The first one just uses 4 literals without an encoded match which is totally valid. The decompressor can process this and will output 44 44 44 44. The second one uses 1 literal 44 and then a match which has a length of 3 and an offset of 1 (go back this amount of bytes and read from there). So even this tiny example can be encoded in two ways and both are totally valid. It is a matter of how the compressor can find and encode matches. For example the sequence 11 11 11 11 22 33 can be encoded in a way that the first 4 bytes are expressed as a literal and a match of 3 like in the previous example. However if the whole sequence was present before inside the data it would be even better to express the whole sequence as one single match (back reference). So dependent on the compressor, there are multiple ways to compress or encode data. Some are better and some are not. And some are only better in specific scenarios. |
16 September 2021, 08:09 | #213 |
CaptainM68K-SPS France
|
Yes of course. The thing is that ambermoon was made to run on both cpus.
I have applied all the fixes you made referenced in the excel sheet, minor 2, for which I had no file number. |
16 September 2021, 09:12 | #214 |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
The compression has nothing to do with the CPU. Every CPU can handle all kind of compressions. The 68000 can handle other compressions as well. But it can't handle data with odd data addresses. But this is out of scope of the compression algorithm.
|
16 September 2021, 09:44 | #215 | |
CaptainM68K-SPS France
|
Quote:
The MSS compression use a form of structure. If this structure is absent, it's not a problem on A1200, but on A500 it leads to odd data addresses problems. And what matters is that the A500 programm recognize the pattern of the compression as devised by Jurie Hornemann. It's a sort of 'safety', otherwise you met the odd data addresses problem. I talked with CFOU about the whole problem, and he confirmed me that it was a problem with the LOB compression. |
|
16 September 2021, 09:57 | #216 | |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,331
|
Quote:
If you mean by safety that the files need to be compressed with word alignment then they decompress on both CPU architectures then yes it's a "safety" ;-) Last edited by alexh; 16 September 2021 at 10:03. |
|
16 September 2021, 10:42 | #217 |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
As expected the simple word-align fix did the job. It now runs on 68000 as well. I uploaded some test files to the bugfix folder here: https://github.com/Pyrdacor/Ambermoo...ish/Amberfiles
I did not change anything on the compression just adding a padding byte for odd data sizes. I will pack 1.10 english and 1.09 german today (ADFs too). Last edited by Pyrdacor; 16 September 2021 at 10:52. |
16 September 2021, 10:50 | #218 | |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 116
|
Quote:
The problem is that the Ambermoon executable (and maybe other loaders as well) copy the data as long-words before the decompression. This is the problem and it has nothing to do with the compression itself. You can also copy the data byte by byte and it would also work on a 68000. Nico Bendlin documented it pretty good and he also posted the link before. Maybe you should finally read it. https://gitlab.com/ambermoon/researc...is/compression |
|
16 September 2021, 11:24 | #219 | ||
CaptainM68K-SPS France
|
Quote:
Quote:
Nico Bendlin documented it pretty good and he also posted the link before. Maybe you should finally read it. https://gitlab.com/ambermoon/researc...is/compression[/QUOTE] I've read the document yesterday. |
||
16 September 2021, 11:25 | #220 |
CaptainM68K-SPS France
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Double Dragon remake progress update | Brick Nash | Amiga scene | 100 | 25 April 2019 16:19 |
return to the roots settlers 2 remake open source | turrican3 | support.Games | 4 | 28 July 2014 11:54 |
CaesarIA - Caesar III new open source remake | Neil79 | Retrogaming General Discussion | 2 | 17 April 2014 14:07 |
A remake/sequel of Moonstone is in the progress! | Ironclaw | Amiga scene | 13 | 22 July 2008 18:17 |
Trick Or Treat Remake - Work in Progress | ant512 | Amiga scene | 15 | 16 November 2004 17:25 |
|
|