News:

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

Main Menu

[SM] [ENEMY] STOKE Info?

Started by herald83, March 07, 2011, 05:42:11 PM

Previous topic - Next topic

herald83

So, does anyone have any info on STOKE?  Has anyone tried to fix it?  I'm trying to disassemble its AI, but I wanted to ask before potentially reinventing the wheel.

Zhs2

I don't think anyone has tried to fix it, or at least publically posted the results of doing so anywhere. Either way, this would be a cool addition to the series of baby boss enemies if someone did :D

herald83

Yeah, I couldn't find anything in the forums on it.  I'll admit my experience with ASM is limited, but hopefully picking away at this will help with that.  I'll be sure to post whatever I find.

herald83

#3
Well, I think I've teased out a few details.  My understanding of enemy AI's is still severely lacking, but I think I have made some inroads with the disassembly.  Here's what I've got so far.  I have a few ideas for next steps, but comments and insights would be greatly appreciated.

Many thanks to Kej's notes!

[Old version of notes removed]

Antidote

Dude, if i were gay i'd kiss you, oh... wait... I'm bi close enough :3

X-tradyte

I recently tried to put Stokes in Crocomire's room but it fucked him up, I don't know...I had Stokes working before, but w.e..

herald83

#6
I've managed to isolate the code that manages his projectile timer.  Using a debugger helps!  Kinda took a break for a week or so but I'm not giving up.

Does anyone with AI hacking experience know what the code at $A0:BC76 and/or $A0:C6AB does?  My uneducated guess is it's something to do with movement.  The instructions at those addresses are quite long, so I thought I would ask before pulling them apart.

Quote from: DarkSamus on March 14, 2011, 08:34:34 PM
I recently tried to put Stokes in Crocomire's room but it fraked him up, I don't know...I had Stokes working before, but w.e..

What do you mean by "working"?  Did you put him in Croc's room with Croc, or alone?

He kinda works if you put him in a normal room on a wide, flat area, but anything with slopes and he ends up walking out into space.  I suspect that his movement is similar to that of TOGE (strictly left and right, with a defined range of motion that doesn't interact with blocks), but I don't know for sure yet.

Edit: Theory shot down.  They don't use the same routines for movement.

DSO

A0:C6AB is a commonly used routine for horizontal movement. Haven't messed with the other before.

herald83

Awesome! That's what I expected. Should make for less work now.

herald83

#9
See attached for updated notes.

Now with Projectile Firing Timer, STOKE's RAM map (still a few unknowns here), a partial disassemble of the unknown at $A0:BC76 and lots of unfinished stuff!

Anyone know anything about default enemy palettes? Are they unique to each enemy or can you mess with one without screwing up others?

Last question. Is it just me, or is STOKE's projectile boring as hell??  If I ever understand enough to do so, I was considering making it less lame.

Scyzer

Empty text file makes me lol. That is all.

Quietus

And the fact that it's been downloaded a bunch of times! :heheh:

herald83

Heh. Yeah, that was anti-climactic.  Apparently I failed at uploading the file from my phone.  Here it is.

begrimed

#13
QuoteAnyone know anything about default enemy palettes? Are they unique to each enemy or can you mess with one without screwing up others?
Almost all enemies have their own unique palette pointer, even the ones that use the same colors. In the case of STOKE, you can most likely repoint its palette to free space if you think changing the data at its current palette pointer would write past its allotted space and mess something up.

I made a little document related this awhile ago.

www.metroidconstruction.com/docs/unused-enemy-colors.txt Notes unused colors within enemy palettes and enemies that share colors.

Scyzer

#14
Quote from: Grime on March 22, 2011, 04:07:44 PM
Almost all enemies have their own unique palette pointer, even the ones that use the same colors. In the case of STOKE, you can most likely repoint its palette to free space if you think changing the data at its current palette pointer would write past its allotted space and mess something up.

Changing the palette won't write past it's space. Enemy palettes are uncompressed, and will always be $20 bytes per line, regardless of the colors used.

   EDIT: Almost double posted :O
$808111 generates a random value in A and $05E5. It is probably the single most used routine in the entire game, but has nothing to do specifically with enemies, so there's really no point disassembling it.

$A0C6AB is the horizontal movement routine used by almost every enemy, again no point disassembling. It moves the enemy horizontally by $14.$12 pixels, with collision detection (the enemy can't move through solid blocks).

$A0BC76 is a collision detection routine to tell in which direction an enemy hits something. Used by a lot of enemies.

herald83

Thanks for the info!  I might play around with those routines a little anyways, just for more op code practice.  The ASM Lesson Logs helped a ton, and I'll admit that fiddling around with this myself made a bunch of things click that didn't before.  Probably just needed to be motivated to wrap my head around it.

I probably won't get to messing with palette stuff until last (since it seems easier?), or unless I need a change of pace at some point.  I'll stash this in my stoke folder until then.

herald83

#16
Well, I lied about waiting to do palette stuff.  Also, Sting_Chameleon got me to be unlazy about it.  Check it out:


Palette values are as follows:

    R  G  B
1: 00 00 0E
2: 1F 1F 1F
3:  UNUSED
4: 1E 05 02
5: 15 04 02
6: 0C 03 02
7: 07 02 01
8:  UNUSED
9: 1E 18 15
10: 18 12 0E
11: 11 0B 08
12:  UNUSED
13: 1F 1C 05
14: 17 13 00
15:  UNUSED
16: 07 00 00

New version of my notes attached.  As you can see in the image, I haven't worked out the movement problem quite yet.

Quietus


herald83

#18
Currently experiencing dropbox fail.  One moment please...

Success?