Posts

Showing posts from April, 2020

Dos tidbit: register-based Watcall parameter order

It has occurred to me that in the course of writing DOS programs (some of which even work!), I spend an awful lot of time searching through documentation.  Which is, you know...fine.  It's part of the charm of retro coding. However, this ancient source has an inaccuracy which has bitten me twice (the second time because I forget about 99% of what I read).  Not that I bear the author any ill-will - if a document as detailed and comprehensive as that contained no inaccuracies at all, I would be worshiping the author as some kind of god.  It might even have been accurate at the time of writing (2010CE).  There's plenty more in that site which I intend to dig through and learn from as well. Anyway.  What bit me: When using register-based watcall* to call an asm procedure from C/C++, 16-bit parameters are passed in this order: AX, DX , BX, CX.   *in OpenWatcom V2 at time of writing. As I read it, the document says it is in the order AX, BX, CX, DX.  This caused me MUCH con

Homemade Joystick - Part 3

Image
Final mammoth post about an epic journey... TLDR: I dun maed a joystick out of wood and Stuff. The Abridged Backstory: I've been planning this for literally years .  The tools and materials available to me have expanded over that time.  My original plan was to make it out of cardboard using a Stanley knife and PVA.  Nobody was convinced that was going to work. This one is mostly built out of hobbyist plywood and dowels using a scrollsaw, power drill, Stanley knife and scalpel. The Base Frame: I have talked about the base frame in a previous post . A brief side note: My 3D printer is a relatively cheap setup from ALDI .  Software set up was a breeze on a Windows laptop.  I chose to print patterns from SD card rather than laptop (laptop hibernate aborted models halfway through).  I needed to cleanup prints with a scalpel afterwards, but has worked fine so far with no obvious signs of wear. How I'd do it differently in future: I'd try to copy the cent