Basic Questions and Answers Thread

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

  1. TrustyGun

    TrustyGun Newcomer Trialist

    Joined:
    Aug 24, 2014
    Messages:
    13
    Location:
    Why do you care, Stalker?
    Thanks. Working perfectly now!
     
  2. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    Question for MarkeyJester

    With MEGAPCM installed...


    Go_PSGIndex: dc.l PSG_Index ; XREF: sub_72926
    ; ---------------------------------------------------------------------------
    ; PSG instruments used in music
    ; ---------------------------------------------------------------------------
    PSG_Index: dc.l PSG1, PSG2, PSG3
    dc.l PSG4, PSG5, PSG6
    dc.l PSG7, PSG8, PSG9
    PSG1: incbin soundpsg1.bin
    PSG2: incbin soundpsg2.bin
    PSG3: incbin soundpsg3.bin
    PSG4: incbin soundpsg4.bin
    PSG6: incbin soundpsg6.bin
    PSG5: incbin soundpsg5.bin
    PSG7: incbin soundpsg7.bin
    PSG8: incbin soundpsg8.bin
    PSG9: incbin soundpsg9.bin


    does all this go unused seeing that MegaPCM has it's own DAC system?
     
  3. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    I may not be MarkeyJester, but I know that those are PSGS and MegaPCM is a DAC driver, so if you remove the PSGs, the music won't sound right. They aren't unused.
     
  4. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Small issue I am having with Sonic 2. In Metropolis Zone only, when CPU Tails respawns he isn't able to stand on the floor and proceeds to keep falling down forever. I'm not sure where to look in order to fix this. I have scoped around the TailsCPU routines but don't see anything helpful. I am using the 2007 Xenowhirl disassembly. 
     
  5. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    actually this was suppose to be 2 questions, for vladicomper & marky, Vladicomper made MegaPCM. Marky created the addressed music, which was going to be my 2nd question. I noticed the sound coding was different & i was wanting the spindash rev too. Everytime i went for it I failed. any suggestions?
     
  6. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Pretty much what Ralakimus said, The PSG and DAC are seperate types of sound (generated by seperate sound chips in fact). It might be possible that one or two of those PSG instruments have gone unused by the original Sonic The Hedgehog title, but generally speaking, this isn't dead data. It is functional, used, and neccessary for PSG sounds.

    Maybe you're confusing PSG with PCM?
     
  7. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Have you been sticking some solid-switch tags (like for loops) at all? I know MTZ has a primary collision but no secondary.
     
  8. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    I haven't edited the level itself at all. All I have done is follow quite a few of the Sonic Retro tutorials, that being all of the bug fixes and notably the S3K Ring and Priority Managers.

    Edit: I have discovered that this also happens in Oil Ocean

    Found out the cause on Retro, it was the combination of 2 guides to do with fixing speeds. 
     
    Last edited by a moderator: Aug 28, 2014
  9. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Yeah, OOZ has no secondary collision either. Until we know what you've done since you noticed this happening, we can't help much as I've never experienced this. Do you have a back up when it was fine? If so, follow these guides, but one by one, then as soon as you notice it failing, then we can go from there.


    But, you could cheat and copy the primary collision and replace the secondary one with it (so you have primary OOZ and secondary OOZ being exactly the same), but this should be used as a temporary solution.
     
  10. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    I decided to redo everything and the issue hasn't showed up yet. However an issue with my own code is causing a similar issue to the scattered rings.

    I changed Badnik Explosion so that a ring would be dropped instead of the animal.


    Obj27_Init:
    addq.b #2,routine(a0) ; => Obj27_Init2
    bsr.w JmpTo2_SingleObjLoad
    bne.w Obj27_Init2
    _move.b #$37,0(a1) ; load Obj37 Ring
    move.w x_pos(a0),x_pos(a1)
    move.w y_pos(a0),y_pos(a1)
    move.w parent(a0),parent(a1)
    move.b #2,routine(a1) ;++ set routine to #2 (Obj37_Bounce)
    move.b #8,y_radius(a1)
    move.b #8,x_radius(a1)
    move.w x_pos(a0),x_pos(a1)
    move.w y_pos(a0),y_pos(a1)
    move.l #Obj25_MapUnc_12382,mappings(a1)
    move.w #$26BC,art_tile(a1)
    jsr Adjust2PArtPointer2
    move.b #$84,render_flags(a1)
    move.w #$180,priority(a1)
    move.b #$47,collision_flags(a1)
    move.b #8,width_pixels(a1)
    move.b #-1,(Ring_spill_anim_counter).w
    move.w #0,x_vel(a1)
    move.w #-$300,y_vel(a1)
    tst.b (Water_flag).w ; Does the level have water?
    beq.s + ; If not, branch and skip underwater checks
    move.w (Water_Level_2).w,d6 ; Move water level to d6
    cmp.w y_pos(a0),d6 ; Is the ring object underneath the water level?
    bgt.s + ; If not, branch and skip underwater commands
    subi.w #$E,y_vel(a0) ; Reduce gravity by $E giving the underwater effect for the rings
    +
    bsr.w JmpTo2_SingleObjLoad
    _move.b #$29,0(a1) ; load obj29
    move.w x_pos(a0),x_pos(a1)
    move.w y_pos(a0),y_pos(a1)

    This code causes rings to fall through the ground once dropped. Does it have something to do with move.b  $47?
     
    Last edited by a moderator: Aug 26, 2014
  11. EasterBanana

    EasterBanana Newcomer Trialist

    Joined:
    Jul 22, 2014
    Messages:
    9
    Location:
    In the R of SSRG.
    is it possible to change the black background behind "GREEN HILL ZONE ACT 1"? If so, how?
     
  12. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    The black "background" is actually meant to hide the loading process from you, and it's not a background at all per se. Basically, the last three palette lines are entirely set to black while the game loads a level, so you don't see incomplete art being drawn in front of your eyes. I guess you might be able to change it to another solid color, or use sprites which use a color from the first palette line to draw something. I don't know how Sonic 2 does its magic, to be honest.
     
    Last edited by a moderator: Aug 26, 2014
  13. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Sonic 2's title card has three 'rectangles' using Sonic's palette line IIRC, and then triangle sprites(?) plopped on top. They all scroll in, and then out, and voila! Of course, this causes a split second issue when loading a level with water, as the underwater palette sometimes flashes on the titlecard.

    Or something, it's been a while.
     
  14. TheInvisibleSun

    TheInvisibleSun Visible Member

    Joined:
    Jul 2, 2013
    Messages:
    424
    Location:
    Western New York, USA
    That happens with the blue oval in Sonic 1 as well.
     
  15. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    I have a problem with my custom BG. I created a simple BG for my custom zone art (Green Garden, the same from Screens thread) and I edited the deformation so the mountains aren't broken in half (in S1 REV01 top mountains and waterfalls & grass section scroll-as-you-move with different speed). And it work fine, but after dying...

    [​IMG]

    This happens. Part of background (it has the same height as the bottom scrolling-as-you-move mountains sections) is missing. It reappears after going to the right. So, how to fix this?

    There's some maybe useful info:

    • I'm using the REV01 BG effects
    • My only change was changing "$FFFFF710" in Deform_GHZ_7 to $FFFFF718 (the same as in Deform_GHZ_6, I changed to make the top at bottom mts. scroll at the same speed).
    • Not sure if important, but my BG uses only one chunk - $30. Maybe this will halp with something.
    Thanks in advice.
     
    Last edited by a moderator: Aug 26, 2014
  16. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    dword_61B4: dc.l $700100, $1000100
    dc.l $8000100, $1000000
    dc.l $8000100, $1000000
    dc.l $8000100, $1000000
    dc.l $8000100, $1000000
    dc.l $8000100, $1000000
    dc.l $700100, $1000100The $700100 (actually 0070 0100) is the two Y sizes of each scroll speed, the 0070 is 70 pixels from the top, the 0100 is the 100 pixels below it.
    You look like you have two extra blocks there moving at the same speed, SO! I'd change the 70 to 90 (an extra 20 pixels). However, I notice the bottom grassy section appears to be part of it, SO! If the 90 doesn't work for the grass section, try changing it to 100 (not that it'd be any better, the grass doesn't move consistently, it's all seperate scans).

    The top $700100 is Green Hill Zone, the bottom is the ending (which also uses Green Hill Zone's background).
     
  17. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    I changed that dword to

    Code:
    dword_61B4:	dc.l $1000100, $1000100	; GGZ (custom GHZ)
    		dc.l $8000100, $1000000		; LZ
    		dc.l $8000100, $1000000		; MZ
    		dc.l $8000100, $1000000		; SLZ
    		dc.l $8000100, $1000000		; SYZ
    		dc.l $8000100, $1000000		; SBZ
    		dc.l $700100, $1000100		; Ending (original GHZ)
    		dc.l $8000100, $1000000		; TMZ
    		dc.l $700100, $1000100		; BZ
    but after dying the background is missing, exactly as before. With both changed and unchanged "Deform_GHZ_7". I did something wrong?
     
  18. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    Is that code even used after following the REV01 background guide? It doesn't exist in REV01. Anyhow, after doing what you did, only less hackishly, I experienced the problem of that row's art being visibly overwritten as I moved through the level. I've been screwing with whatever code I can find and can't seem to shake the bug. Is it related?
     
    Last edited by a moderator: Aug 26, 2014
  19. Painto

    Painto Arthurus Paintus Erinaceus Member

    Joined:
    Mar 24, 2014
    Messages:
    321
    Location:
    Lublin, Poland
    I changed

    Deform_GHZ_6: ; XREF: Deform_GHZ
    move.l d0,(a1)+
    dbf d1,Deform_GHZ_6
    move.w #$2F,d1 ; '/'
    move.w ($FFFFF718).w,d0
    neg.w d0

    Deform_GHZ_7: ; XREF: Deform_GHZ
    move.l d0,(a1)+
    dbf d1,Deform_GHZ_7
    move.w #$27,d1 ; '''
    move.w ($FFFFF710).w,d0
    neg.w d0to
    Code:
    Deform_GHZ_6_7:				; XREF: Deform_GHZ
    		move.l	d0,(a1)+
    		dbf	d1,Deform_GHZ_6_7
    		move.w	#$56,d1	; '/'
    		move.w	($FFFFF718).w,d0
    		neg.w	d0
    so the mountains scroll the same, but after dying and restarting from lamppost, the BG is glitches as shown on my screenshot in previous page.
    EDIT: Eh, I thinked that you don't know what I mean.
     
    Last edited by a moderator: Aug 26, 2014
  20. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    When I made your change to GHZ, I had to change that $56 to $57, or the water would move some of the mountain art.