So yeah, I managed to add a GUI and actually have a functioning file-->open command now. I can look at rooms other than Furnace now!! :P Still crash on most rooms, Antidote's told me how to fix it but I'd like to look into it myself and get a better handle on how materials work before implementing anything for it.
Also, since the Echoes MREA compression format is cracked, I made a small tool earlier that fully decompresses an MREA in a way that the game can still read perfectly fine. You can definitely expect to see an Echoes randomizer soon... pretty sure Miles is working on it now :P
edit: Just in case anyone's interested, here is that tool. It's pretty simple to use, you can just drag and drop the file onto the application if you want. It will overwrite the original file though, so if you really want to keep the original around, you should back it up.
His issue is relatively easy to fix, most of it stems from the fact that we don't fully understand the materials yet, so I suggested he disable reading them in until we understand them more fully. Fortunately MREAs use the same material data that CMDLs do, so I've been hacking them instead of an entire 3MB level to learn about them.
I also don't think he's reading in the indicies correctly quite yet, there is an attribute definition in each material group (they follow the form of 0x3F0F), it's the same throughout retros game, so it's a done deal.
I wasn't reading them in in the first place :P Just the texture maps. Reading them doesn't cause any problems anyway, it's not knowing what to do with that read data. Definitely gonna get that implemented very soon though. Like I've already posted before, determining vertex size is the reason why it's crashing, and I have a good idea how to go about fixing it.
so how does one randomize prime1? i've extracted .pak files from the .gcm (from my own 0-00 disc) and i can extract stuff out of those with mpakdump but after that i'm not sure what to do. i know the randomizer Miles (and Paraxade?) uses isn't ready for a public release, buuut i really wanna try it, so if anyone could give me a hint on what to do, that'd be nice.
It basically involves A. modifying the object layout data in the .MREA files to change the spawn locations of different objects, and B. moving the assets used by each item into the pak for the area the item was randomized into. Probably not something you'd be able to do very easily without a lot of experimentation.
In some cases if you, if you the object you want to add to a level isn't in a pak, it'll just not load and everything will be all fine, others it'll cause a crash. e.g, I added Ridley to the save station just before going to get the charge beam, and everything loaded just fine, however when I tried to do the same with one of the barriers it hardlocked and gave that loud noise that tells you, you dun royally messed up.
So if anyone was curious what that cel-shaded Furnace would look like with lights :P
Lightmapswork... it was surprisingly easy to implement them. The lightmaps use a separate UV array. That array is stored as shorts, so the values just need to be divided by 32768 (thanks Antidote) to be usable.
Wow, that's quite the difference when you compare the two images. Easy to forget how much detail Retro put into Tallon IV when you're used to speeding by everything.
Now I'm curious what Samus and certain enemy types would look like.
These might help (when Retro World Editor was a Maya plugin):
I had private communications with MetroidMenace (known as SarahHarp elsewhere) and last I recall MM was modifying and replacing ANIMs and was having issues with some uv wraps not making sense. Then University happened.
You're making me misty-eyed, DJGrenola. Hello again. That annotated disassembly, which you can share as you like, paralleled the code in Prime (known: zlib) with the code in Echoes (unknown: segmented LZO1x) to figure it out. Thankfully that's well known now, although intrdpth's code obfuscates what is going on. There is also extra unrelated code called in the main loop of that routine - totally unrelated to decompression - that I never really understood.
I can help out by reading what the game code actually does to parse files. It helps that the 2002 E3 Demo / Kiosk Demo had an unstripped binary (kinda)!
For years I dreamed about the fun challenge of an item randomized Prime - and you guys are making it happen! This is awesome!
Man I don't even remember that thread even though I apparently posted on the first page lol. Long time ago. Good to see you though, Skippy!
I've finally managed to get to where pretty much every room in the game actually works without crashing now (except Phazon Core, for some reason... working on that). Here's a little imgur album. Very happy the lightmaps work since a lot of these rooms look like crap without them.
You can prolly tell there's a few issues to iron out and a lot of features I still wanna implement, but very happy with this progress so far.
edit: also, what is that Retro World Editor plugin? Who made it?
edit 2: I'm gonna highlight this screenshot here, it's prolly my favorite one from the album:
edit 3: Hey Skippy, not sure if this is in the scope of what you can do, but I'd be extremely interested to know if there's a way to enable any debug features ingame. Think you could look into it?
Barring that, anything you could dig up on how the game handles materials/shaders would be super useful.
lol. yay for unstripped binaries. and hi again. good to see you.
I did have a look at your disassembly in conjunction with dolphin, but of course my copy of prime 2 (which I ripped) is PAL, so all the function addresses are different. I did some hex searches for the code around your labelled entrypoints to try to get the correct addresses for PAL but by that point paraxade had already solved the 0xc000 mystery.
also maybe I'm just not doing it right but dolphin's debugger currently seems pretty danged sketchy.
edit: also, what is that Retro World Editor plugin? Who made it?
Those are actual leaked screenshots of Prime in development. They can help in the understanding of some file formats perhaps.
Quote from Paraxade:
edit 3: Hey Skippy, not sure if this is in the scope of what you can do, but I'd be extremely interested to know if there's a way to enable any debug features ingame. Think you could look into it?
Barring that, anything you could dig up on how the game handles materials/shaders would be super useful.
I'll take a look. Unfortunately the binaries themselves are not stripped, but there are 3 MAP files which are dumps of symbol tables of 3 different copies of Prime. While the sizes of the segments don't match up with the DOL file, they are close enough to get an idea about where things should be in there. There are files compiled in called CGameDebug.cpp and CDebugOption.cpp and a whole lot more debugging specifically for the camera.
I did have a look at your disassembly in conjunction with dolphin, but of course my copy of prime 2 (which I ripped) is PAL, so all the function addresses are different. I did some hex searches for the code around your labelled entrypoints to try to get the correct addresses for PAL but by that point paraxade had already solved the 0xc000 mystery.
To find the function I actually looked in the .data section for strings, etc. near ZLIB strings in Prime and matched those to Echoes. Then found nearby code which used those data addresses. The same trick could be used anywere to figure out what Echoes or Corruption does after finding the code in Prime.
Quote from DJGrenola:
also maybe I'm just not doing it right but dolphin's debugger currently seems pretty danged sketchy.
Collision viewing is functional! Lots of issues - really bad Z-fighting, really bad UV map generation, no lighting so it's fairly difficult to tell what you're looking at sometimes - but it at least works :P Really want to improve it later though.
So, naturally, I wanted to see wtf is up with some of the weird collision in this game. Like Burning Trail.
Apparently the ceiling in Burning Trail is shaped like a big upside down dome.
This is from below the metal thing you jump from to get into the SW, looking up at the ceiling, with terrain disabled. It's such a small space it's really hard to get a good picture, sorry!
I also had a look at the door cap on the cargo elevator in the Frigate. Seems most of the collision there is done with objects, so we still won't really have a good picture of what the collision there looks like for now.
I tried to get a picture of the inside of the Main Plaza tree too, since that thing has been pissing me off in randomizer, but it seems like it's basically impossible to get a good picture of it. In any case, if anyone else wants to see what the collision looks like in a particular spot, lemme know and I'll check it out.
In any case, if anyone else wants to see what the collision looks like in a particular spot, lemme know and I'll check it out.
Would it perhaps be possible to look into Magmoor Workstation as you did with Burning Trail? It could be that there's a clipping SW in Magmoor Workstation that could be entered in 21% conditions without the "freeze a Flying Pirate and quickly do some insane Bomb Jumps" - which hasn't been proven to actually work yet and if it will have been theoretically confiremd someday in the future, it would be insanely crazy to pull off on-console. The place I think off is in the 1st sub-room you visit when doing the Magmoor Workstation puzzle involving cooling off the lava. In that 1st sub-room there's some garbage or something which could be a chance to enter that SW and save tons of time in 21%. At least it works kinda similar compared to the 21% Burning Trail SW; stand backwards, do a backwards Ghetto Jump to the left, as soon as you get the Ghetto Jump head right and try to get stuck and then rock the stick ASAP.
If that previous post by Paraxade isn't about something like that at all, I'm sorry; I don't really understand anything you're doing here.
Quote:
As a side note, wtf the game totally glitched I don't even have any items yet and it already wants me to go here?!?!
Wait whaaat? Calling that "seismic activity" on top of that wtf
I added a crappy edged faces display real quick to try to make things a bit easier to see. Here's the wave door in Magmoor Workstation.
Looks like there's ridges on either side of the door, so BSJing or bomb jumping into the SW might actually be a lot easier if you shoot to the side of the door instead of trying to go straight over it.
Here's the rubble you're talking about. I'm not really sure what part you're talking about where you might be able to clip out, though. The collision here doesn't really look anything like Burning Trail.
I suppose the grey squared stuff is where you kinda slight off? Well it's on the floor too so i guess its a bit different. But this is getting quite interisting, though it's kinda difficult to understand whats going on.
I've cracked FRME for the most part, now just to learn what everything does. I also wish I could figure out the PAS4 section of ANCS so I can add them to my viewer :(