Basic Questions and Answers Thread

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

  1. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Why not compare with the original Sonic 2 code and find out?
     
  2. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    I have a question but I dont know how to put it well Knuckles doesnt climb correctly on certian walls and it doesnt have to do with the chunks because sometimes climbing works correctly and sometimes it doesnt on the same chunks, could there a branch in Knuckles code that is causing Knuckles to act incorrectly on certain walls. What happens is when trying to climb up Knuckles climbs down insanly fast and it usully causings Knuckles to fall through the ground and die. Thats the best I can explain it.
     
    Last edited by a moderator: Apr 20, 2013
  3. 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'd personally just throw that old Tails code out the window. I did while working with BAB. First up, I'd go off and port the S2F Tails object. I can help you with that if you really want. But, just for a test, just go to below.

    Then, look around for this line and delete it.


    move.b #$2,($FFFFB040).w ; Load Tails Object

    May not be the same comment, but the code is the same. Now, go to a random monitor, like a life box or whatever, and add it at the end after the (PlaySound) or whatever sound it maybe.
     
  4. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    372
    Location:
    New places, newer motivation
    Ahh, I see what you did there. Nice test. I could provide a check to disable him for the the level in mind through the SkipTailsCheck routine as well, that way I would have to blunder away having to manually provide the loading code. Yes I'll be porting over the S2F version of Tails. May take me a bit, considering how I have never gone around to doing such a thing. Thanks for the help.
     
  5. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    All I can tell you is that certain flags aren't being cleared. If you mean when you're going up he gets forced down faster than you ejaculate, then yeah, it's a flag issue.
     
  6. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Alright thanks thats what I meant just didnt know how to explain it very well. Also "faster than you ejaculate" made me laugh lol
     
    Last edited by a moderator: Apr 22, 2013
  7. Alriightyman

    Alriightyman !!!!!!!!!!!!&#33 Member

    Joined:
    Oct 3, 2007
    Messages:
    150
    Location:
    USA
    Did you modify Knuckles in anyway?  If so, I would start looking there and see if you accidentally deleted something setting or clearing one of knuckles climbing flags.
     
  8. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    No I didnt modify it. Thomas even gave me a copy of his Knuckles code and I did not see anything missing or different (he does not have the issue).
     
  9. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    911
    Location:
    the united states. where else?
    In case anyone questions him, I did indeed give Joenick a copy of my code, since I didn't have the issue and figured maybe my code would fix the problem.
     
  10. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Having ported knuckles, on numerous occasions, starting from scratch, it's a flag issue. iirc anyway. Only two other things I remember tinkering with is some branches and the resetonfloor code.
     
  11. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    It actually could be the reset on floor routine ill have to check that out.
     
    Last edited by a moderator: Apr 22, 2013
  12. Electroball

    Electroball lurker Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    So I've got a little question:

    How'd I change the DAC samples in Sonic 1? I want to replace them with the Sonic 3 ones.
     
  13. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    God why the fuck does my hack do this shit now the objects in ARZ act 2 wont load fuck! would anyone be willing to go through my hack and bug fix it I know Im asking a lot but I dont know how to fix bugs. All I did was edit HTZs layout before ARZ act 2 objects didnt load why would editng another level effect a different level? It doesnt make any sense.

    Edit: To many objects throughout the whole file is there a way to increase Sonic 2s  maximum amount of objects aloud?.Has anyone else ran into this problem before? or is this not a Sonic 2 issue but a genesis capabilities issue? Btw there are 493 objects in HTZ act 2 in my hack, if thats too many let me know.
     
    Last edited by a moderator: Apr 23, 2013
  14. Irixion

    Irixion Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    670
    Location:
    Ontario, Canada
    Why in the hell do you have so many objects? Yeah, there's too many. Tone it the fuck down. Worst case scenario just replace your object files with some fresh ones and start over :V
     
  15. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Damn well there are like 6 different paths to take so thats why but there is a lot of monitors I could get rid of, plus in some zones Knuckles has his own paths.

    Edit: How many tops can you have exactily in an act?

    Edit: Ok I have removed a lot of objects ARZ act 2 objects load now but there is still the issue with SCZ (could be bc there is 398 objects in OOZ act 1) guess I need to remove some more objects from a level. Also fixs the Character select texts that would read Sonic and Tails twice but the second choice was knuckles . I cant believe too many objects could cause so many problems.
     
    Last edited by a moderator: Apr 23, 2013
  16. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    398 objects?  Can Sonic walk in your levels at all?  Must be very cramped! =P

    I don't know how many objects you can use exactly from the top of my head (at work at the moment), but it uses RAM space called "Object_Respawn_Table" (or something like that) and it's about $200 long iirc.

    You can always port the S3K object manager into your game.  That will allow you to put more objects into the game, and even help to speed your hack.
     
  17. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    Looks like I have a hg guide to convert to Xenowhirl then since I think the guide is only written for the hg disassembly should be easy enough though. Thanks RHS and good I have some annoying slow downs.


    Edit: Link,please, nevermind I mean SVN disassembly it's written for. Once I get to my laptop I will post the errors I have encountered. All having to do with addressing mode not aloud errors.


    Edit: Fixed a lot of errors before, then these came up after I fixed those first set of errors.
     
    Last edited by a moderator: Apr 23, 2013
  18. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I'm trying to port the Sonic 1 sound driver to Sonic 2 using the Xenowhirl 2007 disassembly and after following the guide word for word I ended up with 21 errors when building the rom.


    assembling s2.asm
    PASS 1
    s2.macrosetup.asm(201)
    mappings/sprite/obj34.asm(476)
    s2.sounddriver.asm(2807)
    S1 Sound Driver.asm(82)
    s2.asm(89016)
    PASS 2
    s2.macrosetup.asm(201)
    > > >s2.asm(1669): error: symbol undefined
    > > > Kos_Z80
    > > > lea (Kos_Z80).l,a0
    > > >s2.asm(1669): error: addressing mode not allowed here
    > > > lea (Kos_Z80).l,a0
    > > >s2.asm(12763): error: addressing mode not allowed on 68000
    > > > move.l word_A656(pc,d0.w),d1
    > > >s2.asm(12763): error: addressing mode not allowed here
    > > > move.l word_A656(pc,d0.w),d1
    mappings/sprite/obj34.asm(476)
    > > >s2.asm(51584): error: addressing mode not allowed on 68000
    > > > lea byte_28726(pc,d1.w),a1
    > > >s2.asm(51584): error: addressing mode not allowed here
    > > > lea byte_28726(pc,d1.w),a1
    s2.sounddriver.asm(2807)
    > > >S1 Sound Driver.asm(5): error: symbol undefined
    > > > SoundD0Index
    > > > Go_SoundD0: dc.l SoundD0Index
    > > >S1 Sound Driver.asm(30): error: symbol undefined
    > > > Music81
    > > > MusicIndex: dc.l Music81, Music82
    > > >S1 Sound Driver.asm(31): error: symbol undefined
    > > > Music83
    > > > dc.l Music83, Music84
    > > >S1 Sound Driver.asm(32): error: symbol undefined
    > > > Music85
    > > > dc.l Music85, Music86
    > > >S1 Sound Driver.asm(33): error: symbol undefined
    > > > Music87
    > > > dc.l Music87, Music88
    > > >S1 Sound Driver.asm(34): error: symbol undefined
    > > > Music89
    > > > dc.l Music89, Music8A
    > > >S1 Sound Driver.asm(35): error: symbol undefined
    > > > Music8B
    > > > dc.l Music8B, Music8C
    > > >S1 Sound Driver.asm(36): error: symbol undefined
    > > > Music8D
    > > > dc.l Music8D, Music8E
    > > >S1 Sound Driver.asm(37): error: symbol undefined
    > > > Music8F
    > > > dc.l Music8F, Music90
    > > >S1 Sound Driver.asm(38): error: symbol undefined
    > > > Music91
    > > > dc.l Music91, Music92
    > > >S1 Sound Driver.asm(39): error: symbol undefined
    > > > Music93
    > > > dc.l Music93
    > > >S1 Sound Driver.asm(79): error: symbol undefined
    > > > loc_7g
    > > > bne.w loc_7g
    > > >S1 Sound Driver.asm(81): error: symbol undefined
    > > > loc_71B9E
    > > > bne.s loc_71B9E
    S1 Sound Driver.asm(82)
    > > >S1 Sound Driver.asm(82): error: symbol undefined
    > > > sub_7
    > > > jsr sub_7
    > > >S1 Sound Driver.asm(82): warning: address is not properly aligned
    > > > jsr sub_7
    > > >S1 Sound Driver.asm(82): error: addressing mode not allowed here
    > > > jsr sub_7
    rom size is $200000 bytes (2048 kb). About $F158C bytes are padding.
    s2.asm(89016)

    1.46 seconds assembly time

    92582 lines source file
    118936 lines incl. macro expansions
    2 passes
    21 errors
    1 warning
    Press any key to continue . . .

    Any ideas on why this happened?
     
  19. JoenickROS

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

    Joined:
    Feb 5, 2012
    Messages:
    924
    I said I would get back to you guys on the addressing errors I encounterd trying to port the objects manager so here they are, just give me some insite on how to fix an addressing error with each branch instance. So in this case move.w, lea, and jsr


    > > >s2.asm(48079): error: addressing mode not allowed on 68000
    > > > move.w DashSpeed(pc,d0.w),inertia(a0)
    > > >s2.asm(48079): error: addressing mode not allowed here
    > > > move.w DashSpeed(pc,d0.w),inertia(a0)
    > > >s2.asm(48082): error: addressing mode not allowed on 68000
    > > > move.w DashSpeedSuper(pc,d0.w),inertia(a0)
    > > >s2.asm(48082): error: addressing mode not allowed here
    > > > move.w DashSpeedSuper(pc,d0.w),inertia(a0)
    > > >s2.asm(51478): error: addressing mode not allowed on 68000
    > > > move.b Obj06_CosineTable(pc,d0.w),d1
    > > >s2.asm(51478): error: addressing mode not allowed here
    > > > move.b Obj06_CosineTable(pc,d0.w),d1
    > > >s2.asm(59662): error: addressing mode not allowed on 68000
    > > > lea byte_28726(pc,d1.w),a1
    > > >s2.asm(59662): error: addressing mode not allowed here
    > > > lea byte_28726(pc,d1.w),a1
    > > >s2.asm(60247): error: addressing mode not allowed on 68000
    > > > move.w off_28ECA(pc,d0.w),d1
    > > >s2.asm(60247): error: addressing mode not allowed here
    > > > move.w off_28ECA(pc,d0.w),d1
    > > >s2.asm(60248): error: addressing mode not allowed on 68000
    > > > jsr off_28ECA(pc,d1.w)
    > > >s2.asm(60248): error: addressing mode not allowed here
    > > > jsr off_28ECA(pc,d1.w)
    > > >s2.asm(62521): error: addressing mode not allowed on 68000
    > > > move.w off_2ABCE(pc,d0.w),d1
    > > >s2.asm(62521): error: addressing mode not allowed here
    > > > move.w off_2ABCE(pc,d0.w),d1
    > > >s2.asm(62522): error: addressing mode not allowed on 68000
    > > > jsr off_2ABCE(pc,d1.w)
    > > >s2.asm(62522): error: addressing mode not allowed here
    > > > jsr off_2ABCE(pc,d1.w)
    > > >s2.asm(73468): error: addressing mode not allowed on 68000
    > > > move.b byte_33A92(pc,d0.w),mapping_frame(a0)
    > > >s2.asm(73468): error: addressing mode not allowed here
    > > > move.b byte_33A92(pc,d0.w),mapping_frame(a0)
    > > >s2.asm(73469): error: addressing mode not allowed on 68000
    > > > move.b byte_33A92+1(pc,d0.w),d0
    > > >s2.asm(73469): error: addressing mode not allowed here
    > > > move.b byte_33A92+1(pc,d0.w),d0
    > > >s2.asm(80144): error: addressing mode not allowed on 68000
    > > > move.w word_38810(pc,d1.w),d2
    > > >s2.asm(80144): error: addressing mode not allowed here
    > > > move.w word_38810(pc,d1.w),d2
    > > >s2.asm(80149): error: addressing mode not allowed on 68000
    > > > lea byte_38820(pc,d1.w),a1
    > > >s2.asm(80149): error: addressing mode not allowed here
    > > > lea byte_38820(pc,d1.w),a1
    > > >s2.asm(89051): error: addressing mode not allowed on 68000
    > > > lea Touch_Sizes(pc,d0.w),a2
    > > >s2.asm(89051): error: addressing mode not allowed here
    > > > lea Touch_Sizes(pc,d0.w),a2
    > > >s2.asm(89335): error: addressing mode not allowed on 68000
    > > > move.w Enemy_Points(pc,d0.w),d0
    > > >s2.asm(89335): error: addressing mode not allowed here
    > > > move.w Enemy_Points(pc,d0.w),d0
    > > >s2.asm(90610): error: addressing mode not allowed on 68000
    > > > move.w AnimPatMaps(pc,d0.w),d0
    > > >s2.asm(90610): error: addressing mode not allowed here
    > > > move.w AnimPatMaps(pc,d0.w),d0
    > > >s2.asm(90611): error: addressing mode not allowed on 68000
    > > > lea AnimPatMaps(pc,d0.w),a0
    > > >s2.asm(90611): error: addressing mode not allowed here
    > > > lea AnimPatMaps(pc,d0.w),a0

    there is a total of 58.
     
  20. redhotsonic

    redhotsonic Also known as RHS Retired Staff

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Ultima.  "error: symbol undefined" means that the label does not exist.  So for example:
     


    > > >s2.asm(1669): error: symbol undefined
    > > > Kos_Z80
    > > > lea (Kos_Z80).l,a0

     
     
    This means that "Kos_Z80" does NOT exist in your asm.  You're trying to load "Kos_Z80" into a0 when there is no such thing as "Kos_Z80".  All other "undefined" errors follow suit.
     
     
    Once you sorted the "undefined" errors, "warning: address is not properly aligned" and "addressing mode not allowed here" errors should sort itself out.
     

    Joenick69, yours is probably the same issue.
     
    Last edited by a moderator: Apr 23, 2013