Basic Questions and Answers Thread

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

  1. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Wow. This might be a good thing to talk to clownacy about...
     
  2. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    you mean like in the spindash tutorial when fixing the lamppost error right?

    so changing out

    move.w    #$2797,2(a0)

    to

    move.w    #($7820/$20),2(a0) (what I found to be blank in RAM)

    right?

    and also...

    http://www.dailymotion.com/video/x27ozqy_character-corruption-s1_videogames

    Richter & Nebula is corrupted & MZ crashes upon moving sonic

    I've used Character branching to load Map art & DPLC for each character.

    http://info.sonicretro.org/SCHG:Sonic_the_Hedgehog/RAM_Editing

    even looking at this to find an unused slot & either still corrupted or Just Loads Sonic (in the case of $FFFFD000 Sonic's offset, loads corrupted Richter instead of sonic.)

    I've used the adding extra character tutorial at the retro (old way i know.)

    What other ways are ther of loading other characters, one that seems better to use... or do I have to go on each routine with move.l #Map_Sonic in it, copy it all & make new loading routines for Richter & Nebula?
     
    Last edited by a moderator: Oct 10, 2014
  3. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    And if I were a newbie, I'd think those 20s were meant as decimal numbers.

    To give a correctly-notated and more to-the-point description, it's actually art_tile*$20, where art_tile is the object's location in VRAM and $20, or 32 for those not fluent in hex numbering, is the number to multiply by. It's best to use a hex calculator for the actual multiplication itself.
     
    Last edited by a moderator: Oct 11, 2014
  4. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    And if I were a newbie, I'd think those 20s were meant as decimal numbers.

    To give a correctly-notated and more to-the-point description, it's actually art_tile*$20, where art_tile is the object's location in VRAM and $20, or 32 for those not fluent in hex numbering, is the number to multiply by. It's best to use a hex calculator for the actual multiplication itself.



    like using the spindash tutorial when fixing the lampost glitch


    ...more code
    move.l #Map_obj29,4(a0)
    move.w #($CF28/$20),2(a0)
    ....more code

    used this in obj29 & still glitched.

    Edit: Started over again & will post on how the Points gets bugged out. I have a hunch it's the DMAqueue

    Edit2: Ported Sonic2's Art, map, DPLC & Anim to Sonic 1, First thing noticed is red points art on Sonic's Shoes. There's the case. Now comes the How to fix it
     
    Last edited by a moderator: Oct 12, 2014
  5. AkumaYin

    AkumaYin Well-Known Member Exiled

    Joined:
    Aug 21, 2014
    Messages:
    157
    @Pokepunch: Maybe you're not freeing up RAM properly...? If that's not the issue, then I don't know; that's just my guess.


    Still, you should probably take Pacguy's advice and ask Clownacy about it.
     
  6. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    No.


    If I knew what his problem was, I'd have said something already.
     
  7. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    ...I'm trying to even right now, but it seems I can't even, not even once can I.

    Ok, while I try to make work off the headache you're giving me, let's talk about this...and a few other things that will help you tremendously.

    1. Follow the tutorial and some of the comments made by Clownacy made about fixing a few things. http://forums.sonicretro.org/index.php?showtopic=32900&st=0&p=785268entry785268

    '2. Next, go into obj29 and look for it's init code. It seems you already started this portion, but I'm bout to tell you to fuck that (/$20) crap, as it doesn't tell you where in the VRAM the art is being loaded to.

    Replace this line of code

    Code:
    move.w  #($CF28/$20),2(a0)
    with this


    Code:
    move.w  #$55A,2(a0)
    Lastly, go into ArtLoadCues and find the Nemesis art, I'm gonna take a shot in the dark that it's Nem_Numbers, Nem_Points or something of that nature. You'll know when you see it.

    Change it's value to $AB40.

    Now go build and everything should be all good. If not go ahead and respond back, but this should fix your issue, as this is basically what I did before.

    Secondly, your character art issue, I say this every time, make a fucking separate character object altogether. It isn't that fucking difficult. Seriously man, stop with all these fucking checks. You'd have so much more success if you'd stop trying to adapt an old ass guide to a process that actually takes time and thinking. That old tutorial you keep using doesn't even "add" characters, it is just the same as a costume change.
     
    Last edited by a moderator: Oct 13, 2014
  8. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Turns out that I massively fucked my constants file without realising my mistake. Nothing to see here, move along. 
     
  9. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Well I haven't had to ask a question in awhile but I never really bothered with this since I never needed to. I've been wanting to go for a longer ghz1 as in just extending it not changing the original layout(at least not for now). I'm wondering though I extended the layout but I keep getting a freeze error when I play up to that point. I've checked to see if I placed an object wrong but nothing, which leads to me thinking there must be a level size limit.

    Could someone be so kind as to tell me what the limit is? I've never needed to extend the level as much as I changed the full layout usually so believe it or not its the first time I've ever come across this.

    Edit: Just incase anyone is wondering I did revert the level size back to normal to make sure it wasn't something else but it does seemed to be everytime I go beyond a certain point.
     
    Last edited by a moderator: Oct 13, 2014
  10. Devon

    Devon Down you're going... down you're going... Member

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    I'm not too sure on a limit for level size, but I do know that the limit for the amount of chunks used in a level is $52 (82), so it's probably that, due to the fact that $52 chunks would take up half of the RAM.
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    The level size limit is 64x8 chunks or $4000x$800 pixels (the same as an S2 level). SonLVL enforces this (though it can be changed in the ini if you've modified the game's coding), I don't know if SonED2 does.
     
  12. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Ah right ok so it could be the amount of chunks I've placed in the level?. I'll look into this thank you.
     
  13. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    How would I remove the S2 water surface object (or at least its art)? I want it to display S3K style, as I need the art space for other things.
     
  14. Shockwave

    Shockwave 3 Time Stones Member

    Joined:
    Dec 18, 2013
    Messages:
    121
    Location:
    LA, CA
    If you search Level_ChkWater, you'll find this:



    ; Level_ChkWater:
    tst.b (Water_flag).w ; does level have water?
    beq.s + ; if not, branch
    move.b #4,(Object_RAM+$380).w ; load Obj04 (water surface) at $FFFFB380
    move.w #$60,(Object_RAM+$380+x_pos).w ; set horizontal offset
    move.b #4,(Object_RAM+$3C0).w ; load Obj04 (water surface) at $FFFFB3C0
    move.w #$120,(Object_RAM+$3C0+x_pos).w ; set different horizontal offset
    +


    Comment all of those lines out. Then just remove the water surface art from the PLC list of the level your modifying.
     
  15. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    Wasn't the object there to mask the distorted pixels at the water surface? I know S3K occasionally pushes them to the overscan, allowing it to get away with it, but S2 doesn't, does it?
     
  16. Shockwave

    Shockwave 3 Time Stones Member

    Joined:
    Dec 18, 2013
    Messages:
    121
    Location:
    LA, CA
    I'm not gonna lie, I've never noticed any distorted pixels on the few occasions I've had water present without the surface object. And looking at both S2 and S3 water with the object absent, I don't see a big difference, if any at all. Feel free to point out something to me I might be missing though. It's 2 AM and my sleeping patterns have been shit recently, so I wouldn't be surprised if I overlooked something obvious.
     
  17. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,016
    Hardware quirk. I haven't seen it any of the emulators I use. I've seen the distortion even when the object is there, it's just that a flickering graphic helps distract from it.
     
    Last edited by a moderator: Oct 15, 2014
  18. Shockwave

    Shockwave 3 Time Stones Member

    Joined:
    Dec 18, 2013
    Messages:
    121
    Location:
    LA, CA
    Ah, okay, that would explain why I'm not familiar with such a quirk. I haven't played one of these games on actual hardware in years since it's just easier to load up an emulator. Thanks for letting me know about it.
     
  19. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    It looks perfect to me. The water surface is completely smooth. Maybe it has to do with LZ deformation?
     
  20. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    416
    Location:
    Town Creek, AL
    In that case... I have Richter as Obj02 now (or rather Obj01_Richter), what shread of code do i change to load Richter instead of Sonic?

    Since Nebula is Sonic, this won't change

    Looking to the Nick Arcade disassembly, I found this


    loc_3D6C: ; CODE XREF: ROM:00003D64j
    tst.w ($FFFFFFE8).w
    bne.s LevelInit_LoadTails
    ;cmpi.b #3,($FFFFFE10).w
    ;beq.s LevelInit_SkipTails ; funny how they skipped Tails in EHZ for the Nick Arcade show
    nop
    LevelInit_LoadTails: ; CODE XREF: ROM:00003D70j
    move.b #2,($FFFFB040).w
    move.w ($FFFFB008).w,($FFFFB048).w
    move.w ($FFFFB00C).w,($FFFFB04C).w
    subi.w #$20,($FFFFB048).w ; ' '

    This would mean $D040 (not $B040) would be Richter, am I right?