Sonic and Sega Retro Message Board: Sega Saturn interesting finds - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 7 Pages +
  • ◄ First
  • 3
  • 4
  • 5
  • 6
  • 7
    Locked
    Locked Forum

Sega Saturn interesting finds

#61 User is offline Andrew75 

Posted 21 May 2013 - 04:48 AM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Quote from my forum.

Moop said:

Well, I took another look at the 718 demo, and I found a standalone cloud texture. I also found a couple other odd things, and I included everything in the zip file.

I only know for sure that I found the metal sonic floor (in raw data and from a Satourne rip) and metal sonic clouds. Everything else is a mystery...

If only I could understand how to add color, all this stuff might actually be usable... :/

This post has been edited by Andrew75: 21 May 2013 - 08:58 AM

#62 User is offline Meat Miracle 

Posted 21 May 2013 - 04:41 PM

  • Posts: 1634
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2

View PostDr. Mecha, on 20 May 2013 - 08:27 PM, said:

One problem, Satourne's unable to pick up the missing tiles; the essential tiles are still missing, like the floors for the Sound Building and such.

Frankly, I'm amazed that you've even gotten that far into Satourne without it crashing ten times in a row.

Anyway, to explain why you can't properly get the graphics out, here's how the ground works in Sonic Jam.

The graphics themselves are stored in 8x8 pixel tiles (the manual calls them cells....). This mess of tiles is the character pattern, stored at the start of the VRAM in Sonic Jam, from 0h to 20000h. These are the lego blocks that compose the picture. Note that I'm using all memory values relative to the VDP2 VRAM start position, or absolute to the SCRDATA.MUS file because it is the one loaded to VDP2 practically as-is anyway from what I can tell.

So you have the 8x8 cells which are actually more like 16x16 because they are grouped two by two into a tile.

Then you have the Pattern Name Table, which tells which tile to use where. They are "maps" that specify 64 x 64 tiles: they specify their address, their palette, and whether to flip them vertically or horizontally. Since Sonic Jam is using 16x16 tiles, a Pattern Name Table technically stores 32 x 32 tiles, each 16x16 in size. Since it uses 16x16 cells (the manual calls it "Character size of 2 H cells x 2 V cells"), and the pattern name data is 1 word, one table ends up 800h long.

Then you have Planes which can each read one, two, or two by two Pattern Name Tables. There's a part here I don't get and it may just be an inaccuracy in the yabause debugger, because it says the planes are stored in 1 x 1 patterns, but they are in fact stored in 2 x 2. Perhaps the registers are shifted mid-scanline and yabause only grabs the value between frames, possibly for displaying the clouds. I'm not sure.

Anyway, the list of planes is between 20000h and 40000h, each of them 2000h each in size, so they store four Pattern Name Tables in a 2 by 2 grid.

And finally you have a Map, which consists, for VDP2 rotated backgrounds, a 4x4 pattern of planes. In memory, the top right plane is the one with the clouds: when the camera moves out to view the clouds only, the map is switched to only use that one cloud plane repeatedly. When the camera shows the ground, everything is shown in the normal order, but the top right plane has a copy of plane H instead, the one directly south to it, likely because it has the most grass. Incidentally this is the location of the waterfall, and this is why you can see a quarter of a field when you look behind it, because that copied plane is not entirely filled with only grass but a corner of it has the floor cells of the gallery building. As a matter of fact you can see some ground outside the normal Sonic World area at other locations too, because the entire map is set up to repeat indefinitely.

I'm guessing that the switch from cloud to ground happens mid-scanline, and that's how you make two rotating background appear simultaneously. Many later games also moved a ground and a ceiling like that, like Last Bronx.


So we have:
- four 8x8 pixel tall/wide Cells, that make up a 16x16 pixel Tile, (these are the ONLY graphics, the rest are just pointers and palette entry indexes!)
- a Pattern Name Table which holds 32x32 Tiles, (so 32x16 by 32x16 = 512 x 512 pixels tall/wide)
- a Plane set up to hold four Pattern Name Tables in a two by two grid (so, 1024 x 1024 pixels tall/wide)
- and a Map set up to hold sixteen Planes in a 4x4 grid. (so, 4096 x 4096 pixels)

Therefore, your final map should be 4096 x 4096 in size with the clouds being 512x512.

And just to put this into perspective: the Saturn could move around a 4096x4096 pixel background in 1994, when most standard PCs used 640x480! That kind of kicks ass if you think about it.

#63 User is offline ICEknight 

Posted 21 May 2013 - 05:55 PM

  • Posts: 10938
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
In other words, and if I understood correctly, once you replace each group of two adjacent grey pixels (in reality just a two-byte hex value) with the 16x16 tile which has that value assigned to it:


This:
Posted Image
(12x9 two-byte hex values)

Becomes this:
Posted Image
(12x9 tiles of 16x16 pixels each)


This:
Posted Image
Becomes this:
Posted Image


This:
Posted Image
Becomes this:
Posted Image


etc.
This post has been edited by ICEknight: 21 May 2013 - 06:11 PM

#64 User is offline Meat Miracle 

Posted 21 May 2013 - 07:21 PM

  • Posts: 1634
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2
Yes, except that you also have to pair it with the correct palette entry from CRAM (the entry is also stored in the pattern name table).

And for bonus fun, 1 word is not enough to hold the entire character pattern name and palette entry, so the remaining bits are stored in the Pattern Name Control register of the VDP2. The fun part in this is that:
- there's one for every background, each of them 2 bytes (RBG0 is at 058f0038h)
- whether it is global, or changed as stuff is rendered, I do not know
- there are multiple different pattern name data configurations per settings - auxillary modes, rotations, etc, and all of them hold the palette and pattern name bits in different orders.
- the Pattern Name Control register is write only!

Ain't the Saturn just wonderful?

#65 User is offline Andrew75 

Posted 21 May 2013 - 08:05 PM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Quote from AXSX Forums:
Since Moop does not have a retro account. Fun stuff being the middle man lol

Moop said:

I actually went on a Saturn SDK splurge earlier today and downloaded everything that I could find that seemed relevant to graphics tools.

It also seems like there are plenty of "File to Saturn" programs, but not enough "Saturn to File" ones, unfortunately. I'll see what I can do with what I got once I get some important work done.

Now, I read Meat Miracle's post, and, also having read the VDP2 manual, I get all he's saying, however it looks to me like the planes are stored as 2H x 1V (hence the "squash") instead of 2H x 2V due to memory constraints. But hey, I'm still new to all this Saturn stuff. :)

On a related note, I agree that the Saturn's ability to output a 4096x4096 image in 1994 is pretty awesome! :D

This post has been edited by Andrew75: 21 May 2013 - 08:10 PM

#66 User is offline ICEknight 

Posted 21 May 2013 - 08:12 PM

  • Posts: 10938
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
By the way, from the looks of it (and please forgive my ignorance if this is just plain wrong), I suspect that the whole map might be actually assembled using the following groups of increasingly bigger tiles, before being loaded into RAM:

  • 8x8 pixel tiles (Well duh. =P)
    Posted Image

  • 2x2 groups of the tiles above (making tiles of 16x16 pixels) -> Which we also know about already (also done in the Mega Drive games)
    Posted Image

  • 32x32 groups of the tiles above (making tiles of 512x512 pixels)
    Posted Image
    Posted Image

  • 2x2 groups of the tiles above (making tiles of 1024x1024 pixels) -> This includes the "clouds" tile seen at the top-right corner of the full map
    Posted Image

  • And last, the final map consists of a 4x4 set of the tiles above -> With the "clouds" tile being thrown in fourth place for some reason (could be a leftover from a time when that value had a grass-filled tile)
    Posted Image


But this is just speculation based on the posted images, I hope I'm not misguiding anybody or anything. =|
This post has been edited by ICEknight: 21 May 2013 - 10:00 PM

#67 User is offline Andrew75 

Posted 21 May 2013 - 08:17 PM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Here are the new Sonic Xtreme textures Moop has got a hold of. I'm just posting theme here for you guys to check out since many people cant seem to download from my Forums directly without a full membership.
DOWNLOAD NOW!

here are 2 of em as a sample
I bet there are some nice tiles found here !
Posted Image

not sure what this could be....
Posted Image
This post has been edited by Andrew75: 21 May 2013 - 08:59 PM

#68 User is offline Andrew75 

Posted 21 May 2013 - 08:37 PM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Sorry for the double post.
Using one of Moops textures as a guide I visually recreated the Sonic Xtreme Boss stage cloud layout.
( had to match cloud patterns from the floor texture to the greyscale patterns to figure out the layout(for finding center area) using photoshop layers, Got lucky with the strategy since the clouds were easily made out by the pixel patterns. I don't think this will work in other situations though)
Posted Image

The only 2 that may be off are the 2 circled textures. The patterns did not match anywhere when overlapping the boss stage floor clouds to Moop's greyscale texture.
Posted Image
This post has been edited by Andrew75: 21 May 2013 - 08:45 PM

#69 User is offline Meat Miracle 

Posted 22 May 2013 - 03:46 AM

  • Posts: 1634
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2

View PostICEknight, on 21 May 2013 - 08:12 PM, said:

But this is just speculation based on the posted images, I hope I'm not misguiding anybody or anything. =|

You are correct actually.

Quote

And last, the final map consists of a 4x4 set of the tiles above -> With the "clouds" tile being thrown in fourth place for some reason (could be a leftover from a time when that value had a grass-filled tile)


The clouds are thrown in there because... that's how they are loaded in memory. It works like this:

Posted Image

They are mapped to the playfield, displayed, then at the middle of the screen the pattern map switches out the grass, and the field rotation perspective gets "inverted" (don't have a better word for it cause I suck at 3d math, haha). The upper right plane, which is the one using the clouds, gets replaced with a copy of the plane directly south to it, since it's just a replacement of a map coordinate anyway. That's why you get that quarter of a ground when you look behind the waterfall.
So there are two maps: one of the clouds, one of the grass, but in VRAM both are loaded at the same place due to various reasons (memory partitioning, etcetera).
You can actually see the plane addresses in that satourne debug window screenshot... plane a to h: 0x20000, 0x22000, 0x24000, 0x2E000, 0x28000, 0x2A000, 0x2C000, 0x2E000. 0x2E000 is displayed twice.

The VDP2 can actually specify TWO rotation parameters, which get changed out mid-screen, hence it displays 2 "grounds", you can see that in the debugger window too: plane parameter A is the grass, while plane size parameter B has the graphics at 0x26000 repeating... those are the clouds.

Quote

however it looks to me like the planes are stored as 2H x 1V (hence the "squash") instead of 2H x 2V due to memory constraints.

No, they are 2H x 2V, they only appear squashed because you are not ripping out graphics, just loading a pattern table as a greyscale image.

Also, I'm not sure what you are trying to do with the Sonic Xtreme graphics. I've ripped them basically the same night the iso was out. They only use part of the clouds on the top, and the entire gfx at the bottom, you can read what size they really are with yabause, I'm late for work.
Posted Image

Posted Image

edit:fixed a million typos
This post has been edited by Meat Miracle: 22 May 2013 - 04:55 PM

#70 User is offline Andrew75 

Posted 22 May 2013 - 08:15 AM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects

View PostMeat Miracle, on 22 May 2013 - 03:46 AM, said:


Also, I'm not sure what you are trying to do with the Sonic Xtreme graphics. I've ripped them basically the same night the iso was out. They only use part of the clouds on the top, and the entire gfx at the bottom, you can read what size they really are with yabause, I'm late for work.
Posted Image

Posted Image

Yeah I did the same using Saturone the same day they were out myself.
It seems Moop has found that the Sky clouds are not barrowed from the floor texture as was originally thought. The sky had its own VDP2 layout.
Moop also found a few other layouts excluding what we have.
(We as a community already have the sky and floor you posted, as well as Hud, Title and game over screens, But three are a few VDP2 layouts that are a mystery which is what Moop recently uncovered. One of them was made out to be the sky texture's cloud layout. which I used as a guide to re-creat that layout using what we have.

This is the floor texture we already have. you can see that the floor itself is covering up some clouds in the center, some are even cut in half.
Posted Image

And here is the new Cloud VDP2 layout that was found. The cloud pattern around the parameter is the same, but it also has the central cloud patern layout.
Posted Image
Hope that helps you to understand what I was on about in the previous post.

Edit:
here are the other VDP2s that were found, I can make out the game over for sure in the first one. Another one has just got to be the title screen, (not sure which at this point) but there are 3 left over that don't seem to fit anything that we can visually see in game.
Perhaps they are different versions of title screens? the only way to know for sure is to get them rebuilt somehow.
Posted Image

Posted Image

Posted Image

Posted Image

Posted Image
This post has been edited by Andrew75: 22 May 2013 - 08:28 AM

#71 User is offline Meat Miracle 

Posted 22 May 2013 - 11:18 AM

  • Posts: 1634
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2
Oh, I see. Where did you found those?

#72 User is offline Andrew75 

Posted 22 May 2013 - 01:30 PM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects

View PostMeat Miracle, on 22 May 2013 - 11:18 AM, said:

Oh, I see. Where did you found those?


Come on over and check it out, the info is kind of scattered around page 1 of the post. http://www.sonic-xtr...opic.php?id=515
It seems we have 4 games being hacked at the same time, Xtreme's 718, Sonic adventure 1 and 2 Beta, and also Jam,, wow. Busy community this summer!
This post has been edited by Andrew75: 22 May 2013 - 01:32 PM

#73 User is offline Meat Miracle 

Posted 22 May 2013 - 04:52 PM

  • Posts: 1634
  • Joined: 11-January 03
  • Gender:Male
  • Wiki edits:2
So, what's stopping you from switching out the pattern data in the game files, so they are loaded in some position that you CAN dump with satourne?

Like so:

Posted Image

Posted Image
This post has been edited by Meat Miracle: 22 May 2013 - 04:53 PM

#74 User is offline Andrew75 

Posted 22 May 2013 - 07:02 PM

  • Technical Artist
  • Posts: 1886
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Genius ,,, Pure Genius man ! Looks like we have all we need to finish modeling the stage for a release!
( I don't have the tree models so I'll be doing them from scratch.) Can't thank you and Moop enough.


Also a quote from Moop:

Quote

I found some other things. Here.

The weird colorful thing in Photo.JPG is actually what6.png! At least the small circle looks like the center of the boss floor, and I have no idea what the big curved object is.
I was looking at the 718's file "0" and used the "decompile 8x8 texture" feature there. I don't know how to make the image any less choppy than how it came out, unfortunately, short of slicing out hundreds of 8x8 tiles and piecing them together.

The other image in that archive is a strange one, though. Maybe it has to do with the buildings in the background of the boss fight?

By the way, I might have found how to add color. Using taktools (as also seen in Photo.JPG), you can change palettes. I looked at the pattern map of the Sonic World floor with takcheck.exe, and it did indeed add color to it, but it was all the wrong color. It put color in the right spots, but they were just all wrong. I don't know how to find out the right palette (using a value of 32768 produced an easily recognizable image, except again with the wrong colors. There's barely any documentation about the tools' palette feature, either). Also, running SCRDATA.MUS through takd16.exe allows me to open it up in irfanview/photoshop as a .raw file with color (albeit compressed to 32x32 pixels wide instead of the "squashed" 64x32 for some reason), but again it's all the wrong ones.

Any ideas?

EDIT: Meat Miracle ripped Jam's floor! And the Sky! I wish I'd thought of swapping the plane addresses—makes sense, and the emulators even have the tools to do it... :lol:

EDIT 2: I forgot to add, the weird things that look like pac-men at the top of what6.png are numbers. I believe they are 8x8 tiles, but I'm not 100% sure because I couldn't get takcheck.exe to line them up in a nice row.


#75 User is offline Glaber 

Posted 22 May 2013 - 08:10 PM

  • Has Beaten Sonic Genesis for GBA
  • Posts: 998
  • Joined: 14-January 03
  • Gender:Male
  • Location:Mobius
  • Project:Gmod Ragdolls and Props, Pony maps
  • Wiki edits:10
Wonderful! I look forward to bringing the map into the source engine.

  • 7 Pages +
  • ◄ First
  • 3
  • 4
  • 5
  • 6
  • 7
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users