don't click here

Basic Questions & Answers thread

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

  1. SephyUK

    SephyUK

    WHY SO CURIOUS? Member
    597
    0
    0
    Qatar
    Some Freakishly Long Anime
    Make sure you have S1.bin (an untouched S1 rom) and that there is an S1.txt file with offsets, which is used by split.bat to split the rom into seperate files.

    Also, do you mind just taking a screenshot of the folder it is kept it? That will help, I think.
     
  2. You have to change the bankswitch pointers ($FBC in an S3 savestate, $FD9 in an S&K savestate) and the music pointers (savestate locations in Tweaker's guide). I'm in a bit of a hurry right now so can't explain much, but anyway, here's a Sonic 3k savestate using Sonic 3's sound bank for tunes which are different in the two.
     
  3. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    Here's the screenshot of the folder....it looks like it has everything that's needed.....[​IMG]
     
  4. amphobius

    amphobius

    doing more important things with my life Member
    2,120
    0
    16
    life
    Use split.bat, it will get the disASM to get to it' full potential, like this:
    [​IMG]
     
  5. OK so, I've been trying to add a credits screen to my hax, using 1. different text (of course) 2. different pallette, 3. different music and 4. a different font.

    OK Only the different pallette and different music work, and I don't know why the hell it is.

    First, here's my messy code. Ignore the shitty labels.

    Code (Text):
    1. Title_ChkLevSel:
    2.         btst    #4,($FFFFF604).w; check if B is pressed
    3.         bne.w   Fucknuts; if so, goto credits screen
    4.         tst.b   ($FFFFFFE0).w; check    if level select code is on
    5.         beq.w   PlayLevel; if not, play level
    6.         btst    #6,($FFFFF604).w; check if A is pressed
    7.         bne.w   Levsel; if so, goto levelselect
    8.         beq.w       PlayLevel    ; if everything else fails, play the fucking level
    9.  
    10. Levsel:
    11.         move.b #0,d0
    12.         move.b #0,d1
    13.         move.w #0,a5
    14.         move.w #0,a6
    15.         lea ($C00000).l,a6
    16.         move.l  #$50000003,4(a6)
    17.         lea (Art_Optn).l,a5
    18.         move.w  #$28F,d1
    19. Bumsex:
    20.         move.w  (a5)+,(a6)
    21.         dbf d1,Bumsex; load uncompressed text patterns
    22.         moveq   #2,d0
    23.         bsr.w   PalLoad2; load level select pallet
    24.         move.b  #$94,d0 ; play menu music
    25.         bsr.w   PlaySound_Special
    26.         lea ($FFFFCC00).w,a1
    27.         moveq   #0,d0
    28.         move.w  #$DF,d1
    29.         jmp Title_ClrScroll
    30.  
    31. Fucknuts:
    32.         move.b #0,d0
    33.         move.b #0,d1
    34.         move.w #0,a5
    35.         move.w #0,a6
    36.         lea ($C00000).l,a6
    37.         move.l  #$50000003,4(a6)
    38.         lea (Art_Optn).l,a5
    39.         move.w  #$28F,d1
    40. LoadText:
    41.         move.w  (a5)+,(a6)
    42.         dbf d1,LoadText; load uncompressed text patterns
    43.         moveq   #3,d0
    44.         bsr.w   PalLoad2; load level select pallet
    45.         move.b  #$99,d0 ; play menu music
    46.         bsr.w   PlaySound_Special
    47.         lea ($FFFFCC00).w,a1
    48.         moveq   #0,d0
    49.         move.w  #$DF,d1    
    50.  
    51.  
    52. Title_ClrScroll2:
    53.         move.l  d0,(a1)+
    54.         dbf d1,Title_ClrScroll2; fill scroll data with 0
    55.  
    56.         move.l  d0,($FFFFF616).w
    57.         move    #$2700,sr
    58.         lea ($C00000).l,a6
    59.         move.l  #$60000003,($C00004).l
    60.         move.w  #$3FF,d1
    61.  
    62. Title_ClrVram2:
    63.         move.l  d0,(a6)
    64.         dbf d1,Title_ClrVram; fill  VRAM with 0
    65.  
    66.         bsr.w   LevSelTextLoad2
    67.         jmp LevelSelect
    68.        
    69. Title_ClrScroll:
    70.         move.l  d0,(a1)+
    71.         dbf d1,Title_ClrScroll; fill scroll data with 0
    72.  
    73.         move.l  d0,($FFFFF616).w
    74.         move    #$2700,sr
    75.         lea ($C00000).l,a6
    76.         move.l  #$60000003,($C00004).l
    77.         move.w  #$3FF,d1
    78.  
    79. Title_ClrVram:
    80.         move.l  d0,(a6)
    81.         dbf d1,Title_ClrVram; fill  VRAM with 0
    82.  
    83.         bsr.w   LevSelTextLoad
    84.         jmp LevelSelect
    85.  
    86. Goawayfgt:
    87. ; ---------------------------------------------------------------------------
    88. ; Level Select
    89. ; ---------------------------------------------------------------------------
    90.  
    91. LevelSelect2:
    92.         move.b  #4,($FFFFF62A).w
    93.         bsr.w   DelayProgram
    94.         bsr.w   LevSelControls
    95.         bsr.w   RunPLC_RAM
    96.         tst.l   ($FFFFF680).w
    97.         bne.s   LevelSelect
    98.         andi.b  #$F0,($FFFFF605).w; is  A, B, C, or Start pressed?
    99.         beq.s   LevelSelect; if not, branch
    100.         move.w  ($FFFFFF82).w,d0
    101.         cmpi.w  #$14,d0 ; have you selected item $14 (sound test)?
    102.         bne.s   load; if not, go to Level/SS subroutine
    103.         move.w  ($FFFFFF84).w,d0
    104.         addi.w  #$80,d0
    105.         tst.b   ($FFFFFFE3).w; is Japanese Credits cheat on?
    106.         beq.s   LevSel_NoCheat; if not, branch
    107.         cmpi.w  #$9F,d0 ; is sound $9F being played?
    108.         beq.s   LevSel_Ending; if yes, branch
    109.         cmpi.w  #$9E,d0 ; is sound $9E being played?
    110.         beq.s   LevSel_Credits; if yes, branch
    111.         jmp Goon
    112.  
    113. load:
    114.         jsr LevSel_Level_SS2
    115.         rts
    116.  
    117. Goon:
    118.        
    119.         jmp LevSel_NoCheat
    120.  
    121.  
    122.  
    123. LevelSelect:
    124.         move.b  #4,($FFFFF62A).w
    125.         bsr.w   DelayProgram
    126.         bsr.w   LevSelControls
    127.         bsr.w   RunPLC_RAM
    128.         tst.l   ($FFFFF680).w
    129.         bne.s   LevelSelect
    130.         andi.b  #$F0,($FFFFF605).w; is  A, B, C, or Start pressed?
    131.         beq.s   LevelSelect; if not, branch
    132.         move.w  ($FFFFFF82).w,d0
    133.         cmpi.w  #$14,d0 ; have you selected item $14 (sound test)?
    134.         bne.s   LevSel_Level_SS; if not, go to  Level/SS subroutine
    135.         move.w  ($FFFFFF84).w,d0
    136.         addi.w  #$80,d0
    137.         tst.b   ($FFFFFFE3).w; is Japanese Credits cheat on?
    138.         beq.s   LevSel_NoCheat; if not, branch
    139.         cmpi.w  #$9F,d0 ; is sound $9F being played?
    140.         beq.s   LevSel_Ending; if yes, branch
    141.         cmpi.w  #$9E,d0 ; is sound $9E being played?
    142.         beq.s   LevSel_Credits; if yes, branch
    And so on.

    All labels exist and stuff, and it's loading different music and pallette, but the Text is identical and the font too.

    Please help :thumbsup:
     
  6. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
  7. Run split.bat from a command prompt window, so that you can see what error it's giving.
     
  8. RandomAvatarFan

    RandomAvatarFan

    Sonic Slide and Punch! Member
    100
    0
    16
    Yozora
    Actually, I figured out what the problem was, I had the names wrong.

    I named the s1.bin "s1.bin.bin" and the s1comb.asm "s1comb.asm.asm" Qjimbo had said to make sure the extentions were showing, so I renamed them so that the "extentions" would show. I deleted the extras and ran split.bat and it split and built perfectly.
     
  9. Twilight

    Twilight

    Member
    51
    0
    6
    Michigan
    A Sonic the Hedgehog hack
    I tried the save state. That's what I wanted to do with the music. How do you make it permanent, ingame?
     
  10. Mairtrus

    Mairtrus

    Get a load of this!! Tech Member
    27
    0
    0
    Mendoza, Argentina
    Sonic Z. The Z DOESN'T means nothing.
    Well, thanks to shobiz's post I could partially solve my problem, but now I have another similar problem. Any frame that uses tiles that have an index equal to or greater than $800, begins to load them from the tile 0, but the others are loaded fine. How I can solve this?
     
  11. Archonn

    Archonn

    Member
    3
    0
    0
    tl;dr -- There's a value in a RAM address I wanna display on the HUD. How do I do that?


    So I've sort of ported the "Link" feature from Sonic: Time Attacked into Sonic 2. The problem is that I don't really know much about hacking, and stuff so far was mostly doable because honestly was more of a "read ASM guides, insert counters" basic thing. I thought I should try asking around here before I move on to the next step, which is, taking the Link counter I have on RAM and displaying it along with score, time and rings. Like, is there a guide around for messing with the HUD? Do I have to worry about VRAM? Where's a good place to start when it comes to adding new art? I'll have to do this because the game does not have the letters l and k of that yellow font used in the rest of the HUD, right?

    http://www.filefactory.com/file/1843f5/n/s2ramlink_bin -- This is the very, very basic stuff I have so far. If you wanna play with it, make sure you have a emulator with RAM Watch (the Gens from Tasvideos.org has it), and watch address 00FFFAFC, 4 bytes.

    One last question... Anybody ever did this? I can't really believe I'm the first to do it.
     
  12. DNX

    DNX

    ... Eh. Member
    161
    33
    28
    I have a problem with the BG scrolling, I replaced EHZ's code with MTZ's to keep the entire BG still, but this is the result:
    [​IMG]

    Some help would be appreciated.
     
  13.  
  14. Twilight

    Twilight

    Member
    51
    0
    6
    Michigan
    A Sonic the Hedgehog hack
    I've got another quick question. How do you disable the beginning and end of level title cards in Sonic 1?
     
  15. STE

    STE

    Member
    221
    0
    16
    Wha, why would you want to do that? >__>

    Anyway, I can think of a cheap way, just delete the Title card art (Basicly, open up the Title Card art in artnem, and delete the Blue ball and Letters), but if there is some sort of way through ASM, that would be alot more reasonable. :P
     
  16. MKAmeX

    MKAmeX

    Member
    279
    0
    16
    California
    Needlemouse, Sonic Boom, Graphic Design
    How would one go about changing Sonic's start position? I'm changing a layout in Marble zone, but I can't find any way to move him to the new position, basically, he dies as soon as the level starts. =P
     
  17. STHX

    STHX

    SEGAAAAAAAAA?!? Member
    1,809
    3
    18
    The world of Trophies
    Sonic In Mushroom Kingdom
    All right, this is the most stupid question ever, but how can I register a video with an emulator?
    Suppose I want to record a video and I want to put it on youtube. I know Kega can't log movies, but Gens can? And if yes, how does it work?
    If Gens can't, can anyone direct me to the right emulator?
     
  18. Spanner

    Spanner

    The Tool Member
    Gens Movie Test

    Instructions and the download for this modified version of Gens is in that article on the wiki.
     
  19. Twilight

    Twilight

    Member
    51
    0
    6
    Michigan
    A Sonic the Hedgehog hack
    I have my reasons. Either I want to do that or extend the lengths of the title card names. I'd prefer extending the lengths of the title card names instead of disabling them.

    Edit!: I want to know how to do both, though!