We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

DynamicZandDyzenQuickGuide: Difference between revisions

From SnesLab
Jump to: navigation, search
No edit summary
No edit summary
Line 177: Line 177:


Then, each one of these resources can be referenced using the defines "!GFXYY", where YY is the number of the resource, for example:
Then, each one of these resources can be referenced using the defines "!GFXYY", where YY is the number of the resource, for example:
*!GFX00: Referenciaría al primer recurso.
*!GFX01: Referenciaría al segundo recurso.


*!GFX00: Reference to the first resource.
*!GFX00: Reference to the first resource.

Revision as of 16:40, 22 July 2021

English Português Español 日本語

This guide will explain step by step how to create a Dynamic Sprite from scratch using Dynamic Z (V3.75 or higher) and Dyzen (Version for Dynamic Sprites).

Dynamic Z Installation

First requirements

In order to make "Dynamic Z Installer.exe" or "Dynamic Resource adder.exe" work correctly, you must install:

  • dotNet Core 3.1[1]

Lorom

  1. Starting with a clean ROM, expand it up to 2MB in Lunar Magic. Make any modification and save it.
  2. Open "Dynamic Z Installer.exe".
  3. Select the features that you want to add to your ROM.
    Dynamic Z Installer 1
    • Graphics and Tilemap Change: It is used for any resource that requires changing graphics or tilemaps dynamically.
    • Dynamic Sprite Support: It is necessary to use conventional Dynamic Sprites. Requires Graphics and Tilemap Change.
    • Shared Dynamic Sprite Support: It is necessary to use Dynamic Sprites with shared memory. Requires Dynamic Sprite Support.
    • Semi Dynamic Sprite Support: It is necessary to use Semi-Dynamic Sprites. Requires Graphics and Tilemap Change.
    • Palette Change System: It is necessary to make dynamic palette changes.
    • HSL Support:It is necessary to perform color palette effects such as changing the Hue, Saturation or Lightness, also to mix a base color with the colors of the palette. Requires Palette Change System.
    • Player Graphic Change System: Allows changing the player's graphics both following the same graphics scheme as the original player, as well as making your own graphics routine for players of any size. RequireS Graphics and Tilemap Change.
    • Player Palette Change System: Allows changing dynamically player's color palette (Palette 8). Requires Palette Change System.

    Note: Both the Player Graphic Change System and Player Palette Change System (Player Features), have severe compatibility issues with resources that make changes to the player, such as LX5's custom power-ups, 32x32 Player Tilemap or 8x8 Tile DMAer. If you use resources similar to these, it is recommended to not select these features.

    After selecting the desired features, press the "Next" button. The features that are already selected don't have compatibility issues.

  4. Select your ROM. If you use Pixi, select the folder where pixi is located, and also if you use UberASMtool, select where UberASMtool is located.
    Dynamic Z Installer 2

    Then press the "Install" button.

    If you are using a Beta of Dynamic Z V3.75, after the installation is done, press the "Install" button again, repeating this step. This is a bug in the Dynamic Z V3.75 Beta, in the final or newer versions, this won't be necessary.

Note: After installing Dynamic Z, please put a copy of Asar in the same folder where the ROM is located.

SA-1

  1. Starting with a clean ROM, expand it up to 2MB in Lunar Magic. Then, don't do any modification in LM.
  2. Open the file "sa1.asm", in the line:
    !DSX		= 1
    

    Change it for:

    !DSX		= 0
    
  3. Install SA-1 using Asar.
  4. Open Lunar Magic and make any change in the ROM and save it.
  5. Open "Dynamic Z Installer.exe".
  6. Select the features that you want to add to your ROM.
    Dynamic Z Installer 1
    • Graphics and Tilemap Change: It is used for any resource that requires changing graphics or tilemaps dynamically.
    • Dynamic Sprite Support: It is necessary to use conventional Dynamic Sprites. Requires Graphics and Tilemap Change.
    • Shared Dynamic Sprite Support: It is necessary to use Dynamic Sprites with shared memory. Requires Dynamic Sprite Support.
    • Semi Dynamic Sprite Support: It is necessary to use Semi-Dynamic Sprites. Requires Graphics and Tilemap Change.
    • Palette Change System: It is necessary to make dynamic palette changes.
    • HSL Support:It is necessary to perform color palette effects such as changing the Hue, Saturation or Lightness, also to mix a base color with the colors of the palette. Requires Palette Change System.
    • Player Graphic Change System: Allows changing the player's graphics both following the same graphics scheme as the original player, as well as making your own graphics routine for players of any size. RequireS Graphics and Tilemap Change.
    • Player Palette Change System: Allows changing dynamically player's color palette (Palette 8). Requires Palette Change System.

    Note: Both the Player Graphic Change System and Player Palette Change System (Player Features), have severe compatibility issues with resources that make changes to the player, such as LX5's custom power-ups, 32x32 Player Tilemap or 8x8 Tile DMAer. If you use resources similar to these, it is recommended to not select these features.

    After selecting the desired features, press the "Next" button. The features that are already selected don't have compatibility issues.

    Select your ROM. If you use Pixi, select the folder where pixi is located, and also if you use UberASMtool, select where UberASMtool is located.

    Dynamic Z Installer 2

    Then press the "Install" button.

    If you are using a Beta of Dynamic Z V3.75, after the installation is done, press the "Install" button again, repeating this step. This is a bug in the Dynamic Z V3.75 Beta, in the final or newer versions, this won't be necessary.

Note: After installing Dynamic Z, please put a copy of Asar in the same folder where the ROM is located.

Insert Graphics and Dynamic Resources

After installing Dynamic Z, in the ROM folder you will find a tool called "Dynamic Resource Adder.exe" (DRAdder). This tool is used to insert dynamic resources into the ROM. Although its use is not mandatory (since a dynamic sprite could decide to use another way to insert these resources into the ROM), it is recommended, since, in this way we have better control over these resources, and also it avoids extra patches usage, in addition to the fact that the resources are tried to be inserted in the banks greater than $40 (if is possible), and that it is quite easy to import these resources.

  1. Add the dynamic resources into the "Dynamic Resources" folder. These resources can be graphics, color palettes (in ".bin" files) or tilemaps.
  2. Open the file "ResourceList.txt", and you will see something like the following:
    PIXI:
    .Normal
    .Cluster
    .Extended
    OTHER:
    
  3. For sprites, add to the correspondant labels the name of the ".asm" sprite file. For example:
    PIXI:
    .Normal
    Klaptrap
    Klump
    Gnawty
    Krusha
    SigmaX2
    SMM2BulletBill
    DKCBarrel
    DKCFire
    .Cluster
    DKCContactEffect
    DKCExplosion
    DKCVerticalSmoke
    DKCHorizontalSmoke
    .Extended
    KlumpGrenade
    OTHER:
    
  4. For non sprites resources, such as an uberasm code, a patch, or a block, you can use the label "OTHER:" adding the file path. For example:
    PIXI:
    .Normal
    Klaptrap
    Klump
    Gnawty
    Krusha
    SigmaX2
    SMM2BulletBill
    DKCBarrel
    DKCFire
    .Cluster
    DKCContactEffect
    DKCExplosion
    DKCVerticalSmoke
    DKCHorizontalSmoke
    .Extended
    KlumpGrenade
    OTHER:
    .\Patches\Player Revolution\Players\NSMBPlayer.asm
    
  5. Open "Dynamic Resource Adder.exe" (DRAdder), write the path the program asks you. If asks for Pixi folder, drag the Pixi folder. If asks for the ROM, drag the ROM, etc. Alternatively, it can be used in console with the command: DynamicResourceAdder <rom name.smc> <resources list.txt> <pixi folder>

To use this tool, the file that imports the dynamic resources, in the first line of the code you must include all the resources you use, as follows:

;@<Resource 1>,<Resource 2>,<Resource 3>, ...

For example, Klaptrap uses 5 different palettes y its graphics. If you see the first line of the sprite code, it is:

;@Klaptrap.bin,KlaptrapPal1.bin,KlaptrapPal2.bin,KlaptrapPal3.bin,KlaptrapPal4.bin,KlaptrapPal5.bin

Then, each one of these resources can be referenced using the defines "!GFXYY", where YY is the number of the resource, for example:

  • !GFX00: Reference to the first resource.
  • !GFX01: Reference to the second resource.

etc.

If I wanted, for example, to obtain the BNK of the first resource, I would use:

#!GFX00>>16

For the High Byte would be:

#!GFX00>>8

And for the Low Byte would be:

#!GFX00