Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    It was the Comper-compression code that triggered the false alarm, last I checked. I thought MainMemory removed it in the latest version, though, so I don't know why you're having an issue.
     
  2. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    its a False Positive, caused by comper.dll. I can assume you its 100% safe, but some antiviruses treat certain patterns as a virus (usually Evo-Gen or Malware-Gen malware), and the sample they check is something ridiculous like 8 bytes in certain parts of the file, which could be easily flagged by all kinds of random files. Like when I did some C programming I had the exact same issue, for code I wrote myself.
     
    Last edited: Feb 17, 2016
  3. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    So I was able to trace my music problem to the three art files of the characters in my hack, oddly enough. They are after each other and separated by evens. Unless the third file is taken out, the music (using Sonic 3's driver) makes odd noises when stopping or fading out.
     
  4. โบวี่

    โบวี่ Tsingtao Enjoyer Member

    Joined:
    Dec 27, 2011
    Messages:
    215
    I have a question but I'm pretty sure nobody here knows the answer to it. I'll post it in here anyway just in case if someone does...

    What sound driver does the Sega Meganet puzzle game "Sonic Eraser" use?
     
  5. LuigiXHero

    LuigiXHero Well-Known Member Member

    Joined:
    Mar 22, 2014
    Messages:
    280
    According to Valley Bell's Docs it's "SMPS Z80 [missing on GDRI]"
     
    โบวี่ likes this.
  6. โบวี่

    โบวี่ Tsingtao Enjoyer Member

    Joined:
    Dec 27, 2011
    Messages:
    215
    Alrighty, thanks bud!
     
  7. AsuharaMoon

    AsuharaMoon kakyoin did you lay this egg Member

    Joined:
    Aug 15, 2013
    Messages:
    67
    I have just added Sonic 3&k's Elemental Shields to my Sonic 1 hack, with all animations and techinques working. But, there's a little problem that I can't fix since a long while:

    [​IMG]
    Fire and Thunder shields always show forward the character (Discard the Bubble one as it actually is).
    I also tried checking Objects Status $18 and $19, and also used SonMapED and Flex changing their showing method, but everything still the same result.

    So, how I can fix this?
     
    astroblema likes this.
  8. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The Mega Drive's sprites have a priority chain system, this gives sprites an order of appearance. The first item in the chain will be presented in front of whatever comes next in the chain.

    The Sonic sprite drawing engine handles this priority with processing speed in mind, and it does this by breaking priority up into 8 different lists/chains independent of each other. Object's 18th byte in the SST is what controls which list/chain the object should be hooked to. Setting it to 0 will place it in the highest priority chain available, setting it to 7 will place it in the lowest priority chain available.

    It should be noted that if there is no space in the chain that is requested, then the object will not be saved to the chain. and its sprites will simply not show up.

    Sonic is set to hook himself into chain number 2, if you set the shield to 1, it'll present in front of Sonic. If you set the shield to 3, it'll present behind Sonic. If you set the shield to 2, it'll hook itself onto the same chain as Sonic, but since Sonic is processed first in the object list, he'll get into the chain before the shield does, thus, the shield will present behind Sonic.

    Now, the fire shield has this tendency to present both in front AND behind Sonic depending on the frame of art being shown, to help the illusion of it being a bubble around Sonic, so the bottom line is, you'll need to set the shield's priority ($18) to 1 or 2 depending on the frame, in order to force it in front and behind Sonic at the appropriate time. 1 for in front, 2 for behind.

    If you ported the actual object's code in full from Sonic 3, then it'll already have the necessary instructions for dealing with priority control. The only differences is that priority in Sonic 3 is handled as a word address rather than a byte priority ID, this is to help obtain the right chain address more quickly (if it already has the address, and doesn't need to calculate it using the ID, that saves time), but that means the priority controlling aspect of the shield will not work in Sonic 1 properly, and is probably setting it to an even address rounded down to 0, which causes the priority to highest (i.e. forcing the shield to chain 0 constantly).

    You will need to locate that code and port it properly.
     
    AsuharaMoon likes this.
  9. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Following on what MarkeyJester just said, if you really have ported it from S3(K), then in your code for the shields you'll have:

    Code:
     move.w #$80,priority(a0)
    This will make the shield appear in front of Sonic. Seeming as you're moving a word, here, it will move #$00 to priority (and #$80 to "width_pixels", which'll probably make no difference to the shield but don't take my word on that. Either way, you don't want to change width_pixels).


    Like MJ said, when the shield has to appear behind, the priority will change, more than likely to:

    Code:
     move.w #$100,priority(a0)
    This will make the shield appear behind Sonic. Seeming as you're moving a word, here, it will move #$01 to priority (and #$00 to "width_pixels", again, probably makes no difference).


    In Sonic 2, priority works in bytes with 8 chains. Sonic is on chain 2, but because you've moved #$00 (or #$01) to priority, these will still appear in front of Sonic, causing your problem. The solution, is this:


    Change:
    Code:
     move.w #$80,priority(a0)
    to
    Code:
     move.b #$1,priority(a0)
    AND

    Change:
    Code:
     move.w #$100,priority(a0)
    to
    Code:
     move.b #$2,priority(a0)

    Make sure they were a0 to start off with, they may have been a1 or what-have-you. Anyway, this should fix it. Also, this will stop the code writing to width_pixels (in case that did cause errors).


    Just in case it's not #$80 or #$100, here is a small neat table:

    Code:
    ; ===============================
    ; TABLE CONVERSION FROM S2 TO S3K
    ; ===============================
    ; |  | S 2 | S3K |
    ; |---|-----|-----|
    ; | ~ |  #  |  #$ |
    ; | P |  0  |  0  |
    ; | R |  1  |  80 |
    ; | I |  2  | 100 |
    ; | O |  3  | 180 |
    ; | R |  4  | 200 |
    ; | I |  5  | 280 |
    ; | T |  6  | 300 |
    ; | Y |  7  | 380 |
    ; ===============================


    Or you can port S3K's priority manager into your hack, which will help speed up your game in many ways and fix this issue without making changes to the shields' code. I have a guide here.



    UNLESS you made this shield code yourself and you didn't port it from S3(K), then you'll have to make the priority change routine yourself.
     
    AsuharaMoon likes this.
  10. pixelcat

    pixelcat The Holy Cat Jr. Member

    Joined:
    May 31, 2014
    Messages:
    395
    Hi guys, I have a pretty simple (i guess?) question. Where I can find a guide on SMS assembly? I know that this question is pretty dumb, but jeez, i cant find it anywhere.
     
  11. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I have a couple questions about compressions
    1. What is the best compression tool to use?
    2. To port a Sonic 2 level to Sonic 1 Two-Eight I would have to compress from one format to another. Tiles from kos to nem & map16 from kos to eni. Would I have to uncompress first then compress back? I ask cause The Sega Data Compressor seems to crash when direct compressing (one to another instead of uncompress & decompress)
     
  12. AsuharaMoon

    AsuharaMoon kakyoin did you lay this egg Member

    Joined:
    Aug 15, 2013
    Messages:
    67
    That's was all I needed to know! Here's a video showing them:


    Thunder's sparks it's still missing (but I'll add it later), and I'll try to add that priority manager. Thank you guys!
     
    HackGame likes this.
  13. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Like Z80 assembly? There's a Z80 reference document you can use, which lists the instructions and their functions.
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You will get the best compression from Flamewing's KENSC tools, which are available... somewhere. You may also use KensSharp which is slightly less powerful, but comes with a Windows shell extension and a command-line program which is capable of changing a file's compression without creating an intermediate file:
    kenssharp -dk tiles.kos - | kenssharp -cn - tiles.nem
     
  15. Ravenfreak

    Ravenfreak Still hacking the 8-bit titles Member

    Joined:
    Feb 10, 2010
    Messages:
    410
    Location:
    O'Fallon, MO
    Check out the various guides over at SMSPower! They have a list of all the instructions used in z80 assembler, and if you're interested and wanting to start hacking the 8-bit Sonic games (or any Master System game for that matter) check out their various different guides on how the Game Gear/Master System works, code snippets, etc. SMSPower is definitely the place to go for all your 8-bit Sega needs. :)
     
  16. LuigiXHero

    LuigiXHero Well-Known Member Member

    Joined:
    Mar 22, 2014
    Messages:
    280
    I just use The Sega Data Compressor.

    I also use MainMemory's level Converter to do most of the work.
     
  17. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I use the Sega data compressor to convert, everything looks good on sonlvl, I can't use the kens compression tools for nothing, maybe cause I'm no good with dos.
    But...

    2 things.
    1. Good thing for backing up.
    2. Tried again, GHZ remains the same now (thank goodness) but Emerald Hill Zone... The art, & layout is all good, but immediate death despite starting at $0000 $0000 for testing purposes (yes at the very top, or is that a bad idea. I will fix later.) Somehow everything goes corrupt, but only 5 seconds into the stage. Restarting, 5 seconds & corrupt. When it hits game over, crash.
    As you can tell I can use debug, but I can't tell if the screen is scrolling or not.
     
  18. CollinAB

    CollinAB Active Member Exiled

    Joined:
    Nov 24, 2014
    Messages:
    30
    Location:
    76 6th ave
    When I try to port Clownacy's Sonic 2 Clone driver into Saxman's sonic boom engine, I get a lot of build errors. How do I fix them?
     
  19. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    You need to be a lot more specific if you want help. What errors? How many errors? Show us the errors you're receiving, we can't help you if we don't know what's wrong.
     
  20. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Can you give us a few examples of the errors? Without them, we can't help. Or if you like, use pastebin.com and post the whole error log there, then link us to the error log.

    EDIT: Ninja'd