don't click here

Basic Questions & Answers thread

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

  1. Neo Geo MVS

    Neo Geo MVS

    Giga Power Pro-Gear Spec Oldbie
    37
    11
    8
    For emulators, take a look at this list. Some of them are still 32-bit and won't work, but I know at least Genesis Plus and Generator have been updated recently to work on Catalina.
     
  2. BlueSpeedsterYT

    BlueSpeedsterYT

    Now rendered in full 3D Member
    27
    2
    3
    Oh hey, it's me again. I am currently having a problem with making a Sonic CD like HUD working in my Sonic 1 Hack, if I did something wrong please let me know.

    Screenshot:
    [​IMG]
    Code (Text):
    1. ; ---------------------------------------------------------------------------
    2. ; Object 21 - SCORE, TIME, RINGS
    3. ; ---------------------------------------------------------------------------
    4.  
    5. Obj21:                    ; XREF: Obj_Index
    6.         moveq    #0,d0
    7.         move.b    $24(a0),d0
    8.         move.w    Obj21_Index(pc,d0.w),d1
    9.         jmp    Obj21_Index(pc,d1.w)
    10. ; ===========================================================================
    11. Obj21_Index:    dc.w Obj21_Main-Obj21_Index
    12.         dc.w Obj21_Flash-Obj21_Index
    13. ; ===========================================================================
    14.  
    15. Obj21_Main:                ; XREF: Obj21_Main
    16.         addq.b    #2,$24(a0)
    17.         move.w    #$90,8(a0)
    18.         move.w    #$108,$A(a0)
    19.         move.l    #Map_obj21,4(a0)
    20.         move.w    #$6CA-($FFFFFEBF*$10),2(a0)
    21.         move.b    #0,1(a0)
    22.         move.b    #0,$18(a0)
    23.  
    24. Obj21_Flash:                ; XREF: Obj21_Main
    25.         tst.w    ($FFFFFE20).w    ; do you have any rings?
    26.         beq.s    Obj21_Flash2    ; if not, branch
    27.         clr.b    $1A(a0)        ; make all counters yellow
    28.         jmp    DisplaySprite
    29. ; ===========================================================================
    30.  
    31. Obj21_Flash2:
    32.         moveq    #0,d0
    33.         btst    #3,($FFFFFE05).w
    34.         bne.s    Obj21_Display
    35.         addq.w    #1,d0        ; make ring counter flash red
    36.         cmpi.b    #9,($FFFFFE23).w ; have    9 minutes elapsed?
    37.         bne.s    Obj21_Display    ; if not, branch
    38.         addq.w    #2,d0        ; make time counter flash red
    39.  
    40. Obj21_Display:
    41.         move.b    d0,$1A(a0)
    42.         jmp    DisplaySprite
    If anyone knows a solution to this then please let me know.
    Thanks.
     
  3. Zeoinx

    Zeoinx

    Member
    43
    3
    8
    Just a question on a Hack theory. Do 32x Cartridges have more space for storage, and thus would be better suited for more advanced Rom hacks of Sonic titles? I was watching a Knuckle's Chaotix speed run for instance, and the music alone, as well as the huge pallet in most levels is pretty crazy, but I was just thinking that, with that amount of space, would it be possible to just make a "Sonic Complete Set" where the player has access to most of the unique characters *And Standard* you guys created for Sonic hacks, such as Sally, Rogue, Bunny, the Chaotix, etc, and can go through the entire Genesis Trilogy, or am I completly overestimating the amount of space available.
     
  4. Tanman Tanner

    Tanman Tanner

    Member
    10
    0
    1
    If I recall correctly, 32X cartridges can be 4-8MB in size. So yeah, they have more space for storage. But in my own opinion, if you're up for the task, you could take it to Sonic CD akin to Sonic Megamix if you want even more space and the ability to use Redbook audio.
     
  5. Zeoinx

    Zeoinx

    Member
    43
    3
    8
    I guess another silly theory question would be, is it possible to just "string" a long line of "Sonic & Knuckles" cartridges together to create a large "harddrive" of sorts to store a massive title? Again, these are just amusing questions Ive had for a while, and if not, what is stopping the "lock on" technology from working in that manner. Edit : And by cartridges, i mean in rom form of course.
     
  6. InvisibleUp

    InvisibleUp

    friendly internet ghost Member
    139
    13
    18
    You only have so much address space to work with. Beyond 4 megabytes (32 megabits) you have to do banking like the Super Street Fighter 2.
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    I really doubt the music takes up that much more space than on a regular MD, it's just SMPS plus PWM samples. The level art isn't that much better either, it's all drawn on the MD side, only sprites use the 32X's framebuffer.
    Plus, working with the 32X is a nightmare. The MCD is somewhat better in this regard, but doesn't allow you any extra colors and imposes restrictions on how your game can be structured.
     
  8. So hey guys. So I’m trying to make a Sonic 2 rom hack and so I’m trying to split my Sonic 2 rom with Xenowhirl’s disassembly,but I can’t split the ROM file because the split.bat file closes immediately after opening it without even saying an error occurred. That means that I can’t restore the SonED2 project files to normal,so yeah,I can’t restart my hack again.

    Please help me.
     
  9. Also downloading another rom,changing its format to bin and downloading the dissasembly again doesn’t work.
     
  10. Inferno

    Inferno

    Member
    36
    71
    18
    Sonic 1 Definitive
    I can already tell what the core of the issue is: it appears to be reading the wrong VRAM location. I see how you modified the instruction that sets where in VRAM the HUD is supposed to be reading and dumping VRAM to also subtract the VRAM location by an unused RAM location times 10. Now, I have to ask these questions to be able to help further:
    • What are you using $FFFFFEBF for?
    • Why are you multiplying it by 10?
    However, for the 2nd question, if the reason is what I suspect (getting the style of VRAM used in stuff like PLCs), then it should be 20, not 10. But eh, I don't really know.
    If you can supply more information, it'd be appreciated.
     
  11. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    What is the size limit to the DMA Queue in Sonic 2?
    I had a really dumb idea that didn't work, but to make a long story short, I wanted to change the Sonic 2 Final title Screen so the characters use DPLC's, to free up VRAM for custom backgrounds, and I spent a good couple hours on headaches(Turns out, adding title screen capability to zones not built for isn't as easy as it looks)

    Anyway, if I let the title sequence play out, things look buggy but somewhat normal. However, if I try to press start to skip the animation, this lovely thing happens:
    [​IMG]
    I'm guessing I'm hitting the DMA limit. Does this mean my hope of reducing the VRAM usage while still keeping the cute little animation isn't possible?
     
  12. Not sure myself, but I have a question: Are the tiles that Tails is corrupted with consistent? If so, I’m thinking you could overwrite those tiles with Tails’s art for the title screen, as a temporary workaround.
     
  13. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    Now that you mention it, I definitely could just work around it by "patching" that one frame of Tails' art in the needed vram section. If the animation starts, then all the needed PLC queues fine because Sonic's animation is done already. Thanks for the idea!
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Did you check that the art isn't crossing a 128KB boundary in the ROM? If that happens, the DMA wraps around to the beginning of the current 128KB block, leading to the wrong data being loaded.
     
  15. Caverns 4

    Caverns 4

    Member
    346
    0
    16
    Sonic: Retold
    Yeah, it's not that. Instead of wrapping around to the start of the bank, it's just stopping the queue. The weirdness your seeing on Tails is level art.
    Also, it doesn't happen if I just let the animation play out. That being said, just preloading Tails' last frame into memory in advance does "fix" the issue.

    I'm having one more really weird quirk though. Now when Tails first appears, this happens:
    [​IMG]
    Once he animates, he looks fine, and Sonic has no problems at all. Only when Tails first appears and moves up.

    Here's my DPLC code:
    Code (Text):
    1. ; loc_1B848:
    2. LoadObj0EDynPLC:
    3.     moveq    #0,d0
    4.     move.b    mapping_frame(a0),d0    ; load frame number
    5.    
    6.     cmp.b    objoff_14(a0),d0
    7.     beq.s    +
    8.     move.b    d0,objoff_14(a0)
    9.    
    10.     lea    (Obj0E_DPLC_TitleChars).l,a2
    11.     add.w    d0,d0
    12.     adda.w    (a2,d0.w),a2
    13.     move.w    (a2)+,d5
    14.     subq.w    #1,d5
    15.     bmi.s    +
    16.     move.w    #tiles_to_bytes(ArtTile_ArtUnc_TitleSprites),d4
    17.     cmpa.w    #IntroSonic,a0
    18.     beq.s Obj0E_ReadEntry
    19.     move.w    #tiles_to_bytes(ArtTile_ArtUnc_TitleTails),d4
    20. ; loc_1B86E:
    21. Obj0E_ReadEntry:
    22.     moveq    #0,d1
    23.     move.w    (a2)+,d1
    24.     move.w    d1,d3
    25.     lsr.w    #8,d3
    26.     andi.w    #$F0,d3
    27.     addi.w    #$10,d3
    28.     andi.w    #$FFF,d1
    29.     lsl.l    #5,d1
    30.     addi.l    #ArtUnc_TitleSprites,d1
    31.     move.w    d4,d2
    32.     add.w    d3,d4
    33.     add.w    d3,d4
    34.     jsr    (QueueDMATransfer).l
    35.     dbf    d5,Obj0E_ReadEntry    ; repeat for number of entries
    36. +
    37.     rts
    And here's how I'm calling it:
    Code (Text):
    1. Obj0E_Tails:
    2.     moveq    #0,d0
    3.     move.b    routine_secondary(a0),d0
    4.     move.w    Obj0E_Tails_CurrentState(pc,d0.w),d1
    5.     jsr    Obj0E_Tails_CurrentState(pc,d1.w)
    6.     bra.w LoadObj0EDynPLC
    7. ; ===========================================================================
    8. ; off_13074:
    Am I missing something..?

    EDIT: and it's not the 128KB issue. I tried shifting the data to no avail.
     
    Last edited: Jan 16, 2020
  16. This may be due to the patch.
    If Tails is animating, then the final frames of the animation should not be patched over the VRAM section. Only when you actively skip the animation should the patch activate.
     
  17. The Joebro64

    The Joebro64

    SAY HELLO TO MY CHOCOLATE BLEND Member
    2,973
    2,602
    93
    Quick question: I'm trying to play Sonic CD++ on Kega on my Mac, but the music ain't playing. Any idea how to fix this? (I also sort of want to know how to get a custom soundtrack working.)
     
  18. Wafer

    Wafer

    Find me on Twitter instead Member
    255
    75
    28
    From the Sonic CD++ patching instructions:
    At that point, you can replace the .wavs with whatever you like.
     
  19. The Joebro64

    The Joebro64

    SAY HELLO TO MY CHOCOLATE BLEND Member
    2,973
    2,602
    93
    Thanks, that should help. However, I still can't get the music working. Something bizarre: the CD music works perfectly in the opening cutscene (Sonic Boom, Sonic Boom, Sonic Boom...), but not anywhere in the game (besides the past, which I know is just because it's sequenced in PCM). Anyone know what the issue is?
     
  20. Wafer

    Wafer

    Find me on Twitter instead Member
    255
    75
    28
    @TheOneAndOnlyJoebro64 I just rebooted my MacBook to have a look. It works fine for me. It might help you to know that my TOTALLY LEGALLY OBTAINED image of SCD is completely devoid of .wavs or .isos, everything is just a .bin with a .cue file. Maybe if you can obtain a similar TOTALLY LEGAL image, you could test whether that works for you.

    Also, it's not really that weird that the intro movie sound is fine, since that's encoded in the video, it's not redbook (Sonic Boom + Japanese soundtrack = perfection).