Commit Graph

26 Commits

Author SHA1 Message Date
Lucas Scharenbroich e3409f92fa Add per-scanline offset rendering. 2023-03-09 15:29:58 -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 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 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 9ac9ea623e More banking fixes 2022-05-19 23:40:45 -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 7f6e5d1b1f Work checkpoint 2022-04-29 12:38:04 -05:00
Lucas Scharenbroich 16a3a385a9 Update some comments 2022-02-02 17:24:27 -06:00
Lucas Scharenbroich 7d76089215 Remove some dead code 2021-11-22 16:53:47 -06:00
Lucas Scharenbroich 69c6104742 Small initialization and jsr/jsl updates 2021-08-26 16:12:08 -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 b35a2c1e6e Complete masked tile rendering implementation
The core data tables were reworked to pre-reverse all of the
entries to directly match the right-to-left ordering of the code
fields.  This simplified some code but was required for register
reuse in the masked tile renderer.

Also fixed several offset calculation issues in the masked tile
renderer.
2021-08-17 09:33:27 -05:00
Lucas Scharenbroich 39639d54b5 Fix some small bugs with tile rendering; tiles display but crash after scrolling 8 bytes 2021-08-06 14:42:18 -05:00
Lucas Scharenbroich 160a9afafb Add proper handling of wraparound in vertical positioning 2021-07-17 21:00:46 -05:00
Lucas Scharenbroich abfcde54c2 Initial addition of BG1 support 2021-07-16 00:34:58 -05:00
Lucas Scharenbroich 63bfe5e8e7 Resolve horizontal scrolling issue with PEA code 2021-07-15 21:00:35 -05:00
Lucas Scharenbroich 26e39e3bfd Horizontal scrolling no longer crashes; still have incorrect edge rendering 2021-07-15 15:30:24 -05:00
Lucas Scharenbroich b6fadedfc7 WIP of fixing horizontal scrolling 2021-07-15 13:53:53 -05:00
Lucas Scharenbroich 50f5da5608 WIP on BG0X positioning; fix tile horizonal calculation 2021-07-15 11:01:42 -05:00
Lucas Scharenbroich ab9a2682db Fix table initialization and bank preservateion in _BltRange 2021-07-10 15:38:42 -05:00
Lucas Scharenbroich 469e8bb74a Add all minimal function in place; not onto debugging 2021-07-09 15:38:32 -05:00
Lucas Scharenbroich 5d713caf5c More parts of the render pipeline in place 2021-07-09 14:18:49 -05:00