Giter VIP home page Giter VIP logo

libpietendo's Introduction

Heyo ๐Ÿ˜ ๐Ÿ‘‹๐Ÿป

My name is Jack, I'm a ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป software engineer & hacker.

My GitHub is used to host my hobby projects:

  • ๐Ÿ” Reverse engineering proprietary formats
  • ๐Ÿ›  Writing cross-platform developer tools

You'll find me programming in:

  • C++ / C
  • Python

I'm learning:

  • Rust
  • ๐Ÿ“ฑโŒš๏ธ Swift / iOS Development
  • Web APIs and related data models

Open Source Projects

Frameworks

  • libtoolchain - Library to ease the development of toolchain applications. (C++11)
  • libpietendo - Library for processing Nintendo file formats. (C++11)

Repackaged 3rd Party Frameworks

Applications

  • nstool - General purpose read/extract tool for Nintendo Switch file formats. (C++11)

libpietendo's People

Contributors

jakcron avatar sagumamugas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

libpietendo's Issues

[BUG] pie::hac::nca::ContentType enum has wrong values

About

As part of investigating jakcron/nstool#95, I discovered an error in the pie::hac::nca::ContentType enum.

In this commit where the code style was changed (7dae44a) pie::hac::nca::ContentType didn't survive the transition.

Program,
Meta,
Control,
Manual,
Data,
PublicData

Became:

ContentType_Program = 0,
ContentType_Meta = 2, // <- should be 1
ContentType_Control = 3, // <- should be 2
ContentType_Manual = 4, // <- should be 3
ContentType_Data = 5, // <- should be 4
ContentType_PublicData = 6 // <- should be 5

Requirements

  • Fix the enum typo

pie::hac::NsoHeader::fromBytes wrong flags test

mDataSegmentInfo used HeaderFlags_Ro* instead of HeaderFlags_Data*

mDataSegmentInfo.file_layout.offset = hdr->data.file_offset.unwrap();
mDataSegmentInfo.file_layout.size = hdr->data_file_size.unwrap();
mDataSegmentInfo.memory_layout.offset = hdr->data.memory_offset.unwrap();
mDataSegmentInfo.memory_layout.size = hdr->data.size.unwrap();
mDataSegmentInfo.is_compressed = hdr->flags.test((size_t)nso::HeaderFlags_RoCompress); // <-- HeaderFlags_DataCompress
mDataSegmentInfo.is_hashed = hdr->flags.test((size_t)nso::HeaderFlags_RoHash); // <-- HeaderFlags_DataHash
mDataSegmentInfo.hash = hdr->data_hash;

[Bug] No conversion from int to uint in BKTRSubsectionEncryptedStream

Hi! :)

When compiling with C++20 (also confirmed with C++17) I've come across this error that prevents compilation.

https://github.com/jakcron/libpietendo/blob/194b77d6ea9077dda6b03a79c593d2c1f2f7e9f2/src/hac/BKTRSubsectionEncryptedStream.cpp#L75C9-L75C9

Location

/src/hac/BKTRSubsectionEncryptedStream.cpp:75

int64_t end_offset = (j + 1 == subsection.header.entry_count) ? subsection.header.end_offset_bucket : subsection.entries[j + 1].offset;

Error message

libpietendo\src\hac\BKTRSubsectionEncryptedStream.cpp(75,137): error C2446: ':': no conversion from 'const tc::bn::le64<int64_t>' to 'const tc::bn::le64<uint64_t>'

no conversion from 'const tc::bn::le64<int64_t>' to 'const tc::bn::le64<uint64_t>'

Possible fix

int64_t end_offset = (j + 1 == subsection.header.entry_count) ? (int64_t) subsection.header.end_offset_bucket : subsection.entries[j + 1].offset;

Create File formats structures to use in nstool or wherever

I tried to create a GUI to preview the files nstool can read, but many of the process is done in nstool.
Maybe can be a good point move many of the process to libpietendo to allow to use in other projects.
The idea is create fileformat structures in libpietendo that read the structure of the files and then the program that use libpietendo use that structures.

Here can see the idea for the fileformat structures and here the use in nstools

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.