Page 1 of 1

Mandelbrot Core

Posted: Sat Mar 20, 2021 12:05 pm
by kobus
All,

Did a Mandelbrot core a couple of months ago as wanted to learn about FPGAs.

Have uploaded it to https://github.com/jacquesdriessen/MiSTer-mandelbrot.

Control with the keyboard (z/x is zoom in / out, and adws to navigate). Rest of it should be self explanatory.

In terms of technical implementation:
- Only a small amount of VHDL (simply to integrate things).
- Most of the logic is done using drawings [found it amazing that you can just "draw what you want"]
- There is one part distributing all the "points to be calculated" over the pipelines.
- Could cram 20 pipelines on the design (you can individually switch the off) that do the actual work.
- And the last part then takes the output of the pipelines and moves it to the frame buffer.

I hope you will enjoy it.

Jacques.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 2:18 pm
by LamerDeluxe
Awesome, another classic added to MiSTer and really fascinating to have it implemented in FPGA. Looking forward to trying it.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 3:23 pm
by aberu
This is very cool! Thanks!

Now someone do the matrix effect next! :P

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 4:15 pm
by hiddenbyleaves
There is a genesis homebrew called Matrix Digital Rain that I boot my MiSTer into instead of the menu core.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 4:17 pm
by hiddenbyleaves
Will this display on a crt?

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 4:39 pm
by kobus
Assume it will not display on a CRT. Using 1920x1080 HDMI Framebuffer.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 7:16 pm
by AntialiasedPixel
This is super cool! I keep meaning to do some projects with my DE-10. I got about as far as generating some color gradients on the screen a year ago and haven't had time to tinker with it since.

What limits zooming on fractals? Is it the iterations or a memory thing? I remember using Fractint for DOS on a 386 and being able to zoom in super far. It seems like it's somewhat limited here, but I haven't played around with the settings a ton yet.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 8:10 pm
by pgimeno
AntialiasedPixel wrote: Sat Mar 20, 2021 7:16 pm What limits zooming on fractals? Is it the iterations or a memory thing? I remember using Fractint for DOS on a 386 and being able to zoom in super far. It seems like it's somewhat limited here, but I haven't played around with the settings a ton yet.
The limit is precision. Fractint (which still lives) switches to arbitrary precision numbers at certain zoom levels, but doing the same in hardware is complicated.

Re: Mandelbrot Core

Posted: Sat Mar 20, 2021 9:45 pm
by pgimeno
Checked it now, it works great up to the precision!

Would it be possible to enable screenshots? When I tried to take one, it said "Scaler not compatible".

Also, would it be possible to add flipping of up/down and left/right? I get confused, especially with left/right.

Re: Mandelbrot Core

Posted: Sun Mar 21, 2021 12:33 am
by AntialiasedPixel
pgimeno wrote: Sat Mar 20, 2021 9:45 pm Also, would it be possible to add flipping of up/down and left/right? I get confused, especially with left/right.
I'll second this request, the controls were opposite what I was expecting.

Re: Mandelbrot Core

Posted: Sun Mar 21, 2021 6:30 pm
by Moondandy
That's very cool you did this, there is a Mandelbrot core on the NT Mini Noir. Can this be added into the Main repro in the Other section?

Re: Mandelbrot Core

Posted: Sun Mar 21, 2021 10:28 pm
by ericgus09
I am getting a really bad display with this core anyway to override the resolution settings, doesn't seem to play nice with my DELL LCD monitor (U2410 F Size: 24 in Resolution: 1920 x 1200).. screen is scrambled and jumping all over the place.. no stable picture .. F12 menu works but the graphics are a total fail.

Re: Mandelbrot Core

Posted: Sun Mar 21, 2021 10:43 pm
by bazza_12
ericgus09 wrote: Sun Mar 21, 2021 10:28 pmscreen is scrambled and jumping all over the place.. no stable picture .. F12 menu works but the graphics are a total fail.
same :(

Re: Mandelbrot Core

Posted: Sun Mar 21, 2021 11:25 pm
by Alkadian
I confirm this behaviour, same here.

Re: Mandelbrot Core

Posted: Sun May 16, 2021 8:34 pm
by kobus
pgimeno wrote: Sat Mar 20, 2021 9:45 pm Checked it now, it works great up to the precision!

Would it be possible to enable screenshots? When I tried to take one, it said "Scaler not compatible".

Also, would it be possible to add flipping of up/down and left/right? I get confused, especially with left/right.
- Thanks for answering the question on zoom levels.
- Flipping left/right etc. implemented.
- Inability to do screenshots / no VGA output / fixed 1920x1080 resolution unfortunately all have to do with a design choice to use the frame buffer logic included in MiSTer instead of adding a video processor the core. If I understand things correctly the pipeline normally is "core video processor" -> VGA output [also where the screenshot is extracted https://misterfpga.co.uk/take-a-screens ... ster-fpga/) -> scaler for filtering / custom resolutions -> HDMI output. The frame buffer logic needs a (fixed) x / y resolution which is using an alternate path into the scaler [saved having to build a video processor into the core e.g. easier / much less time, but it has it's restrictions. Would be a nice feature to add this but probably take more than the entire rest of the core and wouldn't have time for that in the foreseeable future.

Re: Mandelbrot Core

Posted: Sun May 16, 2021 9:24 pm
by kobus
ericgus09 wrote: Sun Mar 21, 2021 10:28 pm I am getting a really bad display with this core anyway to override the resolution settings, doesn't seem to play nice with my DELL LCD monitor (U2410 F Size: 24 in Resolution: 1920 x 1200).. screen is scrambled and jumping all over the place.. no stable picture .. F12 menu works but the graphics are a total fail.
So sorry to hear that - custom resolutions would be hard to implement (would need a way to pass them on thought the menu and have used all but one "bit" e.g. this wouldn't be sufficient). Only "sure" way I could think of in my other post which would to implement a video processor in HW and then pass the output through MiSTer and all it's magic to deal with all sorts of monitors but no plans / time to implement that.

Re: Mandelbrot Core

Posted: Sun May 16, 2021 11:05 pm
by Moondandy
Kobus, do you have any plans to add your core to Main? Am sure Sorg would be good with it going into the "Other" section. Be great to get some more exposure to this and people to get any updates automatically via the update script.

Re: Mandelbrot Core

Posted: Tue May 18, 2021 2:59 pm
by lazytechnician
bazza_12 wrote: Sun Mar 21, 2021 10:43 pm
ericgus09 wrote: Sun Mar 21, 2021 10:28 pmscreen is scrambled and jumping all over the place.. no stable picture .. F12 menu works but the graphics are a total fail.
same :(
Same for me too I'm afraid

Re: Mandelbrot Core

Posted: Thu Aug 05, 2021 11:46 am
by Moondandy
Tried it on my new monitor, just standard 1080p resolution, and it is jumping all over the place. Could any more information help you problem shoot this? Seems to be a problem for a lot of people.

Re: Mandelbrot Core

Posted: Sat Aug 19, 2023 4:33 pm
by Jae099

I am new to the MiSTer. To install this you just download and install it on the root of your sd card, right?


Re: Mandelbrot Core

Posted: Wed Aug 23, 2023 5:02 pm
by Moondandy
Jae099 wrote: Sat Aug 19, 2023 4:33 pm

I am new to the MiSTer. To install this you just download and install it on the root of your sd card, right?

Best place to put it would be in /media/fat/Other or make a new one /media/fat/Unstable

Keep in mind the core seems pretty broken, certainly over HDMI, but let us know how you get on.


Re: Mandelbrot Core

Posted: Wed Aug 23, 2023 6:33 pm
by Jae099

I'm using HDMI, so I'll let you know how it goes. Thanks for the info.


Re: Mandelbrot Core

Posted: Sat Aug 26, 2023 6:31 pm
by pgimeno
Moondandy wrote: Wed Aug 23, 2023 5:02 pm

Best place to put it would be in /media/fat/_Other or make a new one /media/fat/_Unstable

Keep in mind the core seems pretty broken, certainly over HDMI, but let us know how you get on.

Beware of Markdown! I have disabled Markdown in this post to quote you so that the underscores are actually shown instead of activating cursive.