Users browsing this thread: 18 Guest(s)
Learning Magic
07-05-2012, 09:05 PM
The first thing I see is that you're inserting more bytes than you're overwriting, which can cause a multitude of issues. This is likely what's causing you to see constantly changing values as you scroll up and down the magic list. I'm actually rather surprised you haven't seen a complete game crash yet.
What you'll need to do to insert code is, in this case, overwrite Gogo's code with a JSR (Jump to SubRoutine) to some free space, where you'd then write your custom function. Conveniently, the code you're overwriting is four bytes, which is the same size as a JSR. The free space in bank C3 starts at $C3F091 and continues to the end of the bank, or $C3FFFF. Don't forget the RTS (Return To Subroutine) at the end.
Secondly, it doesn't seem any operations are actually being performed on your data. All you're doing is loading data into the accumulator and storing it in RAM locations, but nothing's being done with it afterward. From what I could gather, you're trying to make one magic list shared amongst all the characters, is that right?
No idea. What assembler are you using/where are you seeing that?
What you'll need to do to insert code is, in this case, overwrite Gogo's code with a JSR (Jump to SubRoutine) to some free space, where you'd then write your custom function. Conveniently, the code you're overwriting is four bytes, which is the same size as a JSR. The free space in bank C3 starts at $C3F091 and continues to the end of the bank, or $C3FFFF. Don't forget the RTS (Return To Subroutine) at the end.
Secondly, it doesn't seem any operations are actually being performed on your data. All you're doing is loading data into the accumulator and storing it in RAM locations, but nothing's being done with it afterward. From what I could gather, you're trying to make one magic list shared amongst all the characters, is that right?
Quote:And finally, what is the difference between "MathValue" and "MathValue!" ?
No idea. What assembler are you using/where are you seeing that?
« Next Oldest | Next Newest »
![]() |
![]() |
|||
|
||||
![]() |
![]() |
Users browsing this thread: 18 Guest(s)