Posts

Babylon 5 Starfury Model

Image
After two months, I have finally 'finished' the Starfury model. The painting is really untidy in places, and I really could not be bothered with the dozens of tiny water-slide transfers.  That said, I am still stamping this as DONE because it was getting really tedious towards the end. I love the Starfury design as a nod to Newtonian mechanics in sci-fi.  It is the most believable space fighter I've ever come across and I'm really glad I have finally got round to building this. The model design itself has many flaws.  Many of the pieces didn't fit snugly together, and the lower guns had to be literally chopped in half to get them stuck on.  They must have known of these flaws and just decided to ship it anyway.  After all, it's only fanboys like me that would buy it. I didn't have the right grey to paint it, so I mixed the colour from Vallejo's Cold Grey and some cheap white acrylic.  It's come out a little more blue than I wanted, but not badly eno...

DOS Coding: Sound Blaster sound

SB Documentation link . BASE_PORT = the base I/O port the SB is listening on (most often 0x220, but see 'detecting the card' below) Single vs Auto mode: For single transfer playback, you don't really need the Interrupt Service Routine. I've shifted to auto-initialise mode because I was getting clicks between each transfer. For auto-initialise mode, you set up the DMA for the whole buffer, but tell the SB/DSP it's half the buffer size.  That way, once the first half is transferred, you get an interrupt to say you can overwrite the first half.  Then when the whole lot is transferred, you get another interrupt to say you can overwrite the second half.  (By that time the DMA has already auto-reset back and started transferring the first half of the buffer) Step 1: setting up sb_read() and sb_write() subroutines You should really check if the soundblaster is ready before reading or writing. Seeing as you need to write and read to detect/reset the card, these really come ...

Update: SilkWorm Tribute

Lots of trial, error and frustration has got me to this stage: This video was screen-grabbed from pcem running as a 386SX. 386s are SLOW AS ALL HELL, so I had to do some trickery for the parallax scroll: Use a 'trash buffer': I set up the VGA so there is 32px of invisible data to the left and right of the display (and also above it).  This means I don't have to worry about clipping my sprites.  If they're even partially on-screen, there's enough trash VRAM around the screen that it won't wrap round or corrupt other pixel data. Shrink game area: use a status display to shrink the rendered game area.  I did this with the VGA's Line Compare functionality, so that when it reaches pixel row 176, it will reset to render from VGA offset 0x0000.  (I also had to change the Pixel Panning Mode bit in the Attribute Mode Control Register because I use hardware panning). Solid colour blanking: this can be done with an asm rep stosb and a suitably large value in cx.  ...

July Monthly Projects

Last month's projects Physical make: Build a model Starfury I have had in the cupboard for literally decades . This is going fairly well but isn't finished.  I've had some delays waiting for supply deliveries but mostly I've been taking my time over it. The model has plenty of gaps where the pieces don't quite fit, and a glaring design-fail with the lower gun pieces.  I'm going to keep this one going this month and post photos once it's done. Coding make: Write a DOS Mode-X tribute to Silk Worm .  This has involved so much learning.  The sprite code took a huge amount of work, and now I'm writing tilemap code that is going to have to be really fast if it's going to be usable.  Most of the screen is going to have to be rendered every frame if it's going to look anything like the original.  So I'm keeping this one on for July as well.  I really want to get something recognisable and playable (even if it's not properly complete) before I ...

VGA Mode-X Sprite Rendering

As part of my SilkWorm project, I've got a transparent sprite-rendering system going. It's over-complicated, but it works quite quickly.  I'm writing this more as a reminder to my future self than as a HOWTO, so I'll not go into the gory details. The system is inspired by a really nice idea from StaticSaga and 36rKATPURPY on the Discord server linked to a DOS game jam .  Their system is simpler and more data-efficient.  My code is clunky but for the moment seems to work, so I'm leaving it as is until it breaks or needs speeding-up. The problem Mode-X stores pixel data in planes.  It can use VGA hardware to copy 4 pixels at a time, but only on 4px-aligned boundaries.  Michael Abrash' Black Book covers one method of how to do transparent sprite rendering without the 4px alignment, but it involves uploading 4 copies of each sprite to VGA RAM, and setting the plane mask for every 4-pixel copy.  To me, this seemed like a waste of VGA RAM, and any speed boost w...

June Monthly Projects

Last month's projects They weren't 100% successful, but I got some stuff done. Wall-mounted PC: completed Coding make: demo submitted to game jam. Still plenty of work that could be done to it, but I'm pleased with what I achieved. Non-coding make: Westworld-style Shadowrun setting.  This was slightly disappointing.  I read plenty about San Francisco and pored over maps and such.  I came up with some nebulous ideas, but with nothing concrete to show for it.  A particular stumbling block for me was that I know nothing about San Francisco.  Making a setting based on a real-world location I know nothing about seems like I'm setting myself up to fail - it'd never be believable to anyone who actually knows the city. Reading: This was hella slow going, but I wanted to study the book (and still do). Despite incomplete projects, I feel like making a shortlist was pretty useful for helping me focus on particular ideas.  So here's this month's projects: June'...

May Reading Project

This month I have been mostly reading The Conscious Mind by David J. Chalmers . It's a full-on philosophy book, so it was really hard going.  But I did finish chapter 1! Why so slow? Apart from being a pretty slow reader, I only got one chapter read because I was taking Cornell notes as I worked through it. They take a lot of time and effort.  I understand better now why the students I teach hate taking them so much. There were a few important benefits for me though:    - Using them has left me with a feeling that I do understand what I've read    - For the most part I can remember the key ideas    - They provide a really nice summary to read over when I come back to take on the next chunk reading I'll continue with Cornell notes for books that I really want to study rather than just read. For books that I want to read, but might want to refer back to, I'm going to try sticky page-markers instead.  So for popular science or history books, ...