News: 11 March 2016 - Forum Rules

Author Topic: Help with unpacking L77 file  (Read 1433 times)

PrayashLand

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Help with unpacking L77 file
« on: December 24, 2020, 05:30:21 am »
Hi!
I'm currently translating  "Motto! Stitch! DS: Rhythm de Rakugaki Daisakusen ♪" for the nintendo ds and all of the image files are packed in .l77 format. I put some images into batchlz77 to uncompress but I didn't get an actual image file once it was one. I put one of the decompressed files into crystaltile 2 to look at the code and saw that there are actually 19 images compressed within that .L77 file! Does anyone know how to extract, edit and recompress these images? Thanks!

Everything

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Help with unpacking L77 file
« Reply #1 on: December 24, 2020, 10:45:29 am »
What is the image format? Have you tried editing the decompressed file directly, then recompressing and copying it back into the ROM?

You also can try opening the decompressed file in a hex editor and manually splitting up the 19 images into separate files. The decompressed data might have some sort of header specifying where one image ends and the next one begins. If that works, you should be able to manually recombine the files back together when you're done editing and recompress the whole thing.

[Unknown]

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
    • PPSSPP
Re: Help with unpacking L77 file
« Reply #2 on: December 24, 2020, 12:14:53 pm »
It's likely a tileset with a separate tilemap of some kind somewhere.  This is very common for tile-based graphics: the images are broken up into 8x8 tiles, and all those tiles are put into a tileset to draw images with.

For example, in Tomato Adventure (GBA), the "Game Over" screen has different text depending on if you have a save or not, and has a little animation of the main character swimming in ketchup.  All the tiles for both versions and the animation are together in the same tileset.

In that case, and likely in your case, the game is just decompressing the lz77 data into VRAM tileset data at a certain address.  Grouping multiple tiles together compresses better, and means less code for loading the tiles.

If all the tiles for the image you want to change are there, and none are reused by any other images, then you can just change them (leaving other tiles as they were) and it should work fine.

-[Unknown]

PrayashLand

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: Help with unpacking L77 file
« Reply #3 on: December 24, 2020, 02:59:49 pm »
What is the image format? Have you tried editing the decompressed file directly, then recompressing and copying it back into the ROM?

You also can try opening the decompressed file in a hex editor and manually splitting up the 19 images into separate files. The decompressed data might have some sort of header specifying where one image ends and the next one begins. If that works, you should be able to manually recombine the files back together when you're done editing and recompress the whole thing.
I have no idea how to edit the file. If you mean changing values in a hex editor no I didn’t bc I didn’t wanna break the game. I have no idea what filetype the pictures are because they’re not stated. It basically just says menu button 1 and then has a break and then lists menu button 2 etc all the way through 19. Would you be willing to download the decompressed files from me to see if you know where to go from where I’m at?

PrayashLand

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: Help with unpacking L77 file
« Reply #4 on: December 24, 2020, 03:17:00 pm »
It's likely a tileset with a separate tilemap of some kind somewhere.  This is very common for tile-based graphics: the images are broken up into 8x8 tiles, and all those tiles are put into a tileset to draw images with.

For example, in Tomato Adventure (GBA), the "Game Over" screen has different text depending on if you have a save or not, and has a little animation of the main character swimming in ketchup.  All the tiles for both versions and the animation are together in the same tileset.

In that case, and likely in your case, the game is just decompressing the lz77 data into VRAM tileset data at a certain address.  Grouping multiple tiles together compresses better, and means less code for loading the tiles.

If all the tiles for the image you want to change are there, and none are reused by any other images, then you can just change them (leaving other tiles as they were) and it should work fine.

-[Unknown]
I have no idea how to actually extract the image files from the archive I just know of their existence bc I decompressed the l77. Do you have any ideas on how to extract the images :( the file type is not specified when I open the decomp. In crystal tile though :(