Commit Graph

20 Commits

Author SHA1 Message Date
Lucas Scharenbroich b449d983ee Checkpoint for WIP scanline render fix for overlays+sprites and user-defined tiles 2023-04-26 00:41:17 -05:00
Lucas Scharenbroich dd9ced08f1 Transition to fixed snippets 2023-03-02 23:24:03 -06:00
Lucas Scharenbroich 981182592e Shadow based rendering working in demo-5 2023-02-27 15:30:56 -06:00
Lucas Scharenbroich 755ac3fbfd Move most data storage to separate bank; fix many banking bugs 2022-05-18 21:00:06 -05:00
Lucas Scharenbroich bb83e7f7c5 Background rendering again 2022-02-18 20:43:55 -06:00
Lucas Scharenbroich 95058fb969 Checkpoint for sprite rewrite
All of the sprite rendering has been deferred down to the level of
the tile drawing. Sprites are no longer drawn/erased, but instead
a sprite sheet is generated in AddSprite and referenced by the
renderer.

Because there is no longer a single off-screen buffer that holds
a copy of all the rendered sprites, the TileStore size must be
expanded to hold a reference to the sprite data address fo each
tile.  This increase in data structure size require the TileStore
to be put into its own bank and appropriate code restructuring.

The benefits to the rewrite are significant:

  1. Sprites are never drawn/erased off-screen.  They are only
     ever drawn directly to the screen or play field.
  2. The concept of "damaged" sprites is gone.  Every dirty tile
     automatically renders just to portion of a sprite that it
     intersects.

These two properties result in a substantial increase in throughput.
2022-02-18 12:12:32 -06:00
Lucas Scharenbroich 69ed76a65d Optimize the simple mixed BG0/BG1 handler
There is enough room in the 32-byte exception handler to inline the
9-byte epilogue when generating the code sequence for mixed BG1/BG0
rendering.

This code sequence is generated once and run for as many frames as the
word appear on screen, so saving an uncondition branch (3 cycles) at the
cost of 60 cycles is probably worth it.
2021-11-22 16:56:53 -06:00
Lucas Scharenbroich 5fdb4bcf06 Fix transposed argument in macro definition; dynamic tile + sprite now working 2021-11-19 13:26:19 -06:00
Lucas Scharenbroich b4871efe8f Streamlining tile blitter macros 2021-11-19 13:00:59 -06:00
Lucas Scharenbroich 4c31a0d056 Reorg of exception handling code in the core blitter
* Moved V-flag handling outside of the 32-byte exception handler
* Switched relative branches to JMP to save a cycle per word
* Updated macros to create a full code snippet instead of assuming
  certain values exist in the exception handler buffer
2021-11-19 10:24:09 -06:00
Lucas Scharenbroich 0a9eb76ab5 Checkpoint; have old Dynamic Tile Renderers working 2021-11-18 16:23:44 -06:00
Lucas Scharenbroich ba76b0047c Checkpoint on dynamic tile blitters 2021-11-18 15:36:36 -06:00
Lucas Scharenbroich 9a6eb45b20 Add Masked Sprite Tile blitter and fix some minor issues with the macro 2021-11-15 21:23:15 -06:00
Lucas Scharenbroich 678c9a0563 Initial shell of generalize sprite size support; just for marking the dirty tiles 2021-11-11 17:06:38 -06:00
Lucas Scharenbroich bb5f4493d9 Fully integration simple (8x8) sprites into the render pipeline 2021-11-01 23:36:53 -05:00
Lucas Scharenbroich 631f40da23 Nearly complete integration of sprites into rendering function 2021-10-31 15:42:59 -05:00
Lucas Scharenbroich 2f73b9acf5 Small improvements to sprite prototype to fix dirty tiles getting out of sync 2021-10-30 19:24:23 -05:00
Lucas Scharenbroich 2966b1052b Add rendering path for masked dynamic tiles 2021-10-07 23:54:45 -05:00
Lucas Scharenbroich 87ded17e20 Initial Tiled tile animation export support
* Tiled tile animations read from TSX files
* Hooks for initialization generated by the tiled export tool
* Animated tiles implements with dynamic tiles backed by 2KB of direct
  page space in Bank 00
* Animation resolution limited to 1/60th incremenents

TODO
* Fix crasher in the _DoScriptSequ timer callback
* Fix single-line of garbage on the top line of the dynamic tiles
2021-10-06 07:10:09 -05:00
Lucas Scharenbroich 99e4505a34 Consolidate all of the project macros into one folder; merlin32 only takes one macro path on the command line 2021-08-25 09:34:26 -05:00