Basic Questions and Answers Thread

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

  1. Aier

    Aier "Aieru Dotsuto" Member

    Joined:
    Nov 10, 2018
    Messages:
    41
    Location:
    Gensokyo's Boundaries
    That guide is pretty old, is from 2013, and if you try to use it you'll get branch errors, the best you can do is install Mega PCM, Clownacy did A guide to install it in Sonic 2 https://forums.sonicretro.org/index.php?showtopic=29057&st=30 I've never tried to use it, it's from 2013, but I think you should be fine...or just install Sonic 2 Clone driver V2, which has Mega PCM but since it uses the 68k to play music it reduces gaming performance http://sonicresearch.org/community/index.php?threads/sonic-2-clone-driver-v2.4621/
     
    Tanman Tanner likes this.
  2. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    As Aier said, Flamewing S3's Driver hasn't been updated, or touched to be honest, since 2013. It's possible, but you'd be going in the dark as it'd be a lot of trial and error.
    I have two alternatives:
    * MegaPCM (You'd require Sonic 1's Sound Driver, which lacks a port-to Sonic 2 guide.)
    * Sonic 2 Clone Driver v2 (My personal favorite. However, it depends on the 68k, which can cause performance issues, but as far as I've seen, is small.)
    Flamewing S3's Driver is still used nowadays, as iirc someone on Discord accidentally released their disassembly containing the driver mentioned.
     
    Last edited: Mar 25, 2019
  3. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    Er, no?

    Also, you can't just "install Mega PCM": it's incompatible with S2's driver. You'd have to install S1's driver as well, which uses the 68k just like the Clone Driver.
     
    EMK-20218 and Tanman Tanner like this.
  4. Aier

    Aier "Aieru Dotsuto" Member

    Joined:
    Nov 10, 2018
    Messages:
    41
    Location:
    Gensokyo's Boundaries
    I never said the driver is outdated, only the guide, I tried to use it once and got a lot of branch errors:
    Yeah, And I haven't saw a guide to port Sonic 1's to Sonic 2, this just doesn't work either So I think the only option they have left in the clone driver...

    And don't call me me "Aier_" just Aier =P, someone already had my name and I had to put the "_"
     
  5. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    Huh. Maybe I should check GitHub before I jump to conclusions.
    And yes, I'm aware MegaPCM doesn't work with Sonic 2's Driver, I just assumed that went without saying. My mistake, though.

    Edit: Ah, I see why you brought up the MegaPCM when the disassembly is Sonic 2: there's a lack of a Sonic 1 Driver to Sonic 2 guide that is up to date with all Sonic 2 disasms. So you really can't just "install" it. Updating my original post.
     
    Last edited: Mar 26, 2019
    Aier likes this.
  6. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    @MarkeyJester or Anyone who can help me out with this:
    Quick question, since you made the SSRG Splash Screens,
    I'm using one in my Sonic 1 AS Disassembly. The game runs the SEGA Screen and SSRG Screen in an infinite loop. Is there something I should alter to the SSRG Screen that breaks it out of that loop and goes straight to the Sonic 1 Title after the SSRG Screen the first time?
    Additionally, for some reason, now I can't even go to the title screen with the SSRG Screen removed, the SEGA Screen constantly loops.

    EDIT: I figured it out, apparently setting the gamemode value to 24 as max opposed to 20 in MainGameLoop fixed the issue. So it works! I just need to make it work with the Sonic 2 Clone Driver v2 in playing sounds, but everything else works.
     
    Last edited: Mar 25, 2019
    EMK-20218 likes this.
  7. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    What's the hexadecimal position of the Signposts in Sonic 1's Green Hill Zone Act 1 and 2, and Eggman and Boss Capsule in Act 3?

    EDIT: Eggman spawning is handled by the game's code apparently.
     
    Last edited: Apr 1, 2019
  8. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    GHZ1: X = 2560 Y = 04A2
    GHZ2: X = 1F60 Y = 03A2
    GHZ3: X = 2B60 Y = 03A2
     
    Tanman Tanner likes this.
  9. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    So, now I have a new problem regards adding new art to zones. I'm positive it's been answered before, but I don't know the exact term for it.
    [​IMG]
    The tree from Casino Night Zone in Sonic 2 somewhats loads, but as the level fully loads, the lower half is replaced by bumper tiles. Now, before the level fully loads, I can see the tree for a split second before these bumper tiles overwrite it. What do I need to do, exactly? Alter my PLCs? Put in a new DMA Queue? Or making room in VRAM?
     
  10. GenesisDoes

    GenesisDoes What Nintendont Member

    Joined:
    Jan 2, 2016
    Messages:
    159
    Location:
    Pittsburgh, PA
    It sounds like some of the level's art tiles in VRAM are being overwritten by the PLC for the bumper objects' tiles, so you'll need to alter your PLCs.

    Every game object in Sonic 1 uses a particular SST (a word at offset $02, constant labelled "obGFX" in S1 Github disasm and "art_tile" macro in other disasms iirc) to point to the starting tile address/gfx settings for sprite mappings. According to the SCHG, the bitfield for this SST is broken down as such:

    You'll need to go into the bumper's code (file "_incobj\47 Bumper.asm" in S1 Github disasm), and increase its tile number used for obGfx SST appropriately, so that it doesn't overwrite the level art. PLC entries use VRAM addresses instead of tile number offsets, so you'll need to AND obGFX value by $7FF in order to get the tile number, and then multiply that value by $20 to use for your PLC entry.

    At least in Sonic 1 Github, PLC entries are located in file "_inc\Pattern Load Cues.asm" and use macros. The macro has 2 parameters: the label pointing to the Nemesis compressed art file, and then the VRAM address offset word. Spring Yard Zone's PLC entries will look something like this:

    Code:
    ; ---------------------------------------------------------------------------
    ; Pattern load cues - Spring Yard
    ; ---------------------------------------------------------------------------
    PLC_SYZ:   dc.w ((PLC_SYZ2-PLC_SYZ-2)/6)-1
           plcm   Nem_SYZ,0       ; SYZ main patterns
           plcm   Nem_Crabmeat, $8000   ; crabmeat enemy
           plcm   Nem_Buzz, $8880       ; buzz bomber enemy
           plcm   Nem_Yadrin, $8F60   ; yadrin enemy
           plcm   Nem_Roller, $9700   ; roller enemy
    
    PLC_SYZ2:   dc.w ((PLC_SYZ2end-PLC_SYZ2-2)/6)-1
           plcm   Nem_Bumper, $7000   ; bumper
           plcm   Nem_SyzSpike1, $72C0   ; large   spikeball
           plcm   Nem_SyzSpike2, $7740   ; small   spikeball
           plcm   Nem_Cater, $9FE0   ; caterkiller enemy
           plcm   Nem_LzSwitch, $A1E0   ; switch
           plcm   Nem_Spikes, $A360   ; spikes
           plcm   Nem_HSpring, $A460   ; horizontal spring
           plcm   Nem_VSpring, $A660   ; vertical spring
       PLC_SYZ2end:
    
    You'll want to modify that word value at Nem_Bumper with your new one. Remember to adjust the offsets appropriately for consecutive PLCs located after Nem_Bumper's VRAM address, so that other object art won't be overwritten by adjusted PLC entries. You may also need to put some conditionals statements to apply different obGFX values in certain zones for certain shared objects (such as enemies) if they get relocated. The nomenclature and location for these changes in other S1 disasms will vary, but the steps are the same.

    I recommend using FireRat's bugfixed version of Gens' KMod for viewing VRAM contents and watching PLCs getting loaded for debugging. Do note that its VRAM viewer displays tile number offsets, vs. VRAM addresses in Gens 2.11a rerecording or similar, so you'll need to multiply/divide by $20 as needed to get the proper values to use.
     
    Tanman Tanner and AkumaYin like this.
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    A better idea.

    Spring Yard Zone has unused tile art right at the beginning of it's zone art, it's the beta "Let's go" sign, which was never used. This is 32 tiles from VRAM 0020 to 0420, overwrite and use those tiles for your tree.
     
  12. Trickster

    Trickster Well-Known Member Member

    Joined:
    Aug 22, 2018
    Messages:
    110
    Location:
    Brazil Bad Future
    So, I'm bothered that the background was looking too detailed that it would make the visuals polluted.
    My solution was to make it more bright, to give it a "pastel" looking.
    Well, It seems that it doesnt look to saturated, but it's kinda weird to see the water having more contrast than the rest.
    But at least, it doesnt look too dark.
    I dunno if I mantain that, or if i take a step back and think again. So i'm here to ask: Is this change worthful? Does It makes any good difference?

    Here's the new palette with an older screenshot below. (for comparison purposes obviously)
    upload_2019-4-4_7-49-44.png
    upload_2019-4-4_7-51-34.png
     
    Last edited: Apr 4, 2019
  13. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I really like the pastel idea because it shows the distance between the mountains and stuff in the back and the foreground and the colors are more pleasing to look at. I don't mind the water having more contrast since the darker parts are a bit closer. Plus, the background has a blue hue to it already so that seems to justify the water being very blue. I'd say that you should try making the water lighter, but if you can't get it to look better, then don't worry about it.
     
    Trickster and Aier like this.
  14. Trickster

    Trickster Well-Known Member Member

    Joined:
    Aug 22, 2018
    Messages:
    110
    Location:
    Brazil Bad Future
    Sure I can! This is how it looks like now
     

    Attached Files:

    ProjectFM, AURORA☆FIELDS and Aier like this.
  15. Aier

    Aier "Aieru Dotsuto" Member

    Joined:
    Nov 10, 2018
    Messages:
    41
    Location:
    Gensokyo's Boundaries
    I liked how it looks before, giving some sort of mist in the lake, but is too "pink" now, making the foreground too dark. But this isi just my opinion; If you use the same colors but less bright it could work, still, nice job so far!


    By the way, I'm going to show the background in a video, because you requested it :U
     
    AkumaYin and Trickster like this.
  16. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Recently I've been working on adding seamless act 1 to act 2 transitions to Sonic 2 just like in Sonic 3K. I've almost got it working, however there's one issue. This happens for a single frame:

    [​IMG]

    The results aren't this severe on PAL, I'm guessing it's because the game has more time to process the layout changes? Anyway, Is it possible to "skip" drawing new changes for a frame so that the previous frame remains for 2 frames and glosses over this one? That's an idea I had to overcome this issue, but I'm not sure if it's feasible to do that. If anybody has ideas on how I could fix this that'd be great.
     
    Last edited: Apr 14, 2019
  17. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I don't know how yours works so I can't give any specific answers. Assuming you did this by using a modified version of the level loading code, my recommendation is to make sure there is no extra code doing anything you don't need it to do like reloading the palette. Then, find anything in the code that will end up waiting a frame or more, and move that to before or after it does stuff that would have visual effects.
     
    Aier likes this.
  18. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    Another stupid question regarding Sonic 1 from yours truly.
    I 'deleted' a zone in the game, Labyrinth Zone. I say deleted because it's still there, it's just the level order makes it skip over it, making it ultimately unused. I also removed the mapping and artwork from the zone to save up on space, so literally you can't do anything in it.
    I want to know if there was a way that if Labyrinth Zone Acts 1-3 and Scrap Brain Zone 3 would cause the game to crash being selected via Level Select or even if the zones themselves are loaded, as I use a custom error handler for my ROM Hack.
    More or less what I'm asking for is just asking what methods can I do in the disassembly that would crash the game upon those 4 acts mentioned being selected via level select.
    My reasoning behind removing it is that I didn't want to bother myself with working with water levels (I was never really a fan of them) and just in case I add artwork to my other zones. I didn't just remove it altogether because I like people who find unused things in games, such as the same people who found the unused zones in Sonic 2.
     
    Last edited: Apr 15, 2019
  19. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    Edit the pointer file so it goes to a different level or make it not load anything. I'm not sure how to eaxactly do the latter, though.
     
  20. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    It works by calling loadLevelLayout and LoadCollisionIndexes then offsetting the camera and every objects position by the position of the screen at the end of the act to get them to the start of act 2. Then I set the Screen_redraw_flag, which used to be called the Dirty_flag, to redraw the screen. As far as I can tell this isn't doing anything more than I need it to.

    I'm really not sure what would make the entire game stall for a frame while also letting it process everything, any recommendations?