Author Topic: Umihara Kawase [COMPLETE]  (Read 67361 times)

0 Members and 1 Guest are viewing this topic.

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Umihara Kawase
« Reply #15 on: July 22, 2009, 05:01:25 pm »
All browsers will display APNG, it won't animate unless it's Firefox or Opera though. It was rejected by the PNG standards people, so it won't be official any time soon.



The format is really simple, it just takes the data chunks from multiple PNGs and sticks them in as auxiliary chunks. The downside of this is that it is very inefficient as far as the animation part goes. If you have the same image for 30 frames, it takes just as much space as all 30 of them separately.

Offline snesmaster

  • Full Member
  • ***
  • Posts: 181
RE: Umihara Kawase
« Reply #16 on: July 22, 2009, 06:10:18 pm »
Yea, the need to find a better compression for parts of the frames that are the same in animations.  However I like the idea of being able to use transparencies as well as not being limited to 256 colors.  It will be nice when a new improved standard comes around and officially replaces the animated gif.

Offline Raccoon Sam

  • Full Member
  • ***
  • Posts: 124
RE: Umihara Kawase
« Reply #17 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.

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Umihara Kawase
« Reply #18 on: July 23, 2009, 02:58:48 am »
Then it animated pretty fast, and only Firefox is displaying it correctly.



Also, for 60fps you should set it to 16 or 17ms inter-frame interval.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Umihara Kawase
« Reply #19 on: July 23, 2009, 04:56:42 am »
What would be nice is an image format that contains several images and an XML-based description file that would allow for animation, tiled graphics, etc.

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Umihara Kawase
« Reply #20 on: July 23, 2009, 05:38:25 am »
How many years did it take to get proper PNG support in IE?



I did work on a Java-based map viewer that handled the tiling, but it was unpleasantly slow and browser sandboxing meant you couldn't save the image to disk. Something like Google Maps might be interesting.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Umihara Kawase
« Reply #21 on: July 23, 2009, 03:27:55 pm »
It would definitely have to be supported as a plug-in (at first, and maybe indefinitely).  I know, it's a pipe dream.

Offline Raccoon Sam

  • Full Member
  • ***
  • Posts: 124
Re: Umihara Kawase
« Reply #22 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

Offline mechaskrom

  • Newbie
  • *
  • Posts: 41
Re: Umihara Kawase
« Reply #23 on: April 08, 2013, 05:05:55 am »
Sounds fun. :)

I can give the tool a try if no one else is interested in making it. If a .NET command prompt application is ok for you I can probably make something pretty quick.


This game looks very fun and is on my to-play-list. Would love to see maps for it.
Some tools and other stuff I've made:
https://github.com/mechaskrom

Offline Raccoon Sam

  • Full Member
  • ***
  • Posts: 124
Re: Umihara Kawase
« Reply #24 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.
« Last Edit: April 08, 2013, 03:35:35 pm by Raccoon Sam »

Offline mechaskrom

  • Newbie
  • *
  • Posts: 41
Re: Umihara Kawase
« Reply #25 on: April 09, 2013, 01:33:37 am »
Mono for Mac should work fine. I'll just make sure it works in mono for windows. But perhaps you don't want to install mono?
I don't have Mac or any experience programming for it so mono is the best I can offer.

Your instructions seems to be clear, but I'll ask you for clarifications if needed.

I'll will start working on the tool and see how it goes. :)
Some tools and other stuff I've made:
https://github.com/mechaskrom

Offline Raccoon Sam

  • Full Member
  • ***
  • Posts: 124
Re: Umihara Kawase
« Reply #26 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.
« Last Edit: April 12, 2013, 12:27:35 am by Raccoon Sam »

Offline mechaskrom

  • Newbie
  • *
  • Posts: 41
Re: Umihara Kawase
« Reply #27 on: April 12, 2013, 12:38:38 am »
@Raccoon Sam
First version of the tool is finished. Check your messages.

Thanks to Raccoon Sam's great analysis it was pretty straightforward and painless. :)
Minor correction though. Graphical characters are loaded from 0x20C13.

And I would like to show everyone the tilemap output. I thought it looked pretty cool with the psychedelic colors. :)
Some tools and other stuff I've made:
https://github.com/mechaskrom

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2315
Re: Umihara Kawase
« Reply #28 on: April 12, 2013, 05:45:06 am »
Impressive!
Current project that are on hold because job burnout :
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)

Offline Raccoon Sam

  • Full Member
  • ***
  • Posts: 124
Re: Umihara Kawase
« Reply #29 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