Register - Login
Views: 99794286
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:12:39 AM
Jul - General Game/ROM Hacking - Star Fox SNES Rom decoding, need help, VL-Tone opinions very welcome! New poll - New thread - New reply
Next newer thread | Next older thread
dyson132
User
Level: 8


Posts: 3/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 02-10-13 01:37:08 AM Link | Quote
Hi!
I've been trying to decode the SNES Star Fox rom from the old info made by VL-Tone but I've had little luck with the bits in between.
Here is the thread I made about it, I can make it here too. Any help would be awesome, help from VL-Tone would be even better.
http://www.romhacking.net/forum/index.php/topic,14298.msg234446.html#msg234446

@VL-Tone
I don't need to get it all working but a bit of help or a push in the righ direction would be incredible.

Thanks!
dyson132
User
Level: 8


Posts: 4/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 02-20-13 07:23:55 PM Link | Quote
We've made a lot of progress with this. Here are the results.
https://vimeo.com/60089406



Come on VL-Tone!
dyson132
User
Level: 8


Posts: 5/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 02-25-13 11:56:56 AM (last edited by dyson132 at 02-25-13 11:57:14 AM) Link | Quote
Here it is!
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.
https://vimeo.com/60433014
Remember you can download the original video which is 60 fps

Where can I post the source code?
ShenoxVII

(in all seriousness, you're a prick)
Level: 24


Posts: 102/111
EXP: 76000
For next: 2125

Since: 10-09-10


Since last post: 9.0 years
Last activity: 9.0 years

Posted on 02-25-13 11:58:34 PM Link | Quote

Originally posted by dyson132
Here it is!
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.
https://vimeo.com/60433014
Remember you can download the original video which is 60 fps

Where can I post the source code?


Please post the source here and notes on the rom that you have taken. I would like to play with all of this.
dyson132
User
Level: 8


Posts: 6/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 02-26-13 09:10:07 AM Link | Quote
Sure!
Its kinda long and all. I have yet to use bitwise operations so every part of the code is "humanly" readable.
I made it using openFrameworks which is a c++ with openGL and such made for creative coding.
http://www.openframeworks.cc/
Anyways you can do without this if you are a programmer.

Any suggestions about how to share the code?
dyson132
User
Level: 8


Posts: 7/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 02-27-13 05:53:11 PM (last edited by dyson132 at 02-27-13 05:57:36 PM) Link | Quote
There is a readme file with a bit of info on how to install. 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)
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 614/621
EXP: 1136479
For next: 20640

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 6 days

Posted on 03-04-13 09:21:31 PM (last edited by VL-Tone at 03-04-13 09:25:30 PM) Link | Quote
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Originally posted by dyson132
Hi!
I've been trying to decode the SNES Star Fox rom from the old info made by VL-Tone but I've had little luck with the bits in between.
Here is the thread I made about it, I can make it here too. Any help would be awesome, help from VL-Tone would be even better.
http://www.romhacking.net/forum/index.php/topic,14298.msg234446.html#msg234446

@VL-Tone
I don't need to get it all working but a bit of help or a push in the righ direction would be incredible.

Thanks!


I'm very happy to see that other people are being interested in Star Fox reverse-engineering!

Not sure you need my help, looks like you guys are doing fine without me

Now seriously if you have any specific questions you can ask them here, and I'll try my best to answer them in a relatively short amount of time. Just keep in mind that it's been like 7-8 years and I forgot most of it.

Here's a collection of old random Star Fox hacking notes from back in the days that were not necessarily publicly available.

http://dl.dropbox.com/u/93350052/StarFoxHackingDocs.zip

____________________
dyson132
User
Level: 8


Posts: 8/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 03-06-13 01:38:17 AM (last edited by dyson132 at 03-06-13 03:09:18 AM) Link | Quote
Originally posted by VL-Tone

I'm very happy to see that other people are being interested in Star Fox reverse-engineering!

Not sure you need my help, looks like you guys are doing fine without me

Now seriously if you have any specific questions you can ask them here, and I'll try my best to answer them in a relatively short amount of time. Just keep in mind that it's been like 7-8 years and I forgot most of it.

Here's a collection of old random Star Fox hacking notes from back in the days that were not necessarily publicly available.

http://dl.dropbox.com/u/93350052/StarFoxHackingDocs.zip




WHOA!
I never expected to contact you ever! This is awesome! I've read your documents too many times!

I've sent a message over to Stef who is much better at hacking ROMs than I am. I've been learning c++ and openGL for work but not very much about how the SNES works so I've been doing the visual stuff following each and every one of your words.
Anyway, he might have more specific question but I do have a bit of my own. Please, take as much time as you need, I waited a few years for this oportunity and I will be patient. Here I go:

1.1-Did you ever manage to parse all color palettes correctly?
1.2-Do they have different sizes?
1.3-Why do some headers point to negative addresses when looking for palettes? (85AC Andross Cube points to 90 85 point nowhere)
1.4-Are there invalid objects?

2.1-I ripped the textures from the ROM but the offset for correctly placing the correct ones on a specific faces has eludded me. Do you have any other comment on how they offset?
2.2-Since I haven't determined the texture offset I haven't tried your method for the animated textures, do you remember if what you documented was correct?

3-Are in game shadows, like the Arwing shadow on the Corneria surface, made by duplicate objects with Color 0 and Color 15 (black and transparent)?

4-Both "10D0 Big vertical Entryway" and "84DD Corneria Base" seem to be missing some faces. What is your opinion on this.

5.1-According to you, would it be possible to decompile SFXEdit or the Shockwave object viewer? Did you assign any encryption key or something? I still remember reading about your hard drive crash, I would have loved to read the source code.
5.2-I just got a Director 11.5 and tried to open the StarfoxDecoder.dcr . I got this message:
StarfoxDecoder.dcr is protected and cannot be opened.


Since in order to correctly simulate the game mechanics I need to know more about the SNES, I decided to first try and get the visuals working so the following questions are more about your opinions, of course technical info is very much welcome:

6-What are the values for the Light vector and which one did you use for the viewers? (The Light vector being the one used for Light sourced colors). Does it have to be normalized? Also, is there a correct formula for calculating the color or is it just dot product with face normal?

7.1-If I wanted to read the Training info from the ROM (not the RAM in the SNES) how should I start? I have the location in the ROM and your short deconstruction of the stage info but I see more objects on screen than I see on your document.
7.2-How does one find a stage header addres (like the $6F0F8 training one) in the ROM?
7.3-The training example you posted mentions the following, is this an object reference?
Scenery white high rise box (3D)
7.4-The Corneria Stage easter egg in the shockwave viewer is awesome, what would I need to extract all of that? did you make the ship wiggle around or is that extracted from the ROM.

8-How important is the ztimer value in all of this? is it possible to just fake it for the time being? For examples, some towers rotate in game but they are not animated.

8-What is involed in starting a stage? First enemies, fade in, Arwing position, etc.

9-How does collision detection work in the game?

Any other suggestions about anything would be awesome!

Thank you very much for posting.
dyson132
User
Level: 8


Posts: 9/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 03-07-13 10:50:03 AM (last edited by dyson132 at 03-07-13 10:51:37 AM) Link | Quote
Hey VL-Tone
Stef posted a rom he made before we started to add to your documentation. It is a Star Fox port for genesis, it looks very good and I thought you might like it. I don't want to repost his link but it is in this post (sfx_gen.zip):
http://www.romhacking.net/forum/index.php/topic,14298.msg237658.html#msg237658

Also he is trying to check the functionality of the object header and I was wondering if you could complete it with what you remember. Thank you!




$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 right 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

VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 615/621
EXP: 1136479
For next: 20640

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 6 days

Posted on 03-12-13 01:41:54 AM (last edited by VL-Tone at 03-12-13 01:50:33 AM) Link | Quote
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Hi dyson132,

Actually when I said I would answer very specific questions, in my mind I was thinking more like one at a time... But hey don't feel bad about it, I guess you wanted to get the most of it while I'm here thinking that I may never come back (which is always a possibility with me ). I'll try to answer your questions, but it will include a lot of "I don't know" or "I'm not sure".

1.1-I guess not, I think Stef found some mistake in my docs about that.
1.2-I think so.
1.3-I'm not sure.
1.4-There shouldn't be.

2.1-There are special texture palettes where a color=a texture.
2.2-Nope (I don't remember).

3-I think that shadows are calculated on the fly.

4-Some models are cut in parts, probably to fix some z-ordering issues (Didn't you guys figured this out in the thread? Or was it after your post?)

5.1-No, not possible. And I did not lose all the source code files, I still have some incomplete older versions. I won't release this code for the same reasons I won't release TT64's source code. I may give you relevant parts of it if there's no easy way for you to find this info otherwise, but not the whole thing. Please respect my decision.

5.2-.DCR files are compiled Shockwave code, they can't be opened by Director.

6-I did not use any of the ROM data to set any of these, they came from some arbitrary settings in the Shockwave 3d viewer.

7.1-Maybe because I did not deconstruct the whole level in the doc? I'm not sure I can't find this doc.
7.2-Couldn't you use an hex editor and find out?
7.3-I guess.
7.4-I really don't think it would be of any use to do that. You'd be better trying to find how to program it by yourself.

8-The ztimer is just a timer that loads the next set of objects. If you use a game genie to freeze that value objects stops appearing and the Arwing endlessly goes forward in emptiness. There's nothing fancy about it and it doesn't have anything to do with animation.

9-I have no idea.

As for the object headers, I have nothing to add to the info that you already have.

One thing you guys should do more is hacking the actual game instead on working only on the decoding end. By modifying values and reloading the ROM in an emulator you can figure out what each bits and bytes do.

SFXEdit also pretty much lays out the basic level format for you. There's a lot that you could figure out just by using SFXEdit. Also if you put it in Hex mode you can see the raw hex code which should be useful to understand more of the format.

One last thing. I don't want to discourage you but reproducing Star Fox levels+gameplay will require a lot of work to get it right. Decoding the levels is the easy part, until you stumble on an ASM based branch command or any moving enemy that depends on ASM code. Some may be easier since they follow predefined paths (like your fellow Arwings) but I never managed to find/decode this animation path data. Not that it's hard, but I didn't look for it before abandoning development.

And while the Star Fox port for Genesis is a very nice and impressive demo, will it run at an acceptable framerate once all the game logic and special effects like particle explosions are implemented?

Ok so that's pretty much it for now. I think you already had enough info to move forward by yourselves without needing my help for the next few weeks hopefully...

Have fun!

____________________
dyson132
User
Level: 8


Posts: 10/10
EXP: 1906
For next: 281

Since: 05-18-12


Since last post: 9.1 years
Last activity: 8.9 years

Posted on 03-12-13 09:23:38 AM Link | Quote
Originally posted by VL-Tone
Hi dyson132,
Actually when I said I would answer very specific questions, in my mind I was thinking more like one at a time... But hey don't feel bad about it, I guess you wanted to get the most of it while I'm here thinking that I may never come back (which is always a possibility with me ).


Yes, that was the idea and there are no more questions.
Thank you very much for your time VL-Tone.
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - Star Fox SNES Rom decoding, need help, VL-Tone opinions very welcome! New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

29 database queries, 8 query cache hits.
Query execution time: 0.087983 seconds
Script execution time: 0.024823 seconds
Total render time: 0.112807 seconds