Two bug reports at the same place in the game on two
different backends (see #923570)... Maybe a compiler or
optimizer bug ?
Just to know, was that problem present in scummvm 0.6.0 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I take some time to look at the part of code handling the
dialogue choices and I just realize that we're doing something
not really portable here. We're casting a pointer to an integer
in order to read some aligned strings... (see talk.cpp and
search for ((int)ptr % align) ).
Thus, in order to work, this part of code require that
malloc'ed pointers are aligned on a dword boundary (when
align == 4). I don't know if that's a problem for the
Dreamcast, but I'll try to find some time to rewrite that part.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
malloc()ed memory always have 8 byte alignment on Dreamcast,
so that's not the problem. But I think you're on the right
track. I see that the pointer is casted to a _signed_ int
before the % operation. % in C is not really a modulo
operator; it will return negative results if the left
operand is negative. And guess what? Addresses in the
Dreamcast port will have the MSB set. Don't cast them to
signed types.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=12935
Please do not modify priority values -- those are for internal use only.
Logged In: YES
user_id=230314
Two bug reports at the same place in the game on two
different backends (see #923570)... Maybe a compiler or
optimizer bug ?
Just to know, was that problem present in scummvm 0.6.0 ?
Logged In: YES
user_id=230314
I take some time to look at the part of code handling the
dialogue choices and I just realize that we're doing something
not really portable here. We're casting a pointer to an integer
in order to read some aligned strings... (see talk.cpp and
search for ((int)ptr % align) ).
Thus, in order to work, this part of code require that
malloc'ed pointers are aligned on a dword boundary (when
align == 4). I don't know if that's a problem for the
Dreamcast, but I'll try to find some time to rewrite that part.
Logged In: YES
user_id=446790
malloc()ed memory always have 8 byte alignment on Dreamcast,
so that's not the problem. But I think you're on the right
track. I see that the pointer is casted to a _signed_ int
before the % operation. % in C is not really a modulo
operator; it will return negative results if the left
operand is negative. And guess what? Addresses in the
Dreamcast port will have the MSB set. Don't cast them to
signed types.
Logged In: YES
user_id=230314
Ok, I just rewrote that part of code. Can someone here with
a dreamcast test if that helps ?
Logged In: YES
user_id=514793
cyx - It works great now. Thanks. :)