Basic Questions and Answers Thread

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

  1. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    Out of curiosity, what makes Labyrinth Zone Act 3 loop vertically? I plan on doing something with this information.
     
  2. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    I made a guide that answers your question! The TL;DR is that the level's top boundary in most levels are set to $0000, but levels that wrap vertically are set to $FF00
     
    TheInvisibleSun likes this.
  3. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    edit: I'm stupid, please trash.
     
  4. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    I can't locate where in Sonic 1's code it is determined that a level should vertically wrap at the Y position of $7FF. Anyone care to point me to the right direction?
     
  5. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    From what I can tell, it's just an inherent aspect of the way the game handles boundaries. Seeing as the boundary is set to a negative number, the game just goes ahead and wraps back.
     
  6. RandomName

    RandomName Newcomer Member

    Joined:
    Jun 3, 2020
    Messages:
    21
    Location:
    Russia
    In Sonic 1 label loc_66CC handles wrapping over top of the screen and label loc_6700 handles wrapping under bottom of the screen
     
    Giovanni likes this.
  7. Mike B Berry

    Mike B Berry A grandiose return Member

    Joined:
    Jun 6, 2012
    Messages:
    377
    Location:
    New places, newer motivation
    Okay so this is probably a weird question as I have no knowledge of this stuff, or at least, I forget the specific details.

    Long story short. I found an old box of 3 1/2 inch floppy disks. And one of them has a lable featuring my first ever rom hack. As you know, the medium is rather obsolete for the most part, considering I used to mod S2 on a Season 2 windows 98 PC with an aftermarket diskette writer. As in, it was taken from a Windows XP with custom parts on it as a gut project. My issue these days is the actual lack of driver support. I know I could buy one of those usb floppy readers. Just not sure what I am exactly after.

    Edit* I had a download link up on Retro about this years ago, about a month before I even considered joining SSRG, but the link has since expired and nobody has it lying around. Thinking it might be worth trying to preserve it if the data hasn't succumbed to disk rot or demagnetization. Regardless of how crap the rom hack actually is, I feel it's an important thing to note.

    Further note to the edit* I didn't ask a question. How would I go about this?
     
    Last edited: Jan 17, 2021
  8. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    So I want to port some stuff from Sonic CD to Sonic 1 (Nothing major, yet) and I have an idea of where I'm going with it, but I'm at a small road block; How do I go about extracting the MMDs from the CUE? I was told to quote "Open it as a virtual drive" but I wasn't given details on how to do that.

    Edit: Had the MMDs donated to me. I still want to learn how to rip the MMDs for myself though because I also need prototype files.
     
    Last edited: Jan 22, 2021
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I told you on Discord, use WinCDEmu.
     
    RandomName and DeltaWooloo like this.
  10. Scrap Sorra

    Scrap Sorra Well-Known Member Member

    Joined:
    Sep 18, 2020
    Messages:
    112
    Location:
    Development Hell
    Was porting the sonic 3 rings manager to sonic 2 and I got this lovely page of errors

    > > >s2.asm(29139): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM).w,a1
    > > >s2.asm(29139): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM).w,a1
    > > >s2.asm(29152): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM).w ; set start addresses in both ROM and RAM
    > > >s2.asm(29152): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM).w ; set start addresses in both ROM and RAM
    > > >s2.asm(29153): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM_P2).w
    > > >s2.asm(29153): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM_P2).w
    > > >s2.asm(29163): error: short addressing not allowed
    > > > move.l a1,(Ring_end_addr_ROM).w ; set end addresses
    > > >s2.asm(29163): error: addressing mode not allowed here
    > > > move.l a1,(Ring_end_addr_ROM).w ; set end addresses
    > > >s2.asm(29164): error: short addressing not allowed
    > > > move.l a1,(Ring_end_addr_ROM_P2).w
    > > >s2.asm(29164): error: addressing mode not allowed here
    > > > move.l a1,(Ring_end_addr_ROM_P2).w
    > > >s2.asm(29189): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM).w,a1
    > > >s2.asm(29189): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM).w,a1
    > > >s2.asm(29209): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM).w ; update start addresses
    > > >s2.asm(29209): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM).w ; update start addresses
    > > >s2.asm(29215): error: short addressing not allowed
    > > > movea.l (Ring_end_addr_ROM).w,a2 ; set end address
    > > >s2.asm(29215): error: addressing mode not allowed here
    > > > movea.l (Ring_end_addr_ROM).w,a2 ; set end address
    > > >s2.asm(29229): error: short addressing not allowed
    > > > move.l a2,(Ring_end_addr_ROM).w ; update end address
    > > >s2.asm(29229): error: addressing mode not allowed here
    > > > move.l a2,(Ring_end_addr_ROM).w ; update end address
    > > >s2.asm(29232): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM_P2).w ; otherwise, copy over P1 addresses
    > > >s2.asm(29232): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM_P2).w ; otherwise, copy over P1 addresses
    > > >s2.asm(29233): error: short addressing not allowed
    > > > move.l a2,(Ring_end_addr_ROM_P2).w
    > > >s2.asm(29233): error: addressing mode not allowed here
    > > > move.l a2,(Ring_end_addr_ROM_P2).w
    > > >s2.asm(29237): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM_P2).w,a1
    > > >s2.asm(29237): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM_P2).w,a1
    > > >s2.asm(29257): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM_P2).w ; update start addresses
    > > >s2.asm(29257): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM_P2).w ; update start addresses
    > > >s2.asm(29259): error: short addressing not allowed
    > > > movea.l (Ring_end_addr_ROM_P2).w,a2 ; set end address
    > > >s2.asm(29259): error: addressing mode not allowed here
    > > > movea.l (Ring_end_addr_ROM_P2).w,a2 ; set end address
    > > >s2.asm(29273): error: short addressing not allowed
    > > > move.l a2,(Ring_end_addr_ROM_P2).w ; update end address
    > > >s2.asm(29273): error: addressing mode not allowed here
    > > > move.l a2,(Ring_end_addr_ROM_P2).w ; update end address
    > > >s2.asm(29284): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM).w,a1 ; load start and end addresses
    > > >s2.asm(29284): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM).w,a1 ; load start and end addresses
    > > >s2.asm(29285): error: short addressing not allowed
    > > > movea.l (Ring_end_addr_ROM).w,a2
    > > >s2.asm(29285): error: addressing mode not allowed here
    > > > movea.l (Ring_end_addr_ROM).w,a2
    > > >s2.asm(29288): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM_P2).w,a1 ; load start and end addresses for P2
    > > >s2.asm(29288): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM_P2).w,a1 ; load start and end addresses for P2
    > > >s2.asm(29289): error: short addressing not allowed
    > > > movea.l (Ring_end_addr_ROM_P2).w,a2
    > > >s2.asm(29289): error: addressing mode not allowed here
    > > > movea.l (Ring_end_addr_ROM_P2).w,a2
    > > >s2.asm(29407): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM).w,a0
    > > >s2.asm(29407): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM).w,a0
    > > >s2.asm(29408): error: short addressing not allowed
    > > > move.l (Ring_end_addr_ROM).w,d7
    > > >s2.asm(29408): error: addressing mode not allowed here
    > > > move.l (Ring_end_addr_ROM).w,d7
    > > >s2.asm(29468): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM).w,a0
    > > >s2.asm(29468): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM).w,a0
    > > >s2.asm(29469): error: short addressing not allowed
    > > > move.l (Ring_end_addr_ROM).w,d7
    > > >s2.asm(29469): error: addressing mode not allowed here
    > > > move.l (Ring_end_addr_ROM).w,d7
    > > >s2.asm(29485): error: short addressing not allowed
    > > > movea.l (Ring_start_addr_ROM_P2).w,a0
    > > >s2.asm(29485): error: addressing mode not allowed here
    > > > movea.l (Ring_start_addr_ROM_P2).w,a0
    > > >s2.asm(29486): error: short addressing not allowed
    > > > move.l (Ring_end_addr_ROM_P2).w,d7
    > > >s2.asm(29486): error: addressing mode not allowed here
    > > > move.l (Ring_end_addr_ROM_P2).w,d7
    > > >s2.asm(29574): error: short addressing not allowed
    > > > move.l a1,(Ring_start_addr_ROM).w
    > > >s2.asm(29574): error: addressing mode not allowed here
    > > > move.l a1,(Ring_start_addr_ROM).w\

    I have absolutely no clue what's going wrong here, I even checked and I did the entire thing correctly. If someone could enlighten me on how I can fix it that'd be very appreciated.

    EDIT: It's been fixed
     
    Last edited: Jan 27, 2021
  11. Inferno

    Inferno Rom Hacker Member

    Joined:
    Oct 27, 2015
    Messages:
    132
    Location:
    Sky Base Zone, South Island
    So, uh, AS can be really weird at times about these kind of things, so, uh, do you have those equates actually defined?
     
  12. Scrap Sorra

    Scrap Sorra Well-Known Member Member

    Joined:
    Sep 18, 2020
    Messages:
    112
    Location:
    Development Hell
    I have the equates defined although they may not be in the exact places that they should but I think they are

    I attached my constants asm as a txt so it'll upload so you can skim through it for yourself and see if there's anything wrong because I have no way of telling


    EDIT: it's fixed
     

    Attached Files:

    Last edited: Jan 27, 2021
  13. ReZZ

    ReZZ Newcomer Trialist

    Joined:
    Jan 22, 2021
    Messages:
    8
    So uh, i have been working on a rom hack and i found this glitch in which, In a Special Stage Sonic doesnt even appear!?I have no idea what's going wrong?
    Can someone help me to know what's wrong?
    Screenshot_20210128-121313_MDemu.jpg
     
    Last edited: Jan 28, 2021
  14. Speems

    Speems Well-Known Member Member

    Joined:
    Mar 14, 2017
    Messages:
    83
    Location:
    Rochester Hills, MI
    Just spitballin an idea, but can the credits in a Sonic 1 hack use both the special font and debug/level select fonts? Like the primary credit font for the headers (Lead Programmer, Music, Art, whatever) and the level select font for the actual names (Carol Yas, Yuji Naka, Bigisland, etc)? Attachment is a mockup to illustrate what my question is meant to represent.
    [​IMG]
     
  15. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You can make the credits do whatever you want.
     
  16. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    The Sonic Community Hacking Guide says this of Sonic 1's levels:


    Which makes me wonder the following: How do I make this number of bytes larger? Would it prevent the background layer from appearing in the foreground if Sonic were to reach an X coordinate of $4000?
     
  17. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You would have to expand the size of the RAM allocated for the level layout, which in turn would require moving or shrinking various things around the level layout data in RAM, and then edit all the routines that access the level layout to account for the increased length.
     
  18. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    Here's the changes I've made so far:
    - I've increased the RAM available for levels
    - I've extended the levels vertically
    - In the same spots where I changed the code to support vertically extended levels, I also replaced this line:

    Code:
            andi.w    #$7F,d0
    With this:

    Code:
            andi.w    #$FF,d0
    However, I'm not entirely sure of what else I should change.

    My best guess is that I would need to change the following lines:


    Code:
    LevelLayoutLoad2:
            lea    $80(a3),a3    ; do next row
    Code:
            lea    (v_lvllayout+$40).w,a3 ; RAM address for background layout
    However, the in game results tell me this is not enough.
    Could I have missed something? Is my procedure completely wrong?

    EDIT: I noticed that by changing the last line to v_lvllayout+$80, the BG will overlap with the foreground starting from x=0 and y=$100, regardless of whether I change $80(a3),a3. I assume I missed something related to background rendering, but I've no clue where else to look.
     
    Last edited: Feb 1, 2021
  19. RandomName

    RandomName Newcomer Member

    Joined:
    Jun 3, 2020
    Messages:
    21
    Location:
    Russia
    Your code looks like you're also trying to extend amount of chunks per line to $100,so you should lea $100(a3),a3 instead of lea $80(a3),a3 in LevelLayoutLoad2
     
  20. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    311
    Location:
    Italy
    Which is what I did. However, the only thing it amounts to is breaking the foreground layout, leaving the background completely intact. (Still replacing the foreground if I reach specific coordinates). What I assume is that something else needs to be changed as well, but I've no clue where to look.
    EDIT: All I know is that the vertical distance between foreground chunks is increased if I set the value to $100.
     
    Last edited: Feb 1, 2021