Commit Graph

23 Commits

Author SHA1 Message Date
Lucas Scharenbroich
7f6e5d1b1f Work checkpoint 2022-04-29 12:38:04 -05:00
Lucas Scharenbroich
1522922abe Complete initialization sequence. 2022-04-25 16:35:47 -05:00
Lucas Scharenbroich
76180b6feb Basic working user tool framework 2022-04-24 14:45:07 -05:00
Lucas Scharenbroich
e2710ace85 Refactor to support building a tool and new demo to try and use it [not working] 2022-04-23 00:47:13 -05:00
Lucas Scharenbroich
8bb17895a9 Rough outline of streamlined sprite subsystem
* Split the creation of the sprite stamps from adding the
  sprites themselves.  This allows for 48 stamps that can
  be pre-rendered and quickly reassigned to sprites for
  animations.

* Inlined all calls to PushDirtyTile.  This both removed
  significant overhead from calling the small function and,
  since almost all callers we checking multiple tiles, we
  were able to avoid incrementing the count each time and
  just add a single incrments at the end.

* Switched from recording each tile that a sprite intersects
  with each from to only recording the top-left tile and the
  overlap size.  This reduced overhead for larger sprites
  and removed the needs for an end-of-list marker.

* Much more aggressive caching of Sprite and Tile Store
  values in order to streamline the inner tile dispatch
  routines.

* Moving TileStore and Sprites (and other supporting
  data structures) into a separate data bank.  Needed just
  for size purposes and provide micro-optimizations by
  opening up the use of abs,y addressing modes.

* Revamped multi-sprite rendering code to avoid the need to
  copy any masks and all stacked sprites can be drawn
  via a sequence of and [addrX],y; ora (addrX),y where
  addrX is set once per tile.

* General streamlining to reduct overhead. This work was
  focused on removing as much per-tile overhead as possible.
2022-04-20 07:43:16 -05:00
Lucas Scharenbroich
ef620e48a3 Remove cached value; too slow to maintain on sprite remove 2022-02-25 17:03:36 -06:00
Lucas Scharenbroich
2507724a49 More sprite streamlining
* Added a TS_LAST_VBUFF cached value in the tile store
* Added a fast path for single sprite w/fast test
* Improved raster timing granularity for visual profiling

All of the code paths are generally good.  Both the _RenderSprites
and _ApplyDirtyTiles functions take a fair bit of raster time. Will
continue to try and streamline the data structures and code to
reduce overhead.`
2022-02-22 02:35:21 -06:00
Lucas Scharenbroich
8b9415a7a5 Working through integration bugs
* Gave active list dedicated direct page space
* Change active list bit test from ror to asl to avoid barrel shift
* Various address fixes
2022-02-21 10:31:35 -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
397df074ac Sprite state rework; have run out of bank space 2022-02-07 01:19:31 -06:00
Lucas Scharenbroich
8b852485ac Fix dirty sprite renderer when StartX and StartY are not zero 2022-02-03 23:44:46 -06:00
Lucas Scharenbroich
1fe02e035c Checkpoint 2022-02-02 10:21:31 -06:00
Lucas Scharenbroich
027f9746ec Checkpoint of work 2022-01-19 20:58:57 -06:00
Lucas Scharenbroich
5bc9cc7ff2 Add a SPRITE_HIDE flag to toggle whether a sprite is drawn or not 2021-11-22 13:26:25 -06:00
Lucas Scharenbroich
0cc28f9e6e Generalize _DrawSprite to handle all sizes and flip bits. 2021-11-20 12:00:21 -06:00
Lucas Scharenbroich
cc8e03e6d3 Add SCB binding infrastructure 2021-11-13 19:45:27 -06:00
Lucas Scharenbroich
bab57f6e43 Add VSYNC toggle 2021-11-12 11:27:43 -06:00
Lucas Scharenbroich
4e46a6af85 WIP: manual sprite rendering showing on screen 2021-10-28 21:41:01 -05:00
Lucas Scharenbroich
cc18c67491 Expand tile blitter temp space 2021-10-27 00:11:13 -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
a82c1248db Add untested framework for handling fringe tile rendering 2021-08-30 22:14:04 -05:00
Lucas Scharenbroich
69c6104742 Small initialization and jsr/jsl updates 2021-08-26 16:12:08 -05:00
Lucas Scharenbroich
7d5f7aa721 Refactor GTE Core to be included as an independent Segment in other projects 2021-08-25 09:38:02 -05:00