Giter Club home page Giter Club logo

rnc_propack_source's Introduction

rnc_propack_source

Decompiled source of the famous RNC ProPack compression tool

Usage

  • Unpack: <u> <infile.bin> [outfile.bin] [-i=hex_offset_to_read_from] [-k=hex_key_if_protected]
  • Search: <s> <infile.bin>
  • Seach&Extract: <e> <infile.bin>
  • Pack: <p> <infile.bin> [outfile.bin] <-m=1|2> [-k=hex_key_to_protect]

Specific games

  • Earthworm Jim, Alladdin: must use -d=0x4000 for a correct packed data result.

rnc_propack_source's People

Contributors

dalton-tulou avatar hinxx avatar issotm avatar lab313ru avatar xproger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rnc_propack_source's Issues

How does "e" mode work?

Firstly, thanks for this, am using it to extract some RNC-compressed files in Space Station Silicon Valley (N64 ROM).

Some of the files appear to be compressed twice, i.e.

$ ./tools/rnc_propack_source/rnc_propack s bin/rnc_618480.bin
-= RNC ProPackED v1.4 [by Lab 313] (11/04/2018) =-
-----------------------------
RNC archive found: 0x000000 (004183/004305 bytes)

After extracting bin/rnc_618480.bin to assets/bin/rnc_618480.bin, I can see:

mark@DESKTOP-AOUBO9E:~/sssv$ ./tools/rnc_propack_source/rnc_propack s assets/bin/rnc_618480.bin
-= RNC ProPackED v1.4 [by Lab 313] (11/04/2018) =-
-----------------------------
RNC archive found: 0x000001 (000085/000160 bytes)
RNC archive found: 0x000057 (000047/003072 bytes)
RNC archive found: 0x000087 (000839/050440 bytes)
RNC archive found: 0x0003cf (001172/004262 bytes)
RNC archive found: 0x000864 (000141/000156 bytes)
RNC archive found: 0x0008f2 (000087/000114 bytes)
RNC archive found: 0x00094a (000026/000002 bytes)
RNC archive found: 0x000965 (000036/000010 bytes)
RNC archive found: 0x00098a (000026/000002 bytes)
RNC archive found: 0x0009a5 (000050/000024 bytes)
RNC archive found: 0x0009d8 (001634/006348 bytes)
RNC archive found: 0x00103b (000077/000086 bytes)
RNC archive found: 0x001089 (000033/002048 bytes)
RNC archive found: 0x0010ab (000036/000010 bytes)

However, I don't understand how to use the e functionality (had a quick glance at main.c and doesn't look like its fully implemented?)

mark@DESKTOP-AOUBO9E:~/sssv$ ./tools/rnc_propack_source/rnc_propack e assets/bin/rnc_618480.bin
-= RNC ProPackED v1.4 [by Lab 313] (11/04/2018) =-
-----------------------------
Wrong command line specified!

Obviously I can feed each offset from the search into unpack via -i, but that's extra steps that I'd like to avoid if possible ;)

EDIT

Realised I was using the binary that came in the repo rather than compiling main.c myself... think you can close this!

Mode 2 packing error

Тестирование проводилось под Windows 10 x64
Компиляция MinGw64 командой "gcc main.c"

1.При unpack программа падала, искал место на котором падала нашел что это функция read_buf а точнее на вызове memmove, сама read_buf вызывалась в read_source_byte вот на этой строке
read_buf(&v->mem1[size_to_read], v->input, &v->input_offset, left_size);
2.Удалось запустить unpack на linux, но на linux не отработал pack (зато под Windows 10 pack работал), ошибка Segmentation fault под Linux, под Windows работает только метод 1, метод 2 не работает
3.Распаковав на linux, запаковал на Windows вставил в игру по тому же адресу и увидел артефакты в графике.
4.Сравнил оригинал (я приложил оригинал NJC.HEX - это RNC архив из игры Earthworm Jim взятый по адресу 0x20A704) и запакованный вариант методом 1, у оригинала размер 12112 байт, у запакованного программой 12085 байт.

NewJunkCity_0x20A704.zip

LICENSING

I'd like to use this in a project, (as opposed to dernc.c from http://www.yoda.arachsys.com/dk/utils.html ) since this seems more accurate and supports method 1 and 2. I'm wondering about the legality of doing that? is this considered public domain or something else?

Thanks

Original/new size count is not correct

Hi, I've tested the packing functionality, and the actual size of the input file, does not equal the statistics, printed by program.
Example attached below.
defect_file_sizes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.