shadowbeasts' Questions Topic

Discussion in 'Discussion and Q&A Archive' started by shadowbeasts, Apr 10, 2009.

Thread Status:
Not open for further replies.
  1. Oerg866

    Oerg866 Well-Known Member Member

    Joined:
    Aug 29, 2008
    Messages:
    299
    Location:
    Frankfurt, Germany
    Honestly, I laughed.


    No he did not lose all his work.


    1. He still has his ASM files I assume


    2. for ART he can run "nemsrch.exe" and counterparts for other compression formats (uncompressed art is of course, well, uncompressed), and laters sort everything in accordingly (first decompress, sort in and then compress again with the included tool (if using Sonic 1) "derecmp.exe" - A possible command would be "derecmp -c *directory name*"


    3. for SOUND he could either look around the original pointer address from the original ROM to try and find the equivalent or run a search for different channel setups (06 03 et al) in the ROM.


    4. files you had specified a different name for than what the original disassembly files were called (or files that weren't in the original disassembly) in your ASM files are of course still there, they don't magically delete themselves.


    I hope this has given you a clue on how to get at least a huge chunk of data back. Before attempting any of this, I suggest to backup your whole disassembly folder first.


    Regards,


    Oerg866
     
    Last edited by a moderator: Apr 28, 2009
  2. Hitaxas

    Hitaxas Retro 80's themed Paladins Twich streamer Member

    Joined:
    Aug 13, 2007
    Messages:
    167
    I suggest you also delete the split.bat/split.exe from your folder next time, just in-case.
     
  3. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    Good idea I don't know why I didn't think of that first. Off-topic: hitaxas I send you a pm on retro hack regarding this question but since this question has been answered you can delete that PM.
     
  4. Alriightyman

    Alriightyman I'm back! Member

    Joined:
    Oct 3, 2007
    Messages:
    156
    Location:
    USA
    Funny, this happened to me a long time ago. Another good idea is to make backups as often as you can to avoid losing everything.
     
  5. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Oh, if you want to create backups, without moving your lazy ass, put this at the end of your build.bat:



    Code:
    cd ..
    
    xcopy /E /Y /V *Path (Hacking Split)* *Path (Destination)*
    Of course you have to replace the 2 strings.

    Example:



    Code:
    cd ..
    
    xcopy /E /Y /V s1h s1h-Backup

    Now it'll make a backup, everytime you are building.


    Note: Even you can just copy it with right click and selecting Copy, you should use this method, because Command Promps are MUCH faster than Windows.

    PS: I guess it's also possible with copy, but xcopy is better than everything. =P
     
    Last edited by a moderator: Apr 28, 2009
  6. Anthall

    Anthall Active Member Member

    Joined:
    Feb 6, 2009
    Messages:
    32
    Location:
    United Kingdom
    Like everyone said, backup regularly.


    Try to keep as many different backups of your ASM files at different time intervals and try to keep as many old backups as you can. This helps not only if the current ASM files are lost, but you could create a problem with the files that you cannot fix, so you can go back to an earlier version which is free from the problem (Even though I recommend trying to tackle the current problem first).
     
  7. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    I've started to make backups and I deleted the split file so I don't click it again.
     
  8. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    In order to make the Chaos Emeralds give you abilities (EX: 1 chaos emerald gives you jumpdash, second chaos emerald gives you spindash) which code in the ASM to you go to? Do you go to



    Code:
    Obj7F
    .



    Code:
    Subroutine doing the extra logic for Super Sonic
    .

    l

    Code:
    locret_134C2:
    
    				tst.b   $12(a0) &#59; is sonic excactly at the height of his jump?
    
    			beq.s	Sonic_CheckGoSuper cmp.w	d1,d0 &#59; is sonic at the end of the zone?
    
    	beq.w   return_1ABA4; if yes, branch; if yes, test for turning into Super Sonic
    
    						  tst.b	$21(a0); is sonic in air?
    
    		bne.s   locret_134D2; if not, branch
    
    		move.b	($FFFFF603).w,d0; read controller
    
    		and.b	#$70,d0 &#59; is A, B or C being pressed?
    
    		beq.s	locret_134D2; if not, branch
    
    								tst.b	($FFFFFE19).w	 &#59; is Sonic super?
    
    					bne.s	locret_134D2; if yes, branch
    
    								cmpi.b	#6,($FFFFFE57).w; does Sonic have exactly 6 emeralds?
    
    					bne.s	locret_134D2; if not, branch
    
    								cmpi.w	#50,($FFFFFE20).w; does Sonic have at least 50 rings?
    
    								bcs.s	locret_134D2; if not, branch
    
    								tst.b   ($FFFFFE1E).w &#59; does sonic have 0 rings?
    
    								bne.s   Sonic_CheckGoSuper; if not, go to sonic_checkgosuper
    
    		rts
    or



    Code:
    Subroutine called at the peak of a jump that transforms Sonic into Super Sonic
    
    ; if he has enough rings and emeralds
    I'm hacking Sonic 1 and using the Sonic 1 (Split and Text by Hivebrain) (ASM68K) disassembly if I don't have the correct locations please give them to me. Thank you and I don't what a full guide on how to do this.
     
    Last edited by a moderator: May 10, 2009
  9. Hitaxas

    Hitaxas Retro 80's themed Paladins Twich streamer Member

    Joined:
    Aug 13, 2007
    Messages:
    167
    Code:
    								cmpi.b	#6,($FFFFFE57).w; does Sonic have exactly 6 emeralds?
    
    					bne.s	locret_134D2; if not, branch


    That controls the ability to be super with all emeralds.



    Make it





    Code:
    								cmpi.b	#1,($FFFFFE57).w; does Sonic have 1 emerald?
    
    					bne.s	locret_134D2; if not, branch

    And You can use that to gain an ability with just one emerald.


    Place something like that at the top of the spindash code, and branch the bne to the rts in the S-D code, and you will have the effect you are looking for.
     
  10. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Converted it to ASM boxes, because using Code boxes for ASM really starts to annoy me.


    However, what hitaxas said is actually correct. But now you can only have the special move or whatever, with only 1 Emerald. So, if you collect the second one, you can't use it anymore. If you want to fix this, you simply have to do this:



    cmpi.b #1,($FFFFFE57).w ; does Sonic have 1 emerald?
    blt.s locret_134D2 ; if less than 1 emerald, branch



    In other words: Replace bne with blt (branch if less than).


    Hope that helps. :)
     
    Last edited by a moderator: May 7, 2009
  11. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Oh thank´s Selbi!That was helpful!


    Please give him the points! :)
     
  12. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    Done. Also can I turn this into a guide and I'll credit Selbi and hitaxas. If your ok with me making this a guide.
     
  13. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I don't have a problem with this idea. But it'll be a No-Brainer, since this isn't really hard. All you needed to know is how to check if you have less than X emeralds. :D
     
  14. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    I've tried all I can think of here's my problem



    Code:
    SN 68k version 2.53
    
    
    
    C:\DOCUMENTS AND SETTINGS\DANIEL Y\DESKTOP\SONIC UNLIMITED HACK\SONIC 1 (SPLIT A
    
    ND TEXT BY HIVEBRAIN) (ASM68K)\SONIC1.ASM(24718) : Error : Illegal value (-150)
    
     bge.s locret_134d2
    
    C:\DOCUMENTS AND SETTINGS\DANIEL Y\DESKTOP\SONIC UNLIMITED HACK\SONIC 1 (SPLIT A
    
    ND TEXT BY HIVEBRAIN) (ASM68K)\SONIC1.ASM(24746) : Error : Illegal value (-216)
    
     beq.s locret_134d2
    
    Errors during pass 1 - pass 2 aborted
    
    Assembly completed.
    
    2 error(s) from 48551 lines in 0.93 seconds
    
    Lightning's ROM Padder
    
    
    
    Reported Size:		0 Reported Checksum:	0
    
     Size applied:	   7F  Checksum Applied:	0
    
    Press any key to continue . . .


    and here's my code from where the Spindash code starts and my problem ends





    Code:
    Sonic_Spindash:			&#59; CODE XREF: ROM:Obj01_MdNormalp
    
    		tst.b	$39(a0)
    
    		bne.s	loc_10396
    
    		cmpi.b	#8,$1C(a0)
    
    		bne.s	locret_10394
    
    		move.b	($FFFFF603).w,d0
    
    		andi.b	#$70,d0&#59; 'p'
    
    		beq.w	locret_10394
    
    		move.b	#9,$1C(a0)
    
    		move.w	#$BE,d0&#59; '¾'
    
    		jsr	(PlaySound_Special).l
    
    		addq.l	#4,sp
    
    		move.b	#1,$39(a0)
    
    
    
    locret_10394:			&#59; CODE XREF: Sonic_Spindash+Cj
    
    				&#59; Sonic_Spindash+16j
    
    		rts
    
    ; ===========================================================================
    
    
    
    loc_10396:			&#59; CODE XREF: Sonic_Spindash+4j
    
    		move.b	($FFFFF602).w,d0
    
    		btst	#1,d0
    
    		bne.s	loc_103DC
    
    		move.b	#$E,$16(a0)
    
    		move.b	#7,$17(a0)
    
    		move.b	#2,$1C(a0)
    
    		addq.w	#5,$C(a0)
    
    		move.b	#0,$39(a0)
    
    		move.w	#$2000,($FFFFEED0).w
    
    		move.w	#$800,$14(a0)
    
    		btst	#0,$22(a0)
    
    		beq.s	loc_103D4
    
    		neg.w	$14(a0)
    
    
    
    loc_103D4:			&#59; CODE XREF: Sonic_Spindash+6Cj
    
    		bset	#2,$22(a0)
    
    		rts
    
    ; ===========================================================================
    
    
    
    loc_103DC:			&#59; CODE XREF: Sonic_Spindash+3Cj
    
    		move.b	($FFFFF603).w,d0
    
    		andi.b	#$70,d0&#59; 'p'
    
    		beq.w	loc_103EA
    
    		nop
    
    
    
    loc_103EA:			&#59; CODE XREF: Sonic_Spindash+82j
    
    		addq.l	#4,sp
    
    		rts
    
    ; End of function Sonic_Spindash
    
    
    
    
    
    Sonic_DoubleJump:
    
    	cmpi.b	#1,($FFFFFE57).w&#59; does Sonic have 1 emerald?
    
    	bge.s	locret_134D2&#59; if less than 1 emerald, branch
    
    	tst.w	$12(a0); is Sonic moving upwards?
    
    	beq.s	endofdoublejump; if not, branch
    
    	cmpi.b	#$13,$1C(a0); is sonic using "bounce" animation?
    
    	beq.w	endofdoublejump; if yes, branch
    
    	cmpi.b	#2,$1C(a0); is Sonic rolling/jumping?
    
    	move.b	($FFFFF605).w,d0
    
    	andi.b	#$20,d0; is C button pressed?
    
    	beq.s	endofdoublejump; if not, branch
    
    	sub.w #$600,$12(a0); move Sonic upwards
    
    	move.b	#2,$1C(a0); use "rolling" animation
    
    	move.b	#1,$21(a0); set the double-jump flag
    
    
    
    endofdoublejump:
    
    		rts
    
    
    
    ; ---------------------------------------------------------------------------
    
    ; Subroutine called at the peak of a jump that transforms Sonic into Super Sonic
    
    ; if he has enough rings and emeralds
    
    ; ---------------------------------------------------------------------------
    
    
    
    ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
    
    
    
    ; loc_1AB38: test_set_SS:
    
    Sonic_CheckGoSuper:
    
    				tst.b	($FFFFFE19).w	   &#59; is Sonic already Super?
    
    	bne.s	return_1ABA4; if yes, branch
    
    	 cmpi.b	#6,($FFFFFE57).w; does Sonic have exactly 6 emeralds?
    
    					beq.s	locret_134D2; if not, branch

    Help me please? Thank you
     
  15. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    From what I see, locret_134D2 doesn't exist.
     
  16. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Before I answer your question, promise me to use the ASM boxes in the future. >_>


    However, the "illegal value" error is simalar to the "out of ranch" error. Simply replace the .s with .w in bge.s and beq.s. This should fix the problem.


    Oh, and another thing: No offense Qjimbo, but you shouldn't use this Spindash. These guides (1 - 2 - 3) are better, because they are showing how to get the 100% Spindash (with anim, sound etc.). But it's your decision. :D
     
    Last edited by a moderator: May 9, 2009
  17. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    I've got no idea how to use ASM boxes and I'll take you up on your answer but I have to try it first.
     
  18. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Simply type [asm]. Close the box with [/asm].
     
  19. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    Thanks.
     
  20. shadowbeasts

    shadowbeasts I'm Legend Member

    Joined:
    Jan 5, 2009
    Messages:
    286
    Location:
    Good 'ol USA.
    I changed S2 format to S1 format in SonMapED to add the spindash sprites into sonic 1 in place of the warping sprites and I get this message

    Is there anyway to fix this problem?
     
Thread Status:
Not open for further replies.