More Hacking Issues

Discussion in 'Discussion and Q&A Archive' started by CS2612, May 19, 2015.

  1. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    Hello, all.

    Well, i must really be bad at hacking. There's 2 problems i need help with in my Sonic 1 hack:

    1. The title screen is all fucked up, but the results differ depending on whatever causes it. Here's my latest result:

    [​IMG]

    How the fuck am i supposed to fix this?

    2. Whenever i place a checkpoint, it turns up as passed (red) when i reach it. Why the hell does this happen, and how can i fix it for good? Also, this happens with any Sonic 1 or 2 disassembly with any checkpoint.

    As you can probably tell, i'm pretty miffed. I just want my damn hack to work for once without any problems.
     
  2. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    For your first problem I remember seeing a fix for this somewhere on here but can't seem to find it anywhere ATM so can't help there i afraid. as for your second problem assuming that you are using SonED2, have you tried changing the flags on which checkpoint is being passed? that may the problem unless you did something differently that is.
     
  3. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    I guess that's another thing I should improve on for the object definitions. You need to set the checkpoint's subtype in order. So the first checkpoint in the level is subtype 01, the next is 02, etcetera. Also, make sure that Remember State is set, otherwise you get a nasty case of S2REV00 WFZ, where after hitting one checkpoint, the others appear activated as well.
     
    Last edited by a moderator: May 19, 2015
  4. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    Blazer, I guess i should have clarified. I use SonLVL, not SonED2.

    Clownacy, i'll look into that.
     
  5. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    The title screen issue is usually caused by fiddling around with Sonics' spawnpoint in GHZ act 1. I'm not quite sure why, but changing that makes the title screen freak out; the only way I know to fix it is to make Sonic spawn in his original position.
     
  6. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    Ha, I'm not having any of that. What silly design to limit someone like that. It's a bit of a workaround instead of a fix, but I think this should suffice:

    Open _inc/LevelSizeLoad & BgScrollSpeed.asm (whichever revision you're using), and go to LevSz_StartLoc. Above it, add this:

    Code:
    TitleLoc:	;	obX, obY
                    dc.w	$50, $3B0
    Then, after the 'lsr.w #4,d0', add this:

    Code:
                    lea	TitleLoc(pc),a1			; Load Title Screen spawn location
                    cmpi.b	#id_Title,(v_gamemode).w	; Are we on the Title Screen?
                    beq.s	LevSz_SonicPos			; If so, set the start position using the loaded spawn location
    This should make enough sense. GM_Title sets the current level to GHZ act 1, then uses a subroutine that grabs the spawn position depending on the current level. This just gives the Title Screen a unique location, that won't change no matter what level it sets itself to.
     
    Last edited: Jan 18, 2016
  7. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    Clownacy, could you give me some more info on where exactly to put those codes? I have tried what you said and after saving the disass. in SonLVL and "Building and Running" it, my emulator tells me that the ROM can't be opened.
     
  8. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    What disassembly are you using? Clownacy's code is for the Git disassembly.
     
  9. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    The Git dissassembly.
     
  10. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    I'll keep the 'you didn't have to -1 him' comments to myselfonlynotreally.

    Couldn't you have given us the error log? It's sonic.log or errors.txt, depending on your assembler, if you didn't know.

    You'll want to open the ASM file LevelSizeLoad & BgScrollSpeed.asm (or LevelSizeLoad & BgScrollSpeed (JP1).asm if you're using REV01), which is in the _inc folder. In it, find the label LevSz_StartLoc. Above it, insert TitleLoc and its dc.w. Then, under the label LevSz_StartLoc, you'll find the instruction 'lsr.w #4,d0'. Immediately after that, insert the other block of instructions.
     
    Last edited by a moderator: May 21, 2015
  11. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    Well, there's my answer. I wasn't using the ASM file with JP1 in it. After i get some time, i'll tell you how it goes.
     
  12. CS2612

    CS2612 FamiTracker Trash Member

    Joined:
    Jan 23, 2015
    Messages:
    94
    Location:
    Scranton, PA
    Well, sorry for the wait, but i decided to just put Sonic back in his original position. Good 'nuff for me.

    Now, here's something different: after editing GHZ3, and placing a whole new set of objects, the objects loaded by the level are that of the original setup. For example, cliffs and rings in the ground, random enemy encounters, and monitors in the air. What the flyin' fuck is going on now?