Basic Questions and Answers Thread

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

  1. PeanutNoceda

    PeanutNoceda Well-Known member. Also known as CupcakeLove67 Member

    Joined:
    Sep 26, 2024
    Messages:
    139
    Location:
    My house
    Lets see…
    Can you check the 1111 line in Sonic.asm?
     
  2. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,465
    Location:
    your mom
    "Line 1111 emulator" means that an opcode starting with 0xF (1111 in binary) was executed. If I recall, opcodes starting with that (and also 0xA/1010) were reserved for future opcodes in newer generations of the m68k family. The vector table allows you to define a custom handler for such opcodes, as a way to have forwards compatibility (Comix Zone does use it for its own purposes, though). Line number information is not built into the ROM, as that would be hugely wasteful in terms of ROM space, and would easily go over the max ROM size limit.

    Sonic 1 doesn't do that and just simply displays an error. The 8 digit hex value is supposed to be the address right after where the crash happened, but it appears to be corrupt (not surprising, considering you aren't supposed to be triggering the Line 1010/1111 emulator exception, unless you are doing it on purpose for whatever reason), which means further debugging will be needed.

    You should give more information about your situation if you want the appropriate help. What did you implement or change? If you aren't sure, try to roll back changes until you can determine what's causing it. You can also analyze the call stack to help pin down where the crash might have happened at (vladikcomper's error handler would be VERY helpful in this instance, as it will give you a far more detailed crash message, so I recommend you install that).
     
    Last edited: Dec 18, 2024
    vladikcomper likes this.
  3. Joao Gamer

    Joao Gamer Well-Known Member Member

    Joined:
    Nov 22, 2023
    Messages:
    92
    Location:
    Brazil
    I
    I have added the Sonic 3 Sonic sprites using the guide by Clownacy, I also did port some songs from other sonic games And a imcomplete spindash, I might change some codes to see if i can fix it though
     
  4. Joao Gamer

    Joao Gamer Well-Known Member Member

    Joined:
    Nov 22, 2023
    Messages:
    92
    Location:
    Brazil
    Oh i fixed it, The error was because i added a extra song to music id 94, I'm not sure why this did happen though, i had the remove the song
     
  5. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,465
    Location:
    your mom
    Glad to hear it's been taken care of :)
     
  6. Carlos Iagnecz

    Carlos Iagnecz Newcomer Member

    Joined:
    Jun 16, 2023
    Messages:
    21
    Location:
    Brazil
    check the label 'PlaySoundID' inside of s1.sounddriver.asm

    Code:
    PlaySoundID:
            moveq    #0,d7
            move.b    SMPS_RAM.v_sound_id(a6),d7
            beq.w    StopAllSound
            bpl.s    .locret                ; If >= 0, return (not a valid sound, bgm or command)
            move.b    #$80,SMPS_RAM.v_sound_id(a6)    ; reset    music flag
        if FixBugs
            cmpi.b    #bgm__Last,d7        ; Is this music ($81-$93)?
        else
            ; DANGER! Music ends at $93, yet this checks until $9F; attempting to
            ; play sounds $94-$9F will cause a crash!
            ; See LevSel_NoCheat for more.
            cmpi.b    #bgm__Last+$C,d7    ; Is this music ($81-$9F)?
        endif
    just enable the FixBugs flag in sonic.asm or replace 'if FixBugs' until 'endif' with 'cmpi.b #bgm__Last,d7 ; Is this music ($81-$93)?'
     
    PeanutNoceda likes this.
  7. ChemicalStar

    ChemicalStar Newcomer Trialist

    Joined:
    Dec 20, 2024
    Messages:
    20
    im making sonic 1 rom hack sprites but im bigginer to rom hack and dont know alot thing to rom hack so if someone helps me im so happy!
    (im making she in sonic 1)
     

    Attached Files:

  8. PeanutNoceda

    PeanutNoceda Well-Known member. Also known as CupcakeLove67 Member

    Joined:
    Sep 26, 2024
    Messages:
    139
    Location:
    My house
    Hmm… i think i can help.

    first of all you need this things:

    Disassembly (i recomend Github Asm68k)
    And to port sprites Flex2 And SonMapED
     
  9. ChemicalStar

    ChemicalStar Newcomer Trialist

    Joined:
    Dec 20, 2024
    Messages:
    20
    thank you!
    and yes i used sonmap but when i edit sonic artunc bin file with sonmap it makes glich sound in sega sound
    and DMA queue appear in some sprites but i dont know how to fix and im stuck 0~0

    also when tried add sprite sheet in flex 2 mapping became like this and im stuck again

    upload_2024-12-24_9-43-56.png upload_2024-12-24_9-46-36.png
     
    Last edited by a moderator: Dec 24, 2024
    PeanutNoceda likes this.
  10. DeltaW

    DeltaW The noob next door Staff

    Joined:
    Aug 7, 2019
    Messages:
    416
    This is unrelated to the question above, but I recently had to go back to this thread, amongst a few others, to hide images with large resolutions under a spoiler tag and manually merge posts myself, with the above being one of them.

    There isn't a need to double-post within as it does clutter up the thread a bit and sometimes makes it hard to keep track of your progress whether you need help on one thing or another for instance. If you are missing any info and you wanna add some more, you can edit your previous post to add that info.

    Same thing with images, it covers the entire screen and also distracts someone from seeing the message you just typed. If you notice that the output of your image is large, you can click on the "Insert" button, create a spoiler tag and place the tag between the image like so:
    Screenshot 2024-12-24 014555.png

    Or just leave it as an attachment, which would be a viable option too.

    I don't want to keep reminding people about this so let's try to follow those guidelines.
     
    PeanutNoceda and Carlos Iagnecz like this.
  11. ChemicalStar

    ChemicalStar Newcomer Trialist

    Joined:
    Dec 20, 2024
    Messages:
    20
    i got it also someone moved my thread here and im begginer to here and i dont know me need post qna and help in where
     
  12. DeltaW

    DeltaW The noob next door Staff

    Joined:
    Aug 7, 2019
    Messages:
    416
    It was moved here as your question would be more fitting to ask under this thread much like any inconveniences you'll experience throughout your ROM hacking journey.
     
  13. Blue Gamer

    Blue Gamer Autistic Member Member

    Joined:
    Aug 16, 2024
    Messages:
    98
    Location:
    Mysterious Marble Zone, Bird Hill Island
    So... Is this a good newer version of my romhack?

    A bit ago on this thread I posted a demo of BHZ and I got feedback which that feedback definitely improved some stuff inside the game and I want more feedback on this version on what should be improved so I can implement it into my romhack!

    Changes: Mysterious Marble is now playable and tweaks to Bird Hill Zone's object layout.

    Also if there is a bug in this version, It might be fixed in the newest version since this is a build from December 16.

    (Also I am aware of a bug on the title screen that prevents you from getting past it on Blastem although Level Select can bypass it)
     

    Attached Files:

    Last edited: Dec 27, 2024
  14. Joao Gamer

    Joao Gamer Well-Known Member Member

    Joined:
    Nov 22, 2023
    Messages:
    92
    Location:
    Brazil
    I have a problem, I have ported the Knuckles uncompressed art, mapping, DPLCs and animations, But some animations (like jumping and skidding) are corrupted! is there any fix for that? By the way i followed the sonic 3 sprites guide by Clownacy, Here is a image:
    [/[​IMG] ]
     
    Last edited: Dec 27, 2024
  15. PeanutNoceda

    PeanutNoceda Well-Known member. Also known as CupcakeLove67 Member

    Joined:
    Sep 26, 2024
    Messages:
    139
    Location:
    My house
    Help (this happens in SBZ1)
    upload_2024-12-28_15-37-11.png
     
  16. Joao Gamer

    Joao Gamer Well-Known Member Member

    Joined:
    Nov 22, 2023
    Messages:
    92
    Location:
    Brazil
    (fixed it by doing the correct way please remove)
     
    Last edited: Jan 6, 2025
  17. BL3H

    BL3H idiot sandwich Member

    Joined:
    Jul 19, 2022
    Messages:
    53
    Location:
    Tails' Workshop, Angel Island
    Invalid pointers in the animation file. If you've edited anything, I'd say go back and check, otherwise, you should probably go through loc_D348 or Ani_Van. I've had my fair share of illegal instruction crashes in SBZ1.
     
  18. Blue Gamer

    Blue Gamer Autistic Member Member

    Joined:
    Aug 16, 2024
    Messages:
    98
    Location:
    Mysterious Marble Zone, Bird Hill Island
    I need Help in my romhack, BRZ In my Romhack has a graphics bug I don't know how to fix.

    SONIC THE HEDGEHOG ON BIRD HILL ISLAND 12_29_2024 7_09_32 PM.png

    It's just a copy of Bird Hills's art, blocks,chunks, and level layout so I don't know what's wrong with it.
     
    Last edited: Dec 30, 2024
  19. BL3H

    BL3H idiot sandwich Member

    Joined:
    Jul 19, 2022
    Messages:
    53
    Location:
    Tails' Workshop, Angel Island
    A quick question, in terms of following the code found on Plutiedev's website, I can't seem to figure out how to read a specific bit from a nibble in the mouse packet table, nor can I figure out how to display a sprite at specific coordinates saved in two free RAM addresses and have that update constantly. I'm hacking Sonic 1 by the way. Any ideas? I've already gotten really far, with custom cursor art and an object for it.

    The mouse is mapped to Port 2 as well.
     
  20. Carlos Iagnecz

    Carlos Iagnecz Newcomer Member

    Joined:
    Jun 16, 2023
    Messages:
    21
    Location:
    Brazil
    The easiest way to read a bit only is reading the byte then doing a andi for storing the bit and btst for just checking.
    Fortunately in Sonic 1 there are camera modes for objects so setting bytes 2 and 3 off in obRender ($01) renders it straight to the screen but the y axis will use obScreenY ($0C)