Basic Questions and Answers Thread

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

  1. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,772
    Location:
    italy
    Please, feel free to address the problems with the Blue Balls program, I am the one who programmed it. If you have any doubts on how to use it, or if there is any actual problem or bug, please let me know, and I'll see if there's something I overlooked.


    By the way, dealing with the individual files for the 8 S&K stages is quite tricky, Blue Balls or not. Basically, it works like this. The data for them is indeed in Kosinski format, but they're saved all together. This means that if you extract the data from the S&K rom, you'll end up with a single binary file with Kosinski-compressed data, which can be extracted to a single binary file with uncompressed data, containing the 8 individual special stages juxtaposed one after the other. So, in order to put a custom special stage in S&K, you have to edit its individual data, reinsert it in the complete uncompressed binary file overwriting the previous data for that stage, recompress the complete file with Kosinski compression (good luck if it becomes bigger than before, since compression is unpredictable), and insert the new Kosinski-compressed file into the S&K rom.


    Not exactly trivial.
     
    Last edited by a moderator: Aug 7, 2014
  2. Arsen

    Arsen Active Member In Limbo

    Joined:
    May 16, 2014
    Messages:
    39
    Help me! i'am going to add super sonic in sonic 1, but  falls every time. What's going on??
     
  3. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    Thanks for the reply. Yes, "not exactly trivial" indeed. x'D ... still, I think it is worth another try. I will use the Sega Compressor and hex-edit the uncompressed binary "mish-mash" that results after converting the SK .bins. I will do it with the description you gave me (about the process) in mind. In terms of the unpredictability of the compression, I have an idea (and hope it works this way): Since the 8th Special Stage is basically unused/unseen in normal gameplay, if I turn them into just a bunch of zeros (or a 1 ball stage, if being "completable" is a requirement) maybe it won't surpass the default size. And even the 7th one (if a lot of zeros equals less space) could be a really empty/easy one, kinda like a bonus for the player... or something. x'P

    Anyway, this week will be a little harsh on me, work-wise (working on weekends...) but I will get to this as soon as I have some free time. Oh, and I will try to recreate the "glitch" that happened with Blue Balls, for debugging purposes. And while I am at it, thank you for creating the program! It makes editing faster and more appealing. (My only complain would be the window height, but that's only because my monitor is 768p... ^_____^)

    Cheers!
     
  4. Novedicus

    Novedicus Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    922
    Can you please give more detail about your issue?
     
  5. N30member

    N30member non-pro user btw Member

    Joined:
    Feb 15, 2014
    Messages:
    216
    Location:
    Kazakhstan
    [sarcasm] i wrote "nop" over 9000 times and also i has the branch for non-existent label [/sarcasm] +1 to Ralakimus.
     
    Last edited by a moderator: Aug 7, 2014
  6. Novedicus

    Novedicus Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    922
    I don't quite get what you're meaning by "+1 to Ralakimus".
     
  7. N30member

    N30member non-pro user btw Member

    Joined:
    Feb 15, 2014
    Messages:
    216
    Location:
    Kazakhstan
    I think that your post is just good (I can't explain why), so you gained some positive rep. =P
     
  8. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    What's the situation? I have a Super Sonic minus the Super Sonic Pallete cycle in my Sonic 1 hack.

    and can someone tell me where i can setup the super sonic flag in my sonic 1 hack to where Buzz Bomber's Missles, Bomb batniks, rotating spikes in GHZ would go right through Super Sonic? I don't want to use the invincibility flag due to a bug where after getting invincibility monitor, then going super, timer is out, super animations minus invincibility. I fixed this bug with the spikes though.
     
    Last edited by a moderator: Aug 7, 2014
  9. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    You guys are quite the helpful bunch, aren't you?

    You're going to have to give us more information, such as:

    What disassembly you're using

    What you did

    What 'fails'. Does it build? Are you getting errors?

    A basic outline of what you did to get to where you are (copied x and pasted it at y)
     
  10. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    I'm having some issues with my hack. I added a second Object position index, which for the most part functions perfectly, but when I try to go through Labyrinth zone and Scrap Brain Zone, the game crashes at seemingly random places in the level. Secondly, and more importantly, the game also crashes right before the Star Light Zone boss. I've tried unsuccessfully to fix the crash at scrap brain, but I have no idea why it crashes at the Star Light Zone boss, which is the only crash I can't avoid through level editing (i've heard the other crashes are caused by specific objects).
     
  11. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    You could be getting some sort of overflow. Is it specific objects?
     
  12. Pacca

    Pacca Why succeed when you can profit off of failure? Member

    Joined:
    Jul 5, 2014
    Messages:
    1,149
    Location:
    Triton (Moon)
    I know for a fact that the spinning platforms in Scrap Brain and the spears in Labyrinth reference the object layouts for some odd reason. I just don't know why and how they do it, and more importantly, how to fix them. I don't think the Star light zone boss does, however, so I couldn't fix that if I tried.
     
  13. Painto

    Painto Samodzierżca Najdłuższego Kija Member

    Joined:
    Mar 24, 2014
    Messages:
    315
    Location:
    Poland
    From what I see, LZ and SBZ1 have another object related thing. You should apply this fix to both of your position indexes, maybe it helps.
     
    Last edited by a moderator: Aug 9, 2014
  14. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    I have two questions.

    1. first off i've installed the MEGAPCM driver & have different music in different acts. I tried using Notepad++, when i accidently deleted some code (don't know which ones) I closed without saving & switch to Windows Notepad to make some edits that way. One day i used Notepad++, made changes, saved & come to find out, the code that was deleted from last time (I thought just like Windows Notepad changes wouldn't be saved if I chose not to save it. unfortunately) it stayed deleted & I corrupted the game. So I copy pasted overwritten with a backup which did not have the MEGAPCM driver nor different music in different acts. I made the changes & somehow now, when I pause, then unpause, it crashes. So i had to comment out the Pausegame code, leavint the label, a nop, & an rts to temporarily fix this bug. I can't pause now.

    2. With my Super Sonic in Sonic 1, I'm not using the invincibility flag due to a bug where after - hit an invincibility monitor,  invincible, then go super, invincibility timer expires, & not-so-super. So i'm setting up flags to fix this bug. Now the bug is fixed, however. Badniks are still destroyed on contact, Spikes have no effect, but - Buzz Bomber's missle, GHZ's rotating spikes, lava & fire & whatnot still hurt Super Sonic. Do I need to setup flags everywhere, or just one location and if so, where?
     
  15. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    Go here:


    Touch_Enemy: ; XREF: Touch_ChkValue
    tst.b ($FFFFFE2D).w ; is Sonic invincible?
    bne.s loc_1AF40 ; if yes, branch
    cmpi.b #2,$1C(a0) ; is Sonic rolling?
    bne.w Touch_ChkHurt ; if not, branch

    And change it to this:


    Touch_Enemy: ; XREF: Touch_ChkValue
    tst.b (super_sonic_flag_here).w ; Is Sonic in his Super form?
    bne.s loc_1AF40 ; If yes, branch.
    tst.b ($FFFFFE2D).w ; is Sonic invincible?
    bne.s loc_1AF40 ; if yes, branch
    cmpi.b #2,$1C(a0) ; is Sonic rolling?
    bne.w Touch_ChkHurt ; if not, branch

    Replace super_sonic_flag_here with your Super Sonic flag's address or equate name (depends on how you are referencing it).

    I'm pretty sure the invincibility flag is mentioned somewhere else, but not outside of Sonic's code. Am looking into this right now.

    EDIT: Found it again. Go to here:


    Touch_ChkHurt: ; XREF: Touch_ChkValue
    tst.b ($FFFFFE2D).w ; is Sonic invincible?
    beq.s Touch_Hurt ; if not, branch

    And change it to this:


    Touch_ChkHurt: ; XREF: Touch_ChkValue
    tst.b (super_sonic_flag_here).w ; Is Sonic in his Super form?
    bne.s loc_1AFE6 ; If he is, branch.
    tst.b ($FFFFFE2D).w ; is Sonic invincible?
    beq.s Touch_Hurt ; if not, branch

    Pretty sure that's the only other important point.
     
    Last edited by a moderator: Aug 9, 2014
  16. Novedicus

    Novedicus Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    922
    I'm not too sure, but I think it might have to do something with the encoding of the text. Notepad++ and Notepad use different character encoding and how it was encoded in Notepad may have done something to it. Again, I'm not too sure if I'm correct, correct me if I'm wrong. Instead of Notepad, use Wordpad, which supports the encoding that Notepad++ supports.
     
    Last edited by a moderator: Aug 9, 2014
  17. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    ThomasSpeedRunner i've done that already. Badniks are destroyed, can stand on spikes but missles, lava & fire (& other objects) still harm Super Sonic instead of passing on through

    Ralakimus I think what Notepad++ picks up where one leaves off if not saved. which is why i stick to Windows Notepad. in case something like this happened. Good thing for that backup... somewhat. Due to another error (crash after unpausing)
     
  18. Painto

    Painto Samodzierżca Najdłuższego Kija Member

    Joined:
    Mar 24, 2014
    Messages:
    315
    Location:
    Poland
    There's an easier way to fix this. Go to Obj01_ChkInvin: and above

    Code:
    		tst.b	($FFFFF7AA).w	
    		bne.w	Obj01_RmvInvin	; change to bne.w
    
    add
    Code:
    		tst.b	(Your_SS_flag).w	; is Sonic Super?
    		bne.w	Obj01_ChkShoes		; if yes, branch
    
    So if you turn Super after getting invincibility, if the timer expires, SS still will be invincible.
     
  19. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    Alright then, step two. If this line does not exist in your Super Sonic code, add it.


    move.w #0,$32(a0) 
    If you've equated invincibility time, then replace the $32 with whatever the equate name is.

    This is essentially a second Super Sonic flag since the invincibility code checks for this, as shown here:


    tst.w $32(a0) ; check time remaining for invinciblity
    beq.s Obj01_ChkShoes ; if no time remains, branch

    Thus, if Sonic is in his Super form, it skips subtracting 1 since it's already 0 and thus, invincibility should not be removed.

    ...and of course, someone posts before I can finish. Anywho, Painto's fix should work as well.
     
    Last edited by a moderator: Aug 9, 2014
  20. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    389
    Location:
    Town Creek, AL
    Painto. That worked. and Thomas I applied yours too to be on the safe side. Now there's only staying Normal after Hitting signpost. By the way, what is the piece of code for "is Sonic at the Signpost"?
     
    Last edited by a moderator: Aug 9, 2014