..

Week of the 8/06/2020 - #24

Contents

Tech

  • ZX Art
  • RCLONE
  • Apple II - experiment 02 and 03

ZX Art

ZX Spectrum 128k

Although I never had a ZX Spectrum and find the color pallette pretty ugly I find that still people are able to create a lot of great art on it. I found out about ZXArt, which is a huge repository of everything ZX Spectrum. Hera are some of the images I found recently and I like. [ZXArt]. There is also a URL which has a simple interface for limited hardware devices https://zxart.ee/simple/

Incredible demo, winner for the zx demo compo @ Chaos Constructions 2019. [YouTube]. [Pouet]. You can watch it online [here]

The end demo screenshot 1 The end demo screenshot 2 The end demo screenshot 3

70908 demo FOReVER 2019

images

Rocket Raccoon - [zxart]

Rocket Raccoon

Rear Window - [zxart]

Rear Window

Scene Island - [zxart]

Scene Island

Debian - [zxart]

Debian

Habr0Con - [zxart]

Habr0Con

Back to The Future - [zxart]

Back to The Future

Crystal Kingdom Dizzy sprites - [zxart]

Crystal Kingdom Dizzy sprites

A lot more here - ZXArt top rated graphics

RCLONE

This week I discovered RCLONE. From their website: “Rclone is a command line program to manage files on cloud storage. It is a feature rich alternative to cloud vendors’ web storage interfaces. Over 40 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.”. After learning about RCLONE I received an email from Dropbox telling me my renewal is upcoming and I need to update my credit card information. I like Dropbox as a service but unfortunately I feel their pricing policy to be abusive. They provide you with only two possibilities (at least for my usage): free 2GB or U$S120/year for 2TB. That’s it. For the past year I’ve only used less than 20GB and there is no intermediate plan. To make things worse they pester me to upgrade to Business which is even more expensive. I’m through. I will use RCLONE to move everything to my current Google Drive which I’m already paying and have enough space. If at some point I need more space I’ll move part of it to Amazon S3 which suuuper cheap. Here’s a link to RCLONE:

Apple II - experiment 02 and 03

I kept experimenting with AppleSoft on the Apple II to create ‘generative art’. I find this images interesting. Later I will try to use them to create a demo but for the moment they are just static. Here are the two experiments I worked on this week.

Experiment 02 - Gradient

This one is basically a gradient but with random light-dark pattern. I created a version in Applesoft and also one in 6502.

exp 02 - basic

10 GR : HOME : COLOR = 13
15 N = 17
20 FOR X = 4 TO 33
30 X2 = N * N * N / 65536
40 FOR Y = 4 TO 38 STEP 2
50 P = RND(1)
60 IF X2>P THEN PLOT X,Y: PLOT X,Y+1
70 NEXT Y: N = N + 1: NEXT X
80 HTAB 6:VTAB 22:PRINT "g . r . a . d . i . e . n . t" 
100 GOTO 100

exp 02 - 6502 assembly

This is the 6502 version. I didn’t try to make it smaller but I’m sure I can reduce it considerably. Right now it weights in 130 bytes. The way this code works is basically PROB is a “probabilty distribution” that gives the probablity that the pixel will be painted yellow and the SEED is a random number. Right now the distribution grows as 2^n where n is the iteration. This is increased every 4 columns. A way to get something better would be to provide the probability distribution as data as a function of column. This would be much better for aesthetic reasons but might not good for size.

!cpu 6502

           *= $2000 ; ORG = $2000

; =====================================
; Zero Page
COLOR               = $30
SEED                = $80
PROB                = $81

; LOW RES ROUTINES
CLEARSCR            = $f836 
PLOT                = $f800 

MAIN
            sta $C050           ; Lowres gfx
            jsr $fc58
            jsr CLEARSCR
            sta $C053

            lda #$ff
            sta SEED

.start
            lda #$dd
            sta COLOR

            lda #8
            sta PROB

            ldx #4      ; y coord
            ldy #5      ; x coord

.plotloop

            ; calc next random number
            lda SEED
            beq .doEor
            asl
            beq .noEor    ;if the input was $80, skip the EOR
            bcc .noEor
.doEor
            eor #$1d
.noEor
            sta SEED
            cmp #230
            bcc +
            adc #25
+           cmp PROB
            bcs +
            
            txa
            jsr PLOT
            inx
            txa
            jsr PLOT
            dex

+           inx
            inx
            cpx #38
            bcc .plotloop
            ldx #4
            iny
            tya
            and #$3
            bne .cont

            lda PROB
            clc
            rol
            bcc +
            lda #$ff
+           sta PROB
.cont       cpy #33
            bcc .plotloop

            ldx #14
-           lda TEXT,x
.blit       sta $6d1 + 32
            dec .blit+1
            dec .blit+1
            dex
            bpl -

.delay4ever
            lda #$ff
            jsr $fca8
            jmp .delay4ever

            rts
; =============================================================================
TEXT       !byte $e7,$ae,$f2,$ae,$e1,$ae,$e4,$ae,$e9,$ae,$e5,$ae,$ee,$ae,$f4

Experiment 03 - Islamic pattern

This one is based on a pattern I found in Pinterest that belongs to the site Patterns in Islamic Art. This site has a lot of interesting looking patterns and I plan to try other things. For now I have an AppleSoft basic I might eventually convert into 6502 assembly.

exp 03 - AppleSoft

1 REM --------------------------------------------------------------
2 REM : https://patterninislamicart.com/drawings-diagrams-analyses/6
1 REM --------------------------------------------------------------
10 GR : HOME : COLOR= 15
20 C0 = 13: X0 = 4:Y0 = 0
30 DATA  0,4,4,8,6,0,10,4,14,8,16,0,20,4,24,8,26,0
40 FOR I = 1 TO 9
50 READ X: READ Y: X = X + X0: Y = Y + Y0: GOSUB 1000
60 Y = Y + 20: GOSUB 1000
70 Y = Y - 8:X = X + 2: GOSUB 1000
80 NEXT I
110 DATA 1,10,5,14,7,6,11,10,15,14,17,6,21,10,25,14,27,6
120 FOR I = 1 TO 9
130 READ X: READ Y: X = X + X0: Y = Y + Y0: GOSUB 1050
140 Y = Y + 20: GOSUB 1050
150 Y = Y - 8:X = X + 2: GOSUB 1050
160 NEXT I
200 DATA 3,2,13,2,23,2
220 FOR I = 1 TO 3
230 READ X: READ Y: X = X + X0: Y = Y + Y0: GOSUB 1050
260 NEXT I
300 DATA 8,32,18,32
320 FOR I = 1 TO 2
330 READ X: READ Y: X = X + X0: Y = Y + Y0: GOSUB 1000
360 NEXT I
400 X = 12 + X0: Y = 16 + Y0: COLOR = C0: GOSUB 1000
900 HTAB 3:VTAB 22:PRINT "i . s . l . a . m . i . c   a . r . t" 
999  GOTO 999
1000  PLOT X +1,Y: PLOT X +1,Y +1
1010  HLIN X,X +2 AT Y +2: HLIN X,X +2 AT Y +3
1020  PLOT X +2,Y +4: PLOT X +2,Y +5
1030  RETURN
1050  PLOT X,Y: PLOT X,Y + 1
1060  HLIN X,X + 2 AT Y + 2: HLIN X,X + 2 AT Y +3
1070  PLOT X + 1,Y + 4: PLOT X + 1,Y + 5
1080  RETURN 

Here’s another one:

exp 04 - AppleSoft

1 REM --------------------------------------------------------------
2 REM : https://patterninislamicart.com/drawings-diagrams-analyses/6
1 REM --------------------------------------------------------------
10 GR : HOME : COLOR= 15
20 C0 = 5: X0 = 2:Y0 = 0
40 FOR I = 0 TO 8
50 FOR J = 0 TO 4
60 X = X0 + I * 4: Y = Y0 + J * 8: GOSUB 1000
70 NEXT J
80 NEXT I
100 COLOR=C0: I = 4: J = 2
110 X = X0 + I * 4: Y = Y0 + J * 8: GOSUB 1000
900 HTAB 3:VTAB 22:PRINT "i . s . l . a . m . i . c   a . r . t" 
999  GOTO 999
1000  PLOT X + 1,Y: PLOT X + 1,Y + 1
1010  HLIN X + 1,X + 3 AT Y + 2: HLIN X + 1,X + 3 AT Y + 3
1020  HLIN X,X + 2 AT Y + 4: HLIN X,X + 2 AT Y + 5
1030  PLOT X + 2,Y + 6: PLOT X + 2,Y + 7
1040  RETURN

Last one for now:

exp 05 - AppleSoft

1 REM --------------------------------------------------------------
2 REM : https://patterninislamicart.com/drawings-diagrams-analyses/6
1 REM --------------------------------------------------------------
10 GR : HOME : COLOR= 15
20 C0 = 5: X0 = 2:Y0 = 0
40 FOR I = -2 TO 5
50 FOR J = 0 TO 7
60 X = X0 + I * 7 + J * 3: Y = Y0 - I * 2 + J * 6
70 IF X >= 0 AND Y >= 0 AND X < 33 THEN GOSUB 1000
80 IF X >= 0 AND Y = -2 AND X < 33 THEN GOSUB 1010
90 IF X >= 0 AND Y = -4 AND X < 33 THEN GOSUB 1020
150 NEXT J: NEXT I
200 COLOR=C0: I = 1: J = 3
210 X = X0 + I * 7 + J * 3: Y = Y0 - I * 2 + J * 6: GOSUB 1000
900 HTAB 3:VTAB 22:PRINT "i . s . l . a . m . i . c   a . r . t"
999  GOTO 999
1000  IF Y < 38 THEN HLIN X,X+1 AT Y: HLIN X,X+1 AT Y+1: PLOT X+5, Y: PLOT X+5, Y+1
1010  IF Y < 36 THEN PLOT X,Y+2: PLOT X,Y+3: HLIN X+2,X+4 AT Y+2: HLIN X+2,X+4 AT Y+3
1020  IF Y < 34 THEN HLIN X,X+2 AT Y+4: HLIN X,X+2 AT Y+5: PLOT X+4, Y+4: PLOT X+4,Y+5: PLOT X+6,Y+4: PLOT X+6,Y+5
1030  RETURN