1

Temat: Code-Cruncher & DJPacker

Guys,

i need a file packer which can handle multiple file segments and is able to load/depack automaticly code to $c000-$cfff+$d800+$fff...

i tried Code Cruncher 5 + DJ Packer... as my main code is running from $f000.. so i would like to pack file so it can be easily run by any dos or game dos...

i don't want to code a relocator etc... there must be an easier way... ;)

2

Odp: Code-Cruncher & DJPacker

Hmmm... what's wrong with CODE3 Cruncher?

It packs the following data-areas:
- $0480 - $06ff
- $0a00 - $cfff
- $d800 - $ffff
(if I recall correctly).

This should be enough, I think.

I Ty zostaniesz big endianem...

3

Odp: Code-Cruncher & DJPacker

how can i use code3? does it write to disc like v5?
what should i do when the packing is over? reboot?

4

Odp: Code-Cruncher & DJPacker

no.no...they do both crash after depacking venus.... aaarg...

5

Odp: Code-Cruncher & DJPacker

Code3 Cruncher uses 64kB of extended memory as temp-storage. After packing just reboot and then select the Linker. It will save packed prog as normal DOS file.

Note: this cruncher has to be booted under DOS which doesn't format RAMdisk.

For best results select step to 7 and offset to 3-4.

In C3C v. 3.0 step is 7 by default and you can't change its value.

Ostatnio edytowany przez miker (2006-01-29 17:12:40)

I Ty zostaniesz big endianem...

6

Odp: Code-Cruncher & DJPacker

Miker...i have posted latest build on the atariage thread... (the .obx is included in the zip) i don't know what i am doing wrong the code3 and code3 v5...

7

Odp: Code-Cruncher & DJPacker

Hi Heaven,

try this:

http://www.magmalu.com/files/cruncher.zip

i use it, and it works fine!

8

Odp: Code-Cruncher & DJPacker

i forgot to write the description :) run decrunch.bat, it crunches first the fonts.dta saving them on disk as fonts.pck, then look at decrunch.asm. It loads itself to $2000, packed data from $3000. To see the effect use the emulator's monitor launching decrunch.atr so decrunched fonts'd be at $4000, as was specified in bat file:
pucrunch -c0 -d -l0x4000 -fshort fonts.dta fonts.pck

hai capito tutto? ;)

9

Odp: Code-Cruncher & DJPacker

still some bugs... and emulator vs real hardware... grrr... ;)

btw... i am using this in Boinxx

* this is the depacker written by Fox/Taquart

; Uncompress data stored in the DEFLATE format.
;
; DEFLATE is a popular compression format, used e.g. in ZIP and GZIP archives,
; and the ZLIB library.  The original description of this format
; is available in RFC (Request for Comments) 1951 in the file
; ftp://www.ietf.org/rfc/rfc1951.txt.
; Both compressed and uncompressed data must completely fit in the memory.
; As the compressed data is read sequentially and only once, it is possible
; for the compressed and uncompressed data to overlap, i.e. the data being
; uncompressed can be stored in place of some compressed data which has been
; already read.  There is no general rule, but practically both data may
; overlap almost entirely, with the uncompressed data ending just a few
; bytes before the end of the compressed data.
; If you want to modify this code to support non-continuous memory areas
; for the output, you should note that the uncompressed data is used as
; a look-behind buffer, up to 32K.
; As the code is not self-modifying, it can be put in ROM.
; This source code is written in the 6502 assembly language,
; using syntax of xasm (http://xasm.atari.org).

10

Odp: Code-Cruncher & DJPacker

Heaven, you needs GUI for Deflater, who split file on part and it will pack

*- TeBe/Madteam
3x Atari 130XE, SDX, CPU 65816, 2x VBXE, 2x IDE Plus rev. C

11

Odp: Code-Cruncher & DJPacker

Try Flash Pack. When you presing Return with Control it adds ROM switching procedure and you can depack to RAM under ROM. But it needs buffer and you can't use INITs... Read the doc for details.

12

Odp: Code-Cruncher & DJPacker

but flashpack2.1 can not pack multi-segment files... so you can use it for each single segment which is imho the bad side of FP2.1... ;) or did i miss more? i can not remember that FP had an english doc...it was written before Foxy went to M$ ;);)

13

Odp: Code-Cruncher & DJPacker

FP2.1 refuses to pack Venus as well...all packers who can handle depacking under ROM can't start the Code at $f000 after depacking...

14

Odp: Code-Cruncher & DJPacker

xboot /p is the only way at the moment to make a runable "exe" of Venus...

15

Odp: Code-Cruncher & DJPacker

ok. works now...i have put a small routine into standard RAM and it now works...but sad that i need to do that...

16

Odp: Code-Cruncher & DJPacker

the interesting thing is that it works unpacked & flashpacked but not packed with code3... strange...strange...

17

Odp: Code-Cruncher & DJPacker

Hmm,
but I always use FP 2.1 to pack multi-segments into *one* packed segment. It works, as long as there is no init adress, just one run adress at the end...  but I guess thats not what you mean... you are surely talking of multi-segments with several inits after each segment - they cannot be packed with FP this way...

If the total length of a program (Superpacker) or the length of a single segment (DJ-Packer) is a problem, well I always use Fast-Packer first (packs segmentally, uses page 4 to depack) and when it got the program or segment shorter than 30-32kbytes, I use the Superpacker or DJ-PAcker (the one that uses page 5+6 to depack) to pack the program further...   Example: a Tron clone (forgot its name), before packing 279 single sectors, one segment and one run adress, cannot be packed with DJ (segment is too long) nor SP (program to long); packed it first with Fast-Packer to 165 sectors, then with DJ down to 121 sectors - the packed program works fine in the end...   greetings, Andreas Magenheimer.

18

Odp: Code-Cruncher & DJPacker

thanks for the info. maybe i was wrong. when i first tested fp it failed on some intro or game of mine maybe because i had ini or several ini/run adresses... so i thought it's for single segments only and the polish doc unfortunatly i can not understand... :)

19

Odp: Code-Cruncher & DJPacker

heaven napisał/a:

; Uncompress data stored in the DEFLATE format.

This is a good choice if you need high compression ratio and quick decompression.
The destination buffer must be continuous, so if you need the uncompressed data to be scattered in the memory, you need to run an additional simple routine that moves blocks in the memory. Numen, of course, contains such a routine. :)

heaven napisał/a:

FP2.1 refuses to pack Venus as well...

There are several problems with packing executables with embedded INIT routines:
* should the INITs be run while loading from disk (each part before INIT is decompressed separately; should the depacker be re-loaded after each part?) or while depacking (whole file is compressed) ?
* INIT routines are free to mess with the memory in an unknown (to the packer) way, therefore the packer does not know which memory remains available
* some INIT routines do system checking such as MEMLO or whether the loaded program is already installed - these checks should be run as early/quickly as possible
* in many cases INIT routines are small and doesn't compress very well if at all

Since I found no good solution, FP simply rejects executables with embedded INIT routines.
My experience is that INIT routines are especially useful for "loading" messages and these can be easily added to the already packed executable.

heaven napisał/a:

all packers who can handle depacking under ROM can't start the Code at $f000 after depacking...

Not true, FP can do that.

https://www.youtube.com/watch?v=jofNR_WkoCE

20

Odp: Code-Cruncher & DJPacker

Fox...so any ideas why Venus will not be run after depacking with FP? maybe i have an bug in my code??? this should be the latest build which does not run with FP...

http://www.atariage.com/forums/index.ph … p;id=47567

21

Odp: Code-Cruncher & DJPacker

or this? can't remember after messing around with the versions... http://www.atariage.com/forums/index.ph … p;id=47519

22

Odp: Code-Cruncher & DJPacker

oh...fox...btw... what about Numen 2 - reloaded? ;)