Page 1 of 1
New demo uploaded: quick sort color demo
Posted: Sat Mar 13, 2021 10:54 pm
by x16tial
quick sort color demo
View File
Variation of the quick sort demo, but this one using the 320x240x8bpp mode, which uses double the memory, and is that much cooler to watch
? Tap any key to progress from:
Random
Slowed down sort
Random
Full speed sort
Back to Basic
Note: that band of "non random" pixels below the middle of the screen is the default location of character tiles at $0f800 = $0ffff. This gets moved to right after screen memory at $04000 - $047ff (which is probably where it *should* default to, if you ask me
:))
Submitter
Submitted
03/13/21
Category
New demo uploaded: quick sort color demo
Posted: Sat Mar 13, 2021 10:59 pm
by desertfish
what RNG are you using to set everything back to random?
New demo uploaded: quick sort color demo
Posted: Sat Mar 13, 2021 11:34 pm
by x16tial
36 minutes ago, desertfish said:
what RNG are you using to set everything back to random?
entropy_get ($fecf)
then I just use part of the routine in the example in the doc:
JSR entropy_get
STX tmp ; combine 24 bits
EOR tmp ; using exclusive-or
STY tmp ; to get a higher-quality
EOR tmp ; 8 bit random value
Then STA that value into mem
The doc recommends that "this data should be fed into a pseudo-random number generator" but it seems to work well enough.
New demo uploaded: quick sort color demo
Posted: Wed Mar 17, 2021 5:39 pm
by x16tial
Just added "sortdemocolor2.prg"
This one will pause at each "level" of the sort, kinda fun to see how the colors separate at each level.
Will have to be downloaded to use it, as the "Try it now" button in the download dialog runs the original.