How can the infinte gain and non-removal errors be fixed?

Discussion in 'Discussion and Q&A Archive' started by Professor Neo, Mar 30, 2010.

Thread Status:
Not open for further replies.
  1. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Selbi, I know you're familiar with this problem: infinity


    [​IMG]


    Here, I just collected more than 100 lives and now have 103, which explains the glitchiness. This Knuckles 1-up block [replacing the W block] needs to be removed once it's touched. And no, this is NOT S1K or even a Knuckles GFX rip of S1K. I imported Knuckles' GFX from S3K and respected the palette limitations.


    I remember you making the 5-ring and mine blocks for SaFusie. Unfortunately, I lost all that when my old PC crashed.


    I'm making the Zone 1 block a 5-ring block and the Zone 2 block a mine block [player loses 10 rings].



    Code:
    Obj09_ChkZone1:
    
    				cmpi.b	  #$34,d0&#59; is the item a Zone 1 block?
    
    				bne.s		Obj09_NoZone1; Not? Then branch to the rts routine
    
    				bsr.w	SS_RemoveCollectedItem; Make the object collectable
    
    
    
    Obj09_NoZone1:
    
    				rts
    
    
    
    ;============================================================================
    
    
    
    Obj09_ChkZone2:
    
    				cmpi.b	  #$35,d0&#59; is the item a Zone 2 block?
    
    				bne.s		Obj09_NoZone2; Not? Then branch to the rts routine
    
    				bsr.w	SS_RemoveCollectedItem; Make the object collectable
    
    
    
    Obj09_NoZone2:
    
    				rts

    I was reading the code for the W [1-UP] block and it used the first 3 lines; so I copied them. But I need to find the necessary codes to cause the player to gain or lose a specified amount of rings when the block is touched. Because I turned the old 1-UP block into the 7th chaos emerald, I had to make a new one


    And this is related to the topic because making unused special stage blocks work and be able to be removed upon touching them are very difficult. The main problem is making them disappear.
     
    Last edited by a moderator: Mar 30, 2010
  2. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    How the hell did you get more than 100 lives on a special stage... :)
     
    Last edited by a moderator: Mar 31, 2010
  3. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    The life counter glitches when the life total exceeds 99. The 1-UP block is actually a replacement of the W block, and it cannot be removed when touched. Therefore, it dispenses an infinite amount of lives. I'd let you see for yourself if you choose to re-add me on MSN
     
  4. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    infinity? :)

    Well duh, that happens in every Sonic game on the Mega Drive/Genesis I believe. (Even ones that are not hacked)


    I'm pretty sure SEGA or other hackers didn't bother to fix it since they probably thought:


    "Why the hell should we fix this? It's not like anyone is going to get more than 99 lives. I mean who the hell would do that anyway... It's pointless!"

    No thanks...


    Besides, you don't have to show me... I believe you. =P
     
  5. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    And I thought you were trying to help in this situation. The news over gaining 100+ lives just caught your attention. All I'm dealing with here is making the block removable rather than solid. Cinossu had to use the 1-UP block to make the 7th emerald. That's exactly what I did. But now, I had to find a replacement for the 1-UP block, so I used the W block--none of the unused blocks were removable anyway.
     
  6. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    Look, all I'm just saying... Is there really a point in fixing that over "99 lives glitch"? Do you really want people getting that many lives in your game? Is your hack that hard, that people need 937 lives in order to beat it? C'mon WillJ...


    But do what you want... You know what's best for your hack... I guess?

    Well yea, I mean come on... Over one hundred lives were talking about here... Do you know how weird that sounds. lol!

    Why didn't you just make a new 7th emerald object instead of using the 1-UP block?

    So, what's the replacement going to be with the W block then? =P
     
    Last edited by a moderator: Apr 3, 2010
  7. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    This is the 5th topic about issues with your special stage, not to be rude I just felt that it should be pointed out, maybe you should have one thread know as the "Special Stage Help" thread or something to keep them altogether, I mean, I'm willing to help and so is everyone else, but it just seems to me you haven't really taken the time to work this out on your own. How is it that one who can port Knuckles to their hack all perfectly isn't capable of working out some simple tasks with the special stage?


    You are dealing with (What SonicRetro would call) Tech Member stuff, this is stuff that other members who have alot of trouble tend NOT to post asking about. in this situation you need to find VRam space, have VRam art (Numbers) loaded into VRam, you need mappings correct (If sprited or planed, doesn't matter), you need to understand a bit more about VDP which many uses tend to not understand generally anyway (No offense to you all here at SSRG, just saying to set a point), it's hard work and requires mathematical thinking, you are aiming way to high I'm afraid, maybe look at some more simpler and easier tasks that are much more inferior for you to manage, and work your way up slowly. And this is how I'll help, by giving you a hint in the right direction, yes obviously I'm not a teacher, nor am I the boss of you, so you can choose to ignore me and anyone else too, but you'll just be stuck with the same problem over and over again with no knowledge in the end, it's no fun.
     
  8. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    He's problem is not the life counter, its to remove a special stage block.


    I looked on an unmodified obj09 and oh look:




    bsr.w SS_RemoveCollectedItem


    bne.s Obj09_GetCont


    move.b #1,(a2)


    move.l a1,4(a2)


    Obj09_GetCont:


    ; stuff to collect the item



    I am not sure about these though:




    move.b #1,(a2)


    move.l a1,4(a2)



    I'll edit this post when I find out.

    Edit: Ok this line:




    move.b #1,(a2)



    This decides what object will be loaded when the item is collected.




    move.l a1,4(a2)



    This line sets the mappings. In most cases its a1. In your case, you need to load obj ID 3, its the sparkles when collecting a 1up.
     
    Last edited by a moderator: Mar 31, 2010
  9. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    What I did, I simply added this from duplicating the Ani1updata lines:



    Code:
    SS_AniW:	&#59; XREF: SS_AniIndex
    
    		subq.b	#1,2(a0)
    
    		bpl.s	locret_1B64A
    
    		move.b	#5,2(a0)
    
    		moveq	#0,d0
    
    		move.b	3(a0),d0
    
    		addq.b	#1,3(a0)
    
    		movea.l	4(a0),a1
    
    		move.b	SS_AniWData(pc,d0.w),d0
    
    		move.b	d0,(a1)[s][/s]
    
    		bne.s	locret_1B64A
    
    		clr.l	(a0)
    
    		clr.l	4(a0)
    
    
    
    locret_1B64A:
    
    		rts
    
    ; ===========================================================================
    
    SS_AniWData:	dc.b $46, $47, $48, $49, 0, 0
    
    ; ===========================================================================

    End result: Reverse blocks disappear


    After realizing that there was something uncommon between the 1-UP and W blocks, I had to make a set of AniData codes for the unused blocks. The problem is, the wrong block disappears. I wanted the Knuckles block affected, not the Reverse.


    And Markey, I did this myself by means of trial and error.


    Never mind that, I dealt with it. The Reverse had the remove collected item line.


    I just found out that it works in Debug mode; if I place Knuckles right on top of the block, the block will disappear. But I wonder why won't it work if I don't use Debug mode
     
    Last edited by a moderator: Mar 31, 2010
  10. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    Haha, you such a liar. But whatever, you keep telling yourself that.
     
  11. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    So you want the life object removed when you touch it?
     
  12. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Yes. But here, the 1-UP actually replaces the W block because I had to sacrifice the original 1-UP block to make the 7th chaos emerald. And the W block is solid
     
  13. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    You may want to look at my post. It has nothing to do with animations.
     
  14. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Hanoch, we tried your method , and what happened, it worked only in Debug mode when I placed Knuckles right over the block and collected it
     
  15. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    I am pretty sure you did something else wrong. Try building a clean s1 ROM using my method and place a 1 up in the layout editor.
     
  16. Professor Neo

    Professor Neo Well-Known Member Member

    Joined:
    Nov 16, 2008
    Messages:
    103
    Location:
    United States
    Hanoch, not to get you confused, and sorry to all that I should have clarified more clearly, the 1-UP is actually the 7th chaos emerald in the hack and you can see why it is not flashing:


    [​IMG]


    I was following Cinossu's method for making the 7th emerald. And it had to be gray because it uses Sonic's palette. The Knuckles 1-UP block shown in the first post is actually the W block. The W block was originally solid--thus unremovable. So what I'm actually trying to accomplish here is making unused blocks such as the W block disappear upon being touched.
     
  17. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    970
    Location:
    United Kingdom
    Wouldn't it just be easier if you looked at the 1up block from a clean S1 Disasm?


    I mean, it has exactly what you're wanting--the code for deleting the object, and the code for giving you the extra life. It's a no-brainer, really.
     
  18. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    ok ok, heres what you should do... add an extra entry in the object pointer index, copy the code from the 6th emerald to the new object to make your 7th emerald then just use the normal 1 up code. Infact I am sooo sick of hearing about your bloody special stage i am going t have a play and see what I come up with !!!
     
    Last edited by a moderator: Apr 4, 2010
  19. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    You know what? ^ HE ^ makes an excelent point, and I agree with every word. Having it as a brand new object of its own (By adding an extra slot to the list), and simply copy/paste/modifying the code from the 6th emerald makes a lot of sense, that way you won't have to worry about the other objects being altered incorrectly. Soon SSRG will have all the technical stuff done for you, so sit back, relax, and watch the data run through!! =P
     
    Last edited by a moderator: Apr 4, 2010
  20. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    He didn't port Knuckles. Someone else did, just like everything in his hack.

    God damn WillJ, your full of so much bullshit aren't you? :p


    Are you trying to tell us that you did this whole special stage thing and fixed the bugs by yourself? Are... Are you serious?!


    So I guess you didn't use nineko's or Cinossu's code right? And Nicogens didn't help you at all with your Special Stage HUD right? And MarkeyJester, Hanoch, Selbi, Me, Deox, Alan, etc. didn't help you fix your special stage bugs right?!


    Are you retarded or something WillJ?! I hate your fucking arrogant attitude! What the hell man? You practically didn't do shit in this hack! You always get others to do the hacking for you! For crying out loud man, I've told you so many times to study ASM. But you always have half ass excuses or your just to lazy to learn. Do you even like sonic hacking? Because it sure doesn't look like it, since you barley do anything.


    Get it in you head WillJ, stop telling others to do you hack for you! And especially, stop taking credit of other people's work! But then again, what's the point? Your obviously going to do the same shit over and over again... *sigh*

    You don't know how many times I've told him this dude. =P


    Also, same here. I'm tired of your special stage help topics. This is your 8th one WillJ! Do you even try fixing the bugs yourself?! Obviously not...

    It's been working so far. =P
     
    Last edited by a moderator: Apr 5, 2010
Thread Status:
Not open for further replies.