Commit Graph

35 Commits

Author SHA1 Message Date
Lucas Scharenbroich
3c41e97b0f Move dispatch table into K bank and save 9 cycles per tile in dispatch 2022-06-08 17:34:23 -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
54474bbe5f Add more pre-computed values to the sprite structure 2022-02-21 13:33:39 -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
Lucas Scharenbroich
1fe02e035c Checkpoint 2022-02-02 10:21:31 -06:00
Lucas Scharenbroich
0cc28f9e6e Generalize _DrawSprite to handle all sizes and flip bits. 2021-11-20 12:00:21 -06:00
Lucas Scharenbroich
a7ba1e4b6b Add final tile blitter 2021-11-19 16:48:39 -06:00
Lucas Scharenbroich
39303041f9 Add priority dynamic tiles + sprite blitter 2021-11-19 16:30:22 -06:00
Lucas Scharenbroich
44cbba3f23 Add in new variants for sprite and priority tiles 2021-11-19 15:07:43 -06:00
Lucas Scharenbroich
b4871efe8f Streamlining tile blitter macros 2021-11-19 13:00:59 -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
cc8e03e6d3 Add SCB binding infrastructure 2021-11-13 19:45:27 -06:00
Lucas Scharenbroich
596777da8d Enable non-sprite, solid dynamic tiles 2021-11-12 15:11:29 -06:00
Lucas Scharenbroich
bab57f6e43 Add VSYNC toggle 2021-11-12 11:27:43 -06:00
Lucas Scharenbroich
de5bdc6041 Rename tile blitters to match internal bit fields and add in the solid prioity blitter 2021-11-12 09:07:51 -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
9ecc262c58 First pass at validating erasing the sprite on update 2021-10-28 22:19:18 -05:00
Lucas Scharenbroich
4e46a6af85 WIP: manual sprite rendering showing on screen 2021-10-28 21:41:01 -05:00
Lucas Scharenbroich
2feb6f590b Add address in sprite plane for tile rendering; use in tile dispatcher 2021-10-27 00:14:19 -05:00
Lucas Scharenbroich
3b8bf652e1 Continued bug fixing
* Missed an XBA to swap tile command bits into a proper index range
* Explicitly track the BASE_ADDR
* Fix some register overwriting
* Add an UpdateSprite method
2021-10-23 22:31:38 -05:00
Lucas Scharenbroich
494673416b Fix several incorrect uses of internal API; work toward functional demo 2021-10-22 00:56:12 -05:00
Lucas Scharenbroich
4e779e71d2 Tile rendering reorganization
This significantly simplifies the dispatch process by creating a
proper backing store for the tiles.  Most values that were
calcualted on the fly are now stored as constants in the tile
store.

Also, all tile updated are run through the dirty tile list which
solved a checken-and-egg problem of which order to do sprites vs
new tiles and affords a lot of optimizations since tile rendering
is deferred and each tile is only drawn at most once per frame.
2021-10-21 08:50:07 -05:00
Lucas Scharenbroich
4338b64338 First cut at a non-trivial overlay. Pallettes and tile indexes still to be fixed 2021-10-11 14:09:38 -05:00
Lucas Scharenbroich
a82c1248db Add untested framework for handling fringe tile rendering 2021-08-30 22:14:04 -05:00
Lucas Scharenbroich
dcf93892a7 Reorg some more files and tweak paths 2021-08-26 16:45:23 -05:00
Lucas Scharenbroich
69c6104742 Small initialization and jsr/jsl updates 2021-08-26 16:12:08 -05:00
Lucas Scharenbroich
4af66fa13a Fix initialization order 2021-08-26 09:45:40 -05:00
Lucas Scharenbroich
fe18759759 Refactor original demo driver to use GTE Core; move functions around 2021-08-26 08:52:43 -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