Posts

Showing posts from September, 2020

Faster Mode-X Sprite Rendering

Back in June, I made a sprite rendering system for DOS/VGA Mode-X.  Running it on a pcem 386 showed that the sprite clipping code was hella slow . So I decided to rip out the clipping code.  To allow sprites to overlap the screen boundary, I set up the VGA display registers to have a 32px off-screen border around the display. The system still splits the sprite into separate planes, and it still works by skipping some pixels then drawing some. It works across a scanline (within a single plane) so I can use rep movsb.  It also hard-codes the scanline width into the number of pixel bytes to skip - that's so I don't have to multiply the display width by the number of scan-lines to skip.  That means my game can only run in a single screen resolution, but it's only going to run in Mode-X so that's not a problem. Another tweak is that as much as possible, it loads 16-bits of data at a time.  This should make better use of the bus, which can be an issue with the 386SX....

September Monthly Projects

Last month's projects: Physical make: CnC router   Well, I dug around in my pile of projects and pulled together all the disparate parts of this project, but not a lot else.   I now have the pi, a monitor and a motor controller running off of an ATX supply.  What I don't have is the motor, threaded rod or rotary encoder actually installed on the sliding tray. I'm going to roll this over into September.  It shouldn't be too big a step now to at least attempt getting them installed. Coding make: I did it!   It wasn't the helicopter game I imagined, but it was an entry to the jam. :) Reading: My Past & Thoughts by Alexander Herzen.   I haven't finished this yet, but I am really enjoying it!  His writing (with the translation) is really easy to read and gives loads of glimpses into 19th century Russian life.  I've just got to his letters from Paris and Italy after he's finally escaped from Russia. September's projects: Physical make: CnC ...