Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,548
    142
    43
    SonLVL
    This sounds like something you should be asking the AS User's Manual. The section on the macro directive says:
    Because of that, what you should do instead is if "controlport"=="".
     
  2. FireRat

    FireRat

    Nah. Fuck it. Misfit
    48
    9
    8
    Chile
    Mobius Evolution 2
    Thanks a lot! Hopefully the guide will make my life a lot easier as well
     
  3. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    COPIED FROM MY POST OVER AT SSRG

    Quick easy question based on THIS:
    http://sonicresearch...ic=3925&p=45577

    About the lost rings bit... I'm wondering if SpirituInsanum's fix is necessary for the Lost Rings if I do the following:

    Allocate a separate section of Object RAM specifically for the use of lost ring objects only. I believe this would solve that issue noted in this thread... AND also solve some other issues of objects not spawning when 32 lost rings are floating about... OR lost rings not spawning because there are too many other objects around.

    My point is.. is this a feasible thing to do?
     
  4. Clownacy

    Clownacy

    Tech Member
    834
    69
    28
    Oh man, this is gonna drive me crazy... Does anyone know of a way of automating the process of changing this

    Code (ASM):
    1.     jmp DisplaySprite
    into this

    Code (ASM):
    1.     jmp (DisplaySprite).l
    This alone has made porting the Sonic 1 disasm to AS a dreadful experience. I could search-and-replace explicitly "jmp DisplaySprite", but then, what about every other jmp with a different label? Doing the same but with every label still takes forever! Is there any text editor that functions like a macro; where the label is treat as generic, and simply a string that has to be surrounded in the 'address range brackets'?
     
  5. Super Egg

    Super Egg

    Master of MS Paint. Member
    311
    0
    16
    Tomball, TEXAS
    Sonic 2 beta 3 hoax
    Not use AS =P

    Honestly, there is no easier way. When it comes to conversion, you're gonna be here all day. Sheer curiosity, why are you making a S1 into AS disassembly? You're doing a bunch more work that doesn't need to be done.
     
  6. Clownacy

    Clownacy

    Tech Member
    834
    69
    28
    Something about SMPS2ASM, some incompatibility that I couldn't overcome with asm68k. Also, I'm more familiar with AS. And then there's the knowledge to be gained, such as how AS and asm68k's interpretation of macros are different. For example, /1, /2, etc appear to be nameless 'macro inputs'. Say you have "locVRAM Unc_Sonic, $8000" /1 would be Unc_Sonic, /2 $8000. I think I saw /0 being used as ATTRIBUTE somewhere.

    I've tried this before and failed, but now I have it down to a science. It's just this time consuming part that's driving me mad. And to think, in S2's disasm's changelog, someone did this to the whole disassembly and shrugged it off...
     
  7. MarkeyJester

    MarkeyJester

    A D V A N C E Resident Jester
    2,078
    211
    43
    Japan
    I've never been too sure on assembler macros, I don't think I want to be either...

    http://mrjester.hapisan.com/01_Public/JMPLABFIX.exe

    Try that, drag and drop your source file onto it (I.e. pass it as the first argument), but I recommend you back up your source first.
     
  8. Clownacy

    Clownacy

    Tech Member
    834
    69
    28
    Oh, I forgot one of my main reasons, Z80 assembling, I don't want to pre-assemble the DAC driver.

    Thanks a lot, Markey! I'll give it whirl.
     
  9. Tiddles

    Tiddles

    Diamond Dust Tech Member
    471
    0
    0
    Leicester, England
    Get in an accident and wake up in 1973
    Looks like you've got a solution anyway, but for academic purposes: I did this three years ago when I moved my Sonic 3 Complete stuff from the original Stealth disassembly on ASM68K to the then-SVN version on AS.

    My solution was to feed the following into my favourite regular-expression-supporting text editor EditPlus:

    Search: jmp\t([^(][^()\t;]+)([^)]*)$
    Replace: jmp\t(\1).l\2

    You might want to tweak it if your tab pattern is different or if there are some corner cases that get mashed up by this, but it worked for everything I had to do at the time.

    I, for one, embrace our new AS overlords. It may have some strange quirks, but at least it's capable to begin with. I do miss the raw speed of ASM68K though, especially when compiling tens of patch builds at a time.
     
  10. Clownacy

    Clownacy

    Tech Member
    834
    69
    28
    This "regular expression" seems very capable for the many laborious search-and-replaces I find myself doing, I'll be sure to research this. Thanks!

    EDIT: Got it working. For anyone using NotePad++, search "jmp\t([^(][^()\n;]+)$" and replace "jmp\t\(\1\).l" seem to work.

    EDIT2: Ah, turns out mine hates comments.
     
  11. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    Quick question, anyone else have issues with Regen on Windows 8?
     
  12. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    I could ask my mom if I can brrow her computer to give Regen a whirl... she has Windows 8.1. I'll report back with a quick run of my hack.
    Yes. Regen works fine on Win 8.

    OH... and quick question. Does the builder for the Git Sonic 1 disasm have any kind of auto fix for branches???
    I.E. if there is a jump instruction and the jump is short enough to use a word-length branch... will the builder replace the jump with a bra.w? Similar to how ASM68K treats addi instructions, and the like.

    If not, would it make a huge deal to leave something as a jump instead of a branch?
     
  13. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    Yeah, I meant 8.1. Sorry, I should have described my issue. Sometimes when I change the joypad buttons, sometimes when I load or close or reset a game, or every single time I load/save a state, it locks up and Windows tries finding a solution online. Playing a game works fine until I try to do one of these.
     
  14. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    Ah... yea my mom has 8, not 8.1... couldn't tell you.
     
  15. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    18,314
    409
    63
    Berkshire, England
    Learning Cymraeg
    Considering 8.1 is a free update and that 8.0 now isn't being supported, you should get that updated simply for security reasons.

    You can then do his test :v:
     
  16. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    Mom just ran her updates and stuff... according to her she's got 8.1 so I ran it again... Everything still seems on the up and up to me.
     
  17. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    Hm, must be my crappy laptop then. Thanks for trying.
     
  18. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    So... I saw a thread on SSRG on porting Tails tails... I myself had already ported it directly from Sonic 3K... BUT I am still stuck on one thing... The tails are not working properly in the Special Stage. I looked into how it is handled in the S3K equivalent (Slot Machine Stage) and I can't find too many differences between my code and that one... I'm stumped.

    Basically the problem is that the angle of the tails seems incorrect when in the air, and when rolling on blocks, the tails are gone altogether...
    Did any one else encounter a problem with this, and would you be able to assist me with fixing this?
     
  19. redhotsonic

    redhotsonic

    Also known as RHS Tech Member
    1,587
    9
    18
    United Kingdom
    YouTuber
    Got a screenshot at all?
     
  20. RetroKoH

    RetroKoH

    Member
    1,661
    17
    18
    Project Sonic 8x16
    I can post one... shot

    This is just before Tails hits a block... otherwise the tails are ok in the air.

    When on the wall, Tails appears normally, while his tails are just... not there.