Giter VIP home page Giter VIP logo

ygofm-bgex's Introduction

Yu-Gi-Oh! Forbidden Memories Background Image Extractor

This is a utility designed to extract background images out of the game in DDS format.

Currently it only supports version SLUS-01411.

Currently it can only extract the basic background images found during the campaign mode.

TODO list

  • add version detection and support for other versions

  • maybe look into extracting other images and content

  • maybe add repacking support

How to use

  • Extract WA_MRG.MRG out of the disc image

  • In the OS shell launch the app with following arguments: YGOFM-BGEx WA_MRG.MRG BGIndex where BGIndex is the number of the background you wish to extract

  • If you wish to not untile the image, append 0 at the end, like this: YGOFM-BGEx WA_MRG.MRG BGIndex 0

How does it work

LBA calculation

The magic can be found within the calclba function.

The game stores its data in LBAs, meaning each data block is aligned to 0x800 bytes.

Backgrounds in WA_MRG.MRG start at LBA 0x21D5 for the US version of the game and may vary across regions.

These LBAs are hardcoded during compile time in the game executable, so it will differ per each region/variant of the game.

The function responsible for calculating LBAs for these background images can be found at offset 0x8002DF2C of the game executable.

Keep in mind that due to the odd way of calculating LBAs there are repeated images despite having different indicies.

Image conversion

Most of these images are stored in 256 color paletized format, with some being 16 colors.

PS1 palette is in RGB555 format, with the 15th bit being the "special transparency bit".

The tool converts them to a raw DDS ARGB image without any data loss.

ygofm-bgex's People

Contributors

xan1242 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ygofm-bgex's Issues

Is it possible to extract images from all 722 monsters?

Hello everything is fine? I found the tool very interesting and it has a very good algorithm!

I would like to know if it is possible to adapt this algorithm to extract the images of the 722 cards in the game.

I'm trying to create a free tool that extracts all information from any MOD and publishes it online automatically. I managed to extract all the relevant information (mergers, droplist, cards, etc). But I'm having a lot of trouble extracting the monster images as I'm new to this area. Would you help me? Thanks

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.