Tool-assisted game movies
When human skills are just not enough

Game Resources / G Bx / Castlevania Harmony Of Dissonance

->Camera's Coordinate

decription type address
X 2byte 0x0200A446
Y 2byte 0x0200A44A

note:Grid can be generated from these addresses.

Gocha found these addresses as camera's coordinates.

->About Player's Parameter(Juste/Maxim/Simon)

decription type address
MAX HP 2byte 0x02018786
Current HP 2byte 0x0201854E
MAX MP 2byte 0x02018788
Current MP 2byte 0x02018550
MAX Heart 2byte 0x0201878A
Current Heart 2byte 0x02018794
CurrentSubWeapon 1byte 0x0201877E
Direction(L/R) 1byte 0x02000478
X Speed(integer part) 2byte 0x0200046A
X Speed(fractional part) unsigned 2byte 0x02000468
Y Speed(integer part) 2byte 0x0200046E
Y Speed(fractional part) unsigned 2byte 0x0200046C

note: Both of X and Y Speed are represented in this equation.


->Collision detection of Player

-Touching detection for other Attacking/Touching detection.

decription type address
Left Edge 2byte 0x03001A20
Top 2byte 0x03001A22
Right Edge 2byte 0x03001A24
Bottom 2byte 0x03001A26

-Attacking/Touching detection for detection which shows the other sprites is attacked by Player.

decription type address
X Onset 1byte 0x03001A28
Y Onset 1byte(unsigned) 0x03001A29
X Offset 1byte 0x03001A2A
Y Offset 1byte(unsigned) 0x03001A2B


The former shows the detection that Player is touched by other sprites.

The latter shows that Player's attack detection.

The latter is calculated by following equation





X_Coordinate and Y_Coordinate is on-desplay value.

Normally, when Player attacked with own weapon (whip or sword), detection value is initialized after end of attacking.

However, by attacking with martial arts like dive-kick and rolling attack, detection value is not initialized and it can be used at next attacking for 1 Frame.

In published "Maxim" run, this technique is used for kicking first candlestand.

->Various values of sprites.

-Starting from 0x02000510. This Address is arbitrary decided as base address by Robert_Ordis.

decription type offset
To next sprite +0x80
Current HP 2byte +0x44
X sub-Pixel 2byte(unsigned) +0x50
X coordinate 2byte +0x52
Y sub-Pixel 2byte(unsigned) +0x54
Y coordinate 2byte +0x56
Direction(L/R) 2byte +0x68
Collision decision 1byte +0x7A
Access number for collision detection address 1byte(probably) +0x7B
1st accepted attack ID 1byte +0x7C
2nd accepted attack ID 1byte +0x7D
1st invulnerablity 1byte(unsigned) +0x7E
2nd invulnerablity 1byte(unsigned) +0x7F


1.Collision decision

Basically, value of "Collision decision"(+7A) is shown as follows in binary.

bit description value
1st bit enable collision detection 0:disable 1:enable
2nd bit enable attacking 0:enable 1:disable
3rd bit enable taking other's attack 0:enable 1:disable
4th bit enable guarding other's attack 0:disable 1:enable

Upper bit is show a exception of guard detection. It will work while 4th bit is 1.

bit description value
5th bit guard only SubWeapons 0:disable 1:enable
6th bit guard Subweapons and normal attack 0:disable 1:enable
7th bit probably guard all attack 0:disable 1:enable
8th bit unknown 0:disable 1:enable

Lower bit exception is priorly applied.

For example, if +0x7A value of one sprite is 0x5B,


and guarding is working but 5th bit is enable. So, the sprite can guard only SubWeapons and charge/normal attack is not guarded;0x40 is ignored.

Exception is only applied for guarding.

In following case, 4 higher-bits are ignored.

-collision detecting is disabled.

-taking collision is disabled.

But, I think that 6th bit is only used in upper-bits.

2. Invulnerablity and Accepted attack ID

There are two invulnerablity and accepted attack ID.

Accepted attack ID values shows which kind of attack hit the sprites. Invulnerability time values shows time of invulnerablity of one kind of attacks (Frames). And when 1st/2nd invulnerability became 0, 1st/2nd accepted atack ID will be reseted.

These value is very important for "Shuriken Glitch"(will be descibed in "Attack method" section).

->Collision detection of sprites

Starting from 0x03001A28.

Probably, "Access for collision" of "Various values of sprites" is used as follows.


decription type offset
To next detection +0x08
X Onset for Attacking 1byte +0x00
Y Onset for Attacking 1byte(unsigned) +0x01
X Offset for Attacking 1byte +0x02
Y Offset for Attacking 1byte(unsigned) +0x03
X Onset for Taking 1byte +0x04
Y Onset for Taking 1byte(unsigned) +0x05
X Offset for Taking 1byte +0x06
Y Offset for Taking 1byte(unsigned) +0x07


->Calculation of detection

This is same as Player's Attacking/Touching detection. Subpixel(fractional part) of character's coordinate is not considered for detection.





If attacking/touching detection of Player's attacks or SubWeapon and detection of taking of one enemy are collided, the enemy is damaged.

And in the opposite (attacked by enemies and Player is taking), Player is damaged.

But, in some enemies, detection for taking damage is also worked as detection for attacking.

Following enemies are so.

-Lizard man series.

-Skull knight Lord (1st form)

-Golem (1st form when it hits with its arm)


->Attack method In this game, method of accepting the attack is described as follows.

   1.When attacking hitbox of friendly sprites(Player or SubWeapons) covered taking hitbox of enemy sprites, compare between the new ID of attacking and existing ID.

   2.If same ID as new attack doesn't exist in the sprites, calculate AND value between existing IDs.

   3.If the result of AND arithmetic is 0, take a new damage and write new ID and invulnerability values in empty address.
This method is based on following very simple scheme.

   -If either attacked IDs is 0, AND value is 0 and sprite will be acceptable for new attack.

   -If both of attacked IDs are filled, AND value will be other value and new attack cannot be accepted.
However, due to mistake for setting ID of attacking, there are some attack combinations that AND calculation result is 0.

If two attack is accepted and their AND value is 0, the third attack is accepted and the sprite's HP is reduced by the third attack. But because of filling both of accepted ID in sprite's memories, the last attack is accepted but not stored. So, in next frame, acception for the third attack is processed again and multiple hitting is occurred.

These series of processing are continued until either invulnerability count 0. Therefore, the longest time of continuing multiple hits depends on the attack which has the shortest invulnerability.

Player can use any attack except the stored attacking for the third attack because this glitch is caused by unexpected combination of 1st and 2nd attack.

IDs of attack list for each characters are shown in following tables.

-Just Belmont

Attack ID(showing in binary and hex) invulnerablity
Normal Whip 00000011(0x03) 29 Frames
Midair Whip 00000010(0x02) 40 Frames
Sliding 00000110(0x06) 30 Frames
Dive Kicking 00000110(0x06) 30 Frames
SubWeapon:Knife 00000000(0x00) 0 Frames
SubWeapon:Axe 00001000(0x08) 20 Frames
SubWeapon:Cross 00001001(0x09) 20 Frames

-Maxim Kischine

Attack ID(showing in binary and hex) invulnerablity
Normal Slashing 00110001(0x31) 20 Frames
Midair Slashing 00110000(0x30) 14 Frames
Sliding 00000110(0x06) 30 Frames
Kicking 00110010(0x32) 10 Frames
Rolling Attacking 00000011(0x03) 29 Frames
Dive Kicking 00000110(0x06) 30 Frames
SubWeapon:Shuriken 00101111(0x2F) 20 Frames

-Simon Belmont

Attack ID(showing in binary and hex) invulnerablity
Normal Whip 00000011(0x03) 29 Frames
Midair Whip 00000010(0x02) 40 Frames
SubWeapon:Cross 00001001(0x09) 20 Frames

For example, in the most popular case, 1st attack is Maxim's Dive Kicking(0x06) and 2nd attack is Midair Slashing(0x30). The AND value of both accepted attack ID is 0. So, if the thrown Shuriken hit to the enemy, multiple hit glitch is occurred because of the attack of Shuriken is accepted but it isn't stored in sprite's memory. The longest time for continuing multiple hit is 14Frame(invulnerability of Midair Slashing).

->Lua Script

-Showing detection and other values script is created by Robert_Ordis.

For VBA-rr v23.5 fix bug about color type in hex.

Combined RSS Feed
GameResources/GBx/CastlevaniaHarmonyOfDissonance last edited by Robert_Ordis on 2012-12-04 09:14:08
Page info and history | Latest diff | List referrers | View Source