Basic Questions & Answers thread

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

  1. Azu

    Azu

    I must be stupid. Member
    Not sure where this goes, but is there a unburnt Angel Island Hack? Not just a palette hack, but like the tiles replace or something.
     
  2. GT Koopa

    GT Koopa

    Member
    2,010
    7
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    HEY

    HEY

    SOMEBODY HELP THIS GUY


    Explain it better than what I have done please. I want him to get to the level higher than palette hack.
     
  3. nineko

    nineko

    I am the Holy Cat Tech Member
    6,040
    243
    43
    italy
    I know that we can't really copyright names, but he called his Zone 7 "Metallic Base Zone", like one of the zones in Megamix. How original :|
     
  4. Kiajinn

    Kiajinn

    is a Badnik Battery Member
    34
    0
    0
    Sleeping Egg Zone
    16 Bit: Sleeping Egg Zone (Sonic Chaos)
    Does anyone happen to know how I could go about creating a copy of Sonic CD PC
    with a modified Soundtrack (International)?

    I currently have the soundtrack ready and waiting in MP3 format and the correct track order.
    And a Rip of one of my two copies of the CD, on in .ISO and one in .mdf / .mds (I forget which Alcohol format is the image...)

    It's really just a case of working out how to edit the ISO or the burn order I guess...

    So yeah any hints Chaps?
     
  5. GT Koopa

    GT Koopa

    Member
    2,010
    7
    18
    Elgin, IL
    Flicky Turncoat DX, T.L.W.S. Vs M.G.W.
    Well I would say the guy probably didn't know, but he has a video of Megamix right on his youtube account. Should I tell him?
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    6,040
    243
    43
    italy
    Ask Tweaker, he might be fine with that guy using the same zone name. Personally, I wouldn't mind too much if someone copied a zone name from my hack.
     
  7. Selbi

    Selbi

    The Euphonic Mess Member
    1,485
    10
    18
    Northern Germany
    Sonic ERaZor
    It's just a name. Megamix' zone names aren't copyrighted, now are they? However, that doesn't mean it's perfectly legit either. Not because of stealing names, but because it shows that this guy is unoriginal, since he wasn't even able to think of own names.
     
  8. Kiajinn

    Kiajinn

    is a Badnik Battery Member
    34
    0
    0
    Sleeping Egg Zone
    16 Bit: Sleeping Egg Zone (Sonic Chaos)
    With no disrespect to Tweaker, Metallic Base isn't exactly the most inspired Zone title ever either.
     
  9. 'Burnt Angel Island' is actually Act 2—which uses a completely different tileset than Act 1.

    I suppose it would be possible to change the palette and swap the cycling palettes to Act 1's, but the BG would need to be drawn over. It's possible, just a bit of work!
     
  10. theocas

    theocas

    Tech Member
    346
    0
    16
    So, I'm writing a magical hack that contains SRAM code by the masses, and I plan to actually run this on real hardware at some point, so I have a few SRAM questions for all of you SRAM and hardware gurus:

    - What's really the best way to figure out if your SRAM save is still perfectly delicious and hasn't been tampered with, etc? Should I do it S3k style and just check for a single value and assume everything will be OK if it is, or do a full-blown checksum (like the ROM checks for when it's ran) and store that in 2 places of the SRAM and check the entire SRAM against it whenever I try and read from it? I'd like to try the latter approach, but I'm not sure how optimized in terms of CPU cycles used that could get.
    - How would I go and decide if the SRAM is available in the first place? I guess if I do a write to the first byte of SRAM (which I guess I can use as a flag to indicate if the SRAM has been initialized or something) and then read it back, and if I get the same value back assume SRAM is present? There's this one game that does this to check against piracy, but I can't really figure out how to do this, though.
    - Last, but not least - I had this insane idea of compressing the data I write to SRAM. Would this really give me much of an advantage? I'm thinking to allow the user to give their slots a custom name that's like 16 or 24 characters, but I doubt I can really compress this down much.

    Anyways, thanks for any responses, I appreciate it.
     
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,586
    190
    43
    SonLVL
    For Blue Sphere Plus, I use a longword value "BLUE" at the start of SRAM. First it checks if it's already there, if it is, SRAM already exists and works. If it's not, it writes it, then reads it back. If it doesn't match, SRAM is disabled. If it matches, continue initializing SRAM.
    Code (Text):
    1.         move.b  #1,($A130F1).l      ; enable SRAM
    2.         lea ($200003).l,a1      ; base of SRAM + 3
    3.         movep.l (a1),d0     ; load magic number
    4.         cmpi.l  #"BLUE",d0
    5.         beq.s   SRAM_Exist
    6.         move.l  #"BLUE",d0
    7.         movep.l d0,(a1) ; write magic number
    8.         movep.l (a1),d0     ; load magic number
    9.         cmpi.l  #"BLUE",d0
    10.         beq.s   +
    11.         move.b  #0,($FFFFFE20).w ; disable SRAM usage
    12.         bra.s   SRAM_Exist
    13. +       ; initialize other stuff here
    14. SRAM_Exist:
    15.         move.b  #0,($A130F1).l      ; disable SRAM
    16.         clr.b   ($FFFFFEC6).w
     
  12. TheBarAdmin

    TheBarAdmin

    Member
    107
    0
    16
    [​IMG]

    Is it possible to have both of these effects in the same parts of the background? I was messing around with SwScrl_EHZ, but so far no luck.
     
  13. MarkeyJester

    MarkeyJester

    A D V A N C E Resident Jester
    2,092
    222
    43
    Japan
    Yes, it requires a slight additional calculation though, I've written up a quick example here:

    Code (Text):
    1.         lea (WaveLines).l,a0            ; load array of wave lines address
    2.         moveq   #$02,d0                 ; prepare +2
    3.         add.w   (WaveTimer).l,d0            ; load and increase wave timer
    4.         andi.w  #SizeOfWaveline,d0          ; keep in range (depending on how big your array is and that it remains withing a multiple of 2, 4, 8, 10, etc)
    5.         move.w  d0,(WaveTimer).l            ; update timer for next frame
    6.         adda.l  d0,a0                   ; advance to correct starting line based on timer
    7.         lea (HScrollBuffer).l,a1            ; load H scroll buffer address
    8.         move.w  (ScreenFGXPosition).l,d2        ; load FG X position
    9.         neg.w   d2                  ; negate to reverse direction
    10.         swap    d2                  ; send to left side of d2
    11.         moveq   #$00,d0                 ; clear d0
    12.         move.w  (ScreenBGXPosition).l,d0        ; load BG X position
    13.         neg.w   d0                  ; negate to reverse direction
    14.         swap    d0                  ; send to left side (right side can be used for fractions)
    15.         move.l  d0,d1                   ; copy to d1
    16.         asr.l   #$04,d1                 ; get 1/10th of the current X position (speed of each line change)
    17.         move.w  #$00DF,d7               ; set repeat times (number of scanlines)
    18.  
    19. DeformLine:
    20.         swap    d0                  ; align d0
    21.         move.w  d0,d2                   ; move to d2 as BG position
    22.         swap    d0                  ; realign d0 to normal
    23.         add.l   d1,d0                   ; add fraction for next scanline
    24.         add.w   (a0)+,d2                ; add current wave line position
    25.         move.l  d2,(a1)+                ; save to buffer
    26.         dbf d7,DeformLine               ; repeat for each scanline
    27.         rts                     ; return (finished)
    The formular and theory here would appear to be something on the lines of "((ScreenBGXPosition+((ScreenBGXPosition/10)*ScanlineNumber))+((WaveLines+(WaveTimer+ScanlineNumber))))=Scanline", sorry if it seems too complexe, I hope this gives you the basic idea though.
     
  14. Sambo

    Sambo

    Member
    9
    0
    0
    Why can't I edit Hill Top Zone in Sonic 2 with SonLvl? When I select the level, the program crashes and says "Value cannot be null."

    And another thing. How do you get those curved tunnels that Sonic rolls down to not look garbled?
     
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,586
    190
    43
    SonLVL
    Because of something I did a while back, and I haven't tested HTZ since. I have fixed it now.

    As for the second, if you mean in EHZ, you'll have to rearrange a bunch of art; if you mean in SonED2, I don't think you can unless you manually merge the art and block files (SonLVL loads both).
     
  16. Sambo

    Sambo

    Member
    9
    0
    0
    I downloaded the SVN revisions that were supposed to fix HTZ and the newest version of SonLvl, and I still can't edit the level without a crash. Is there something else I'm supposed to download?
    Nevermind. I just didn't fix the shortcut on my taskbar before I tried to use the program again. My bad.
     
  17. Azu

    Azu

    I must be stupid. Member
    Two question.
    [​IMG]


    What object ID this is?

    Also, how can I add custom art? I want to replace the gravity sphere (ID EC) with some actual art, it's just and invisible force in game.
     
  18. theocas

    theocas

    Tech Member
    346
    0
    16
    How are you compressing your art? S3 and S3k use Kosinski and KosinskiM for a lot of art, so Nemesis might not work for the spheres, but I haven't yet checked.
     
  19. Azu

    Azu

    I must be stupid. Member
    I haven't added anything yet. I want to how do it, or if there's a guide.
     
  20. theocas

    theocas

    Tech Member
    346
    0
    16
    Oh, in that case, import art, Nemesis (since I know how NemDec works =P) and load it to a VRAM address. Give the said object a mapping, and tell it where to find VRAM tiles and presto. I'm not much knowledgeable in how this works in S3, but I'm sure it's somewhat close to how you'd do it in any other Sonic hack. Once I get my homework done as well as some other stuff I'll try and take a look at it if you still need more help =P