Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Raccoon Sam

Pages: 1 [2] 3 4 ... 9
16
Map Gab / Re: Umihara Kawase
« on: April 23, 2013, 02:14:20 am »
The player sprites are, coincidentally, stored in a different format far more easily readable/rippable than any other sprite! The player's sprites are also alone in a different folder. :)

But, let the testing begin! I honestly can't thank you enough. Good job! I'll keep you informed :)


EDIT: Well, I tried the ripper...


...and the output is 100% ACCURATE! Fantastic job, mechaskrom!! We're a dream team!  8) 8) 8)

Now, to dwell on the maps. Expect results... very soon :>


EDIT 2: Hrm. Well, I've got a good framework on the maps, the sprite/starting positions are done, water level has been marked, but I can't help but to ponder—how should the final output be presented?
  • Static, unanimated PNG maps with markings like which way the conveyors go, how the platforms behave, how the water level acts (static or tide). Problem: no animation.
  • Animated GIF maps with animated conveyors and platforms. Problem: no proper rendering of water and possible enemy/sprite markings.
  • HTML pages of maps with several layers: an unmarked PNG with just the level on the back and an animated GIF consisting of just the sprites/starting position/conveyors on the front. I could animate the moving platforms too, and clicking a door could link to the corresponding field. Problem: Would require a decent browser and would be possibly heavy.

17
Map Gab / Re: Umihara Kawase
« on: April 18, 2013, 07:33:40 am »
Wow! Looking great! Also, glad to see you're interested! Regarding your questions:

Quote
Spriteblocks always use palette 0 you say, so what's the point of PALAM if it can be higher then 1? I think I'm missing something here. Why can a bin-file have multiple palettes if only one is used for all spriteblocks?
Sorry, should've been more thorough there. For example, the snail's PALAM is 2. There are two kinds of snails in the game, blue and brown. The palettes in the BIN are for a blue snail and a brown snail. A sprite sheet should be exported PALAM times, one sheet for each palette.

Quote
How do you want to specify the input to the program? One file or one folder with files? Running the program for every bin-file seems tedious so it perhaps is better to give it a folder?
Well, the level exporter works one file at a time, too, so I guess that would be better. I made a batch script to handle all the ZSTs, so I guess doing so for the BINs would work too. :)

Quote
How do you want the output from the program?
Your attachment was perfect. The strip should be transparent in the final version though. I'd go for the 'all-sprites-in-one-PNG'-approach.

Also, yes, some of the later levels are upside-down copies of the first ones. Also one that's exactly the same, but with conveyors going the opposite direction. :)

Thank you for your kindness.

18
Map Gab / Re: Umihara Kawase
« on: April 17, 2013, 01:33:04 am »
Thank you for your kind words. I don't consider myself an expert hacker though, as pretty much every hacking expedition I dwell into is pretty much trial and error. I screw things up on purpose, see what that changes and write my notes based on the observations. Though my documents prove useful, I think the real wizard here is mechaskrom. After all, without him, all we'd have is a nice recipe but no cake. :)

EDIT: Well hello there!

19
Map Gab / Re: Umihara Kawase
« on: April 16, 2013, 11:15:41 am »
Well, I was going to test adding sprites with my free scroll patch, but after laying the screenshots over the map to get the positions and getting ready to paste the real sprites on them, I realized that there are no rips of Umihara Kawase sprites, excluding the player sprite! I can't rip them manually myself because the current SNES9x emulates the game incorrectly, and I honestly don't like ZSNES.

So, I though, why not stab two flies in one hit and get rips from each sprite in the game, for the benefit of the collective and to apply fresh clean sprites onto the maps? Here's my plan:

Umihara Kawase Shun: Second Edition Kanzenban for the DS is essentially a 3-in-1 game that also includes the SNES Umihara Kawase game. Since the DS has a filesystem of its own, by decompressing all of the game's files you can access them as if they were real folders and files in Windows Explorer/Finder.
This is particularly exciting because all of the files in the 'sfc' folder are actually the files the SNES game actually uses. You can, for example, search any of the files in the 'sfc/map/' from the original SNES ROM and find the level data. Some data has been re-encoded losslessly, but it's pretty much the same data.
So, instead of searching for the graphics individually in one giant chunk of a file (the SNES ROM), I looked into the 'sfc/obj/' folder and found files of each sprite set in the game. The files also contain palette and tilemap info, so one program that does exactly what I've explained below could easily spew out every single sprite in the game!

.BIN file structure:
All BINs have a $18 byte header that defines eight things:
1. Where the block array begins [BLKADDR, 4 bytes]
2. Where the sprite definition begins [SPRADDR, 4 bytes]
3. Where the palette info begins [PALADDR, 4 bytes]
4. Where the graphics data begins [GFXADDR, 4 bytes]
5. Amount of blocks [BLKAM, 2 bytes]
6. Amount of sprites [SPRAM, 2 bytes]
7. Amount of palettes [PALAM, 2 bytes]
8. Amount of tiles in total [TOTAL, 2 bytes]

Let's take U3_KNG.bin, which is the Goldfish enemy's sprite file. First $18 bytes with appropriate annotations are below:

addr.+------------------------
     | BLKADDR____ SPRADDR____
$000 | 18 00 00 00 88 00 00 00
     +
     | PALADDR____ GFXADDR____
$008 | A0 00 00 00 C0 00 00 00
     +
     | BLKAM SPRAM PALAM TOTAL
$010 | 0E 00 05 00 01 00 40 00
-----+------------------------


• Let's dive into the first thing, BLKADDR. Sprites are built from blocks and one block is 8 bytes. This is the address where the 8-byte block array begins. The program reads the bytes backwards so it gets the correct address, which is 0x00000018.
• The second thing, SPRADDR is the offset where the program starts reading the info of what blocks to use to build a sprite. This time it's at 0x00000088.
• Third thing, PALADDR is self-explanatory. Where the Palette data begins. In this case, from 0x000000A0. Palettes are read the same way as the SNES ones I explained earlier in this thread, 1555 BGR.
• Fourth thing, GFXADDR is also pretty obvious; where the graphics data begins. This time 0x000000C0. Format is 4bpp linear, reverse order.

• Fifth thing, BLKAM is 0x000E. What this means is how many blocks there are in total. This time, 0x000E. Also, since one block is 8 bytes, you now know that the block data starts from 0x00000088 and is 112 bytes big (because BLKAM * 8 = $70).
• Sixth thing, SPRAM is 0x0005. What this means is exactly how many sprites are exported in the end. This time, 0x0005. It takes four bytes to define a sprite, so you now know that the sprite data begins from 0x00000088 and is 20 bytes big (because SPRAM * 4 = $14).
• Seventh thing, PALAM, is again pretty clear. Usually sprites have one or two palettes, but in this case it's 0x0001. One palette is 32, or, $20 bytes. There's one palette this time so obviously it takes only 32 bytes as is.
• The eighth thing serves little purpose. It just tells us how many tiles there are in total. This time 64, or, $40.

So, after the header, we're in address 0x018. This is where the blocks are listed, I've written them down for easy readability and added annotations:


addr.+-xx XX yy YY tt pp BP UU-+--NR--.
$018 | F3 FF F6 FF 00 00 60 00 | 0000 |
$020 | F3 FF 06 00 08 00 50 00 | 0100 |
$028 | FA FF EE FF 18 00 00 00 | 0200 |
$030 | F2 FF F6 FF 0C 00 60 00 | 0300 |
$038 | F2 FF 06 00 14 00 50 00 | 0400 |
$040 | FA FF EE FF 25 00 00 00 | 0500 |
$048 | F2 FF F6 FF 19 00 60 00 | 0600 |
$050 | F2 FF 06 00 21 00 50 00 | 0700 |
$058 | FA FF EE FF 32 00 00 00 | 0800 |
$060 | F2 FF F6 FF 26 00 60 00 | 0900 |
$068 | F2 FF 06 00 2E 00 50 00 | 0A00 |
$070 | FA FF EE FF 3F 00 00 00 | 0B00 |
$078 | F2 FF F6 FF 33 00 60 00 | 0C00 |
$080 | F2 FF 06 00 3B 00 50 00 | 0D00 |
-----+-------------------------+------'


I'll explain each of the eight bytes here, using the first block an example.
xx XX = X position of block, two bytes, read backwards, so in this case it would be $FFF3. See this grid for reference.
yy YY = Y position of block, two bytes, read backwards, so in this case it would be $FFF6.
tt pp = tile to use and its property†. In this case it would be tile 00 with property 00.
BP = Block type‡ and Palette to use for the block. The palette is always 0 so I don't see how this would be so useful.
UU = Unused.
NR = Block Number. Just for reference! This is not in the ROM, I just put it to the right of the table to help visualize what block we're in right now. You'll need to know this later. From the first block definition it's just counting upwards from 00 00, bytes backwards.

†: property byte is kind of funny. Of its 8 bits, only the first two are used. vhUU UUUU, where v means vertical flip of block's tiles and h horizontal flip, respectively (and U=unused).

‡: There are twelve block types. They essentially tell how the block is made, or, arrange a predetermined amount of tiles to a certain arrangement to form the block. See this for reference. $C_, $D_, $E_ and $F_ are unused.

Now, if the program would read the data, it would now have the information of how many blocks there are in total, how to form the correct blocks and where to put them. However, this would lead into all blocks being on top of each other, forming one sprite-cake. The next bytes, SPRADDR tells where to snip them apart, or, how many blocks build a sprite. Again, I've formatted and annotated the data for easy understanding.


addr.+ AMONT FROMB-.
$088 | 02 00 00 00 |
$08C | 03 00 02 00 |
$090 | 03 00 05 00 |
$094 | 03 00 08 00 |
$098 | 03 00 0B 00 |
-----+-------------'


Because SPRAM is $0005, we know that this file defines only five sprites. It takes four bytes to define a sprite an again, these two-byte combos are read backwards.
AMONT = Amount of blocks this sprite is built from...
FROMB = ...when counting from this Block Number.

In this case, it would be like this:
• Sprite one is two blocks: 0000 and 0100.
• Sprite two is three blocks: 0200, 0300 and 0400.
• Sprite three is three blocks: 0500, 0600 and 0700.
• Sprite four is three blocks: 0800, 0900, 0A00.
• Sprite five is three blocks: 0B00, 0C00, 0D00

And that's it. Load next file and repeat. I did this informational GIF that should help understand what's happening in the sprite creation. If you have a chance, view it frame by frame. Basically it's just "Get X, get Y, get tile, check if flips, use correct block type"

Wow, big post, probably not as clear as I want it to be... I'm tired @_@. Also, apologies again to be that guy who can't do anything without a programmer. I just hope my general plan is acceptable. I can always fall back to ZSNES to get the sprites I need but I thought that this would be great too :G

Here's a link to all the BINs in a ZIP

But yeah, concentrating on getting all 57 ZSTs now. :3
DONE. Check 'em out, the raw files are ready for ogling here. I'm having problems with Dropbox sharing right now so just change the 00.zst to 36.zst or anything.zst to view the map.
Another interesting thing, there are 57 files in the MAP folder of the DS version, though there are only 48 accessible maps in the game. Unused levels, mayhaps?

20
Map Gab / Re: Umihara Kawase
« on: April 15, 2013, 01:19:04 am »
Wow, I'm stunned!  :o
The program works exactly as I intended! Using a mono command line tool on Mac for the first time proved no challenge either. Here's level 57.

That's 100% accurate. Wow!!

Regarding your PM: I have not located the player start/sprite coordinate tables. I know where the enemy/sprite tilemaps are, like, what tiles their frames are built of, but that's all.
The physmap tables include a "spawn safe-area"-tile, maybe that could be incorporated to the viewer one day as well.

Also, a big thanks for the interest in a full editor, but during these few years I've dwelled into the level format I am now confident that to understand the compression one must inevitably know 658c16 Assembly. I know where the decompression routine is, I know where the level data is, I know where the uncompressed level data is in the RAM. I just don't know for the life of me what happens in between. How does the game decompress the level data from the ROM to the RAM? Argh!

But, regardless, wow. You've done an outstanding job. I'll be adding the sprites/water level/starting position as soon as I've got all the stuff I need :3

21
Map Gab / Re: Umihara Kawase
« on: April 09, 2013, 01:44:50 am »
Fantastic!
And, oh, I do have Mono installed. It's just that I've never used Mono command line tools before.
I know how to use command line tools, sure, but with Mono, I've always just right-clicked the EXE and chosen "open with... Mono" until a window pops up. All Mono apps I've used have a GUI, you see.

EDIT: If you wish to contact me more directly, I'm available on Facebook and occasionally log onto AIM (my screen name is Raccoon Sam C) or MSN Messenger (raccoonsam@hotmail.com)

EDIT 2: I've now ripped the preliminary sprite maps of the first $10 levels. Turns out my free scroll fix isn't as perfect as I hoped but gets the job done, for some reason some levels are just a tad trickier than the ones where you start from bottom left.

22
Map Gab / Re: Umihara Kawase
« on: April 08, 2013, 11:43:44 am »
Thanks for your interest! The game is, indeed very fun.
I have tried to crack the level format numerous times. I've made some progress and I can pin-point where the compressed level data is but still, a full level editor is far, far away.

Also, that sounds great, but I'm a Mac user and can, to my knowledge, only run .NET applications with a GUI through Mono.
Were my instruction clear enough? I can elaborate on them if you feel I should. Here a ZST of Field 00 if you wish to analyse it further.

EDIT: I was partially successful in hacking the free scroll feature to the game. It works perfectly in levels that you begin from the lower left side of the screen but only partially in others.

23
Map Gab / Re: Umihara Kawase
« on: April 05, 2013, 09:21:22 am »
"I aim to post one map per day."
wow.

Long story short, rise from your grave. I've done some analysis on the level format, and it seems to be a some kind of LZSS'd string of both, the physical tile definitions and tiles to print after each other with no indicator where either ends or begins. Very tedious. Digging deeper would be a waste of time, because the goal here is not to edit the levels (maybe one day ;_;) but to export the tilemaps. How, you ask?

Well, I'm confident a simple program would do the trick. Having no practically no programming skill, I'll pitch you programmers out there a plan.
First off, check the map I made out:



Then, check out this data in a ZST of Field 00, $2C13–$4C13, displayed in Tile Molester as a 2-dimensional 15bpp 555 array:



Lay them on top of each other...



The case is obvious! A ZST saved from a field contains the level tilemap data always at 0x2C13 and is 0x2000 bytes big. So, how would a mapper work?

  • The program opens a ZST of choice and reads the data from 0x2C13 onwards.
  • Reading two bytes at a time, byte 1 determining the 8x8 tile to print, byte 2 telling the properties of the tile in question1.
  • Once 128 bytes have been printed, start a new row of tiles. Repeat step two 63 more times so all $2000 bytes, or, 4096 tiles have been printed.
  • That's it! The map is ready (for post-processing2).

Note 1: The properties.
The property byte is made from 8 function bits:
vhUp ppBB
v = vertical flip the tile
h = horizontal flip the tile
U = unused
ppp = 3 bits, defines the palette to use from the 8 total palettes
BB = 2 bits, defines the bank to use from the 4 total banks

So $17, or, 00010111 would be a tile that is not flipped vertically (0) or horizontally (0) with the unused bit not set (0), using palette $5 (101) and is loaded from bank $3 (11).

But where are the graphics loaded from?
All graphics are always loaded from 0x20C12, and their total size is $8000 bytes, $2000 per bank, respectively.

Okay, what about the palettes?
All palettes are always loaded from 0x618, the same way Tile Molester reads them, as 15bpp little-endian. The first bit is unused, then 5 bits for defining blue, 5 bits for green and 5 bits for red. 0111 1111 1111 1111.

Note 2: Post processing.
Obviously, even if this tool gives 'perfect' output, all we have is a representation of the tiles that the level is built from. This is fine, but obviously enemy/player/rucksack positions, animated conveyors, the water level and some info about where the doors lead to should also be shown in the map. If a tool gets made, I promise that I can personally add this all afterwards in Photoshop.
If the game is paused, pressing the directional buttons scrolls the view to the desired direction, but only a bit. I'm searching for a "maximum amount of pixels you can scroll your view while paused"-value, and if/once found, adding sprites will be very easy. I can do this, personally, also, unless someone is ovely interested.

So uh, yeah. Anyone excited? :C

24
Map Requests / Re: Mario Kart Double Dash for the Gamecube?
« on: February 15, 2012, 10:21:57 am »
Oh! How convenient. Guess I'll dive into those.
Glad to see you too Peard :)

25
Map Requests / Re: Mario Kart Double Dash for the Gamecube?
« on: February 15, 2012, 04:22:29 am »
Well, I just downloaded the GCM image of the game. I guess I'll be attempting this in the following days.
EDIT: Welp, I got the GCM, un-RARC'd the ARCs, got the BMDs...
But being a macfag, I can't take any step further. I know I've had BMDView2 in the past, but seems like it has disappeared off the face of the internet.
If anyone here has 3DSMAX with the BMD plug-in or just BMDView2, please help the cause by downloading this archive I made and converting all the BMDs to a better format.

26
Map Requests / Re: Mario Kart Double Dash for the Gamecube?
« on: February 09, 2012, 12:39:45 am »
I could see this happening without any major problems.
As far as I remember, MKDD models are stored as the "standard old" BMD. It shouldn't be a problem at all to:
  • get iso
  • extract contents
  • unpack archives (if any)
  • get BMDs
  • use Thakis' BMD tools to convert them to OBJ/3DS
  • fix
  • render

27
Mapping Tips/Guides / Re: NSMB Wii Rotating ground
« on: August 09, 2011, 03:25:01 am »
I don't know if it helps, but Photoshop has a filter called "Polar Coordinates" under the Distort panel.
It transforms this:
link

to this:
link

The problem seems to be that it doesn't really repeat the pattern, only stretches. As you can see, the middle resembles the original texture the most, but the closer you get to the edge the stretchier it appears.

Don't know how to approach the problem really... If I figure out something I'll let you know.




EDIT: Okay, I figured out how to do it "perfectly".
Make a new document in Photoshop, match your canvas with the perimeter of your rotating sphere and double it once more (in this case 576 * 2 = 1152 * 2 = 2304)
Paste your texture in, flip it 180° and resize it to twice its size using the nearest-neighbor interpolation. Be sure to apply the transformation.
Then, transform it AGAIN, this time to 50% its width and 200% its height. Fill out the remaining empty space with the texture, seamslessly.
Should look something like this now.
Then apply the Polar Coordinates and add a full circle mask. Now resize the image's size to 50% and you're done!

Dunno if I explained that well enough but if you have questions be sure to ask.

This is the final product (resized by the forum, open in new window to see it in its full glory):


EDIT: Wait, no, it's still incorrect... But that was a mistake on my end. Instead of resizing the second time to 50% x 200%, make it 25% x 200%.

28
Map Gab / RE: Virtual Boy Wario Land (VB)
« on: July 25, 2009, 07:25:16 pm »
I love the color-codes.

Awesome job.

29
Map Gab / RE: Umihara Kawase
« on: July 22, 2009, 07:08:54 pm »
Maxim: The game holds the conveyor belts still for one frame, and the full animation takes 4 frames.

Also, in fact, it is not an animated tile, but an animated palette.

30
Map Gab / RE: Umihara Kawase
« on: July 22, 2009, 02:03:11 am »
I dunno, I always see transparency as the optimal background choice over a solid color, as it can be easily changed by applying a color background to the HTML page itself; conceivability is in the viewer's hands. Technically, the very background image could be set to the background as well with this method.



What I'm really after in my maps, though, is that it has only the things you need to know; where the starting point is, where the enemies are, where the water level is.. things like that which assist you to the optimal route or whatever. A background only pleases one's eyes and might make the viewer oversee crucial, small elements that could blend in.

Pages: 1 [2] 3 4 ... 9