Language…
15 users online: Cardioid, ElysRedField, Ginnb0b, gui, K3anuGamer, Koszmxr, LadiesMan217, Moronsky, MoxieCat, Nitrogen, SkyeLondon18, The_Uber_Camper, TriStain, Tutubi, Zute - Guests: 111 - Bots: 297
Users: 65,938 (2,185 active)
Latest user: Bobra

Dynamic X Open Beta V0.9

ToolBlockSpritePatchUberASM

Dynamic X

Dynamic X is a tool and patch that is used to do graphics and color palette changes dynamically.

Tool Features

  • Allows to select which Dynamic X features use.
  • Allows to export all defines generated by the tool to Pixi, Uberasm Tool and GPS automatically.
  • Allows to insert graphics, color palettes or any data in ".bin" format to the ROM. Data is compacted in 32kb or less data chunks and defines are generated with data addresses.
  • Allows to import dynamic poses, Dynamic X generates defines to access to the poses such as a Pose ID and Pose Address. Each pose saves its data on the rom about how to load it in VRAM. Poses can be upload to VRAM from any ".asm" resource with this system.
  • Allows to import drawing poses. Dynamic X generates graphic routines that are optimized to use less space and also be fast. Poses with similar characteristics share the same graphic routine. Poses can be drawn on the screen from any ".asm" resource with this system.
  • Allows to import Palette Effects. Palette effects uses RGB or HSL Channels to change colors.


Patch Features

  • Graphic Change: It allows to change graphics dynamically from any ".asm" resource.
  • Color Palette Change: It allows to change color palettes dynamically from any ".asm" resource.
  • Dynamic Poses System: It Allows to upload dynamic poses to the VRAM from any ".asm" resource, poses are reused between all resources, each pose can be loaded to VRAM only once at the same time. If VRAM's Dynamic Space is full then poses that are unused for more time are replaced.
  • Drawing System: Allows to draw any pose on the screen from any ".asm" resource. Poses can be dynamic or not.
  • Global Palette Effect System: Allows to change palettes dynamically applying effects such as change Hue, Saturation or brightness, also you can mix up color palette with a base color. This is more powerful than Color Math but could be a bit slow then I recommend don't change Global Palette Effect very often, if it changes every frame can produce slowdown, but every 2 frames or every 4 frames shouldn't be an issue.
  • Sprite Color Palette Assignment System: Each sprite that uses Dynamic X, can use this system to load Its palette dynamically, this system integrates Global Palette Effect System then you can select if the sprite applies global effects or no, the sprite has 3 options:
    • Automatic: The sprite finds a Color Palette that is not currently used and use it.
    • Manually: Using Extra Byte 1, user can select which palette use.
    • No Assignment: Using Extra Byte 1, user can select which palette use. But the palette is not loaded, this could be useful if you wanna use a custom palette that is already loaded in the level.

  • Player Features:Optimize MarioGFX Routine to only send data when it is necessary, also optimize Yoshi and Podoboos dynamic routine. Allows to disable Player Dynamic routine to do your own Dynamic Routine or Vanilla Dynamic Routine but with others graphics. Also allows to change player palettes. With this system is possible to do custom gaphics and palettes for player.
  • NMI Optimizations: Includes some NMI Optimizations such as Controller, Status bar and Fixed Color Optimizations.


You can download the tool and resources made with the tool here:

SNEStorage

Warning: Dynamic X is SA-1 V1.40 or higher exclusive for now. I will do a non-SA-1 version in the future.

Repository

Change Log:
MMX Dig Labour and MMX Dig Labour's Pick Axe V1.0
MMX Pixi Routines V1.1
  • Added Hurt routine for MMX Sprites.

Anonimzwx's Pixi Routines V1.1
  • Added SpawnCluster routine that I use.
  • Fixed a bug related to Display Contact Effect.

Dynamic X Open Beta V0.7
  • Added Dyzen's Pixi Routines.
  • Added Anonimzwx's Pixi Routines.
  • Added Pixi's Pixi Routines.
  • Added DKC's Kritter.
  • Added SMM's Midway Flag.
  • Added MMX's Metall C-15 and Metall C-15's Projectiles.
  • Added MMX's Explosions.
  • Sprites previously uploaded changed to fix some issues related with deprecated tables.
  • Some tables were deprecated.
  • Fixed bug related to palettes that happened during pause.
  • Fixed bug related to Player Features. Yoshi tongue acted weird.
  • Fixed bug related to Player Features. Player palette wasn't loaded correctly in the second cycle of Title Screen.
  • Fixed bug with Palette Assignment, sometimes palettes weren't assigned correctly.


FAQ
Q: Can i change VRAM Space used by Dynamic Sprites?
Yes, it is possible using an uberasm.

Q: Can i restrict which palettes can be used by Dynamic Sprites?
Yes, it is possible using an uberasm.

Q: How Dynamic X allows to use that number of Dynamic Sprites without sacrifice framerate?
Dynamic poses are loaded only once in VRAM then they can be reused by all Sprites. Basically Dynamic X turn VRAM into a Cache Memory of Poses saving a lot of resources. Also if a Dynamic sprite can't load a pose in the current frame, it delays its dynamic routine up to be able to upload graphics.

Q: Dynamic Sprites can be affected by Global Palette effect?
Yes, you must change the first bit (from left to right) of Extra Byte 1. For example use value 80 in Extra Byte 1 does that the sprite can be affected by Global Palette Effect.

Q: Using Dynamic X Player features can i do Players of any size?
Yes, but Dynamic X only affects Palettes and Graphics, you must use another system to do interaction, object clipping or change player logic.

Q: Sometimes i have flickering, How can be fixed?
You can activate Dynamic X's NMI optimizations, if that is not enough, you can disable vanilla exanimations. Also be careful using to much Lunar Magic exanimations, if you have issues with flickering maybe you should use Dynamic X to do exanimations because in that way Data is registered on the Dynamic X's Data Counter and then dynamic sprites can delay their dynamic routine to avoid flickering.

Q: I was using a dynamic sprite and a normal sprite, but the normal sprite have glitched graphics or glitched palette. Why that happened?
that sprite is using a palette or graphics that are overwritten by the dynamic sprite. You must restrict which palette are allowed to be used by dynamic sprites and also change which VRAM's Dynamic Space use.

Q: Dynamic Sprites uses uncompressed graphics? Is there a way to use compressed graphics?
For now Dynamic X Only allows uncompressed graphics, now I have a tool to optimize tiles to use the minimum vram space possible. There are future plans for compressed graphics.

Q: How can i reduce space used by Dynamic Sprites?
A general way is optimize tiles to use the minimum space possible. For some sprites, you can separate the sprite in sections (for example separate the legs, arms and the body), this is not always possible but in a lot of cases can reduce the amount of data a lot.

Q: Is it possible transform a non-dynamic sprite into a Dynamic Sprite? Is this a good idea?
It is a very good idea transform a non-dynamic into a Dynamic Sprite, because in that way you dont need to add the Color Palette or ExGFX manually on the level and Dynamic X resuse poses, also in some cases you save space because in most of cases you don't need a 4kb exgfx for a sprite, the sprite can use a lot less space and also lot of people do various version of the same exgfx to add non-dynamic sprites to differents levels, then in those cases you can save a lot of space.
I already did a tool to transform non-Dynamic to Dynamic reusing tile and it instantly separate sections automatically. I will upload it soon after do a good Quality Assurance.

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
I found a bug related to Dynamic X Tool, basically it has a memory leak that cause that if you install the tool multiples times then it uses more space than needed.

Also i found a bug related to dynamic sprites with multiples sections that happends when Dynamic Sprite Space is full.

Also a little issue that can produce problems if you use NON-global palette effects that are mixed with the global palette effect

Both bugs will be fixed in Open Beta V0.8

Next Version (Open Beta V0.8):

Bug Fixes:
  • All bugs mentioned in this post.


New Sprites:
  • YI's Tap Tap The Red Nose
  • YI's Piranha plant (both versions green and red)


Sprites Improvements:
  • Add SMW vanilla interactions (fireballs, yoshi's fireballs, cape interaction and stomping, yoshi's stomping, bob omb, etc...) to DKC Enemies (Klaptrap, Gnawty, Krusha, Necky and Kritter).
  • Add HP to Metall C-15 (original sprite has 2 hp)
  • Fix Metall C-15, Dig Labour and Dig Labour Pick Axe's (they are multi-section and are affected by the bug mentioned before)
  • Add Sound Effects to Metall C-15 and Dig Labour


New Uberasm Codes:
  • (Player Features Exclusive) Select player's graphics and palettes on the fly.
  • Change GFX and Palettes dynamically on the fly (GFXs and Palette exanimations made with Dynamic X)
  • Change Dynamic Space Config.
  • Change Color Palette restriction config.
  • Use Global Palette Effects and do Transitions.


Also with V0.8 i will release a tool to convert Non-Dynamic sprites into Dynamic Sprites.

Others News

2 bugs were detected in Anonimzwx's Routines:
  • DamagePlayer: When yoshi is dismounted, yoshi acts weird.
  • DisplayContactEffect: It used pixi's Default SpawnCluster instead of my version, this provokes that the contact effect wasn't displayed correctly.


Both bugs will be fixed soon. I will advise when I upload the Fix.

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
I uploaded Open Beta V0.8.

There isn't a lot of changes, the only change are a lot of bug fixes. The most important fix was a memory leak that happened when Dynamic X is reinstalled.

If you use V0.7 I recommend you port all to a clear ROM and use V0.8 because that memory leak could waste a lot of ROM Space.

You can download V0.8 here:

Dynamic X Open Beta V0.8

During the week I will release things promised in this post:

V0.8 Releases

The only sprite that I wont release this week is YI's Piranha Plant

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
Originally posted by anonimzwx
I am preparing a Tech Demo to show Dynamic X's potential:



Also I hope to upload V0.8 soon.


WTF?
This looks amazing! Great job!
Dynamic X Open Beta V0.9

Change Log:
  • Fixed a bug related to Drawing system. Now you can use Non-Dynamic Poses with Drawing System.
  • Several small issues fixed.


New Sprites:
  • Metal Slug Advance - Bazooka Soldier
  • Metal Slug Attack - Allen's Big Weapon Missile
  • Metal Slug - Big Fire
  • Metal Slug - Big Molotov
  • Metal Slug - Bomb
  • Metal Slug - Grenade
  • Metal Slug - Molotov
  • Donkey Kong Country 3 - Rekoil
  • Donkey Kong Country - Army
  • Donkey Kong Country - Flying Necky
  • Donkey Kong Country - Klump
  • Donkey Kong Country - Stalactite
  • Metal Slug - Bazooka Projectile
  • Metal Slug - Explosion
  • Metal Slug - Mine Explosion
  • Metal Slug - Smoke
  • Metal Slug - Spark
  • Megaman X - Explosion
  • Donkey Kong Country - Explosion
  • Donkey Kong Country - Horizontal Smoke
  • Donkey Kong Country - Vertical Smoke
  • Donkey Kong Country - Metal Particle


Old sprites were updated to have vanilla interactions and sound effects

Routines were updated to fix several small bugs and also to make interactions more accurate

Added Complex Movement Routines

Remember To visit SNEStorage

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
Added Uberasm codes

I uploaded 5 uberasm codes showing some functionalities of Dynamic X.

Download Link

Change Player



The is uberasm code allows you to change between a custom player and vanilla player pressing up. You can edit the code to do more things with custom players.

Dynamic X's Exanimations



This allows you to do Manual exanimations like the exanimations made with LM,. You can check the code to learn about graphics and palette change.

Global Palette Effect Codes

To use the following uberasm codes you need to create those effects using Palette Effect Creator:

Palette Effect Creator Download Link

Global Palette Effects can change colors of Background Color and Palettes changing their Hue, Saturation and Brightness, also they can mix a base color with the colors of the palette. They are HSL or RGB Effects.

Apply a Simple Global Palette Effect



This effect allows you to apply a single Global Palette Effect, in the example you can see that all changed its saturation to simulate black and white effect.

Global Palette Effect Cycle Animation



This allows you to do a Global Palette Effect animation that is repeated continously.

Global Palette Effect Transition Animation



This allows you to do a transition between 2 Global Palette Effects.

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
For everyone who uses current Dyxen (Alpha V1.0), the generated code has some bugs. I will explain you here how to fix the the generated code.

1) on the Init Routine you must add 2 lines of code, they depends if you use Dyxen animation or not, if you use Dyxen Animation System then you should add:

Code
LDA #$00
JSR InitWrapperChangeAnimationFromStart

If not, then use:

Code
LDA #$00
STA !PoseIndex,x


2) Before JSR PoseManagement, add this:

Code
    JSR PaletteManagement
    BCS +
RTS
+


3) Add This routine out of SpriteCode Routine:

Code
PaletteManagement:

    REP #$20
    LDA #!<name>PaletteTableOffset
    !PaletteAssignment
RTS


4) Replace <name> By the name of your sprite, example:

Code
PaletteManagement:

    REP #$20
    LDA #!MSMolotovPaletteTableOffset
    !PaletteAssignment
RTS


5) Open the .dynamicinfo file and add the palette of your sprite:

Code
Palettes:
    <name>.bin


6) Replace <name> by the name of the palette that you are adding, example:
Code
Palettes:
    MSExplosionPal1.bin


7) To obtain the palette of your sprite in .bin file, you can use this tool:
Pal2Bin
The obtained palette must be added on Dynamic X's DynamicResources folder.

8) This is not a bug, but JSR AnimationRoutine only works if $8A is zero, then i recommend you use STZ $8A after call JSR InteractMarioSprite.

9) If you use Dyxen Animation, remove this 2 lines:
Code
    LDA !Scratch2
    STA !AnimationFrameIndex,x


The following Steps are only if you use Dyxen Hitboxes. first you must understand how that works.

You have a table called Actions, For example:

Code
Actions:
    dw CheckBounce
    dw CheckPlayerIsAbove


This table register all the routines that are executed from hitboxes, those should end with RTL instead of RTS.

Also you have the following 2 tables:

Code
HitboxAction1: 
    dw $0000,$0000
HitboxAction2: 
    dw $0002,$0002


They have 1 entry for each hitbox, They have indexs to point to Actions Table, for example if you use $0000 in this example, it will call CheckBounce.

HitboxAction1 are the actions that happends when a hitbox collides and HitboxAction2 are the actions that happends when the hitbox doesn't collides.

Also you hjave DefaultAction, this must be triggered when one or more of the hitboxes trigger an action that set a non-zero value to $4F, example:

Code
TriggerDefaultAction:
    LDA #$01
    STA $4F
RTL


Default Action will be triggered after process all the hitboxes and only if $4F is not zero. Also Default Action must end with RTS.

Dyxen by default will generate something like this:

Code
HitboxAction1: 
    dw $0000
HitboxAction2: 
    dw $0000
Actions:
    dw DefaultAction

DefaultAction:
RTS


Then you must replace the Actions table, generate the actions manually, and change values on HitboxAction1 and HitboxAction2 depends on your sprite.

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources
I won't be in smwc discord server anymore, also I won't continue my interactions in smwcentral.net, if you need help with any of my resources you can find me in sneslab's discord server and send me a discord message.

About Dynamic X, Dyxen, SMWRR or my others projects, their development will continue, New content and news will be announced on my discord server: server link

------------------------------------------------------

Youtube
Twitter
SMWControlLibX GitHub
My Discord Server
Snestorage where you can download my resources

ToolBlockSpritePatchUberASM