Commit Graph

78 Commits

Author SHA1 Message Date
Lucas Scharenbroich a5498e07eb Update the shadow renderer to use the common scnaline management routines 2023-04-28 00:35:35 -05:00
Lucas Scharenbroich 515ec5280b Remove dead code 2023-04-28 00:11:46 -05:00
Lucas Scharenbroich e013ff03fd Fix off-by-one error in overlay 2023-04-26 08:47:56 -05:00
Lucas Scharenbroich 44c51217a1 Checkpoint of object list resolver 2023-04-25 23:39:09 -05:00
Lucas Scharenbroich b154bcf361 Sync up header files and add back CopyToBG1 behavior as a selectable feature 2023-03-12 15:39:41 -05:00
Lucas Scharenbroich 9021ee4506 WIP of BG1 scanline effects
A static BG1 is stable with BG0 offset values.  A seam in BG1
needs to be closed up by taking into account the BG1XOrigin value
when setting the :shift_value.

Also, several routines were hard-coded for the scanline case.  These
hanges need to be reverted and properly parametereized.
2023-03-10 15:50:42 -06:00
Lucas Scharenbroich e3409f92fa Add per-scanline offset rendering. 2023-03-09 15:29:58 -06:00
Lucas Scharenbroich 39163ea786 Expose the ability to select which rendering order to use for sprites 2023-03-09 00:23:12 -06:00
Lucas Scharenbroich 5697737a93 Add workable overlay support to the scanline renderer 2023-03-06 14:39:23 -06:00
Lucas Scharenbroich dd9ced08f1 Transition to fixed snippets 2023-03-02 23:24:03 -06:00
Lucas Scharenbroich c14f3c7283 Functional compiled sprites in demo-5 2023-03-01 13:18:37 -06:00
Lucas Scharenbroich e2e30dfcf4 Checkpoint for initial framing for compiled sprite support 2023-02-28 11:17:43 -06:00
Lucas Scharenbroich 981182592e Shadow based rendering working in demo-5 2023-02-27 15:30:56 -06:00
Lucas Scharenbroich 4b50fa8318 checkpoint 2023-01-02 11:04:26 -06:00
Lucas Scharenbroich bd1de7f83c Checkpoint 2022-08-16 19:47:19 -05:00
Lucas Scharenbroich 3fce46872d Checkpoint; blitter failing 2022-08-14 07:45:58 -05:00
Lucas Scharenbroich e378dc6e26 Checkpoint with TF4 demo framework 2022-08-11 14:14:25 -05:00
Lucas Scharenbroich 18da2546bd Add horizontal scaling to the background rotation 2022-07-22 02:01:34 -05:00
Lucas Scharenbroich 6c531619f9 Merge branch 'fixup-rotations' into kfest-2022 2022-07-21 23:35:53 -05:00
Lucas Scharenbroich 0ab7fa9d81 Two layer demos 2022-07-16 15:22:23 -05:00
Lucas Scharenbroich 4506f808c9 Restore BG1 rotation code 2022-07-12 21:03:30 -05:00
Lucas Scharenbroich 9856bad091 Fix dirty<->normal rendering transition 2022-07-07 14:46:37 -05:00
Lucas Scharenbroich 182ebfd566 Set dirty render to the correct direct page and several small cleanups 2022-07-06 14:55:27 -05:00
Lucas Scharenbroich 4e21680063 Add a full complement of firty tile rendering functions 2022-07-05 23:48:33 -05:00
Lucas Scharenbroich 48fa068dfd Add routines for dirty tile rendering 2022-07-04 23:55:32 -05:00
Lucas Scharenbroich a7dad98d50 Additional tweaks to get old sprite demo working 2022-06-27 11:24:04 -05:00
Lucas Scharenbroich b0affa1b72 Add check to bind SCBs in the render function 2022-06-27 00:41:30 -05:00
Lucas Scharenbroich 81e0aeb351 Fix some minor bugs in the TwoLayer rendering functions 2022-06-27 00:32:44 -05:00
Lucas Scharenbroich 8aafd5812b Work to expose times via Toolset 2022-06-26 22:08:42 -05:00
Lucas Scharenbroich 78ee683ba8 Stub in a lot of the remaining functions 2022-06-25 11:17:50 -05:00
Lucas Scharenbroich 1f9c9b3f5b Checkpoint of final tile proc reorg for generalize new infrastructure for different engine modes 2022-06-20 15:55:09 -05:00
Lucas Scharenbroich 78d7dafe14 Another checkpoint; converging on the working implementation 2022-05-31 08:43:26 -05:00
Lucas Scharenbroich 7909113a97 Checkpoint 2022-05-26 19:36:40 -05:00
Lucas Scharenbroich 5577105be8 Complete unrolled loop for clearing sprites from the tile store 2022-05-23 15:18:34 -05:00
Lucas Scharenbroich 9da3616c1d Start working to bring sprites rendering back into the pipeline 2022-05-22 23:54:47 -05:00
Lucas Scharenbroich fd07ead8ed Get tile data to display from code field 2022-05-18 21:39:39 -05: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 01e92a7b62 Update; tool is compiling while referencing new rederer pipeline 2022-05-18 00:34:25 -05:00
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 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 df0d0ccada Commit to a huge unrolled loop to do bitfield -> render function 2022-02-25 17:05:32 -06:00
Lucas Scharenbroich 88fba6cd15 Add plb to prevent crash in unimplemented multisprite handler 2022-02-22 21:37:03 -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 e0912c8956 More tweaks and fixes
* Adjusted tile calculation when drawing sprites
* Fixed incorred draw order in 16x16 sprite
* Added more early-out checks to save work
2022-02-21 15:45:11 -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 bb83e7f7c5 Background rendering again 2022-02-18 20:43:55 -06:00
Lucas Scharenbroich 260b2097c2 Continue fixing code issues; strange relocation error happening 2022-02-18 13:42:37 -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 8b852485ac Fix dirty sprite renderer when StartX and StartY are not zero 2022-02-03 23:44:46 -06:00