don't click here

Basic Questions & Answers thread

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

  1. Tweaker

    Tweaker

    Banned
    12,387
    3
    0
    The tiles disappearing is due to there being too many sprites on the same scanline. This is probably a result of your new title card mappings, assuming that you edited the mappings to add more fragments to the title card.

    Making separate life icons is as simple as making a compare before the PLC ID is moved to d0 and LoadPLC is called. What you'll want to do is, before the PLC ID is moved, check against the character, and if you're using Metal Sonic you'll want to branch to a separate bit of code that loads the Metal Sonic life icon instead.
     
  2. Dark Sonic

    Dark Sonic

    Member
    14,632
    1,632
    93
    Working on my art!
    I thought the tiles were disappearing because of something like that. Is there anyway to fix this? (Yes extra tiles were added to the signpost to account for Metal Sonic) Would removing something from the end of act point tally thing fix the problem (Like the Total Score thing. That's not necessary as it's in the top left anyways.
     
  3. Spanner

    Spanner

    Zzz... Member
    3,384
    192
    43
    United Kingdom
    Falling asleep for once
    OK, I'm coding a monitor which would take you to another zone & it's act so if you hit the monitor in Emerald Hill Zone 1, you'd go to Chemical Plant Zone 1.
    I tried using Misc_9454 & get the levels from there but it always gives me a wrong number of operands error.
    Code (ASM):
    1.  
    2. zone_monitor:
    3.    cmpi.w  $D00 ; is the level EHZ1?
    4.    beq GoTo_CPZ1 ; if yes, branch.
    Of course, I'm just hiding what it's real purpose will be.
     
  4. nineko

    nineko

    I am the Holy Cat Tech Member
    6,421
    585
    93
    italy
    Of course you have a wrong number of operands, cmpi needs two values to compare them :p
    If that was Sonic 1, you'd have to do cmpi.w #$D00,($FFFFFE10).w
    Not sure about Sonic 2, but I seem to recall it's FFFFFE10 there as well

    edit: I just checked it. Yes, the location is FFFFFE10. But EHZ1 isn't $D00, it's $000.
    $D00 is CPZ1, which is your destination, not your source, from what I gathered from your post.
     
  5. Jenna

    Jenna

    Yeah, I'm that sexy. Oldbie
    83
    0
    0
    America
    level layouts, life
    If I remember my last brush with ASM and Sonic's engine, it's

    if level = ehz
    set level = cpz 1
    clear starpost counter
    jump to restart level code

    I could be wrong, but I believe that's all you really need to do to get it working.
     
  6. SMTP

    SMTP

    Tech Member
    This right here is all you need:

    Code (ASM):
    1.         move.b  #$08,($FFFFFE10).w  ; Starpost level change
    2.         move.b  #1,($FFFFFE02).w            ; Reload level
     
  7. Spanner

    Spanner

    Zzz... Member
    3,384
    192
    43
    United Kingdom
    Falling asleep for once
    You really are awesome.
    Thanks, I'll do the rest this myself (it's not a plain old zone monitor you see).
     
  8. Dark Sonic

    Dark Sonic

    Member
    14,632
    1,632
    93
    Working on my art!
    So do I want something like this?
    Code (ASM):
    1.  
    2. LoadPLC2:
    3.        
    4.         movem.l a1-a2,-(sp)
    5.         cmpi.b  #$01, ($FFFFFFFE)
    6.         bne.s   SonicLoadPLC2
    7.         lea (MArtLoadCues).l,a1
    8.         bra.s   ContLoadPLC2
    9. SonicLoadPLC2:
    10.         lea     (ArtLoadCues).l,a1
    11. ContLoadPLC2:
    12.         add.w   d0,d0
    13.         cmpi.b  #$01, ($FFFFFFFE)
    14.         bne.s   SonicLifeIcon2
    15.         lea (Nem_MLives).l,a0
    16.         bra.s   ContLoadPLC22
    17. SonicLifeIcon2:
    18.         lea     (Nem_Lives).l,a0
    19. ContLoadPLC22:
    20.         move.w  (a1,d0.w),d0
    21.         lea (a1,d0.w),a1
    22.         bsr.s   ClearPLC
    23.         lea ($FFFFF680).w,a2
    24.         move.w  (a1)+,d0
    25.         bmi.s   loc_15D8
    26.  
    27. loc_15D0:
    28.         move.l  (a1)+,(a2)+
    29.         move.w  (a1)+,(a2)+
    30.         dbf d0,loc_15D0
    31.  
    32. loc_15D8:
    33.         movem.l (sp)+,a1-a2
    34.         rts
    35.  
     
  9. Tweaker

    Tweaker

    Banned
    12,387
    3
    0
    Yes, that should work. I'll admit I only skimmed over it, though. =P
     
  10. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    I was following Qjimbo's guides to Split Dissassemblies. I had it all set up exactly as it was written, and then I went onto the next guide about basic level editing. I opened up SonEd2 and when I tried loading Marble Zone the SonEd2 screen just came up blank, while the Status Screen said that everything it tried loading couldn't be loaded. Does anyone know what I might need to do? It's probably so obvious, but being new to hacking I'm not seeing it. If you know what might be needed to be done, please help.
     
  11. The only thing I can think of is that you forgot to split your ROM, although if you followed the guide step-by-step I don't know how that could have happened.
     
  12. Jayextee

    Jayextee

    Unpopular Opinions™ Member
    3,297
    92
    28
    Atro City
    I DONE MAKED GAMES.
    Be a little more specific. You are loading up the correct .sep file, right? There is a link to the project files on the disassemblies page.
     
  13. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    I was opening up the mz1.sep file. And yes, I remembered to split the file.
     
  14. In which case it sounds like a path problem. Your project files are inside <your disassembly directory>\project right? If they're inside any other folder it won't work.
     
  15. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    Yes they are...and I took a point of it of making sure none of the folders had more than 8 letters or spaces

    "C:\SonEd\s1h\project" Is that correct?
     
  16. muteKi

    muteKi

    Fuck it Member
    7,941
    170
    43
    Maybe the files that you've got aren't the same titles as what SonED2 is looking for? Since you seem to have used a split disassembly to create the project files, odd are that the project files weren't renamed properly.

    For example, the disassembly produces files with little more than the zone name for the filename in each folder, while SonED2 naming also includes the original offsets and such in filenames.
     
  17. Octrox

    Octrox

    Banned
    8
    0
    0
    GreyStone
    Project Basic
    Hi, I recently downloaded the Sonic 2 game, and IcyHexEplorer. When I followed the tutorial on Sonic Retro's HomePage, I came across a problem when I tried to run the game on the emulator.

    I entered some values onto the hex editor of the Sonic Rom, then I saved it. When I tried to run the Rom, I was unable to play the game, and a red screen popped up on the Emulator screen.

    Anyway you could help me out? I reall want to start hacking with the Sonic Game.
     
  18. Qjimbo

    Qjimbo

    Your friendly neighbourhood lemming. Oldbie
    Checksum checksum checksum.

    That red screen is caused by the checksum being incorrect, you can bypass it's check by going into your emulator options and ticking "Auto fix checksum".

    Also I recommend you also take a look at my split disassembly guides, you might find those more intuitive.
     
  19. Octrox

    Octrox

    Banned
    8
    0
    0
    GreyStone
    Project Basic
    Yeah, after I made a topic about this I saw the other topic that answered this question. :P But thanks.
     
  20. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    Could be. In the guide it showed him opening up a file named mz1.sep, but if it's not working for me, how do I change the titles (I know click "rename" but what is the format for titles that SonEd2 uses?)