Dírojed CGA by CRTC
screenshot added by reenigne on 2014-06-24 09:58:38
platform :
type :
release date : june 2014
release party : Sundown 2014
compo : oldskool demo
ranked : 3rd
related :
  • 17
  • 4
  • 0
popularity : 59%
  • 0.81
alltime top: #7519
added on the 2014-06-24 09:58:38 by reenigne reenigne

popularity helper

increase the popularity of this prod by spreading this URL:

or via: facebook twitter pinterest tumblr


Port from 286+/VGA to 8088/CGA of Dírojed by Řrřola (http://www.pouet.net/prod.php?which=28913) while remaining 32 bytes.

Due to size limitations I had to change the exit key from Esc to Ctrl+Alt+Del, and you get a reboot for free.

DOSBox capture (long version).
Live video from the party (thanks to Deltafire).

More info and greetz in the .nfo.
added on the 2014-06-24 10:05:36 by reenigne reenigne
was it port or blatant rip?
added on the 2014-06-24 10:25:05 by g0blinish g0blinish
Hoi hoi hoi. CGA. 8088. Hoi Hoi Hoi!
rulez added on the 2014-06-24 11:05:50 by Optimus Optimus
g0blinish: Compare the codes and decide for yourself! I did start from Řrřola's code but only 1/3 of the instructions remain unchanged. Also the constraints are so tight I would probably have ended up with the same code even if I tried to implement the same algorithm from scratch.
added on the 2014-06-24 11:28:40 by reenigne reenigne
Cool, not too many CGA prods around.
rulez added on the 2014-06-24 11:58:02 by Preacher Preacher
wow! :)
rulez added on the 2014-06-24 12:13:24 by mad mad
rulez added on the 2014-06-24 12:59:04 by bitl bitl
More and more 8088 entries, keep it coming!
rulez added on the 2014-06-24 13:02:35 by Harekiet Harekiet
It's a classic 32b, and looks good in CGA. I recommend watching on dosbox (or real hardware of course :) btw, since the youtube doesn't do it justice compared to what I saw at the party. The 'dither' pattern was really neat.
rulez added on the 2014-06-24 16:41:33 by psonice psonice
I don't know ... i looked at the codes, and it is basically the same. Changes are of cause due to the different screen mode, but otherwise, same concept, same cellular automaton, even same pseudo random value. The flow is a little different (XCHG) but you lost the "ESC" function. Also, i instantly see a 1 byte improvement ... so what do i do here?

I'll closely thumb it up, for keeping the name of a legend alive, for the approach itself, for the retro spirit, and for yay! CGA ;)
rulez added on the 2014-06-24 17:36:21 by HellMood HellMood
nice looking 32b. also looked nice at the stream. so here is my thumbs.
rulez added on the 2014-06-24 17:46:51 by sensenstahl sensenstahl
Well, actually it seems not to difficult to hack the CGA mode into Rrrola's original, while keeping the possibility to quit with "ESC", and also keep the filesize at 32 bytes.

Code:org 100h mov al,04h int 10h mov bh,0xb8 mov ds,bx M: cmp [bx],cl adc [bx],ah imul bx,byte 0xE5 mov cl,[bx] add cl,[bx+di] add cl,[bx-81] add cl,[bx+si+63] dec bx in al,60h dec ax jnz M ret

Tested in DOSBox 0.74 and Virtual Box (MSDOS 6.22)

Download commented source and executable >>here<<
added on the 2014-06-24 19:42:29 by HellMood HellMood
mov bh,0xb8 - of course! 3 more and I can put back the Esc functionality... In my defense, I stopped looking for optimizations once I reached 32 bytes.

Yes, it is very derivative of the original Dírojed and I never claimed otherwise. But it is a party hack, and it's about as different from Dírojed as Dírojed is from Lochfrass.
added on the 2014-06-24 19:50:58 by reenigne reenigne
HellMood: The original point point of Dírojed CGA was to run on my XT so I can't use that "imul bx,byte 0xe5" instruction. Nice work though!
added on the 2014-06-24 19:53:55 by reenigne reenigne
@reengine: I see ;) I'm still very sure escapeable XT code is possible. For example, the "MOV AX ..." opcode is 0xB8 which could be re~used as screen adress. Also, you wouldnt need the complete manhattan neighbourhood for this kind of effect. Just taking and giving inspirations here =)
added on the 2014-06-24 19:58:37 by HellMood HellMood
Yeah, if I take just take out the
Code:add cl,[bx+79]
line I can put back the Esc code and keep it in 32 bytes and working on an 8088. I just get diamond shapes growing down instead of oval shapes growing in all directions. Nice idea!
added on the 2014-06-24 20:29:28 by reenigne reenigne
nice variation
rulez added on the 2014-06-26 10:27:47 by whizart whizart
Congrats on the 3rd place.

You don't really need the imul - "inc bp, sbb bx,bp" saves 3 bytes and looks similar. See the Kristal source for some Dírojed tweaks.
rulez added on the 2014-06-26 17:14:18 by rrrola rrrola
@rrrola: Oh wow, that is some insane and brilliant code! I was wondering the other day if it would be possible to overlap the initialization code with the start of the loop to get save some bytes. This random number generator is great too. As are the "xchg ax,cx; loop", "imul si" and "xlatb" tricks.

This version doesn't work so well on DOSBox though - I think there we just get too many iterations before the enter key is released so there are too many initial seed points. We can fix that (at the cost of turning off the keyboard control) by changing the imul to a mul, getting rid of the cmc and changing
Code:sbb [bx],dh
Code:adc [bx],dh

Using these tricks I was able to make a CGA version which spreads in all directions and has a working Esc! I couldn't find an overlapping instruction sequence that worked, but realized that I could load the segment register in 3 bytes using
Code:lds ax,[si-3]
, recycling the 0xb0 opcode from the initial "mov al,4" instruction as the high byte of the segment.
added on the 2014-06-27 16:15:47 by reenigne reenigne
Guys, you´re awesome =D
rulez added on the 2014-07-15 02:44:10 by T$ T$
Nice one. CGA Rooolz! :D
rulez added on the 2015-03-17 23:07:21 by ronaldo ronaldo
This discussion thread alone deserves a thumb.
rulez added on the 2015-06-24 13:52:27 by dojoe dojoe
rulez added on the 2015-10-07 22:38:07 by Pirx Pirx
rulez added on the 2016-12-16 16:57:14 by SiR SiR
Awesome. I feel like I'm observing some new life form. I'm going to be very still and observe its habits.
rulez added on the 2018-10-03 15:57:25 by subtext subtext
beautiful pattern
rulez added on the 2018-10-03 17:02:35 by noby noby
Is it me or does this look better in composite? Was that the intent? Watching on Tandy 1000HX.
added on the 2019-02-08 04:58:00 by blakespot blakespot
Is it me or does this look better in composite? Was that the intent? Watching on Tandy 1000HX.

added on the 2019-02-08 04:59:10 by blakespot blakespot

lists containing this prod

submit changes

if this prod is a fake, some info is false or the download link is broken,

do not post about it in the comments, it will get lost.

instead, click here !

[previous edits]

add a comment