+Andrew Davie Posted August 19, 2013 Share Posted August 19, 2013 Just curious if any '2600 programmers would like to share short bits of code or algorithms which they happen to be proudest of, and perhaps why the code is special to them. Could be something that saved a few cycles, or something that did the impossible -- or was 'clever' or perhaps achieved some effect that was surprising. Just curious if there's anything 'out there' that people are proud of. So, opening the field to everyone -- it may not be the most sophisticated bit of programming, but if YOU are proud of it, perhaps you might like to share it and explain why. Open to Bb and assembler... 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 19, 2013 Share Posted August 19, 2013 You start! Quote Link to comment Share on other sites More sharing options...
roland p Posted August 19, 2013 Share Posted August 19, 2013 (edited) 8bit * 8bit, high byte as result: ;$0 = number 1 ;$1 = number 2 ;result in A LDA #0 .LOOP ROL $0 BCC .dontAdd LSR $1 ADC $1 jmp .LOOP .dontAdd LSR $1 BNE .LOOP end I'm proud because I invented it myself and turned out to be peasant or 'russian multiplication', Also beacuse it's small and compact and unreadable . But it is a bit slow... In kernel bresenham used in ballblazer: LDA value SBC position BCS *+2 STA value This is what made the checkerboard kernel possible. It slowsdown the processor once every few lines, depending on 'position'. I should continue my work on that game... I have some more on my other pc. Like a self-modifying-self-modifying kernel (for drawing solid colored tiles). and multiple cycle-constant kernels (without sta wsync), which are a pain since the last loop of a cycle-constant kernel is 75 cycles instead of 76 cycles, which causes the next kernel to happen one cycle too early. But maybe this 'problem' is already solved Edited August 19, 2013 by roland p Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted August 19, 2013 Share Posted August 19, 2013 The bit sliding algorithms for the four-way scrolling virtual worlds of the ASDK were a lot of fun; they're not short but I've shared all of the source and docs for Assembly and bB developers! BoulderDash inspired me Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 19, 2013 Share Posted August 19, 2013 I think I am most proud of the graphics extension I once developed for the C64 and then ported and improved for the Borland Graphics Library. Especially the ultra fast, pattern flood fill was really challenging. I remember how my code and a Tseng ET4000 beat the first hardware accelerated S3 graphics carts my friends were so proud of. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted August 19, 2013 Share Posted August 19, 2013 I wrote a bitblitted 'sprite' routine for my Atari ST game, 'Hero III'. It was in 68k assembler, which I at first knew next to nothing about, and was integrated into the rest of the game, which was in compiled GFA basic. I 'invented' a bit masking scheme to keep a black/transparent outline on each sprite to make it stand out...which I thought was pretty cool, plus it sped up the game to the point where it was really playable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.