Commit Graph

53 Commits

Author SHA1 Message Date
Lucas Scharenbroich
4b50fa8318 checkpoint 2023-01-02 11:04:26 -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
97fa45589b Allow GTEStartUp caller to specify whether tool is loaded as a system or user tool 2022-08-01 22:00:54 -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
e9a2b8569b Fix drift between public macro file and internal definitions 2022-07-07 17:57:05 -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
d720f0ccac Add two additional functions 2022-06-27 17:15:27 -05:00
Lucas Scharenbroich
19f73c22ed Macro changes 2022-06-27 11:25:25 -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
05c308d64d Add new toolvall definition 2022-06-22 00:07:33 -05:00
Lucas Scharenbroich
83ec527b06 Make the test demo more sophisticated; multiple sprites 2022-06-01 22:24:45 -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
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
d107365d79 Break up large source code files to help with dependency ordering 2022-04-25 11:32:06 -05:00
Lucas Scharenbroich
76180b6feb Basic working user tool framework 2022-04-24 14:45:07 -05:00
Lucas Scharenbroich
bb83e7f7c5 Background rendering again 2022-02-18 20:43:55 -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
1fe02e035c Checkpoint 2022-02-02 10:21:31 -06:00
Lucas Scharenbroich
69ed76a65d Optimize the simple mixed BG0/BG1 handler
There is enough room in the 32-byte exception handler to inline the
9-byte epilogue when generating the code sequence for mixed BG1/BG0
rendering.

This code sequence is generated once and run for as many frames as the
word appear on screen, so saving an uncondition branch (3 cycles) at the
cost of 60 cycles is probably worth it.
2021-11-22 16:56:53 -06:00
Lucas Scharenbroich
5fdb4bcf06 Fix transposed argument in macro definition; dynamic tile + sprite now working 2021-11-19 13:26:19 -06:00
Lucas Scharenbroich
b4871efe8f Streamlining tile blitter macros 2021-11-19 13:00:59 -06:00
Lucas Scharenbroich
4c31a0d056 Reorg of exception handling code in the core blitter
* Moved V-flag handling outside of the 32-byte exception handler
* Switched relative branches to JMP to save a cycle per word
* Updated macros to create a full code snippet instead of assuming
  certain values exist in the exception handler buffer
2021-11-19 10:24:09 -06:00
Lucas Scharenbroich
0a9eb76ab5 Checkpoint; have old Dynamic Tile Renderers working 2021-11-18 16:23:44 -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
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
2966b1052b Add rendering path for masked dynamic tiles 2021-10-07 23:54:45 -05:00
Lucas Scharenbroich
87ded17e20 Initial Tiled tile animation export support
* Tiled tile animations read from TSX files
* Hooks for initialization generated by the tiled export tool
* Animated tiles implements with dynamic tiles backed by 2KB of direct
  page space in Bank 00
* Animation resolution limited to 1/60th incremenents

TODO
* Fix crasher in the _DoScriptSequ timer callback
* Fix single-line of garbage on the top line of the dynamic tiles
2021-10-06 07:10:09 -05:00
Lucas Scharenbroich
99e4505a34 Consolidate all of the project macros into one folder; merlin32 only takes one macro path on the command line 2021-08-25 09:34:26 -05:00
Lucas Scharenbroich
e607612344 Add initial build-out of BG1 tile map support 2021-08-19 01:22:36 -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
d9133a2170 Switch to using exported Tiled project assets 2021-08-14 20:58:37 -05:00
Lucas Scharenbroich
652729081e Stub in more tile rendering functions; does not crash but renders incorrectly 2021-08-13 11:38:06 -05:00
Lucas Scharenbroich
90124b04bc First draft of masked tile support
Need to have the called provide a copy of the base line address to the
masked drawing code and need to verify that the JTable entries are
ordered the same way as the byte offset so the same register can be used
to load the JMP addresses and patch in the LDA (DP),y instructions.
2021-08-13 10:05:28 -05:00
Lucas Scharenbroich
1936a0898c Sync up 2021-07-29 05:35:09 -05:00
Lucas Scharenbroich
5d713caf5c More parts of the render pipeline in place 2021-07-09 14:18:49 -05:00
Lucas Scharenbroich
8ec31631eb Split up source code a bit more; work toward completing render pipeline 2021-07-08 07:46:35 -05:00
Lucas Scharenbroich
9137440d41 Add a few missed files 2020-11-30 06:39:14 -06:00