don't click here

Basic Questions & Answers thread

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

  1. vladikcomper

    vladikcomper

    Tech Member
    209
    150
    43
    Sonic Warped
    It's all the same sort of recording, just a different output format.

    None of emulators can separate music from sfx simply because the sound chip has no idea if the instrument it's playing is a part of music or certain sound effect.
     
  2. Beltway

    Beltway

    The most grateful Sonic fan of all time this week Member
    1,665
    182
    43
    Sega of Darkest Peru
    Artwork and classes
    Alright then, thanks for clarifying.
     
  3. Thorn

    Thorn

    Tech Member
    335
    19
    18
    Home
    Sonic 2 Retro Remix
    ^ I figure I should stop procrastinating and give you an answer: I haven't provided the song despite reading your posts because I'm personally dissatisfied with how it came out, so I feel uncomfortable spreading it around. The song starts with orchestra hits on PSG, an immediate sign that the channel distribution is all kinds of wrong. :P

    Are you looking for my particular mix, or simply the song? It's easy enough to listen to the source material.
    1996 mix
    2006 mix
    Alternate mix from both games (differences are minor enough to not link both versions)
    I ripped the data for my mix of the song from the Sonic Pinball Party version, then filled in the missing notes by ear.
     
  4. RetroKoH

    RetroKoH

    Member
    1,670
    29
    28
    Project Sonic 8x16
    I was doing a little studying of the Sonic 1 disassembly. (Sprucing up some of the info in the Sonic 1 SCHG... namely with filling in missing info and making corrections, especially with the Object Pointer Table)

    On the Object Pointer table, there is an offset listed for mappings and code. Now... I've been looking through and verifying the offsets, and while some needed corrections, or were flat out missing... there were others that seemed correct.

    Now, my question is... if I look in the RAM while playing Sonic 1, and browse through an object's data in the RAM, WHY does the data shown for variable obMap (OST bytes $04-07) NEVER match the offset where I am finding the mappings data??? Can someone help me out here?

    e.g. in the clean HG rom. I played and the mappings offset for Sonic is $211E2, yet in the Object Pointers table it says $21292. It is at $21292 that I see the hex values match up. Before those hex value in the ASM, there are pointers and labels, an example shown below
    Code (Text):
    1.  
    2.  
    3. Map_Sonic:
    4.  
    5. ptr_MS_Null:    dc.w MS_Null-Map_Sonic
    6. ptr_MS_Stand:   dc.w MS_Stand-Map_Sonic
    7. ptr_MS_Wait1:   dc.w MS_Wait1-Map_Sonic
    8. ptr_MS_Wait2:   dc.w MS_Wait2-Map_Sonic
    9. ptr_MS_Wait3:   dc.w MS_Wait3-Map_Sonic
    10. ...
    11.  
    12. MS_Null:    dc.b 0
    13. MS_Stand:   dc.b 4          ; standing
    14.         dc.b $EC, 8, 0, 0, $F0
    15.         dc.b $F4, $D, 0, 3, $F0
    16.         dc.b 4, 8, 0, $B, $F0
    17.         dc.b $C, 8, 0, $E, $F8
    18.  

    is the first part with the pointers ALSO in the hex code? If so, then the mapping variable in the RAM may make more sense, and the Object Pointers table will need A LOT of fixing! (Which I can do)... just need some clarification... if someone could do so...
     
  5. vladikcomper

    vladikcomper

    Tech Member
    209
    150
    43
    Sonic Warped
    Objects pointers point to objects' code offsets, not mappings offsets.

    I don't see why you need to fix pointers and how you're going to do it. The assembler always gets pointers right, if it didn't, the game simply would unable to function ;)

    As for your question about mappings format, these are relative (not absolute) offsets. Basically, they show how far (in bytes) the specified label is from the beginning of mappings data (file).
     
  6. RetroKoH

    RetroKoH

    Member
    1,670
    29
    28
    Project Sonic 8x16
    I see where I misspoke... I meant the OST for mappings in an object's code. Not the Object Pointer table.

    I was confused about the mappings offset shown in the SCHG for Object Editing, compared to the mappings offset shown in the RAM...
    I think you just answered my question though... Much thanks Vladikcomper
     
  7. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,652
    70
    28
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    http://info.sonicretro.org/SCHG_How-to:Port_Sonic_1's_Sound_Driver_to_Sonic_2

    This guide is proving to be a pain in the ass. No matter how many times I start over, or how many errors I fix, whether I use the driver files included, or the Clone Driver, I get lots of errors, everytime. Is anything wrong with this guide? No matter what I seem to do, just seem to have problem after problem.

    Edit: I've been using the 2007 xenowhirl disassembly.
     
  8. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    10
    18
    United Kingdom
    YouTuber
    Looks fine to me. What errors are you getting? Can you post a snip-it of errors?
     
  9. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,652
    70
    28
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    Well, it turns out I was using an SVN disassembly, causing more errors due to the different constants. However, applying the guide to a clean xenowhirl disassembly results in the game hanging at the Sega Screen like so:
    [​IMG]
     
  10. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    10
    18
    United Kingdom
    YouTuber
    I'm out at moment (on mobile) so cant search but I'm sure there's another quick guide about fixing the SEGA screen when importing the sound driver somewhere on SoniRetro's SHCG
     
  11. ValleyBell

    ValleyBell

    Tech Member
    246
    25
    28
    researching PC-98/X68000 sound drivers
    How did you get it to really compile? The included S1 Sound Driver.asm is so broken that it just gave me a few errors at first.

    Fix 1 - search for the first and last label of this code block and replace the code with this:
    Code (ASM):
    1. loc_71B82:
    2.         lea ($FFF000).l,a6
    3.         clr.b   $E(a6)
    4.         tst.b   3(a6)       ; is music paused?
    5.         bne.w   loc_71E50   ; if yes, branch
    6.         subq.b  #1,1(a6)
    7.         bne.s   loc_71B9E
    8.         jsr sub_7260C(pc)
    9.  
    10. loc_71B9E:
    11.         move.b  4(a6),d0
    12.         beq.s   loc_71BA8
    13.         jsr sub_72504(pc)
    14.  
    15. loc_71BA8:
    Fix 2: Search for loc_71CAC:, the comment after the rts is supposed to be
    Code (ASM):
    1. ; End of function sub_71C4E
    Fix 3: The asm file is 1 MB huge - that's because there's a lot of garbage at the end. Just search for EndofRom: and remove the label (s2.asm has it already) and everything after it.

    Also, there are 2 typos in the guide: The underwater palette address is $FFFFF080 and has to be changed to $FFFFFA80. (And there's also $FFFFF000 and $FFFFF0E0.)
    (After having written this all, I noticed that this is partly mentioned in the How-to's discussion page.)

    Using the files from the Sonic 2 Clone Driver would probably be a better choice, btw. It saves you the trouble of fixing all sound effects.
    One SFX in the S2 clone driver package had a bad pointer that crashed the ROM though. I forgot which one it was, but IIRC it was used in DEZ.
     
  12. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,652
    70
    28
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    Yeah, everything above, I've tried. I noticed the errors in the driver asm file, and the address typos. Tried the Sonic 2 Clone Driver too, but it all comes down to hanging at the sega screen everytime I get it to build. =/

    Edit: Turns out the Xenowhirl disassembly I downloaded is the problem. Just attempted a clean build, and it's still hanging at the sega screen. Hoping a re-download should solve this. =P

    Edit2: Redownload didn't solve. However, it did answer my question, as I noticed the whole "Rev01" thing. God damn, splitting a rev01 rom has solved the problem. :D
     
  13. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,652
    70
    28
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    One more quick question, are there any files that convert binary to asm? I'm having issues with some BINCLUDEs claiming files don't exist (that do exist!). It's quite the pain with large binaries, but converting to ASM is working on smaller files, just pasting the hex code after "dc.b" commands.
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,758
    341
    63
    SonLVL
    Is it looking for files in the wrong folder? IIRC AS only searches the current directory (the folder with build.bat) by default, and files in other directories must have relative or absolute paths, even if an included asm file is in a different folder.
     
  15. Glisp

    Glisp

    That one weird guy that does stuff. Member
    1,278
    1
    16
    Bloomington, IN
    None at the moment I'm afraid.
    So I have another sonic heroes related question. Okay, I've notices that there's some files in the sound directory called .pac files. My question is, how do I extract their contents? There's some character voices that aren't in the main file and would probably be in these which is why I'm asking. is there a program for that sort of thing? Nevemind figured it out. I decided to do another google search and this little gem from here on retro came up:
    http://forums.sonicretro.org/index.php?showtopic=25559
     
  16. Elektro-Omega

    Elektro-Omega

    Mushroom Hill'in Member
    400
    2
    0
    UK
    -
    Hey Retro,

    I am having a slight problem with Sonic 1 Rebook audio. I wanted to burn an iso which works with custom audio (obviously) but no matter what I do, it gets stuck on the Sega CD boot screen and I seem to be making a lot of clutter files on my computer.

    I tried reading the thread and wanted to look at the example audio CD but the link is dead.

    Does anyone have a good tutorial which explains how to burn it and get it to run or an example project that I can extract, replace and repackage?

    Thanks
     
  17. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    Okay, I have very little experience with Disassembly editing. I've already managed to figure out a few things, mainly coding things. Well, I have Xenowhirl's Sonic 2 final disassembly, and Esrael's Sonic 2 Beta disassembly. What I was hoping to achieve was to port some data (Specifically HPZ's art and stuff, and a few songs) to Sonic 2 final. However, Xenowhirl's disassembly has .bin files for everything, and Esrael's uses .nem files (Short for Nemesis, I know) for the graphics I want (Which are also not stored as Nemesis data in the final), and the sounds are .snd files in the beta (Which seems a lot less compressed too).

    So, here are my questions:

    1: Does Sound 2 Beta use a different sound driver from Sonic 2 Final? My logical guess listening to the music would be yes, but surely there's some one more informed than I.

    2: Is there any way I can take the data from the SND files and decompress it, and then recompress it it into Sonic 2 Final's format and have it work? What would I need to do in between?

    3:Finally, how to I extract the graphics from the .nem file, and recompress it into Kozinski for use with Sonic 2 Final?

    Thanks t anyone who can help!
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,758
    341
    63
    SonLVL
  19. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    Thanks.

    Okay, so I got the level I want almost entirely in, but I tried porting in the level layout, and all the tiles are offset oddly. I compressed the layout using Kosinski, as the disasembly said, and it came out missing every other row of tiles!

    Oh... I see what's up. It looks like the background and foreground layer are seperate in the beta vs. the final where it's all in one place. Any ideas?
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,758
    341
    63
    SonLVL