don't click here

Basic Questions & Answers thread

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

  1. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,374
    93
    your mom
    This is for GitHub. For Xenowhirl it's mostly the same logic, but ignore the levartptrs replacement, zoneOrderedTable/zoneOrderedOffsetTable stuff, and the one check I said to put at the end of the table.

    EDIT: Also fixed a couple issues I found. Curse you STI/Yuji Naka for making the 2P flag a word and also added a section for fixing up 2P object layout loading.
     
    Last edited: Jul 6, 2020
  2. I guess this’d also work for making unique second acts?
     
  3. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,374
    93
    your mom
    If you change the calculations into taking account a 2nd act, then yea, you can pretty much use that as a base.

    Would it be preferable if I made a separate thread for this + having unique second acts as a "proper" guide?
     
    Last edited: Jul 6, 2020
  4. Fine by me!
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    I think it's working. Thanx very much. :D
     
  6. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Does anyone know how Sonic 2's sub object mappings are listed. The best I can find is this one for the Spiny badnik, but I can't move its mappings right no matter which entry I alter:

    Code (Text):
    1.  
    2. ObjA5_SubObjData:
    3.     dc.l ObjA5_ObjA6_Obj98_MapUnc_38CCA
    4.     dc.w $252D
    5.     dc.w $404
    6.     dc.w $80B
    Figuring these out would likely make it easier to put a mapping strategy for Spiker in my Hill Top tutorial as well.
     
  7. AppleSauce

    AppleSauce

    It's now illegal to use your meme! Member
    44
    2
    8
    Hello again, I'm back.

    This isn't much of a question, but...

    I'm using an old source code provided on an old Sonic Retro thread, it's called ReadySonic. I figured it was optimal for me since I'm a beginner and it came with a few nicies. Instinctively, I opened up Sonic's art, mappings and all that shit in Flex 2, my sprite editor of choice. This is where the problem began. I finished up drawing all the stuff for my character and put each sprite in the right place, but when I went to build it it came up with half a million errors that all said 'Symbol not defined'. What does it mean?! WHAT DOES IT MEEEAAAN?!
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    The ASM file for Sonic's mappings in ReadySonic define a bunch of extra symbols that Flex 2 doesn't keep, so you'll have to copy them from the original file into your new one every time you edit the sprites.
    Or you could use one of the other disassemblies and learn how to do things yourself. IIRC there are many other issues with sprite editing in ReadySonic.
     
  9. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Anyone good at scrolling data?

    Basically we are working on making Chemical Plant Zone VS compatible, however the SwScrl data needs a branch where it's refitted to work for splitscreen. EHZ, CPZ, MCZ and even HTZ had their own branches for multiplayer scrolling, but I'm having problems figuring out a pattern.

    I get even then it might need remapped to look right in split screen's compression, but I at least want to be mapped and scrolled properly so I can have a clue how it should look.
     
  10. AppleSauce

    AppleSauce

    It's now illegal to use your meme! Member
    44
    2
    8
    Anyone know how to convert mp3 to bin or smps? I need a wisp announcer clip to play when the colour power is used in my rom hack. Any reply is welcome.
     
  11. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    Yeah, you can't do that, smps is meant for music (and even then, you can't start from an mp3, you have to use a midi or a module).

    You can store the voice clips as pcm and use one of the improved drivers which allow you to play arbitrary samples at arbitrary times.
     
  12. Devon

    Devon

    Down you're going... down you're going... Tech Member
    1,218
    1,374
    93
    your mom
    Yeah, the thing about Genesis music and sound effects in general (really most retro consoles with sound) is that it uses sequencing. That means that it uses a list of notes, commands, etc. to tell the sound chips what kind of sounds to play and at what frequencies and all that kind of stuff. It's more similar to MIDI files than something like WAV, MP3, etc. In the case of the Genesis, it has a Yamaha YM2612, which uses 6 channel FM synthesis to generate sound from a list of parameters, and also the same sound chip as in the Master System with 3 channels that generate square waves and 1 channel that generates noise. Not exactly optimized for playing back sampled audio.

    However, the YM2612 does have a feature in which you can swap out the 6th FM channel for a "DAC" channel that CAN play sampled audio. You have to manually stream it yourself at a steady pace, but it can be done. Luckily, as nineko mentioned, there are drivers out there that can handle this for you. These days, there are 2 options that people go with when it comes to Sonic hacking:

    Mega PCM by vladikcomper is a really simple to install and easy to use sampling driver that can playback uncompressed unsigned 8-bit samples, and also the compressed 4-bit samples that Sonic 1, 2, and 3K use in their games. The samples can be stored anywhere in the ROM at any size (within reason, of course), and the samples can be up to ~26kHz. That's all it does really. There is very limited pitch control, no volume control (the version in Sonic 2 Clone Driver v2 has it, though), and it doesn't avoid hardware issues that would make samples sound horrible on an actual Genesis console, even if the samples themselves are of decent quality.

    Dual PCM - FlexEd by MarkeyJester has more going for it. It has smooth pitch control (which can also be configured to play back samples in reverse), smooth volume control, it mixes in 2 software sampling channels into the 1 hardware "DAC" channel, and it avoids the hardware issues that would cause the samples to play horribly on an actual console. Like Mega PCM, the samples can placed anywhere in the ROM, and can be stored at any size (within reason, again). However, it's definitely more difficult to install and work with the driver compared to Mega PCM, though the manual is comes with gives a good explanation of how to do it. Samples can only be at ~14kHz, too, but that's not too bad.

    There's probably one or two or many more that are out there, but those 2 were the ones that popped into my head. Really, it's just a matter of picking what you think would be best suited for you.
     
    Last edited: Jul 16, 2020
  13. So, I watched Lapper’s latest video today and learnt that the collision hulls for objects aren’t an even number of pixels large - and I’m wondering how to change that in Sonic 2. I take it you’d need to go to the collision hulls on the objects, and, on one of the passes of the hull creation, add a subtraction command to reduce the size of the hulls on one side by 1 pixel.
     
  14. AppleSauce

    AppleSauce

    It's now illegal to use your meme! Member
    44
    2
    8
    Oh, that sucks. I'll try the pcm approach and if all else fails I'll try to find some free to use smps.
     
  15. AppleSauce

    AppleSauce

    It's now illegal to use your meme! Member
    44
    2
    8
    Mega PCM seems like the way to go for me, I'll try that first.
     
  16. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    Yes, Mega PCM is what you're looking for, I'm sorry if my post was so minimalistic, I did want to explain things and include a link, but I can only browse Retro from my phone and I hate to type on the touchscreen, good thing that Ralakimus got me covered.
     
  17. AppleSauce

    AppleSauce

    It's now illegal to use your meme! Member
    44
    2
    8
    Okay, so I found some SMPS remixes of songs on YT and saved them as .wav files, but they're huge, larger than 8MB and I'm worried they may not fit the rom size. Do you know how to fix this kind of problem, or should I consider using the SonMP3 drivers instead?
     
  18. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    ... you don't really know how smps works, do you?

    While Mega PCM does allow you to arbitrarily replay small voice clips that you can use to announce the wisps, the main point of smps resides in its binary music format, which is more alike a midi or a module file. Look for mid2smps and/or xm3smps on the Sonic Retro wiki.

    Again, I'd like to explain much more than this, and provide a link or two, but since I can only use my phone, you'll have to wait for someone else to step in.

    Just one more thing, ripping music off youtube is a bad idea in general, because of all the transcoding involved. This fact alone is saying very much about your musical inexperience.
     
  19. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,192
    406
    63
    Japan
    At "loc_1072:", change the "rts" back to an "rte" like it's supposed to be.