Users browsing this thread: 1 Guest(s)
Monsters are invincible/Algorithm question???

#5
Posts: 281
Threads: 18
Thanks Received: 13
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
You have the right idea, but as you said, $00 is the BRK (break) instruction, so it's not surprising that your game crashes. What you want is the NOP (no operation) instruction, which is the $EA opcode.
Replace the ASL at C2/2B79 with NOP and the (Spell Power * 4) portion will be (Spell Power * 2 instead).

You have the right idea about the division part as well, but I'm confused by what you wrote, as the vanilla code is already set to loop the division function 5 times (divide by 32) by the LDA #$04 at C2/2B8C. If you set it to loop 6 times you'll get DIV 64, ie. change that LDA #$04 to LDA #$05.

Explanation: the function call at C2/2B90 calls a function at C2/0DD1 that divides a 32-bit number $E8 by 2^A+1. It does this by bit shifting/rotating the bytes and then looping A times.

The operand length of an instruction is determined by the register length flag. That is, if A is 8-bit, you can't supply an LDA with a 16-bit operand; only the first byte will be interpreted as an operand. The second byte you supply will then be interpreted as an operator. In your case, you put $00 there so it's another BRK instruction.

EDIT: The offsets in this post are all unheadered, by the way. It appears your ROM has a header so you'll have to add $200 to them.

By the way, I think B-Run included a fixed version of the 24-bit monster HP patch in his monster AI upgrade patch, which can be found in this forum.
  Find
Quote  



Messages In This Thread
RE: Monsters are invincible??? - by Gi Nattak - 10-24-2017, 09:12 PM
RE: Monsters are invincible??? - by ExiaTreason - 10-25-2017, 03:08 AM
RE: Monsters are invincible/Algorithm question??? - by seibaby - 10-25-2017, 10:38 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite