Basic Questions and Answers Thread

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

  1. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    Question: I'm guessing porting Blue Spheres to sonic 1 is not easy but I might try it if there's a tutorial about it, out there somewhere
     
  2. Dark Shamil Khan

    Dark Shamil Khan TASer lol Member

    Joined:
    Nov 7, 2021
    Messages:
    62
    Location:
    Pakistan
    I think Porting blue spheres in sonic 1 will be hard as it has alot sprites and alot of code to be fit in. If, for some reason, it's possible. Then yes, you can indeed port it. But for now, I don't see it being possible.
     
    JGamer2151 likes this.
  3. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    true indeed
     
  4. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    when I Try to enable PWM in Clownacy's Sonic 2 clone driver it spits out this.
    > > > _inc/SBZ Palette Scripts.asm(14) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc1, v_pal_dry+$50
    > > > _inc/SBZ Palette Scripts.asm(15) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc2, v_pal_dry+$52
    > > > _inc/SBZ Palette Scripts.asm(16) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc3, v_pal_dry+$6E
    > > > _inc/SBZ Palette Scripts.asm(17) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc5, v_pal_dry+$70
    > > > _inc/SBZ Palette Scripts.asm(18) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc6, v_pal_dry+$72
    > > > _inc/SBZ Palette Scripts.asm(19) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc7, v_pal_dry+$7E
    > > > _inc/SBZ Palette Scripts.asm(20) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc8, v_pal_dry+$78
    > > > _inc/SBZ Palette Scripts.asm(21) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc8+2, v_pal_dry+$7A
    > > > _inc/SBZ Palette Scripts.asm(22) mSBZp(2): error #1320: range overflow
    > > > dc.w Pal_SBZCyc8+4, v_pal_dry+$7C
    any fix?
     
  5. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    So, judging from the fact you said "PWM", it looks like your hack was ported to the 32X. This means that when the 32X is enabled, you are accessing ROM from a different location, and is banked. The first 512 KiB of ROM is located at $880000, and there's a switchable 1 MiB ROM bank at $900000.

    In Sonic 1, the Scrap Brain Zone palette cycle data pointers were stored as 16-bit words. While it can save up on space, this also limits the location of the palette cycle data to addresses 0-$7FFF in ROM, which is obviously not in that new address space for the 32X. You'll have to expand them to 32-bit.

    In _inc/SBZ Palette Scripts.asm, you'll see this macro:
    Code:
    mSBZp:    macro duration,colours,paladdress,ramaddress
        dc.b duration, colours
        dc.w paladdress, ramaddress
        endm
    Change it to this
    Code:
    mSBZp:    macro duration,colours,paladdress,ramaddress
        dc.b duration, colours
        dc.l paladdress
        dc.w ramaddress
        endm
    Now, the palette cycle data is stored as 32-bit addresses. Now, we must modify the palette cycle function to handle this.

    So, go to _inc/PaletteCycle.asm, and go to PalCycle_SBZ. Under "loc_1AE0", you'll see:
    Code:
            addq.l    #6,a2
    Which is used to advance to the next palette cycle script entry. Before, an entry was a total of 6 bytes, but now it's 8 after expanding the 16-bit address pointer to 32-bit. So change the 6 to an 8.

    Under "loc_1AF6", you'll see:
    Code:
            movea.w    (a2)+,a0
    This is what loads the palette cycle data pointer into address register a0. As you can see, it's reading a word. Change the ".w" to a ".l" for it to read a longword instead.

    Now, I will warn you: with the 32X enabled, you're probably gonna run into a lot of future issues, because it's quite a different development environment in some areas, and the 32X itself is quite a fickle and obnoxious piece of shit hardware. I'd personally advise you to wait until you are more comfortable with the stock Genesis development environment first.

    Regardless, this answer also exists if anyone ends up moving the palette cycle data for SBZ outside of the 0-$7FFF range in ROM, too.
     
  6. JGamer2151

    JGamer2151 Active Member Member

    Joined:
    Dec 1, 2020
    Messages:
    36
    Well, I guess this all goes without saying that the 32X shouldn’t exist in the first place. Legit, worst console/add-on ever.

    The Saturn would have been more successful in the United States and other countries if the 32X didn’t exist. How would you think of that? Sega would have survived from that hellhole if they have scrapped the 32X realizing how shit it was, but oh man, freaking SOA...

    NOTE: These are my hot takes on the 32X. I didn’t fully read the topic; my feelers have triggered. I’m sorry. Please trash.

    Also, who else would ever want to port their hacks over to the 32X? Is there any reason why? Self-torture? Sadomasochism? Or just wanting to see if their hacks break? Oh no...I’m getting back on hot takes again... Anyways, is there any reason why anyone would port their hack over to the 32X? "PWM"? Improved graphics? 3D polys? Who knows?


    I’ve never even thought about how much the 32X was that much of a disaster. A commercial failure that was.
     
    Last edited: Jan 13, 2023
  7. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    Nah, I, too, think that the 32X should have been aborted. I've actually worked with it before, and it's just a massive hacked together pain in the ass. My time would've been better spent sounding myself with an electric drill.

    The biggest problem with the 32X is that is fucks with the Genesis environment too much and for too little reward, in my opinion. The Genesis was not exactly designed to have the cartridge ROM be taken over by an add-on (see the RV flag). All the 32X does is give you stereo PWM sampling, 2 CPUs (put on the same bus with no bus contention protection!!!!!), and a frame buffer + palette. All graphics rendering and multi-channel audio mixing is done in software. It doesn't natively do scaling/rotation/3D rendering, it just gives you an environment """more suitable""" for making your own implementation in (theoretically, anyways, with the faster CPUs and frame buffer, but the implementation is so shit that it's still a pain anyways).
     
    Last edited: Dec 9, 2022
    JGamer2151 likes this.
  8. JGamer2151

    JGamer2151 Active Member Member

    Joined:
    Dec 1, 2020
    Messages:
    36
    Agreed. It's very hard to program for the 32X. That thing was pretty much a nightmare to begin with, especially for those poor developers. It’s no wonder why the 32X was considered a commercial failure, not to mention the fact that there were not a lot of games released for the system! That thing just went belly up by the time support dried up for the system.

    Also, on the subject of NayTheGamer's topic, If you have enabled PWM through the Clone Driver v2 and the hack was not ported over the 32X, is it possible that the errors are caused by that?
     
    Last edited: Dec 9, 2022
  9. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    Those errors would not have occurred if the data was not moved to a different address outside of the 0-$7FFF range. So, either they inserted something large enough that caused the data to shift out, or the hack was ported to the 32X.

    To be fair, according to the tech docs, it does appear that developers were given a whole library of functions for graphics and audio. However, the 32X was also clearly hacked together and rushed to market.
     
    JGamer2151 likes this.
  10. Nik Pi

    Nik Pi Well-Known Member Member

    Joined:
    Feb 14, 2022
    Messages:
    70
    Location:
    Kazakhstan
    Exist any way to edit graphics in Knuckles' Chaotix?
     
  11. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    I'm not using the 32X tech weirdly.
     
  12. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    PWM is a 32X feature.
     
  13. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    412
    Location:
    Town Creek, AL
    Question about the Two-Eight disassembly, the original by Marky Jester. I know the Layout & Collision indexes need to be uncompressed, from what format do I decompress?
     
  14. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    What's the data that you're trying to implement? Is it from Sonic 2? If so, they're both compressed in Kosinski.
     
  15. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    Sorry to be a pain in the but however:
    how do I add pylon to GHZ Because I've been trying a lot and I can't get it to work?
    what i mean is like tree's at the bottom, kinda like The Lost Sonic 1 TTS Build.
    Also I'm using the GitHub Disassembly by drx, hivebrain and Esrael L.G. Neto
     
  16. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    Star Light Zone just places a singular object 5C (the pylon object) at location (0, 0)

    [​IMG]

    The object itself auto positions itself based on the camera's position. It uses the "screen position" mode for rendering its sprite, which is normally reserved for things like the HUD. When it goes offscreen, it'll wrap around instead of disappearing, which gives the illusion of multiple pylons being in the stage.
     
    Last edited: Dec 12, 2022
    JGamer2151 likes this.
  17. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
  18. RobiWanKenobi

    RobiWanKenobi Python Developer Member

    Joined:
    Sep 10, 2022
    Messages:
    36
    Location:
    United States
    With that object in, you will need to edit the art and mappings to work for whatever you want the object to do. If it is a tree, edit the art to have enough tiles for trees and edit the mappings to work as a tree and not a weird pylon.
     
  19. NayTheGamer

    NayTheGamer next release coming on 3rd of November 2023 In Limbo

    Joined:
    Sep 30, 2022
    Messages:
    83
    yes I've actually been doing that before I went ahead to ask this question funny enough.
    also for the mappings you could just get SonMapEd and generate its mappings within the program.
    EDIT: you would also have to edit the pattern load cues for some zones like GHZ
     
  20. faith

    faith Well-Known Member Member

    Joined:
    Aug 26, 2013
    Messages:
    1,213
    I actually advise against using SonMapEd's mappings generator, because the way it imports an image and auto-generates the mappings is extremely unoptimal (in fact, SonMapEd itself says that the feature is incomplete, anyways). Every single tile is given its own sprite piece, which is absolutely not ideal, especially if you're working with large sprites. You can still at least manually set up the mappings and import an image over it, just avoid relying on the sprite sheet importer to generate the mappings for you. Flex 2, however, actually has an optimal mappings generator, and can optimize based on whether you want to save tiles or sprite pieces.