Basic Questions and Answers Thread

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

  1. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,546
    Seems you screwed up somewhere, take a look at this:http://info.sonicretro.org/SCHG_How-to:port_Knuckles_into_Sonic_2
     
  2. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    I can actually answer this: Simply use an unused SST (for example, $15, or $3B if you've followed the guide on fixing the buggy S2 spindash code) as the variable regarding Knuckles' gliding, then substitute that variable in whenever you have the default definition, which is $21 in that guide. For example:


    move.b #3,$21(a0)

    becomes:


    move.b #3,double_jump_flag(a0)

    You'll need to define double_jump_flag, as follows:


    double_jump_flag = $3B

    Replace $3B with the value you wish to use, but if you're gonna have Tails stalking him don't go above $3F. Weird shit happens if you do that.
     
    Last edited by a moderator: Sep 16, 2014
  3. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    Thanks very much, that fixed it.
     
  4. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,169
    Location:
    Limbo
    > > >s2.asm(40931): error: short addressing not allowed
    > > >     move.w    (Last_star_pole_hit).w,(FFFFF100).w
    > > >s2.asm(40931): error: addressing mode not allowed here
    > > >     move.w    (Last_star_pole_hit).w,(FFFFF100).w
     

    What's wrong with this line? I can't figure out what these errors mean. Often times, they just fix themselves when I fix other errors, but this time it's on its own...
     
  5. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    Slap a dollar sign ($) before the FFFFF100 and you'll be fine.
     
  6. DemonFox

    DemonFox Newcomer Trialist

    Joined:
    Aug 15, 2014
    Messages:
    5
    Odd fix - Didnt know where to post it

    Dont know if this is just an issue that I've had that is some weird bug with Kega Fusion, Windows 7 64bit, and ReadySonic (that does not seem to show up with other emulators), but when you add vladikcomper's optimised Nemesis decompression subroutine to Sonic 1 - The Sega Logo loads the incorrect colours (and randomly works at other times) i.e.

    [​IMG]

    I fixed the issue by moving the ClearScreen command up the chain during Sega Screen (just though I'd share the fix in case any one else saw this bug),

    P.S I have no idea why the error is caused or why this seems to fix it :s


    ; ---------------------------------------------------------------------------
    ; Sega screen
    ; ---------------------------------------------------------------------------

    GM_Sega:                ; XREF: GameModeArray
            move.b    #$E4,d0
            bsr.w    PlaySound_Special ; stop music
            bsr.w    ClearPLC
            bsr.w    PaletteFadeOut
            bsr.w    ClearScreen ;move this here to fix the issue
            lea    ($C00004).l,a6
            move.w    #$8004,(a6)    ; use 8-colour mode
            move.w    #$8200+(vram_fg>>10),(a6) ; set foreground nametable address
            move.w    #$8400+(vram_bg>>13),(a6) ; set background nametable address
            move.w    #$8700,(a6)    ; set background colour (palette entry 0)
            move.w    #$8B00,(a6)    ; full-screen vertical scrolling
            clr.b    (f_wtr_state).w
            move    #$2700,sr
            move.w    (v_vdp_buffer1).w,d0
            andi.b    #$BF,d0
            move.w    d0,($C00004).l
            bsr.w    ClearScreen ;remove from here

    Edit: I added this so anybody who gets this error wont bug vladikcomper for a fix, like I did (Sorry again), that is an emulator bug, not an error with his optimsed decompressors
     
    Last edited by a moderator: Sep 17, 2014
  7. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
    Actually you're probably better off posting it in vladicomper's original thread, it'll get lost in here.
     
  8. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    405
    Location:
    Russia
    He couldn't, as the original topic was automatically locked like any other topics on this forum that haven't been posted in for several months.

    Anyway, I've just opened it for you, DemonFox, so feel free: http://sonicresearch.org/forums/index.php?showtopic=3802

    Speaking of the bug itself, I tried to reproduce it on my end, using exactly the same disassembly that DemonFox had troubles with, but eventually I could never spot it in either emulators, even the exact same version of Kega running the same ROM had no issues at all, so I can see no other conclusion, rather than this being the rarest emulator bug of unknown nature, furthermore, a hardware-dependent one (as it didn't pop up in the same emulator on my laptop's hardware). Perhaps, there is an emulation option or other factor that makes this happen. Perhaps, there is a race condition somewhere that breaks backdrop color under inaccurate emulation, but again, I can't tell for sure, I haven't seen it myself, which is weird, so I have no idea how any type of race condition can break one palette color alone.

    Anyways, it's a nice workaround you've come up with. Good job!
     
  9. Vicious

    Vicious Newcomer Trialist

    Joined:
    Sep 10, 2014
    Messages:
    4
    Location:
    Bs. As.
    Hey thanks!! it work!

    Now I have a question, I found something interesting.

    [​IMG]

    why a piece of shadow sprite appears? Is this normal?

    and this 

    [​IMG]

    Super Sonic is not fly, he is runing... what happen? xD
     
    Last edited by a moderator: Sep 19, 2014
  10. ralakimus

    ralakimus pretty much a dead account Member

    Joined:
    Aug 26, 2013
    Messages:
    1,068
    It's loading the normal Sonic mappings. It should load Super Sonic's mappings.
     
  11. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    404
    Location:
    Town Creek, AL
    in an animation...

    ExampleAnimation: dc.b 9,1,2,3,4,$FE

    the first Byte is speed, followed by frames & whatever $FE is. My question is, what do i use at the end (possibly replacing $FE) to loop from one frame to the next like looping to 3 back to 4 and again repeditively?

    Also trying to Rebuild the Levelselect routine. Where do I look to (Besides levsel_controls if it's not this) to make sure when pressing a button on choices 1-3 won't go to GHZ1-3 unless... 

    Level = 0

    Act = 0-2

    Play is selected?

    can see here

    http://www.youtube.com/watch?v=J3eI8GbVSwI&list=UU8qKV0tDMC1d0DvMV5ECgag

    also how did this happen?

    I have as you can see...

    Level (no digits, needed)

    Act (No digits, needed)

    Play (which would play given level)

    followed by the rest of the levelselect,

    Sound Test (Still with digits, unmodified)

    Character (which changes between Sonic & Richter, no digits, needed)

    Playlist (Which changes playlists from Sonic Playlist to Custom Playlist1, no digits, needed) 

    and sometimes when going to a different selection (marble zone 1 for example) it won't play the level, instead plays a buggy sound.
     
    Last edited by a moderator: Sep 19, 2014
  12. Pokepunch

    Pokepunch That guy who posts on occasion Member

    Joined:
    Aug 7, 2009
    Messages:
    270
    Location:
    UK
    The Flag $FE is meant for exactly what you want.

    To loop you use $FE followed by the number of frames back you want to loop e.g.

    ExampleAnimation: dc.b 9,1,2,3,4,$FE,2
     
  13. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    404
    Location:
    Town Creek, AL
    And also i should mention that 1st selection goes to GHZ, all else does too but locks up. Having C in turbo mode & somehow the title's corrupted art appears over GHZ.
     
  14. DumbLemon

    DumbLemon am back Member

    Joined:
    Aug 19, 2014
    Messages:
    115
    How do I edit art from Sonic 1? I have looked at ioj's guide on how to import it but I am still stumped on how to edit the art and make custom art.  I also have another question. Has anyone got any tips on editing palettes? When ever I edit the color of palettes I go a bit over board and get a crap color. 

    As always, Help is appreciated.
     
    Last edited by a moderator: Sep 19, 2014
  15. TheStoneBanana

    TheStoneBanana The Bananaman Member

    Joined:
    Nov 27, 2013
    Messages:
    603
    Location:
    The Milky Way Galaxy
  16. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    404
    Location:
    Town Creek, AL
    I also have a SonMapEd question. Is there any way to fix an error i spotted? It don't read anything beyond FFF tiles.Richter & Another Sonic's Sprite has more than FFF tiles
     
  17. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    404
    Location:
    Town Creek, AL
    Map & plc anyway. sorry for double post. on mobile
     
  18. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    930
    Unless you optimize the code somehow, FFF is the limit. If you want you could add a new flag to load sepreate files and animations and clear the flag when needed so that nothing screwy happens or worse crashes.


    Edit: An example of said crash, would be it tries to play a animation with mapping frames that don't exist.
     
    Last edited by a moderator: Sep 19, 2014
  19. Deadalive

    Deadalive Newcomer Trialist

    Joined:
    Aug 3, 2014
    Messages:
    19
    Location:
    Green Hill Zone
    Is it possible to pick which colors the yellow springs use? I mean without changing the pallet. And also tell it which pallet line I want to use?
     
    Last edited by a moderator: Sep 20, 2014
  20. TheStoneBanana

    TheStoneBanana The Bananaman Member

    Joined:
    Nov 27, 2013
    Messages:
    603
    Location:
    The Milky Way Galaxy
    In a way, yes and no. You see, the yellow spring is merely the red spring running on the second pallete line.

    For proof, as an example, take a look at the first and second pallete line in action during GHZ.

    [​IMG]

    As you can see, the shades of red and yellow line up.

    Now, in terms of changing colors, you have some options.

    Firstly, you could change the pallete (which you already said you didn't want to do, plus it would change the ring's pallete, so no go.)

    Secondly, You could use new art that would use different colors on the pallete line, but as a consequence, the red spring would be different too.

    Or thirdly, duplicate the springs tiles and change the art to use different colors AND map it to use whatever pallete line you wish. The consequence of THIS would be that it would use up more VRAM, and may overwrite other art, depending on the size. (Though, I'm not definitely sure if it would get big enough to do so off the top of my head.)

    So, yes, it can be changed, but it's a tad complicated.