Please login or register.

Login with username, password and session length
Advanced search  

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!

Pages: [1]
stardragoon9 [Posts: 48]
  • View Profile
  • share
  • [October 11, 2018, 03:54:56 PM]
Unaligned offset at address xxxx
« on: October 11, 2018, 03:54:56 PM »
When i try to use "Equip X Hack" from Razele,i got this error message from FFTorgASM.

What is this error about?Would it mess up the game?Should i ignore it?

Same goes for Pokeytax's "Inherent R/S/M Limitation Hack"
« Last Edit: October 11, 2018, 04:24:00 PM by stardragoon9 »
    • Modding version: PSX
  • xjamxx [Posts: 35]
    • View Profile
    • https://steamcommunity.com/id/xjamxx
    • share
    • [October 11, 2018, 04:25:02 PM]
    Re: Unaligned offset at address xxxx
    « Reply #1 on: October 11, 2018, 04:25:02 PM »
    Ignore. The warning in this case is cuz:
    Code: [Select]
    lw r2,0x004a(r4)
    nop
    or r2,r2,r3
    sw r2,0x004a(r4)
    'lw' and 'sw' asm instrucctions load and save 32 bits in memory and if you start from 0000 then aligned address should be xxx0 - xxx4 - xxx8 - xxxc. The author of that hack put xxxa to modify two 32 bits aligned slots in memory with a single instruction (16 bit of one slot and 16 bit of another). It may not be the best practice, but it save code space.

    UPDATE: didn't know that Glain, i guess i haven't play on my console for more than 18 years. But if Glain says so, then just don't use it if u are going for console.
    I never bother to asm the 'event instruction upgrade' hack, but from what i recall it had some offset not aligned, so that hack won't work with consoles too?
    « Last Edit: October 11, 2018, 09:05:04 PM by xjamxx »
    • Modding version: PSX
  • <Random> This seems to be a PSX issue.
    <Elric> A psx issue? That makes no sense. Sounds more like an issue with your OS.
    stardragoon9 [Posts: 48]
    • View Profile
    • share
    • [October 11, 2018, 05:47:29 PM]
    Re: Unaligned offset at address xxxx
    « Reply #2 on: October 11, 2018, 05:47:29 PM »
    Ignore. The warning in this case is cuz:
    Code: [Select]
    lw r2,0x004a(r4)
    nop
    or r2,r2,r3
    sw r2,0x004a(r4)
    'lw' and 'sw' asm instrucctions load and save 32 bits in memory and if you start from 0000 then aligned address should be xxx0 - xxx4 - xxx8 - xxxc. The author of that hack put xxxa to modify two 32 bits aligned slots in memory with a single instruction (16 bit of one slot and 16 bit of another). It may not be the best practice, but it save code space.

    Thanks,i'll ignore it and use the hack!

    BTW I tried really hard to understand the "reason" part but failed :oops: I'm a complete idiot when it comes to assembly language  :(
    Glain [Posts: 487]
    • View Profile
    • share
    • [October 11, 2018, 08:40:11 PM]
    Re: Unaligned offset at address xxxx
    « Reply #3 on: October 11, 2018, 08:40:11 PM »
    This will cause the game to crash on console.  Some emulators may allow it.  Use at your own risk.

    EDIT - The hardware doesn't allow doing unaligned loads and stores using lw/lh/lhu and sw/sh.  I wouldn't recommend using any hack that does it.  Any emulator that does allow it is not emulating the hardware correctly.
    Unaligned loads/stores of 4-byte values can be done with lwl/lwr/swl/swr but you need to use 2 instructions a shot.

    EDIT - Event Instruction Upgrade v1.13 doesn't have unaligned loads/stores.
    « Last Edit: October 12, 2018, 10:27:49 PM by Glain »
    May I kill him?
    Pride [Posts: 839]
    • View Profile
    • share
    • [October 13, 2018, 02:56:44 AM]
    Re: Unaligned offset at address xxxx
    « Reply #4 on: October 13, 2018, 02:56:44 AM »
    This one should be correct

    • Modding version: PSX
  • Check out my ASM thread. Who doesn't like hax?
    stardragoon9 [Posts: 48]
    • View Profile
    • share
    • [October 13, 2018, 08:10:55 AM]
    Re: Unaligned offset at address xxxx
    « Reply #5 on: October 13, 2018, 08:10:55 AM »
    This will cause the game to crash on console.  Some emulators may allow it.  Use at your own risk.

    EDIT - The hardware doesn't allow doing unaligned loads and stores using lw/lh/lhu and sw/sh.  I wouldn't recommend using any hack that does it.  Any emulator that does allow it is not emulating the hardware correctly.
    Unaligned loads/stores of 4-byte values can be done with lwl/lwr/swl/swr but you need to use 2 instructions a shot.

    EDIT - Event Instruction Upgrade v1.13 doesn't have unaligned loads/stores.

    Got it
    stardragoon9 [Posts: 48]
    • View Profile
    • share
    • [October 13, 2018, 08:11:09 AM]
    Re: Unaligned offset at address xxxx
    « Reply #6 on: October 13, 2018, 08:11:09 AM »
    This one should be correct

    Thank you!
    Pages: [1]