News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Mixing Spazer and Plasma [997‰ IS done]

Started by JAM, July 14, 2010, 04:43:04 PM

Previous topic - Next topic

JAM

MetroidPeter
I hope, I'll start working on this patch again, to make v0.996, which will be not completed but bug-free. Current version is not completed and have some bugs. Test it, but have in mind: it's not finished. It's just have most of the work done.

Lucky Dearly
I can tell you what's wrong. Ceribris is headered. This patch is for unheadered game.
Remove header of Ceribris in SMILE and try again.

MetroidPeter

SSBB Morph Ball? You piqued my interest, can I see?

JAM

#102
One more ‰ is passed.
Good usage of post #888.
Good news everyone!
Ninja pirates will now reflect shots properly!
A very easy and unexpected fix from me. Thanks goes to RealRed for his tweak. It wasn't working perfectly, but looking at the code at pointed addresses helps me to understand the awful truth: I forgot to change 1 pointer to repointed array. Simply changing it causes reflection of new beams works perfectly!

Thank God I will not spend a few mounths to understanding how projectiles works. Because Ninja Pirates are just changing direction of your beams and NOT spawing the new projectile, as I previously thought.

Next goal is repointing vulnerabilities arrays for all enemies. It will be universal fix and it will be done in v0.997.

P.S. Still under $4000 bytes, yahoo!

P.P.S. Life is a funny thing. I wanted to die just 2 hours ago and now, after accidently finding this fix, I'm really really happy.

v0.995 download count: 93

MetroidPeter

Well, it works now without bugs. I presume now you just need to make it fit in with the other beams (there's no beam trails in the version I have) and then it's done?

JAM

Quote from: MetroidPeter on June 28, 2015, 09:06:30 AM
Well, it works now without bugs.
Not yet. Read one more time about vulnerabilities. It looks like it have no bugs, but actually, it have unpleasant surprises like indestructable Mother Brain or Zebetites vulnerable by some beams.

Quote from: MetroidPeter on June 28, 2015, 09:06:30 AM
I presume now you just need to make it fit in with the other beams (there's no beam trails in the version I have) and then it's done?
^This. But not yet. Also ^^this (vulnerabilities). And remove the little bug discovered by RealRed about tiling bug (which means splitting all beam data to 2 banks and A LOT of work). Possibly, the item allowing to mix Spazer and Plasma. Version 1.000 eventually will have all this stuff fixed.

RealRed

Fortunately, beam trails are pretty simple. Only charge beam's behavior table needs to be repointed for their trails to work properly. All other related tables, interestingly enough, already have enough space to provide for 16 beam types rather than 12. How intriguing is that? When I get the chance, I'll post what I know.

What byte was it that you had to change to make beams reflect properly? The fix that I provided is very flawed. It makes the beams disappear without the correct animation, OR, the beams veer off in bizarre directions. Neither of which is appealing.

Kitsune_Phoenix

#106
*deleted post*

Xenesis

That particular factoid is probably why it's not that impressive as a beam powerup.

Wide Beam in Fusion was nice because of the multi-shot per attack nature.

JAM

Quote from: RealRed on June 28, 2015, 10:57:17 PM
Fortunately, beam trails are pretty simple. Only charge beam's behavior table needs to be repointed for their trails to work properly. All other related tables, interestingly enough, already have enough space to provide for 16 beam types rather than 12. How intriguing is that? When I get the chance, I'll post what I know.
Thanks, it'll help a lot. But I also supposed to make a triple trail for all combinations with Spazer.

Quote from: RealRed on June 28, 2015, 10:57:17 PM
What byte was it that you had to change to make beams reflect properly?
See the attached archive. I've included a fix from v0.995 as a separate patch.

Kitsune_Phoenix
There is a limit of 5 projectiles in Super Metroid. 3 projectiles at once can be fired probably, but you just can shoot once until all beams hit something. Possibly with major repointing this 5 projectiles limitation can be solved...

Kitsune_Phoenix

#109
*deleted post*

Black Falcon

#110
Quote from: Kitsune_Phoenix on July 04, 2015, 06:28:51 PM
The Spazer beam is supposed to be a type of laser... So why not just make the projectile go insanely fast (using an incredibly long trail)? That would make the delay between shots so small that it wouldn't really matter, not including the fact that some projectiles might hit things before others do (until Wave/Plasma/Hyper, anyway)

Had the same idea a while ago, and the thing on the bottom was the result (kinda basic atm, didn't spend too much time on it).
If done correctly this weapon would be kickass actually.

edit: For some reason linking avi's via url tags messes up things (at least it did on my pc), so you have to copy/paste the link instead:
https://dl.dropboxusercontent.com/u/18141148/videos/Railgun%20test.avi

JAM

#111
5 years ago...

I started this project without any chance to success. In next few days I understood a lot of information, where the needed pointers are, how the tilemap structure works etc. It allows me to understand what to do and how to do it.

I started planning my work finally realized that I'll have no space to make what I want to. Then I got rid of unused tilemaps (like Plasma Beam 3 tiles long. In game used only states of 1, 2 and 4 tiles). I tried to optimize the data, but still got failed. Not enough space.

I have idea to avoid it, by using the same tilemaps for different beams and it works fine, so I started repointed, worked a lot and then... suddenly understood that all optimized tilemaps are looking corrupted in the rooms with acid. So Many Time WASTED.

I was working on this project and stoped from it from time to time and then I finally found a decision. How to fit all this data into bank $93. It works perfectly when I tried it, but then, still have got problems in some rooms, like small graphical glitch reported by many users. There is no way to avoid it, so I've continued my works.

While optimizing the data I've also noticed that how bad the Spazer tilemaps made. And that vertical and horizontal beams have different size. Besides of that, all sprites for Wave + Plasma beam is asymmetric that makes it impossible to insert beam between them without looking that "not right", so I got rid of that asymmetry.

I've noticed that wide of Spazer and Waved Spazer Beams are changed differently. So I made separate behaviour just for shooting the Spazer + Plasma Beam without Wave. I had enough space for that, luckily.

Then... more unused data was found. Optimization, repointing, repeat, repeat. There were truly over 9000 minutes of working in pure hex in total. I haven't worked with timer on, but I guess, it close to 15000. Finally I wrote all the tilemaps. Of course, there were some bugs in my tilemaps, so I tested every beam flying in any direction until...

I released version 0.99 with all tilemap done that works more or less stable and without tiling errors. Of course, there were things I wanted to fix, but I have no idea, how to make it.

Few mounths later I SUDDENLY realized what was wrong and released v0.992 with Phantoon fixed. Blame devs, not me, who set wrong Frozen AI pointer. But still, all the enemies still sharing its Spazer + Plasma vulnerabilities with ammo vulnerabilities. I wanted to fix it, but have no idea, what to do.

Few mountts later I SUDDENLY (again) have found where the pointers were stored. Setting to pointer to RAM $12 and accessing it later. Not surpising it took So Many Time... Understanding this eventually allows me to split ammo vulnerabities to finally make every eneme have its own unique vulnerabilities for Spazer + Plasma, not shared for something else. So, I wrote the code for it and make SMILE JX support for it, because vulnerabilities are now stored in a bit different order.

Thus, v0.995 was born. All vulnerabilities are separated, but not repointed. Now could I repoint them if someone could use the same space in Bank $B4. I was so tired and take a break. Poor RealRed did this manully for his awesome hack and succeed with it. Still this patch had minor bugs and one major: Ninja Pirates don't won't to reflect the shots and crashing the game. The bug discovered long time ago, but with no solution. And... it was pretty simple. There is 1 reference for uncharged beam arrays and 2 references for charged. And I forgot to change one pointer. That is it. v0.996 is ready. No more fatal errors.



Present time...

After a long break I've resumed my work on SMILE JX and with help of it finally repointed and expanded all the vulnerabilities array which can be freely edited in JX or RF (hi, Sadi. We both started a major projectes 5 years ago). Too bad, I can do it only for vanilla ROM, as if you've repointed something in Bank $B4, this patch may (or, most likely will) corrupt your data. Special tool in JX v2.84 will expand it manually, no matter if there was repointed data or if there isn't. So, v0.997 of this patch is ready and released at the right moment. Check the first post.

FREE SPACE USED:
1A74B8..1A75EF

If this space is unused in your hack, it's OK to apply it. Check for previous posts to know usage in another banks.

This version have a bonus. Since default power of Charge+Ice+Wave+Spazer+Plasma is 1500 (dec) and default power of Hyper Beam is 1000 (dec), I decided to make Hyper more powerful. Its power increased to 2000 (dec). And since you can mix all the beams, why the Hyper should looks like you've only collected Charge and Plasma? So, here you go, a new Plasma Beam. Wider and more powerful:


Full Combo item will be included tomorrow.

A Dummy

Just...Awesome. It was beautiful getting to use the Spazer-Plasma beam in Hyper Metroid. And now other hacks are probably going to start using this piece of awesomeness soon.  Props to you for all the hard work you did just to get this to work right.

Kitsune_Phoenix

#113
*deleted post*

RealRed

Quote from: JAM on July 14, 2015, 10:19:44 PM

Brotip: Triple-hyperbeam was an intended feature of Hyper Metroid. Unfortunately however, the beam was causing a lag-fest alongside the timer, explosions, and ninja space pirates. You may or may not want to keep that feature :(

Kitsune_Phoenix

#115
*deleted post*

JAM

RealRed
Which means that your escape section is very intense. I tested it on default ROM and haven't found any flaws. Also, adding ice trails to the Charged Spazer + Plasma shot causes the same lagfest in some rooms, like Phantoon's room.

Triple Hyper Beam will be a basic feature of the patch. Hovewer, I made a patch that will change a single bit and disable this feature. Included it in the archive.

Also, made what I promised. An item, allowing to mix Spazer and Plasma beams. Check the first post.

MetroidPeter

Quote from: Kitsune_Phoenix on July 15, 2015, 05:04:45 PM
The SA-1 chip is your friend, especially in emulators.

Wait... you can apply chips to games that didn't already have them in their cartridges? Does this mean in a few years we'll see people use the Super FX Chip for sprite deformation and Polygons in Super Metroid? I can imagine it now... a smoothly rotating flip jump and CG monstrosity bosses...

Kitsune_Phoenix

#118
*deleted post*

Quietus

Quote from: Kitsune_Phoenix on July 16, 2015, 03:56:44 AMthe MSU-1 (which was a custom chip made and used for a CD Music hack for Super Metroid)
It's been used for other games too, and will likely continue to do so.

Parabox

MSU-1 hacks are one of my favorite trends in hacking, but sadly not many people are making multiple music packs (I know making them is a pain), and some still don't discern between/provide different for emulator and hardware.

RealRed

<begrimed> Apr 11 18:47:06 <RealRed> 0xDA42B - CB A4 (I think), pointer to charged beam's trail behavior table
<begrimed> Apr 11 18:48:07 <RealRed> 0xDA4B3 - non charged table
<begrimed> Apr 11 18:48:22 <RealRed> 0xDA4CB - charged table


Thanks to Grime, I've still got my info. So, let me explain.
Black Falcon's beam trail guide is still perfectly relevant to this patch.
Beam trail, charged beam trail, corresponding beam trail, and corresponding charged beam trail all mysteriously have space allotted for 16 beam combinations rather than twelve. Therefore, no repointing is necessary. Just put in pointers for trail graphic info as needed, and you're done!

Now, here's where things get a little bit more complicated. The next two tables have only 12 beam spaces allotted, but this is easily fixed.
0xDA4B3 is a beam trail table for the trail behavior for uncharged beams. How it acts.
following by 24 bytes later is the trail behavior table for charged beams. We can't just expand this table because other information is directly following, so what we can do is repoint the charged table by changing the pointer at 0xDA42B. Repoint to freespace, copy the charged table there, then the uncharged table can simply overwrite the old data.

Eezy peezy! Happy trails!

EDIT:
Yo JAM, can you tell me the hex changes to make fighter pirates reflect splasma properly? I'd like to fix this for hyper metroid.

JAM

RealRed
Thank you for provided info!



Quote from: RealRed on August 14, 2015, 04:14:23 PM
EDIT:
Yo JAM, can you tell me the hex changes to make fighter pirates reflect splasma properly? I'd like to fix this for hyper metroid.

All you need to do is download v0.996 and apply these 2 patches:


2. SpazerPlasmaMixV0.995fix.ips
Fix to v0.995. Contains only changes since last version. Use it if v0.995 was applied to your hack earlier.

3. RealRedTempReflectionFixUndo.IPS
Does as name said. Remove temporal fix for reflection made by RealRed. Apply it if you made hex tweak by him. Harmless to original ROM (simply restore its code).


Number 2 fixes freezing (changes the single pointer).
Number 3 undo your temporal fix. Just returning data at some places to original ROM's data. Should be harmless.

A Dummy

I'm really sorry for the bump here, but I've run into a problem trying to patch this over Project Base.

When I go through this door: http://imgur.com/ePwxLBU
I end up seeing this on the other side: http://imgur.com/r7sfhcL

The beam itself still works just fine and displays correctly.

Normal shot: http://imgur.com/R68TIxX
Charge shot: http://imgur.com/Sy0YRYY

It just breaks the room in Brinstar between the Morphball room and the first Missile room for some reason.
(Not sure if it breaks any other rooms like this since I can't get that far.)
I'm sure it's my own fault for just assuming this would work with Project Base with zero modification, but I guess after seeing it used in Hyper Metroid I just sort of figured they were meant to go together.

master86

you can us it with pro. base but not at this free space 1A74B8..1A75EF ther is no free space in pro. base at this adress your need at least 138 bytes freespace and at this two adresses ther is only 8 bytes freespace