Basic Questions and Answers Thread

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

  1. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I tried putting some commands to set the zone and act back to green hill 1, but it only works if Sonic dies, which only happens when you hit eggman one last time the camera pans up and sonic dies but otherwise he's stuck.

    So i tried telling the game to run the "Sonic Got Through" routine but it takes me back to GHZ Act 2 instead of Act 1.
     
  2. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    Hmmm.. I might now what's your problem..    You might actually have this:   


    Code:
    move.w    #$001,($FFFFFE10).w 
    
    Just to make you know, 00 is act 1, 01 is act 2, 02 is act 3 and 03 is act 4 (Which is only used in SBZ3, aka LZ4). Change the "01" to "00" and it'll take you to act 1.
     
  3. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I already had it set that way. And it still takes me to act 2 of Green Hill Zone after the score total is done.
     
  4. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    I don't think you have to set FE10 at all, as I said in my post, the level order is stored in a file. It is possible that by setting the level number to 0000 by hand, the engine loads the "next level" for GHZ1, which is GHZ2.
     
  5. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    If I take away move.b #$0,(v_zone).w and move.b #$0,(v_act).w  the game goes to the sega screen after the score is done. Setting the game mode to level doesn't do anything either. I tried to set the level to SBZ act 3 (Final Zone) but the game does the illegal instruction error and pressing C will get it to load GHZ 1 but the Title Card doesn't display the Act number and when the level starts it says "Line 1111 Emulator $000070F0.
     
  6. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    I have a question about the Sonic Team presents screen in Sonic 1, I'm trying to expand the time issued for that event, but can't seem to accomplish this without running the timer of the actual title screen short. Which subroutine am I supposed to change to get the results I expect to reach? I'm using the Sonic one two-eight disassembly if this helps out.
     
  7. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    Sonic Team Presents screen doesn't have an actual timer. As soon as the palette fades in, the game gets busy decompressing art, chunks, blocks and mappings for the title screen and VDP is just displaying a static image. This screen fades out as soon as the processor finishes loading data for the title screen -- there's no frame counter for that. This takes long enough to display Sonic Team Presents text properly, and the fact all consoles are clocked to 8 MHz rate guarantees it will take the same amount of time on every machine, so developers just relied on CPU's speed instead of coding a timer.

    The same thing happens on the title cards in every Sonic game: when they are displayed, the game is actually busy decompressing art for level. It takes a few seconds before the level fades in. And again, no timers, everything depends on the processor's speed.

    All these tricks are done mainly to disguise loading times, and Sonic games did extremely well in that regard -- would anyone guess they actually exist in Sonic games back then? I'm pretty sure they put Sonic Team Presents screen there mainly not to let the player watch a black screen for a few seconds. In Sonic 2 and 3, as they switched to Kosinski compression instead of heavy Nemesis one, they reduced loading times even more (hence the shorter title cards), as Kosinski allowed times more faster decompression.

    Speaking of Sonic Team Presents screen, it's not too easy to implement there a timer properly. Interrupts are disabled as soon as the screen fades in, which means, you can't count the frames anymore. You have to disable ints because the game calls NemDec routines there to decompress the art into VRAM immediately (not by using Pattern Load Cues system, which decompresses a lot slower, but allows for games logic to be executed along with decompression).

    All you can do without redoing things from the ground up is to put an extra screen loop there to hold that screen for extra few frames. Something like that:

    Code:
    	 	; load GHZ 256x256 mappings
    		lea	(Blk256_GHZ).l,a0
    		lea	($FF0000).l,a1
    		bsr.w	KosDec
    		bsr.w	LevelLayoutLoad
    		
    		;++ Extra loop
    		moveq	#2*60-1,d7		; hold it for 2 more seconds
    	@loop:	move.b	#2,$FFFFF62A		; VBlank routine #2
    		jsr	DelayProgram		; wait for VBlank
    		dbf	d7,@loop		; repeat for the given number of frames
    
    		bsr.w	Pal_FadeFrom
    
     
  8. Dark Lips

    Dark Lips Well-Known Member Member

    Joined:
    Nov 14, 2008
    Messages:
    293
    Location:
    Wolverhampton UK
    Hello ladies and gentlemen, I need a little help - I have my working knuckles in sonic 2 and it loads and plays great.... however the dust when knuckles slides along the ground is not present so my question is is it a seperate object and how do I get it to display? Thank you in advance my friends.
     
  9. StephenUK

    StephenUK Working on a Quackshot disassembly Member

    Joined:
    Aug 5, 2007
    Messages:
    1,026
    Just gonna take a wild guess here since you only showed the animation scripts and not the surrounding area, but your waiting script has an uneven number of bytes. Add a 0 after the 6 and see if that helps. If you have already used an "even" command after that particular script, then disregard. This may not be the problem but I do remember animation scripts fucking up for me when the number of bytes was uneven.
     
  10. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Yeah no change but thanks for trying, didnt think anyone would after a while, actually.

    Edit: and when in the air while skating, hitting the wall changes Shadow to his roll animation.
     
    Last edited by a moderator: Jun 13, 2013
  11. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    It sounds like a dumb question but what's the best way to edit palletes. I already tried realtime pallete editor but it doesn't work when I export it into the game. (colors are all wrong)
     
  12. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    SonED2 is your friend.
     
  13. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    What program do you suggest along with Soned2? I tried doing a simple hue edit that changed Spring Yard Zone's pallete to a more dark green-ish color and saved it to the same file I exported from Soned2 but no change?

    I'm using Gimp 2.8.4
     
  14. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    Try HivePal. I use that to edit single palette files that SonED2 can't edit.
     
  15. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    That's the thing; you don't need to use any other program. Reason being, SonED2 can automatically save a palette to the same file as the file in the original disassembly---all you have to do is make your palette change, then go to "File --> Save Project", like so (like before with DEZ, this is an example, yours may look slightly different depending on what level you're editing):

    [​IMG]

    And you click it. This will automatically save any existing files mentioned in the project file and create any mentioned files that weren't already created (and put them in the correct directory), and palettes are mentioned in the project files, so it shouldn't be an issue.
     
  16. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    When up saved the palette did you save all the slots or just the bottom 3 rows, because if you saved all the colors, your saving the character palette and the level palette together which screws up the whole palette for the level??
    Edit: Which is what happened to me when I saved the water palette, which is all 4 lines, not just the 3.
     
    Last edited by a moderator: Jun 14, 2013
  17. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    Actually I had a derp moment. While using Electroball's advice I found out the reason why my palletes from realtime pallete editor never worked.

    I exported the second and third pallete lines instead of Line 1,2,3 (Line 0 is for Sonic).
     
  18. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    "My Post above yours"


    Thought so. =p
     
    Last edited by a moderator: Jun 14, 2013
  19. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    <grammar nazi>


    While that we're learning things:

    "you're"
    "palette"
    </grammar nazi>
     
    Last edited by a moderator: Jun 14, 2013
  20. SaunicBoom

    SaunicBoom Well-Known Member Member

    Joined:
    Sep 14, 2007
    Messages:
    324
    Everyone knows the best way to edit palettes is by hand in hex. ;)