Updates:

Fans are welcome!

Modifiying Enemies in RAM

Started by Grimgrin, April 16, 2010, 03:20:33 PM

Previous topic - Next topic

Grimgrin

Here what I found about the enemies in RAM:

$0505 - $0517 Display Enemies on Screen.
$054D - $055F ?
$0595 - $05BF Enemies and Weapon Health.
$06CD - $06DF Sprite?
$072D - $073F ?
$07A5 - $07B7 ?
$07ED - $07FF Sprite?
Currently extending the game.

Megadeth502


arseniy

IN VirtuaNes it's very unhandy to operate with ram. With this code it seems need to put an enemy type and on the related spot put a health for it?
Bullets is separate place than enemies right? Because here is see 19 spots for enemies and it probably seems sometimes there is more objects in the game if you count enemy+bullets?

tummai

Quote from: arseniy on April 16, 2010, 09:36:55 PM
IN VirtuaNes it's very unhandy to operate with ram. With this code it seems need to put an enemy type and on the related spot put a health for it?
Bullets is separate place than enemies right? Because here is see 19 spots for enemies and it probably seems sometimes there is more objects in the game if you count enemy+bullets?

The "RAM blocks" for sprite objects are 24 bytes each. The first slot is for the hero.  The next 4 slots are for hero bullets, followed by 19 enemy slots.  Enemy bullets count as enemies.

Here are some of my notes for sprite objects.  I copied them from my FCEUX .nl file, so the format might need explaining:

$0518/17#Obj_Y#

Here $0518 is the start of the RAM block.  The "/17" means that the next $17 bytes (that's hex, so 23 bytes decimal) are part of the same RAM block.  The part after the first hash # is the name I gave it.  If there is anything after the second hash #, it's a comment. 

Note that some of these are guesses and some I haven't figured out yet.  Just dumping them here in case someone wants to experiment with them.

$0518/17#Obj_Y#
$0530/17#Obj_X#
$0548/17#Obj_ID#
$0560/17#Obj_Palette?/Enemy_Generator_size#
$0578/17#Obj_????do2c#;related to bullet vulnerability?
$0590/17#Obj_HP#
$05A8/17#Obj_HP_Scaler#
$05C0/17#Obj_Y_TickCounter#
$05D8/17#Obj_Y_Speed#
$05F0/17#Obj_X_TickCounter#
$0608/17#Obj_X_Speed#
$0620/17#Obj_Flag# b0 = update Y, b1 = update X, b2 = vert flip?, b3 = horiz flip?
$0638/17#Obj_Anim_Frame#
$0650/17#Obj_Anim_Counter#
$0668/17#Obj_??668#;gets 4 in set hero start coords code . compared to Object Y?
$0680/17#copy of Object X#;what?
$0698/17#Obj_enemy_generator_counter#;refilled by 7A0
$06C8/17#Obj_current_tile?#
$06E0/17#Obj_HitBox_Left#
$06F8/17#Obj_HitBox_Right#
$0710/17#Obj_HitBox_Top#
$0728/17#Obj_HitBox_Bottom#
$0758/17#Obj_Y_Ticker?#
$0770/17#Obj_?#;gets 0 on enemy load.
$0788/17##what? added to Object Y tick counter?
$07A0/17#Obj_enemy_generator_REFILL#
$07E8/17#Obj_tile_start_offset#
My NesDev blog: http://tummaigames.com/blog

Grimgrin

It was kinda hard for me to explain. Very nice!
Currently extending the game.

teremochek

#5
Аfter all, I dare to fix it a little.

$0578/17#Obj_SubType# ;Boom $88: small, big (bit5), bonus ($C2) / Bonus item $32: weapon..

$05A8/17#Obj_Damage#

$0668/17# & (1)
$0680/17# these are special object variables that differ from each object.. (2)

$0758/17#Obj_Y_Ticker#
$0770/17#Obj_X_Ticker#
$0788/17#Respawn timer/rotation some unit's#

$06B0/17#Rotation max time#
$0740/17#Enemy status: destroy, bonus id#
$07B8/17#special var (4)#
$07D0/17#special var (5)#