Basic Questions and Answers Thread

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

  1. Ashuro

    Ashuro Well-Known Member Member

    Joined:
    Sep 27, 2014
    Messages:
    476
    Location:
    France
    Hi again guys, i want to learn how to create table indexes, because i want to store a few codes in the titlescreen.

    Like this:

    Code:
    ; ---------------------------------------------------------------------------
    ; Level    select codes
    ; ---------------------------------------------------------------------------
    LevelSelectCode: dc.b     Blabla1_Code-LevelSelectCode
                dc.b BlaBla2_Code-LevelSelectCode
    Blabla1_Code:
            incbin    misc\ls_mcode.bin ; 01 02 04 02 08 01
            even
    Blabla2_Code:
            incbin    misc\ls_jcode.bin ; 01 02 04 08
            even
    But of course, don't work.

    The call for "LevelSelectCode" is:

    Code:
                    ...
                    lea     (LevelSelectCode).l,a0 ; code table index
    Title_EnterCheat:            ; XREF: Title_ChkRegion
            move.w    ($FFFFFFE4).w,d0
            adda.w    d0,a0
            move.b    ($FFFFF605).w,d0 ; get button press
            andi.b    #$F,d0        ; read only up/down/left/right buttons disable debug
            cmp.b    (a0),d0        ; does button press match the cheat code?
            bne.s    loc_3210    ; if not, branch
            addq.w    #1,($FFFFFFE4).w ; next    button press
            tst.b    d0
            bne.s    Title_CountC
    ...
    ...
    Please, someone can teach me?
     
  2. Burst

    Burst Your soul is looking great today. Member

    Joined:
    Mar 22, 2015
    Messages:
    308
    Location:
    Mitakihara
    I need help aswell, again.
    Just a simple question - is it possible to edit the palette and background in SonLVL? If yes, how?
     
  3. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    58
    Location:
    What are you a cop
    :| There are boxes at the top of the editor. They should be different colors. Those are pallets.
     
    AkumaYin likes this.
  4. Burst

    Burst Your soul is looking great today. Member

    Joined:
    Mar 22, 2015
    Messages:
    308
    Location:
    Mitakihara
    Alright, I found out how! Thanks!
     
  5. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    Can someone help me to have a good palette editor because I'm not really good at SonLVL...
     
  6. Mr. Cat

    Mr. Cat The Holy Cat Jr. Member

    Joined:
    May 31, 2014
    Messages:
    352
    Trust me, you won't find anything simpler than SonLVL's built in palette editor. Take a couple of hours to learn how to use the program, and you'll be golden!
     
    ProjectFM likes this.
  7. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    I will continue trying it if it is the most simple.
     
  8. Mr. Cat

    Mr. Cat The Holy Cat Jr. Member

    Joined:
    May 31, 2014
    Messages:
    352
    It's not the fact that it is the most simple, it is the fact that all palette editors are pretty much identical (maybe with a few useless bells and whistles)
     
  9. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    Okay, thanks !
     
  10. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    Hello, new problem, the palette in SonLVL has no problem but ingame there are differences : s1built_006.png and background screenshot.png
     
  11. StephenUK

    StephenUK Working on a Quackshot disassembly Administrator

    Joined:
    Aug 5, 2007
    Messages:
    904
    If you're referring to the water, which I assume you are, then you also need to edit the palette cycle information to contain the new colours for the water.
     
  12. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    Where do I need to do that and how ?
     
  13. TheFieldWarrior

    TheFieldWarrior Well-Known Member Member

    Joined:
    Oct 9, 2015
    Messages:
    80
    Location:
    United Kingdom
    You'll need a hex editor to open up the file "c_ghz.bin" which is located in the folder "pallet" (must resist pallet joke), I personally use Xvi32. Once you download the program open it, load the cycle file and then edit the values
     
  14. CHRdutch

    CHRdutch Newcomer Member

    Joined:
    Jun 3, 2017
    Messages:
    17
    Location:
    Earth, I think.
  15. MarkeyJester

    MarkeyJester It takes only one mistake. Member

    Joined:
    Jun 27, 2009
    Messages:
    2,537
    Location:
    Miss Fox's heart~
    Goto "PalCycle_Title:" and replace this:

    Code:
    PalCycle_Title:				; XREF: TitleScreen
    		lea	(Pal_TitleCyc).l,a0
    		bra.s	loc_196A
    ; ===========================================================================
    
    PalCycle_GHZ:				; XREF: PalCycle
    		lea	(Pal_GHZCyc).l,a0
    
    loc_196A:				; XREF: PalCycle_Title
    		subq.w	#1,($FFFFF634).w
    		bpl.s	locret_1990
    		move.w	#5,($FFFFF634).w
    		move.w	($FFFFF632).w,d0
    		addq.w	#1,($FFFFF632).w
    		andi.w	#3,d0
    		lsl.w	#3,d0
    		lea	($FFFFFB50).w,a1
    		move.l	(a0,d0.w),(a1)+
    		move.l	4(a0,d0.w),(a1)
    
    locret_1990:
    		rts	
    With this:

    Code:
    PalCycle_Title:
    PalCycle_GHZ:
    		subq.w	#1,($FFFFF634).w
    		bpl.s	locret_1990
    		move.w	#5,($FFFFF634).w
    		lea	($FFFFFB50+$06).w,a0
    		lea	(a0),a1
    		move.w	(a0)+,d0
    		move.w	-(a1),-(a0)
    		move.l	-(a1),-(a0)
    		move.w	d0,-(a0)
    
    locret_1990:
    		rts
    You won't need to edit any palette cycling data, this will take the palette of water colours the level is already using, and cycle them automatically. Meaning, you only need to edit the water colours in the level's palette itself.
     
    vladikcomper, KCEXE, Calvin and 9 others like this.
  16. Wudibou

    Wudibou Newcomer In Limbo

    Joined:
    Sep 30, 2017
    Messages:
    20
    Location:
    France
    Thanks, now it is fixed !
    s1built_007.png
     
    MarkeyJester likes this.
  17. DigitalDuck

    DigitalDuck Active Member Member

    Joined:
    Apr 27, 2017
    Messages:
    36
    Location:
    Lincs, UK
    This is what I was trying (and failing) to do myself, so you've inadvertently helped me as well. :D
     
  18. Chainspike

    Chainspike Newcomer Trialist

    Joined:
    May 9, 2017
    Messages:
    3
    How do I install Flamewing's S3&K sound driver into my disassembly? I get loads of build errors when I simply replace the files.
     
  19. Clownacy

    Clownacy UP - ON - CPU Staff

    Joined:
    Aug 15, 2014
    Messages:
    735
    Location:
    Englandland
    You're not going to say what your disassembly actually is, or what the errors you got were?
     
  20. Chainspike

    Chainspike Newcomer Trialist

    Joined:
    May 9, 2017
    Messages:
    3
    Sonic 3 & Knuckles Github and this:
    > > >Sound/Z80 Sound Driver.asm(4223): error: symbol double defined
    > > > MUSPTR_MINIB_SK
    > > > MusPtr_Minib_SK: dw zmake68kPtr(Mus_Minib_SK)
    > > >Sound/Z80 Sound Driver.asm(4683): error: symbol double defined
    > > > LEVELMUSIC_PLAYLIST
    > > > LevelMusic_Playlist:
    soundBank DacBank1 has $DD1 bytes free at end.
    soundBank DacBank2 has $895 bytes free at end.
    soundBank DacBank3 has $1BE7 bytes free at end.
    soundBank DacBank4 has $2EC9 bytes free at end.
    soundBank SndBank has $257 bytes free at end.
    soundBank Mus_Bank1_Start has $407 bytes free at end.
    soundBank Mus_Bank2_Start has $9F1 bytes free at end.
    soundBank Mus_Bank3_Start has $25F3 bytes free at end.
    soundBank Mus_Bank4_Start has $1D35 bytes free at end.
    > > >Lockon S3/LockOn Data.asm(1057): error: error in opening file
    > > > No such file or directory
    > > > Snd_AIZ1: binclude "Sound/Music/AIZ1.bin"
    fatal error, assembly terminated
    Press any key to continue . . .