Deathshadow's Madness
Madness and You, Perfect Together

10 Nov 2017 - Why I use BCD for scorekeeping in 8088 games

For a while I’ve gotten a LOT of questions about why the C64 version, and my upcoming ASM version of Paku Paku tracks scores in BCD – Binary Coded Decimal. The simple fact is that it is WAY faster even with the overhead of the long score additions. Sure, each score takes 8 bytes (I display a fake ‘0’ after since all score values are multiples of ten, 9 digits is overkill) instead of four...

But the simple fact is that whilst yes, adding a value to the score takes eight additions with AAA (ascii adjust for addition), that is still WAY faster than the multiple divides (16 in total) needed to turn a 32 bit integer into ASCII or even just BCD -- and you'd need it in one or the other to output to the screen! You basically NEED unpacked (aka 8 bits per digit) binary coded decimal or something like it to handle display numeric output in a way Joe Sixpack and Susie Sunshine can digest. "normal people" aren't going to be happy if you display your scores in a game in hexadecimal!

10 Nov 2017 - Why I use BCD for scorekeeping in 8088 games

For a while I’ve gotten a LOT of questions about why the C64 version, and my upcoming ASM version of Paku Paku tracks scores in BCD – Binary Coded Decimal. The simple fact is that it is WAY faster even with the overhead of the long score additions. Sure, each score takes 8 bytes (I display a fake ‘0’ after since all score values are multiples of ten, 9 digits is overkill) instead of four...

But the simple fact is that whilst yes, adding a value to the score takes eight additions with AAA (ascii adjust for addition), that is still WAY faster than the multiple divides (16 in total) needed to turn a 32 bit integer into ASCII or even just BCD -- and you'd need it in one or the other to output to the screen! You basically NEED unpacked (aka 8 bits per digit) binary coded decimal or something like it to handle display numeric output in a way Joe Sixpack and Susie Sunshine can digest. "normal people" aren't going to be happy if you display your scores in a game in hexadecimal!

10 Nov 2017 - Why I use BCD for scorekeeping in 8088 games

For a while I’ve gotten a LOT of questions about why the C64 version, and my upcoming ASM version of Paku Paku tracks scores in BCD – Binary Coded Decimal. The simple fact is that it is WAY faster even with the overhead of the long score additions. Sure, each score takes 8 bytes (I display a fake ‘0’ after since all score values are multiples of ten, 9 digits is overkill) instead of four...

But the simple fact is that whilst yes, adding a value to the score takes eight additions with AAA (ascii adjust for addition), that is still WAY faster than the multiple divides (16 in total) needed to turn a 32 bit integer into ASCII or even just BCD -- and you'd need it in one or the other to output to the screen! You basically NEED unpacked (aka 8 bits per digit) binary coded decimal or something like it to handle display numeric output in a way Joe Sixpack and Susie Sunshine can digest. "normal people" aren't going to be happy if you display your scores in a game in hexadecimal!

Programming Projects

Paku Paku

A simple Pacman clone for vintage computers that clean-room implements the game logic.

HTML 5 Canvas Demo

Just playing around with canvas (circa 2008).

glKernedFont

Kerned scaleable fonts for OpenGL. Out of date as it was written for OpenGL 1.2

SDLTexture

Just playing around with generating textures inside Pascal for SDL.

jDOSBox Tutorial

How to create the files for the JAVA port of DOSBox, and then embed it in a website.

About Me

Me!

This site was created by Jason M. Knight, a retired software engineer with decades of experience in electronics, software development, and graphic arts; not to mention a wide range of hobbies including Saxophone, EWI, programming, carving, drawing, and just being a general pain in the ass on web development forums.