don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Ok, I added new art to my hack, loaded the game, SEGA screen comes up, sonic team presents, then a pink, then blue screen, game frozen. Anybody know why this happens and how to fix it?
     
  2. Spanner

    Spanner

    The Tool Member
    Did you compress the art in the correct format? If not, that's why it's crashing.
     
  3. oh crap, I just remembered, I just saved it in artnem and ran build.bat.

    stupid me.
     
  4. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Right, this is really puzzling me.

    I'm trying to get a code, so that at the end of Act 3, it wouldn't play the regular 8E music. Instead it would play E9. This is my code:

    Code (ASM):
    1.         cmpi.b  #$2,($FFFFFE11).w ; is the current act act 3?
    2.         beq.s   EndOfZone_Music
    3.         move.w  #$8E,d0
    4.         jsr (PlaySound_Special).l ; play end-of-level music
    5.         lea ($FFFFD000).w,a1
    6.         moveq   #0,d0
    7.         move.w  #$7FF,d1
    8.  
    9. EndOfZone_Music:
    10.                 move.w  #$E9,d0         ; Set to musicE9
    11.                 jsr (PlaySound_Special).l ; play end-of-zone music
    12.                 lea ($FFFFD000).w,a1
    13.         moveq   #0,d0
    14.         move.w  #$7FF,d1
    Sadly this isn't working. Any ideas?
     
  5. First of all you've put your code in the wrong place (inside the Special Stage end routine), and secondly the code is wrong. All you need to do is go to loc_ECD0 and change
    Code (ASM):
    1.         move.w  #$8E,d0
    2.         jsr (PlaySound_Special).l ; play "Sonic got through" music
    to
    Code (ASM):
    1.         move.w  #$8E,d0
    2.         cmp.b   #2,($FFFFFE11).w    ; is this act 3?
    3.         bne.s   @playmusic      ; if not, branch
    4.         move.w  #$E9,d0
    5.  
    6. @playmusic:
    7.         jsr (PlaySound_Special).l ; play "Sonic got through" music
     
  6. Phoenix

    Phoenix

    Has really been far even as decided to use even go Member
    Sorry to take so long to reply, but what are the references, where would I find them, and what would I change them to?
     
  7. Aquaslash

    Aquaslash

    <The Has-been Legend> Moderator
    There's one in the Pattern Load Cues file. Both GHZ, and the ending use the two files.

    You'll also need to find the include for the graphics and add the merged file.
     
  8. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    Well, I'm trying to get a monitor to half the amount of rings you have (as Tweaker suggested XD), but I'm having a problem with the coding.
    I am aware that I need to bit shift right, but for some reason, the code I've used freezes the game upon hitting the monitor. Code:
    Code (Text):
    1. lsr.w   $FFFFFE20
     
  9. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Looks like you didn't address RAM correctly, so it's trying to modify ROM space. You want to try something like the following:
    Code (ASM):
    1.     lsr.w   #1,($FFFFFE20).w    ; divide number of rings in half
    ...which should take care of it. Don't forget to update the ring counter after you modify the ring total.
     
  10. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    Well, I tried that, and I got this:
    [​IMG]
     
  11. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Oh hell... forgot you couldn't shift a RAM address.

    Okay, just change it to this:
    Code (ASM):
    1.         moveq   #0,d0   ; clear d0 (for posterity)
    2.         move.w  ($FFFFFE20).w,d0    ; move current number of rings to d0
    3.         lsr.w   #1,d0   ; divide number of rings in half
    4.         move.w  d0,($FFFFFE20).w    ; apply new ring amount
    Then it should work.
     
  12. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    Well, it builds, but now it's gone back to freezing upon monitor breaking. I can't figure out why =/
     
  13. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    How can I make an object use the second palette line?
     
  14. Noega

    Noega

    Member
    1
    0
    0
    Is there any way of adding new palettes to Sonic 1?

    I did this:

    First I added new lines in _inc\Pallet pointers.asm , so now the last 6 lines look like this:
    Code (Text):
    1.     dc.l Pal_Ending
    2.     dc.w $FB00
    3.     dc.w $1F
    4.     dc.l Pal_NEW
    5.     dc.w $FB00
    6.     dc.w 7
    Then I went to sonic1.asm, and I added a new line in the "Pallet data" section
    Code (Text):
    1.     Pal_Ending: incbin  pallet\ending.bin; ending sequence pallets
    2.     Pal_NEW:    incbin  pallet\new_pallet.bin
    And then, when I want to load this pallet instead of the Sonic's one (its a new character's pallet) I change "moveq #3,d0" (Sonic's pallet) for "moveq #14,d0" (New pallet. It's number 14h on the pallet's list)

    But when using the new character, It's black. The pallet didn't load.

    Is there any other change to do? Maybe there's a line somewhere that says the number of existing pallets, so the game doesn't try to load any pallet greater than #13

    I tried changing the "Level select" pallet for my new pallet and using it when needed and it works perfectly.

    Thanks.
     
  15. Doesn't the checkpoint use the second palette line? You could check that out.
     
  16. Aquaslash

    Aquaslash

    <The Has-been Legend> Moderator
    mappings
     
  17. Or art_tile - adding $2000 to the art_tile value makes it use the next palette line, I.e. $0474 would use palette line 0, $2474 would use palette line 1, $4474 would use palette line 2, and $6474 would use palette line 3.
     
  18. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I was wondering how I could go about extending the amount of monitor boxes that can be used. If I place a monitor with a property of 28 0A 08, the monitor will load, but it's art will not,

    also, after it's destroyed, Sonic seems to moonwalk backwards.

    EDIT: THAT was an error in the coding.
     
  19. Spanner

    Spanner

    The Tool Member
    Is there any way to make a level load a different life icon than the usual? I guess this could probably extend to other art loading as well.
     
  20. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Yeah, set up checks for the levels, and depending on what level it is, branch to load a different life icon, that should work.