+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Ogre Battle (PSX) Graphics Hacking; Tips on how to handle palettes?
Pages: 1 [2] 3 4
Author Topic: Ogre Battle (PSX) Graphics Hacking; Tips on how to handle palettes?  (Read 2 times)
FaustWolf
Guest
« Reply #15 on: December 04, 2007, 11:23:24 am »

Ah, so I'd need to find out where VRAM is stored within the uncompressed savestate, and carve it out of the savestate then. I'll see if I can do that. But anyway, thanks for pointing out vSNES! It was truly a lifesaver in this case.
sb iq
Guest
« Reply #16 on: December 04, 2007, 08:55:31 pm »

Sorry to intrude on this topic, but a year ago I was working on trying to get Tile Molester to load the CLUTs in Tomb Raider 2. Even though I found the CLUT I could not get Tile Molester (or any other program) to load it properly. I am really busy right now, but I would like to resume working on that in January/February. The textures in Tomb Raider 1 and Tomb Raider 2 are 8 bpp.

Quote from: creaothceann on December 03, 2007, 04:54:10 pm
PVV_0.1.rar

input: uncompressed VRAM dumps
output: ZST savestates

When you say "uncompressed VRAM dumps" do you mean a snapshot of what is in the VRAM like a .bmp file, or do you mean an uncompressed epsxe savestate? How do I uncompress an epsxe savestate?
« Last Edit: December 04, 2007, 09:00:34 pm by sb iq »
creaothceann
Guest
« Reply #17 on: December 05, 2007, 09:15:12 am »

I mean a file of 1024 * 2 * 512 bytes, containing the VRAM (1024 x 512 pixels in 15bpp).
There's an example file included with Agemo's VRAM Viewer.

The savestates can be decompressed via WinRAR and similar programs; dunno if the file is zipped or RARed.

I could probably add RAR support with an external library, and take a closer look at ePSXe savestates. The question is, would that be useful to anyone?
sb iq
Guest
« Reply #18 on: December 05, 2007, 09:19:22 pm »

I am still not clear on this. In the Agemo VRAM viewer he (she?) included a VRAM dump of the FF8 title screen. How exactly did they get this? And where do I unzip these bpl files to get PVV 0.1 to work?

Also, is there an easy way to turn raw data into a ZSNES savestate? I want to use Tile Molester to load the textures from the PC version of Tomb Raider with the right colors for comparison, and I have the palette for that in the form of raw data.
FaustWolf
Guest
« Reply #19 on: December 05, 2007, 09:43:35 pm »

To get a VRAM dump sb iq, one can do the following:

1.) Make a savestate in epsxe (F1 key if I remember correctly)
2.) You should end up with a file named something like SLUS_aaa.bb.ccc
3.) Replace the last three digits ("ccc" in this example) with the .rar extension. Provided you have WinRar installed on your PC, this should change the compressed savestate into a .rar archive.
4.) Unzip the .rar archive's contents into the same directory as Agemo's VRAM viewer. Then rename that newly-uncompressed file to VRAM.bin
5.) Double-click Agemo's executable, and the uncompressed savestate should load. Luckily, Agemo's viewer knows exactly where the VRAM is in the uncompressed savestate, and that's all it shows -- no extraneous data.

However, that's just where the fun begins. Agemo's viewer is difficult to work with at first; here's the tutorial I learned from: http://www.dragon-tear.net/forum/showpost.php?p=188751&postcount=23

That should get you started, whenever you get around to exploring this program. If you have any questions about using Agemo's viewer, I can field them here or via PM.

You'll need an actual ZSNES savestate handy if you want to try the method I reported above; if you don't have one, I can just link to one here I suppose.

Also sb iq, what exactly are you trying to do with the Tomb Raider textures? It's quite possible you can get Agemo's viewer to color them for you, and you can just take a screencap of the result -- the only reason I'm going through this bizarre process with Ogre Battle is that I'm trying to rip copious amounts of sprites with various different palettes applied to each. Luckily, when you're working with 3D models, all you have to worry about is a single texture for each model you're investigating. But then again, I'm totally unfamiliar with the Tomb Raider franchise, so there may be extenuating circumstances in your case.
« Last Edit: December 06, 2007, 12:15:47 am by FaustWolf »
sb iq
Guest
« Reply #20 on: December 05, 2007, 09:55:23 pm »

I am trying to see if it is possible to port texture hacks from the early PC Tomb Raider games to their PSX counterparts, since modern day OSes like XP and Vista are not too friendly with those old games. I also see this as my start in PSX graphics hacking, since apparently there are barely any PSX graphics hacks out there (check the RHDN database, I can only find one at this time).

This may be off topic, but since you mentioned it, the Tomb Raider games use a huge texture map that are applied to all the polygons. In the PC version, these textures refer to one 256 color palette. In the PSX version, different textures in this texture map has its own CLUT, in essence meaning there are lots and lots of sub-palettes.
creaothceann
Guest
« Reply #21 on: December 05, 2007, 10:03:52 pm »

Quote from: sb  iq on December 05, 2007, 09:19:22 pm
In the Agemo VRAM viewer he (she?) included a VRAM dump of the FF8 title screen. How exactly did they get this?

Probably extracted from a savestate. You could also use pSX: show VRAM (F11), save a snapshot (F12, BMP format). The image data of that BMP file (begins at offset 72) is the VRAM.


Quote from: sb  iq on December 05, 2007, 09:19:22 pm
And where do I unzip these bpl files to get PVV 0.1 to work?

Any of these locations:
 - application directory
 - current directory
 - System directory
 - Windows direcory
 - directories from PATH environment variable


Quote from: sb  iq on December 05, 2007, 09:19:22 pm
Also, is there an easy way to turn raw data into a ZSNES savestate? I want to use Tile Molester to load the textures from the PC version of Tomb Raider with the right colors for comparison, and I have the palette for that in the form of raw data.

As already mentioned, you can use vSNES to load/edit/save a 256-color palette (for example in 15 bpp, 512 byte-format) and save that to a ZST savestate to be loaded by TileMolester.


EDIT: I'll continue working on the program, but not now... still drugged from dentist visit. -_-
« Last Edit: December 06, 2007, 04:22:09 pm by creaothceann »
creaothceann
Guest
« Reply #22 on: December 07, 2007, 10:44:11 pm »

v0.2 (pre-release)

Decoding VRAM and applying the selected palette is still missing, and INI file support too, but I'll add that tomorrow.
creaothceann
Guest
« Reply #23 on: December 08, 2007, 05:16:15 pm »

PVV v0.2

I guess PVV could now considered as an alternative to Agemo's VRAM viewer. The only thing it can't do is decoding "24-bit" and "24-bit MDEC" (video) graphics, but I doubt you'll need that. Usage should be a bit easier (mouse control, no need to manually decompress savestates).
FaustWolf
Guest
« Reply #24 on: December 10, 2007, 04:43:11 pm »

Okay creaothceann, I've just now tried out your new-and-improved version of PVV, and I can find only one word to describe it:

Wow.

You've just saved this hacker hours of work, that's for sure. This is hands-down the definitive way to build a set of palettes for PlayStation games!



Incidentally, I've just now noticed that Ogre Battle, at least, stores its palettes differently from savestate to savestate; they're within the same general region of VRAM, but the rows of colors are structured uniquely in each savestate I've loaded so far (some of which were taken in the same "situation" to test whether the differences occur solely due to being in versus out of battle). This is curious, and I'll have to do some more investigation before I can determine whether the palettes are still set up in such a way that it's possible to build a set from one epsxe savestate and apply that set of 16x16 palettes to all the sprites. I'm just thinking aloud for now, but others may find this phenomenon interesting.
« Last Edit: December 10, 2007, 04:56:02 pm by FaustWolf »
creaothceann
Guest
« Reply #25 on: December 10, 2007, 05:47:11 pm »

No problem. Smiley Let me know if you have suggestions (like an option to let the program maximize at program start, or having the two scrollboxes aligned vertically instead of horizontally).

In theory it should be possible to find out the palette locations and to which data they're applied to - the info has to be stored somewhere. This might be in one of RHDN's PSX docs, but I haven't looked yet. If the info is in VRAM then it might be easy to implement.
FaustWolf
Guest
« Reply #26 on: December 10, 2007, 06:16:39 pm »

The program interface is extremely user-friendly. Anyone who's tried out Agemo's viewer will prefer PVV, I imagine. Once the semester ends in a few days I'll have time to look through the PSX docs, and I'll see if I can apply that info to Ogre Battle if it turns out that it's impossible to get a universally-applicable set of palettes from a single VRAM dump. It will probably work out okay for the 4bpp sprites, though I'm unsure about the few 8bpp images that are on the game disc.
sb iq
Guest
« Reply #27 on: December 15, 2007, 06:28:16 pm »

Pardon my ignorance, as I am way too busy to review my hacking notes and test stuff out right now (moving to a new city, and salvaging files from a broken computer).

Could I convert a PSX palette/CLUT into a ZSNES savestate, and then use vSNES to convert that ZSNES savestate into a JASC Paint Shop Pro palette (a .pal file)?
creaothceann
Guest
« Reply #28 on: December 15, 2007, 07:36:40 pm »

Sure, if the CLUT has <= 256 colors.

Or you just load the file into PVV and save it directly to a JASC palette.
sb iq
Guest
« Reply #29 on: December 16, 2007, 01:00:06 am »

So if I wanted to extract the CLUT from an epsxe savestate, under the "image" box would I select "select palette", select what I believe to be the CLUT in a green box, and then under the "palette" box hit "save..." and save it as a .zst, .pal, etc.?

Here is a snapshot of the VRAM when running Tomb Raider 1.



Am I correct in assuming that what I have surrounded with green spray paint in the picture below is the CLUT?



I actually extracted that area as raw data via a hex editor. How exactly do I make vSNES convert raw data into a .ZST savestate or a JASC .pal file? What makes this complicated is that it is 32,768 bytes.
« Last Edit: December 16, 2007, 01:20:32 am by sb iq »
Pages: 1 [2] 3 4  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC