Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    iirc, the "special SFX" is the waterfall sound in GHZ. I don't know much more about it, though.
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    @‌Clownacy and @nineko, I knew I should have left a music question alone =P

    nineko, if it's to do with the GHZ waterfall, maybe it's to do with play sound effects when off-screen?  Maybe that's why it has a different routine?  Just a guess...
     
    Last edited by a moderator: Oct 27, 2015
  3. Flamewing

    Flamewing Elite Hacker Member

    Joined:
    Aug 28, 2011
    Messages:
    37
    Location:
    France
    Ordinarily, the S1 driver uses a priority system to determine what happens when you play something while something else is playing; and the 'winner' either stops or prevents the other from playing. There are separate 'tiers' for music, SFX and special SFX; each can only override others in its own category. Special SFX will keep playing through SFX changes. What determines if a SFX is special or not is its ID; SFX $D0-$DF are in the group. Special SFX can only use FM4 and PSG3.

    PlaySound_Special uses a separate variable in the sound queue than PlaySound; it is not really all that special.

    All told, special SFX fall into the 'why bother' category, especially considering how they (it) were used in S1.
     
  4. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I have found it difficult to port Sonic 2 and 3K platforming objects to Sonic 1. I've tried porting MGZ's mud/SOZ's sand (which uses the same code as OOZ's oil except with checks to limit the range) and HTZ's diagonal moving lift but never works right. Are there any changes to these objects' code I can make for them to work in Sonic 1?
     
  5. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    No one replied to my last post so here's a new problem.

    I tried porting Sonic 3's sound driver (again) to my Sonic 1 disassembly with better results. This time, it became build-able but no barely any music or sounds play. I applied it to my base disassembly (Hivebrain 128) to see if it would work with that but I got the same problem. It must have something to do with aligning because the tutorial is made for the original Hivebrain disassembly. Also, for some reason, pausing and pressing B will send you back to the title screen even though I didn't change that. Anyway, here's the disassembly (This has my fade to white tutorial added too but I'm sure that doesn't really change anything).

    I just discovered that there were extra parts of the tutorial I didn't follow (though it probably doesn't fix anything), the thing with pressing B is part of the new PauseGame routine added, and that the link to the tutorial doesn't work.
     
    Last edited by a moderator: Nov 10, 2015
  6. Kaz

    Kaz Well-Known Member Member

    Joined:
    Nov 2, 2013
    Messages:
    66
    ProjectFM: I think I fsck'd up the tutorial by changing it to be macroized.... That was a while back but I never heard kram complain about any bugs with my changes since.
     
  7. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    What is it I do to convert sonic 2 nick arcade levels to the sonic 128 disassembly?
    All I did was substitute only GHZ to HPZ, tiles, blocks & chunks together crashed it, tiles alone corrupted art, tiles & blocks showed nothing.
    I know tiles are nemesis, but does blocks & chunks need different compression or something?
     
  8. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
  9. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    But that would convert to 256. I'm using the Sonic 1 two-eight disassembly.
    However you wanna call it...
     
  10. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    ...or Project Sonic 1: Two Eight =P

    You could convert to S2, then follow the instructions here. Depends which branch of Two-Eight you're using, though. If you're using the original...
    • Level Layouts and Solidity Binary need to be uncompressed from Kosinski.
    • 8x8 Tiles need to be recompressed from Kosinski to Nemesis.
    • 16x16 tiles need to be recompressed from Kosinski to Enigma.

    If you're using Kraminator's, just skip the last step.
     
  11. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    I'll try that
    Also I was better making two-eight addressed music better than kram. I prefer address music so that I wouldn't use extra music slots when wanting more music.
    Edit: After converting in level converter, which is the solidity? Collision, indexes, or both?
    Edit2: Also decided to port sonic 2's level art loader to s1, but the tutorial uses git, I need to know hivebrain equivalents of...
    LevelDataLoad - is this MainLoadBlockLoad?
    LevelHeaders - is this Main Level Load Blocks?
    Waitforvbla -
    Runplc - I've done a search on PLC & came up. LoadPLC, LoadPLC2, clearPLC (this can't be it...), RunPLC_RAM, RunPLC_ROM & don't know which it is. I thought LoadPLC but crash, maybe I did something wrong??
     
    Last edited: Dec 9, 2015
  12. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I converted my Sonic 1 disassembly from the ASM68k disassembly to AS so I could make use of Flamewing's S&K Driver. I got all the problems fixed but one:

    > > >: error: open macro definition

    This comes up when a macro is listed but missing a endm. The problem with it is that it's the only error that doesn't tell you where to fix the problem so I've gone through all my .asm files (except the mapping and animation files of course) trying to find an open macro with no luck. Does anyone have any ideas?
     
  13. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    I've had that problem in asm68k -> AS conversions before. They were because of 'rept' macros. You use 'endr' in asm68k, but 'endm' in AS.
     
  14. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I checked that and it doesn't seem to be the case.

    Edit: Nevermind. I guess I didn't check enough
    Edit 2: I'm still getting the problem
    Edit 3: Nevermind again. My sonic1.asm contains a rept command that went un-endm-ed.
     
    Last edited: Dec 19, 2015
  15. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    So now the AS assembler is just messing with me:

    > > >sonic1.asm(5674): error: addressing mode not allowed on 68000
    > > > jmp Obj80_Index(pc,d1.w)
    > > >sonic1.asm(5674): error: addressing mode not allowed here
    > > > jmp Obj80_Index(pc,d1.w)
    > > >sonic1.asm(5774): error: addressing mode not allowed on 68000
    > > > jsr Obj81_Index(pc,d1.w)
    > > >sonic1.asm(5774): error: addressing mode not allowed here
    > > > jsr Obj81_Index(pc,d1.w)
    obj81.asm(6)
    obj80.asm(39)
    > > >sonic1.asm(6094): error: addressing mode not allowed on 68000
    > > > move.w Obj87_Index(pc,d0.w),d1
    > > >sonic1.asm(6094): error: addressing mode not allowed here
    > > > move.w Obj87_Index(pc,d0.w),d1
    > > >sonic1.asm(6095): error: addressing mode not allowed on 68000
    > > > jsr Obj87_Index(pc,d1.w)
    > > >sonic1.asm(6095): error: addressing mode not allowed here
    > > > jsr Obj87_Index(pc,d1.w)
    obj87.asm(10)
    > > >sonic1.asm(6209): error: addressing mode not allowed on 68000
    > > > move.w Obj88_Index(pc,d0.w),d1
    > > >sonic1.asm(6209): error: addressing mode not allowed here
    > > > move.w Obj88_Index(pc,d0.w),d1
    > > >sonic1.asm(6210): error: addressing mode not allowed on 68000
    > > > jsr Obj88_Index(pc,d1.w)
    > > >sonic1.asm(6210): error: addressing mode not allowed here
    > > > jsr Obj88_Index(pc,d1.w)
    > > >sonic1.asm(6288): error: addressing mode not allowed on 68000
    > > > move.w Obj89_Index(pc,d0.w),d1
    > > >sonic1.asm(6288): error: addressing mode not allowed here
    > > > move.w Obj89_Index(pc,d0.w),d1
    > > >sonic1.asm(6289): error: addressing mode not allowed on 68000
    > > > jmp Obj89_Index(pc,d1.w)
    > > >sonic1.asm(6289): error: addressing mode not allowed here
    > > > jmp Obj89_Index(pc,d1.w)
    obj87.asm(61)
    obj88.asm(22)
    obj89.asm(9)
    > > >sonic1.asm(6540): error: addressing mode not allowed on 68000
    > > > move.w Obj8B_Index(pc,d0.w),d1
    > > >sonic1.asm(6540): error: addressing mode not allowed here
    > > > move.w Obj8B_Index(pc,d0.w),d1
    > > >sonic1.asm(6541): error: addressing mode not allowed on 68000
    > > > jsr Obj8B_Index(pc,d1.w)
    > > >sonic1.asm(6541): error: addressing mode not allowed here
    > > > jsr Obj8B_Index(pc,d1.w)
    obj8B.asm(10)
    > > >sonic1.asm(6612): error: addressing mode not allowed on 68000
    > > > move.w Obj8C_Index(pc,d0.w),d1
    > > >sonic1.asm(6612): error: addressing mode not allowed here
    > > > move.w Obj8C_Index(pc,d0.w),d1
    > > >sonic1.asm(6613): error: addressing mode not allowed on 68000
    > > > jsr Obj8C_Index(pc,d1.w)
    > > >sonic1.asm(6613): error: addressing mode not allowed here
    > > > jsr Obj8C_Index(pc,d1.w)
    obj8B.asm(92)
    > > >sonic1.asm(6720): error: addressing mode not allowed on 68000
    > > > move.w Obj8D_Index(pc,d0.w),d1
    > > >sonic1.asm(6720): error: addressing mode not allowed here
    > > > move.w Obj8D_Index(pc,d0.w),d1
    > > >sonic1.asm(6721): error: addressing mode not allowed on 68000
    > > > jsr Obj8D_Index(pc,d1.w)
    > > >sonic1.asm(6721): error: addressing mode not allowed here
    > > > jsr Obj8D_Index(pc,d1.w)
    obj8D.asm(10)
    > > >sonic1.asm(6970): error: addressing mode not allowed on 68000
    > > > lea dword_61B4(pc,d0.w),a1
    > > >sonic1.asm(6970): error: addressing mode not allowed here
    > > > lea dword_61B4(pc,d0.w),a1
    > > >sonic1.asm(7008): error: addressing mode not allowed on 68000
    > > > move.w BgScroll_Index(pc,d2.w),d2
    > > >sonic1.asm(7008): error: addressing mode not allowed here
    > > > move.w BgScroll_Index(pc,d2.w),d2
    > > >sonic1.asm(7009): error: addressing mode not allowed on 68000
    > > > jmp BgScroll_Index(pc,d2.w)
    > > >sonic1.asm(7009): error: addressing mode not allowed here
    > > > jmp BgScroll_Index(pc,d2.w)
    > > >sonic1.asm(7135): error: addressing mode not allowed on 68000
    > > > move.w Deform_Index(pc,d0.w),d0
    > > >sonic1.asm(7135): error: addressing mode not allowed here
    > > > move.w Deform_Index(pc,d0.w),d0
    > > >sonic1.asm(7136): error: addressing mode not allowed on 68000
    > > > jmp Deform_Index(pc,d0.w)
    > > >sonic1.asm(7136): error: addressing mode not allowed here
    > > > jmp Deform_Index(pc,d0.w)
    > > >sonic1.asm(7359): error: addressing mode not allowed on 68000
    > > > jmp Deform_All_2(pc,d2.w)
    > > >sonic1.asm(7359): error: addressing mode not allowed here
    > > > jmp Deform_All_2(pc,d2.w)
    > > >sonic1.asm(9111): error: addressing mode not allowed on 68000
    > > > jmp Resize_GHZx(pc,d0.w)
    > > >sonic1.asm(9111): error: addressing mode not allowed here
    > > > jmp Resize_GHZx(pc,d0.w)

    These pieces of code are exactly the same as the original AS disassembly yet somehow it's "not allowed on 68000."

    Edit: It's fixed. I just had to align it.
     
    Last edited: Dec 19, 2015
  16. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Another reason for getting then messages is because of one error. I've had 1 error before, say, "out of range" error, followed by hundreds of "addressing mode not allowed here" errors. Fixing that 1 "out of range" error fixed everything. I get this time to time.
     
  17. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Thanks RHS, but every error was an "addressing mode not allowed here" error.

    Anyways, I now have it build-able and... it is half it's original size and doesn't start. I can't find the cause of the problem because AS doesn't detect it. Any ideas?
     
  18. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    My suggestion is, unless you know what you are jumping into, its not worth the pain, especially with AS. I would figure better way would be contact Flamewing himself and ask about if he can make ASM68K compatible version of the sound driver. Then again, he tends to make macros so utterly AS specific so it may not work.
     
  19. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Thanks, Natsumi, but I think I'll still work on it anyway to see what can be changed around to allow it to work. I won't give up until I run out options.

    Also, according to Cinossu, ASM68k can only assemble 68k code so I doubt it would be possible for a version to be made for it.
     
  20. Devon

    Devon Down you're going... down you're going... Member

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    Well, he could release a binary version with limited modification that can be done to it (of course, like changing music and SFX). He did that with his debugger.