don't click here

Basic Questions & Answers thread

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

  1. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
  2. Total loser question, but really need to figure it out:

    How do I open these art files in an art editing program? (please say which program)

    signpost art
    starpoll art
    title screen art
    badnik art
    title card before act starts and when finishes

    :) - Mason

    EDIT: I love the edit button.
     
  3. Spanner

    Spanner

    The Tool Member
    SonMapEd
    SCHG_How-to:Use_SonMapEd/Part_1
    SCHG_How-to:Use_SonMapEd/Part_2
    Most art files'll have mappings that can be read on SonMapEd, in Sonic 1 it's /_maps/ usually & /mappings/sprite for S2 2007 disasm. Usually it's the same name as the object so if the art file was the art of an enemy called Obj26, it'll be obj26.asm or obj26.bin in most cases.
     
  4. GasparXR

    GasparXR

    I'm back! Member
    Okay guys, I got the speed shoes effect to wear off, but now I can't seem to get the music back. What I tried is checking the zone number to determine which song to play. I just get errors and the build fails. D=

    View attachment 2362

    This is Obj01_ChkShoes and everything I added below it. And yes, I fixed Obj2E_ChkShoes so it points here, otherwise the effect would last forever. If anyone could help me with this, I would greatly appreciate it.
     
  5. Um, can't you just copy-paste the code the invincibility check uses to resume level music?
     
  6. GasparXR

    GasparXR

    I'm back! Member
    Code (Text):
    1. Obj01_PlayMusic:
    2.   lea (MusicList2).l,a1
    3.   move.b (a1,d0.w),d0
    4.   jsr (PlaySound).l; play normal music
    You mean this?

    If so, it looks like it could work. But I'm gonna change it do Music List 1 because FZ won't resume it's music with MusicList2 I don't think.

    EDIT: I tried it and didn't work. And yes, I did move the data in $FFFFFE10 to d0 in case you're wondering, it's just like what Obj01_ChkInvin does.
     
  7. Not just that, this entire sequence
    Code (ASM):
    1.         moveq   #0,d0
    2.         move.b  ($FFFFFE10).w,d0
    3.         cmpi.w  #$103,($FFFFFE10).w ; check if level is SBZ3
    4.         bne.s   Obj01_PlayMusic
    5.         moveq   #5,d0       ; play SBZ music
    6.  
    7. Obj01_PlayMusic:
    8.         lea (MusicList2).l,a1
    9.         move.b  (a1,d0.w),d0
    10.         jsr (PlaySound).l   ; play normal music
    and if you change MusicList2 to MusicList1 you'll have to add a level check for FZ as well.
     
  8. GasparXR

    GasparXR

    I'm back! Member
    I tried it too. I'm still getting errors. =\

    Maybe it's this? (The first line is part of Obj01_ChkShoes):

    Code (Text):
    1. bra.s   ChkBgm
    2.                
    3. ChkBgm:      moveq #0,d0
    4.                 move.b ($FFFFFE10).w,d0
    5.                 cmpi.w #$103,($FFFFFE10).w; check if level is SBZ3
    6.                 bne.s ChkBgm_PlayMusic
    7.                 moveq #5,d0; play SBZ music
    8.                
    9. ChkBgm_PlayMusic: lea (MusicList2).l,a1
    10.                   move.b (a1,d0.w),d0
    11.                   jsr (PlaySound).l; play normal music
     
  9. The bra.s ChkBgm is the problem - get rid of it, it's completely unneeded.
     
  10. GasparXR

    GasparXR

    I'm back! Member
    Oh yay, it works now. Thanks alot, I don't know where I'd be right now without this topic. =P

    Now I'm going to add the level check for FZ, I shouldn't have any problems, seeing as I know how to do it from Nineko's guide.
     
  11. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    Will deformation routines from Sonic 1 v2 work in Sonic 2?

    Also, I think I've figured out how to edit Sonic 2's title cards, or rather, make it a lot easier. It's covered in the wiki (SCHG:Sonic_2/Text_Editing), but who reads the wiki anyway? :( Seriously, though, this makes things a fair bit easier.
    Just copy this over everything from LoadTitleCard, until the nop before JmpTo2_NemDec.
    Code (Text):
    1. LoadTitleCard:                   ; ...
    2.                  bsr.s  LoadTitleCard0
    3.                  moveq  #0,d0
    4.                  move.b (Current_Zone).w,d0
    5.                  move.b TitleCardData(pc,d0.w),d0
    6.                  lea    EHZ_TitleCard(pc),a0
    7.                  lea    (a0,d0.w),a0
    8.                  move.l #$7BC00002,d0
    9.          
    10.          loc_157EC:                  ; ...
    11.                  move   #$2700,sr
    12.                  lea    (Level_layout).w,a1
    13.                  lea    (VDP_data_port).l,a6
    14.                  move.l d0,4(a6)
    15.          
    16.          loc_157FE:                  ; ...
    17.                  moveq  #0,d0
    18.                  move.b (a0)+,d0
    19.                  bmi.s  loc_1581A
    20.                  lsl.w  #5,d0
    21.                  lea    (a1,d0.w),a2
    22.                  moveq  #0,d1
    23.                  move.b (a0)+,d1
    24.                  lsl.w  #3,d1
    25.                  subq.w #1,d1
    26.          
    27.          loc_15812:                  ; ...
    28.                  move.l (a2)+,(a6)
    29.                  dbf    d1,loc_15812
    30.                  bra.s  loc_157FE
    31.         ; ---------------------------------------------------------------------------
    32.          
    33.          loc_1581A:                  ; ...
    34.                  move   #$2300,sr
    35.                  rts
    36.         ; End of function LoadTitleCard
    37.          
    38.         ; ===========================================================================
    39.          
    40.          Title_A:    equ 4
    41.          Title_B:    equ $404
    42.          Title_C:    equ $804
    43.          Title_D:    equ $C04
    44.          Title_F:    equ $1004
    45.          Title_G:    equ $1404
    46.          Title_H:    equ $1804
    47.          Title_I:    equ $1C02
    48.          Title_J:    equ $1E04
    49.          Title_K:    equ $2204
    50.          Title_L:    equ $2604
    51.          Title_M:    equ $2A06
    52.          Title_P:    equ $3004
    53.          Title_Q:    equ $3404
    54.          Title_R:    equ $3804
    55.          Title_S:    equ $3C04
    56.          Title_T:    equ $4004
    57.          Title_U:    equ $4404
    58.          Title_V:    equ $4804
    59.          Title_W:    equ $4C06
    60.          Title_X:    equ $5204
    61.          Title_Y:    equ $5604
    62.          
    63.          TitleCardData: dc.b EHZ_TitleCard-EHZ_TitleCard ; 0
    64.                  dc.b EHZ_TitleCard-EHZ_TitleCard ; 1
    65.                  dc.b EHZ_TitleCard-EHZ_TitleCard ; 2
    66.                  dc.b EHZ_TitleCard-EHZ_TitleCard ; 3
    67.                  dc.b MTZ_TitleCard-EHZ_TitleCard ; 4
    68.                  dc.b MTZ_TitleCard-EHZ_TitleCard ; 5
    69.                  dc.b WFZ_TitleCard-EHZ_TitleCard ; 6
    70.                  dc.b HTZ_TitleCard-EHZ_TitleCard ; 7
    71.                  dc.b HPZ_TitleCard-EHZ_TitleCard ; 8
    72.                  dc.b EHZ_TitleCard-EHZ_TitleCard ; 9
    73.                  dc.b OOZ_TitleCard-EHZ_TitleCard ; 10
    74.                  dc.b MCZ_TitleCard-EHZ_TitleCard ; 11
    75.                  dc.b CNZ_TitleCard-EHZ_TitleCard ; 12
    76.                  dc.b CPZ_TitleCard-EHZ_TitleCard ; 13
    77.                  dc.b DEZ_TitleCard-EHZ_TitleCard ; 14
    78.                  dc.b ARZ_TitleCard-EHZ_TitleCard ; 15
    79.                  dc.b SCZ_TitleCard-EHZ_TitleCard ; 16
    80.                  dc.b EHZ_TitleCard-EHZ_TitleCard ; 17
    81.                  
    82.          EHZ_TitleCard: dc.w Title_M,Title_R,Title_A,Title_L,Title_D,Title_H,Title_I; 0   ; ...
    83.                  dc.w -1                 ; 7
    84.          MTZ_TitleCard: dc.w Title_M,Title_T,Title_R,Title_P,Title_L,Title_I,Title_S; 0   ; ...
    85.                  dc.w -1                 ; 7
    86.          HTZ_TitleCard: dc.w Title_H,Title_I,Title_L,Title_T,Title_P,-1; 0; ...
    87.          HPZ_TitleCard: dc.w Title_H,Title_I,Title_D,Title_P,Title_A,Title_L,Title_C; 0   ; ...
    88.                  dc.w -1                 ; 7
    89.          OOZ_TitleCard: dc.w Title_I,Title_L,Title_C,Title_A,-1; 0; ...
    90.          MCZ_TitleCard: dc.w Title_M,Title_Y,Title_S,Title_T,Title_I,Title_C,Title_A; 0   ; ...
    91.                  dc.w Title_V,-1             ; 7
    92.          CNZ_TitleCard: dc.w Title_C,Title_A,Title_S,Title_I,Title_G,Title_H,Title_T; 0   ; ...
    93.                  dc.w -1                 ; 7
    94.          CPZ_TitleCard: dc.w Title_C,Title_H,Title_M,Title_I,Title_A,Title_L,Title_P; 0   ; ...
    95.                  dc.w Title_T,-1             ; 7
    96.          ARZ_TitleCard: dc.w Title_A,Title_Q,Title_U,Title_T,Title_I,Title_C,Title_R; 0   ; ...
    97.                  dc.w -1                 ; 7
    98.          SCZ_TitleCard: dc.w Title_S,Title_K,Title_Y,Title_C,Title_H,Title_A,-1; 0; ...
    99.          WFZ_TitleCard: dc.w Title_W,Title_I,Title_G,Title_F,Title_R,Title_T,Title_S; 0   ; ...
    100.                  dc.w -1                 ; 7
    101.          DEZ_TitleCard: dc.w Title_D,Title_A,Title_T,Title_H,Title_G,-1; 0; ...
    102.       ; ===========================================================================
    So... what does this do? It's a simple copypaste from Puto's Sonic 2 & Knuckles disassembly. It makes specifying the tiles to load easier, because you don't have to mess around with those nasty hex values. For editing the actual mappings, see the wiki page... or read on! Use your favourite debugging emulator... alright, Gens KMod or something... and take a VRAM dump while the title card is on screen. Then simply load that and the mappings into SonMapEd, and you will be able to edit your title cards relatively easily!
    This pointless guide brought to you by roxahris.
     
  12. In SonMapED when I import a new sprite, everything goes well, but anything that was black is now transparent.

    Fixes?
     
  13. FraGag

    FraGag

    Tech Member
    If a palette line has the same color more than once, like Sonic's palette line in Sonic 1, you should change one of them before exporting the sprite. A guide on the wiki suggest to change the first black (which is transparent in-game) to some pink. Make sure the same color is still in the palette loaded in SonMapEd so the program can match the colors in the bitmap to the correct palette entries.
     
  14. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Hey guys, I don't know if this is the right place to ask. But I need some help trying to get this .one unpacked from Shadow the Hedgehog. It contains really really simple debug models (just 5 .dff files, cubes, spheres, etc), and I kinda want to get them out of this .one file for an article I'm doing on the wiki. The problem is, the current .one unpackers only unpack for Sonic Heroes for PC.

    Help if you can, thanks. I'm still trying to figure out how to get the damn thing unpacked as I type this.

    I attached the file I want to get unpacked. You can grab it here.
     
  15. Ok, thanks, another question, I want to edit an object in SonMapED, load the art, but how will I know out what object it is? Cant remember the folder name, inside is stuff like obj26, stuff like that. Any one know where I can identify them?
     
  16. FraGag

    FraGag

    Tech Member
  17. What palette line does knuckles use in s3k when you're sonic and tails? Second? I can't seem to figure this one out (Some colours seem off :S )
     
  18. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    Like for the fight in HPZ? It's the second. Actually, it's always the second with either of them.
     
  19. Alright.. then I was right =P