Romhacking.net

Romhacking => Programming => Topic started by: dyson132 on April 11, 2012, 01:41:57 pm

Title: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 11, 2012, 01:41:57 pm
Hello everybody!
I'm new here but I think you guys might like this.
A few weeks ago I tried to read all the information that was ever posted by VL-Tone about the subject and managed to find a lot... just no all of it.
VL-Tone was the guy that made this http://homepage.mac.com/qubedstudios/StarFoxObjectDecoder.htm (http://homepage.mac.com/qubedstudios/StarFoxObjectDecoder.htm)
I had to use WayBack Machine to find some stuff and I still have some color/texture and lighting information missing (here is one with the missing palettes that might I need http://web.archive.org/web/20050517170102/http://board.acmlm.org/thread.php?id=6876 (http://web.archive.org/web/20050517170102/http://board.acmlm.org/thread.php?id=6876) ).
I've attached what I did reconstruct, it was programmed in c++ and openGL. The model coordenates were obtained using VL-Tone guides, all that is missing there is the correct colors which I have not been able to find the 16 color palette used all over starfox inside the rom, nor have I found the decoded 256 RGB palette used by VL-Tone in the Star Fox Object Decoder. That information seems to be missing.

I'd like to be able to get more info on the subject, specifically find out where in the rom is the 16 color palette mentioned and the correct lighting settings.
Any help would be great and I can asure you this test will end up in the public domain as (as least) a 60fps full HD playable Corneria Stage <--- you should be able to add all the fan music covers you like to this.

Thanks!

(http://s16.postimage.org/8ewy5ovc3/Untitled_1.png)



April 13, 2012, 12:28:00 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Here is a video a captured using fraps. The Airwings Lighting and coloring is wrong, that is why I need more info or maybe to contact VL-Tone.
https://vimeo.com/40300915
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: MathOnNapkins on April 13, 2012, 06:33:09 pm
That is pretty cool! And let me be the first to say







DO A BARREL ROLL!
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: FinS on April 14, 2012, 12:28:28 pm
The palettes are built in ram at $7e178b before being uploaded to cgram. The palette for 3d models specifically is the 8th palette so it is first loaded to $7e186b in ram before being sent to cgram. There are actually 3 palettes, each of 16 colors, for 3d. They are located complete in rom at $18acb unheadered addressing in order:

Space Palette
Code: [Select]
00 00 51 04 3A 15 BD 22 7F 37 45 54 2B 6D 8F 7E B6 7F A3 0C 88 25 4E 42 F5 56 9A 6B FE 7F 00 03Night Time Palette
Code: [Select]
00 00 B5 00 9E 11 DF 1A 7F 2F A5 5C 4C 6D F1 76 B7 7F 47 08 ED 1C D0 39 74 4E 38 6B FE 7F 20 02Daytime Palette
Code: [Select]
00 00 35 20 7E 35 BF 36 5F 4B 40 6D 2C 7E 6D 7F F5 7F C3 24 89 39 0E 4E D3 62 78 77 FD 7F 20 02
This is what they look like in no particular order.
(http://www.freewebs.com/finnshore/starfox123.png)

My best guess is that the screen is set to full brightness but I can't be sure because that seems to be controlled by the FX chip which I don't understand very well. Someone here probably will  have some knowledge about it.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 14, 2012, 12:48:42 pm
@MathOnNapkins:
xD I'm definitely doing barrel rolls right now!

@Fins:
Thank you so much!, I'm really going to try out that program. I'm guessing the greens at the ends are supposed to be the "alphas" in the game maybe (According to VL-Tone one of the hex values in the palette was used for alpha)
I do have a question, is anybody else so into this that they managed to get the correct light source info? I have the normals for every model so openGL is ready for correct lights!
I'd like to be able to replicate the lighting used in the Star Fox Object Decoder! :P

Thanks again!

Edit->
@FinS:
Well VT-Tone found out that the palette of 16 colors is actually used to make a kind of grid over polygons using the 16 colors as a basis, creating the illusion of 256 colors for any poligon. When he made the SF object decoder he first decoded the colors and with that info he generated the 256 color palette that he used.
But of course it would be great to have as much information as posible and your input is just what I needed. With it I can decode the 256 palette. ;)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: FinS on April 14, 2012, 03:48:06 pm
Here is an example of what you are talking about. You can make a zsnes save state and open it with vsnes (http://www.romhacking.net/utilities/274/) to find out almost anything you need to about the game except for fx processor stuff.
(http://www.freewebs.com/finnshore/starfoxBG1.png)

You can see here that this is background 1 which contains all of the wire frame objects and some other things such as the portrait, shield health bars and some text. You can see here how the grey shade pixels are meshed with other colors to cause the illusion of multiple colors even though it only uses the 16 colors of the 8th palette which you can see almost directly in the middle of the palette editor. The first color in each palette is always transparent so it is actually only 15 colors after the fact and I don't believe the fx chip is changing that.  The green color is only being used as the background of the portrait. The shield health bars which I cut off both use the 3rd palette which is the red, blue, pink and grey one.

(http://www.freewebs.com/finnshore/starfoxBG2.png)
This is what is displayed in background 2 which is almost everything else. The only sprites are just a few pieces of text, lives display and such. These graphics use the 4th, 5th, 6th and 7th palettes.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 14, 2012, 05:46:02 pm
 :D
This is definitely usefull!
Thank you very very much! xD
By the way, how did you export the palette to use it in ImPalEd?
I'm really into this right now!
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: FinS on April 14, 2012, 06:39:06 pm
ImPalEd can read a multiple variety of 256 color palettes. Here is one way to make a palette using geiger's debugger (http://www.romhacking.net/utilities/241/).

Run the game in the debugger up to a point you want to get the palette then dump it, highlight and copy the numbers, then open up a hex editor like HxD (http://mh-nexus.de/en/downloads), create a new file and paste the palette numbers in.
(http://www.freewebs.com/finnshore/PalDump.png)

Then after you save the file with a ".pal" extension you can open it in ImPalEd. Impaled is able to open 15-bit, 16-bit, 24-bit, 32-bit, Jasc and Riff palettes.

Alternatively, you can also just find the palette entries you want to use and place them in a file then pad the rest with zeros in a hex editor up to a point it will make the file the correct size with regards to the size of the palette entries. For example, say you are using 16-bit per color entries, then you would need to pad a total file size of 512 bytes to make 256 colors.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 14, 2012, 06:50:37 pm
Nice!

Now I have a huge problem, seems the colors in the models are references to other references in hex values so I'm kinda stuck until I manage to get that to work, although with your information I did manage to find the palete inside the rom. :P
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: FinS on April 14, 2012, 07:09:24 pm
I am not sure but I think you are referring to the different formats that palettes come in. The format dumped by Geiger's Debugger is not the same format which the Snes uses naturally. It is the regular 24 bit hex format just like the color format used in web pages.  That is a reason ImPalEd comes in handy. You can load a 24 bit palette with it and save it as BGR 15 bit which is the format SNES uses.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 14, 2012, 07:35:53 pm
Well I'm not sure, I'm very new at this. Here is the info.
VL-Tone says that for every 3D model in the Star Fox ROM the 28 byte object definition has a reference to a certain set of color/texture (I have verified this):
Quote
There are about 9 of these sets and the 28 byte
object definition has a pointer to tell which one is used, for example 13 82 is the most commonly used palette (refer to my other post to know where the 28 bytes object definition table is.)
That 13 82 number translate to $18213+$200=$18413 in the ROM. At this address you can find 256 2 bytes color/texture references.
Source: http://web.archive.org/web/20050517170102/http://board.acmlm.org/thread.php?id=6876 (http://web.archive.org/web/20050517170102/http://board.acmlm.org/thread.php?id=6876)

Now when you look at all the hex values that make up the airwing you end up with vertex data, a BSP (for rendering I believe), a list with triangles formed by the vertex data for said BSP, and more importantly, the values with which to build the 3d Model which is like this:
Quote
Ns Fn Co NX NY NZ V1 V2 V3... Ns is the number of sides for this face. Fn is face number or ID.
-------------------------- Co is color/texture number, refer to other doc about the color/texture sets.
NX NY and NZ is the vector of the calculated normal for this face normalized to 128 (or is it 127?)
Vx refers to the vertex numbers as defined by the vertex lump list just like the triangle list (see above).
The number of Vx vertex references is equal to the number of sides, in this case three.
Supported number of sides are 1 (point),2 (line),3,4,5,6 and 8 sides.
Ns Fn Co NX NY NZ V1 V2 V3
--------------------------
[03 06 10 A6 5A F7 03 02 0B] ->This face is a triangle with a gray tint ($10), with a normal vector of (-90,90,9), connecting vertex 3, 2 and 11.
[FF] End of faces group($FF)
[14] Start of Face group (convex shape) ($14)
[03 0E 07 BF 64 D5 0A 0E 07]
[FF]
Source: http://pages.infinit.net/voxel/Arwing_Deconstruction.html (http://pages.infinit.net/voxel/Arwing_Deconstruction.html)

When you look at the Co value for the first triangle it says that it should be gray tint. The value which it references is supposed to be a value in a certain set inside the 13 82 "template", or something that ends up being a grey color made up of a checkerboard pattern of colors in the 16 color palette.
This is where I get lost with all the values and references.
=(
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: FinS on April 14, 2012, 08:31:00 pm
I am assuming this is Super FX related material and I am lost on it as well.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 14, 2012, 10:43:54 pm
I am assuming this is Super FX related material and I am lost on it as well.

Yeah, I think this is where finding VL-Tone would be awesome! Although your information points me in the right direction so thank you very much! =D

April 15, 2012, 01:35:55 am - (Auto Merged - Double Posts are not allowed before 7 days.)
In the meantime, here is another video. The palette is more accurate but I set them by hand, not really perfect and not what I really wanted.  :huh:
https://vimeo.com/40384833
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Mattrizzle on April 15, 2012, 09:06:10 pm
Here's what I have so far after dissecting the table at $18213:
(http://mattrizzle.caffie.net/docs/star_fox/materials_$18213_day.gif)
Most values beyond 0x2F are either additional animated colors, or textures (which I'm too lazy to rip due to the interleaved format they use).
Space and sunset versions of this image can be found here (http://mattrizzle.caffie.net/docs/star_fox/materials_$18213_space.gif) and here (http://mattrizzle.caffie.net/docs/star_fox/materials_$18213_sunset.gif), respectively.

The meanings of the values in the second column are in the initial post of the archived Acmlm's Board topic you linked to (it can also be found here (http://acmlm.kafuka.org/archive2/thread.php?id=6876)). However, I noticed that VL-Tone made a couple of mistakes, which I will try to address now.

Paragraph 5:
Quote
At this address you can find 256 2 bytes color/texture references.
There are actually only 109 color/texture references in the table at $18213, because another table begins at $182ED. This means the valid values are from 0x00 to 0x6C.  Also, I counted way more than 9 of the sets when scanning through the object definitions (there's actually close to 50!).

Going into the format descriptions:
Quote
XX 00 to XX 08= Nine light sourced colors, the different variations are stored at $19000 in ROM.
The number is actually ten, from 00 00 to 09 09, as can be seen in my image above. The data for them begins at $18E0A in the ROM ($1900A headered). Pointers to these can be found at $18B2A-$18B89.

Here are the 4 consecutive shade variations of these colors, in the space (http://mattrizzle.caffie.net/docs/star_fox/light_sourced_colors_space.png), sunset (http://mattrizzle.caffie.net/docs/star_fox/light_sourced_colors_sunset.png), and daytime (http://mattrizzle.caffie.net/docs/star_fox/light_sourced_colors_day.png) palettes. Each 8x8 square is equivalent to a single byte in the ROM.

I will post images with the numerous variants of the 32 solid colors when I finish them.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 15, 2012, 09:26:06 pm
@Mattrizzle:
 :o
S**T!
This is AWESOME!!! xD
THANK YOU! =D

I had read that thread over at Aclmm but I have little experience with HEX and the pictures VL-Tone posted are offline, that is why I used Way Back Machine for the same thread. I had come across stuff but I didn't know they were mistakes, again, I have little experience.

This is turning out better than I expected! thank you so much!

Edit---------------------------------------------------------------------------------------->
Palettes match up perfectly. =D
Now to get the correct lighting. xD
May I ask what software you used in order to get the palettes printed in such a way?

Edit 2-------------------------------------------------------------------------------------->
I will post all links to all the info I have managed to find in case anybody else wants to remake the game themselves or wishes to make a bigger project:

Starfox Level data found, and hidden new weapon
http://acmlm.no-ip.org/archive2/thread.php?id=6066&ppp=20&page=0#120061 (http://acmlm.no-ip.org/archive2/thread.php?id=6066&ppp=20&page=0#120061)

Starfox Polygon Viewer, Now in Color!
http://acmlm.no-ip.org/archive2/thread.php?id=6876 (http://acmlm.no-ip.org/archive2/thread.php?id=6876)

Annotated Deconstruction Of Low Polygon Arwing Object From The Original StarFox
http://pages.infinit.net/voxel/Arwing_Deconstruction.html (http://pages.infinit.net/voxel/Arwing_Deconstruction.html)

Preliminary Stage Hacking (older post by VL-Tone inside another post)
http://acmlm.no-ip.org/archive2/thread.php?id=4730&ppp=20&page=0#96583 (http://acmlm.no-ip.org/archive2/thread.php?id=4730&ppp=20&page=0#96583)

More info!-------------------------------->
When mirroring X-axis vertex data as mentioned in the Arwing Deconstruction, it should be done immediately for every vertex. Meaning that the first vertex on the list is followed by its mirrored vertex, once for each vertex (there are 6 mirrored). This took me some time to understand since the document isn't too explicit about it so I just went ahead and mirrored the 6 vertex values AFTER the first normal ones so my first model was badly rendered.

SFXedit 0.93b has a function in which it can export 3d models to .obj files. I never got it to work either on mac or on PC

SFXedit 0.93b has a complete (?) stage analisis for most (?) stages. It has (what I believe) every single bit of information I will need to remake a level. But I cannot export that information out in any way, so it has to be done some other way.

VL-Tone used to have a text file with all the model object pointers (I believe). The file does not exist anymore.
Quote
I documented almost all of these objects in this document: http://pages.infinit.net/voxel/STARFOX_OBJECTS.TXT
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Mattrizzle on April 17, 2012, 03:29:52 pm
You're welcome, dyson!

May I ask what software you used in order to get the palettes printed in such a way?
I created an indexed color image in Paint Shop Pro version 4, which is little more than your average paint program, aside from having better handling of indexed color palettes than most.
I retrieved the colors needed for the palettes by opening the ROM in TiledGGD, going to the offset where they start, setting the image format to 16 bits per pixel, changing the panel size to 16x3, and copying/pasting the image to Paint Shop Pro. This yields a bitmap image with all three 16-color palettes. I edit the palette in the indexed image to match one of the palettes in the copied image, then with a hex editor (XVI32, although I usually import the hex string to a text editor and add split them into multiple lines so that they are easier to read) opened to the appropriate location in the ROM, use the data to lay pixels of the correct color index down. The text is added to the image using Paint Shop Pro as well.

For the animations, I made multiple copies of the completed image to use as frames, modified the colors to be animated in each one, and then imported these frames to a program that creates animated GIFs (Ulead GIF Animator 2.0).

In short, I don't have a single program that is specialized to do the whole task.

Also, as promised, here are the variants of the "solid" colors:
Space palette (http://mattrizzle.caffie.net/docs/star_fox/solid_colors_space.png)
Sunset palette (http://mattrizzle.caffie.net/docs/star_fox/solid_colors_sunset.png)
Daytime palette (http://mattrizzle.caffie.net/docs/star_fox/solid_colors_day.png)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 17, 2012, 05:30:12 pm
That is awesome work Mattrizzle.
I do have another question regarding all these topics. I've come accross a lot of problems while trying to do this and I only have like a year of c++ experience, even less in openGL (I'm learning that now). I was wondering how I should go about proposing this "little project" of mine to other people, who to send messages to, which other forum would be appropiate for this type of work. I know I can go further but with other people I may go faster and actually get somewhere. So what do you think? I'm actually a newby here, I've only made and posted in this thread and I would like to get people interested in this Star Fox HD in order to see it work in the future.

In the mean time, does anybody have any idea how the lighting works in this game? I've found little to no information directly addressing this issue but VL-Tone seems to have figured it out! :banghead:
I can handle the palettes and all, program the correct use of them, but everytime I look at the game I get more and more confused.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on January 30, 2013, 03:05:47 pm
Hi Dyson,

Exciting project ! It looks really good so far, i wonder if you are still working on it ?
I plan to do a sort of Starfox port but not for PC ;) I collected some informations and so far i have successfully got the palette data and figured almost the most important about the format (lighting, animations...). I also ripped some backgrounds but i still miss the most important which is the models. I found only the arwing model but i would like to rip others 3D models too. I tried to use SFXEdit but the export to OBJ function don't export anything :-/ I wonder if you still have your models as you seems to have successfully exported them.
I can help you in figuring the light stuff :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on January 30, 2013, 06:47:48 pm
Hi Dyson,

Exciting project ! It looks really good so far, i wonder if you are still working on it ?
I plan to do a sort of Starfox port but not for PC ;) I collected some informations and so far i have successfully got the palette data and figured almost the most important about the format (lighting, animations...). I also ripped some backgrounds but i still miss the most important which is the models. I found only the arwing model but i would like to rip others 3D models too. I tried to use SFXEdit but the export to OBJ function don't export anything :-/ I wonder if you still have your models as you seems to have successfully exported them.
I can help you in figuring the light stuff :)

Awesome! I had left the project on permanent pause due to lack of information. I did find VL-Tone in a forum that he seems to moderate frequently but at some point in the past he posted that he had a horrible hard drive crash in which he lost most of the work and wouldn't get back to it, I can understand that. Here is the forum I just mentioned:
http://jul.rustedlogic.net/forum.php?id=41
If there was anything I really wanted to read was the source code for the Macromedia Shockwave file for SFXEdit but it seems to have been destroyed.
I'm sorry to say Stef that I have had little to no progress with this project. What you see in this thread is what I know. At most I can tell you that VL-Tone was able to read Super Mario 64 models because (it seems) the 3D model system appears to be based to that of Star Fox for the SNES (something worth checking). Other companies wanted to copy the system because it was very efficient. Also, the ROM file has no encryption, it is just an awesome and very efficient use of the limitations of the SNES.

I was also never able to rip any 3D model using SFXEdit. The Airwing model is the same as in the info posted by VL-Tone. What I was able to do was verify that it existed where it was supposed to and I parsed it with MS Excel (really!) so it is really easy to program once the info is read correctly.

I've got some important personal stuff these next two weeks, after that I can look into this again but I don't think I can go further than I had already without help.

Good luck! :P
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on January 31, 2013, 04:12:24 am
Awesome! I had left the project on permanent pause due to lack of information. I did find VL-Tone in a forum that he seems to moderate frequently but at some point in the past he posted that he had a horrible hard drive crash in which he lost most of the work and wouldn't get back to it, I can understand that. Here is the forum I just mentioned:
http://jul.rustedlogic.net/forum.php?id=41
If there was anything I really wanted to read was the source code for the Macromedia Shockwave file for SFXEdit but it seems to have been destroyed.
I'm sorry to say Stef that I have had little to no progress with this project. What you see in this thread is what I know. At most I can tell you that VL-Tone was able to read Super Mario 64 models because (it seems) the 3D model system appears to be based to that of Star Fox for the SNES (something worth checking). Other companies wanted to copy the system because it was very efficient. Also, the ROM file has no encryption, it is just an awesome and very efficient use of the limitations of the SNES.

I was also never able to rip any 3D model using SFXEdit. The Airwing model is the same as in the info posted by VL-Tone. What I was able to do was verify that it existed where it was supposed to and I parsed it with MS Excel (really!) so it is really easy to program once the info is read correctly.

I've got some important personal stuff these next two weeks, after that I can look into this again but I don't think I can go further than I had already without help.

Good luck! :P

Thanks for replying that quickly !
Ok, you got the arwing model the same way i got it : just grabbed data on the VL-Tone format description example :p
Indeed you are right, i can directly rip the data model from the rom, just need to know where they are located (and SFXEdit could help for that). If you were able to parse the model data with Excel, what was missing you ?
If you plan to get back in the project i would be pleased to help you in figuring a bit more of the format :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Friedslick6 on January 31, 2013, 05:35:18 am
Just making a list of every link used to post information about VL-Tone's StarFox viewer:
Download SFXedit 0.93b (http://qubedstudios.rustedlogic.net/SFXed_Download.htm)
StarFox Level Editor - QuickTopic free message board hosting (http://www.quicktopic.com/30/H/vyXPDETm9Fh)
Starfox Object Decoder 0.2a (http://web.archive.org/web/20040822200826/http://pages.infinit.net/voxel/StarFoxObjectDecoder.htm)
Starfox Object Decoder 0.5a - Now in Color! (http://web.archive.org/web/20061007031414/http://pages.infinit.net/voxel/StarFoxObjectDecoder.htm)
StarFox Object Viewer (http://qubedstudios.rustedlogic.net/StarFoxObjectDecoder.htm)
Starfox Level Editor 0.8b (http://qubedstudios.rustedlogic.net/StarFoxLevelEditor.htm)
SFXedit 0.8 online documentation (http://qubedstudios.rustedlogic.net/SFXedit0.8documentation.html)
SFXedit 0.93 Documentation. (http://pages.infinit.net/voxel/SFXedit0.93Readme.htm)
Acmlm's Board -- Rom Hacking: Starfox Polygon Viewer, Now in Color! (http://web.archive.org/web/20050517170102/http://board.acmlm.org/thread.php?id=6876)
Is there any way to decompile the Shockwave executables used on the online editors?
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on January 31, 2013, 05:48:07 am
Thanks for replying that quickly !
Ok, you got the arwing model the same way i got it : just grabbed data on the VL-Tone format description example :p
Indeed you are right, i can directly rip the data model from the rom, just need to know where they are located (and SFXEdit could help for that). If you were able to parse the model data with Excel, what was missing you ?
If you plan to get back in the project i would be pleased to help you in figuring a bit more of the format :)


I don't really remember why I failed to find the information. There might have been a slight error in the documentation but I am also not very experienced with hex. If I remember correctly the stage information is the one that points to the 3d models (animated or not), color palettes and everything. It is not horrible but it needs to be done by someone who knows hex more than I do.
SFXEdit can certainly point to the 3D model headers but the amount of information needed to be parsed was huge and doing it by hand would have been very time consuming.

The other problem I think I had was that even if you have the stage information it will point to an object header, that object header has an address in hex and that is where I couldn't move forward. You can find the object header many times in a stage (I would expect) but I was never able to directly read a 3D model with the object header (I ended up somewhere else in the rom). If you do this correctly I think you have all the 3D models you need.
I think that was where I thought there was an error in the documentation but I am not experienced with hex.

I stopped when I couldn't get further assistance from anyone with more knowledge. I posted it in many places (reddit, SF forums) and even left a message for VL-Tone. He also commented that someone (me) had sent him a couple of emails in the last year about it but I never got a response.

I would have no problem with revisiting the project only if I had something to work with. I have no other reason to learn hex so it is just in pause for the moment.

That about sums it up. I'll be back in two weeks so I won't answer anything until then. :)

@Friedslick6
I've read all those but thank you for putting it all together. :D
I do hope this does move forward. I like the Star Fox SNES aesthetics better than the n64 ones.

January 31, 2013, 05:49:16 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Is there any way to decompile the Shockwave executables used on the online editors?

That is exactly what I've been thinking about since Stef brought the topic up again.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on January 31, 2013, 02:20:00 pm
I don't really remember why I failed to find the information. There might have been a slight error in the documentation but I am also not very experienced with hex. If I remember correctly the stage information is the one that points to the 3d models (animated or not), color palettes and everything. It is not horrible but it needs to be done by someone who knows hex more than I do.
SFXEdit can certainly point to the 3D model headers but the amount of information needed to be parsed was huge and doing it by hand would have been very time consuming.

The other problem I think I had was that even if you have the stage information it will point to an object header, that object header has an address in hex and that is where I couldn't move forward. You can find the object header many times in a stage (I would expect) but I was never able to directly read a 3D model with the object header (I ended up somewhere else in the rom). If you do this correctly I think you have all the 3D models you need.
I think that was where I thought there was an error in the documentation but I am not experienced with hex.

I stopped when I couldn't get further assistance from anyone with more knowledge. I posted it in many places (reddit, SF forums) and even left a message for VL-Tone. He also commented that someone (me) had sent him a couple of emails in the last year about it but I never got a response.

I would have no problem with revisiting the project only if I had something to work with. I have no other reason to learn hex so it is just in pause for the moment.

That about sums it up. I'll be back in two weeks so I won't answer anything until then. :)

Ok, i understand your point. Indeed if you are not comfortable with hex address you will experience many troubles in re (reverse engineer) the binary data.
I'm used the hex stuff and honestly it already though me a bit of time to just figure the palette format data (which should be easy compared to level data for instance).
I will try to dig a bit further with SFXEdit, try to do some basic data parsers...
I will keep in touch on this post if i got anything interesting to share :)

Friedslick6>
Thanks for grouping these links, i already dig in them but as dyson said, it is great to have them grouped :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 08, 2013, 06:58:42 pm
I'm back. You know what? I'm up for a challenge so let's do it.
First, do you guys recommend a specific Hex Viewer for rom hacking?
I'm on windows 7 x64 and do have a OSX Mountain Lion too.

It might take long but also it might take very little time.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Friedslick6 on February 09, 2013, 12:59:36 am
Here's some good freeware hex editors:
HxD 1.7.7.0 (http://mh-nexus.de/en/hxd/)
Tiny Hexer v1.8.1.6 (http://www.freewarefiles.com/Tiny-Hexer-V_program_13854.html)
XVI32 2.55 (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm)
I would personally use HxD.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Zoinkity on February 09, 2013, 01:50:25 am
If you want one that can do block bit manipulation and search binary with a mask, a nice free one is HexEdit 4.0 (http://www.hexedit.com/). 

For run-of-the-mill tasks HxD is very light and can also run off a USB stick.  Does file comparison too.  It's one of the better free editors out there.  Only quirk with it is that saving the file removes any bookmarks in it, but that might have been fixed in a newer version.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 09, 2013, 02:48:14 pm
Cool! Thank you both.
Ok, I'll start and this is ALL for Star Fox - Version 1.0 (US). Most of what I will say has already been discovered or mentioned by VL-Tone, I'm just compiling it and copying from the SFXedit by hand if necessary.
First of all, I've copied the first part of the Corneria 1 hex data with the correct info from SFXEdit so it is easier to read and copy:

Corneria Base
addr: h24510D | objtyp: h86 | lenght:014 | type: Object+behaviour_with_16_bits_coords | x: 000000 | y: 000000 | z: 000000 | ztimer: 000000
objid: h84DD | objname: Corneria_Base | bhaddr: h06873F

Normal arwing [1 of 4]
addr: h32510D | objtyp: h74 | lenght:010 | type: Object/behaviour_with_16_bits_coords | x: -00216 | y: -00312 | z: -00200 | ztimer: 000000
objnum: h02 | objid: h20D3 | objname: Normal_arwing | bhnum: h97 | bhaddr: h21B70A | bhname:?

[Skipped][at addr: h3C510D] Rotates previous object [Skipped]

Normal arwing [2 of 4]
addr: h40510D | objtyp: h74 | lenght:010 | type: Object/behaviour_with_16_bits_coords | x: -00216 | y: -00312 | z: -00200 | ztimer: 000000
objnum: h02 | objid: h20D3 | objname: Normal_arwing | bhnum: h97 | bhaddr: h21B70A | bhname:?

[Skipped][at addr: h4A510D] Rotates previous object [Skipped]
[Skipped][at addr: h4E510D] Use next object (8C) for behavior [Skipped]
[Skipped][at addr: h58510D] desc.: Fox & crew chats: "All ships check in" etc. [Skipped]


Normal arwing [3 of 4]
addr: h5B510D | objtyp: h70 | lenght:007 | type: Object+behaviour_with_8_bits_coords | x: 000400 | y: -00368 | z: 001392 | ztimer: 000000
objnum: hDA | objid: h3CD3 | objname: Normal_arwing | bhnum: hF2 | bhaddr: h11920A | bhname: Use_next_object_(8C)_for_behavior

[Skipped][at addr: h62510D] desc.: Backward and static, shootable, ship sound [Skipped]

Normal arwing [4 of 4]
addr: h65510D | objtyp: h70 | lenght:007 | type: Object+behaviour_with_8_bits_coords | x: -00320 | y: -00560 | z: 001200 | ztimer: 000000
objnum: hDA | objid: h3CD3 | objname: Normal_arwing | bhnum: hF2 | bhaddr: h11920A | bhname: Use_next_object_(8C)_for_behavior

[Skipped][at addr: h6C510D] desc.: Backward and static, shootable, ship sound [Skipped]



So, notice that at the beginning of the stage there are four Arwings of two different types referenced as objid: h20D3 and objid: h3CD3, first two arwings have 16bit coords and the other have 8bit (I also noticed that coord. values have 6 integers if positive and 5 if they are negative because of the sign).
The Arwing objid: h20D3 is mentioned in this thread:
http://acmlm.kafuka.org/archive2/thread.php?id=4730&pl=96583
It is one of the Normal Arwings, and h20D3 is mentioned here:
Quote
At $284B There is a list of about 250 16-bit pointer begining with A1AC F8C0 20D3... These are pointers to a little more than half of the polygon objects used in the game.
VL-Tone had documented almost all of these objects in a txt file but I've never found it, I am sure it is part of the SFXEdit since it would contain the names he had given each model. This is the link where the file used to be: http://pages.infinit.net/voxel/STARFOX_OBJECTS.TXT


VL-Tone also mentions the following value and it also appears on SFXEdit (but is has some text on top of the important stuff which makes it hard to read), notice 20D3 appears a few times at the end of the object header, this is mentioned by VL-Tone and is not wrong, for some reason the last(?) 28 hex values reference their same address:
Quote
Normal arwing (in version 1.0) Object Header
73 F1 11 96 F1 00 00 00 AC 5D 24 00 0E 00 50 00 50 00 13 82 20 D3 20 D3 20 D3 20 D3

Now, this is the part where I get all confused with HEX values. VL-Tone mentions the following in the previously mentioned link:
Quote
The actual data defining the general properties of these objects such as relative size and color set is 28 bytes long and found starting at $2E15 (substract $8000 and add $2E15 to the 16 bit pointers from $2848+ to get the actual ROM position).

So the Corneria Stage adds an object, in this case an Arwing objid: h20D3. This object appears on the list of 250 models mentioned previously but (remember I know very little about hex) when I try to do what VL-Tone mentioned in order to find the "Normal arwing (in version 1.0) Object Header" I get nowhere near the 5520 where it is supposed to be.
This string is a description of everything that is needed to generate the Arwing including the location in the ROM which I am almost sure, is $8F373 , it could be another since there are a few Arwing models in the game.

Later he mentions something that applies to SF2 and I don't have the correct values for SF1:
Quote
After that -20 D3- is the "object pointer". Again do $2E15+$D320-$8000 to get the ROM address, which is actually where this line of data can be found, I don't know why it's
included there since it's implicit, but it seems some objects have different offsets than their own stored there.
How does one do that math? I tried using a few hex calculators and ended up nowhere. That is where I failed. What calculator would you recommend and on what settings?

If anyone does make the conection between correct address mentioned in the stage which is 20D3, correct model construction reference in the model viewer of SFXEdit and how the address $8F373 is mentioned in the ROM file you have all the models in Star Fox SNES.

To do list:
Know how to get from Stage info 20D3 over to Object header at 5520.
Know how to get from Object header at 5520 over to 3D model data at 8F373.

Question: what does $ mean in this context? $8F373 and $2E15 (as I have mentioned before I know very little about working with HEX).
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Ryusui on February 10, 2013, 01:16:37 pm
It's just one of myriad ways (e.g. &H, 0x) to denote that the numbers that follow are hex instead of decimal.

There is a big difference between 64 and $64.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 10, 2013, 02:22:27 pm
It's just one of myriad ways (e.g. &H, 0x) to denote that the numbers that follow are hex instead of decimal.

There is a big difference between 64 and $64.

Thanks! :D
The bad thing about this is that I think I did the calculation correctly then and don't know why I cannot get to the correct address.

(comment about your avatar: "It's like I can touch you!!! xD so funny)


News!
I was trying to find other ways of gathering more info, I used HexEdit and look at what I found in the SFXedit 0.93.exe, in plain text and everything. It's the list of 3Dmodels inside the ROM with each address and the names that VL-Tone gave them, there is the famous 20D3. It is what I had spectulated was in http://pages.infinit.net/voxel/STARFOX_OBJECTS.TXT

Code: [Select]
TXT  f      D   ["15AC", "31AC", "4DAC", "69AC", "85AC", "A1AC", "BDAC", "D9AC", "F5AC", "11AD", "2DAD", "49AD", "65AD", "81AD", "9DAD", "B9AD", "D5AD", "F1AD", "0DAE", "29AE", "45AE", "61AE", "7DAE", "99AE", "B5AE", "D1AE", "EDAE", "09AF", "25AF", "41AF", "5DAF", "79AF", "95AF", "B1AF", "CDAF", "E9AF", "05B0", "21B0", "3DB0", "59B0", "75B0", "91B0", "ADB0", "C9B0", "E5B0", "01B1", "1DB1", "39B1", "55B1", "71B1", "8DB1", "A9B1", "C5B1", "E1B1", "FDB1", "19B2", "35B2", "51B2", "6DB2", "89B2", "A5B2", "C1B2", "DDB2", "F9B2", "15B3", "31B3", "4DB3", "69B3", "85B3", "A1B3", "BDB3", "D9B3", "F5B3", "11B4", "2DB4", "49B4", "65B4", "81B4", "9DB4", "DAB4", "DAB4", "F6B4", "F6B4", "33B5", "4FB5", "6BB5", "87B5", "A3B5", "DBB5", "FCB5", "01B6", "1DB6", "43B6", "7BB6", "80B6", "9CB6", "B8B6", "D4B6", "F0B6", "28B7", "28B7", "44B7", "B4B7", "7CB7", "98B7", "B9B7", "D5B7", "F1B7", "0DB8", "29B8", "45B8", "45B8", "82B8", "9EB8", "BFB8", "DBB8", "F7B8", "13B9", "2FB9", "4BB9", "7FBA", "83B9", "9FB9", "BBB9", "D7B9", "F3B9", "0FBA", "2BBA", "47BA", "63BA", "84BA", "A0BA", "BCBA", "D8BA", "F4BA", "10BB", "2CBB", "48BB", "64BB", "80BB", "9CBB", "B8BB", "D4BB", "F0BB", "0CBC", "28BC", "44BC", "60BC", "7CBC", "98BC", "B4BC", "D0BC", "ECBC", "08BD", "24BD", "40BD", "5CBD", "78BD", "94BD", "B0BD", "CCBD", "E8BD", "04BE", "20BE", "3CBE", "58BE", "74BE", "90BE", "ACBE", "C8BE", "E4BE", "00BF", "1CBF", "38BF", "54BF", "70BF", "8CBF", "A8BF", "C4BF", "E0BF", "FCBF", "18C0", "34C0", "50C0", "6CC0", "88C0", "A4C0", "C0C0", "DCC0", "F8C0", "14C1", "30C1", "4CC1", "68C1", "84C1", "A0C1", "BCC1", "D8C1", "F4C1", "10C2", "2CC2", "48C2", "64C2", "80C2", "9CC2", "B8C2", "D4C2", "F0C2", "0CC3", "28C3", "44C3", "60C3", "7CC3", "98C3", "B4C3", "D0C3", "ECC3", "08C4", "24C4", "40C4", "5CC4", "78C4", "94C4", "B0C4", "CCC4", "E8C4", "04C5", "20C5", "3CC5", "58C5", "74C5", "90C5", "ACC5", "C8C5", "E4C5", "00C6", "1CC6", "38C6", "54C6", "70C6", "8CC6", "A8C6", "C4C6", "E0C6", "FCC6", "18C7", "34C7", "50C7", "6CC7", "88C7", "A4C7", "C0C7", "DCC7", "F8C7", "14C8", "30C8", "4CC8", "68C8", "84C8", "A0C8", "BCC8", "D8C8", "F4C8", "10C9", "2CC9", "48C9", "64C9", "80C9", "9CC9", "B8C9", "D4C9", "F0C9", "0CCA", "28CA", "44CA", "60CA", "7CCA", "98CA", "B4CA", "D0CA", "ECCA", "08CB", "24CB", "40CB", "5CCB", "78CB", "94CB", "B0CB", "CCCB", "E8CB", "04CC", "20CC", "3CCC", "58CC", "74CC", "90CC", "ACCC", "C8CC", "E4CC", "00CD", "1CCD", "38CD", "54CD", "70CD", "8CCD", "A8CD", "C4CD", "E0CD", "FCCD", "18CE", "34CE", "50CE", "6CCE", "88CE", "A4CE", "C0CE", "DCCE", "F8CE", "14CF", "30CF", "4CCF", "68CF", "84CF", "A0CF", "BCCF", "D8CF", "F4CF", "10D0", "2CD0", "48D0", "64D0", "80D0", "9CD0", "B8D0", "D4D0", "F0D0", "0CD1", "28D1", "44D1", "60D1", "7CD1", "98D1", "B4D1", "D0D1", "ECD1", "08D2", "24D2", "40D2", "5CD2", "78D2", "94D2", "B0D2", "CCD2", "E8D2", "04D3", "20D3", "3CD3", "58D3", "74D3", "90D3", "ACD3", "C8D3", "E4D3", "00D4", "1CD4", "38D4", "54D4", "70D4", "8CD4", "A8D4", "C4D4", "E0D4", "FCD4", "18D5", "34D5", "50D5", "6CD5", "88D5", "A4D5", "C0D5", "DCD5", "F8D5", "14D6", "30D6", "4CD6", "68D6", "84D6", "A0D6", "BCD6", "D8D6", "F4D6", "10D7", "2CD7", "48D7", "64D7", "80D7", "9CD7", "B8D7", "D4D7", "F0D7", "0CD8", "28D8", "44D8", "60D8", "7CD8", "98D8", "B4D8", "D0D8", "ECD8", "08D9", "24D9", "40D9", "5CD9", "78D9", "94D9", "B0D9", "CCD9", "E8D9", "04DA", "20DA", "3CDA", "58DA", "74DA", "90DA", "ACDA", "C8DA", "E4DA", "00DB", "1CDB", "38DB", "54DB", "70DB", "8CDB", "A8DB", "C4DB", "E0DB", "FCDB", "18DC", "34DC", "50DC", "6CDC", "88DC", "A4DC", "C0DC", "DCDC", "F8DC", "14DD", "30DD", "4CDD", "68DD", "84DD", "A0DD", "BCDD", "F4DD", "F4DD", "10DE", "2CDE", "48DE", "64DE", "80DE", "9CDE", "B8DE", "D4DE", "F0DE", "0CDF", "28DF", "44DF", "60DF", "7CDF", "98DF", "B4DF", "D0DF", "ECDF", "08E0", "24E0", "40E0", "5CE0", "78E0", "94E0", "B0E0", "CCE0", "E8E0", "04E1", "20E1", "3CE1", "58E1", "74E1", "90E1", "ACE1", "C8E1", "E4E1", "00E2", "1CE2", "38E2", "54E2", "70E2", "8CE2", "A8E2", "C4E2", "E0E2", "FCE2", "18E3", "34E3", "50E3", "6CE3", "88E3", "A4E3", "C0E3", "DCE3", "F8E3", "14E4", "30E4", "4CE4", "68E4", "84E4", "A0E4", "BCE4", "D8E4", "F4E4", "10E5", "2CE5", "48E5", "64E5", "80E5", "9CE5", "B8E5", "D4E5", "F0E5", "0CE6", "28E6", "44E6", "60E6", "7CE6", "98E6", "B4E6", "D0E6", "ECE6", "08E7", "24E7", "40E7", "5CE7", "78E7", "94E7", "B0E7", "CCE7", "E8E7", "04E8", "20E8", "3CE8", "58E8", "74E8", "90E8", ""]         €          STXT  ,à      ,¾   ["", "", "Andross Square", "Black Hole Sprite", "Andross Cube", "", "", "", "", "", "Explosion", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Big Asteroid", "", "", "", "", "", "", "", "", "Nova bomb", "Nova bomb 2", "Explo 2", "Big Explo 3", "Big Explo ", "Big Explo ", "Big Explo ", "Big Explo ", "Big Explo ", "Big Explo ", "nothing?", "nothing?", "nothing?", "ÓGAMEÓ", "ÓOVERÓ", "Alien pilot", "Sparks", "Nothing?", "Flashing antenna", "Bigger Flashing antenna", "Bigger Flashing antenna", "Flashing antenna", "White morphing fire", "Flashing yellow morphing fire", "Flashing blue morphing fire", "Flashing flat blue morphing shot", "Weird flat asteroid sprite (unused?)", "Same but bigger", "Same but even bigger", "Walker with leg broken", "Walker with leg missing", "Walker walking", "Growing column", "Bee!", "Weird antenna", "Antenna top", "Hexagonal multi-missile head", "Hexagonal multi-missile head", "", "Slamming outdoor wall", "Slamming outdoor wall", "Slamming outdoor wall", "Flat four pronged enemy", "Pyramid", "Flat far away ship", "??", "??", "Caterpillar head", "Caterpillar part", "Cloaking Ship", "??", " Caterpillar part", "Caterpillar head part", "Shadow", "blue red pill", "mini ship", "mini ship 2", "mini ship 2", "turret", "Tank track", "Tank track Corner", "Tank track Corner", "mine?", "shaded cone spike", "Launcher hovercraft", "Exploding mine part", "Exploding mine part", "??", "falling column orange", "falling column blue", "column orange (A3 B8)", "Mid level ring", "Magic door! (unused in game)", "Plasma Hydra Boss arms", "Plasma Hydra Boss arms bulging", "Plasma Hydra Boss body", "Plasma Hydra animated claws", "neck/tail for Monarch Dodora Boss", "Monarch Dodora Boss head", "Monarch Dodora body animation", "Monarch Dodora Boss tip of tail", "mini bird", "Egg", "Egg broken top", "Egg broken bottom", "bird boss flapping wing", "bird boss flapping wing", "Motorist", "Large missile", "dart", "Big blue Bonus Archway", "Bonus vertical doorway", "Horiz Arrow sliding door", "Random poly", "scramble line part", "scramble arches", "scramble tunel", "Big walker", "Asteroid flat + enemy", "Weird vent?", "Dancing Insector head", "Dancing Insector Boss leg", "Dancing Insector leg", "Dancing Insector top", "Parrot (Bonus OOTD bird)", "flashing flat blue hexagon", "Shadow small high poly arwing", "Small high poly arwing", "Big high poly arwing", "Lava erruption", "Slot Machine", "Slot Machine Arm", "Training Ring (Flashing blue)", "Andross Cube + pyramids", "Tower top", "Yellow-red flashing shot", "Rock formation (irregular gray shape)", "Four pronged space thing", "Diafragm Door", "Rock reverse faces", "Rock reverse faces and broken", "Rock Crusher Boss part", "Rock Crusher Boss flashing dimple", "Rock Crusher Boss rotating part", "Spinning Core bumpers", "Electric thing under Spinning Core Boss", "Spinning Core Boss top", "Spinning Core flaps up", "Spining Core flaps down", "Spinning Core flaps parts closed", "Spinning Core flaps parts closed", "Black lines", "lines", "lines", "lines", "lines", "lines", "mess", "Armada Battleship entry", "Atomic Base entry", "Atomic Base entry zoom", "Weird black/orange button", "Weird portal", "Weird portal 2", "Weird portal wire frame", "Weird portal wire frame 2", "Flashing yellow stripe", "Black rectangle", "Gray rectangle", "Black large rectangle", "Gray rectangle", "Gray rectangle smaller", "Gray rectangle large", "Inside black tunnel", "Inside gray tunnel", "little tower top", "box with flashing top", "Butterfly", "Attack carrier right launcher", "Attack carrier middle part", "Attack carrier low poly middle", "Attack carrier left shield", "A-carrier top left closing"...
I had to cut it short because it won't fit in the post. Each of these addresses points to the correct info for every 3D model in Star Fox 1 for SNES. What I don't have is the correct formula that points to the correct model. So I have the address in the list which is "20D3" (http://"20D3") which is called "D320: Normal arwing" (fliped hex values). They should point to h8F373 using the following formula":
Quote
After that -20 D3- is the "object pointer". Again do $2E15+$D320-$8000 to get the ROM address, which is actually where this line of data can be found, I don't know why it's
included there since it's implicit, but it seems some objects have different offsets than their own stored there.

Now I have each address of each model and the reference text from each of them can be found in SFXedit 0.93.exe . I'm guessing this can be used to build the correct formula o to correct my methods.


News 2!

Well, this is kinda disappointing:
Quote
73 F1 11 96 F1 F4 01 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 04 D3 04 D3 04 D3 04 D3 Normal arwing
73 F1 11 96 F1 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 20 D3 20 D3 20 D3 20 D3 Normal arwing
73 F1 11 96 F1 00 00 00 00 00 24 00 0E 00 50 00 50 00 13 82 3C D3 3C D3 3C D3 3C D3 Normal arwing
B3 F2 11 D9 F2 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 7C 80 58 D3 58 D3 58 D3 58 D3 Shadow arwing no right wing
B3 F2 11 D9 F2 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 74 D3 74 D3 74 D3 74 D3

There is the complete list of correct references to each 3D model too. These contain the color palette info, size, etc. First one is the now infamous "20D3" (http://"20D3") but with other attributes.

Found this too in case it helps anyone:
Quote
=-=-=
SNES Documentation v1.0: Written by Yoshi of Digital Exodus.
=-=-=
0)    "Why write a document like this?" 'Why ask why, code 'till ya die'
1)    Memory Map.


News 3!

Also found the RGB palette he used. Since Star Fox uses a checkerboard pattern made of other colours from a fixed palette, he had to convert every checkerboard color in order to correctly display that "color" in openGL (which is used by shockwave and modern 3D accelerated games). So it would be the info posted by Mattrizzle previously in the thread but converted to openGL RGB values like this:
Quote
rgb( 243, 89, 105 ), rgb( 170, 8, 65 ), "04,11", "3E,1B", "3E,11", "3E,1B", rgb( 137, 129, 109 ), rgb( 170, 251, 251 ), rgb( 105, 219, 251 ),
Notice how he ported the table of Hex valued checkerboard colors into RGB values. Pretty neat really... wow! it seems he did every single permutation possible, this is a huge list!
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 11, 2013, 05:51:09 pm
Wow glad to see you are back to your project :)
Actually i'm stuck at the exact same point as you, i try to figure where find the object data from the object id in the rom.
Specially this 20D3 arwing object as we do know what data we can expect at the object address.
I even missed the important thread where VL-tones gave the address formula calculation but seems that is not enough to figure it..
I tried to look at the 28 bytes object header but it is quite hard to read it as some text overwrite the values. Anyway even by getting it right i can barely understand the palette address and object number, others values as vertex and faces pointer doesn't make any sense for me...

February 11, 2013, 06:31:56 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Ok i figured how to get the 28 bytes header address from the object id :

object id : $20D3 --> $D320 - $7E00 = $5520
and we find at this address :
73 F1 11 96 F1 00 00 00 AC 5D 24 00 0E 00 50 00 50 00 13 82 20 D3 20 D3 20 D3 20 D3

which correspond to the arwing object header.

I found it only by taking the first object id (15AC --> $AC15) and subtracting address of start for header data ($2E15) which make more sense :)

Well now i have to figure address of vertex data :o

February 11, 2013, 07:05:58 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Figured the object address !

Let take the 5 first bytes in the arwing object header:

73 F1 11 96 F1

We should see these 5 bytes as 2 five digits address :
73 F1 1  and  96 F1 1
Note how the second '1' position should be inverted. I think  they did that to avoid wasting one byte in the header.

The first address is used to find the vertex data :
73 F1 1 --> 1 F1 73
$70200 + $1F173 = $8F373
I have verified that $70200 correspond to the beginning of all object data.

The second address is used to find the face (and BSP tree) data :
96 F1 1 --> 1 F1 96
$70200 + $1F196 = $8F396

That's it ! Now we can rip all SFX models =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 11, 2013, 07:58:10 pm
xD
AWESOME! I've wanted that info for years now! This is great!
I'll reread your message many times now and be back later when I try everything.

By the way, as I mentioned in my previous comment if you open SFXedit 0.93.exe with a Hex editor o in a text editor you will find the list of 3D models and the Stage locations within in plain text! Also, every one of those 28 bit groups that make up a model. Also the conversion for the color palette is there too, there are a few text files in there that should be ripped but I'm guessing there is a better way than doing it by hand.
This is the part that I just mentioned and the list is for every model in SF SNES
Quote
73 F1 11 96 F1 F4 01 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 04 D3 04 D3 04 D3 04 D3 Normal arwing
73 F1 11 96 F1 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 20 D3 20 D3 20 D3 20 D3 Normal arwing
73 F1 11 96 F1 00 00 00 00 00 24 00 0E 00 50 00 50 00 13 82 3C D3 3C D3 3C D3 3C D3 Normal arwing
B3 F2 11 D9 F2 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 7C 80 58 D3 58 D3 58 D3 58 D3 Shadow arwing no right wing
B3 F2 11 D9 F2 00 00 00 B2 5D 24 00 0E 00 50 00 50 00 13 82 74 D3 74 D3 74 D3 74 D3

So you cracked it! Congratulations! I am forever in your debt.



Just to play around, as exists in SFXedit 0.93.exe
Quote
D0BC Big high poly arwing:
01 E0 0C 42 E0 00 00 01 00 00 8C 00 38 00 C8 00 FA 00 13 82 D0 BC D0 BC D0 BC D0 BC Big high poly arwing
Also just noticed that SFXEdit has a VrtxPtr and FacePtr which account for your use of two and a half hex values for location vertex and face values. I would have never noticed that.

Verified in the Rom with your correct calculations.
Quote
01 E0 0C 42 E0 00 00 01 00 00 8C 00 38 00 C8 00 FA 00 13 82 D0 BC D0 BC D0 BC D0 BC

Okay,  I think there is some other offset or something because I cannot find this correct info. I'm doing these calculations manually for the D0BC Big high poly arwing and I'm getting the following:
01 E0 0   -->    0 E0 01    -->    70200+0E001 = 7E201       (Points to something that would have 0 vertex data. Also, there should be a 0C before and after this block or some other separator)
42 E0 C   -->    C E0 42   -->     70200+CE042 = 13E242     (Point anything after EOF)

I'll try and find the correct address from SFXEdit, maybe that could help. :D
Also, do you recommend any good hex calculators for this?
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Ryusui on February 12, 2013, 01:58:38 am
Also, do you recommend any good hex calculators for this?

Windows' own built-in calculator is good.

And if you like my avatar, then you'll love this:

http://www.youtube.com/watch?v=pMQ-t3nGzrI
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 12, 2013, 07:16:10 am
http://www.youtube.com/watch?v=pMQ-t3nGzrI
xD I have the dvd! far too good! Always funny.

@Stef
Look at the method that VL-Tone had posted for finding a reference (not 3D model) which never worked for me:
Quote
$2E15+$D320-$8000
It's dependant on the D320 as an offset and he also mentions that he doesn't know why a 28 byte header has values that point to itself (Arwing does):
Quote
...which is actually where this line of data can be found, I don't know why it's included there since it's implicit, but it seems some objects have different offsets than their own stored there.
so I'm guessing your function works specifically for 20D3 but not for others, I'll try and figure it out today.
There is also one thing that I found interesting, you said the 3D models begin at 70200, I can see they do but then I expected to find an object pointer like this one "00 00 0x xx xx" so the address would be "0 00 00" plus your offset but there is no object reference like that one on VL-Tone big list, so there has to be another offset that was already included in your method or I'm completely wrong!

I'll be back later from work, cya!
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 12, 2013, 09:11:12 am
xD
AWESOME! I've wanted that info for years now! This is great!
I'll reread your message many times now and be back later when I try everything.

By the way, as I mentioned in my previous comment if you open SFXedit 0.93.exe with a Hex editor o in a text editor you will find the list of 3D models and the Stage locations within in plain text! Also, every one of those 28 bit groups that make up a model. Also the conversion for the color palette is there too, there are a few text files in there that should be ripped but I'm guessing there is a better way than doing it by hand.
This is the part that I just mentioned and the list is for every model in SF SNES
So you cracked it! Congratulations! I am forever in your debt.

Thanks :D
I saw what you posted about these list but don't you have access to them through the application ?
When you go to the object viewer you can see the complete object list at the right with a small description.
And if you select an object you can get the 28 byte header at bottom (but not very readable...).
Also you have the level selection with its name and address visible on level editor screen, just in the left column.
I guess plain texts from the exe are here for that.
About the palette color, i already almost figured how they were encoded and as i want to reuses the exact same rendering as the original (with mesh effect) i need to directly interpret it from the ROM data :)

Quote
Just to play around, as exists in SFXedit 0.93.exeAlso just noticed that SFXEdit has a VrtxPtr and FacePtr which account for your use of two and a half hex values for location vertex and face values. I would have never noticed that.

Yeah i saw that, but never understood how to read the value... As numbers and text overlap it was pretty uncommon too.
In the link you were referring :
http://acmlm.kafuka.org/archive2/thread.php?id=4730&pl=96583

VL-Tone already mentioned that first 5 bytes were probably describing vertex & poly data... i just tried to figure how we could read $8F373 from it X'D

Quote
Verified in the Rom with your correct calculations.
Okay,  I think there is some other offset or something because I cannot find this correct info. I'm doing these calculations manually for the D0BC Big high poly arwing and I'm getting the following:
01 E0 0   -->    0 E0 01    -->    70200+0E001 = 7E201       (Points to something that would have 0 vertex data. Also, there should be a 0C before and after this block or some other separator)
42 E0 C   -->    C E0 42   -->     70200+CE042 = 13E242     (Point anything after EOF)

I'll try and find the correct address from SFXEdit, maybe that could help. :D
Also, do you recommend any good hex calculators for this?

Oh you're right, i should have tested on the high poly arwing...
Well i probably missed something ^^ What is strange is that $70200 really looks as the start of the object data.
I will continue my investigations tonight after my job :)


February 12, 2013, 09:23:05 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Quote from: dyson132
Look at the method that VL-Tone had posted for finding a reference (not 3D model) which never worked for me:It's dependant on the D320 as an offset and he also mentions that he doesn't know why a 28 byte header has values that point to itself (Arwing does):so I'm guessing your function works specifically for 20D3 but not for others, I'll try and figure it out today.

The formula given by VL-Tone just seems wrong to me :

$2E15+$D320-$8000 = $8135

I tested and $8135 definitely do not point to the 28 bytes header.

If you take the object 16 number, you'll notice the smallest object value is 15AC --> $AC15
We also know the start of 28 byte object header is located at $2E15. You immediately see the common part in both address so naturally you can think about doing $AC15 - $2E15 to get the offset : $7E00.

It's easy to see that it work as each object address are spaced by 28 bytes :)

Quote
There is also one thing that I found interesting, you said the 3D models begin at 70200, I can see they do but then I expected to find an object pointer like this one "00 00 0x xx xx" so the address would be "0 00 00" plus your offset but there is no object reference like that one on VL-Tone big list, so there has to be another offset that was already included in your method or I'm completely wrong!

By VL-Tone big list, are you talking about the list inside the SFXEdit exe ?
What is weird is that all data are actually contained in the ROM, if VL-Tone figured all address calculations he don't have to store them in SFXEdit program as it can compute them from the ROM. The only reason for that is he wanted to add specific description to some object / data which are absent from the ROM.
Well, i will look more closely in the rom later tonight and kee you informed of my progresses :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 12, 2013, 12:18:04 pm
Back from work!

Also you have the level selection with its name and address visible on level editor screen, just in the left column.
I guess plain texts from the exe are here for that.
Exactly, you can read them in the application but not copy/paste them outside. Having them as text files would be useful just as verification for your method. Also, I was curious about maybe finding the "formula" in SFXedit.exe for the correct position of each model in the rom since it is clearly there and it uses these text lists. I did find some formulas in plain text but I don't know why, this shockwave file is not encrypted either. Ultimately all this shows how far VL-Tone had gotten to building an editor, too bad he stopped.

About the palette color, i already almost figured how they were encoded and as i want to reuses the exact same rendering as the original (with mesh effect) i need to directly interpret it from the ROM data.
Sure this is what I wanted too but I can see two methods, the openGL floating point one and the checkerboard one which I know can be done in openGL using fixed color palettes (not floating point colors).

By VL-Tone big list, are you talking about the list inside the SFXEdit exe ?
What is weird is that all data are actually contained in the ROM, if VL-Tone figured all address calculations he don't have to store them in SFXEdit program as it can compute them from the ROM. The only reason for that is he wanted to add specific description to some object / data which are absent from the ROM.
That is why I was dissapointed but my guess is VL-Tone had the lists in order to have everything very clean. SFXEdit was supposed to be a level editor and having the headers in the editor would have been usefull... BUT maybe illegal since it was supposed to be portions of the ROM, also remember he was reverse-engineering it with no prior info and integrating what he had so I guess the lists would have disappeared at some point.
What I did not find in SFXEdit was each model separately so those are read directly from the rom. I wanted to find a few so I could search for the string in the ROM and give you another 3D model with which to solve the offset equation.


News!
I found what seem to be the complete hex values for the following models inside the SFXEdit and if one searches for them in the real ROM then those are the addresses. I think the value next to the name are the flipped bytes you mentioned. Yes! LOCATIONS and MODELS! Some of them seem to have been parsed for better reading
Big high poly arwing 0C E001             -> 01 E0 0C 42 E0 00 00 01 00 00 8C 00 38 00 C8 00 FA 00 13 82 D0 BC D0 BC D0 BC D0 BC Big high poly arwing
Growing column 0C 878B                    -> 8B 87 0C 83 88 00 00 02 6C 61 20 00 3C 01 28 00 4C 01 13 82 49 B4 49 B4 49 B4 49 B4 Growing colum (...careful! this one is animated)
Two sides Blue square 0F C474          -> 74 C4 0F 83 C4 00 00 00 00 00 1C 00 28 00 1C 00 38 00 D8 81 30 CF 30 CF 30 CF 30 CF Two sides Blue square
Attack carrier middle part 0E A030      -> 30 A0 0E 75 A0 00 00 03 EE 69 A0 00 F0 00 B8 01 D8 01 ED 82 64 C2 64 C2 64 C2 64 C2 Attack carrier middle part
Walker walking 0C 82B3                     -> B3 82 0C 91 86 00 00 02 0C 67 80 00 88 01 88 00 A0 00 13 82 2D B4 2D B4 2D B4 2D B4 Walker walking (animated too!)
(Verified headers in SFXEdit and also if they have animations)

So I can now give you 6 model headers with their corresponding locations inside the ROM (1 the already documented Arwing + 5 I found in SFXEdit). With these I'm sure one can make a better equation for the locations.

Big high poly arwing 0C E001
Located at $66201 in the SF SNES ROM
The correct header:
01 E0 0C 42 E0 00 00 01 00 00 8C 00 38 00 C8 00 FA 00 13 82 D0 BC D0 BC D0 BC D0 BC Big high poly arwing

Quote
Big high poly arwing 0C E001
["04"
"04"
"00", "FE", "EC", "00", "FF", "F0", "00", "0A", "08", "00", "02", "32", "38", "10", "23", "0E", "CE", "1B", "09", "E2", "1E", "09", "E2", "14", "F5", "E2", "EC", "09", "EC", "02", "F9", "F3", "FB", "03", "F5", "0F", "03", "F5", "F4", "05", "F6", "0A", "04", "F6", "14", "04", "F6", "F3", "06", "F9", "EE", "06", "F9", "0F", "FD", "F9", "02", "FE", "05", "0F", "0C", "0A", "0C", "30", "30", "17", "23", "1F", "17", "1F", "0B", "0A", "1E", "16", "1E", "22", "16", "1B", "16", "18", "1D", "18", "16", "1C", "19", "17", "1A", "17", "19", "0A", "16", "12", "16", "22", "12", "04", "18", "16", "16", "18", "0D", "18", "04", "0D", "04", "16", "0D", "17", "19", "05", "0C", "19", "17", "13", "23", "17", "0C", "17", "05", "13", "17", "0B", "05", "09", "07", "06", "08", "04", "04", "08", "06", "07", "09", "05", "0C", "05", "19", "15", "03", "16", "16", "03", "15", "17", "03", "14", "14", "03", "17", "17", "10", "01", "01", "10", "11", "10", "17", "16", "00", "01", "11", "16", "17", "02", "03", "02", "17", "16", "02", "03", "20", "16", "03", "03", "17", "21", "21", "20", "03", "0E", "20", "21", "20", "0E", "16", "0F", "21", "17", "0E", "00", "16", "17", "00", "0F", "00", "0E", "0F", "12", "22", "0A", "0B", "23", "13", "0A", "22", "1E", "1F", "23", "0B", "3C", "28", "00", "30", "00", "0C", "28", "06", "36", "00", "04", "44", "3E", "00", "44", "73", "00", "28", "02", "9F", "00", "0C"...
CUT!

Big high poly arwing 0C E001             -> Located at $66201
Growing column 0C 878B                    -> Located at $6098B
Two sides Blue square 0F C474          -> Located at $7C672
Attack carrier middle part 0E A030      -> Located at $7222E
Walker walking 0C 82B3                     -> Located at $604B3
Motorist 0C BD27                                -> Located at $63F27
Flashing wireframe beam 11 98DC     -> Located at $89ADC

I've checked somewhat thoroughly but I may have mistakes.

Also found a somewhat deeper explanation of the colour palette and its use in the SXFEdit at $603B0E, there is a lot more than the following:
Quote
[[#facenumber: 1, #colors: [32, 127, 0, 0], #facevertices: [17, 12, 2, 6], #coloff: 163, #vertorderoff: 167, #facecount: 4], [#facenumber: 2, #colors: [30, 0, 0, 129], #facevertices: [19, 17, 6, 7], #coloff: 175, #vertorderoff: 179, #facecount: 4]..Cut!

XX 3E= Color where XX is Light sourced color from 256 color Palette (16 colors checkerboard combinaisons)
XX 3F= Color where X is from 4-bit pal
XX 40= 32x32 Texture where XX is texture position number flip horiz
XX 41= 64x64 Texture
XX 42= 8x8 Texture
XX 43= 64x16 Texture repeated 4 times
XX 44= 32x8 Texture
XX 45= 32x8 Texture flip horiz
XX 46= 64x64 Texture flip horiz
XX 47= 16x8 Texture
XX 48= 32x32 Texture flip horiz
XX 49= 64x64 Texture Polar Mapping Down Left
XX 4A= 64x64 Texture Polar Mapping Down Right
XX 8X= Animated texture where XXX is anim data offset (18 XXX$ in ROM)

Quote
[symbol,name,length,type,pos]
--if pos=0 then data is locked, if 1 then its editable
--86 Two bytes Object with 16 bits x,y,z pos and ztimer bytes using a behavior defined by a 3 bytes address
 "86": objdef=[#addr:baseadd,#objtyp:theobj,#LEN :14,#z:[3,2],#x:[5,4],#y:[7,6],#zoff:[9,8],#objad:[10,11],#bhaddr:[14,13,12],#objnam:"",#bhname:""]

[ #86:[#addr,"addr:h",6,#ihex,0],[#objtyp,"objtyp:h",2,#ihex,0], [#len,"length:",2,#idec,0], [#objad,"objid:h",4,#ihex,1], [#objname,"objname:",5,#str,1]], [], [#bhaddr,"bhaddr:h",6,#ihex,1],[#x,"x:",5,#sdec16,1], [#y,"y:",5,#sdec16,1], [#zoff,"z:",5,#sdec16,1], [#z,"ztimer:",5,#sdec16,1]]

I can see all these text files inside the EXE but is there any easy way to extract them? I tried the simplest resource extractor I could find and it didn't work.

Stage script using hex:
Quote
"Uses next 8C object as path/behavior", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "00: locks camera", "01: ?", "02: ?", "03: ?", "04: flashing thing?", "05: flashing thing?", "06: flashing thing?", "07: flashing thing?", "08: ?", "09: ?", "0A:", "0B:", "0C:", "0D: black tunnel entry", "0E: black tunnel entry", "0F: Arwing tilted right, fly away forward (level X end).", "10: Arwing tilted left, fly away forward (level X end).", "11: Arwing in middle, fly away forward (level X end).", "12: Arwing in middle, mimicks the player vertical movement and reverse horizontal then fly away forward .", "13: Arwing in middle, mimicks the player vertical movement and reverse horizontal then fly away forward ."...CUT!

VL-Tone seems to be emulating the SNES and Super FX chip in the SFXEdit. There is the "Written by Yoshi of Digital Exodus.v 1" and a whole bunch of docs about the SNES chipset. I think this explains why the SFXEdit has slow framerate even in good hardware, because the framerate would be that of the SNES.
Quote
Jouko Valta (jopi@stekt.oulu.fi).
GTE                  G 65 SC 802 / G 65 SC 816
Microcircuits
CMOS 8/16-Bit Microprocessor Family
Features
   Advanced CMOS design for low power consumption and increased
     noise immunity
   Emulation mode for total software compatibility with 6502 designs
   Full 16-bit ALU, Accumulator, Stack Pointer, and Index Registers
   Direct Register for ''zero page'' addressing
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 12, 2013, 04:43:04 pm
Nice ! You are right, the SFXEdit exe file contains a lot of hardwired informations., your last post helped me in figuring the address decoding, at least i believe i have it correct now :)

We already had correct for object header address :

Object header address = object id - $7E00    (would be $8000 with a headered rom).

For instance low arwing object id is 20D3 (we have all object id from rom starting at location $284B) :
Object header address = $D320 - $7E00 = $5520

If we look at location $5520 in the rom we indeed find the low poly arwing header :
$5520: 73 F1 11 96 F1 00 00 00 AC 00 0E ....

Now from the header we can get the vertex and poly data location.

The first 2 byte represent the address of vertex data :
73 F1 --> $F173

Third byte refer the bank number (i was wrong here) :
$11

4th and 5th byte represent the address of face data :
96 F1 --> $F196

To compute the final address in the rom you have to use this formula :
((bank number - 1) * $8000) + $200 + address.

So that give us the following address for vertex and face :
vertex address = ($10 * $8000) + $200 +  $F173 = $8F373
face address = (($10 * $8000) + $200 + $F196 = $8F396

Let's use the high poly arwing object id now : $B4BC

Object header address = $BCB4 - $7E00 = $3EB4
header $3EB4: 01 E0 0C 42 E0 ....

Vertex data ($B* $8000) + $200 + $E001 = $66201
Face data ($B* $8000) + $200 + $E042 = $66242

Now it seems accurate, i think we can rip all objects from rom now :)

February 12, 2013, 04:55:30 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
About palette there is an interesting post here about how interpret them :

http://acmlm.kafuka.org/archive2/thread.php?id=6876

I figured almost everything about palette from this post, it was a bit but now it works =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 12, 2013, 05:14:30 pm
Now it seems accurate, i think we can rip all objects from rom now :)
AWESOME! :D
Congrats!
I noticed there are two High Poly Arwings by the way, so I was kinda confused:
Quote
BCD0: Big high poly arwing
BCB4: Small high poly arwing
But yes I think you are very right. :D

About palette there is an interesting post here about how interpret them :
I figured almost everything about palette from this post, it was a bit but now it works =)

Yes, I've seen this but I wanted to show you that the SFXEdit has a bit more info inside in case you need it.
Is it possible to extract this long strings of text from the exe file? I tried the simplest resource extractor I could find and it didn't work.


Testing method for:
Big high poly arwing 0C E001             -> Vertex located at $66201                  -> Verified!
Growing column 0C 878B                    -> Vertex located at $6098B                  -> Verified!
Two sides Blue square 0F C474          -> Vertex located at $7C672                 -> Calculation says 7C674 (off by 2) possible human error (me). BTW, SFX v1.2 has padding between models.
Attack carrier middle part 0E A030      -> Vertex located at $7222E                 -> Calculation says 72230 (off by 2) possible human error (me). BTW, SFX v1.2 has padding between models.
Walker walking 0C 82B3                     -> Vertex located at $604B3                 -> Verified!
Motorist 0C BD27                                -> Vertex located at $63F27                 -> Verified!
Flashing wireframe beam 11 98DC     -> Vertex located at $89ADC                 -> Verified!

Yeap, it seems to work very well! :D


Here is part of the list of objects, I cannot fit all of them here but they are inside SFXEdit as text with [ ] and separators:
Quote
4DAC Andross Square
C9B0 Nova bomb
6DB2 Alien pilot
2DB4 Walker walking
49B4 Growing column
65B4 Bee!
F1B7 Launcher hovercraft
84BA Motorist
60BC Parrot?
48C2 Attack carrier right launcher
64C2 Attack carrier middle part
80C2 Attack carrier low poly middle
9CC2 Attack carrier left shield
B8C2 A-carrier top left closing
D4C2 A-carrier down left closing
F0C2 A-carrier mini-ships
3CC5 Hexagonal mini Hover tank
A4CE Water Dragon body part
C0CE Water Dragon head
DCCE Flower/Dragon part?
F8CE Flower part
14CF Flower part
0CD1 Andross Face Squares
28D1 Andross Face Squares big
44D1 Andross Face morph
E8D2 Shadow arwing
04D3 Normal arwing
20D3 Normal arwing
3CD3 Normal arwing
D0E6 UFO
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 12, 2013, 06:46:23 pm
AWESOME! :D
Congrats!
I noticed there are two High Poly Arwings by the way, so I was kinda confused:But yes I think you are very right. :D

Thanks for your efforts in ripping from SFXEdit ! that definitely helped in figuring it :)
Yeah i saw about the multiple high poly arwing, i guess there is only scale factor difference between them !

Quote
Yes, I've seen this but I wanted to show you that the SFXEdit has a bit more info inside in case you need it.
Is it possible to extract this long strings of text from the exe file? I tried the simplest resource extractor I could find and it didn't work.

Usually resource extractor should do it, did you tried hexa editor do do it ?
I extracted that with a hexa editor (frhed) :

Code: [Select]
15AC
31AC
4DAC Andross Square
69AC Black Hole Sprite
85AC Andross Cube
A1AC
BDAC
D9AC
F5AC
11AD
2DAD Explosion
49AD
65AD
81AD
9DAD
B9AD
D5AD
F1AD
0DAE
29AE
45AE
61AE
7DAE
99AE
B5AE
D1AE
EDAE
09AF
25AF
41AF
5DAF
79AF
95AF
B1AF
CDAF Big Asteroid
E9AF
05B0
21B0
3DB0
59B0
75B0
91B0
ADB0
C9B0 Nova bomb
E5B0 Nova bomb 2
01B1 Explo 2
1DB1 Big Explo 3
39B1 Big Explo
55B1 Big Explo
71B1 Big Explo
8DB1 Big Explo
A9B1 Big Explo
C5B1 Big Explo
E1B1 nothing?
FDB1 nothing?
19B2 nothing?
35B2 <bh:d3>GAME<bh:d3>
51B2 <bh:d3>OVER<bh:d3>
6DB2 Alien pilot
89B2 Sparks
A5B2 Nothing?
C1B2 Flashing antenna
DDB2 Bigger Flashing antenna
F9B2 Bigger Flashing antenna
15B3 Flashing antenna
31B3 White morphing fire
4DB3 Flashing yellow morphing fire
69B3 Flashing blue morphing fire
85B3 Flashing flat blue morphing shot
A1B3 Weird flat asteroid sprite (unused?)
BDB3 Same but bigger
D9B3 Same but even bigger
F5B3 Walker with leg broken
11B4 Walker with leg missing
2DB4 Walker walking
49B4 Growing column
65B4 Bee!
81B4 Weird antenna
9DB4 Antenna top
DAB4 Hexagonal multi-missile head
DAB4 Hexagonal multi-missile head
F6B4
F6B4 Slamming outdoor wall
33B5 Slamming outdoor wall
4FB5 Slamming outdoor wall
6BB5 Flat four pronged enemy
87B5 Pyramid
A3B5 Flat far away ship
DBB5 ??
FCB5 ??
01B6 Caterpillar head
1DB6 Caterpillar part
43B6 Cloaking Ship
7BB6 ??
80B6  Caterpillar part
9CB6 Caterpillar head part
B8B6 Shadow
D4B6 blue red pill
F0B6 mini ship
28B7 mini ship 2
28B7 mini ship 2
44B7 turret
B4B7 Tank track
7CB7 Tank track Corner
98B7 Tank track Corner
B9B7 mine?
D5B7 shaded cone spike
F1B7 Launcher hovercraft
0DB8 Exploding mine part
29B8 Exploding mine part
45B8 ??
45B8 falling column orange
82B8 falling column blue
9EB8 column orange (A3 B8)
BFB8 Mid level ring
DBB8 Magic door! (unused in game)
F7B8 Plasma Hydra Boss arms
13B9 Plasma Hydra Boss arms bulging
2FB9 Plasma Hydra Boss body
4BB9 Plasma Hydra animated claws
7FBA neck/tail for Monarch Dodora Boss
83B9 Monarch Dodora Boss head
9FB9 Monarch Dodora body animation
BBB9 Monarch Dodora Boss tip of tail
D7B9 mini bird
F3B9 Egg
0FBA Egg broken top
2BBA Egg broken bottom
47BA bird boss flapping wing
63BA bird boss flapping wing
84BA Motorist
A0BA Large missile
BCBA dart
D8BA Big blue Bonus Archway
F4BA Bonus vertical doorway
10BB Horiz Arrow sliding door
2CBB Random poly
48BB scramble line part
64BB scramble arches
80BB scramble tunel
9CBB Big walker
B8BB Asteroid flat + enemy
D4BB Weird vent?
F0BB Dancing Insector head
0CBC Dancing Insector Boss leg
28BC Dancing Insector leg
44BC Dancing Insector top
60BC Parrot (Bonus OOTD bird)
7CBC flashing flat blue hexagon
98BC Shadow small high poly arwing
B4BC Small high poly arwing
D0BC Big high poly arwing
ECBC Lava erruption
08BD Slot Machine
24BD Slot Machine Arm
40BD Training Ring (Flashing blue)
5CBD Andross Cube + pyramids
78BD Tower top
94BD Yellow-red flashing shot
B0BD Rock formation (irregular gray shape)
CCBD Four pronged space thing
E8BD Diafragm Door
04BE Rock reverse faces
20BE Rock reverse faces and broken
3CBE Rock Crusher Boss part
58BE Rock Crusher Boss flashing dimple
74BE Rock Crusher Boss rotating part
90BE Spinning Core bumpers
ACBE Electric thing under Spinning Core Boss
C8BE Spinning Core Boss top
E4BE Spinning Core flaps up
00BF Spinning Core flaps down
1CBF Spinning Core flaps parts closed
38BF Spinning Core flaps parts closed
54BF Black lines
70BF lines
8CBF lines
A8BF lines
C4BF lines
E0BF lines
FCBF mess
18C0 Armada Battleship entry
34C0 Atomic Base entry
50C0 Atomic Base entry zoom
6CC0 Weird black/orange button
88C0 Weird portal
A4C0 Weird portal 2
C0C0 Weird portal wire frame
DCC0 Weird portal wire frame 2
F8C0 Flashing yellow stripe
14C1 Black rectangle
30C1 Gray rectangle
4CC1 Black large rectangle
68C1 Gray rectangle
84C1 Gray rectangle smaller
A0C1 Gray rectangle large
BCC1 Inside black tunnel
D8C1 Inside gray tunnel
F4C1 little tower top
10C2 box with flashing top
2CC2 Butterfly
48C2 Attack carrier right launcher
64C2 Attack carrier middle part
80C2 Attack carrier low poly middle
9CC2 Attack carrier left shield
B8C2 A-carrier top left closing
D4C2 A-carrier down left closing
F0C2 A-carrier mini-ships
0CC3 Yellow flying enemy
28C3 Blue flying enemy
44C3 Enemy wing
60C3 wireframe shielded Arwing
7CC3 wireframe Arwing no right wing
98C3 wireframe Arwing no left wing
B4C3 wireframe Arwing no wings
D0C3 Interlocking doors opening
ECC3 Antenna dish
08C4 Antenna base
24C4 Pylone
40C4 Pylone 2
5CC4 Twin flasher/repair enemy
78C4 Twin flasher item
94C4 Nova bomb item
B0C4 Shield item
CCC4 Wing Repair item
E8C4 unused (filled cube shield)
04C5 mine, blue/red
20C5 Repairing Arwing
3CC5 Hexagonal mini Hover tank
58C5 Enemy with some wireframe
74C5 Morphing boss part (round room)
90C5 Atomic Base core opening
ACC5 Atomic Base core opening 2
C8C5 Half monolyte (white)
E4C5 Atomic base targets
00C6 Atomic base electric arcs
1CC6 Atomic Base beaks
38C6 Exploded polys
54C6 Slot flashing button
70C6 Slot disabled button
8CC6 A-Carrier2 rotating heads
A8C6 A-Carrier2 main head
C4C6 A-Carrier2 tank base
E0C6 Armada ship core stand
FCC6 Armada ship core
18C7 Unknown boss or portal part
34C7 A-Carrier2 tank middle
50C7 A-Carrier2 tank right
6CC7 A-Carrier2 tank left
88C7 Phantron transformation/jumping animation
A4C7 Phantron closed
C0C7 Mountain with antennas
DCC7 Manned pod ship
F8C7 Winged fat ship
14C8 Phantron leg
30C8 Phantron leg
4CC8 Wingling tail enemy
68C8 Small Bonus Archway
84C8 Long cannon tank
A0C8 Mothership part
BCC8 Octogonal tunnel blue
D8C8 Rectangle tunnel orange
F4C8 Letter D orange
10C9 Letter D blue
2CC9 Scenery White box
48C9 Scenery small White box
64C9 Scenery White high rise box
80C9 Scenery White high rise box
9CC9 Galactic rider door
B8C9 Base shooting red/blue rings
D4C9 Metal Crusher right
F0C9 Metal Crusher left
0CCA Metal Crusher again
28CA Space Truck
44CA Boss three prong opening top
60CA Boss three prong opening top
7CCA Hexa orange with black top
98CA Atomic base part
B4CA Web
D0CA Yellow flat octogon
ECCA White prism
08CB Vertical Orange white column
24CB Big mountain with entry
40CB Fake flat mountain entry
5CCB Long orange tunnel
78CB Orange/gray tunnel
94CB Professor Hanger
B0CB Vertical opening interlock doors
CCCB Mountain part orange
E8CB Mountain part blue
04CC Mountain part white
20CC Mountain part 2 orange
3CCC Mountain part 2 blue
58CC Mountain part 2 white
74CC Mountain part 3 orange
90CC
ACCC
C8CC Mountain part 4 orange
E4CC
00CD
1CCD Mountain part 5 orange
38CD
54CD
70CD Mountain part 6 orange
8CCD
A8CD
C4CD Helicopter
E0CD Metal Crusher mines
FCCD Mountain part 7 orange
18CE Little mountain blue
34CE Little mountain white
50CE Flying Fish
6CCE Growing green leaf
88CE Blossoming flower
A4CE Water Dragon/Flower part
C0CE Water Dragon head
DCCE Flower/Dragon part?
F8CE Flower part
14CF Flower part
30CF Two sides Blue square
4CCF Small Flower
68CF Big Flower
84CF Flower part?
A0CF Flower part
BCCF Spider Boss head
D8CF Spider Boss leg
F4CF Spider Boss leg 2
10D0 Big vertical Entryway
2CD0 Long Octo Tunnel
48D0 Diafragm Door Blue
64D0 Interlocking Doors
80D0 ?? part
9CD0 Vertical Creature
B8D0 Flashing White thing
D4D0 Flashing White Monolyte
F0D0 Pale Monolyte
0CD1 Andross Face Squares
28D1 Andross Face Squares big
44D1 Andross Face morph
60D1 Andross Face morph 2
7CD1 Prof Hanger part
98D1 Vertical Tunnel Door
B4D1 Tunnel part
D0D1 Tunnel part orange
ECD1 Tunnel part orange
08D2 Tunnel part orange
24D2 Tunnel part
40D2 Tunnel part orange
5CD2 Tunnel twisting part
78D2 Orange Electronic Cube
94D2 Orange Electronic Column
B0D2 Orange Electronic Column
CCD2 nothing?
E8D2 Shadow arwing
04D3 Normal arwing
20D3 Normal arwing
3CD3 Normal arwing
58D3 Shadow arwing no right wing
74D3 Arwing no right wing
90D3 Shadow arwing no left wing
ACD3 Arwing no left wing
C8D3 Shadow arwing no wings
E4D3 Arwing no wings
00D4 Simple White building
1CD4 Buildings (4) one blue high
38D4 Buildings (3) one orange high
54D4 Buildings (4) all high rise
70D4 Building with Fox logo
8CD4 Great Commander Boss
A8D4 Great Commander Head
C4D4 Great Commander Head
E0D4 Great Commander trunk with rotating arms
FCD4 Great Commander base with opening vent
18D5 Great Commander whole, not animated
34D5 Great Commander part
50D5 Great Commander left arm
6CD5 Great Commander right arm
88D5 Opening Great Commander vent
A4D5 Opening Great Commander vent
C0D5 Explosion crater
DCD5 Explosion crater
F8D5 Unused?
14D6 Unused?
30D6 Some horizontal beam
4CD6 Some horizontal beam
68D6 Beveled White box
84D6 Beveled White square
A0D6 Beveled White beam
BCD6 Beveled White beam
D8D6 Beveled White square
F4D6 Beveled White beam
10D7 Rising Gray beam
2CD7 Rising arch
48D7 Arwing Cockpit
64D7 Big low poly arwing
80D7 Big arwing (no wings)
9CD7 Big arwing (no R wings)
B8D7 Big arwing (no L wings)
D4D7 PHANTRON Kicking
F0D7 PHANTRON part
0CD8 Dropped by some boss
28D8 Rotating Artsy thing
44D8 Rotating Artsy thing
60D8 Box thing
7CD8 Square thing
98D8 Box thing
B4D8 Box thing
D0D8 Box thing high
ECD8 Blue beam white ends
08D9 Hexagonal blue beam
24D9 Enemy ship
40D9 Enemy ship half
5CD9 Enemy Cargo ship
78D9 Enemy Cargo ship
94D9 Enemy Cargo ship<bh:09>
B0D9 Enemy Cargo ship<bh:09>Low poly
CCD9 Enemy Cargo ship<bh:09>Low poly
E8D9 Enemy Cargo ship<bh:09>Low poly
04DA Far away ships (flat)
20DA Interlocking doors
3CDA Interlocking corner doors
58DA Interlocking diagonal doors
74DA Interlocking diagonal doors (s)
90DA Enemy flapping wings and tail
ACDA Boss poly part?
C8DA Boss poly part triangle
E4DA Boss poly part triangle
00DB Boss poly part triangle
1CDB Rising orange beam in tunnel
38DB Enemy ship
54DB Growing missile
70DB Main enemy ship (orange)
8CDB Mini walker
A8DB Ringo enemy
C4DB Enemy with rotating wings
E0DB Growing beam with flashing top
FCDB Sliding door in tunnel
18DC Coins
34DC Flashing Slot Maching knob
50DC Slot Machine Fruit texture
6CDC Hexa tower with flashing top
88DC Origami 1
A4DC Paper plane
C0DC Warning beam (yellow/black)
DCDC Tunnel side Textured Blocks
F8DC Road side Textured Blocks
14DD nothing?
30DD Shootable cone
4CDD High rise with flashing corner
68DD Big low poly Arwing (2)
84DD Corneria Base
A0DD Flat long rectangle
BCDD Random polys
F4DD Part some ship (DD08)
F4DD Part some ship (DD08)
10DE Micro Walker
2CDE Nano Walker
48DE Machine Gun ship
64DE Machine Gun ship Part (gun)
80DE Machine Gun ship Part body
9CDE Space missile mines
B8DE Shieldable enemy
D4DE Shielded enemy
F0DE Shielded enemy 2
0CDF Shielded enemy cloaking
28DF Big launcher tank
44DF Libellule
60DF Other smaller Libellule
7CDF Flashing wireframe beam
98DF Flashing beam
B4DF Flashing beam
D0DF Flashing beam
ECDF Flashing beam
08E0 Flashing beam
24E0 Flashing beam
40E0 Flashing beam
5CE0 Flashing beam
78E0 Flashing beam
94E0 Flashing beam
B0E0 Flashing beam
CCE0 Flashing beam
E8E0 Flashing beam
04E1 Flashing beam (wireframe)
20E1 Flashing beam
3CE1 Flashing beam (wireframe)
58E1 Flashing beam
74E1 Flashing beam (wireframe)
90E1 Flashing beam
ACE1 Ship Entryway (with antennas)
C8E1 Ship Entryway part?
E4E1 Space half arch
00E2 Space half arch big
1CE2 Space other half arch big
38E2 Rotating pod enemy orange
54E2 Rotating pod enemy white
70E2 Rotating pod enemy white
8CE2 Rotating pod enemy blue
A8E2 Rotating pod enemy blue
C4E2 Medium Walker
E0E2 Mini Volcano
FCE2 Big Volcano
18E3 Portable hole
34E3 Cool missile
50E3 Mini Vertical Enemy
6CE3 Main enemy 2 (orange)
88E3 Main enemy 3 big wings
A4E3 Small yellow stingray
C0E3 Small blue stingray
DCE3 Big blue stingray
F8E3 Big red stingray
14E4 Crystal in ground
30E4 Crystal in ground (vertical)
4CE4 Flying crystal
68E4 Hovercar (road level)
84E4 Skii Truck  (road level)
A0E4 ??
BCE4 Some Enemy part
D8E4 Energy yellow ring
F4E4 Mini Fish
10E5 Other Machine gun enemy
2CE5 Swimming creature
48E5 White flat stripe
64E5 Flat thing
80E5 White arrow
9CE5 Tunnel with blue doors
B8E5 Orange tunnel
D4E5 Tunnel with blue doors 2
F0E5 Federation friend ship
0CE6 Federation friend ship (half)
28E6 Mothership part 2
44E6 Mothership center part
60E6 Bonus bird
7CE6 Whale
98E6 Rotating solid beam with direction arrows
B4E6 Andross 2 Evil Face
D0E6 UFO
ECE6 Small yellow tank
08E7 Small blue tank
24E7 Weird asteroid
40E7 Tunnel with yellow door
5CE7 Tunnel with yellow door
78E7 Morphing ground thing
94E7 Bonus doors (yellow)
B0E7 Letter <bh:d3>E<bh:d3> orange
CCE7 Letter <bh:d3>E<bh:d3> blue
E8E7 Letter <bh:d3>E<bh:d3> gray
04E8 Letter <bh:d3>T<bh:d3> orange
20E8 Letter <bh:d3>T<bh:d3> blue
3CE8 Letter <bh:d3>T<bh:d3> gray
58E8 Letter <bh:d3>N<bh:d3> orange
74E8 Letter <bh:d3>H<bh:d3> blue
90E8 Letter <bh:d3>H<bh:d3> gray

The SFXEdit program seems to contains a lot of data ! probably have a whole copy of the rom X'D
The offset by 2 is weird, maybe the 2 extras bytes has specific meaning for the vertex list ? for animated objects or something like that.
Need to test that on more objects :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 12, 2013, 07:06:31 pm
Usually resource extractor should do it, did you tried hexa editor do do it ?
I extracted that with a hexa editor (frhed) :
Nope, didn't work with a normal resource extractor, I tried five of them and they all displayed the same stuff, a few icons and a text about not running under MSDOS.
I just installed frhed, what option did you use to extract and parse them? Maybe I can help a bit more. :D
This is already great actually, solved most of what I wanted to know.

The SFXEdit program seems to contains a lot of data ! probably have a whole copy of the rom X'D

I went through all SFXedit 0.93.exe in hex slowly as to learn a bit of hex too. I noticed two huge sections each made up of at least 5 distinct and very long text files. One of the is the conversion table for the color palettes that is at the end of the "SFXedit 0.93.exe" file and... some rather odd section with ONLY text based values from 0 to 255 in sequence, I think it is the information for all the models. The following is at $73B10A of SFXedit 0.93.exe:
Quote
STXT” r[251, 0, 13, 30, 0, 48, 0, 9, 0, 235, 94, 13, 18, 97, 13, 109, 97, 13, 244, 97, 13, 56, 99, 13, 213, 99, 13, 69, 100, 13, 130, 88, 13, 104, 90, 13, 195, 90, 13, 70, 91, 13, 161, 91, 13, 17, 92, 13, 92, 71, 13, 51, 73, 13, 142, 73, 13, 162, 80, 13, 30, 81, 13, 155, 81, 13, 92, 1, 130, 23, 0, 138, 125, 134, 0, 0, 144, 1, 136, 255, 196, 9, 124, 216, 4, 128, 4, 140, 48, 9, 134, 0, 0, 112, 254, 136, 255, 196, 9, 124, 216, 4, 128, 4, 14



It seems I was right about the complete models there. Looked for the following as text:
Code: [Select]
4, 4, 0, 0, 246, 0, 1, 0, 0, 250, 0Found it at location $83FB6A  of SFXedit 0.93.exe.
It is the Arwing values we know of parsed and converted into decimal to look like that section I had thought was the models. I only checked the first hex values up to the mirrored vertex.
There is another big list in SFXEdit which I'm sure points to each one of thes values in these added lists but I wasn't able to find a method.


Hey Stef I'm left with a newby Hex question:
Why is it that if I use the Windows Calculator (set Hexa and Byte) to convert FF from hex to decimal I get -1 but in some conversion tables it shows up as 255?
I thought Hex values don't include the sign unless stated so as do decimal numbers.
I know about signed and unsigned variables in c++ but I am missing the connection here. I googled and didn't find an answer quickly.
Also, in order to find the Arwing values I has used excel to convert HEX to decimal with values between 0 and 255. I've worked with colors in hex that turn into 0-255.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Ryusui on February 13, 2013, 12:17:09 am
Why is it that if I use the Windows Calculator (set Hexa and Byte) to convert FF from hex to decimal I get -1 but in some conversion tables it shows up as 255?
I thought Hex values don't include the sign unless stated so as do decimal numbers.
I know about signed and unsigned variables in c++ but I am missing the connection here. I googled and didn't find an answer quickly.
Also, in order to find the Arwing values I has used excel to convert HEX to decimal with values between 0 and 255. I've worked with colors in hex that turn into 0-255.

Windows Calculator assumes you're working with signed data. The highest bit for the mode you're working on will always be treated as the sign bit, so if you're working in Byte mode, FF will convert to decimal as -1 instead of 255. (To be clear, this is how signed numbers always work: therefore, a signed byte has a range of -128 to 127 while an unsigned byte has a range of 0 to 255.)

If you're not working with signed data, you'll have an easier time if you just switch to QWord mode. You'll probably never need all 64 bits (16 hex digits) for what you're doing, but at least it won't give you negative numbers when you're not looking for them.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 13, 2013, 04:38:46 am
Understood.
Thank you Ryusui!
:D

by the way, I had made a thread over at jul.rustedlogic.net where VL-Tone was last seen in case he wanted to add something. Nothing has happened but here is the link
http://jul.rustedlogic.net/thread.php?id=15998

@Stef
I've been thinking about what you said about portions of the ROM inside SFXEdit and I think you are right. Inside SFXEdit I found many doc files about the SNES hardware so I guess he needs those portions of the rom for SFXEdit to work correctly.


@Stef
I was stubborn enough to want to convert the Airwing Big high poly into my c++ application (the same one of my first experiment). I wanted to be able to understand the values better than I do in Hex so I converted every hex value to decimal which wasn't the best idea since some indicators were converted too but I still managed to manually parse almost all the values and the ones that I didn't I have no idea what they are since they lack the structure that I know from "Annotated Deconstruction Of Low Polygon Arwing Object" Version 1. Skipping sections was also possible because the are very localized.

The result it a document that has all the coordenates and I can draw and color most by hand but I don't know what that extra info is for. Also, I wanted to post it here but it is too long and I don't know if you are interested enough to want to review it. Are you?

Here is a sample:

Code: [Select]
// ***Face Data***

         20,    // decimal 20 is $14. Start of Face group (convex shape) ($14)

        /*  // Comments from Annotated Deconstruction Of Low Polygon Arwing Object From The Original StarFox.
            // Not specifically necessary for openGL due to internal rendering functions (it can be set to auto).

            Ns Fn Co NX NY NZ V1 V2 V3...   Ns is the number of sides for this face.
                                            Fn is face number or ID.
            --------------------------      Co is color/texture number, refer to other doc
                                                about the color/texture sets.
                                            NX NY and NZ is the vector of the calculated
                                                normal for this face normalized to 128 (or is it 127?)
                                            Vx refers to the vertex numbers as defined
                                                by the vertex lump list just like the
                                                triangle list (see above)
                                            The number of Vx vertex references is equal
                                                to the number of sides, in this case three.
                                            Supported number of sides are 1 (point),
                                                2 (line),3,4,5,6 and 8 sides.
            Ns Fn Co NX NY NZ V1 V2 V3
            --------------------------
            [03 06 10 A6 5A F7 03 02 0B]    -> This face is a triangle with a gray tint ($10), with a normal vector of (-90,90,9), connecting vertex 3, 2 and 11.
            [FF]                            End of faces group($FF). FF is -1 in decimal
            [14]                            Start of Face group (convex shape). $14 is 20 in decimal
            [03 0E 07 BF 64 D5 0A 0E 07]
            [14]
            [03 0A 00 00 7B 1F 0A 0D 05]
            [03 0B 2C 00 9E AF 08 0D 0A]
            [03 10 00 48 A5 CC 0D 08 05]
            [03 11 01 B0 A2 1D 08 0A 05]
            (sometimes is FE00 and sometimes there is nothing indicating the end?)

        */
   //   Ns   Fn   Co   NX   NY   NZ   V1   V2   V3   Vx (The number of Vx vertex references is equal to Ns, the number of sides )
   // ----|----|----|----|----|----|----|----|----|-----------------------------------------------------------------------------|
         3,   0,  32,-104,  54, -48,  23,  35,  31,
        -1,    // End of faces group($FF). FF is -1 in decimal
        20,   // Start of Face group (convex shape). $14 is 20 in decimal
         4,   6,   0,   0, 106, -70,  28,  25,  23,  26, // Since Ns is 4 this face group has four vertex references, V1,V2, V3 and V4
        -1,
        20,
         3,  14,  18,   0, 123,  31,  23,  25,   5,
         3,  15,  44,   0,-114, -57,  12,  25,  23,
         3,  17,  12, -70,-105,  17,  12,  23,   5,
         3,  19,  14,   0,-123, -31,   5,   9,   7,
         3,  22,  18,   0, 123,  31,   7,   9,   5,
         3,  23,  14,  65, -98, -49,  12,   5,  25,
        -1,
        20,
         3,  45,  32,  93, -79,  34,  11,  35,  19,
         3,   1,  30,-104,  73,  -3,  23,  31,  11,
         3,  18,  28,   6,-103,  74,  19,  23,  11,
         3,  47,  34, 112,  45, -40,  31,  35,  11,
         4,   7,   0,   0,-106,  70,  26,  23,  25,  28,

Here is one of those weird sections, about halfway down this face group
Also I think face id number can only be possitive:
Code: [Select]
         20,
         3,  36,  20,  89,  89, -12,   3,  23,  33,
         3,  26,  18,  57, 113,  -6,  23,   3,  20,
         3,  27,  12, -57,-113,   6,  20,   3,  23,
         3,  16,  30,  13,-116,  50,  19,  35,  23,
         // Something happens here. The sequence y finished with a -1 but something is not initialized a face group, istead of 20 ($14) you find $0
        -1, // I thinks -1 doesn't end the face group, it ends a certain caracteristic of the facegroup since the next values seem to have no Vertex reference
         0,  28,  20,  39,   0,  48,
         0,  57,   0,  66,   0,  75,
         0,  84,   0,  93,   0, 102,
         0, 111,   0, 120,   0,-127,
         0,-118,   0,-109,   0,-100,
         0, -91,   0, -82,   0, -73,
         0, -64,   0, -55,   0, -46,
         0,  56,   2,  -1,  10,   0,
         1,   0,   0,  32, -49,   0,  56, // Doesn't 56 ($38) mean mirrored or something? Is it the ammount Vx equal to Ns -1 ? It seems this is different than before!
         2,  -1,  20,   0,   1,   0,   0,  32, -60,   0,  56,
         2,  -2,  30,   0,   2,   0,   0,  32, -71,   0,  56,
         2,  -3,  40,   0,   2,   0,   0,  32, -82,   0,  56,
         2,  -4,  50,   0,   2,   0,   0,  32, -93,   0,  56,
         2,  -5,  60,   0,   2,   0,   0,  32,-104,   0,  56,
         2,  -6,  70,   0,   2,   0,   0,  32,-115,   0,  56,
         2,  -6,  80,   0,   2,   0,   0,  32,-126,   0,  56,
         2,  -7,  90,   0,   2,   0,   0,  32, 119,   0,  56,
         2,  -8, 100,   0,   2,   0,   0,  32, 108,   0,  56,
         2,  -8, 100,   0,   2,  10,   0,  32,  97,   0,  56,
         2,  -8, 100,   0,   3,  20,   0,  32,  86,   0,  56,
         2,  -8, 100,   0,   3,  30,   0,  32,  75,   0,  56,
         2,  -8, 100,   0,   4,  40,   0,  32,  64,   0,  56,
         2,  -8, 100,   0,   5,  50,   0,  32,  53,   0,  56,
         2,  -8, 100,   0,   5,  60,   0,  32,  42,   0,  56,
         2,  -8, 100,   0,   6,  70,   0,  32,  31,   0,  56,
         2,  -8, 100,   0,   6,  80,   0,  32,  20,   0,  56,
         2,  -8, 100,   0,   7,  90,   0,  32,   9,   0,  56,
         // No idea what happens next.
         2,  -8, 100,   0,   8,  95,   0,  12,  48,   1,2,3,0,20,4,0,0,0,0,127,2,3,0,1,-2,0,56,
        29,-40,70,-30,40,-60,-30,-45,70,-25,45,-15,-25,-45,-55,
        -25,-40,-15,0,40,-60,0,45,-15,5,30,-30,5,30,-50,5,45,-55,5,
        40,-20,10,31,-29,10,31,-51,10,-40,-60,10,-40,-70,10,35,
        -75,10,-35,-95,10,40,-100,10,-35,-25,15,35,-55,15,35,60,
        20,45,-5,25,-45,70,30,-45,5,30,40,-10,30,-40,70,35,-40,50,
        35,40,0,35,12,48,42,11,10,13,42,43,54,53,42,55,42,53,52,54,
        43,52,26,24,16,19,17,25,26,18,19,25,17,16,40,41,28,26,27,
        41,22,23,38,39,38,25,38,41,27,23,28,41,24,26,40,39,40,29,
        50,51,23,51,50,56,55,54,57,23,51,45,57,52,46,48,45,51,21,
        28,23,8,3,28,4,0,3,46,4,7,8,21,15,14,44,50,49,47,53,56,50,
        44,14,22,29,20,29,2,9,2,1,49,44,14,6,14,20,2,29,28,3,0,1,
        53,47,5,30,31,36,37,36,31,32,33,34,60,40,9,8,0,
         4,  68,  16,   0,  68, -121,  1,  20,              //Maybe?
         4,   9,  18,   0,  90,  -90, 40,  41,  28,  29,    //This one fits
        -1,
        20, //Back to structure
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 15, 2013, 04:14:40 am
Hey Dyson,

I'm still working on that :)
In fact i already have the high poly arwing in .obj format so i could use it but i prefer to be able to directly rip all data from the rom or SFXEdit as it does give extra info as description / name which is cool :)
All decompilation informations are valuables and the high poly arwing informations you posted are very interesting !
Normally having -1 followed by 0 in facegroup means you reached the end of facegroup definition, but i guess we should have more facegroup from the high poly arwing.

I'm currently writing a tool to decompile ans show all Starfox object data from the rom as it's really painful to do it manually. I'm experiencing issues with some unknown tag (as $1C vertex list which correspond to animated vertex). I guess i will just ignore them and try to only parse valid data. As soon the tool will be ready i will probably post it here :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 15, 2013, 08:16:06 am
That sounds awesome Stef!

I've learnt more about roms just from this thread alone so thank you but I think I've reach the limit of what I can dig up. If I think of something else I'll post it but I think you've had much more progress than I ever could.
Since you know more about the use of the color palette I'll try ripping the openGL color table from SFXEdit myself since I'd want to use something like that.

If I could leave you with some questions just so I know stuff:
-What tools have you been using to the hack the rom? Any particular procedure?
-What programming language are you using for the decompiling tool?
-Did you already crack the color palettes method? How about the color changing ones and are they dependant on ztimer as the animations are?


In case anybody is curious, here is a portion of the Hex colors tables to RGB Values found inside SFXedit 0.93.exe. There are at least 40 (?) references to TXT files, each with long strings of the following parsed and easily readable. I'm sure one can extrapolate the RGB values from the color tables (see Mattrizzle's post). Notice at the begginning there are rgb values and in the second half there are Hex combinations:
Code: [Select]
[rgb( 235, 251, 251 ), rgb( 170, 251, 251 ), rgb( 235, 251, 251 ), rgb( 105, 219, 251 ), rgb( 235, 251, 251 ), rgb( 170, 251, 251 ), rgb( 235, 251, 251 ), rgb( 97, 138, 251 )], [rgb( 235, 251, 251 ), rgb( 251, 170, 105 ), rgb( 235, 251, 251 ), rgb( 251, 211, 146 )], [rgb( 235, 251, 251 ), rgb( 195, 219, 235 ), rgb( 154, 178, 195 ), rgb( 113, 130, 154 ), rgb( 73, 97, 113 ), rgb( 24, 48, 73 ), rgb( 24, 48, 73 ), rgb( 24, 48, 73 )], "1B,40", "1F,40", [rgb( 251, 211, 146 ), rgb( 170, 8, 65 )], ["A0,40", "A1,40", "A2,40", "A3,40", "A4,40", "A4,40", "A5,40", "A5,40"], ["0C,40", "0D,40", "0E,40", "0D,40"], "AA,40", "DF,40", "DF,40", ["19,40", "1A,40", "1C,40", "19,40", "1A,40", "1C,40", "19,40", "1A,40"], ["0A,40", "0B,40", "0F,40", "0B,40"], "A9,40", ["3D,46", "3C,46", "3B,46", "3B,46", "3A,46", "3A,46", "39,46", "39,46"], ["1D,40", "1E,40", "1D,40", "1E,40", "1D,40", "1E,40", "1D,40", "1E,40"], "00,40", ["CC,40", "CD,40", "CC,40", "CE,40"], ["15,40", "16,40", "17,40", "16,40"], "D0,46", "D0,46", ["C7,40", "C9,40", "C8,40", "C9,40"], ["CB,40", "13,40"], "D4,44", "D4,45", "D5,44", "D5,45", "B4,40", ["3B,46", "3C,46"], "07,40", "02,3B", "46,3C", [], rgb( 97, 138, 251 ), rgb( 97, 149, 162 ), rgb( 48, 109, 235 ), [],
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Zoinkity on February 15, 2013, 11:50:32 am
STXT is an indicator in the macromedia bytecode.  The length of the text is at +0xC, and text starts 0x14 from there.  For instance, within STXT block at 0x9031A4, 0x251 bytes of text:
Code: [Select]
mtllib cube.mtl

    shadow_obj cube.obj

    v 0.000000 2.000000 2.000000
    v 0.000000 0.000000 2.000000
    v 2.000000 0.000000 2.000000
    v 2.000000 2.000000 2.000000
    v 0.000000 2.000000 0.000000
    v 0.000000 0.000000 0.000000
    v 2.000000 0.000000 0.000000
    v 2.000000 2.000000 0.000000
  # 8 vertices

    g front
    usemtl red
    f 1 2 3 4
    g back
    usemtl blue
    f 8 7 6 5
    g right
    usemtl green
    f 4 3 7 8
    g top
    usemtl gold
    f 5 1 4 8
    g left
    usemtl orange
    f 5 6 2 1
    g bottom
    usemtl purple
    f 2 6 7 3
    # 6 elements

Should be pretty easy to automate with a script, but you'd wind up with every string used, possibly also some source code and comments.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 15, 2013, 04:18:03 pm
@Zoinkity
Interesting. I was curious about the STXT strings and since they looked exactly like formated text I just thought they were plain TXT files.
Anyways, I believe Shockwave is very much dead and I tried finding somthing like you mention or maybe a Shockwave Director decompiler but I had no luck with it. SFXedit 0.93.exe isn't even encrypted.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 15, 2013, 05:05:42 pm
That sounds awesome Stef!

I've learnt more about roms just from this thread alone so thank you but I think I've reach the limit of what I can dig up. If I think of something else I'll post it but I think you've had much more progress than I ever could.

We are already made nice progress but i think there is still a lot to discover :)
I continue my work on the object ripper tool, making slow progress, i hope to have something ready soon !

Quote
Since you know more about the use of the color palette I'll try ripping the openGL color table from SFXEdit myself since I'd want to use something like that.

I guess the palette used in SFX Edit are more suited for what i intend to do, in my case i want to conserve the exact same look and so use the original palette :)

Quote
If I could leave you with some questions just so I know stuff:
-What tools have you been using to the hack the rom? Any particular procedure?

Honestly I'm not used to rom hacking... I just use a hexa editor and try to understand how stuff are encoded by making relation between different values :)

Quote
-What programming language are you using for the decompiling tool?

I'm using java as it is a language i'm used to (use it professionally) and it's better than C to design GUI.

Quote
-Did you already crack the color palettes method? How about the color changing ones and are they dependant on ztimer as the animations are?

Yeah i got almost all the palette encoding, right now i'm only working with the main sub palette (the one refered by 13 83 in object header). I almost got all informations from this post :
http://acmlm.kafuka.org/archive2/thread.php?id=6876

I've to admit i had to reread it ten of times before understand the whole ^^
Here's a share with all my palettes rip and some informations about palette decoding :

https://www.dropbox.com/sh/kyvjzvnj1q4fqwh/PS12A3Xjd8/dev/sfx

Actually you find the color info in face data (from the face group data).
The color byte value permit to find the color type from the main palette you have here :
(http://images4.hiboox.com/images/0713/78b4332c54d0c2420c0ce7dceed80fd7.gif)
Rom address : $18413

From this palette you will read 2 bytes indicating color/texture references.
First byte value generally give color type and the second give color index.

Color type value :

00-09 refer to lighted colors palette.
The type also give the color index here (same value for each byte). The final color is obtained from color index and the light index.
Light index is calculated with the cross product of face normal and light vector (which is fixed for each level).
You can find the whole light palette color here (10 colors * 10 light level * 4 depth sub palette) :
(http://images4.hiboox.com/images/0713/9bbfd41f45bc2bf2b54c54136f89312b.png)
Rom address :  $19000

3E XX refer to 32 solid colors palette.
Second byte is the color index (00 to 1F).
Whole palette here (32 colors * 4 depth sub palette * 4/5 context sub palette) :
(http://images4.hiboox.com/images/0713/c196818b620f351449d269682abebf6b.png)
Rom address : $18D8A

3F XX refer direct color.
Each X is from the standard StarFox 4-bit palette to form the checkerboard pattern

8X XX refer to animated color/texture palette.
XXX is anim data offset (18XXX$+200$ in ROM).
First byte of animated data is the number of frames then the color data is in this same format as explained above (i.e. 3F XX for direct color).

Note than you always obtain a byte as final color : XX, each X being 4 bits and representing 1 of the 16 colors from the master palette here :
(http://images4.hiboox.com/images/0713/876979fbd42d716e4ec9518c671acff0.bmp)

Well i think my post is a total mess, try to use VL-Tone topic as references as i believe he explained far better than i did here.
You can use my images to help :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 15, 2013, 06:06:26 pm
Well i think my post is a total mess, try to use VL-Tone topic as references as i believe he explained far better than i did here.
You can use my images to help :)
I read his documents far too much times and even though I understood how they could work I never would have been able to integrate everything, between errors in the documents and no knowledge of hex I was going to get nowhere.
One question though, do you happen to know the light vector for Corneria Level 1? or how to find any? I will use that and rip the original Arwing as Hex values into my c++/openGL application just to make sure I've done it correctly.

I've been trying to find someone interested in the topic for at least three years, may I ask what got you interested in this? :D
I'll try and work on my palette conversión tools.
Thank you very much for all the information and I do look forward to your progress.

Small edit->
I didn't know I could share links with dropbox! Here is the parsed High poly model I had made with some guess work and stuff:
https://www.dropbox.com/s/g0y8gaworrkvo6v/Airwing_Big_high_poly.txt



The type also give the color index here (same value for each byte). The final color is obtained from color index and the light index.
Light index is calculated with the cross product of face normal and light vector (which is fixed for each level).

Cross product between two vectors would be a vector and I think you mentioned it as an index, are you sure it is not the dot product? Dot actually worked very well by interpolating values between the two extremes of a color palette. Here is a picture of what I obtained with a lightVector(1,1,0), shadows seem to be mirrored horizontally but that is not a problem. I also used just one color palete to make it work and I'll add the other colors now.
https://www.dropbox.com/sh/t24ll7lzsgbuzxh/ha_gY9hAox#f:Test%201.png (https://www.dropbox.com/sh/t24ll7lzsgbuzxh/ha_gY9hAox#f:Test%201.png)

The only doubt I have left is that if light vector is fixed per stage and normal vectors per face are also fixed then the rotation of the object has to be taken into account at some point.
(I like openGL, I know a whole lot more about it than hex and rom hacking. :P)


news!
Converted the table in the simplest way and made it use linear interpolation, added a light vector that I could change with the mouse and it does work nicely. Of course, I'd rather do it correctly when I see what you've figured out but I think I've come very close. The screen capture doesn't show but the red circle and line are a visual reference related with the light vector and the shadows of the Arwing appear dynamically as it rotates.
https://www.dropbox.com/s/3cm44gg2rpe5ub5/Test%202.png
Also, the color changing triangle I think is dependant on the zTimer so I had to fake it but at least with the colors from the direct Hex values.
Anyways, I know it works, I can do more in the future. Thanks for all the info!

news 2!
Thought you might like to see a video which was only possible with the progress in this thread. When the shadows instantly change it is because I changes the light vector to some other position:
https://vimeo.com/59810080
It is really fascinating how they managed to design this, the game has no lighting (in the traditional 3D accelerated sense) and it is all mostly tricks that work perfectly together using the least amount of memory and processing available. This was one of the reasons I wanted to see how to do this. :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 16, 2013, 07:09:58 pm
Quote
I read his documents far too much times and even though I understood how they could work I never would have been able to integrate everything, between errors in the documents and no knowledge of hex I was going to get nowhere.

I understand your feeling, i also had bad headache with that post... it took me a lot of time to understand the whole thing.

Quote
One question though, do you happen to know the light vector for Corneria Level 1? or how to find any? I will use that and rip the original Arwing as Hex values into my c++/openGL application just to make sure I've done it correctly.

I got it just by watching the original game :p
In Corneria 1 you can see light coming from left, i just estimated it ;)

Quote
I've been trying to find someone interested in the topic for at least three years, may I ask what got you interested in this? :D

Well i was searching informations about Starfox, how to extract the object from rom for instance and i finally found that topic which was the most recent one discussing about it and pointing exactly what i was looking for ;)
Your project seems really similar to mine : you want to reproduce game very close to the original one.

Quote
I didn't know I could share links with dropbox! Here is the parsed High poly model I had made with some guess work and stuff:
https://www.dropbox.com/s/g0y8gaworrkvo6v/Airwing_Big_high_poly.txt

Hey thanks ! Looks like you gone a bit far when you extracted your face data but all data extracted looks correct when i compare to my object extractor. I made some progress on it, you can download it here if you want to test :

https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jar

You should open the rom first (the headered version one which we were using previously).
Then you should open "extra" from this file (it gives object name) :
https://dl.dropbox.com/u/93332624/dev/sfx/objects_extras.txt

As the tool is wrote in java you should have a JRE installed on your system to execute it.

Quote
Cross product between two vectors would be a vector and I think you mentioned it as an index, are you sure it is not the dot product?

Sorry you are right, i was meaning dot product :p
Negative value mean back faced face (not visible), positive value gives you light factor, just multiply it by 10 to have light index ;)

Quote
Dot actually worked very well by interpolating values between the two extremes of a color palette. Here is a picture of what I obtained with a lightVector(1,1,0), shadows seem to be mirrored horizontally but that is not a problem. I also used just one color palete to make it work and I'll add the other colors now.
https://www.dropbox.com/sh/t24ll7lzsgbuzxh/ha_gY9hAox#f:Test%201.png (https://www.dropbox.com/sh/t24ll7lzsgbuzxh/ha_gY9hAox#f:Test%201.png)

The only doubt I have left is that if light vector is fixed per stage and normal vectors per face are also fixed then the rotation of the object has to be taken into account at some point.
(I like openGL, I know a whole lot more about it than hex and rom hacking. :P)

Glad you got it working :)
If you look at the arwing face color, you will notice that only a few of the face are actually affected by light... i guess that is to minimize light calculation on the SFX as it requires dot product for each face.
To calculate light on a face you have 2 methods :
- apply object transformation to the face normal vector then compute cross product with light vector.
  This method require you to transform each normal vector which is time consuming so you should prefer the second one.
- apply object inverse transformation on the light vector then compute cross product with face normal vector.
 This method is better as you only transform the light vector :)

Quote
Also, the color changing triangle I think is dependant on the zTimer so I had to fake it but at least with the colors from the direct Hex values.
Anyways, I know it works, I can do more in the future. Thanks for all the info!

Actually the blinking triangle is a animated color (the 8XXX format).
XXX is the offset containing color animation data (see VL tone post for more information about exact rom address) :
XXX+0: number of frame for animation (4 or 8 for instance)
XXX+1: color frame 0 (color is encoded as previously : 00XX-09XX = light color, 3EXX = solid, 3FXX = direct...)
XXX+3: color frame 1
XXX+5: color frame 2
...

So at each frame you take the next color until you reach the maximum frame then back to color frame 0 :)


Quote
news 2!
Thought you might like to see a video which was only possible with the progress in this thread. When the shadows instantly change it is because I changes the light vector to some other position:
https://vimeo.com/59810080

Nice video ! looks really promising :)
I would like to show something similar but right now I'm not far enough for any interest :-/

Quote
It is really fascinating how they managed to design this, the game has no lighting (in the traditional 3D accelerated sense) and it is all mostly tricks that work perfectly together using the least amount of memory and processing available. This was one of the reasons I wanted to see how to do this. :D

True, the BSPTree structure is really neat and pretty advanced for that period, all the code and structure were heavily optimized both for SuperFX and SNES hardware. I still do not understand how the object shadows are rendered, i guess they used smart tricks for that !
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 16, 2013, 08:54:01 pm
Hey thanks ! Looks like you gone a bit far when you extracted your face data but all data extracted looks correct when i compare to my object extractor. I made some progress on it, you can download it here if you want to test :

https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jar

You should open the rom first (the headered version one which we were using previously).
Then you should open "extra" from this file (it gives object name) :
https://dl.dropbox.com/u/93332624/dev/sfx/objects_extras.txt

AWESOME! Yeah I can understand now that I went right past the last hex values of the Airwing_Big_high_poly. xD
This is great! I can verify a lot of stuff now, I'll try and add some functionality to my app and make a video or something. I've been programming it with openFrameworks which uses c++ and openGL. I'm not an expert programmer but I want to learn more. :P
You mentioned the animated color, do 3d animated object work in a similar way and did you manage to determine what separates those memory blocks?
Also, I know VL-Tone's Arwing doc says that a the faces info stops at FF00 and that sometimes stops with nothing, how did you know when to stop reading for each model?

If you look at the arwing face color, you will notice that only a few of the face are actually affected by light... i guess that is to minimize light calculation on the SFX as it requires dot product for each face.

I think this has the added benefit of maybe simulating different light absorption materials. I guess wings should be very shiny and reflective more than the blue parts, as well as those parts in which parts of a model "emit" light.

Thank you for the extra info, I will try to add stuff as I go, I might go slower now that I'm following you since you are the one making the real hacking progress

True, the BSPTree structure is really neat and pretty advanced for that period, all the code and structure were heavily optimized both for SuperFX and SNES hardware. I still do not understand how the object shadows are rendered, i guess they used smart tricks for that !
In case you are curious I've also seen it used in Doom but the engine has been opensource for years and is already ported to openGL.
http://doom.wikia.com/wiki/Doom_rendering_engine#Node_building
In my particular case in which I use openGL I don't need to use the BSP tree since openGL can be set to determine the position of each triangle using glEnable(GL_DEPTH_TEST), but I would still like to replicate the palette behaviour with checkerboard pattern. It can be replicated very quickly using masks and FBOs, but I won't do this soon. :D

¿Do you plan on continuing with the hack? Anything I can do to help?
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 17, 2013, 07:40:04 am
Quote
You mentioned the animated color, do 3d animated object work in a similar way and did you manage to determine what separates those memory blocks?

I know animated objects use a special type ($1C) for vertex list but i don't understand yet how things are encoded, it is something i have to work on :)

Quote
Also, I know VL-Tone's Arwing doc says that a the faces info stops at FF00 and that sometimes stops with nothing, how did you know when to stop reading for each model?

Honestly i assumed he was wrong here as without end delimiter the game itself would not be able to parse data correctly.
Right now, on my 249 objects i always found the "FF" end delimiter :) I assume FE is correct too but i never meet it so FF seems the correct end delimiter.

Quote
I think this has the added benefit of maybe simulating different light absorption materials. I guess wings should be very shiny and reflective more than the blue parts, as well as those parts in which parts of a model "emit" light.

True, still when you look at the original game, there are parts which are not lighted parts and look weird as their base color seems to be "prelighted"  for the level :

(http://images4.hiboox.com/images/0713/ef137c47cb92f25c84bcbbccfc25c6f0.jpg)

Here you can see that the top of the arwing is correctly lighted as light come from West.

But if you look at this image :

(http://images4.hiboox.com/images/0713/20ec3573ad6d3230ca8b22b6c87dc216.jpg)

You can see the top color of arwing is fixed and now look weird as only half of the bottom is "lighted" when we expect both.

Quote
Thank you for the extra info, I will try to add stuff as I go, I might go slower now that I'm following you since you are the one making the real hacking progress

Actually your information about the real address of vertex data helped a lot, i couldn't figure the address encoding without it :)
And there is still so much to do, about level data for instance, we can probably try to understand them better :)

Quote
In case you are curious I've also seen it used in Doom but the engine has been opensource for years and is already ported to openGL.
http://doom.wikia.com/wiki/Doom_rendering_engine#Node_building

Yeah i know used BSPTree but it was only for fast map rendering, the way Starfox used it for 3D object decomposition (convex object) and rendering is really clever :)

Quote
In my particular case in which I use openGL I don't need to use the BSP tree since openGL can be set to determine the position of each triangle using glEnable(GL_DEPTH_TEST), but I would still like to replicate the palette behaviour with checkerboard pattern. It can be replicated very quickly using masks and FBOs, but I won't do this soon. :D

In your case you indeed really don't need the BSPtree info as OpenGL give simpler (and better) ways to handle depth rendering ;)
The checkerboard will be a bit more tricky to handle !
In my case i want to replicate starfox with a software render engine (4 bpp bitmap based) so i can use the whole original starfox engine easily :D

Quote
¿Do you plan on continuing with the hack? Anything I can do to help?

Yeah i plan to continue to work on it, I will keep the thread updated with my progress :)
After object i plan to work on level data, we won't be able to use them "as it is", at least for the ASM block that won't be useful in our case :p
Ii would be nice if we can have a complete description of 1 level data as corneria 1. That would be a good start to figure of the rest !
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 17, 2013, 08:27:02 am
You can see the top color of arwing is fixed and now look weird as only half of the bottom is "lighted" when we expect both.
I did see this, I specially noticed it while rotating the Arwing because I have complete freedom on every axis so I would get odd shading on some angles. I think this is just how it was optimized and programmed.

In my case i want to replicate starfox with a software render engine (4 bpp bitmap based) so i can use the whole original starfox engine easily :D

GREAT! I'd want to see that!
I'm now importing the ROM directly into my c++ app to replicate part of your Obj Reader. I'll post something later in case I make progress.
I've also been playing around with WebGL and using that would be very interesting.

Yeah i plan to continue to work on it, I will keep the thread updated with my progress :)
After object i plan to work on level data, we won't be able to use them "as it is", at least for the ASM block that won't be useful in our case :p
Ii would be nice if we can have a complete description of 1 level data as corneria 1. That would be a good start to figure of the rest !

I'll finish this app and see what more info I can dig up or guess. The Star Fox object decoder made in Shockwave flash has the complete Corneria 1 stage decoded but I don't know if it can be disassembled or decompiled.
I will also be reading the thread and adding anything I can. :D
Thanks Again! :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 17, 2013, 03:27:39 pm
Quote
GREAT! I'd want to see that!
I'm now importing the ROM directly into my c++ app to replicate part of your Obj Reader. I'll post something later in case I make progress.
I've also been playing around with WebGL and using that would be very interesting.

I hope to be able to show something but i think it won't happen that soon unfortunately :-/
By the way,do you want the sources of the object decoder ? There is not much in it but as you use C++ you can translate java code quickly if you want...

Quote
I'll finish this app and see what more info I can dig up or guess. The Star Fox object decoder made in Shockwave flash has the complete Corneria 1 stage decoded but I don't know if it can be disassembled or decompiled.
I will also be reading the thread and adding anything I can. :D
Thanks Again! :D

Hehe, i think i will need to read the level data part a lot of time to understand it :)
Can i ask you something about the 3D ? you seems more used than me to that :)
Do you know how we have to handle camera view and arwing transformation ?

I try to do it this way :
World view is located depending arwing XY position.
I also apply do Z rotation depending the arwing X movement to make world rotating a bit as the original.
Then i try to get the arwing in the world at correct position but because of Z rotation the arwing goes up and down as background. I know i should apply an inverse translation before doing rotation on the arwing but i can't get that part correct and it's a bit confuse in my minds ^^
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 17, 2013, 04:03:29 pm
By the way,do you want the sources of the object decoder ? There is not much in it but as you use C++ you can translate java code quickly if you want...
YES PLEASE! I've just about structured the file information in c++ but I have an offset for the faces data. You had posted a formula for the faces before but I don't arrive where I should.
I was using VL-Tone's tutorial and your formula but intead of arriving at $8F3ED where I know the face values begin, I arrive at 8F396 with the posted formula.
I'd like very much to read the source code, I guess a PM with the link or email should work.
I've already made a different c++ application that read the whole rom and uses what we know, with the correct face formula I could have all the models in openGL in a short while, without colors of course.

Do you know how we have to handle camera view and arwing transformation ?

I try to do it this way :
World view is located depending arwing XY position.
I also apply do Z rotation depending the arwing X movement to make world rotating a bit as the original.
Then i try to get the arwing in the world at correct position but because of Z rotation the arwing goes up and down as background. I know i should apply an inverse translation before doing rotation on the arwing but i can't get that part correct and it's a bit confuse in my minds ^^

I'm not quite sure I understand what is wrong and I don't know how much you know so I'll comment on what I've done in openGL.
I've used a very normal viewport.
I pushMatrix and translate to the center of the screen.
I  add a rotate value that will rotate that ship
I draw lines or triangles on screen using the ROM coordenates with a scaled value of 10.
Then I popMatrix.

Also in order to calculate the correct light index for the triangles I HAVE to use the rotation values. I rotated the normals in my first demo and it looks right but I think I'm wrong.

I can also send you my source after I'm done with the intial model. The gl portions are not hard to read.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 17, 2013, 04:55:35 pm
Quote
YES PLEASE! I've just about structured the file information in c++ but I have an offset for the faces data. You had posted a formula for the faces before but I don't arrive where I should.
I was using VL-Tone's tutorial and your formula but intead of arriving at $8F3ED where I know the face values begin, I arrive at 8F396 with the posted formula.
I'd like very much to read the source code, I guess a PM with the link or email should work.
I've already made a different c++ application that read the whole rom and uses what we know, with the correct face formula I could have all the models in openGL in a short while, without colors of course.

Here it is :
https://dl.dropbox.com/u/93332624/dev/sfx/StarFoxDecoder.zip

I don't mind posting them public :p

Quote
I'm not quite sure I understand what is wrong and I don't know how much you know so I'll comment on what I've done in openGL.
I've used a very normal viewport.
I pushMatrix and translate to the center of the screen.
I  add a rotate value that will rotate that ship
I draw lines or triangles on screen using the ROM coordenates with a scaled value of 10.
Then I popMatrix.

Also in order to calculate the correct light index for the triangles I HAVE to use the rotation values. I rotated the normals in my first demo and it looks right but I think I'm wrong.

Thanks for taking the time to explain ! I finally fixed the problem and turned to be very simple :)
It was just a problem about the transformation order (i made translation then rotation instead of the contrary :p).
Problems coming from the world objects, having the arwing alone was ok :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 17, 2013, 05:02:56 pm
@Stef
Thank you! :D
BRB :P


Progress!
I've implemented most of the simpler tags, this is the High Poly Arwing directly from the ROM, only thing odd is that I had to use the same color palette for everything until I finish this. (clicking the image seems to resize it, I don't know).
(http://s12.postimage.org/4q0ljabgd/Untitled_1.png) (http://postimage.org/)


Definitely works! :P
I made it skip some tags that I don't know so I can see a few models perfectly like this one, the "fish" and a few powerups. So cool.
(http://s3.postimage.org/xegfnver7/Untitled_2.png) (http://postimage.org/)(http://s12.postimage.org/rt5tqfeyl/So_Cool.png) (http://postimage.org/)

@Stef
I think I'll have to replicate the behaviour of your Object Decoder because I started the c++ code with no information about the correct tags. Your code is very clean and well structured.
I will however have less time now that I am really back at work. ¬¬
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 18, 2013, 04:19:10 am
Wow nice, objects looks perfect ! I'm impatient to test that too :)
As you probably saw in my code, there are still unknown tags...
I sorted some as the 16 bits X flip vertex type list and bsptree empty node but still some unknown remains, i hope to fix them quickly ! Good luck with your project ;)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 18, 2013, 05:34:02 am
Wow nice, objects looks perfect ! I'm impatient to test that too :)
I made this using openFrameworks: http://www.openframeworks.cc/
Do you plan on trying it out? Try to get it to compile any demo project and I can post the project file (even if the source code is a bit messy). I have OSX too so I could port the project very quickly.
Installation instructions are not complicated.

I sorted some as the 16 bits X flip vertex type list and bsptree empty node but still some unknown remains, i hope to fix them quickly ! Good luck with your project ;)
About that, 16 bits in this case means that I need 2 of the values that I would normally use?

Question 2: objects_extras.txt has some values that when I calculate the address I get negative values, does this happen to you?
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 18, 2013, 11:44:32 am
Quote
I made this using openFrameworks: http://www.openframeworks.cc/
Do you plan on trying it out? Try to get it to compile any demo project and I can post the project file (even if the source code is a bit messy). I have OSX too so I could port the project very quickly.

It looks interesting and quite simple to use but i prefer to stand on java for multi plateform project as i'm used to that =)
Is OF available on all systems (osx, win, linux) ?

Quote
About that, 16 bits in this case means that I need 2 of the values that I would normally use?

Just that coordinate are encoded on 2 bytes, you have to take care of that when you parse your vertex data.

Quote
Question 2: objects_extras.txt has some values that when I calculate the address I get negative values, does this happen to you?

objects_extras.txt just contains object id and name, nothing more.
The object id is used to get the object header address (just by subtracting $7E00). Normally you cannot have any negative value. Take attention about the id value you may need to reverse byte order as i copied them directly from SFX exe ;)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 18, 2013, 12:09:16 pm
It looks interesting and quite simple to use but i prefer to stand on java for multi plateform project as i'm used to that =)
Is OF available on all systems (osx, win, linux) ?
Yes it is. I work programming interactive installations and such and it is openGL so it is has gpu acceleration. Some guys like to add scientific libs to make some graphics. Also, using shaders in openGL is great! There is also Cinder which is osx and windows only.
http://libcinder.org/
There is also Processig is java but with a similar purpose, Processing.js is Webgl.

objects_extras.txt just contains object id and name, nothing more.
The object id is used to get the object header address (just by subtracting $7E00). Normally you cannot have any negative value. Take attention about the id value you may need to reverse byte order as i copied them directly from SFX exe ;)
I get that but for example, in your objReader the first value in the list ACA1 has address 0, vertex and face 0 too. What happens there?
I think I'm going to have to reprogram my app. I ported part of your code that does the vertex parsing and that works really great but I have a problem with my face parsing (haven't tried porting yours), the Arwing works correctly but other models say, for example, 4 vertex when I know they have 3. sometimes I get 2. That is why I think in the captures I posted I get missing triangles.
This is going to take me a bit, I'll be back in a few days in case nothing happens. :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 18, 2013, 01:53:34 pm
Yes it is. I work programming interactive installations and such and it is openGL so it is has gpu acceleration. Some guys like to add scientific libs to make some graphics. Also, using shaders in openGL is great! There is also Cinder which is osx and windows only.
http://libcinder.org/
There is also Processig is java but with a similar purpose, Processing.js is Webgl.

I did know http://www.openprocessing.org/ which looks very similar to your lib, very nice to do graphical stuff very easily and quickly :)
But in case of the starfox remake i prefer hard implementation by hand X'D

Quote
I get that but for example, in your objReader the first value in the list ACA1 has address 0, vertex and face 0 too. What happens there?

Indeed, i just assume 0 as address means no data :) I also discovered there is only 249 objects and not 250, the last one was returned wrong address because of that. But all others objects are correctly parsed.
But i think i miss a lot of object, if you compare to SFXEdit, you will see it contains many more objects that i can parse, i don't know where to find the others objects...

Quote
I think I'm going to have to reprogram my app. I ported part of your code that does the vertex parsing and that works really great but I have a problem with my face parsing (haven't tried porting yours), the Arwing works correctly but other models say, for example, 4 vertex when I know they have 3. sometimes I get 2. That is why I think in the captures I posted I get missing triangles.
This is going to take me a bit, I'll be back in a few days in case nothing happens. :D

I think there is something wrong somewhere in your parser, a very minor bug can cause you to go to hell, that is the problem when parsing data :p
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 18, 2013, 04:59:30 pm

Indeed, i just assume 0 as address means no data :) I also discovered there is only 249 objects and not 250, the last one was returned wrong address because of that. But all others objects are correctly parsed.
But i think i miss a lot of object, if you compare to SFXEdit, you will see it contains many more objects that i can parse, i don't know where to find the others objects...

I think there are some other banks, but that is why I ripped SFXedit 0.93.exe's complete Header address list. I think it is your same list.

Also, you mention that there are 250 objects but your objects_extras.txt  has over 550 address, even if some of them point to negative addresses.
When you open the rom using your Obj Reader you get only 249 entries.
I believe that you've only read one list of addresses for headers from the rom prior to reading the list but there is another set of addresses.

I rewrote my program and even though some entries are non existant it does read all 550 and I've already drawn correctly all of their vertex points (only missing faces ;) ). Maybe I can see all 550 headers correctly because my programming is sloppy, specially in hex and I didn't make my code check to see if a model exists in a list inside the ROM.

Another question: I am close to rewritting everything with most ideas from your own code but running the models on openGL with light and everything. For what system would you want me to compile first?

news!
IT WORKS!
Rewrote it from scratch with the ideas and tags from Stef's java source. Here is the result:
https://vimeo.com/59966574
Not ALL models work but the standard normal ones work perfectly without crashing the program. Also, the normal Arwing is the only one with colors for each face, this because I haven't implemented the colors directly from the rom yet
The last Obj. in the video is the Base at the beginning of Corneria !!! And of course, the real application runs at 60fps or more.

@Stef
You might be interested in these screen captures. I noticed that many faces replicate and some correspond either to an animated part or color. You will notice this "glitch" in many models in the video but it is there for a reason.
In the second part you will notices there are 4 vert. on a surface, they are the 4 corners of a texture. It is the same "building" that appears with a SF crest texture that you had uploaded before, surely there is another tag there.
(http://s11.postimage.org/d8q2ugwoj/SF_Errors.png) (http://postimage.org/image/c6fwbxdv3/full/)

Extra comments:
- The parrot, at arround 1:00 in the video, used to have wings as mirrored vertex  so I'm guessing that one should have a different reference too which I will look for. I can see that each wing had 7 vertices with 4 faces. (http://s12.postimage.org/6p3xco5fd/temp.jpg) (http://postimage.org/image/6p3xco5fd/)
- I verified that the Jukebox has a texture in that place where it has that glitch but that texture also shifts to one side.
- Also I think noticed what we had commented on before, that some faces are "pre-shadowed".
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 19, 2013, 06:55:56 am
Yeah the objects_extra comes from the SFXEdit application, it is the rip i did just to get object name.
I use it to feed object's name in my object decoder tool :)

Glad you fixed your decoder :) The video looks really nice... and exciting :D
Indeed i saw there are many objects with a face dedicated to animated color or texture (the face color information can indicate a specific texture). There is also many objects having a single face with a texture (used for asteroid level mostly).

Yesterday i made some progress on animated objects decoding, i hope to get them soon  !
I'll post an update of my tool as soon this is done so you can update your code to handle them =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 19, 2013, 07:06:42 am
Awesome!
Do you want this appl now of when it is finished?
I can post the source too. :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 19, 2013, 07:26:56 am
Well i think it's better to have animated objects handled as well so we can have a real object viewer (as the SFXEdit actually) except that data is directly parsed from the rom and we understand how the process is done :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 19, 2013, 07:34:50 am
Perfect! I'm doing a bit on the color palettes. I should probably got to work too. xD
I spend a while trying to find the damn color table and just in case anyone wants to do this in the future I while leave this here.
Mattrizzle had written the correct address before, I should really read back on the thread! xD
I seem to have the headered one.
Quote
The data for them begins at $18E0A in the ROM ($1900A headered).
(http://images4.hiboox.com/images/0713/9bbfd41f45bc2bf2b54c54136f89312b.png)

@Stef
Also, I think Star Fox lies to you about shadows. I was curious about why there are so many Objects tagged as "shadow" and I think it is because of this, every triangle on those should be tagged in the same group (for simplicity) all with the same color, a very specific FY or YF, Y being a dark color and F being transparent (F or 0, can't remember). Then, since the color rendering in StarFox is very much flat you get a shadow. Whats more, if it is not transparent then the shadow ship could have, for example, "Corneria surface" green as another non transparent color... making a shadow.
The position should be on on top of the fictional ground level with the displacement values calculated using the light vertex. Scaling can be changed with size equal to the normal ship when you are close to the ground.


More news:
I've implemented the two first color tables and am about to move to the animated stuff. :P


Even more news:
Light sourced palette, solid Color palette and animated color palette working perfectly for 13 82 for all models!  :D :P
The eyes and the tail "shine"!
These palettes of course include all variantes, daytime, nightime and space and some I don't remember.
I also set a key to show wireframe. Some of the models are not decoded correctly and using wireframe has helped me out.
(http://s17.postimage.org/gcz6j1pvz/Untitled_1.png) (http://postimage.org/)
(http://s12.postimage.org/41i3pzowd/Untitled_1.png) (http://postimage.org/)


Better news:
Here is a video of some models with their correct palettes, mostly 13 82. I've disabled only the palettes that crash my application.
https://vimeo.com/60055669
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 20, 2013, 04:22:31 am
Wow you progress so quickly, well done !
Unfortunately i have only few time to work on the project right now :-/
I only implemented the "13 82" palette right now, do the others palette are often used ? Just to know if i should also add support for them. In this case i will have to parse palette address from the object header.

About the shadow, i think you are right, they probably use the "shadow" models for that but that mean it almost double all objects transform calculations and rendering !

I'm continue my work on the animated data, i almost figured it out :) I still have some parsing bugs to fix and questions on some point (BSPTree node which do not reference any triangle for instance).
I hope to get that this evening after my job day :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 20, 2013, 07:41:04 am
I only implemented the "13 82" palette right now, do the others palette are often used ? Just to know if i should also add support for them. In this case i will have to parse palette address from the object header.
Lets see, this is what I have:
552 Obj Addresses
 13 Point at negative addresses
375 Objs point to 8213
 35 Objs point to 82ed
 10 Objs point to 83c1
  7 Objs point to 852e (I believe these are animated textures)

Then there are many other adddresses that make little to no sense. Specially since the are too varied. For example:
Code: [Select]
8542 8542 8542 8544 8544 8546 8548 8548 8552 8552 8552 8554 8556 8558 8560 8560

I've chosen to block any address reference that is not the first too that I've mentioned, just in case. I changed them with 8213.

About the shadow, i think you are right, they probably use the "shadow" models for that but that mean it almost double all objects transform calculations and rendering !
Thought the same but I think the SuperFX can handle it.

I'm continue my work on the animated data, i almost figured it out :) I still have some parsing bugs to fix and questions on some point (BSPTree node which do not reference any triangle for instance).
I hope to get that this evening after my job day :)
I have to work too! xD Good luck!

I've also implemented faces composed of 2 vertices, meaning lines. This makes it way easier to spot the models and guess some stuff about them. Those flashy antennas now glow! It also makes powerups look awesome and for example, there are 4 "Shielded Enemy" starting with B8DE, the wireframe shows me that they are not 4 different enemies but the same one, 3 of it's frames are for when it is cloaking.
(http://s11.postimage.org/kpkb4n9k3/Untitled_1.png) (http://postimage.org/image/lruhn6sdb/full/)


Important: Now I'm in search of the texture addresses in case anybody has them! I don't mean the snes sprites, I mean the addresses for the textures which have to be read in a certain way, but if you have the addresses for the sprites I wouldn't mind those either. :P
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 20, 2013, 12:05:00 pm
I guess you got your 552 objects from the SFXEdit app, i still not yet found where others objects are located.
I could use the SFXEdit addr too but i really want to find them from the rom too :)
Thanks for the statistics, that show that, indeed, 1382 is mainly used... i will probably wait to implement the other one :p

It's nice to see the object display in semi wireframe, their method is simple but efficient to display hybrid object :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 20, 2013, 12:23:24 pm
I guess you got your 552 objects from the SFXEdit app, i still not yet found where others objects are located.
I could use the SFXEdit addr too but i really want to find them from the rom too :)
I agree of course but I think that is far more complicated for me. I'm basically following your progresss and adding a bit of guesswork.
I also have this idea. Here is an 720p video I made a few hours ago and I will post it in some forums, reddit and maybe others. I'm thinking somebody with more knowledge might want to help.
https://vimeo.com/60089406

Thanks for the statistics, that show that, indeed, 1382 is mainly used... i will probably wait to implement the other one :p
I did the palettes changeable from the start using the headers. They are displayed by object if they correspond to the following four palettes, 8213, 82ed, 83c1, 85e2. VL-Tone mentioned that there were 9 and I'm guessing the ROM has references to them in plain sight.
I found those four by setting 8213 as a default, then found some models with colors that I didn't remember from the game and checked if their own palettes worked.
Also, at the beginning of the video you will see the High poly in daytime, nighttime and space using the 16 color variants. :P

It's nice to see the object display in semi wireframe, their method is simple but efficient to display hybrid object :)
I think this can be perfectly applied to making modern "retro" games.

I am particularly intrigued by the Andross face model because it is VERY fluent compared to some other animations.
Also, If anybody knows the texture addresses and sprite addresses let me know. :P


I checked a bit for some palette addresses I had seen before and I also verified the contents. What was weird about these two is that the colors seemed to be the same so I checked and the values for 13 82 and ed 82 are very similar in content. Here are some other palettes that I think work.

183D8 -> D881 (59 values Very short!)
18413 -> 1382 (218 values that make up the 109 that were mentioned before in the thread. This is the most common palette in Star Fox SNES)
184ED -> ed82 (212 values)
185C1 -> c183 (64 values)
18681 -> 8184 (265 values)
1878A -> 8485 (Could never get it to run, crashed my app)


Also, they are consecutive in the ROM meaning no jumping around. I bet they are all there.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 20, 2013, 06:18:30 pm
After many work i think i finally figured the animated vertex (my first implementation was partially wrong)... I had to change a bit my structure to adapt to it. If you look into the sources you will see that animated data are not as easy to handle than others type, i hope you will understand my code.
Also i fixed some others stuff and tried to parse as many objects i can from the rom, i have now about 550 objects.
There is still some bugs i can't figure... data look wrong in some case: some models should have 32 frames but only vertex data for 20 frames is present...

Here's the last version of my decoder application, sources are included in the jar file.
https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jar

Quote
I agree of course but I think that is far more complicated for me. I'm basically following your progresss and adding a bit of guesswork.
I also have this idea. Here is an 720p video I made a few hours ago and I will post it in some forums, reddit and maybe others. I'm thinking somebody with more knowledge might want to help.
https://vimeo.com/60089406

The video is really cool, nice object viewer with cool music =)
I don't know if you will find other interested people for that project, honestly that is a really complex and long task to analyze and extract data from rom, specially when we are not used to rom hacking :p

Quote
I did the palettes changeable from the start using the headers. They are displayed by object if they correspond to the following four palettes, 8213, 82ed, 83c1, 85e2. VL-Tone mentioned that there were 9 and I'm guessing the ROM has references to them in plain sight.
I found those four by setting 8213 as a default, then found some models with colors that I didn't remember from the game and checked if their own palettes worked.

I think i will quickly add support to all palettes as it doesn't make a big difference :)
Daytime / nightime / space variation is independent from the palette object information so we can easily change them !

Quote
I am particularly intrigued by the Andross face model because it is VERY fluent compared to some other animations.
Also, If anybody knows the texture addresses and sprite addresses let me know. :P

Unfortunately i did not yet have tried to understand where are the texture address, i know you can get them from palette but i never investigated in that. Honestly texture is not my first preoccupation right now as they are not much used in game.

Quote
183D8 -> D881 (59 values Very short!)
18413 -> 1382 (218 values that make up the 109 that were mentioned before in the thread. This is the most common palette in Star Fox SNES)
184ED -> ed82 (212 values)
185C1 -> c183 (64 values)
18681 -> 8184 (265 values)
1878A -> 8485 (Could never get it to run, crashed my app)

Should not your last palette address be 8A85 instead of 8485 ??

Quote
Also, they are consecutive in the ROM meaning no jumping around. I bet they are all there.

Cool, that make them even simpler to decode =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 20, 2013, 06:43:49 pm
After many work i think i finally figured the animated vertex (my first implementation was partially wrong)... I had to change a bit my structure to adapt to it. If you look into the sources you will see that animated data are not as easy to handle than others type, i hope you will understand my code.
Also i fixed some others stuff and tried to parse as many objects i can from the rom, i have now about 550 objects.
There is still some bugs i can't figure... data look wrong in some case: some models should have 32 frames but only vertex data for 20 frames is present...

Here's the last version of my decoder application, sources are included in the jar file.
https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jar
GREAT! :D Thank you!

Should not your last palette address be 8A85 instead of 8485 ??
Yes I think you are right.
By the way, I just noticed that the D881 palette that I mentioned as the first has whole bunch of XX 3F before which if you include those values makes it palette a fixed color palette and it starts at... 18200! This cannot be random, non of the numbers has been. ;)

I think I will take some time away from this to do some time off my computer! xD
But I will keep trying and reading :D


News from guesswork!
Before I "go" I was curious about finding the textures and I did it! :P
I've been curious about color conversion from SNES->RGB and it turns out that when VL-Tone made his applications he chose not to "correct"(?) the color and keep it as is. The great thing about this is that I opened up photoshop and compared VL-Tone's two texture pages and converted them manually to Hex and looked for the string in the ROM. This worked perfectly! :P
Texture data starts at $90200 and uses EXACTLY the method VL-Tone described:
Quote
As many figured out textures are stored as two 256x256 pages using 4 bits per pixel (they use the same 16 colors palette). The pages are interleaved meaning that for each XY$ byte in hex, X is used for page 1 and Y for page 2.
Here is the proof, and on the right is the use of XX 49 (64x64 Texture Polar Mapping Down Left) and the XX 4A (64x64 Texture Polar Mapping Down Right)

(http://s17.postimage.org/ls20vd7f3/Untitled_1.png) (http://postimage.org/)(http://s3.postimage.org/r5m70kv8z/Polar_Coord.png) (http://postimage.org/)


I'll be out of town for a few days but I wanted to show you guys it works. :P
It has artefacts around it because it was resized by openGL byt I plan on fixing that at some point.
(http://s11.postimage.org/46te7hnyb/Untitled_1.png) (http://postimage.org/)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 22, 2013, 05:31:52 am
Wow, well done dyson ! You get out the texture part :) Look really nice !

So now i think we almost have complete object decoding :D
In my object decoder i still have some invalid objects (about 40 over 550) but i don't really care ;)
I think i will see texture part later as i am using 4bpp bitmap surface and doing software texture mapping with 4bpp surface is a bit tricky ^^

Well now we need to figure a bit more about level decoding ! There is some informations on this so i guess it will be easier.
Almost some parts will need to be "hardcoded" as behavior or stuff like that.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 22, 2013, 10:47:50 am
So now i think we almost have complete object decoding :D
In my object decoder i still have some invalid objects (about 40 over 550) but i don't really care ;)
I think i will see texture part later as i am using 4bpp bitmap surface and doing software texture mapping with 4bpp surface is a bit tricky ^^
Great! Do you happen to have a list of valid objects? How have you determined that an object is or isn't valid?
Because it turns out, when I added the textures my program would crash (very probably bad coding by myself)

Well now we need to figure a bit more about level decoding ! There is some informations on this so i guess it will be easier.
Almost some parts will need to be "hardcoded" as behavior or stuff like that.
I'll see if I can dig up something but I don't see anything but the info VL-Tone had posted on that old forum. The big problem I see here is that now it is more about the timing of the game (ztimer?). I think faking that value would be easy but it would be more accurate to actually emulate the SuperFX. Whats worse is colision detection, where is that? is it just bounding box?
I think I came across the "shadow" palette while reprogramming mi app and I also think the jukebox enemy is made up of the jukebox plus the three rotating things inside it.
Something bad, I found out the texture placing is just weird and easier to do by hand (like 80 textures with horrible variable offset values) but if you want accuracy in coding I think you will have to read more on the SuperFX.
Decompiling the SFXedit 0.93.exe (that uses the ROM) or the StarfoxDecoder.dcr (that uses ripped models) might be useful but that exceeds my programming knowledge, as does recoding every new discovery (like adding textures to old code).

Anyways, the lack of documentation and proper programming/ROM hacking knowledge (from me) is making this very frustrating so I will not be working too much on this anymore. I will however be reading up and since I have to learn more c++  for work so I will eventually be remaking the code.

...but I won't leave the thread, I would like very much to see your progress and new codes! :D
I won't disappear, I am easily reachable since I've posted this Star Fox thing in a few places, they all point to a usable email account.

And how can I post my source code? someone could very well continue! I made it using openframeworks of_v0073_win_cb_release.

I also posted the info and request for help in this thread here: http://www.smwcentral.net/?p=viewthread&t=62544

Here is something I captured from the latest version I made. This is the version that crashed on some models (not sure if it was only in the corrupt ones).
Also notice, I've managed to let the textures pixelate even on high resolutions, I wanted textures with aliasing. :P
(http://s14.postimage.org/f63rdzgz5/bike.png) (http://postimage.org/)


@Stef
I tried getting the frames one last time and I hit dead end again. I'm not sure I understand the process and how the information is stored. How does one know which vertex is being "animated" (changed) and how does your frame offset work (practicaly).
I changed the examples to two very distinct animations. One is a pillar with variable height over one axis only (easy to draw too) and the other is the Hydra with flapping wings that oddly gives out more info after the "frames". VL-Tone had those frames in the SFXedit 0.93.exe but not in the StarfoxDecoder.dcr , I am thinking they are other kinds of transformations but I am just guessing. Anyways, the Hydra one exceeds the offset assumption. Also, the pillar one only moves 4 vertices of 8, I think it is the easiest example.

49B4 Growing column
Code: [Select]
Animation 49B4
About 16 frames
Number 75
Description: Column with a square base and variable height (animation)
---------------------------------
49B4 Growing column
Header Address: 3649
Bank:              c
Vert. Address: 6098b
Face Address:  60a83

Vertex Information:
38 ($38) X flip vertex list
02 Two sides
07 00 F6 Side 1 Mirrored [7,0,-10] and [-7,0,-10] accounts for 2 vertex
F9 00 0A Side 2 Mirrored [-7,0, 10] and [7,0, 10] accounts for 2 vertex
1C ($1C) animated vertex list
20 Frame Count $20 means 32 frames (16 more than expected)
3F Frame offset $3F = 63+1 = 64
00 48
00 51
00 5A
00 63
00 6C
00 75
00 7E
00 87
00 90
00 99
00 A2
00 AB
00 B4
00 BD
00 C6
00 1F
00 1D
00 1B
00 19
00 17
00 15
00 13
00 11
00 0F
00 0D
00 0B
00 09
00 07
00 05
00 03
00 01
00 Offset points here, end of some part.


// Here begin the Other parts of the model.
38
02
07 F1 F6 [7,-15,-10] and [-7,-15,-10]
07 F1 0A [7,-15, 10] and [-7,-15,-10]
20 // 16 bits offset jump
A3 Frame offset $A3 = 163+1 = 164 // Here I got lost
00
38
02
07 E7 F6
07 E7 0A
20
98 00 38 02 07 DF F6 07 DF 0A
20 8D 00 38 02 07 DA F6 07 DA
0A 20 82 00 38 02 07 D3 F6 07
D3 0A 20 77 00 38 02 07 CC F6
07 CC 0A 20 6C 00 38 02 07 C3
F6 07 C3 0A 20 61 00 38 02 07
BA F6 07 BA 0A 20 56 00 38 02
07 B1 F6 07 B1 0A 20 4B 00 38
02 07 B5 F6 07 B5 0A 20 40 00
38 02 07 BE F6 07

2fb9 Plasma Hydra Boss body

Code: [Select]
Animation 2fb9
About 10 frames
118
Description: Plasma Hydra with wings flapping
---------------------------------
2fb9 Plasma Hydra Boss body
Header Address: 3b2f
Bank:              c
Vert. Address: 62659
Face Address:  62738

Vertex Information:
04 ($04) Type 04 Non Mirrored
04
00 00 EC
00 D8 F6
00 14 1E
00 00 28
38 ($38) X flip vertex list
09 9 Mirrored Vertex
0A 28 E2 Mirrored
19 00 F1 Mirrored
E4 FB F6 Mirrored
FA F6 F6 Mirrored
E2 0A FB Mirrored
F6 14 00 Mirrored
1E 00 0A Mirrored
08 FB 0A Mirrored
F6 0A 0F Mirrored
1C ($1C) animated vertex list
0A Frame Count $0A means 10 frames (Exactly as expected)
13 Frame offset $13 = 19+1 = 20
00 21
00 2F
00 3D
00 4B
00 59
00 67
00 75
00 83
00 91
00 04
02 // Something happens here, its at position 10, The following are 7 transformations?
14
14 EC EC
14 EC 38
01
1E 28
28 20 8E
00 04
02 14 11 EC EC
11 EC 38 01 1E 2F 24 20 7E 00 04 02 14 0D ED EC
0D ED 38 01 1E 34 1F 20 6E 00 04 02 14 0A EF EC
0A EF 38 01 1E 39 19 20 5E 00 04 02 14 09 F0 EC
09 F0 38 01 1E 3B 15 20 4E 00 04 02 12 07 F0 EE
07 F0 38 01 24 37 15 20 3E 00 04 02 10 06 F0 F0
06 F0 38 01 2A 32 15 20 2E 00 04 02 0B 05 F0 F5
05 F0 38 01 32 25 15 20 1E 00 04 02 05 06 F0 FA
06 F0 38 01 36 16 15 20 0E 00 04 02 08 05 F0 F8
05 F0 38 01 35 1E 15 0C 30 20 19 17 0E 0E 17 19
0F 16 18 18 16 0F 0B 0A 00 13 12 01 12 13 0A 0E
0F 00 0F 0E 05 03 13 01 01 12 03 03 14 13 12 15
03 03 15 14 04 05 02 05 14 02 02 15 04 14 15 02
13 14 11 13 11 08 14 0E 0C 0C 08 11 0C 07 08 0C
0E 00 00 0A 08 10 15 12 0B 09 10 10 0D 0F 10 09
0D 09 06 0D 06 00 0F 06 09 0B 3C 28 06 20 00 14
28 0D 27 00 04 44 2E 00 28 0F 9C 00 04 44 A3 00
44 E3 00 28 13 FD 00 04 44 05 01 44 17 01 14 04
06 0E 00 7B E1 12 13 0A 0B FF 14 03 0D 38 00 8A
D1 03 15 14 FF 14 03 04 0C 00 5A 5A 0B 0A 00 03
07 0C 00 A6 5A 0E 0F 00 03 12 12 09 29 88 13 14
11 03 15 0E 7E 0E 09 0C 08 11 03 16 10 6F FA 3D
0C 07 08 04 17 38 13 AC 5D 0C 0E 00 07 04 18 12
13 53 5E 00 0A 08 07 03 19 10 F7 29 88 10 15 12
03 1C 0C 82 0E 09 10 09 0D 03 1D 0E 91 FA 3D 09
06 0D 04 1E 38 ED AC 5D 06 00 0F 0D 04 1F 10 ED
53 5E 06 09 0B 00 FF 14 03 0F
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 24, 2013, 12:19:13 pm
Great! Do you happen to have a list of valid objects? How have you determined that an object is or isn't valid?
Because it turns out, when I added the textures my program would crash (very probably bad coding by myself)

Actually invalid objects are the ones which are unamed and usually not interesting so they should not give any problems from this side.

Quote
I'll see if I can dig up something but I don't see anything but the info VL-Tone had posted on that old forum. The big problem I see here is that now it is more about the timing of the game (ztimer?). I think faking that value would be easy but it would be more accurate to actually emulate the SuperFX. Whats worse is colision detection, where is that? is it just bounding box?

I guess emulating ztimer is really easy, we just need a counter to decrement... bounding box is indeed another thing i would like to figure ! I guess it is bounding box but i would to find theirs definition :)

Quote
Anyways, the lack of documentation and proper programming/ROM hacking knowledge (from me) is making this very frustrating so I will not be working too much on this anymore. I will however be reading up and since I have to learn more c++  for work so I will eventually be remaking the code.

...but I won't leave the thread, I would like very much to see your progress and new codes! :D
I won't disappear, I am easily reachable since I've posted this Star Fox thing in a few places, they all point to a usable email account.

And how can I post my source code? someone could very well continue! I made it using openframeworks of_v0073_win_cb_release.

I also posted the info and request for help in this thread here: http://www.smwcentral.net/?p=viewthread&t=62544

I understand and honestly it is a bit the same for me... now i need to advance my own implementation :)
Having almost all the objects is already a good start.
Of course it would be nice to get bounding boxes and more informations on level data but i need to work on my stuff else it will never progress !

Quote
Here is something I captured from the latest version I made. This is the version that crashed on some models (not sure if it was only in the corrupt ones).
Also notice, I've managed to let the textures pixelate even on high resolutions, I wanted textures with aliasing. :P
(http://s14.postimage.org/f63rdzgz5/bike.png) (http://postimage.org/)

Look really nice with the pixelated texture, more "authentic" :D

Quote
I tried getting the frames one last time and I hit dead end again. I'm not sure I understand the process and how the information is stored. How does one know which vertex is being "animated" (changed) and how does your frame offset work (practicaly).
I changed the examples to two very distinct animations. One is a pillar with variable height over one axis only (easy to draw too) and the other is the Hydra with flapping wings that oddly gives out more info after the "frames". VL-Tone had those frames in the SFXedit 0.93.exe but not in the StarfoxDecoder.dcr , I am thinking they are other kinds of transformations but I am just guessing. Anyways, the Hydra one exceeds the offset assumption. Also, the pillar one only moves 4 vertices of 8, I think it is the easiest example.

You just did some minors mistakes in your decoding.
Here's my updated notes about the objects decoding :
https://dl.dropbox.com/u/93332624/dev/sfx/objects.txt

And also your vertex definition fixed :

Code: [Select]
Vertex Information:
38 ($38) X flip vertex list
02 Two sides
07 00 F6 Side 1 Mirrored [7,0,-10] and [-7,0,-10] accounts for 2 vertex
F9 00 0A Side 2 Mirrored [-7,0, 10] and [7,0, 10] accounts for 2 vertex
1C ($1C) animated vertex list
20 Frame Count $20 means 32 frames (16 more than expected)
3F 00 Frame offset $3F = 63+1 = 64
48 00
51 00
5A 00
63 00
...

// Here begin the Other parts of the model.
38
02
07 F1 F6 [7,-15,-10] and [-7,-15,-10]
07 F1 0A [7,-15, 10] and [-7,-15,-10]
20 // 16 bits offset jump
A3 00 Frame offset $A3 = 163+1 = 164 // Here I got lost

38
02
07 E7 F6
07 E7 0A
20
98 00
38
02
...

2fb9 Plasma Hydra Boss body
Vertex Information:
04 ($04) Type 04 Non Mirrored
04
00 00 EC
00 D8 F6
00 14 1E
00 00 28
38 ($38) X flip vertex list
09 9 Mirrored Vertex
0A 28 E2 Mirrored
19 00 F1 Mirrored
E4 FB F6 Mirrored
FA F6 F6 Mirrored
E2 0A FB Mirrored
F6 14 00 Mirrored
1E 00 0A Mirrored
08 FB 0A Mirrored
F6 0A 0F Mirrored
1C ($1C) animated vertex list
0A Frame Count $0A means 10 frames (Exactly as expected)
13 00 Frame offset $13 = 19+1 = 20
21 00
2F 00
3D 00
4B 00
59 00
67 00
75 00
83 00
91 00
04                    // here is the correct start for first frame vertex
02 // 2 vertex
14 14 EC
EC 14 EC
38                    // mirror x
01                    // 1 vertex
1E 28 28
20                    // jump
8E 00               // next is at offset $8E
...

Hope that help you with the animated data =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 24, 2013, 03:45:18 pm
And also your vertex definition fixed :
Hope that help you with the animated data =)
Awesome! Do you happen to know what happens in between the offset? I think that was what confused me since it looks like a lot of bits with little use? Maybe damage data or more atribute for the same model. What do you think about those?

You just did some minors mistakes in your decoding.
Here's my updated notes about the objects decoding :
https://dl.dropbox.com/u/93332624/dev/sfx/objects.txt

I couldn't download from that link. Is it correct?

Anyways, you've helped me a lot here so I will do a bit more digging so that you can continue your implementation of Star Fox :D
I saw this while searching for stuff:
http://wiki.superfamicom.org/snes/show/Stunt+Race+FX
I think the next step invoves using bsnes and analizing analyzing changes and stuff like that.

Thank you!

-edit->
I got it!
I would only like your opinion about why there are 16 bit jumps and so many offsets with little values to them. It seems like a terrible waste of space. :D

-edit 2->
A few days ago I converted the "frame offset" values from the "49B4 Growing column" and found this. I don't know if it is relevant or anything but I think it might be related to movement on screen. I may be terrible wrong but it might be related with the ztimer.
49B4 Growing column
(http://s14.postimage.org/9y3qs6ku9/Untitled_1.png)

2FB9 - Plasma Hydra with wings flapping
(http://s12.postimage.org/yovszwpsd/Untitled_1.png)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 24, 2013, 05:43:30 pm
Quote
Awesome! Do you happen to know what happens in between the offset? I think that was what confused me since it looks like a lot of bits with little use? Maybe damage data or more atribute for the same model. What do you think about those?

Usually you just find vertex data of other frame :)

A typical animated vertex list data will look like this :

Code: [Select]
04           // normal vertex
XX           // vertex number
XX XX XX    // vertex data
XX XX XX
...
1C          // animated vertex
XX          // number of frame
XX XX     // offset for animated vertex frame 1
XX XX     // offset for animated vertex frame 2
XX XX     // offset for animated vertex frame 2
....          // offset for animated vertex frame x

// frame 0 animated vertex data
XX          // vertex type
XX          // vertex number
XX XX XX   // vertex data
XX XX XX
...
20          // jump
XX XX      // 16 bit offset where to jump to reach end of vertex data
// frame 1 animated vertex data
XX          // vertex type
XX          // vertex number
XX XX XX   // vertex data
XX XX XX
...
20          // jump
XX XX      // 16 bit offset where to jump to reach end of vertex data
// frame 2 animated vertex data
XX          // vertex type
XX          // vertex number
XX XX XX   // vertex data
XX XX XX
...
20          // jump
XX XX      // 16 bit offset where to jump to reach end of vertex data
// frame 3 animated vertex data
...

So there is no waste in vertex data :)
The way i parsed the animated vertex in my tool permit to entirely rebuild the vertex list for each frame but in the rom only the variable part are redefined (it's why we have a jump tag so we can always attach to the same last vertices).

Quote
I couldn't download from that link. Is it correct?

It does work for me, does it still fail for you ?

Quote
A few days ago I converted the "frame offset" values from the "49B4 Growing column" and found this. I don't know if it is relevant or anything but I think it might be related to movement on screen. I may be terrible wrong but it might be related with the ztimer.

It does, as the animated color, animated object use a different vertex base at each frame :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 24, 2013, 06:37:39 pm
Thanks Stef! Everything worked perfectly! :P
I've rewritten my vertex code so it includes animations and it is reading the rom correctly. I'll have captures later :P
Everything you've said works very well :D
Also the link now works correctly, maybe it was just a dropbox thing.

I am left with two questions: is fixed vertex information always before the animated vertex info?
I was wondering this in order to connect it with the face info correctly.

Also, I still don't get the purpose of stating every offset. Can there be more frames than possible vertex states?
For instance, in the "column" example graph I made, in the second half the offsets decrease, and they all point to frame 1. Would this mean that after certain animation frames have been completed repeat frame 1 a few times?
I'm guessing this would be useful in some models like the "sea squid" thing where it doesn't push in a permanent loop.

Here is the last data of the offsets of "Column" example, they all point to the first frame.
0F 00
0D 00
0B 00
09 00
07 00
05 00
03 00
01 00


--EDIT->
IT'S ALIVE!!!! xD
:D
ANIMATIONS ARE WORKING WITH COLOR PALETTES.
If I were to be missing something its the correct placement of textures! :P
(I'd still like your comment on the thing about the offsets :D)

-edit->
So I think I've gotten most of the objects working. I understand now that some frame offsets are for different interactions like the two sequences inside "9FB9 Monarch Dodora body animation", one for when it walks around and the other for when you hit it. The frames are all in sequence but I'm sure the colision detection points to a certain portion of it.
I also know that there is a special palette ("8590") for "4DAC Andross Square" and "85AC Andross Cube" if used crashed the program (I never saw VL-Tone managing to decode it). This palette points to the big andross face in the texture table and by the way, both of these models are 16 bit coords.
I avoided the 20 interchangeable palettes because I didn't know what to do with them but now I discovered that the "64C2 Attack carrier" in Corneria uses this to determine how the sunset affects the color of the ship, Corneria Level 1 and 2 are by day and Level 3 is with the sunset and this is colored using the interchangeable palettes.

Some faces do have incorrect color setting but I've noticed only one object (70DB Main enemy ship (orange)).

Textures are loaded but I have yet to determine the correct offset algorithm needed to place them correctly but if anyone manages to understand it it will be very easy to put them there since they are already decoded and ready for use.

Some faces are made to have two sides, tha is what makes them have that bad flicker. This also happens with faces with textures because the program thinks a texture is another face. This is easy to fix but I prefer it to be visible since that is where the textures will go.

Even while I had success in loading most models some still appear corrupt for no apparent reason for very few models. I followed the code and it should work.

I will now clean up the code a bit and add a smooth animation setting just to see how it looks. Anyways I believe my work is done with this versión of my app. :D

@Stef
I will try and help with the stage thing. Where on this are you now?

-edit with news!->
Here it is! :D
I have added frame interpolation because I could. I had idea for ages and it works nicely and you can disable it with the keyboard if you want to. :D
https://vimeo.com/60433014
Remember you can download the original video which is 60 fps :P

Stef, how should I post the source code? :D
In a way it is it is permanently on the web.
On a side note, I suppose you've read this thread, it is the more obscure one I could find where VL-Tone explains a bit more about the stage info and how it is used:
http://arwinglanding.net/forum/index.php?PHPSESSID=te5kqmecnhn3j7ltc3ddlrfkv5&topic=1649.0;nowap
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 26, 2013, 03:01:07 pm
Quote
Thanks Stef! Everything worked perfectly! :P
I've rewritten my vertex code so it includes animations and it is reading the rom correctly. I'll have captures later :P
Everything you've said works very well :D
Also the link now works correctly, maybe it was just a dropbox thing.

Cool ! Glad you got it, you implement things really quickly :)

Quote
I am left with two questions: is fixed vertex information always before the animated vertex info?
I was wondering this in order to connect it with the face info correctly.

You can have fixed part before and after animated part, you can also have only animated part.

Quote
Also, I still don't get the purpose of stating every offset. Can there be more frames than possible vertex states?
For instance, in the "column" example graph I made, in the second half the offsets decrease, and they all point to frame 1. Would this mean that after certain animation frames have been completed repeat frame 1 a few times?
I'm guessing this would be useful in some models like the "sea squid" thing where it doesn't push in a permanent loop.

Exactly, that allow reuse of same vertices for another frame, the simplest example can be a growing then decreasing bloc. You can use vertices of the growing frames for the decrease part of animation :)

Quote
I also know that there is a special palette ("8590") for "4DAC Andross Square" and "85AC Andross Cube" if used crashed the program (I never saw VL-Tone managing to decode it). This palette points to the big andross face in the texture table and by the way, both of these models are 16 bit coords.
I avoided the 20 interchangeable palettes because I didn't know what to do with them but now I discovered that the "64C2 Attack carrier" in Corneria uses this to determine how the sunset affects the color of the ship, Corneria Level 1 and 2 are by day and Level 3 is with the sunset and this is colored using the interchangeable palettes.

There are still some unknown about palette, i think some data in the object header define "object type" or something like that which may help in palette interpretation as maybe bounding box informations as well.

Quote
Some faces are made to have two sides, tha is what makes them have that bad flicker. This also happens with faces with textures because the program thinks a texture is another face. This is easy to fix but I prefer it to be visible since that is where the textures will go.

Yeah i noticed that, this is because Starfox use polygon clockwise order to define if it's visible or not, so if a face is always visible (as part of arwing wing) then you should define 2 polygon in reverse order to get it always displayed.

Quote
Even while I had success in loading most models some still appear corrupt for no apparent reason for very few models. I followed the code and it should work.

You can try my last version of my object decoder, invalid object (missing data or cannot be parsed correctly) are displayed in red, that might help you to know if your object is correct or not :
https://dl.dropbox.com/u/93332624/dev/sfx/sfxObjReader.jar

Quote
@Stef
I will try and help with the stage thing. Where on this are you now?

Nowhere :D
I did not yet started anything about it as i meet some troubles with my program, it turns out i got memory corruption when i try to import all generated objects... This is not due to the exported itself ;)


Quote
Here it is! :D
I have added frame interpolation because I could. I had idea for ages and it works nicely and you can disable it with the keyboard if you want to. :D
https://vimeo.com/60433014
Remember you can download the original video which is 60 fps :P

It looks really smooth ! Your interpolation code works perfectly :)
I will fit with standard animation as anyway i won't have smooth frame rate on my final program. It does run on a much more limited system and interpolation would waste even more my limited CPU resource !

Quote
Stef, how should I post the source code? :D
In a way it is it is permanently on the web.

Actually you can post it in whatever form you want on FileShare or whatever, of course it would be best to choose a reliable share site so it can stay available for a long time. Honestly i'm not sure that a lot of guys will use it, we are probably the only ones interested in doing a remake of the original game ^^


Quote
On a side note, I suppose you've read this thread, it is the more obscure one I could find where VL-Tone explains a bit more about the stage info and how it is used:
http://arwinglanding.net/forum/index.php?PHPSESSID=te5kqmecnhn3j7ltc3ddlrfkv5&topic=1649.0;nowap

Yeah i already read that topic, some part are interesting but i think the best is still to use that SFXEdit tool and the attached documentation :) There is many interesting thing to get from it, at least we can somehow reproduce them by reading how level are arranged even f we don't use direct level data !
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 26, 2013, 04:00:39 pm
Thanks you for the answers and info. :D

If there is any comment about it I would have to say this:
You can have fixed part before and after animated part, you can also have only animated part.
I read the vertex data expecting the fixed vertices info to always appear before the animated ones. This is not necessarily true but it was how I started the animation part. Turns out in my case it works and looks correct because the triangle construction in the face section points to certain vertices with values, if the vertices are in different order it wouldn't have animated correctly. So at least in my case the vertex info appears before.
Oddly enough, I was curious what would happen if I flip them, almost all objects are affected except the bipeds ( 9CBB, C4E2  and 11B4 and variations.)

There are some models which seem oddly corrupt, I'll read every line of them to find out more about the error (D4D7 Phantron Kicking, weird fixed vertex distorts the object).

I'll post the code later somewhere you've suggested, and now I can take a bit more time to add features. :D
I'll se if I can recheck stage 1 info.


Cool ! Glad you got it, you implement things really quickly :)

It's a combination between years of waiting for someone able to get more info and having to learn c++ and openGL for work. :P
I also don't want to stop because I don't think I will get many chances to advance in the future.

About the Corneria 1, I think we would be starting this all wrong. In the game, the ship moves using the controller which passes through the SNES chipset and all that which would mean far too many things I don't know (maybe you do). First, I will try to read from the ROM the cinematic before Corneria, that one has a fixed and established set of objects which also happen to be good for measuring the size of the scene (to determine the speed of the ship) nothing weird.
Later I will try the game intro scene which might have 1 bounding box as well as a few laser shots combines with a fixed background.

What do you think?
Hey that brings me to a question, what do you know about SNES programming? I know nothing!


I read a little about the topic and I didn't understand much. I started with the fact that I know that at $6F0F8 in the ROM is the beginning of the Training level info, also I know that according to SFXEdit that level is at $9A6E0D. I tried reading a bit about HiROM and LoROM but no, I don't know anything about this. What I can guess is that in order to read much of the info about the ROM it would be necessary to emulate how memory works in the SNES, otherwise working as I have until now would be enough for me but maybe not for you Stef.
VL-Tone has the list of every address but he also mentions stuff like this:

Quote
At 7E1FF9 and 7E1FFA is a 16-bit pointer for the starting level pointer, you can use a cheat at this adress to start at any level in a more "normal" way.

If I go to address 7E1FF9 in the ROM Hex Edit tells me that I have gone past the End Of File. So how does one get from WRAM(?) over to the ROM file address?
Should I worry about this if I know nothing about real SNES hacking?

He also mentions something like the following. ¿What does the colon symbol mean in these cases?

Quote
A funny example, if you go into Corneria level 2 and activate these two cheats, 7E16FF:BB and 7E1700:01, you'll loop the part where one of your crew member will get attacked by an enemy

And finally, the most important of all questions... how do I go from the Stage Header information to the actual stage information. :S


Here is something I never figured out. How and when do I change between these 4 subpalettes? I thought the light index was supposed to affect the layer of every palette but not the subpalette. I did it for level of palette and it looked ok so I never figured the use of the subpalettes.
(http://images4.hiboox.com/images/0713/9bbfd41f45bc2bf2b54c54136f89312b.png)

Anyways, here are download links:
http://bitshare.com/files/umwcr17c/SNES_Star_Fox_Object_Decoder_ver1.zip.html
http://rapidgator.net/file/81179016/SNES_Star_Fox_Object_Decoder_ver1.zip.html
http://www.4shared.com/zip/41CS6-a8/SNES_Star_Fox_Object_Decoder_v.html              (requires registration)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on February 28, 2013, 05:12:54 am
If there is any comment about it I would have to say this:I read the vertex data expecting the fixed vertices info to always appear before the animated ones. This is not necessarily true but it was how I started the animation part. Turns out in my case it works and looks correct because the triangle construction in the face section points to certain vertices with values, if the vertices are in different order it wouldn't have animated correctly. So at least in my case the vertex info appears before.
Oddly enough, I was curious what would happen if I flip them, almost all objects are affected except the bipeds ( 9CBB, C4E2  and 11B4 and variations.)

Actually i saw the following different cases by looking in model vertices :
Code: [Select]
Fixed
Animated
Fixed

----

Fixed
Animated

---

Animated

So maybe you are right, you can't have vertices definition starting with animated then having fixed following.
At least my code parser allow it just in case :)



Quote
There are some models which seem oddly corrupt, I'll read every line of them to find out more about the error (D4D7 Phantron Kicking, weird fixed vertex distorts the object).

I didn't yet tested displaying models, i will may experience some troubles too when i will try it ^^

Quote
About the Corneria 1, I think we would be starting this all wrong. In the game, the ship moves using the controller which passes through the SNES chipset and all that which would mean far too many things I don't know (maybe you do). First, I will try to read from the ROM the cinematic before Corneria, that one has a fixed and established set of objects which also happen to be good for measuring the size of the scene (to determine the speed of the ship) nothing weird.
Later I will try the game intro scene which might have 1 bounding box as well as a few laser shots combines with a fixed background.

What do you think?

Of course :)
You have to handle the game logic yourself :
- control the arwing ship from user input
- level navigation (Z coordinate decrement on all scene objects)
- handle collision between objects (arwing shoot, arwing, ennemy, scene objects)
- a lot more...

The level data only give events so it make some enemies, scene objects, boss, cutscene... to appears.
But then all the game logic handle them and a lot of the logic itself is hidden in "behavior" object of level data.
We actually have to reproduce the original game logic to make all that working...  Level data is just here to help is constructing the level but not for the game logic itself which we have to build on our own.

Quote
Hey that brings me to a question, what do you know about SNES programming? I know nothing!

I read a little about the topic and I didn't understand much. I started with the fact that I know that at $6F0F8 in the ROM is the beginning of the Training level info, also I know that according to SFXEdit that level is at $9A6E0D. I tried reading a bit about HiROM and LoROM but no, I don't know anything about this. What I can guess is that in order to read much of the info about the ROM it would be necessary to emulate how memory works in the SNES, otherwise working as I have until now would be enough for me but maybe not for you Stef.
VL-Tone has the list of every address but he also mentions stuff like this:

If I go to address 7E1FF9 in the ROM Hex Edit tells me that I have gone past the End Of File. So how does one get from WRAM(?) over to the ROM file address?
Should I worry about this if I know nothing about real SNES hacking?

I do now a bit about SNES programming but not that much, it could help in reverse engineering rom data but not in reproducing the game itself. All the rom can bring us is data and only data (object model, level data...). All the game logic code has to be redone and that is just game programming skill, nothing else.
We could try to read the base game code but there is no point in doing it, we can try to replicate it just by testing and comparing original game and remake :)
About level data, we can just use what SFXEdit give us, it actually contains all what we want =) Did you read the SFXEdit documentation ? it gives nice informations about how interpret level data :)

Quote
He also mentions something like the following. ¿What does the colon symbol mean in these cases?

semi colon separate the address and the value :
$77EEFF:EE

means : set value $EE at address $77EEFF

Quote
Here is something I never figured out. How and when do I change between these 4 subpalettes? I thought the light index was supposed to affect the layer of every palette but not the subpalette. I did it for level of palette and it looked ok so I never figured the use of the subpalettes.
(http://images4.hiboox.com/images/0713/9bbfd41f45bc2bf2b54c54136f89312b.png)

Actually i think these subpalette are used only depending the Z depth of your object in the scene :)
The farther is your object, the more dark it is.

Quote
Anyways, here are download links:
http://bitshare.com/files/umwcr17c/SNES_Star_Fox_Object_Decoder_ver1.zip.html
http://rapidgator.net/file/81179016/SNES_Star_Fox_Object_Decoder_ver1.zip.html
http://www.4shared.com/zip/41CS6-a8/SNES_Star_Fox_Object_Decoder_v.html

Thanks for sharing ! I will try them asap :)
By the way, i am still working on objects. I try to understand what are the informations contained in the object header and i have to admit that i had some hard time with that.
For the moment i only isolated the scaling parameter, some others data seems to be related to the object size or many bounds but i'm not yet sure about that.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on February 28, 2013, 08:10:51 am
Thanks for the information!
I believe you are right on all the comments you posted. For example, the crippled D4D7 Phantron Kicking possibly has static->animated->static vertex information and maybe that is why I am getting crippled animation. I will try this later. :D

Thank you!


Verified the Depth Palette thing. I hadn't noticed it.


I tried decoding some stage information but I got confused between addresses and references. What I guessed is that it is relatively straightforward, having the correct information it could be understood quickly.


@Stef
By now I'm just following your work and in order to be somehow useful I'll start correctly documenting what we already know including methods, conversion with examples and such.

March 05, 2013, 09:41:49 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
HEY!!!!!!!!!!!!!!!!!!!!!!!!
READ PM
http://jul.rustedlogic.net/thread.php?id=15998
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 06, 2013, 08:01:26 am
Just saw your messages ! Awesome VL Tones contacted you, well done :)
I downloaded the zip file he sent but looks like that is all we already have on different topic / forum / archive we explored.
I am still looking to find a bit more infos about object and after having spent some time on that i can only make some assumptions...
I figured the scale data but all others infos as object looks weird...
I will describe them later when i will be back at home but i guess VL-Tone can help with that (if he can remember) :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 06, 2013, 08:26:37 am
I downloaded the zip file he sent but looks like that is all we already have on different topic / forum / archive we explored.
I looked over them too, I've left him a question about decompiling this SFXEdit and the Shockwave Object Decoder. Anyway, I am just hoping for solid bits of information like the following which I post here so it is searchable on the internets:
Quote
Note that some of the things that you find in SFXedit might not be used by the program itself and are just some text I pasted in my project for reference.
Also, SFXedit doesn't use/emulate any Super-FX code. It does feature a very simple 65c816 dissembler/assembler because level data sometimes depends on ASM code to branch, but it doesn't actually emulate the code.

I am still looking to find a bit more infos about object and after having spent some time on that i can only make some assumptions...
I figured the scale data but all others infos as object looks weird...
I will describe them later when i will be back at home but i guess VL-Tone can help with that (if he can remember) :)
Great! Awesome and lets just hope! :D
Making a level editor would be awesome but I now see that without deconstructing the logic of the header information in the game it would be impossible to modify a stage size or amount of objects it can hold.
By the way, is it hard or even meaningful to map out a ROM? As in, "$60F58 here is the something that does this". Are there any tools for such a thing? I ask because I wish to make a cleaner document about what we already have. :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 06, 2013, 05:14:03 pm
Making a level editor would be awesome but I now see that without deconstructing the logic of the header information in the game it would be impossible to modify a stage size or amount of objects it can hold.
By the way, is it hard or even meaningful to map out a ROM? As in, "$60F58 here is the something that does this". Are there any tools for such a thing? I ask because I wish to make a cleaner document about what we already have. :D

Actually SFXEdit already have the level editor, except it is done in hexa decimal edition form but you can actually already edit / modify Starfox level through the application :)
Map out the rom is a nice idea, it is the easiest way then to read / decode and understand the rom for someone else it but that would require much much time to do it ! Right now we already have many informations but you are right, they need to be compiled and set in a good form so we can easily read them. And as far i know there is no ready to go solution for that... except taking notepad and writing all by hands :p

By the way, here is the format of the object header as i now understand it :

Code: [Select]
$00: vertex address offset (2 bytes, low byte first)
$02: bank number (1 byte)
$03: face address offset (2 bytes, low byte first)
$05: Z position ?? (2 bytes, low byte first)
$07: scale, used as left shift operator: value <<= scale  (1 byte)
$08: unknown address, collision infos ?? (2 bytes, low byte first)
$0A: size X (2 bytes, low byte first)
$0C: size Y (2 bytes, low byte first)
$0E: size Z (2 bytes, low byte first)
$10: Z distance / alignment ? (2 bytes, low byte first)
$12: palette address (2 bytes, low byte first)
$14: id1
$16: id2
$18: id3
$1A: id4

Bank number = 0 is a special value meaning there is no vertex nor face data attached to this object.

To compute final vertex and face data address in the rom we have to use this formula :
((bank number - 1) * $8000) + address offset   (add $200 for headered rom)

Example of low poly arwing model header :
vertex address = ($10 * $8000) + $F173 = $8F173  ($8F373 on headered rom)
face address = (($10 * $8000) + $F196 = $8F196  ($8F396 on headered rom)

There are many informations I'm not sure about :
$05: Z distance ?? (2 bytes, low byte first)
$08: unknown address, collision infos ?? (2 bytes, low byte first)
$10: Z position / alignment ? (2 bytes, low byte first)

$05 seems to be something as Z distance of object but i'm really not sure, the filed is rarely set which make it even more difficult to figure.
$08 field is rarely set too but when it is done, it seems to be a 16 bit address... Note that field is almost time use of Arwing object or some big boss / base object.
$10 is almost time very close to the value set in $0E (size z) but not always the same, a bit more or a bit less... can't really figure what it is.

About the size fields, they give the final object size after scale factor have been applied. Once again I am not sure about them but i believe the size information could be use as a bounding box and Z position could be a sort of bounding box shift compared to object center. Just some suppositions...

Here is the last version of my object decoder tool :
https://www.dropbox.com/s/bem8k66w8syj80q/sfxObjReader.jar?dl=0

Red object : not correctly decoded
Green object : animated
Blue object : position field set

As you may see, the SFX Object decoder do not exactly use the same header decoding as the one explained above, it is just because i tried several test cases and i still don't have figured the real meaning of these fields.

Here is a preview of my project, just a small demo:
https://www.dropbox.com/s/macxo0841djlo5a/sfx_gen.zip?dl=0

I started to work on it a long time ago but i can now display direct object from starfox which is awesome =)
Ah yeah, you need a sega megadrive emulator to test it ;)

Edit: fixed dropbox links
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 06, 2013, 06:36:22 pm
I started to work on it a long time ago but i can now display direct object from starfox which is awesome =)
Ah yeah, you need a sega megadrive emulator to test it ;)

Where did this come from? xD
How did you do this a long time ago if you just now have the models?!?! :D
It looks great! How did you make this work?

Everything else sounds great. I think I will wait a bit more to rewrite my code, specially since I am kind of stuck with the stage information. :D
You've had awesome progress! :D

To help you out I'll begin hacking at the rom and using your table as reference for distorting objects.  >:D

:D the only one I did get to work as you mentioned out was the scale one. The collision ones are interesting but I couldn't figure out their inner workings although I know they are collisions since I managed to destroy the ship many times before actually starting the game. I also tried using the two bytes as 4 face index values but I'm still not sure.
The "$05: Z position ?? (2 bytes, low byte first)" seems to be right too because it shifter the position at with the Arwing becomes available.

I also answered a question I had for some time which was why is there a face missing from the the Corneria Base obj. It actually isn't missing, it is loaded as a separate object in order to be correctly drawn on screen using the BSP. See, this rectangle appears in front of the ship which should appear in front of the Corneria Base. This rectangle also appears as a separate object in the SFXEdit.

Do you want me to post the complete header info to VL-Tone or should you?.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 07, 2013, 05:20:01 am
Where did this come from? xD
How did you do this a long time ago if you just now have the models?!?! :D
It looks great! How did you make this work?

I started to write the 3D engine a long time ago and i improved it so it can be fast enough to allow Starfox style game on a stock megadrive.
Also i started with my own models, i got the arwing one from the deconstruction page and i did other object by hand but they weren't that great. Also i did not wanted to show it until it has something interesting to show ;)
The good point is that megadrive share a lot of identical constraint / feature with the SNES (as the 4bpp color) so it is a nice target to attempt a "port". The difficult part is that i don't have the SuperFX to help, hopefully a stock megadrive has much more power than a stock SNES (thanks to the true 16 bits architecture) so even without SuperFX we can put some polygon up :)
The lack of a bitmap mode does not help either here but i can live with that (need software tile buffer to bitmap buffer conversion).

Quote
Everything else sounds great. I think I will wait a bit more to rewrite my code, specially since I am kind of stuck with the stage information. :D
You've had awesome progress! :D

To get that i somehow simulated a board to store level data, i use a sort of ztimer the same way the original Starfox does. When timer goes to 0 i simply read from the board next object until i read a new Ztimer value. For the moment i made a test level by putting random objects here and there with some movements for the big walker for instance. It's nice to see them animated as the original :)

Quote
To help you out I'll begin hacking at the rom and using your table as reference for distorting objects.  >:D

 :D the only one I did get to work as you mentioned out was the scale one. The collision ones are interesting but I couldn't figure out their inner workings although I know they are collisions since I managed to destroy the ship many times before actually starting the game. I also tried using the two bytes as 4 face index values but I'm still not sure.
The "$05: Z position ?? (2 bytes, low byte first)" seems to be right too because it shifter the position at with the Arwing becomes available.

Unfortunately i can say the scale is the only parameter i am certain, the size / object bounds looks weird and as i say above, i do not see how use them neither yet.
All that values still need a lot of research ;)

Quote
I also answered a question I had for some time which was why is there a face missing from the the Corneria Base obj. It actually isn't missing, it is loaded as a separate object in order to be correctly drawn on screen using the BSP. See, this rectangle appears in front of the ship which should appear in front of the Corneria Base. This rectangle also appears as a separate object in the SFXEdit.

Glad to hear that, so the objects are corrects at least ;)

Quote
Do you want me to post the complete header info to VL-Tone or should you?.

We can post him a link here if he is interested :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 07, 2013, 07:43:36 am
A lot of great info in your post. I hope you finish the port. :D

I had already posted the link to this thread and I think he read it since he commented on SuperFX being emulated in SFXEdit. I'll post the header info in case he can give some insight.
I posted the link to your post about your port too, the idea is too good not to mention.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 07, 2013, 08:20:45 am
A lot of great info in your post. I hope you finish the port. :D

Thanks :D I hope to finish it too but that is really *a lot* of work so that might become a simple "demo" but who know :)

Quote
I had already posted the link to this thread and I think he read it since he commented on SuperFX being emulated in SFXEdit. I'll post the header info in case he can give some insight.
I posted the link to your post about your port too, the idea is too good not to mention.

Cool ! I don't know if he actually follows our progression but i hope he is, its help would be very valuable :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 08, 2013, 09:09:41 am
Thanks :D I hope to finish it too but that is really *a lot* of work so that might become a simple "demo" but who know :)

I guess the problem with stopping now is that you've gotten people's attention.
http://www.nintendoage.com/forum/messageview.cfm?catid=22&threadid=97838&StartRow=1 (http://www.nintendoage.com/forum/messageview.cfm?catid=22&threadid=97838&StartRow=1)

Oh no, now you have to finish. Blast processing my a**! :P
https://www.youtube.com/watch?v=PNGWykZ0ju0 (https://www.youtube.com/watch?v=PNGWykZ0ju0)
https://www.youtube.com/watch?v=Bm-ICwWxaAY (https://www.youtube.com/watch?v=Bm-ICwWxaAY)
Now it is personal.  :banghead:
And you'll have to add SVP chip.  ;D

I propose that in order to prove the Genesis is more powerful than the SNES... lets port Star Fox!
If you are a real fan you should prove it in the best way possible, help us decode the Star Fox SNES rom. :D
There must be really good reverse engineers that are also fanboys. xD
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 08, 2013, 08:29:14 pm
Yeah i realized that was posted elsewhere now, i'm glad to see how it was generally received :) funny to see it induced some nintendo vs sega fans wars too :p
Well anyway it would have be a shame to stop here now we have dig that far ;)

I first want to be able to use the max data i can from the original rom, the more we can extract, the less we have to reproduce :p
Then when that will be done i will probably work on optimization.
I got new inspirations about some infos present in header :D
I think the Z position /distance stuff are related to the Z clipping / collision test, this is something i need to test !

Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 08, 2013, 08:43:12 pm
Well anyway it would have be a shame to stop here now we have dig that far ;)

I first want to be able to use the max data i can from the original rom, the more we can extract, the less we have to reproduce :p

Sure lets continue. I don't have much to offer since I am not as experienced as you are but I can verify stuff very quickly.
Also, since VL-Tone mentioned that he needed an 65c816 dissembler/assembler for level info, my guess is you can completely port the game. :D
I was just playing a Doom 64 port for PC:
http://www.doomworld.com/vb/source-ports/54058-doom64-ex-2-0a-feedback-build-updated-1-25-11/
The guy started out replicating the game from what he saw but ended up making an application that read from the rom data. It works very well. I want to do this with Star Fox. :D


I got new inspirations about some infos present in header :D
I think the Z position /distance stuff are related to the Z clipping / collision test, this is something i need to test !

Great! I need more distractions from work! at least I won't get fired for coding so, do you need help?
I should be able to corrupt the game so much that it shows wireframe 3D cubes where the collision boundaries should be. I know you can do it too but I have the code ready and everything.
:D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 09, 2013, 07:07:20 am
Sure lets continue. I don't have much to offer since I am not as experienced as you are but I can verify stuff very quickly.
Also, since VL-Tone mentioned that he needed an 65c816 dissembler/assembler for level info, my guess is you can completely port the game. :D
I was just playing a Doom 64 port for PC:
http://www.doomworld.com/vb/source-ports/54058-doom64-ex-2-0a-feedback-build-updated-1-25-11/
The guy started out replicating the game from what he saw but ended up making an application that read from the rom data. It works very well. I want to do this with Star Fox. :D

The good point of doing it on PC is that you're not limited in term of CPU resource, so you can really replicate game using most of the original data ! In my case i have to convert them in a more friendly format for the megadrive as i cannot waste any CPU resource in weird decoding code :p

Quote
Great! I need more distractions from work! at least I won't get fired for coding so, do you need help?
I should be able to corrupt the game so much that it shows wireframe 3D cubes where the collision boundaries should be. I know you can do it too but I have the code ready and everything.

Of course you're welcome to test that :D Honestly you are a lot faster than me for that as you already shown ;)

Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 09, 2013, 09:17:07 am
Of course you're welcome to test that :D Honestly you are a lot faster than me for that as you already shown ;)

I'll do it. Do you have any more guesses about the Z position /distance and Z clipping / collision test?
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 11, 2013, 11:29:06 am
I'll do it. Do you have any more guesses about the Z position /distance and Z clipping / collision test?

Thanks :) Honestly not really for the moment, i need to look more closely in these. I think you can try display a sort of bounding box around object using object size and also try to display straight Z line corresponding to object Z center minus the Z distance in header so you can see if this value is reliable as a clipping or collision detection.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 12, 2013, 06:12:17 am
Thanks :) Honestly not really for the moment, i need to look more closely in these. I think you can try display a sort of bounding box around object using object size and also try to display straight Z line corresponding to object Z center minus the Z distance in header so you can see if this value is reliable as a clipping or collision detection.
Cool. I'll have to do this in a few days though, I have to finish this damn Red Book!

:D
Look VL-Tone answered my questions, I have yet to read them:
http://jul.rustedlogic.net/thread.php?id=15998


I've read it now so I think I'll go into regular rom hacking because I really seem to be missing some tools. :P


I knew I had seen this somewhere. In case anyone wishes to replicate the checkerboard pattern they can start here. Page 63 of the RedBook, glPolygonStipple() . It is supposed to be used as a mask.

Code: [Select]
   glPolygonStipple (halftone);
   glBegin(GL_POLYGON);
    glVertex3f(200,  0,  0);
    glVertex3f(250,  0,  0);
    glVertex3f(250,100,  0);
    glVertex3f( 50,100,  0);
   glEnd();
   glDisable (GL_POLYGON_STIPPLE);

(http://s9.postimage.org/pkwk7muof/Stipple.png) (http://postimage.org/)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 20, 2013, 08:20:57 pm
Ok Stef!
My presentations are over, now I can try and do the stuff I said before.

Have you had any progress? just so I don't try to replicate what you have done. :D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on March 23, 2013, 06:51:31 am
Hey,

Glad to hear that :)
Unfortunately i did not made any progress as i did not have any free time lately and that is, until April...
So you can consider i am exactly at the same point as i was in the last post :p
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on March 26, 2013, 12:04:22 pm
Hey,

Glad to hear that :)
Unfortunately i did not made any progress as i did not have any free time lately and that is, until April...
So you can consider i am exactly at the same point as i was in the last post :p

Dammit! And I got my head stuck GLSL for work, I should be back to the rom soon.
:)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on April 09, 2013, 01:35:07 pm
Hi,

Back to bring some news, not good ones unfortunately.
I had to fly some days ago for my job and unfortunately the air company lost one of my baggage on return, the baggage which contained my laptop actually... Usually i always keep my laptop as hand baggage and never put it to the check in but i didn't had choice this time. Even if the company told me they can still find the baggage i don't really trust them and assume it's already 100% lost. Worst than laptop itself is data loss... i lost about 7 months of data, work... I'm trying to recover as much i can from internet, forum, dropbox or whatever but i know i lost many stuff.
Right now i try to get back my starfox remake project, hopefully i had some backup sitting somewhere, unfortunately these backups are quite old (really older than the one i posted 1 month ago) but well, it can be redone.
Really glad that we discussed here as i could restore my starfox object decoder from archives i posted =)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on April 10, 2013, 12:09:51 am
That is horrible!  :banghead:
I hope you get your stuff back soon! :)

I've been away too, progress is down to 0 on the Star Fox decode because I had to learn GLSL and stuff. I don't know when I'll resume it but I haven't left the thread either.

Good luck! :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on April 10, 2013, 04:50:07 pm
Yep, just unlucky this time... but as i said i have the motivation to get it back which is the most important :)
Glad to hear you're still around !


That is horrible!  :banghead:
I hope you get your stuff back soon! :)

I've been away too, progress is down to 0 on the Star Fox decode because I had to learn GLSL and stuff. I don't know when I'll resume it but I haven't left the thread either.

Good luck! :)
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on August 04, 2013, 09:05:37 am
Hey Dyson,

I don't know if you are still around but i wanted to post some news... My laptop never appeared as i expected but anyway my motivation never gone at least ;) Lately i spent sometime in improving the 3D rendering part on the megadrive. I improved a bit the performance, not a big boost over the previous version to be honest but still a bit faster. Now i need to get hands back in the starfox format itself, i just read the whole topic and i am ready to spent sometime in figuring the last unknowns in the header format :) I will keep the topic updated with my future findings...
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on August 04, 2013, 12:16:50 pm
I'm still around.  ;D
Oculus Rift got me into the "star fox decoding" mode again but I've made little to no progress for myself.

It is good to know you are still interested! I'll try and find an excuse to decode the rom while at work. xD
It would be awesome to get the starfox rom running in the Oculus Rift, I'll definitely try that.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on August 04, 2013, 01:51:00 pm
Glad to see you around ;) Well i will try to work a bit on the level decoder so i can do fast level data rip for tests, i think that may help me to figure the remaining unknown data. Having Starfox in the Oculus Rift could be really cool but could hurt our eyes X'D
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: dyson132 on August 04, 2013, 05:02:36 pm
Glad to see you around ;) Well i will try to work a bit on the level decoder so i can do fast level data rip for tests, i think that may help me to figure the remaining unknown data. Having Starfox in the Oculus Rift could be really cool but could hurt our eyes X'D

Awesome news! Glad to see you are around here too. xD

One of the first things I tried with the Oculus was the Virtual Boy emulator and played Red Alarm. It was very cool, SNES StarFox might not be a bar idea with this. :D
This is not my video but just in case you are curious: https://www.youtube.com/watch?v=C2_zxss_mAU
:D
I've started learning unity so even if it takes time it might work.
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: henryhenryd on November 14, 2013, 07:41:25 am
Hi guys

I was wondering whether I could get a bit of help. I've been doing a hack of Star Fox but I've become quite stuck.
I'm trying  to make the Hud invisible (shield bar, boost, bombs, lives) but I'm having a lot of trouble finding those elements in the code.

I think i've located them with vsnes but then I'm having difficulty finding that place again within a hex ed or tile editor.

I'd really appreciate any help.

Cheers
Title: Re: Managed to read Star Fox SNES ROM using VL-Tone guides. I need more info.
Post by: Stef on November 26, 2013, 07:08:21 am
To be honest the HUD is a part we did not explored at all but i guess you can just exam the rom to find the HUD graphics data and replace it by transparent graphics data so you won't have to even patch code.