Started by litwr, 14:08, 13 December 21
0 Members and 1 Guest are viewing this topic.
Quote from: ComSoft6128 on 17:29, 13 December 2116 screens are generated by M4.BIN & 16 screens are generated by M16.BIN.Please note that screen generation is not automatic, keyboard input (one key) is required.Not emulated - original hardware and software.Please note that the aspect ratio for this YouTube video is 16:9 but the CPC monitorhas an aspect ratio of 4:3 so you may wish to adjust your viewing device accordingly.
Quote from: litwr on 14:08, 13 December 21I have just released a super-fast Mandelbrot generator program for the Amstrad CPC and several other platforms. Its algorithm doesn't use multiplications at all, it uses squaring instead. Benchmark results are here: the Z80 shows some advantages of its 16-bit registers but a home PDP-11 shows even slightly better results.
push hl ;*100 add hl,hl add hl,hl pop de add hl,de push hl add hl,hl add hl,hl pop de add hl,de add hl,hl add hl,hl
ld e,l ld d,h add hl,hl ;2 add hl,hl ;4 add hl,de ;5 ld e,l ld d,h add hl,hl ;10 add hl,hl ;20 add hl,de ;25 add hl,hl ;50 add hl,hl ;100
Quote from: cpcitor on 21:53, 13 December 21This is extremely impressive. 30 years ago there were already Mandelbrot demo, I think I saw one sporting 45 seconds.There is something wrong with the zoom. The set becomes distorted.I've seen this before in a Mandelbrot program I made on PC, when zooming too much compared to the precision.My guess is: this is possible so fast because computation is done with extremely limited precision.
Quote from: Prodatron on 22:43, 13 December 21Very very impressive!And thanks to ComSoft for the YT video!Btw I only had a quick look at the source code, but this......will save 10 NOPs for the *100/3 routine (but probably not making a remarkable effect).It's a very cool project, @litwr, I am thinking about porting it
Quote from: litwr on 21:02, 14 December 21I know one very fast Mandelbrot for the CPC - https://www.octoate.de/2012/09/13/mavdelbrot-a-fast-mandelbrot-set-calculation-by-mav/
Quote from: litwr on 21:10, 14 December 21And, indeed, a lot of thanks for your fantastic software for the CPC.
Quote from: cpcitor on 21:53, 13 December 21There is something wrong with the zoom. The set becomes distorted.
Quote from: litwr on 18:29, 22 December 21BTW the program uses the image y-symmetry, 14.5-bit arithmetic, and a lookup table for squares.
Quote from: MaV on 00:08, 26 December 21I am wondering how the data in the lookup table is organised. I was pondering the idea back in the day, but a 64k*2 byte table for all possible square values is simply not possible on a stock 6128.That is probably the one optimisation that will give you the highest speed boost. Even if not using a table, a separate square function can improve speed a bit (which I used back then).You could also implement a cardioid check to avoid calculating to maximum depth in most of the inner area.
Quote from: ralferoo on 10:40, 28 December 21The biggest speed up will come algorithmically... If you remember fractint on the PC, it was already very fast and then they added the line following mode, where it decides which pixels to calculate by following a line until the number of iterations changes, then does all the points in that area, and then tries to follow the edge of the region with the same iteration count. When it's made a completely enclosed loop, it can flood fill the area.
QuoteThere are some gotchas - it's possible to miss some fractal features if the box you trace completely contains it, which is most obviously true for a zoomed-out mandelbrot. Also, when you're zoomed in a lot, there will be areas where this entirely breaks down - in the interesting areas, the iterations per pixel will be changing a lot, and you'll need to give up edge tracing in these parts.
QuoteAs an aside, you might want to also look at doing Julia sets. These are also done using the equation z'=z*z+c, but instead of c being the initial coordinate, c is a constant across the entire set. You can actually think of the Mandelbrot set as a specialism of the Julia set that's useful for finding interesting areas, but if you find an interesting area of the Mandelbrot set, the Julia sets around there will also be very interesting and you can get some really pretty animations by calculating all the Julia sets with c going from one interesting point on the Mandelbrot to another.
Quote from: litwr on 20:04, 28 December 21Thanks but I didn't have an intention to make the fastest Mandelbrot. I have just ported a tiny good program. I didn't even change Mandelbrot parameters. IMHO I could have chosen other values for better pictures.
QuoteThe algo uses an 11.5 KB lookup table for squares. The author of the original program made also a variant for the ZX Spectrum, he published it only recently - https://github.com/smaslovski/foobar - this code is documented better than mine (in particular the table structure is described there) but it uses 14-bit arithmetic and this made it a bit faster. He also used completely different coding based on the SP use that doesn't make the code faster but disables interrupts.
Quote from: MaV on 20:28, 30 December 21Well, you are always on the lookout for programs to compare retro computers, so such a thing was bound to happen. I could look for the values of the MaVdelbrot pictures. But you'd need to draw 320x200 and in overscan (I can't recall now which dimensions I used for overscan).
Quote from: MaV on 20:28, 30 December 21Interesting. And I have never heard of a squaring algorithm before. Seeing how Maslovski uploaded this code two years ago, this must be a recent discovery, right?
Page created in 0.099 seconds with 46 queries.