I wonder when I became the kind of person for whom Michael Abrash's Graphics Programming Black Book became exciting and fun to read, instead of being daunting and terrifying

I have successfully loaded tiles from a TIF file that I drew in NeoPaint, converted them internally into EGA planar format, and drawn them to the screen. https://mastodon.social/media/Yg3wSvnVGXp8Foz1Te4

Just implemented page flipping, as a prelude to maybe implementing smooth scrolling.
It’s pretty amazing how little code this is? Like once you have a grasp on how EGA memory is laid out and you’ve got Michael Abrash telling you which registers you can poke to do neat stuff, it’s not complicated? This shit DESTROYED me as a teenager though, I never got ANY of it working outside the basic mode 13h linear framebuffer

Like I was convinced Mode X was black undocumented voodoo magic, instead of just, like, bankswitching? I had no concept that mode 13h was just throwing away 192kb of video memory because I had no concept of how RAM worked at all, really

I assumed interfacing with hardware was hard, when what was actually going on was that debugging was hard, and programs I wrote on my own without copying directly from tutorials were buggy

It’s really astonishing to me how different the experience of programming a 286 is compared to what I do at my job, how starkly the priorities are different
At my job, I make sure the code I write is flexible and correct. I build safeguards to ensure bad things will not happen when someone makes a change or grows the system
For this project, I put together a pile of purpose-built subroutines and macros, kept simple enough that I could delete and rewrite any of them a dozen different ways

Mouse support is trickier than I expected! It would be easy if I just polled the state every frame but I decided to try to install a callback. I think I need to set the DS register at the start of the callback in order to access my data - I’m scribbling over something important and the computer hangs. But how do I know the value I should set it to? Is it even possible to do this in the small memory model? Argh

Got it! I looked at the generated ASM and figured out that DS was being ASSUMEd to a symbol called “DGROUP”; so I just explicitly set DS to that at the start of the callback and no more crashy!
I am definitely doing something to confuse CuteMouse’s cursor-drawing routine though... probably it assumes I have writing to all four planes enabled https://mastodon.social/media/uax66anGIreYRARWjGs

Well, definitely that, but it also plays _very_ badly with my page flipping implementation - you can see it writing into video memory when I’m flipped to the second page! sooo I guess I’ll be drawing my own damn mouse cursor https://mastodon.social/media/QGLwPAjaEOSkSqTnnq4

I’ve been pondering scrolling for a few days, and whether I could figure out how to write a huge smooth-scrolling playfield or whether I’d just flip from one screen to the next. This evening it occurred to me that surely at some point the Commander Keen source code must’ve been released and I could just see how they handled scrolling. And indeed Keen Dreams is GPLed! https://github.com/keendreams/keen

Hmmmm this is... a little overwhelming. Lots of extra stuff that makes me wonder if I’m missing something important. Gotta keep in mind that it’s an entire game, after many rounds of optimization, instead of a week’s worth of occasional hacking, and my slower, dumber code can still lead to an outcome I’m happy with.

@SpindleyQ I feel like the source for Dangerous Dave in Copyright Infringement would be way more useful but alas, no such source I can find

@darius yeah, definitely! Honestly if I could look at the raw video memory while that runs that’d be enough

@darius I should have known someone had just asked John Romero!

@SpindleyQ tbh john LOVES talking about this stuff and would probably happily answer any email you sent him

@darius I have definitely gotten that impression. I might do that!

Sign in to participate in the conversation
Friend Camp

The decentralized web is about trust. You should only join Friend Camp if you personally trust Darius Kazemi with your social media data. You probably only have that level of trust if we are IRL friends or have been internet friends for a long time. Generally speaking this is a small, closed community. In the end, Darius is the arbiter of what is allowed here. If you don't have a good idea of the kind of behavior that flies with Darius, again, you probably shouldn't join this instance. In the interest of specificity, we do have a code of conduct and privacy policy which you should read. Friend Camp features several modifications that were requested by our users. * you can log in via any subdomain, which means you can log in to multiple accounts in the same browser session (for example, log in once on friend.camp and then as another user on alt.friend.camp) * they are no longer called "toots", they are now "posts" * if you have a locked account and you get a follow request, a reminder appears under your "post" button (on normal Mastodon mobile it is otherwise buried in a sub-menu and you might not see it for a long time) * the emoji dropdown is a neutral smiley face instead of the cry-laughing smiley @mentions are rendered as "@user" for a Friend Camp user and "@user@domain" for remote users. This helps clear up when you follow two people who have the same username on different servers. * there is a "never ask me again" checkbox on the confirmation for clearing your notifications -- more info here * When an mp3 link is in a post, we also embed an inline mp3 player. git commit here * 500 characters of profile text git commit here, requested by @deerful Important Bit from the Privacy Docs: If you want decent privacy (the info doesn't leave this server), the only way to do that is to set your account to private, only accept friend requests from other friend.camp users, and only ever @ mention other friend.camp users. Once you start talking to people on other servers, all bets are off. Any private message you send to someone on another server could be looked at by the admin of a different server. This is kind of like email: if you are on a private email server, and you send an unencrypted email to a gmail account, congrats, Google now has the content of that email. But also, you do this every day, so, hey. The internet! Our beautiful icon is based on photo3idea_studio from www.flaticon.com, licensed CC 3.0 BY. It has been modified by @casey@friend.camp!