Author Topic: New Tool: Visual SAK  (Read 593 times)

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #15 on: March 11, 2018, 07:28:51 PM »
O boy, why every new game should use own compressing method ...

Anyway from the document it seems CT uses again LZSS as base, but quite modified: instead of Control on next 8 bits (1 byte), it uses a packets - grouped Control up to 63 bits. Regardless it may sound better (63 bits > 8 bit) it actually adds extra bytes for packets overhead so I really doubt CT get better compression then FF5 & FF6 ...

Quote
I would find it useful if I could load parts of a palette from different locations in a ROM, since Chrono Trigger handles weapon palettes that way, but I'm not sure how useful that would be overall.
You can do it now, but its a little bit tricky. Keep in mind that regardless how many colors an image uses you can manually set how many colors to read for palette. Lets say the 16 color palette is composed by two locations: Addr1, Addr2. Addr1 has first 7 colors, Addr2 has last 9 colors:
 - read 16 colors from Addr2 so we get 9 colors to be last. You might have to use Addr2 - 7*2 as address for palette read!!!
 - read 7 colors from Addr1

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #16 on: March 27, 2018, 04:20:40 AM »
Version 3.0 is out!!!
 - Internal engine rewritten! That change took me like 2-3 weeks, but is worth the time. Before I was using kind of Virtual Tile Engine. It was easy to use it to import things from game ROMS, but was slow. Now I use a 'double buffer', similar to what most of contemporary games do. Now drawing is FAST, no tear, no artifacts. That also allows me to easy export GFX
 - New feature: Export of Gfx (PNG only for now, other formats on demand)
 - Removed feature: Templates from 2.2. Now BPP is separated from compression (as intended in version 1). The main reason for this is that the list of Templates grows exponentially with increasing the supported BPP/compression formats.
 - Added new BPP: 2BPP (SNES)
 - Added new BPP: 8bpp (PC). PC yes, I was surprised that a SNES game would use it, but there are some like Wolfenstein 3D
 - Added new compression: LZSS-FF5, a modification of LZSS used in FF5 SNES
 - Added new compression: LZSS-FF6, a modification of LZSS used in FF6 SNES
 - Increased: The length of Names from 20 to 30 characters. Now you can be more descriptive  :laugh:

*Download from the first post.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #17 on: March 27, 2018, 10:31:02 AM »
I want to keep previous post clean, that's why I'm starting a new post.

Proof of concept:

That picture demonstrate FF5 compression. I think its safe to say that no other tool can provide it :)


Than is demonstration of FF6 compression. Could you help me with the correct palette for this image? I was trying to follow Madsiur's tutorial, but provided address wasn't giving the correct colors :(


That is an interesting image. If somebody had told me that in a SNES game I will see a regular PC 8 bit image, I would probably laugh, but here it is :D
« Last Edit: March 27, 2018, 10:54:35 AM by Squall »

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: New Tool: Visual SAK
« Reply #18 on: March 29, 2018, 05:35:29 PM »
Than is demonstration of FF6 compression. Could you help me with the correct palette for this image? I was trying to follow Madsiur's tutorial, but provided address wasn't giving the correct colors.

This image can use multiple palettes and none will make all graphics look good. The one used in my tutorial is at $C20B91, starting with white ($FE7F so color $7FFE). This picture show the 6th color being selected, hence your problem likely. This should make the shield and hand block look good at least. Good work btw!
« Last Edit: March 29, 2018, 05:45:14 PM by Madsiur »

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #19 on: March 30, 2018, 05:40:40 AM »
Ahh, I was afraid it would use multi-palettes, but that is fine as far as the shield is correct :)

Good work btw!
Thank you!
Form what I have planned as compression, only Chrono Trigger SNES variant of LZSS is left for implementation. Thanks to Mauron's help at least I understand it, just need to code it :D
As for BPP formats ... I'm doing experiments with non 8x8 tile formats. FF5 for example uses 8x12 for fonts. I'm sure many other games contain custom MxN format, so that will be interesting if I manage to pull it (you enter M, N, BPP and correct image appear).

After that I plan to focus more on the interface:
 - more operations with the Palette, like Load/Save/Reverse
 - more operation on the project list itself - hot keys, moving items, sorting,...
 - entering the addresses in an ASM friendly format. For example $C10000 instead of file-offset format $10000, to take in an account the presence of a header.
 - producing a document with a 'map' of found Gfx

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #20 on: April 18, 2018, 11:36:45 AM »
Version 3.1 is out!!!
 - New feature: Import of a palette from zSnes savestate.
 - Added new BPP: 8BPP (SNES Mode 7). No planes. In mode 7 a tile takes 128 bites - because in the memory tiles are interwoven with the tile map
 - Added new BPP: 8bpp (SNES Mode 7 - II) same as above except it contain only the tiles (64 bytes each)
 - Added new BPP: 8bpp (SNES Mode 3) - each tile is 64 bytes, but each pixels is divided in 8 planes according to the SNES model of planes
 - Added new Compression: LZSS-CT, a modification of LZSS used in Chrono Trigger SNES

*Download from the first post.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Tool: Visual SAK
« Reply #21 on: April 18, 2018, 05:18:50 PM »
Big thanks to Mauron for the help with CT compression!

Proof of concept:

Finally, CT decompression is done. As I said earlier, its quite modified version of LZSS. It is interesting to me that CT uses compression a lot. Even palettes were compressed.


SNES has so many variations of 8bpp ... Mode 3 one seems most used for static images like title screen. So what is Mode 3 8bpp - a planar (8 planes) format, where planes have specific for SNES order in the memory.

Mode 3 also support two extra 8bpp models - Direct Color and index. If you know a game that uses some of these 2 models, please share. Even better will be if you can make a zSNES save state of it :)