Basic Questions and Answers Thread

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

  1. Soldaten

    Soldaten The Coilgun Root Admin

    Joined:
    Mar 10, 2016
    Messages:
    268
    Posting the changes to the code that you made helps....
     
  2. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    My changes are just:

    ...
    Pal_GHZ: incbin pallet\ghz.bin
    Pal_GHZ2: incbin pallet\ghz2.bin
    Pal_GHZ3: incbin pallet\ghz3.bin
    Pal_GHZA: incbin pallet\ghza.bin
    Pal_GHZ2A: incbin pallet\ghz2a.bin
    Pal_GHZ3A: incbin pallet\ghz3a.bin
    ...

    And new entries into the pallet_pointers.asm file

    When i add it, sonic's/Ashuro's sprites bug, when i deleted my new entries, no more bug.
     
  3. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    That's the DMA boundary 'bug', an issue with the MD hardware. You've followed the Spin Dash guide, so the game now DMA-transfers the character's art from ROM instead of a fixed place in RAM. The problem is that your art file is crossing a 0x20000(?) byte boundary, which the DMA can't cross, causing it to loop back to the start of the 0x20000-byte block, and transfer code and who-knows-what-else instead.

    There are a couple of way to 'fix' it:
    • You could add an 'align' macro before your art file's 'incbin' statement. 'align $20000' should work.
    • You could replace the old DMA code with Flamewing's Ultra DMA Queue, and enable the 'Use128kbSafeDMA' mode, which makes it detect when issues like this occur and avoid them. This is the option I'd recommend.
    • I suppose you could also edit the DPLC script, and split the particular frame that's causing an issue into two different transfers, but you'd have to do this every time your ROM's layout changes, so that's probably a bad idea.
    • You can move your art file's 'incbin' somewhere else
     
  4. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Thank you Clown, i've tested the first method, and it works!
    But i will try the Ultra DMA Queue because it looks interesting.
     
  5. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    1. I have Sonic & Knuckles' sound driver installed in my Sonic 1 hack. It had been working without many problems, but several months ago it started acting oddly when fading out songs by changing the voices and not the volume. I had encountered the problem previously, but it was fixed oddly enough by moving the characters' art files. This solution doesn't work now.

    Example

    2. After switching the level art files from Nemesis compression to Kosinski, exiting a special stage freezes the game, meaning the error handler doesn't show up. This only happens on Regen and on hardware.
     
    Ashuro likes this.
  6. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Sorry for this question but i want to be safe:

    32 byte = 1 tile... So:
    $240 bytes = 11 tiles in VRAM, right??

    EDIT: No i'm wrong because $240 in hex = 576 in decimal

    576 / 32 = 18 tiles.

    Sorry for this useless post.
     
    Last edited: Jul 12, 2017
  7. LuchoJN

    LuchoJN Newcomer Trialist

    Joined:
    Apr 21, 2017
    Messages:
    1
    So, I've been having this error for some days, and I don't know what exactly happened or how to solve it

    Ok, I tried to import this image to Sonic 1 via SonMapED for pure boredom and to understand more about the program and how to use it
    Image 1.png
    I used some of the Palmtree of GHZ as you can see in the next image
    Image 2.png
    Ok, then I modified the original image I wanted to import to match a pallete line (the second one), changed the transparent color, and after importing the modified image, I ended with this result
    Image 3.png
    I doesn't looks like the original image, some colors are missing, but it's there, then I go to SonED2 and... Image 4.png THIS happens, as I stated before, I don't exactly know what happened. Maybe this is something very easy to solve or maybe I took a wrong step while using SonMapED, but I'm just a noob wanting to learn how to rom-hack ^^' I'm sorry if there are too many images
     
    Last edited: Jul 11, 2017
  8. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Most problems with editing GHZ's graphics can be solved using this guide.
     
  9. BurningFlame

    BurningFlame Bang! Member

    Joined:
    Jan 1, 2017
    Messages:
    40
    Location:
    Vodkaland
    Is it safe to edit GHZ chunks 2E, 2F 40 - 52? If no, is there a way to make every act to load different chunk data?
     
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    A quick check of all three acts of GHZ and the ending show that none of those chunks are used, so you can freely edit them. SonLVL's "Delete Unused Chunks" option does take into account other levels using the same chunk set, so it's pretty safe to use unless you have dynamic layout editing (like Labyrinth's waterslide area or Casino Night's boss room).
     
  11. BurningFlame

    BurningFlame Bang! Member

    Joined:
    Jan 1, 2017
    Messages:
    40
    Location:
    Vodkaland
    How to reverse GHZ boss movement to fly Up-Down?
     
  12. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    By studying the code and changing whatever needs to be changed in order to do that?
     
  13. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Hello, i followed this tutorial:
    http://sonicresearch.org/community/...-to-add-animations-in-the-fg.2284/#post-34820

    To make my levels a little more "alive".

    In my water level (Depth Crystal), i have a lot of lag, because my background and some crystals at my foreground are animated.
    Please, i want to know why, because in Marble Zone (lava), Angel Island (flames) or Sandopolis (background haze), animated graphics does not cause lag to the game.
     
  14. LazloPsylus

    LazloPsylus The Railgun Member

    Joined:
    Nov 25, 2009
    Messages:
    Location:
    Academy City
    Details will need to be provided, as there's a number of possibilities. If it's underwater, that's part of the problem right there, as underwater effects are often a drain on processing due to how it's done. You also have to remember that S3K's engine has a lot of structural differences and optimizations to help make details like that work better and generally free up processing. The devil is in the details, as some say.
     
    Ashuro likes this.
  15. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    It depends what exactly. Animated art is just animated art, irregardless of it being above water or not. What is most likely causing it, is too much animation PER FRAME. There is only so much time to do any art transfers, and when you are not DMAing it (as Sonic 1 didn't support a DMA queue), it will be really slow. You need to make sure you try to avoid animating any tiles, by removing any ones that dont really change and aligning the art so it uses the minimum possible tiles. And also make sure you avoid animating big pieces as those can easily cause slowdown if you are not careful. And of course, like said, S3K's engine is miles better than S1's so it can tolerate more abuse.
     
    Ashuro likes this.
  16. LazloPsylus

    LazloPsylus The Railgun Member

    Joined:
    Nov 25, 2009
    Messages:
    Location:
    Academy City
    See, plenty of possibilities. You need to provide a lot more detail for people to help you. What you've tried, what you've done to optimize, engine, etc. Just mentioning "My animations are lagging!" isn't enough to help you at all past just general information.
     
    Ashuro likes this.
  17. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    This is my code:
    Code:
    ; ---------------------------------------------------------------------------
    ; Animated pattern routine - Depth Crystal
    ; ---------------------------------------------------------------------------
    AniArt_LZ:                ; XREF: AniArt_Index
            bsr.w     AniArt_LZ_Wave
            bsr.w     AniArt_LZ_Wave2
            bsr.w     AniArt_LZ_Wave3
            bsr.w     AniArt_LZ_Wave4
            bsr.w     AniArt_LZ_Wave5
            bsr.w     AniArt_LZ_Crystal1
            bsr.w   AniArt_LZ_Crystal2
            bsr.w     AniArt_LZ_Crystal3
            bsr.w     Aniart_LZ_Crystal4
    ; ---------------------------------------------------------------------------
            vram     $3900 ; VRAM Location
            lea     (UncWave1),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$C,($FFFFFFB3).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return ; if not branch
            vram     $3900 ; VRAM location
            lea     (UncWave2),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$C,($FFFFFFB4).w ;Timer 2 elapsed?
            bcs     AniArt_LZ_Return2 ; if not branch
            vram     $3940 ; VRAM Location
            lea     (UncWave2),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$C,($FFFFFFB5).w ;Timer 3 elapsed?
            bcs     AniArt_LZ_Return3 ; if not branch
            vram     $3940 ; VRAM location
            lea     (UncWave1),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$C,($FFFFFFB6).w ;Timer 4 elapsed?
            bcs     AniArt_LZ_Return4 ; if not branch
            clr.b     ($FFFFFFB3).w ;Clear Timer 1
            clr.b     ($FFFFFFB4).w ;Clear Timer 2
            clr.b     ($FFFFFFB5).w ;Clear Timer 3
            clr.b     ($FFFFFFB6).w ;Clear Timer 4
            rts
            
    AniArt_LZ_Return:
            add.b     #1,($FFFFFFB3).w ;Add to Timer 1
            rts
    
    AniArt_LZ_Return2:
            add.b     #1,($FFFFFFB4).w ;Add to Timer 2
            rts
            
    AniArt_LZ_Return3:
            add.b     #1,($FFFFFFB5).w ;Add to Timer 3
            rts
            
    AniArt_LZ_Return4:
            add.b     #1,($FFFFFFB6).w ;Add to Timer 4
            rts
    ; ---------------------------------------------------------------------------
    Aniart_LZ_Wave:
            vram     $3980 ; VRAM Location
            lea     (UncWave3),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFB3).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return5 ; if not branch
            vram     $3980 ; VRAM location
            lea     (UncWave4),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFB4).w ;Timer 2 elapsed?
            bcs     AniArt_LZ_Return6 ; if not branch
            clr.b     ($FFFFFFB7).w ;Clear Timer 5
            clr.b     ($FFFFFFB8).w ;Clear Timer 6
            rts
            
    AniArt_LZ_Return5:
            add.b     #1,($FFFFFFB7).w ;Add to Timer 7
            rts
    
    AniArt_LZ_Return6:
            add.b     #1,($FFFFFFB8).w ;Add to Timer 8
            rts
    ; ---------------------------------------------------------------------------
    Aniart_LZ_Wave2:
            vram     $3A00 ; VRAM Location
            lea     (UncWave5),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFB9).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return7 ; if not branch
            vram     $3A00 ; VRAM location
            lea     (UncWave7),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFBA).w ;Timer 2 elapsed?
            bcs     AniArt_LZ_Return8 ; if not branch
            vram     $3A40 ; VRAM Location
            lea     (UncWave6),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFBB).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return9 ; if not branch
            vram     $3A40 ; VRAM location
            lea     (UncWave8),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$A,($FFFFFFBC).w ;Timer 2 elapsed?
            bcs     AniArt_LZ_Return10 ; if not branch
            clr.b     ($FFFFFFB9).w ;Clear Timer 5
            clr.b     ($FFFFFFBA).w ;Clear Timer 6
            clr.b     ($FFFFFFBB).w ;Clear Timer 5
            clr.b     ($FFFFFFBC).w ;Clear Timer 6
            rts
            
    AniArt_LZ_Return7:
            add.b     #1,($FFFFFFB9).w ;Add to Timer 7
            rts
    
    AniArt_LZ_Return8:
            add.b     #1,($FFFFFFBA).w ;Add to Timer 8
            rts
            
    AniArt_LZ_Return9:
            add.b     #1,($FFFFFFBB).w ;Add to Timer 9
            rts
    
    AniArt_LZ_Return10:
            add.b     #1,($FFFFFFBC).w ;Add to Timer 10
            rts
    ; ---------------------------------------------------------------------------
    Aniart_LZ_Wave3:
            vram     $3A80 ; VRAM Location
            lea     (UncWave9),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$12,($FFFFFF88).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return11 ; if not branch
            vram     $3A80 ; VRAM Location
            lea     (UncWave10),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$12,($FFFFFF89).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return12 ; if not branch
            clr.b     ($FFFFFF88).w ;Clear Timer 5
            clr.b     ($FFFFFF89).w ;Clear Timer 6
            rts
            
    AniArt_LZ_Return11:
            add.b     #1,($FFFFFF88).w ;Add to Timer 9
            rts
    
    AniArt_LZ_Return12:
            add.b     #1,($FFFFFF89).w ;Add to Timer 10
            rts
    ; ---------------------------------------------------------------------------       
    Aniart_LZ_Wave4:
            vram     $3B00 ; VRAM Location
            lea     (UncWave11),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8A).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return13 ; if not branch
            vram     $3B00 ; VRAM Location
            lea     (UncWave12),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8B).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return14 ; if not branch
            clr.b     ($FFFFFF8A).w
            clr.b     ($FFFFFF8B).w
            rts
            
    AniArt_LZ_Return13:
            add.b     #1,($FFFFFF8A).w
            rts
    
    AniArt_LZ_Return14:
            add.b     #1,($FFFFFF8B).w
            rts
    ; ---------------------------------------------------------------------------       
    Aniart_LZ_Wave5:
            vram     $3B40 ; VRAM Location
            lea     (UncWave13),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8C).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return15 ; if not branch
            vram     $3B40 ; VRAM Location
            lea     (UncWave14),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8D).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return16 ; if not branch
            
            vram     $3B80 ; VRAM Location
            lea     (UncWave15),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8E).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return17 ; if not branch
            vram     $3B80 ; VRAM Location
            lea     (UncWave16),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF8F).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return18 ; if not branch
            
            vram     $3BC0 ; VRAM Location
            lea     (UncWave17),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF90).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return19 ; if not branch
            vram     $3BC0 ; VRAM Location
            lea     (UncWave18),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$10,($FFFFFF91).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return20 ; if not branch
            clr.b     ($FFFFFF8C).w
            clr.b     ($FFFFFF8D).w
            clr.b     ($FFFFFF8E).w
            clr.b     ($FFFFFF8F).w
            clr.b     ($FFFFFF90).w
            clr.b     ($FFFFFF91).w
            rts
    
    AniArt_LZ_Return15:
            add.b     #1,($FFFFFF8C).w
            rts
            
    AniArt_LZ_Return16:
            add.b     #1,($FFFFFF8D).w
            rts
            
    AniArt_LZ_Return17:
            add.b     #1,($FFFFFF8E).w
            rts
            
    AniArt_LZ_Return18:
            add.b     #1,($FFFFFF8F).w
            rts
            
    AniArt_LZ_Return19:
            add.b     #1,($FFFFFF90).w
            rts
            
    AniArt_LZ_Return20:
            add.b     #1,($FFFFFF91).w
            rts
    ;-----------------------------------------------------------------------------
    Aniart_LZ_Crystal1:
            vram     $13E0 ; VRAM Location
            lea     (UncCrystal1),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF92).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return21 ; if not branch
            vram     $13E0 ; VRAM Location
            lea     (UncCrystal2),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF93).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return22 ; if not branch
            vram     $13E0 ; VRAM Location
            lea     (UncCrystal3),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF94).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return23 ; if not branch
            vram     $13E0 ; VRAM Location
            lea     (UncCrystal4),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF95).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return24 ; if not branch
    ; --------------------------------------------------------------------------
    Aniart_LZ_Crystal2:
            vram     $1420 ; VRAM Location
            lea     (UncCrystal5),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF96).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return25 ; if not branch
            vram     $1420 ; VRAM Location
            lea     (UncCrystal6),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF97).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return26 ; if not branch
            vram     $1420 ; VRAM Location
            lea     (UncCrystal7),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF98).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return27 ; if not branch
            vram     $1420 ; VRAM Location
            lea     (UncCrystal8),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF99).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return28 ; if not branch
            clr.b     ($FFFFFF92).w
            clr.b     ($FFFFFF93).w
            clr.b     ($FFFFFF94).w
            clr.b     ($FFFFFF95).w
            clr.b     ($FFFFFF96).w
            clr.b     ($FFFFFF97).w
            clr.b     ($FFFFFF98).w
            clr.b     ($FFFFFF99).w         
            rts
            
    AniArt_LZ_Return21:
            add.b     #1,($FFFFFF92).w
            rts
    
    AniArt_LZ_Return22:
            add.b     #1,($FFFFFF93).w
            rts
            
    AniArt_LZ_Return23:
            add.b     #1,($FFFFFF94).w
            rts
    
    AniArt_LZ_Return24:
            add.b     #1,($FFFFFF95).w
            rts
    AniArt_LZ_Return25:
            add.b     #1,($FFFFFF96).w
            rts
    
    AniArt_LZ_Return26:
            add.b     #1,($FFFFFF97).w
            rts
            
    AniArt_LZ_Return27:
            add.b     #1,($FFFFFF98).w
            rts
    
    AniArt_LZ_Return28:
            add.b     #1,($FFFFFF99).w
            rts
    ; ---------------------------------------------------------------------------
    Aniart_LZ_Crystal3:
            vram     $1460 ; VRAM Location
            lea     (UncCrystal9),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9A).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return29 ; if not branch
            vram     $1460 ; VRAM Location
            lea     (UncCrystal10),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9B).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return30 ; if not branch
            vram     $1460 ; VRAM Location
            lea     (UncCrystal11),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9C).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return31 ; if not branch
            vram     $1460 ; VRAM Location
            lea     (UncCrystal12),a2
            move.w     #1,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9D).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return32 ; if not branch
            clr.b     ($FFFFFF9A).w
            clr.b     ($FFFFFF9B).w
            clr.b     ($FFFFFF9C).w
            clr.b     ($FFFFFF9D).w         
            rts
            
    AniArt_LZ_Return29:
            add.b     #1,($FFFFFF9A).w
            rts
    
    AniArt_LZ_Return30:
            add.b     #1,($FFFFFF9B).w
            rts
            
    AniArt_LZ_Return31:
            add.b     #1,($FFFFFF9C).w
            rts
    
    AniArt_LZ_Return32:
            add.b     #1,($FFFFFF9D).w
            rts
    ; ---------------------------------------------------------------------------
    Aniart_LZ_Crystal4:
            vram     $14A0 ; VRAM Location
            lea     (UncCrystal13),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9E).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return33 ; if not branch
            vram     $14A0 ; VRAM Location
            lea     (UncCrystal14),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFF9F).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return34 ; if not branch
            vram     $14A0 ; VRAM Location
            lea     (UncCrystal15),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFFA0).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return35 ; if not branch
            vram     $14A0 ; VRAM Location
            lea     (UncCrystal16),a2
            move.w     #3,d0
            bsr.w     LoadUncArt
            cmpi.b     #$B,($FFFFFFA1).w ;Timer 1 elapsed?
            bcs     AniArt_LZ_Return36 ; if not branch
            clr.b     ($FFFFFF9E).w
            clr.b     ($FFFFFF9F).w
            clr.b     ($FFFFFFA0).w
            clr.b     ($FFFFFFA1).w         
            rts
            
    AniArt_LZ_Return33:
            add.b     #1,($FFFFFF9E).w
            rts
    
    AniArt_LZ_Return34:
            add.b     #1,($FFFFFF9F).w
            rts
            
    AniArt_LZ_Return35:
            add.b     #1,($FFFFFFA0).w
            rts
    
    AniArt_LZ_Return36:
            add.b     #1,($FFFFFFA1).w
            rts


    I'm sorry, i have a bad internet connection, so i can't upload a video, but in fact:

    My animations are:
    waves in the background
    50.png
    And crystal sparkles at the foreground:
    40.png 19.png

    It's do not lagging as hell, but when bubbles spawn underwater, or when i running fast: lag.

    I'm on Sonic 1 hivebrain 2005, Kega Fusion.
     
  18. LordXernom

    LordXernom Well-Known Member Member

    Joined:
    Aug 12, 2012
    Messages:
    763
    Copy/paste my quote from Retro - "S1 title screen still plays original S1 music instead of my .bin file in sound folder unlike Github disasm, but in sound test it works, but cuts some seconds of my sample - original has 15 seconds, sound test only plays 4 second, but it seems I must add at least one instrument to make SMPS don't stop after 4 seconds." - my issue is related to S1 Hiv DualPCM disassembly. Somebody here know how to fix that?
     
    Last edited: Jul 15, 2017
  19. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    yeah one of the critical issues are with LoadUncArt. Also the code us a huge mess of unoptimal code, though admitteddly its not as big contributing factor as the LoadUncArt itself. What I would do, is follow the Spindash tutorial where it instructs how to port the DMA aueue (unless you have already), and study the animated art code from S3K and make your code roughly alike, just different enough to suit your specific needs. It should at the very least help minimize lag.
     
    ProjectFM and Ashuro like this.
  20. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Thank you very much!