Basic Questions and Answers Thread

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

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Are all the errors on lines with 'pc' as an offset? This is a case where the assembler's multi-processor nature has obfuscated the error. What it really means is the affected instructions' data is too far away for the 68000's 8-bit displacement, so the assembler thinks you're trying to use the 16-bit displacement that's available on later 68k models. The solution to this is to load the address into a register and then use a register-relative offset. However, the assembler has a tendency to spit out spurious errors of that type in response to another error, so only one of them may really be an error.
     
  2. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Your description seems accurate, but it still doesn't seem to apply; the extra code I added does not appear to separate any of the instructions from the data list they're referencing. In fact, all the errors only occur on lines of code after the extra lines, and none of the data lists seem to be placed before the code that uses them. The lines themselves don't seem like they'd be that big of a deal either; I'm adding the following to the init code of Obj26 (monitors)

    Code:
        tst.b    (<byte sized ram address>).w    ;flag set?
        beq.s    +                ;if not, run as normal
        jmp    DeleteObject        ;despawn monitor
    +
    
     
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Try jmp (DeleteObject).w?
     
  4. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    This happens to me constantly on the S&K Git disassembly. The best way I found to fix this error is...

    Code:
        rept 40
            dc.l    $00000000,    EntryPoint,    ErrorTrap,    ErrorTrap    ; 0
        endm
    Adding that after the real header fixes it. It somehow shifts the data around just as much to get rid of that error, and you will have to set that rept number back to 0 once it starts happening again. Unfortunately, nobody has ever suggested me with an actual workaround, and I suspect this is an ASS bug caused by usage of some macros inside of the disassembly in some way, but I have no way of testing this.
     
    Pacca, EMK-20218 and MarkeyJester like this.
  5. Prilix

    Prilix A normal romhacker In Limbo

    Joined:
    Sep 19, 2017
    Messages:
    20
    Location:
    Argentina
    Hi, is there any way to add the special stage 7th and emerald in sonic 1?
     
  6. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Well Sonic Team managed to add a seventh Emerald and Special Stage when developing Sonic 2, so there must be some way to do it.
     
  7. Prilix

    Prilix A normal romhacker In Limbo

    Joined:
    Sep 19, 2017
    Messages:
    20
    Location:
    Argentina
    Well, I will try to.
     
  8. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    So... after a couple years of inactivity, I finally got my passion back and I actually started using disassemblies and asm properly (back in the day I did most edits, though minor they were, via hex.) Anyway, after spending hours reading articles on Retro and searching for it, I could not, for the life of me, find the answer to this: How to change Zone Order in S3K with the (skdisasm, most recent GitHub) dissassembly?

    I did this previously (still have a few hacked ROMs back from 2011/2012) in S3K with ESEII (Esreal Editor) so there is definitely a way to do this... I scanned through most of the .asm files in the dissassembly, including the main (the big one) but to no avail. Can someone point me in the right direction? (I just need to know where the code is located and I will pick up from there, being it a .bin or .asm file).

    Also, thanks to everyone in SSRG (now Sonic Research) for keeping my account, I was afraid it might be gone after all this time. :)
    (and mainmemory, if you read this, I am sorry if I left you hanging with the thing I was gonna do, but I still have the pics and I got the AIZ1 rocks ones to show in the latest SonLVL build, so there's that at least.)
     
  9. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    Welcome back!
    In regards to changing the level order, I might be off, but there should be something that compares the levels to values in the code. Changing those values should change it.
    Still, you'd have to make sure the Angel Island Intro isn't hardcoded to happen on the first zone if Angel island is no longer the first zone.
    And I checked SonicRetro as well, apparently it did exist, but I think it was removed due to not working with the newer disassembly and the creator of the how-to was not able to update it.
     
  10. Jdpense

    Jdpense Custom Title Member

    Joined:
    Jan 2, 2013
    Messages:
    97
    Location:
    No where-ville
    As far as I know for the S3K Git Hub disassembly, there is no ".bin" or ".asm" file for changing the zone order. The only possible way to change the zone order is to find the correct instance of "jsr (Startnewlevel).l" (which corresponds to the correct cutscene in the game) and change the value of d0. Which will look similar to this:
    Code:
            move.w    #$XXYY,d0    ; XX = zone ID, YY = act ID
            jsr    (StartNewLevel).l
    Every instance of "jsr (Startnewlevel).l" is embedded within the Sonic3k.asm file. For example to change a zone order of FBZ to SOZ to something like FBZ to ICZ you would have do the following.

    Change this:
    Code:
    loc_70938:
            move.w    #$800,d0     ; <
            jsr    (StartNewLevel).l
    To this:
    Code:
    loc_70938:
            move.w    #$500,d0    ; <
            jsr    (StartNewLevel).l
    Hopefully this helps!
     
  11. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    Yeah, it's good to be back, thanks! Hmmm... that might have been a good read, that article.

    Ah, StartNewLevel!! That makes sense. (I don't think I would get there). I am gonna try this as soon as I get home. Thank you, this is sure to be helpful! ^^
     
  12. Prilix

    Prilix A normal romhacker In Limbo

    Joined:
    Sep 19, 2017
    Messages:
    20
    Location:
    Argentina
    Well,I advance with the 7th emerald.

    First:in ''Special stage layout pointers'',I add this

    Code:
    ; ---------------------------------------------------------------------------
    ; Special stage    layout pointers
    ; ---------------------------------------------------------------------------
        dc.l SS_1
        dc.l SS_2
        dc.l SS_3
        dc.l SS_4
        dc.l SS_5
        dc.l SS_6
        dc.l SS_7   <------
        even
    And in Sonic1.Asm,this

    Code:
    ; ---------------------------------------------------------------------------
    ; Special layouts
    ; ---------------------------------------------------------------------------
    SS_1:        incbin    sslayout\1.bin
            even
    SS_2:        incbin    sslayout\2.bin
            even
    SS_3:        incbin    sslayout\3.bin
            even
    SS_4:        incbin    sslayout\4.bin
            even
    SS_5:        incbin    sslayout\5.bin
            even
    SS_6:        incbin    sslayout\6.bin
            even
    SS_7:        incbin    sslayout\7.bin  <------
            even
    Second:In the folder "sslayout", add this....

    upload_2018-7-12_19-39-35.png

    And,in sonic1.asm change the value of this code

    Code:
    cmpi.b    #6,($FFFFFE57).w ; do you have all 6 emeralds?
    by
    cmpi.b    #7,($FFFFFE57).w ; do you have all 7 emeralds? 
    This code is repeated several times, which must be changed to all.

    Well, until here comes.
     
  13. Tanman Tanner

    Tanman Tanner Well-Known Member Member

    Joined:
    Dec 23, 2016
    Messages:
    116
    Location:
    Buffalo, New York
    Huh, I didn't think it'd work that easily - but it could be because my mindset of working with Sonic 2 SMS and how it's extremely easy it is to add emeralds (since it wasn't until Sonic Chaos when Special Stages wete added) compared to other Sonic games, primarily the 16-bit ones.
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    brickrick likes this.
  15. TheCatman21

    TheCatman21 Newcomer Trialist

    Joined:
    Mar 15, 2017
    Messages:
    5
    Not Sure if this is the right place for this; but I, for the life of me, can't get the Midi Driver for Mid2SMPS working with FL Studio.
    There also isn't a lot of talk on this subject as it seems to be self-explanatory but I can't get it working!
     
    Last edited: Jul 13, 2018
    Unused Account likes this.
  16. AkumaYin

    AkumaYin Well-Known Member Exiled

    Joined:
    Aug 21, 2014
    Messages:
    157
    What exactly are you having trouble with? Some tips I've learned that may help with the process are:

    - The driver's folder (the one with the DLL) needs to be in a file path without spaces, as many programs won't be able to find it if it is.
    - If you've made sure that there are no spaces in the file path and FL Studio (or any other sequencing program) won't pick it up on the list of MIDI devices, try downloading a fresh copy of the driver and doing an install from there. I struggled with this issue for hours yesterday and this is what finally fixed it, so it's worth a shot.
    - While I shouldn't need to state that you need admin privileges to install the driver, you *must* be running FL Studio as administrator in order to use the driver, otherwise you'll experience a crash.
    - There is an option to install for 64-bit programs, but they don't seem to work with the driver anyway. So you'll need to be using the 32-bit version of FL Studio.

    As for how exactly to use it in FL Studio, press F10 and you'll get a list of MIDI input and output devices. It'll be under output, along with Microsoft MIDI Mapper and Microsoft GS Wavetable Synth. Map it to a port; I would recommend using port 1, but note that you'll have to manually switch MIDI channels to that port in order to get output from the driver. I'll assume that you know how to use the driver's configuration tool to load the data mid2smps uses into the driver for playback, just keep in mind that whenever you make changes to any of the files being used (such as modifying the instrument bank you're using in 2612edit), you'll need to refresh the device list (from the MIDI device menu) to hear the changes.

    Another thing to note is the MIDI channels used by the driver; 1 to 5 represent their respective FM channels, 10 is used for DAC, and 11 and 12 (and 13?) are used for PSG. Also keep in mind that the MIDI patches used for PSG envelopes count up from 1, so Acoustic Grand Piano would play back the first envelope in the list. It takes a bit of time, but I'm sure you'll figure it out if you haven't already.

    Hope this helps.
     
    Unused Account likes this.
  17. TheCatman21

    TheCatman21 Newcomer Trialist

    Joined:
    Mar 15, 2017
    Messages:
    5
    Thank you You answered my question exactly
    I know I didn't give much information but thanks again!
     
    AkumaYin likes this.
  18. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    This may be a problem that ends up fixing itself, but, in my Sonic 1 hack, I removed every enemy and other level specific objects, the bosses, and some other objects as well as the continue screen. I've removed every reference to those assets as well. Now, the music freezes on a note when a sound effect is played, sound effects don't work, the Sega sound is garbage, and on rare occasions, a little bit of garbage data is added to the VRAM. I am using Sonic 3K's sound driver.
     
  19. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    That's great and all (Might actually keep this in mind for Kyukyoku, to be honest.) But there are two things I'm wondering.
    1: You do realize you have to also make an actual 7th Chaos Emerald object--no, objects, for all it's physical apperiences. That sounds easy, right? Well, not this time. You're going to have to figure out how to position it on the results screen, which, trust me, $800 is harder to understand than "40 pixels to the right" So, pull out your scientific calculator and set it to Hex, it's going to be a long night. Even worse, the endings; You got to figure out how to make it float and spin like the others. Then Eggman needs to learn how to juggle 7 magic rocks than just 6. Copy and pasting can only get you so far, but what do I know?
    2: What do you suppose the maximum amount of Special Stages is? I predict 64, seems like a nice number that I usually associate with this tech. But I'll just have to toy around with this knowledge on my own.

    Final note, this reply took WAY too long to type. Currently, I'm restricted to using a SmartTV, long story, and typing with a remote is a huge pain in the arse. This post alone took 1 and a half hours to write. So, the nail of my thumb is starting to split, and the whole finger hurts. So I guess I'll be taking a nap after this. See you guys in like 2 months. Bye.
    -Idiot obsessed with Dark Sonic
     
  20. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    Wow, I just read the blog you linked, this is fantastic!! I'm really glad your program is going along so well. It's so much better to load the actual mappings instead of slapping a png file over the object (how I was doing, which now that I think of, it was really unpractical, since you would not have an input if you changed the graphics of the object :confused:). And to think it will also display guide blocks, like in the moving spikes, so you can pixel perfect its position? Seriously, props to you guys! SonLVL is the way to go! (Which reminds me, if he is Neo, does that make you Morpheus? :p)