Lucas Scharenbroich
d7c0577167
Fix typo that caused sprite to render above a tile with priority set; only for dirty tiles
2022-07-08 12:37:06 -05:00
Lucas Scharenbroich
086f462617
Restrict _Refresh to only on-screen tiles
2022-07-08 12:36:07 -05:00
Lucas Scharenbroich
552d32d0fa
Add back support for SPRITE_HIDE control bit
2022-07-08 12:35:49 -05:00
Lucas Scharenbroich
e9a2b8569b
Fix drift between public macro file and internal definitions
2022-07-07 17:57:05 -05:00
Lucas Scharenbroich
530cdbd07f
Merge branch 'dirty-tiles'
2022-07-07 17:44:21 -05:00
Lucas Scharenbroich
5ab9fe1c3b
Fix bank register for overlapping dirty sprites
2022-07-07 17:43:57 -05:00
Lucas Scharenbroich
af7bd36906
Fix logic to prevent unecessary sprite updates
2022-07-07 17:22:44 -05:00
Lucas Scharenbroich
9856bad091
Fix dirty<->normal rendering transition
2022-07-07 14:46:37 -05:00
Lucas Scharenbroich
77b69cdc82
Fix _PopDirtyTile2 routine to sync with new TS_DIRTY conventions; fixes basic dirty sprite rendering
2022-07-07 09:12:23 -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
41539ae606
Update zelda demo to use tool interface
2022-07-06 08:53:50 -05:00
Lucas Scharenbroich
a33d7ab341
Fix initialization bug that has been there forever. Thanks Ian Brumby
2022-07-06 07:32:04 -05:00
Lucas Scharenbroich
58705653c4
Work on helpers to refresh TileStore procs based on rendering mode
2022-07-06 07:18:49 -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
9fdd1dc8a5
Fix sprite bit descriptions in comment
2022-07-03 11:13:07 -05:00
Lucas Scharenbroich
d720f0ccac
Add two additional functions
2022-06-27 17:15:27 -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
a51c973865
Fix addressing bug in SCB binding
2022-06-27 00:41:02 -05:00
Lucas Scharenbroich
81e0aeb351
Fix some minor bugs in the TwoLayer rendering functions
2022-06-27 00:32:44 -05:00
Lucas Scharenbroich
145fd2afc4
Fix argument definitions
2022-06-26 23:42:21 -05:00
Lucas Scharenbroich
b7d061e666
Fix simple script handling
2022-06-26 23:32:15 -05:00
Lucas Scharenbroich
8aafd5812b
Work to expose times via Toolset
2022-06-26 22:08:42 -05:00
Lucas Scharenbroich
c257d72060
Fix argument handling in SetPalette
2022-06-25 21:21:20 -05:00
Lucas Scharenbroich
78ee683ba8
Stub in a lot of the remaining functions
2022-06-25 11:17:50 -05:00
Lucas Scharenbroich
bcdc543241
Add in all the two-layer tile renderers; update complete. Just need to test
2022-06-23 11:31:42 -05:00
Lucas Scharenbroich
3292572261
Add TwoLayer rendering stubs
2022-06-22 15:29:09 -05:00
Lucas Scharenbroich
280d19876c
Fix a nasty macro/lup bug
2022-06-22 00:09:08 -05:00
Lucas Scharenbroich
4c1dba0f68
Complete Dynamic Tile renderer
2022-06-21 23:13:28 -05:00
Lucas Scharenbroich
76a9710114
Add dynamic rendering functions
2022-06-21 15:28:58 -05:00
Lucas Scharenbroich
a91f39aab8
Remove dead code and implement Slow tile renderers in terms of the Fast once to avoid code bloat
2022-06-21 13:33:17 -05:00
Lucas Scharenbroich
2820d318a0
Final cleanups for Fast mode
2022-06-21 11:23:06 -05:00
Lucas Scharenbroich
400851259d
More minor fixes
2022-06-21 10:06:17 -05:00
Lucas Scharenbroich
553fd3c02a
Tweaking updated sprite dispatch flow
2022-06-21 07:29:18 -05:00
Lucas Scharenbroich
4ea3033b5e
Get minimal tiles and sprites rendering without a crash
2022-06-20 17:57:19 -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
12b05139c2
Move to tables of dispatch tuples to set tile rendering information
2022-06-14 14:21:51 -05:00
Lucas Scharenbroich
d3da96a834
Add in the special Tile 0 render routines
2022-06-14 08:12:33 -05:00
Lucas Scharenbroich
7af4a216a0
Add modular dispatch for copy routines; add initial support for tile priority bit
2022-06-12 05:28:12 -05:00
Lucas Scharenbroich
955cf4a580
Remove unused memory and start working on priority renderer
2022-06-09 07:41:58 -05:00
Lucas Scharenbroich
e5938cb3c7
Change the entry points based on the engine mode
2022-06-08 23:34:15 -05:00
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
227643d7df
Fix H+V sprite stamp renderer
2022-06-08 17:17:28 -05:00
Lucas Scharenbroich
388470c133
Fix left-edge sprite rendering glitch; was an issue with not erasing sprites when they transition to IS_OFFSCREEN status
2022-06-08 14:25:52 -05:00
Lucas Scharenbroich
1de4c0bc7f
Make sure all macros add the vbuff offsets
2022-06-07 10:05:52 -05:00
Lucas Scharenbroich
3591c494bf
Add three-sprite rendering function
2022-06-07 10:05:40 -05:00
Lucas Scharenbroich
2c409b02a7
Fix lookup tables to fix boundary rendering
2022-06-06 20:10:15 -05:00
Lucas Scharenbroich
b6202ca44c
Implement framework for adjusting VBuff tables to handle boundary transitions
2022-06-06 11:23:00 -05:00
Lucas Scharenbroich
36d57f7c2d
Fix signed calculations for negative sprite X and Y coordinates
2022-06-02 23:02:06 -05:00
Lucas Scharenbroich
783e813dc2
Implement overlapping rendering for two sprites
2022-06-02 13:59:15 -05:00
Lucas Scharenbroich
e6251f05a3
Clean up constants and fix bad addressing mode
2022-06-02 13:06:26 -05:00
Lucas Scharenbroich
4f557230c6
Remove some dead code and streamline some addressing. Fix bug in dispatch macro
2022-06-02 12:28:49 -05:00
Lucas Scharenbroich
83ec527b06
Make the test demo more sophisticated; multiple sprites
2022-06-01 22:24:45 -05:00
Lucas Scharenbroich
24ebb1f3af
Fix Tile Store lookup initialization bug
2022-06-01 21:12:54 -05:00
Lucas Scharenbroich
a938639c1b
Fix initialization bug in TileStore
2022-06-01 13:55:04 -05:00
Lucas Scharenbroich
b022162036
Fix vertical offset bug; was using the TileStore lookup index, not the TileStore offset
2022-06-01 09:19:28 -05:00
Lucas Scharenbroich
cde517bcc9
Fix single-step vertical displacement issue
2022-06-01 07:50:19 -05:00
Lucas Scharenbroich
dec50bc6fc
Fix several bugs; biggest one in the SpriteStamp routine
2022-05-31 22:53:33 -05:00
Lucas Scharenbroich
98adfe5daa
Continuing to tweak and debug
2022-05-31 16:31:44 -05:00
Lucas Scharenbroich
bba8929db7
PRoperly initialize Lookup tables
2022-05-31 13:01:09 -05:00
Lucas Scharenbroich
10d6dc5931
Fix crashing when trying to render sprite; sprite not visible but have end-to-end code execution
2022-05-31 09:14:25 -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
d27b10b6fd
Fix nasty RTable initialization bug
2022-05-22 23:52:54 -05:00
Lucas Scharenbroich
8582ecb320
Fix weird search/replace bug
2022-05-22 21:57:52 -05:00
Lucas Scharenbroich
9ac9ea623e
More banking fixes
2022-05-19 23:40:45 -05:00
Lucas Scharenbroich
fc48330061
Fix bug in tile rendering and tile sheet copying
2022-05-18 22:49:14 -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
4d6f11a9ba
Initialize the graphics screen via the toolset
2022-04-25 17:11:48 -05:00
Lucas Scharenbroich
1522922abe
Complete initialization sequence.
2022-04-25 16:35:47 -05:00
Lucas Scharenbroich
e5da3991cd
Start to split the tiles into high-level and low-level code
2022-04-25 16:34:54 -05:00
Lucas Scharenbroich
5745482ef6
Fix bank setting on toolset entry
2022-04-25 11:32:25 -05:00
Lucas Scharenbroich
d107365d79
Break up large source code files to help with dependency ordering
2022-04-25 11:32:06 -05:00
Lucas Scharenbroich
29d70dc567
Break up large source code files to help with dependency ordering
2022-04-25 11:30:24 -05:00
Lucas Scharenbroich
76180b6feb
Basic working user tool framework
2022-04-24 14:45:07 -05:00
Lucas Scharenbroich
1f9f2aee0c
Thank to Kelvin Sherlock for pointing out that the source files were not setting the register state directive
2022-04-23 15:41:25 -05:00
Lucas Scharenbroich
9692277677
Work on fixing linker / OMF errors
2022-04-23 12:48:13 -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
df0d0ccada
Commit to a huge unrolled loop to do bitfield -> render function
2022-02-25 17:05:32 -06:00
Lucas Scharenbroich
ef620e48a3
Remove cached value; too slow to maintain on sprite remove
2022-02-25 17:03:36 -06:00
Lucas Scharenbroich
7bde48e36c
Enable all dirty bits to minimize per-frame, per-sprite work
2022-02-23 08:41:02 -06:00
Lucas Scharenbroich
88fba6cd15
Add plb to prevent crash in unimplemented multisprite handler
2022-02-22 21:37:03 -06:00
Lucas Scharenbroich
19ae2b0866
Remove stray pla that prevented more than one sprite from rendering
2022-02-22 21:27:47 -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
56bfdc4236
Fix sprite VBUFF offset calculation
2022-02-21 15:58:16 -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
b4025f11fc
Fix stray push instruction
2022-02-21 14:31:05 -06:00
Lucas Scharenbroich
9d401a5861
Fix masking bug in sprite pre-calc
2022-02-21 14:25:55 -06:00
Lucas Scharenbroich
54474bbe5f
Add more pre-computed values to the sprite structure
2022-02-21 13:33:39 -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
95572fbf49
Fix the mask values when enumerating through the sprite sheet
2022-02-18 16:20:07 -06:00
Lucas Scharenbroich
260b2097c2
Continue fixing code issues; strange relocation error happening
2022-02-18 13:42:37 -06:00