Basic Questions and Answers Thread

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

  1. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    924
    Quick question, where would I find the main control for loading an Artloadcue for a certain zone. I know you call it like this


    moveq #$3D,d0
    bsr.w LoadPLC

    but I can only find instances like this for the bosses, Character HUD and the Game Over screen.

    Edit: That one I beleive is the control for the special stage artloadcue.

    Edit2: I moved the water surface to a different PLC and pointed to it to the boss level event, but it still collides with the boss art, so for this part of the question, i ask, RHS, what do you mean when you say you have to move the artloadcue somewhere else? I thought what I did was what you meant, but I guess I dont fully understand.
     
    Last edited by a moderator: Jun 18, 2013
  2. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    924
    "Sorry for double post"

    I figured out the above, its located in levelartpointers if anyone wants to know. if you look at:


    levartptrs 4, 5, 4, ArtKos_EHZ, BM16_EHZ, BM128_EHZ ; 0 ; EHZ ; EMERALD HILL ZONE

    the first command is for the primary PLC art and the second is for the secondary, and the last one is the pallet number the zone uses.

    Next, go down to artloadcues: you will see something like, this


    dc.w PlrList_Std1 - ArtLoadCues ; 0
    dc.w PlrList_Std2 - ArtLoadCues ; 1
    dc.w PlrList_StdWtr - ArtLoadCues ; 2
    dc.w PlrList_GameOver - ArtLoadCues ; 3
    dc.w PlrList_Ehz1 - ArtLoadCues ; 4
    dc.w PlrList_Ehz2 - ArtLoadCues ; 5
    dc.w PLC_WZ1 - ArtLoadCues ; 6
    dc.w PLC_WZ2 - ArtLoadCues ; 7
    dc.w PLC_8 - ArtLoadCues ; 8
    dc.w PLC_9 - ArtLoadCues ; 9
    dc.w PlrList_Mtz1 - ArtLoadCues ; 10
    dc.w PlrList_Mtz1 - ArtLoadCues ; 11
    dc.w PlrList_Mtz1 - ArtLoadCues ; 12
    dc.w PlrList_Mtz2 - ArtLoadCues ; 13
    dc.w PlrList_Wfz1 - ArtLoadCues ; 14
    dc.w PlrList_Wfz1 - ArtLoadCues ; 15
    dc.w PlrList_Wfz1 - ArtLoadCues ; 16
    dc.w PlrList_Wfz2 - ArtLoadCues ; 17
    dc.w PlrList_Htz1 - ArtLoadCues ; 18
    dc.w PlrList_Htz2 - ArtLoadCues ; 19
    dc.w PLC_Hpz1 - ArtLoadCues ; 20
    dc.w PLC_Hpz2 - ArtLoadCues ; 21
    dc.w PLC_10 - ArtLoadCues ; 22
    dc.w PLC_10 - ArtLoadCues ; 23
    dc.w PLC_10 - ArtLoadCues ; 24
    dc.w PLC_11 - ArtLoadCues ; 25
    dc.w PLC_12 - ArtLoadCues ; 26
    dc.w PLC_13 - ArtLoadCues ; 27
    dc.w PLC_14 - ArtLoadCues ; 28
    dc.w PLC_15 - ArtLoadCues ; 29
    dc.w PLC_16 - ArtLoadCues ; 30
    dc.w PLC_17 - ArtLoadCues ; 31
    dc.w PLC_18 - ArtLoadCues ; 32
    dc.w PLC_19 - ArtLoadCues ; 33
    dc.w PLC_1A - ArtLoadCues ; 34
    dc.w PLC_1B - ArtLoadCues ; 35
    dc.w PLC_1C - ArtLoadCues ; 36
    dc.w PLC_1D - ArtLoadCues ; 37
    dc.w PLC_1E - ArtLoadCues ; 38
    dc.w PLC_1F - ArtLoadCues ; 39
    dc.w PLC_20 - ArtLoadCues ; 40
    dc.w PLC_21 - ArtLoadCues ; 41
    dc.w PLC_22 - ArtLoadCues ; 42
    dc.w PLC_23 - ArtLoadCues ; 43
    dc.w PLC_24 - ArtLoadCues ; 44
    dc.w PLC_25 - ArtLoadCues ; 45
    dc.w PLC_26 - ArtLoadCues ; 46
    dc.w PLC_27 - ArtLoadCues ; 47
    dc.w PLC_28 - ArtLoadCues ; 48
    dc.w PLC_29 - ArtLoadCues ; 49
    dc.w PLC_2A - ArtLoadCues ; 50
    dc.w PLC_2B - ArtLoadCues ; 51
    dc.w PLC_2C - ArtLoadCues ; 52
    dc.w PLC_2D - ArtLoadCues ; 53
    dc.w PLC_2E - ArtLoadCues ; 54
    dc.w PLC_2F - ArtLoadCues ; 55
    dc.w PLC_30 - ArtLoadCues ; 56
    dc.w PLC_31 - ArtLoadCues ; 57
    dc.w PLC_32 - ArtLoadCues ; 58
    dc.w PLC_33 - ArtLoadCues ; 59
    dc.w PLC_34 - ArtLoadCues ; 60
    dc.w PLC_35 - ArtLoadCues ; 61
    dc.w PLC_36 - ArtLoadCues ; 62
    dc.w PLC_37 - ArtLoadCues ; 63
    dc.w PLC_38 - ArtLoadCues ; 64
    dc.w PLC_39 - ArtLoadCues ; 65
    dc.w PLC_3A - ArtLoadCues ; 66
    dc.w PlrList_KnucklesLife - ArtLoadCues ;67
    dc.w PlrList_Std2Knuckles - ArtLoadCues ;68
    dc.w PlrList_SignpostKnuckles - ArtLoadCues ;69
    dc.w PlrList_ResultsKnuckles - ArtLoadCues ;70
    dc.w PlrList_ShadowLife - ArtLoadCues ;71
    dc.w PlrList_Shadow_Signpost - ArtLoadCues ;72
    dc.w Plrlist_DEZ_boss - ArtLoadCues ;73

    its pretty self explanatory what these are, but these last 7 are new art load cues I have added, so you wont find these in the original Sonic 2 asm file.

    and finally, where a number/numbers on the PLC list points too. for example Ill use my new DEZ art cues.


    ;---------------------------------------------------------------------------------------
    ; Pattern load queue
    ; DEZ Primary
    ;---------------------------------------------------------------------------------------
    PLC_18: plrlistheader
    plreq $6E60, ArtNem_CPZMetalThings
    plreq $7280, ArtNem_ConstructionStripes
    plreq $7380, ArtNem_CPZBooster
    plreq $7400, ArtNem_CPZElevator
    plreq $7600, ArtNem_CPZAnimatedBits
    plreq $7C00, ArtNem_CPZTubeSpring
    plreq $8300, ArtNem_CPZStairBlock
    plreq $8600, ArtNem_CPZMetalBlock
    PLC_18_End
    ;---------------------------------------------------------------------------------------
    ; Pattern load queue
    ; DEZ Secondary
    ;---------------------------------------------------------------------------------------
    PLC_19: plrlistheader
    plreq $A000, ArtNem_Grabber
    plreq $A5A0, ArtNem_Spiny
    plreq $8340, ArtNem_WfzGunPlatform
    plreq $8680, ArtNem_Spikes
    plreq $8B80, ArtNem_VrtclSprng
    plreq $8E00, ArtNem_HrzntlSprng
    plreq $6F20, ArtNem_WfzScratch
    PLC_19_End

    these are the art loaded for each object in the zone. So the level art pointer for Death Egg should look like this,


    levartptrs $20,$21,$12, ArtKos_CPZ, BM16_CPZ, BM128_CPZ ; $E ; DEZ ; DEATH EGG ZONE

    

    Edit: This is called, Basic questions and answers thread, so I decided to answer my own question for you guys, since it is a good thing to know.  :p

    Edit2: Forgot to add that the last three commands on the levelartpointers are the art, blocks, and tiles for the FG and BG of the zone..
     
    Last edited by a moderator: Jun 19, 2013
  3. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    Okay...bugfix question time...

    [​IMG]

    There are four different total graphical glitches in Rusty Riot Zone and two general game bugs right now, and one of the general game bugs and two of the graphical glitches are shown in this picture, but I'll run down all of the problems.

    GENERAL GAME BUGS:

     - Nothing acts as solid for Knuckles (only after following this guide and extending the subroutine to work for Knuckles)

     - For all three characters, an enemy, monitor, or boss can be collided with from too high up (only after following this guide and extending the subroutine to work for Knuckles)

    RUSTY RIOT ZONE GRAPHICAL GLITCHES:

     - Background is screwed up

     - Lava doesn't display

     - Lots of object art is screwed up (hell, the title card won't even display correctly)

     - Spinning cylinder thing doesn't display

    How would I fix these...?
     
  4. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Start again.  We don't really know what changes you've done here and there to your code, and therefore, cannot help.  And don't upload your disassembly; unless someone has naff all to do for the day, no one will probably look.  I suggest starting from scratch and port things over slowly.  Make a back-up for each port you do, and as soon as you realise something else has gone wrong, you can back-track and see why.
     
    Last edited by a moderator: Jun 20, 2013
  5. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    924
    You could of followed the guide incorrectly, so like RHS said, back track and try again. Hacking is always trial and error, and you cant expect people to always figure your problems out for you, Live and Learn. Ha, (sorry this will be off topic) one of the lines from Live and Learn are, 'If you beg or if you borrow, you will never find your way", sounds like Crush 40 was right on the money. lol
     
  6. Electroball

    Electroball lurker Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    Okay, i'm having some issues at some s3k dac samples. I have used MegaPCM to port all of the s3k dac samples with the correct pitches, but they don't sound like if they we're in s3k, i.e: When I try to play sample "A5" (Come on! voice) It only plays "Co.." like if the sample was incomplete. Any help about this? I've tried to fix it, but I can't still figure it out.
     
  7. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    384
    Location:
    Russia
    It's hard to make any clues with the information given. Could you show your MegaPCM.asm?
     
  8. Electroball

    Electroball lurker Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    Sure:



    ; ===============================================================
    ; Mega PCM Driver Include File
    ; (c) 2012, Vladikcomper
    ; ===============================================================

    ; ---------------------------------------------------------------
    ; Variables used in DAC table
    ; ---------------------------------------------------------------

    ; flags
    panLR = $C0
    panL = $80
    panR = $40
    pcm = 0
    dpcm = 4
    loop = 2
    pri = 1

    ; ---------------------------------------------------------------
    ; Macros
    ; ---------------------------------------------------------------

    z80word macro Value
    dc.w ((Value)&$FF)<<8|((Value)&$FF00)>>8
    endm

    DAC_Entry macro Pitch,Offset,Flags
    dc.b Flags ; 00h - Flags
    dc.b Pitch ; 01h - Pitch
    dc.b (Offset>>15)&$FF ; 02h - Start Bank
    dc.b (Offset_End>>15)&$FF ; 03h - End Bank
    z80word (Offset)|$8000 ; 04h - Start Offset (in Start bank)
    z80word (Offset_End-1)|$8000 ; 06h - End Offset (in End bank)
    endm

    IncludeDAC macro Name,Extension
    Name:
    if strcmp('extension','wav')
    incbin 'dac/Name.Extension',$3A
    else
    incbin 'dac/Name.Extension'
    endc
    Name_End:
    endm

    ; ---------------------------------------------------------------
    ; Driver's code
    ; ---------------------------------------------------------------

    MegaPCM:
    incbin 'MegaPCM.z80'

    ; ---------------------------------------------------------------
    ; DAC Samples Table
    ; ---------------------------------------------------------------

    DAC_Entry $08, Kick, dpcm ; $81 - Kick
    DAC_Entry $08, Snare, dpcm ; $82 - Snare
    DAC_Entry $0E, Samp8387, dpcm ; $84 - Hi-Tom
    DAC_Entry $14, Samp8387, dpcm ; $85 - Medium Tom
    DAC_Entry $1A, Samp8387, dpcm ; $86 - Low Tom
    DAC_Entry $20, Samp8387, dpcm ; $87 - Floor Tom
    DAC_Entry $04, Samp87, dpcm ; $88 - Cymbal
    DAC_Entry $06, Samp88, dpcm
    DAC_Entry $0A, Samp89, dpcm
    DAC_Entry $14, Samp8A8B, dpcm
    DAC_Entry $1B, Samp8A8B, dpcm
    DAC_Entry $08,Samp8C, dpcm
    DAC_Entry $0B,Samp8D8E, dpcm
    DAC_Entry $11,Samp8D8E, dpcm
    DAC_Entry $08,Samp8F, dpcm
    DAC_Entry $03,Samp90919293, dpcm
    DAC_Entry $07,Samp90919293, dpcm
    DAC_Entry $0A,Samp90919293, dpcm
    DAC_Entry $0E,Samp90919293, dpcm
    DAC_Entry $06,Samp94959697, dpcm
    DAC_Entry $0A,Samp94959697, dpcm
    DAC_Entry $0D,Samp94959697, dpcm
    DAC_Entry $12,Samp94959697, dpcm
    DAC_Entry $0B,Samp98999A, dpcm
    DAC_Entry $13,Samp98999A, dpcm
    DAC_Entry $16,Samp98999A, dpcm
    DAC_Entry $0C,Samp9B, dpcm
    DAC_Entry $0A,Samp9C, dpcm
    DAC_Entry $18,Samp9D, dpcm
    DAC_Entry $18,Samp9E, dpcm
    DAC_Entry $0C,Samp9F, dpcm
    DAC_Entry $0C,SampA0, dpcm
    DAC_Entry $0A,SampA1, dpcm
    DAC_Entry $0A,SampA2, dpcm
    DAC_Entry $18,SampA3, dpcm
    DAC_Entry $18,SampA4, dpcm
    DAC_Entry $0C,SampA5, dpcm
    DAC_Entry $09,SampA6, dpcm
    DAC_Entry $18,SampA7, dpcm
    DAC_Entry $18,SampA8, dpcm
    DAC_Entry $0C,SampA9, dpcm
    DAC_Entry $0A,SampAA, dpcm
    DAC_Entry $0D,SampAB, dpcm
    DAC_Entry $06,SampAC, dpcm
    DAC_Entry $10,SampADAE, dpcm
    DAC_Entry $18,SampADAE, dpcm
    DAC_Entry $09,SampAFB0, dpcm
    DAC_Entry $12,SampAFB0, dpcm
    DAC_Entry $18,SampB1, dpcm
    DAC_Entry $16,SampB2B3, dpcm
    DAC_Entry $20,SampB2B3, dpcm
    DAC_Entry $0C,SampB4C4, dpcm
    DAC_Entry $0C,SampB5, dpcm
    DAC_Entry $0C,SampB6, dpcm
    DAC_Entry $18,SampB7, dpcm
    DAC_Entry $0C,SampB8B9, dpcm
    DAC_Entry $18,SampBA, dpcm
    DAC_Entry $18,SampBB, dpcm
    DAC_Entry $18,SampBC, dpcm
    DAC_Entry $0C,SampBD, dpcm
    DAC_Entry $0C,SampBE, dpcm
    DAC_Entry $1C,SampBF, dpcm
    DAC_Entry $0B,SampC0, dpcm
    DAC_Entry $0F,SampB4C4, dpcm
    DAC_Entry $11,SampB4C4, dpcm
    DAC_Entry $12,SampB4C4, dpcm
    DAC_Entry $0B,SampB4C4, dpcm

    MegaPCM_End:

    ; ---------------------------------------------------------------
    ; DAC Samples Files
    ; ---------------------------------------------------------------

    IncludeDAC Kick, bin
    IncludeDAC Samp8387,bin
    IncludeDAC Snare, bin
    IncludeDAC Samp87,bin
    IncludeDAC Samp88,bin
    IncludeDAC Samp89,bin
    IncludeDAC Samp8A8B,bin
    IncludeDAC Samp8C,bin
    IncludeDAC Samp8D8E,bin
    IncludeDAC Samp8F,bin
    IncludeDAC Samp90919293,bin
    IncludeDAC Samp94959697,bin
    IncludeDAC Samp98999A,bin
    IncludeDAC Samp9B,bin
    IncludeDAC Samp9C,bin
    IncludeDAC Samp9D,bin
    IncludeDAC Samp9E,bin
    IncludeDAC Samp9F,bin
    IncludeDAC SampA0,bin
    IncludeDAC SampA1,bin
    IncludeDAC SampA2,bin
    IncludeDAC SampA3,bin
    IncludeDAC SampA4,bin
    IncludeDAC SampA5,bin
    IncludeDAC SampA6,bin
    IncludeDAC SampA7,bin
    IncludeDAC SampA8,bin
    IncludeDAC SampA9,bin
    IncludeDAC SampAA,bin
    IncludeDAC SampAB,bin
    IncludeDAC SampAC,bin
    IncludeDAC SampADAE,bin
    IncludeDAC SampAFB0,bin
    IncludeDAC SampB1,bin
    IncludeDAC SampB2B3,bin
    IncludeDAC SampB4C4,bin
    IncludeDAC SampB5,bin
    IncludeDAC SampB6,bin
    IncludeDAC SampB7,bin
    IncludeDAC SampB8b9,bin
    IncludeDAC SampBA,bin
    IncludeDAC SampBB,bin
    IncludeDAC SampBC,bin
    IncludeDAC SampBD,bin
    IncludeDAC SampBE,bin
    IncludeDAC SampBF,bin
    IncludeDAC SampC0,bin
    even



    The samples come straight from the s3k disassembly.

    P.S: I didn't comment them all yet.
     
    Last edited by a moderator: Jun 23, 2013
  9. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    372
    Location:
    New places, newer motivation
    I ran into this problem with S1's scrap brain Zone, you have done nothing wrong. I was talking to Nineko about this not to long ago either. It'd save both of us the time posting, so I'll be quoting it.

    I took a quick look at the disasm, and played track $05 in the sound test. Just as I thought, the cymbal sample plays directly after the "Come on" causing it to cut off. The only way to fix it would either be changing the track with SMPS, or swapping the samples as a whole. I'll keep in touch when I can. I'll ask more in a PM later. I'm wanting to help yu out with your hack if possible... with your permission of course.
     
     
    Last edited by a moderator: Jun 23, 2013
  10. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    You actually slightly altered my quote to include the "(or whichever song)" part, which made it grammatically wrong. Just for the grammar nazis out there, I'll paste my original quote:

    But yeah, that sounds like it.
     
  11. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    372
    Location:
    New places, newer motivation
    I did that so it wouldn't confuse him. But yes, I did alter it.

    EDIT: I noticed this bug in every single hack of Sonic 1 I've played in the last 3 years. But had forgot about it until I caused it again.

    http://www.youtube.com/watch?v=N62Po3Sjbzw&feature=youtu.be
    Its redundant to ask, but has anyone fixed this yet?
     
    Last edited by a moderator: Jun 24, 2013
  12. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    I... didn't even know such a bug existed :O
     
  13. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    372
    Location:
    New places, newer motivation
    I was playing TheInvisbleSun's Sonic 1: colours edition when I remembered the existence of this bug. You can even avoid losing a shield if timed exactly, oddly enough, he is still thrown back as if he was damaged. I haven't been able to mimic this with rings, so I have come to the conclusion that the bug doesn't work under this situation.
     
    Last edited by a moderator: Jun 24, 2013
  14. JoenickROS

    JoenickROS ROS is on hiatus. (...again) Member

    Joined:
    Feb 5, 2012
    Messages:
    924
    You know there is a similar bug like this in Sonic 2, but with rings, sometimes, very rarely I might add so it would be to hard to show in a video, if you are about to hit an enemy, while running or walking and barely brush that enemy, before you jump out of the way, half of the scattered rings sound plays but Sonic doesn't lose his rings.

    Edit: yeah I cant explain it any better, sorry.

    Edit2: Oh and I have a question about SonED2, sometimes when I use the import feature for the chunks and stuff, while its importing, SonED2 crash's and says it has to close, does anyone have any idea on what would be causing it to occasionally crash, while importing? I use  v11-9-19, if that helps in any way.
     
    Last edited by a moderator: Jun 24, 2013
  15. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,779
    Location:
    italy
    The death/rings bugs might be investigated with TAS tools, frame advance features can help to find out the exact time when it can happen.
     
  16. Galagoid

    Galagoid Newcomer Trialist

    Joined:
    Jun 27, 2013
    Messages:
    7
    Location:
    Granite Falls, WA
    Ok I'm new here on the hacking scene, but I was just wondering what the easiest way to edit the title screen in Sonic 2 would be. Is it possible through SonMapEd?
     
  17. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    PlanED would be more suitable for Sonic 2's title screen (for mappings anyway).
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    879
    Sonic 2's title screen consists of both plane mappings and sprite mappings. You'll need both PlaneED and SonMapEd depending on which parts you want to edit.
     
    Last edited by a moderator: Jun 29, 2013
  19. Galagoid

    Galagoid Newcomer Trialist

    Joined:
    Jun 27, 2013
    Messages:
    7
    Location:
    Granite Falls, WA
    I downloaded PlaneEd and it works great, but how do I edit each tile's art?
     
    Last edited by a moderator: Jul 1, 2013
  20. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    You can't edit the art itself if that's what you mean, you can only alter the mappings. Your best bet is to import/replace art via SonMapED and then putting it together using PlaneED.
     
    Last edited by a moderator: Jul 2, 2013