Commit Graph

39 Commits

Author SHA1 Message Date
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
Lucas Scharenbroich
5e757f3cc5 More play-around 2020-08-23 00:25:39 -05:00
Lucas Scharenbroich
30cb545e5e Update skeleon to show a pictire on-screen 2020-08-19 00:35:30 -05:00
Lucas Scharenbroich
b3cd693af7 Add minimal S16 test app. Configure SetStart in the emulator to automatically run on emu boot 2018-08-04 23:31:46 -05:00