don't click here

S&KC Mod Loader

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Apr 28, 2015.

  1. Redhornett

    Redhornett

    Member
    13
    0
    0
    Neofeud - a point-and-click adventure made with Adventure Game Studio
    Should it come up with the patches message in the corner on bootup like vanilla SegaPCReloaded, if we're using both files?

    It now comes up without the disc error message (which SegaPCReloaded should have fixed) but the notification doesn't come up. Does the modder supersede that bit?

    EDIT: Never mind. It works - I just need to delete the desktop shortcut created by SPCR each time I change mods.
     
  2. Redhornett

    Redhornett

    Member
    13
    0
    0
    Neofeud - a point-and-click adventure made with Adventure Game Studio
    Here's a few new sound-related mods for you.

    The first couple are more 'fun' and the second one is a complete soundtrack port.

    Goes With Everything and Knuckles: https://gamebanana.com/sounds/41804
    Subterranean Homesick Blues and Knuckles: https://gamebanana.com/sounds/41803
    Sonic 3D Flickies' Island Saturn Soundtrack: https://gamebanana.com/sounds/41802
     
  3. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL

    I've finally done it. I've found the fourth Chaos Emerald cause of the weird Special Stage scrolling.
    The scrolling effect is achieved through a two-part process: the plane mappings are swapped out every second frame, and the palette is rotated every fourth frame. The first part of this process is done by a block copy of mapping data stored from a RAM buffer to VRAM, aided by a table (which also contains palette pointers for some reason). On the MD, it looks like this:
    Code (Text):
    1. SS_Pal_Map_Ptrs:dc.l $FFFF5500
    2.         dc.l Pal_SStage_3_1
    3.         dc.l $FFFF5DC0
    4.         dc.l Pal_SStage_3_1
    5.         dc.l $FFFF5500
    6.         dc.l Pal_SStage_3_2
    7.         dc.l $FFFF5DC0
    8.         dc.l Pal_SStage_3_2
    9.         dc.l $FFFF5500
    10.         dc.l Pal_SStage_3_3
    11.         dc.l $FFFF5DC0
    12.         dc.l Pal_SStage_3_3
    13.         dc.l $FFFF5500
    14.         dc.l Pal_SStage_3_4
    15.         dc.l $FFFF5DC0
    16.         dc.l Pal_SStage_3_4
    17.         dc.l $FFFF5500
    18.         dc.l Pal_SStage_3_5
    19.         dc.l $FFFF5DC0
    20.         dc.l Pal_SStage_3_5
    21.         dc.l $FFFF5500
    22.         dc.l Pal_SStage_3_6
    23.         dc.l $FFFF5DC0
    24.         dc.l Pal_SStage_3_6
    25.         dc.l $FFFF5500
    26.         dc.l Pal_SStage_3_7
    27.         dc.l $FFFF5DC0
    28.         dc.l Pal_SStage_3_7
    29.         dc.l $FFFF5500
    30.         dc.l Pal_SStage_3_8
    31.         dc.l $FFFF5DC0
    32.         dc.l Pal_SStage_3_8
    33.         dc.l $FFFF9B00
    34.         dc.l Pal_SStage_3_1
    35.         dc.l $FFFF9240
    36.         dc.l Pal_SStage_3_1
    37.         dc.l $FFFF8980
    38.         dc.l Pal_SStage_3_1
    39.         dc.l $FFFF80C0
    40.         dc.l Pal_SStage_3_1
    41.         dc.l $FFFF7800
    42.         dc.l Pal_SStage_3_1
    43.         dc.l $FFFF6F40
    44.         dc.l Pal_SStage_3_1
    45.         dc.l $FFFF6680
    46.         dc.l Pal_SStage_3_1
    In the PC version, for some inexplicable reason, all the pointers to FF5DC0 were replaced with more pointers to FF5500, meaning the game never reads new mappings for the floor patterns (except when turning), and so the floor only "moves" when the palette rotation kicks in on every fourth frame, while the sprites move every second frame as usual, causing a noticeable desync. I've added a small bit of code to the mod loader to restore the correct data to that table, so now the Special Stage scrolls normally.

    I've also integrated the palette fixes as mod loader options, which may make it easier for mods to implement fancy palette tricks, or even open the door to an expanded palette in the future. You can delete the accurate palette mod, unless you really want that BTTF3 mode.
     
    Last edited: Dec 17, 2019
  4. Blue Spikeball

    Blue Spikeball

    Member
    2,519
    1,060
    93
    Good job, special stages render just fine now.

    The palette fixes don't seem to work for me, though. I tried all palette settings in the mod loader, and the colors still look like unmodded S&KC, rather than the Accurate Palette mod.
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Actually, you're half right. There was a bug that prevented the palette setting from being read properly, but that caused it to default to the accurate palette always.
     
  6. JamesRock7

    JamesRock7

    Pending Member
    0
    0
    0
    Chile
    I've read and played with several of your S&KC mods, and I am amazed on the big possibilities they open. Maybe, following these applications, someone could add Amy from this hack to the playable characters, make a more massive hack like these or maybe generate the long long desired Sonic 3 & Knuckles version for Android (not emulator) that Taxman and Stealth could not produce probably due to MJ known legal issues (but that finally produced Sonic Mania as consequence). I would love to have more programming abilities and time for helping to achieve these, but at least this is my desire. Meanwhile, with my son we are having really lots of fun with your mods. Thank you very much :)
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Hey, so there's that new Sonic 3 prototype going around, and it's got some different/new music in it, so ValleyBell and I put it in the mod loader.
     
    Last edited: Nov 24, 2019
    • Like Like x 5
    • Useful Useful x 2
    • Informative Informative x 1
    • List
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
  9. Blue Spikeball

    Blue Spikeball

    Member
    2,519
    1,060
    93
    The game slows down for me whenever I run it at a resolution higher than 2x, whether it's windowed or fullscreen. Do you know if there's any way of fixing that?
     
  10. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Do you have Sega PC Reloaded on it?
     
  11. Blue Spikeball

    Blue Spikeball

    Member
    2,519
    1,060
    93
    Well, yeah. Thanks, I just removed the SPCR patch and the slowdowns are gone.

    Edit: Unfortunately, now I'm getting flickering on fullscreen. Do you know how to fix it?
     
    Last edited: Nov 26, 2019
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Wait what? I thought that you didn't have SPCR. I have it on and I don't get any slowdown. Also AFAIK fullscreen doesn't even work without SPCR on modern Windows.
     
    • Informative Informative x 1
    • List
  13. Blue Spikeball

    Blue Spikeball

    Member
    2,519
    1,060
    93
    Oh, I thought you meant that SPCR was the cause.

    Weird. I get slowdowns (but no flicker) with SPCR. Without it the slowdowns are gone and I can still go fullscreen but it flickers like crazy.
     
    Last edited: Nov 26, 2019
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Yeah, I have no idea then. The only person I can think of who might be able to help you is Korama but good luck with that.
     
  15. Blue Spikeball

    Blue Spikeball

    Member
    2,519
    1,060
    93
    Thanks for trying anyway.
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    Actually, it looks like SPCR has some settings for VSync and such in SONIC3K.ini, try using these:
    Code (Text):
    1. [Timing]
    2. VSyncEnabled=0
    3. VSyncReverse=0
    4. VSyncSleep=8
    5. TimerSleep=8
    6. TimerResolution=1
     
  17. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,791
    376
    63
    SonLVL
    It was pointed out to me that the palette in the pachinko bonus stage is wrong in S&KC. A quick look into it reveals that the palette animation for this stage is a rare (maybe the only) example of a compressed palette in the game, and the port developers made no changes to the file or the code when porting it, causing the bytes to be read in the wrong order (MD is big endian, PC is little endian), resulting in the game swapping the red and blue values and completely discarding the green values. So naturally I made a mod to fix it.
    Before:
    upload_2023-9-26_11-4-45.png
    After:
    upload_2023-9-26_11-5-1.png

    Download the mod here. I didn't make it a feature of the mod loader because it might interfere with mods making custom palettes.
     
    • Like Like x 5
    • Useful Useful x 1
    • List
  18. Bobblen

    Bobblen

    Member
    429
    216
    43
    Another nice fix for the connoisseur's version of Sonic 3 & Knuckles. Us Windows 95 folks were doing beta music before it was cool