Basic Questions and Answers Thread

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

  1. Zero

    Zero Active Member Member

    Joined:
    Jan 26, 2009
    Messages:
    37
    I've messed with some palette code to make player two have an underwater palette, but if you get to SBZ act 3 as player two, the game crashes and I don't know how to fix it.... Here is my code:



    Code:
    Level_LoadPal:
    
    		move.w	#$1E,($FFFFFE14).w
    
    		move	#$2300,sr
    
    		moveq	#3,d0
    
    Multi:
    
    		cmpi.b   #1,($FFFFFFFE).w; is character flag on?
    
    		bne.s	 Mulit1  &#59; if not, branch
    
    		moveq   #$14,d0
    
    		jsr		 PalLoad2		 &#59; load new palette
    
    		bra	loadpal_con
    
    Mulit1:
    
    		bsr.w	PalLoad2; load Sonic's pallet line
    
    
    
    loadpal_con:
    
    
    
    Multi2:
    
    		cmpi.b	#1,($FFFFFE10).w; is level LZ?	
    
    		bne.s	 Level_GetBgm  &#59; if not, branch
    
    		bra	under
    
    under:
    
    		cmpi.b   #1,($FFFFFFFE).w; is character flag on?
    
    		bne.s	Mulit2; if not, branch
    
    		moveq   #$15,d0
    
    		bra	loadpal2_con
    
    Mulit2:
    
    
    
    		moveq	#$F,d0&#59; pallet number	$0F (LZ)
    
    loadpal2_con:
    
    
    
    Multi3:
    
    		cmpi.b	#3,($FFFFFE11).w; is act number 3?
    
    		bne.s	Level_WaterPal; if not, branch
    
    		bra	under2
    
    under2:
    
    		cmpi.b   #1,($FFFFFFFE).w; is character flag on?
    
    		bne.s	 Mulit3  &#59; if not, branch
    
    		moveq   #$16,d0
    
    		bra	loadpal3_con
    
    Mulit3:
    
    		moveq	#$10,d0&#59; pallet number	$10 (SBZ3)
    
    
    
    loadpal3_con:
    I honestly don't see how this is a bad code.


    EDIT: Never mind, Fixed. A line in the Palette Pointers.asm was commented :eek:
     
    Last edited by a moderator: Aug 4, 2009
  2. Rydia3667

    Rydia3667 Guest

    I don't understand this.


    "To pad the ROM, open it in a hex editor, and


    insert a number of bytes at the end of the file. This number must be


    equal to or greater than the number of bytes that the data is expected


    to grow. The total size of level/tile data will stay around the area of


    524,288 bytes (512K). Adding 131,072 bytes (128K) to the end might leave


    enough room, although a larger number would be safer".


    Info from sonED, where would I add the bytes to the very end or before the end of the rom? Do I have to add 512K with 128K. I find it very confusing.
     
  3. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    EDIT: Nevermind, I got it to work.
     
    Last edited by a moderator: Jul 25, 2009
  4. Rydia3667

    Rydia3667 Guest

    Edit: I got it to work. Never Mind.
     
    Last edited: Jul 29, 2009
  5. sonichackage

    sonichackage Newcomer Trialist

    Joined:
    Aug 9, 2009
    Messages:
    11
    I've used a tile editor but that's stupid in my opinion, is there any other way of changing the color of the tiles and palettes?
     
    Last edited by a moderator: Aug 11, 2009
  6. Thundertimi

    Thundertimi Well-Known Member Member

    Joined:
    Aug 10, 2007
    Messages:
    245
    Location:
    Too far...
    Easiest way is to change palette with SonED2.
     
  7. Selbi

    Selbi Kickstart My Ass Retired Staff

    Joined:
    Jul 20, 2008
    Messages:
    2,398
    Location:
    Northern Germany
    If you edit the ROM directly, use ESEII. Otherwise you could use SonED 2 as Thundertimi already said. If nothing of this is good for you, you could also use Hivepal.


    Edit: Oh and please change your writing style. I dislike acting like a grammar and spelling nazi, but your writing style pains my eyes. >_>
     
    Last edited by a moderator: Aug 11, 2009
  8. iojnekns

    iojnekns OBAMA '012!!!!1!!!!!&#33 Member

    Joined:
    Mar 27, 2009
    Messages:
    258
    Daleksam, no matter how much one might agree with your sentiments, posting like that isn't helping anything or anyone.


    That said, pallete changes are notoriously easy to do, and can be done by anyone without any outside help, by the plethora of information available in the archives of hacking related sites such as this one, the Retro wiki, the multitude of tools and programs that have been put together by benevolent hackers to make the job easier. If you really cannot work out how to do it, I would say you have a problem with operating the internet in general, not just sonic hacking specifically. Hell, a couple of google searches can net you all the resources you need. I'm afraid if you have to resort to asking for help of such rudimentary tasks, then you are approaching the whole discipline the wrong way. Is this what you are going to do next time you run into problems? Do you think this is how everyone did it? Asking questions to more experienced modders? What about the first person - who did they ask?


    No, quite simply, this is going to be the first of many occasions where you will have to exercise your problem solving skills, a vital skill set for this particualar hobby. It might take a bit longer than you hoped but once you've found the solution yourself, you will be developing the skills necessary to become a useful and innovative hacker. There is really no need for us to spoonfeed you such elementary tasks.
     
  9. Closeph

    Closeph Newcomer Member

    Joined:
    Jan 31, 2009
    Messages:
    4
    I was reading some tutorials on asm, lately I've had some trouble trying to get the disassembler/assembler to work. I split Sonic 2 using SonEd2 and I have snasm68k and asm68k, but whenever I click on them, a command prompt comes up and quickly disappears. If there's something that I'm not doing right then please let me know, also I can't find the build.bat on SonEd2. Is there a way to assemble the files together?
     
    Last edited by a moderator: Aug 11, 2009
  10. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    http://info.sonicretro.org/Disassemblies


    Grab one for Sonic 2, extract the .zip/.rar (I can't remember off the top of my head) to the folder you want your hack to be in, then run split.bat after placing a CLEAN S2 rom in there, and rename it S2.bin. Then doubleclick build.bat, and it'll build. I strongly suggest the xenowhirl build.


    EDIT: FFFFF


    Fixed the link.
     
    Last edited by a moderator: Aug 11, 2009
  11. SMDBZ

    SMDBZ The cake is a lie,the egg too Member

    Joined:
    Aug 8, 2009
    Messages:
    26
    Location:
    France
    I want to add an splash screen(My first time to add this,so it's the RH splash screen.),and I got an error...


    [​IMG]


    How can I fix that's?
     
  12. Spanner

    Spanner The Tool Administrator

    Joined:
    Aug 9, 2007
    Messages:
    2,417
    Looks like you need to add incbins to those labels containing the palette and art, though those labels were originally in the asm file.
     
  13. SMDBZ

    SMDBZ The cake is a lie,the egg too Member

    Joined:
    Aug 8, 2009
    Messages:
    26
    Location:
    France
    And HOW can I incbins? I don't know how...
     
  14. Selbi

    Selbi Kickstart My Ass Retired Staff

    Joined:
    Jul 20, 2008
    Messages:
    2,398
    Location:
    Northern Germany
    incbin X.bin



    Replace the X.bin with your filename. You eventually need to write an even after this command to avoid errors. It should look like this:



    incbin X.bin
    even
     
  15. SMDBZ

    SMDBZ The cake is a lie,the egg too Member

    Joined:
    Aug 8, 2009
    Messages:
    26
    Location:
    France
    Okay, thanks a lot!
     
    Last edited by a moderator: Aug 14, 2009
  16. Ollie

    Ollie Well-Known Member Member

    Joined:
    Feb 7, 2009
    Messages:
    119
    Location:
    Stoke-On-Trent, England, UK
    Hey, I've got a problem with the ring counter not updating until I pick up another ring, in Sonic 1. I'm trying to make it so that the ring counter updates instantly after a routine has finished. It updates instantly the first time round just not the second time, third time, whatever. I don't really want to publicly display my code but if anyone is willing to help then I'll send you a PM with the code. :)


    Here is a pseudo code version if it helps:



    Code:
    Do you have at least 3 rings? 
    
    If no, branch.
    
    [Code runs presuming you have at least 3 rings]
    
    Subtract 3 rings
    
    Update the ring counter

    Like I said, it works the first time around perfectly, just not any other time after that.
     
  17. Selbi

    Selbi Kickstart My Ass Retired Staff

    Joined:
    Jul 20, 2008
    Messages:
    2,398
    Location:
    Northern Germany
    I would like to help you. PM me. :)
     
  18. Ollie

    Ollie Well-Known Member Member

    Joined:
    Feb 7, 2009
    Messages:
    119
    Location:
    Stoke-On-Trent, England, UK
    PM Sent. :)
     
  19. sonicstheman

    sonicstheman Active Member Exiled

    Joined:
    Jul 12, 2009
    Messages:
    36
    I've tried changing sonic's speed but he stands still!
     
  20. Selbi

    Selbi Kickstart My Ass Retired Staff

    Joined:
    Jul 20, 2008
    Messages:
    2,398
    Location:
    Northern Germany
    How did you tried it?