Mandelbrot Assembly Demo

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
gavinhaslehurst
Posts: 47
Joined: Thu Jan 07, 2021 11:37 am

Mandelbrot Assembly Demo

Post by gavinhaslehurst »


Here is the Mandelbrot version of my Julia Set program, coded in assembly. Again, many thanks to the forum users here for their guidance, as well as the many YouTubers with their excellent tutorials on 6502 assembly language. It's a lot faster than the BASIC version, but nevertheless, benefits from being run in warp mode.




Now in colour, with thanks to: VERA Overview (8bitcoding.com)




NEW VERSION NOW WITH MOUSE CONTROLS! 




When the image has finished rendering, click the left mouse on the area of the screen you wish to zoom in to. 




To change the detail settings (cycle between Low, Med, High) click the right mouse button.  




Poke around in the old version...




Try copying and pasting the following groups of POKEs to explore further (not all at once, just each paragraph in turn!):




POKE $D6B,$19:POKE $D6A,$64:REM FX=6500

POKE $D6D,$13:POKE $D6C,$54:REM FY=4948

POKE $D6E,$00:POKE $D6F,$FF:REM FX=POS,FY=NEG

POKE $D7B,$00:POKE $D7A,$01:REM STEP=1

POKE $D7C,$FF:REM ITERATIONS=255

SYS2061




POKE $D6B,$0F:POKE $D6A,$A0:REM FX=4000

POKE $D6D,$00:POKE $D6C,$00:REM FY=0

POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG

POKE $D7B,$01:POKE $D7A,$F4:REM STEP=500

POKE $D7C,$FF:REM ITERATIONS=255

SYS2061




POKE $D6B,$0F:POKE $D6A,$878:REM FX=3960

POKE $D6D,$03:POKE $D6C,$E8:REM FY=1000

POKE $D6E,$FF:POKE $D6F,$FF:REM FX=NEG,FY=NEG

POKE $D7B,$00:POKE $D7A,$32:REM STEP=50

POKE $D7C,$FF:REM ITERATIONS=255

SYS2061




To use the POKES above in the web emulator, first click the X in the top right corner of the web emulator. Paste the POKES above that you want to use in to the text field to the left, replacing what's already in there, then click the Run button. 




Individual addresses that can be poked:




$D6A    30 75        .word 30000     ; FX

$D6C    A8 61        .word 25000     ; FY

$D6E    FF           .byte $ff  ; FX SIGN ff = negative

$D6F    FF           .byte $ff  ; FY SIGN ff = negative

$D7A    A8 61        .word 25000 ; STEP (lower=higher zoom)

$D7C    10           .byte $10 ; ITERATIONS 




Old poke codes for the colour PETSCII version:




step: POKE $0D3D e.g. 50 for a step of 0.05

(smaller number, higher zoom)

iterations: POKE $0D3F e.g. 30 iterations about right, higher = slower

start x: POKE $0D2F, normally 8 (for -0.8) - nicely centred at low zoom

start y: POKE $0D31, normally 12 (for -1.2) - again centred at low zoom




Old poke codes for the PETSCII version: 




step: POKE $0cff e.g. 50 for a step of 0.05

(smaller number, higher zoom)

iterations: POKE $0d01 e.g. 30 iterations about right, higher = slower

start x: POKE $0cf1, normally 8 (for -0.8) - nicely centred at low zoom

start y: POKE $0cf3, normally 12 (for -1.2) - again centred at low zoom




You Tube video of this in action:




Commander X16 - 6502 assembly demo - Mandelbrot set - YouTube




Commander X16 - Fractal Zoom Demo - 6502 Assembly - YouTube




 




widemand.jpg



Now with mouse controls! 


Attachments
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
reallynicefrac2.png (22.01 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
reallynicefrac.png (32.73 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
colfrac3.png (19.96 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
mand2.png (7.15 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
mand .png (9.11 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
colfrac2.png (18.07 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
col2.png (10.61 KiB) Viewed 485 times
Mandelbrot Assembly Demo
Mandelbrot Assembly Demo
bwfrac.png (11.8 KiB) Viewed 485 times
MANMOUSE.PRG
Mandelbrot Assembly Demo
(2.08 KiB) Downloaded 103 times
manmouse.asm
Mandelbrot Assembly Demo
(22.63 KiB) Downloaded 105 times
MANHR.PRG
Mandelbrot Assembly Demo
(1.46 KiB) Downloaded 102 times
manhr.asm
Mandelbrot Assembly Demo
(16.89 KiB) Downloaded 106 times
MANCOL.PRG
Mandelbrot Assembly Demo
(1.4 KiB) Downloaded 108 times
mancol.asm
Mandelbrot Assembly Demo
(15.95 KiB) Downloaded 121 times
MAN.PRG
Mandelbrot Assembly Demo
(1.33 KiB) Downloaded 120 times
man.asm
Mandelbrot Assembly Demo
(15.46 KiB) Downloaded 119 times
Post Reply