Basic Questions and Answers Thread

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

  1. B. Comet

    B. Comet Is fun still infinite? Member

    Joined:
    Aug 19, 2016
    Messages:
    83
    Location:
    South America Zone
    Simple thing, I think.

    [​IMG]

    Those blocks refuses to turn in "all solid".
     
  2. SaunicBoom

    SaunicBoom Well-Known Member Member

    Joined:
    Sep 14, 2007
    Messages:
    324
    Jesus Christ, son! That's a big image. Consider shrinking it down next time, I say.
     
  3. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    ...keeping on topic here, chances are, you've set them as top solid/all solid, but they're probably referencing a collision array block which is blank/empty (like maybe the first one "00"), you will need to change it. If you want it completely solid, then I suspect using the solid block FF will solve your problem.
     
  4. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    SonLVL has some editing problems, especially at the collision allocation, because the window does not update properly.
    You always have to make SURE you have your block "FF", and make the collision appears in the chunk by making the block solid again. (I don't know if someone will understand what i want to say), but I had several problems because of it, so be careful!
     
    B. Comet and AURORA☆FIELDS like this.
  5. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Clownacy likes this.
  6. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    http://sonicresearch.org/community/index.php?threads/how-to-add-one-more-act-in-sonic-1.1693/
    We agree that this guide does not work?
    Since i finished Sonic & Ashuro, i piss me off, so when i don't learn ASM, i want to experienc things...
    I now want to add 1 more act to green hil, after fixing some issues, i cannot fix one:

    When the level start to act 4, when the titlecards appears, i got THIS illegal instruction:
    Sans titre.png

    So when i'm going to the caller, i see this:


    Code:
    DynScrResizeLoad:            ; XREF: DeformBgLayer
            moveq    #0,d0
            move.b    ($FFFFFE10).w,d0
            add.w    d0,d0
            move.w    Resize_Index(pc,d0.w),d0
            jsr    Resize_Index(pc,d0.w)
            moveq    #2,d1
            move.w    ($FFFFF726).w,d0
            sub.w    ($FFFFF72E).w,d0
            beq.s    locret_6DAA
            bcc.s    loc_6DAC
            neg.w    d1
            move.w    ($FFFFF704).w,d0
            cmp.w    ($FFFFF726).w,d0
            bls.s    loc_6DA0
            move.w    d0,($FFFFF72E).w
            andi.w    #-2,($FFFFF72E).w
    .............
    The illegal instruction comes from this line:
    moveq #2,d1

    I want to know what "d1" means and do, but i can't find. And the "neg.w d1" too.
     
  7. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    d1 is used in this code to determine how fast the current bottom boundary moves to the intended one (adds 2 if current is smaller, and subs 2 if it's greater), however IMO seems unrelated. It probably comes from the upper line. This means that it doesn't get a proper resize routine. You should check if in Resize_GHZX_Index (it's like that iirc) you have an entry for act 4 (that is a new line under GHZ3 one).
     
    Ashuro likes this.
  8. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Okaaay, here is the Resize_GHZX_index:
    Code:
    Resize_GHZ:                ; XREF: Resize_Index
            cmpi.w     #$0003,($FFFFFE10).w ; if GHZ4?
            beq.s     LimiteTS
            moveq    #0,d0
            move.b    ($FFFFFE11).w,d0
            add.w    d0,d0
            move.w    Resize_GHZx(pc,d0.w),d0
            jmp    Resize_GHZx(pc,d0.w)
    LimiteTS:
            move.w    #$300,($FFFFF726).w ; set lower    y-boundary
    ; ===========================================================================
    Resize_GHZx:    dc.w Resize_GHZ1-Resize_GHZx
            dc.w Resize_GHZ2-Resize_GHZx
            dc.w Resize_GHZ3-Resize_GHZx
            dc.w Resize_GHZ4-Resize_GHZx
    I move the Resize_ghz3 code to resize_ghz4 and copy the Resize_ghz2 to resize_ghz3.
     
  9. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,015
    Quoted for relevance.
     
  10. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    After setting that boundary, the game is going to read Resize_GHZx as instructions and not a table, leading to some bad results. That check at the beginning is not needed in the first place because there is already a place on the table for act 4.
     
    Ashuro likes this.
  11. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Thank you.
     
  12. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    Seems to work for me. Example:
    Code:
    D:\path>SMPSConv.exe -insbank S3K_UniversalIns.bin S3K-S1 "13 Lava Reef 1.A2E5.s3k" "13 Lava Reef 1.A2E5.smp"
    SMPS Converter
    --------------
    Instrument Bank loaded. (0x23 instruments)
    This song seems to use the global Sonic 3 Instrument Bank.
    The guessed SMPS Offset in Z80 ROM Bank is: 0xA332. Is this right? (Y/N/Q)
    n
    Please enter the correct offset: 0xA2E5
    New Offset is: 0xA2E5. Is this right? (Y/N)
    y
    [...]
    The song uses 0x05 instruments.
    Conversion missed 0xA (likely unused) bytes:
    [...]
    Conversion complete.
     
  13. Niko

    Niko All's well that ends well, right? Member

    Joined:
    Mar 1, 2014
    Messages:
    245
    Location:
    $C800
    I was wondering if any of the SA DreamCast DLC modifies the 1STREAD.bin models in any way, as most of it seems like added models with an event script, but I know SA2 had the 2P costumes that could be added.

    I figured that if any of the SA1 DLC touched the 1STREAD.bin, then it could be adjusted to replace Sonic's model too, thus enabling model edits without re-burning the impossible less-than-700MB SA1.
    This would also make quick mods a lot easier, as a VMU is much more portable than a disk, but.. Aye. I just thought it'd be more efficient than wasted CDs to an updated mod.
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I have no idea how the DLC works for SA1 or SA2.
     
    HackGame likes this.
  15. GenesisDoes

    GenesisDoes What Nintendont Member

    Joined:
    Jan 2, 2016
    Messages:
    159
    Location:
    Pittsburgh, PA
    According to a Sonic Retro thread, the SA2 DLC files on the VMU are just PRS archives, while the SA1 ones appear to be encrypted PRS archives (not sure if anyone has cracked the encryption yet). Whether or not the DLC actually modifies the 1stread.bin file on the GD-ROM would require some disassembly of the SH-4 DLC loading routines to figure out what/how it is patching in the game and how the encryption works.

     
    Niko likes this.
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    It's so much easier to just mod the PC versions that I don't feel like trying to reverse engineer a way to mod the Dreamcast versions is worth the effort.
     
  17. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    I created a stomp code for sonic and it is not working at all which is surprising because I created one a while ago that worked but I did not have it backed up. Can anyone explain to me why my asm sucks at doing its job.

    Code:
    Sonic_Stomp:
            cmpi.b    #1,($FFFFFF89).w        ; is stomp flag 1
            bne.s    rtsmenow    ; if yes, branch
            move.b ($FFFFF603).w,d0 ; is ABC pressed?
            beq.s    rtsmenow    ; if not, branch
    StompMain:
            cmpi.b    #$42,d2            ; are buttons a,down pressed
            beq.w    downstomp        ; If true branch
            cmpi.b    #$46,d2            ; are buttons a,down, and left pressed
            beq.w    dlstomp            ; If true branch
            cmpi.b    #$4A,d2            ; are buttons a,down, and right pressed
            beq.w    drstomp            ; If true branch
            rts
            
    downstomp:
            move.b    #1,($FFFFFF89).w
            move.w    #$BC,d0                ; set ckck sound
            jsr    (PlaySound).l            ; play kckc noise
            clr.w    $10(a0)            ; clear y mov to down
            move.w    d0,$12(a0)        ; replace y movement with data reg 0
            rts
    drstomp:
            move.b    #1,($FFFFFF89).w
            move.w    #$BC,d0                ; set ckck sound
            jsr    (PlaySound).l            ; play kckc noise
            move.w    d0,$10(a0)        ; move d0 to x mov
            move.w    d0,$12(a0)        ; move d0 to Y mov
            rts
    dlstomp:
            move.b    #1,($FFFFFF89).w
            move.w    #$BC,d0                ; set ckck sound
            jsr    (PlaySound).l            ; play kckc noise
            move.w    d0,$12(a0)        ; move d0 to Y mov
            neg.w    d0                ; negate d0
            move.w    d0,$10(a0)        ; move d0 to X mov
            rts
            
    rtsmenow:
            rts
     
  18. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    The code branches to an rts when a flag that the code itself sets isn't set. You can either change that first "bne" to "beq" or you can change the first line from "cmpi.b #1,($FFFFFF89).w" to "tst.b ($FFFFFF89).w."

    Another problem is that those three checks that test button combinations are comparing values to d2 when it's d0 which has the button press value in it.

    Edit: I removed two incorrect observations I made.
     
    Last edited: Oct 27, 2016
  19. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    God I am stupid I forgot that.


    EDIT: NVM Does not work. Darn!
    EDIT: I forgot to move inputs into d2 sorry for the trouble. :(
     
    Last edited: Oct 27, 2016
  20. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The reason your code does not work, is because you have used the instructions and registers illogically.

    It is not your fault, the comments that are supplied with the disassemblies often explain the "gist" of what is going on, not necessarily what the instruction at the line is specifically doing to achieve the gist mentioned. They simply assume you have a basic understanding of the language.

    This problem can only be solved by learning the basic idea of 68k assembly, try a Google search of "68k tutorial", you may find what you need to fix your problem.
     
    Ziro_ and AURORA☆FIELDS like this.