don't click here

Basic Questions & Answers thread

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

  1. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    If the level already has the maximum amount of chunks, you can either delete existing chunks that you aren't using (which will break any other layout that uses the same chunk set) and add new chunks to the end of the list, or edit existing chunks in-place.
     
  2. Jimmy Hedgehog

    Jimmy Hedgehog

    Member
    1,728
    8
    18
    England - Slough
    Getting the motivation to continue old projects
    Ah, alright, that's cleared things up then. Thanks!
     
  3. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Quick help needed. I wanna make the emerald jingle work like the Extra Life does, where the music fades back in afterward.


    Tried this in s1.sounddriver.asm:

    Code (Text):
    1.  
    2.  
    3. Sound_PlayBGM:
    4.         cmpi.b  #bgm_Emerald,d7     ; is the "extra life" music to be played?
    5.         beq.s   @bgmcont    ; if not, branch
    6.                 cmpi.b  #bgm_ExtraLife,d7       ; is the "extra life" music to be played?
    7.         bne.s   @bgmnot1up  ; if not, branch
    8.     @bgmcont:
    9.                 tst.b   f_1up_playing(a6)   ; Is a 1-up music playing?
    10.         bne.w   @locdblret  ; if yes, branch
    11.         lea v_track_ram(a6),a5
    12.         moveq   #9,d0   ; [(1 DAC + 6 FM) or (7 FM)] + 3 PSG
    13.  
    14. @clearsfxloop:
    15.  
     
  4. ValleyBell

    ValleyBell

    Tech Member
    246
    25
    28
    researching PC-98/X68000 sound drivers
    Making a song act like a 1-up jingle consists of two parts.
    Part 1 is what you have done already - make a save state of the level BGM.
    Part 2 is to make it restart the BGM after the jingle finishes. In order to make that work, you need to hex-edit the SMPS file. Search for the Track End flag ($F2) on the DAC track and replace it with the Fade In flag ($E4).
     
  5. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    Except doing it on the DAC track for the emerald jingle won't work, as it uses 6 FM channels — this would cause premature fade-in. You want to use the flag ValleyBell suggested, but at the end of another track.
     
  6. LovelyAyriana

    LovelyAyriana

    Member
    8
    0
    0
    AL
    So, I am trying to change the background of the Title Screen in Sonic 1 using SonEd2. I followed the guide to create the new files so that the game would call for the background I made rather than the Green Hill Zone background. I save the work that I have done in SonEd2 then build and test the game. Every time I test the game, the title screen has no background and neither does Green Hill Zone. What am I doing wrong?
     
  7. Devon

    Devon

    I'm a loser, baby, so why don't you kill me? Tech Member
    1,251
    1,421
    93
    your mom
    As some of you may know, I am working on a hack for Sega CD. I need help.

    I'm trying to add a 3D effect, like in Sonic CD's special stages, but I don't know how I'm going to get started with that. Can any of you give me pointers on 3D for Sega CD? I'm not looking for code, just how it works on Sega CD.
     
  8. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    The Mega CD has a custom ASIC graphics chip, the purpose of this chip is to supply it with the graphics, and scaline/rotation/repsosition information, and it'll process. It'll dump out the result graphics, which then need to be copied to the Mega Drive's VDP VRAM. This chip does not supply mappings data. You must supply this yourself and plan ahead ensuring the mappings are in VRAM in the appropriate place(s).
     
  9. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I've got a quick question regarding SonED2's image import feature. How come when I try to import an image, which I know uses the correct format and palette for the project, it only imports in tiles. The image is a simple 128x128 chunk and I am choosing to import chunks.

    Also, anybody know about LovelyAyriana's issue with the S1 title screen edit issue?
     
  10. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    I'm afraid I don't know what the cause of your issue is, probably a fault with SonED, you'd have to ask Stealth.

    As for LovelyAyriana's issue, there isn't enough information to provide an answer I'm afraid, there are too many possible occurances that could go wrong.

    • The width/height of the background is altered from the original.
    • The sep files have the wrong directories.
    • The link between GHZ and the title screen interferes.
    • The new files made following that guide aren't included or read correctly for the level (perhaps the guide is missing something or was incorrectly followed).
    • The scroll generating routines have been tampered with.
    No one answered, because we need more information. Perhaps a link to the guide followed, a pastebin of the code changed, the sep files that were used to open the files, etc.
     
  11. Clownacy

    Clownacy

    Tech Member
    1,061
    607
    93
    Alright, really basic question: Do any Mega Drive model support actual 60fps? My region-hacked-to-NTSC PAL Model 2 outfitted with a scart outputs an interlaced image on both the HDTVs I've tested it on. It's a little disheartening.
     
  12. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    That is actually expected; the TV standards were created in a time when everything was much slower than it is today. Black & white NTSC, for example, outputs a signal capable of generating 525 lines at a rate of 30fps; in order to accomodate the color carrier, the rate actually decreases to 29.97fps. These 525 lines are divided into 263-line ("even") and 262-line ("odd") fields, which are shown in an alternating fashion (even field = lines 0, 2, 4, ..., while odd field = lines 1, 3, 5, ...), first the even field then the odd field, and so on, so that you have one full image (composed of one even and one odd field) at 29.97fps. Thus you have one interlaced image every full NTSC frame (which is composed of one odd and one even field).

    To make things worse, only 483 of these lines actually make up the visible field, the remainder of which make up vblank; and the Genesis actually renders only 224 of these (filling the remainder with the background color instead) because these are the "safe" lines to render due to overscan in TVs.

    So how does the Genesis (or any other video game of that time) render at 60fps? Well, it doesn't, it renders at 59.94fps :v:

    But more seriously, it outputs one image at the odd field ("one frame"), and another image at the even field ("another frame"). The issue you are seeing is that the more stupid HDTVs today assume that all images rendered in those formats will be interlaced, so they deinterlace the even and odd fields, generating a mess of video game output. You should look if there is an option to toggle off deinterlacing and to double-up the lines in each field instead.

    Edit: some additional configuration options you may look for: half-sizing, line doubling.
     
  13. AkumaYin

    AkumaYin

    Member
    286
    6
    18
    So, I imported tiles into the tileset for Sonic 1's title screen using SonMapEd and spent, oh, I don't know, maybe half an hour fixing up the colors applied to these tiles. I then used PlaneED to map the tiles into the title screen, but all I get is this:

    [​IMG]

    Does anybody know what's causing this? I'm guessing it's a pattern load cue issue, but I can't be too sure.
     
  14. Clownacy

    Clownacy

    Tech Member
    1,061
    607
    93
    It just looks like your new art is too large, so it overwrites some of the other art in VRAM.
     
  15. `Ilio Huhu

    `Ilio Huhu

    Member
    11
    0
    0
    Sonic Generations (Volcano Valley)
    How can I rip a level model/geometry from Sonic Adventure 2? I can't find any programs or tutorials for that. At least, not into a file format that's editable by anything like 3DS Max.
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    SALVL from SA Tools can export to Wavefront OBJ.
     
  17. LoneDevil

    LoneDevil

    Eternal Underdog Member
    Is there any way to make a S3K hg disasm build Sonic 3 Alone and Blue Spheres rom alone? I'm only stuck with SonicandKnucklesStartup and last time I tried building a Blue Spheres rom ended up being incomplete. (with Hydrocity underwater palette at title screen)
     
  18. kazblox

    kazblox

    Member
    178
    27
    28
    Diassemblies and decompilations.
    I'm afraid not... The disassembly contains only data from the Sonic 3 portion and a small portion of code for screen events, you'd have to disassemble the entire S3 ROM to get the other code and data not used in S3K.
     
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    I made Blue Sphere Standalone ROM (which became Blue Sphere Plus) from the SVN/Hg/Git disasm. Or more accurately, I started from a blank file and pasted in all the necessary code until I got something that worked.
     
  20. Tiddles

    Tiddles

    Diamond Dust Tech Member
    471
    0
    0
    Leicester, England
    Get in an accident and wake up in 1973
    The simplest way to turn S&K into Blue Sphere is to change move.b #0,(Game_mode).w to move.b #$2C,(Game_mode).w at SonicAndKnucklesStartup. But this will give you the grey palette (perhaps the one you were referring to?) because the check to see if Sonic 1 is attached will fail, so it'll act like S&K plus some random ROM stuck on the end, I.e. a single Blue Sphere stage.

    The simplest way to get around that is to replace the call to sub_4CCA6 just after BlueSpheresTitle with a call to loc_4CCDC, thereby skipping over the header checks and running the initialisation for the full S&K+S1 version directly.

    If you want to skip the "No Way" text, you can also add the following in SonicAndKnucklesStartup:

    Code (Text):
    1.  
    2.         jsr (loc_4CCDC).l
    3.         move.b  #1,($FFFFFFA1).w
    4.         move.w  #1,(Player_option).w
    5.  
    The move to $FFFFFFA1 is the key point here, but setting this will cause some other code to be skipped (including within loc_4CCDC), as entering BlueSpheresTitle with this set causes it to assume everything's already been initialised, as if you're coming back from playing a stage.

    Everything should now work, but obviously you'll be carrying around the rest of S3&K in your ROM; it's up to you if you want to clean that out, start from zero, or just leave it be.

    (For what it's worth, if you want to build just S&K with Sonic3_Complete enabled, you can just move.w #1,(SK_alone_flag).w during initialisation - it'll still have the S3 data attached, so it's not super useful when you can just build the bit-perfect S&K, but that's all you need to do to tell the game it's S&K alone.)

    As kazblox says, all that remains of the original Sonic 3 in the S3&K disassembly is the necessary data and code referenced by S3&K to run its levels (and a visible Tails etc.) in S3&K. To build an accurate Sonic 3, there's no other real choice than disassembling the original, but it's possible to create something that acts broadly like Sonic 3 on top of S3&K, with the benefit of S3&K's bugfixes; the main things you're missing are the ending and credits (including Sonic's Big Arm transition and behaviour) and unique object layouts, which use different object IDs, just to make life more interesting.