don't click here

Basic Questions & Answers thread

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

  1. Devon

    Devon

    You are the perfect drug Tech Member
    1,201
    1,360
    93
    your mom
    TheStoneBanana has done small pools of water in Sonic 1 before:


    His method, of course, involved checking boundaries for handling Sonic's underwater flag, but also still made use of horizontal interrupts to change Sonic's palette. Of course, this means that anything using the palette under the surface of that pool outside of it would be affected.
     
    • Like Like x 2
    • Useful Useful x 1
    • List
  2. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    572
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Neat! That's real smooth, and very dope. Thanks for sharing!
     
  3. rata

    rata

    Member
    688
    72
    28
    Argentina
    Trying to be useful somehow.
    Thank you, that was the video I could not find.
     
  4. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    572
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Another curiosity but this time I don't expect a simple answer.

    Using Sonic 1 as an example...where does the "game code" code begin and end? I'm assuming large chunks of the code are dedicated to setting up the system do even the most basic of graphics and audio operations that are pretty boilerplate.

    If I've got this all wrong that's fine, I'm just curious.
     
  5. Devon

    Devon

    You are the perfect drug Tech Member
    1,201
    1,360
    93
    your mom
    A standard Genesis ROM uses the first $100 bytes for the vector table (list of pointers to interrupt routines, code start, etc.), and the next $100 bytes are the game header (used to describe the ROM). Everything else is whatever. There are no true distinctiveness between what is "code" and what is "data". The CPU will just try to execute whatever is in its path. The second pointer in the vector table is the pointer to the first piece of code that the CPU will try to execute, and it just goes on from there.

    As for Sonic 1's case, in a very general sense, it's laid out like so:
    • The vector table and header
    • Standard game initialization, basic main game loop, error handling, and interrupts
    • Base engine functions (VDP functions, object handler, etc.)
    • "Game mode" (i.e. title screen, level, etc.) handlers and "game mode" specific routines
    • Object code (which mostly also includes object animation scripts and sprite mappings data)
    • Object art and level data
    • Sound driver and sound data
    There's a bunch of other exceptions and shit to this layout, but in general, that's how it seems to go.
     
  6. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,610
    93
    Working on my art!
    I want to bring some of the older Mania stage mods up to code so to speak so that they can be playable again, but I really don't know where to start. I downloaded RetroED and the RSDK Extractor, but I really just want to edit older mods so that they work, I'm not looking to reinvent the wheel or anything. How do I open those particular mods and edit the GameConfig files?
     
  7. JamesO

    JamesO

    Member
    2
    0
    1
    I haven't seen a solution for this issue, so I'll ask here.
    I noticed in the Steam PC version of Sonic Mania, that the game's image is stretched distorted. Even when the shader is set to NONE. It seems to have nothing to do with the "shadersupport=y" fix, or changing the screen filter in Options, as the graphical glitch is still present (Even on 1x scaling!)

    It seems to be some sort of post-processing interpolation?

    Here's some screenshots for reference:
    [​IMG]

    I don't remember the pixels looking so distorted when I played the game in the past. But I even attempted to roll back the game to a previous version on Steam to see if it was a version update glitch, but no luck:
    [​IMG]
    As you can see with the screenshot above, the RETRO ENGINE v5 dev menu is blurry, while the Windows title bar is clear. Again, this exists regardless of whether the Screen Filter is set to NONE or CLEAN. Also running on Sonic Mania v1.03, so it isn't likely to be a v1.06 update glitch.

    Here's a finer example of a proper screenshot vs how it looks on my PC:
    [​IMG]

    This blending effect is not present on any other games or software I run. I tried to see if it might be related to Windows "scaling" feature, but even with screen-scaling turned off, Mania still looks fuzzy. I even set the "Disable High DPI" setting in the EXE's properties. Nothing changed.

    I searched online and haven't found any reference to this glitch/issue, other than a single Steam Community post titled "There is a blur with the filter on "None"", found here: https://steamcommunity.com/app/584400/discussions/0/1640916564849949599/

    The person in that thread describes the issue very thoroughly.

    Has anyone else noticed this? I just noticed it yesterday when I tried to take screenshots for a mod I was working on.
     
  8. Where's the code that creates Sonic 2's split screen in two-player mode?
     
  9. So, I'm just wondering what kind of settings i'd have to use on Natsumi's SMPS2ASM in order to convert a .bin music file from Sonic 2's Simon Wai Prototype into a .asm SMPS file. I've been considering importing music from there into a hack. Wouldn't it be some sort of Z80 driver? All I know is that it's not the final Sonic 2 driver, and its not the final Sonic 1 driver.

    In addition, the conversion process seems to be asking for files that don't exist - there's no NCalc.dll in the /bin folder, but the program seems to need it to convert the music.
     
  10. AURORA☆FIELDS

    AURORA☆FIELDS

    The cute one here Tech Member
    216
    24
    18
    Finland
    AMPS
    Hey, I never noticed that all .dll files were being ignored by Github, and therefore NCalc.dll was not in the repo either. You can directly download NCalc.dll from this link, and you should place it in the bin directory. I don't know about the Simon Way sound driver, but I am assuming its similar enough to the final, that using Sonic 2 for the conversion should still work. There may be some slight fixes you need to do manually if its not exact.
     
  11. Perhaps there should be a separate download for all the .dll files...
     
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,734
    330
    63
    SonLVL
    Adding them to the repository isn't hard, she just needs to delete the line from .gitignore and commit the files.
     
    • Informative Informative x 1
    • List
  13. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,605
    406
    63
    ALWAYS Sonic the Fighters
    So using Ghidra 9.0.4 and the PS2 EmotionEngine Extention, I am looking at two games regarding a type of CRI compression that we don't have cracked yet labeled "CRICMP 2.10"

    This file format is used in the following games that I know of: Sonic Gems Collection (NGC/PS2), Sega AGES 2500 Series Vol. 19Fighting Vipers (PS2), Virtua Fighter 4 - Evolution (PS2), and Super Dimensional Fortress Macross (PS2). Note that all these games were made by Sega AM2.

    The file structure as it's understood from the CMP files and BIN files (uncompressed files were left on the disc with their compressed counterparts in the Fighting Vipers release) is as follows:
    struct cpk {
    @0x00: 16 bytes header data as follows: "CRICMP..2.10...."
    @0x10 : 4 byte code 32 [20000000]
    @0x14: 4 Byte value of decompressed file size in hex in reverse order.
    @0x18: 4 byte code 32 [20000000]
    @0x1C:4 byte code 0 [00000000]
    @0x20 4 byte code 16 [10000000]
    @0x24: 4 bytes unknown data
    @0x28++: Compressed Data
    }

    EDIT2: Alright, I have some routines in the ELF file of Macross, but I am at a complete loss as to what to do with them. It might be possible to use a MIPS simulator, but I don't know how it would access and manipulate files on disk outside of the simulator...

    No one here I think dabbles in PS2 MIPS, do they?
     
    Last edited: Nov 15, 2019
  14. Prototype

    Prototype

    Member
    296
    68
    28
    Quick question. Does anyone know precisely how to extract/create a palette file for Tile Layer Pro from a savestate? I've heard it talked of, but I can't find how to do it. Thanks in advance.
     
  15. EmeraldHog

    EmeraldHog

    Member
    7
    0
    1
    Is there any way to port Sonic 3d blast music to sonic 2 specifically? Does it require heavy hex editing? Same thing with porting sonic 3 music to sonic 2, but I think sonic 3 has a different sound system than sonic 2 so that would be harder to port right?
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,734
    330
    63
    SonLVL
    Uh, Sonic 3D Blast and Sonic 3 (& Knuckles) share the same sound driver, so it's exactly as difficult to port one as the other to Sonic 2. I have a pre-made modifed sound driver for Sonic 2 specifically designed to make these kinds of things simpler, but even with the normal sound driver, it's not actually that difficult, it's just that nobody takes the time to figure out how.
     
  17. Devon

    Devon

    You are the perfect drug Tech Member
    1,201
    1,360
    93
    your mom
    SMPS2ASM can at the very least make it easier to get a song from one SMPS driver to assemble properly for another SMPS driver. You'd then just need to worry about Sonic 3's universal voice bank, coordination flags, PSG volume envelopes, modulation envelopes, and DAC samples.
     
  18. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    572
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    What can the MD manage in terms of primitive drawing functions? Looking for a fillRect or fillCirc equivalent here (this curiosity brought to you by this gem).

    I would guess there's no capability ordinarily, but I'm imagining some scan line wizardry and mathematical magicks might end up being the key. I know psuedo-3D line rendering can be achieved. Maybe by using some math you can calculated which pixels should be which colour, but switching colours mid-scanline is troublesome/impossible too, no?

    EDIT: Just left work and had a cursory Google. Guess I can abuse CRAM dots. Bad idea?
     
    Last edited: Nov 25, 2019
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,734
    330
    63
    SonLVL
    If you want it to work on emulators, it's a terrible idea.
     
  20. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    572
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    I've done a deeper dive into Google though and...I think I'm going about this all wrong. What I'm looking for is a method for drawing a pixel at any given point. Blitting basically. I know it'd be slow but just wanted to see if it was possible. And looks like without CRAM dot abuse it's impossible. And even with CRAM dot abuse it's inadvisable (emulator compatibility aside).

    Curiosity satisfied I suppose.

    EDIT: Curiosity not satisfied. Damnit.

    I stumbled over a write-up of the polygon drawing techniques used in OverDrive 2. Yea I know, way above my pay grade.

    But I got the idea that if can calculate where circles are going to be using math, I can use that math to render to VRAM and DMA it on-screen every frame. Maybe even do the tube (it's definitely a tube right?) shit on plane A and do something else on plane B for some variety/visual clarity. I admit I only half understood that article but it atleast sounds feasible to this caveman.

    Am I barking up the wrong tree? Is my princess in another castle? Am I cat about to meet a vicious and painful end?
     
    Last edited: Nov 26, 2019