Phil_G
Experienced Member
I realise its just a throwaway basic52 demo but the Mandelbrot example on Dennou Densetsu's page had me baffled.
When I first built the board it worked perfectly and I posted a photo of my screen. Today it wouldnt display correctly at all.
I'd built another Densetsu so I tried that - same problem. Maybe its Teraterm, tried the Arduino terminal window, same problem.
Tried the program on one of my Grant Searle Z80's and it was the same so I knew the program was wrong!
Turns out that its Googles fault!
Dennou's page (vintagechips) initially displays in Japanese Kanji, if you copy & paste the mandelbrot program from there it works fine.
If you click " translate to English" then copy & paste the mandelbrot program, it misses out a minus sign in line 80
Literally lost in translation!!!
However, thats wasted an entire evening so i havent done my code memory mod yet. Maybe tomorrow!
Cheers
Phil
10 FOR Y=-12 TO 12
20 FOR X=-39 TO 39
30 CA=X*0.0458
40 CB=Y*0.08333
50 A=CA
60 B=CB
70 I=0
80 T=A*A-B*B+CA
90 B=2*A*B+CB
100 A=T
110 IF (A*A+B*B)>4 THEN GOTO 150
120 I=I+1:IF I<=15 THEN GOTO 80
130 PRINT " ",
140 GOTO 170
150 IF I>9 THEN I=I+7
160 PRINT CHR(48+I),
170 NEXT X
180 PRINT
190 NEXT Y
When I first built the board it worked perfectly and I posted a photo of my screen. Today it wouldnt display correctly at all.
I'd built another Densetsu so I tried that - same problem. Maybe its Teraterm, tried the Arduino terminal window, same problem.
Tried the program on one of my Grant Searle Z80's and it was the same so I knew the program was wrong!
Turns out that its Googles fault!
Dennou's page (vintagechips) initially displays in Japanese Kanji, if you copy & paste the mandelbrot program from there it works fine.
If you click " translate to English" then copy & paste the mandelbrot program, it misses out a minus sign in line 80
Literally lost in translation!!!
However, thats wasted an entire evening so i havent done my code memory mod yet. Maybe tomorrow!
Cheers
Phil
10 FOR Y=-12 TO 12
20 FOR X=-39 TO 39
30 CA=X*0.0458
40 CB=Y*0.08333
50 A=CA
60 B=CB
70 I=0
80 T=A*A-B*B+CA
90 B=2*A*B+CB
100 A=T
110 IF (A*A+B*B)>4 THEN GOTO 150
120 I=I+1:IF I<=15 THEN GOTO 80
130 PRINT " ",
140 GOTO 170
150 IF I>9 THEN I=I+7
160 PRINT CHR(48+I),
170 NEXT X
180 PRINT
190 NEXT Y


