PDA

View Full Version : Sprites are back!


tcdev
24th September 2008, 03:43 PM
I've started making significant changes to the graphics modules - most notably the ports on each of the entities, to use records as far as possible - in the process of reviewing the sprite engine.

On the existing architecture, the sprite register decode was a two-tier process - the game module was required to present the sprite registers as a block of contiguous addresses to the sprite register block, which then decoded the individual registers for each sprite. A legacy of the original schematic-based design and somewhat confusing.

Now, the sprite controller for each platform is responsible for fully decoding the sprite register address space. Also the registers themselves are now (correctly) clocked off the cpu clock rather than the video clock as before.

And somewhere in these modifications, the sprites appeared again - at least in Galaxian - and I'm sure the others will now be OK. :)

It's still very much WIP and no doubt I've actually broken every PACE design again - but bear with me - these changes are designed to minimise the chance of future changes breaking the entire project repository! :cool:

It'll probably take me a couple of weeks to complete the changes to the sprite engine and graphics modules, and then go through all the projects and bring them up-to-date - including tweaking all the sprite controllers for the new video/sprite engine.

BTW the status matrices were actually almost accurate until this evening - now I've broken everything again. But I'll endeavour to make the framework changes as soon as possible, and update the non-sprite projects again to reflect the status on this forum. :o

tcdev
28th September 2008, 07:52 AM
I've finished the re-write of the PACE framework - I think! :D

Hopefully, this time it's reasonably future-proof, via the use of records for all the ports. If I need to add or change a port, in theory it's simply a matter of modifying the record type declaration and re-building. Gone are the days of modifying every single project in the repository (I hope!)

Aside from the port stuff, the sprite code was cleaned up a little (there's not a lot of code there anyway) and the "game" module has been renamed "platform". I also moved the inputs module out of game(platform) and into the PACE top-level module, so the mapped inputs (only) are now fed into the platform module - no need for each platform to instantiate the inputs module.

For unused ports, there's a set of functions that drives 'NULL' values into the port record, to further minimise changes if the port record definition is altered. As a result there's a set of (more) packages and package bodies that must be included in each project.

Right now, SI and TRS-80 are 100% on the DE1 platform. DE1 Galaxian just needs its sprite controller tweaked, and it'll be 100%.

I'll spend the next week or two bringing all remaining PACE projects up-to-date so that they build again, and I'll be tweaking the bitmap, tilemap and sprite controllers so all projects should - finally - have 100% accurate graphics in a variety of video modes and scale factors.

Then I can finally continue adding functional content once again to those projects that have remained "WIP" for way too long... :(