Commit Graph

167 Commits

Author SHA1 Message Date
Lucas Scharenbroich 869d80af1e Comment cleanup and minro refactoring 2023-04-28 00:13:05 -05:00
Lucas Scharenbroich 57f57ce533 Restore shadow reg instead of overwriting 2023-04-27 23:38:26 -05:00
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 dc5742dd11 Remove dead code from codebase 2023-03-14 09:23:01 -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 065603a758 Core updates for BG1 scanline support 2023-03-11 03:41:41 -06:00
Lucas Scharenbroich 7dd690ac04 Implement fix for scanline mode compensation in BG1 2023-03-10 19:00:26 -06: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 3a78398ea7 Remove dead label 2023-03-09 00:26:31 -06:00
Lucas Scharenbroich 029ab62f0c Fix accidental double-addition of the screen origin 2023-03-08 14:15:11 -06:00
Lucas Scharenbroich a70412211c Simplify and specialize the even/odd patching
Allows the odd case to be slightly more efficient and the
code is cleaned up by not having to handle both even and odd
alignment cases at multiple points.
2023-03-08 12:49:45 -06:00
Lucas Scharenbroich 536959619f Refine the horizontal dispatch
Find small optimizations to improve the average performance of the
blitter, especially in the odd-aligned case.

 - Odd-aligned PEA exit is 2 cycles faster per line
 - Odd-aligned JMP exit is 2 cycles faster per line
 - Odd-aligned LDA exit is 6 cycles faster (eliminated long store)
 - Merged setting the entry opcode and offset to convert 2 8-bit
   store into a single 16-bit store (save 6 cycles per line)
 - Load and save the full word for the high bytes. Cost 2 cycles
   but enabled the 6 cycles saved for the LDA case.
2023-03-07 17:32:46 -06:00
Lucas Scharenbroich 6832c7f405 Update dynamic tile rendered to use fixed snippets. Add DAMAGES flag for the one render that doesn't fit the mold 2023-03-03 21:44:39 -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 981182592e Shadow based rendering working in demo-5 2023-02-27 15:30:56 -06:00
Lucas Scharenbroich b8a7641307 Add in all linked list operations 2022-09-08 21:51:00 -05:00
Lucas Scharenbroich eaedee546e Remove dead / obsolete code 2022-09-02 20:38:10 -05:00
Lucas Scharenbroich 217a1176a9 Remove obsolete blitter routines 2022-09-02 20:37:26 -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 5883de1f71 Checkpoint 2022-08-01 21:46:00 -05:00
Lucas Scharenbroich 7a6c4e5ff4 Break up Ypos loop into pre/loop/post segment to optimize. Saved ~5,000 cycles/sec. When applied to the other routines will save a few thousand more cycles 2022-07-31 11:51:42 -05:00
Lucas Scharenbroich 794bc1fc09 Start adding scanline variants 2022-07-30 11:04:13 -05:00
Lucas Scharenbroich 456744027d Inline all functions that are only called once
Eliminates the JSR/RTS overhead for the copy functions.  Combined
with the other streamlining, we save around 60 - 70 cycles per
bank, or a total savings of around 10,000 cycles per seconds when
running at full screen.

This doesn't really change the FPS, but just gives some cycles
back to the main application logic.
2022-07-28 13:15:46 -05:00
Lucas Scharenbroich fa731f4b2d Streamline restore BG0; experiment with more aggressive inlining 2022-07-28 12:15:00 -05:00
Lucas Scharenbroich 0f920acd03 Eliminate redundent register loads 2022-07-28 11:57:14 -05:00
Lucas Scharenbroich acf0276ff5 Get vertical rotation scaling going 2022-07-22 16:00:41 -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 23f3626293 Fix issues preventing BG1 per-line offsets from working 2022-07-16 16:42:41 -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 182ebfd566 Set dirty render to the correct direct page and several small cleanups 2022-07-06 14:55:27 -05:00
Lucas Scharenbroich a51c973865 Fix addressing bug in SCB binding 2022-06-27 00:41:02 -05:00
Lucas Scharenbroich 78ee683ba8 Stub in a lot of the remaining functions 2022-06-25 11:17:50 -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 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 e5938cb3c7 Change the entry points based on the engine mode 2022-06-08 23:34:15 -05:00
Lucas Scharenbroich dec50bc6fc Fix several bugs; biggest one in the SpriteStamp routine 2022-05-31 22:53:33 -05:00
Lucas Scharenbroich 78d7dafe14 Another checkpoint; converging on the working implementation 2022-05-31 08:43:26 -05:00
Lucas Scharenbroich 9da3616c1d Start working to bring sprites rendering back into the pipeline 2022-05-22 23:54:47 -05:00