don't click here

Basic Questions & Answers thread

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

  1. maru.

    maru.

    Member
    18
    6
    3
    Well, I don't even know what to say to this really, these are some wonderful news! I'll make sure to download it once it's done, it could genuinely be the definitive version of Sonic 2 for me, so I thank you for that, and I thank you for the original version of Sonic 2: S3 Edition aswell, since I'll admit my main issues with it were due to me being picky more than anything else, it's objectively excelent work nonetheless. I'll be looking forward to your new version, take your time and, once again, thank you so much.
     
  2. LuigiXHero

    LuigiXHero

    Member
    45
    33
    18
    Sonic 1 Character Pak
    Out of curiosity I was wondering why you haven't tried making your own? The best way to get what you want exactly is to just learn how to and do it. There are plenty of bug fixing guides and porting the s3k save system might take some work but there are people who would help.
     
  3. maru.

    maru.

    Member
    18
    6
    3
    I'd like to, and on paper it would be the perfect solution, but it's a completely new skill that would take time and effort to learn, and it's something I have pretty much zero prior experience with, also, with my college classes starting again for the new semester in about a week it won't be viable, since I won't have the time and energy to go out of my way to learn something new besides what I already have to study for, especially since the courses I'm taking have nothing to do with programming at all.
     
  4. Blaarg

    Blaarg

    Member
    5
    0
    1
    Hi! So I'm trying to replace the Invincibility and Sneakers theme in Sonic Mania. I got a little far. When I use data folder mode, the custom song works just fine, but when I turn it off, the Invincibility/Sneakers theme reverts back to the Sonic Mania version. What can I do so that I can hear my custom song without the data folder mode?
     
  5. how do you load palettes, art, tilemaps and display these on the screen on a mega drive?

    did you update data.rsdk? if not, the original game's files are there
    i'm pretty sure that there's a data.rsdk repacker for this game
     
    Last edited by a moderator: Jul 6, 2022
  6. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    Is there a way to add a Mega CD requirement to Sonic 1 or Sonic 3 & Knuckles?
     
  7. Devon

    Devon

    I'm a loser, baby, so why don't you kill me? Tech Member
    1,248
    1,419
    93
    your mom
    What for exactly? What are you looking to accomplish with the MCD? Are you still wanting to use a cartridge ROM or are you wanting to convert it to an actual CD game?
     
  8. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    An S1 hack (I know most ASM for Sonic 1)

    Bonus content if MCD is attached

    It's going to be a cartridge ROM.
     
  9. Devon

    Devon

    I'm a loser, baby, so why don't you kill me? Tech Member
    1,248
    1,419
    93
    your mom
    You're in luck, because a while back, I made a small little CD mode 1 library. You will still need to provide your own CD Sub CPU program, as the purpose of it is to provide a library on the Genesis side for initializing mode 1.

    Although, if you only need to detect if there's a MCD attached, but not actually work with it, then you only really need the FindMCDBIOS function to detect if it can find the BIOS.

    ...although, if you want something simpler, you can just check if "SEGA" is found at 0x400100, and/or if "BR" is found at 0x400180. The function is really meant to also retrieve the location of the Sub CPU BIOS code, based on the different BIOSes. There's also checking bit 5 of the hardware version register, but do be aware that that's basically for detecting if an expansion is attached to the Genesis. It will not account for newer cartridges that replicate the MCD, since that's not part of the expansion slot. The BIOS also would need to be present for those cartridges for the string check to work.
     
    Last edited: Jul 6, 2022
  10. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    I have the code at the ready but where would I put it in my S1 hivebrain assembly? (I'll simply rename the functions that start with @)
     
  11. Devon

    Devon

    I'm a loser, baby, so why don't you kill me? Tech Member
    1,248
    1,419
    93
    your mom
    The "@" labels are not individual functions, but rather local labels within that function. You can put the function itself anywhere, and just call it and perform the check during initialization.
     
  12. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    Alrighty then! I'll just edit this with results and see how it goes!

    I placed it after "ErrorWaitForC:" & "ArtText:" and there are zero errors! Thanks!

    One more question, how can I check if the MCD is attached and if it is, it branches to a routine? I already have the structure.

    Code (Text):
    1.         btst    #0,d2.b.w
    2.         beq.s    MCDStuff
    Above code doesn't let it build. It attempts to check if the parameter of "d2.b" is equivalent to 0 (the number given in the results of the MCD check)
    If it was 0, it would branch over to "MCDStuff" which is where it would unlock some bonus content and then continue through the game.

    EDIT: CODE REVISED AND FIXED. FUNCTIONS PROPERLY!

    EDIT 2: The game just bypasses the check!
     
    Last edited: Jul 6, 2022
  13. Devon

    Devon

    I'm a loser, baby, so why don't you kill me? Tech Member
    1,248
    1,419
    93
    your mom
    If you look at the README in my repository, you should see this:
    Code (Text):
    1.     jsr      FindMCDBIOS          ; Find the MCD's BIOS
    2.     bcs.s    @Skip                ; If it wasn't found, branch

    The carry flag gets set if the Sega CD was not detected. You could do something like this with a byte defined in RAM for the Sega CD detection flag:
    Code (Text):
    1.     jsr    FindMCDBIOS            ; Find the MCD's BIOS
    2.     scc    (mcd_detected).w       ; Set/clear detected flag

    The "scc" instruction will set "mcd_detected" to $FF if the carry flag is clear (aka if the Sega CD is detected), or 0 if the carry flag is set (aka if the Sega CD is not detected).
     
  14. Blaarg

    Blaarg

    Member
    5
    0
    1
    You mean, that if I repack the data with the modifications I use for the tracks to work in data folder mode, the custom tracks will work? I'm not sure if I should follow through with that though, because I got the recommendation in a Discord server to set up the custom tracks as a mod.
     
  15. i'm pretty sure that's what would happen--i don't mod mania but it should work

    in theory you'd copy the display text routine from the error handler and remove the wait thing, then call that subroutine
    in practice, idk
     
    Last edited: Jul 7, 2022
  16. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    Quick question. How can you display text onscreen? I'm using the Sonic 1 text font for this.

    (in S1 hivebrain)
     
  17. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    This question needs more context, when and where do you want to display your text? For example, the level select screen and the HUD use two completely different techniques.
     
  18. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    A SCD check was implemented and I want text to display text saying something along the lines of "SCD detected! Bonus features were unlocked"
    It'll appear in the center of the screen with the continue jingle and when you press start, it continues with the normal game. It uses the Sonic 1 level select font and that's factually it.

    The hack uses the Sonic 2 level select, so we could use the base S1 level select to display the message. But then again, I'd rather just have it as standard text, since this is hivebrain, and I would have to hex edit the text in. Last time I did that, the LVL sel just said "P" over and over again.
     
    Last edited: Jul 7, 2022
  19. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    In that case, you can easily repurpose the Sonic 1 level select screen to display a different text of your choice if you're not using it (and it's easy enough to duplicate it like I did in my hack, by the way). You can also remove the navigational controls if your text is static.

    edit: ha, I saw you edited your post. You might be interested to know that I wrote a tool to convert from plain ascii to the text format used by Sonic 1 and vice-versa, though I won't be at home for a few days so I can't just send it to you now (and my webspace where I hosted it died years ago), I'm sorry :(

    I will be up to help you or even do it for you in the next days, though.
     
  20. XPointZPoint

    XPointZPoint

    That's no good! Member
    56
    13
    8
    Sounds like a plan!