Author Topic: Little fun - character in ring  (Read 709 times)

0 Members and 1 Guest are viewing this topic.

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    4%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Little fun - character in ring
« on: June 18, 2009, 10:42 PM »
Hi!

I typed simple funny thing in Basic 7 - character drawing into a ring, if you want, try...
file is attached
or paste to VICE:

10 color4,2:color0,2:color5,1:color1,1:graphic0,1
20 input"enter text maximum 50 chars";a$
25 graphic1,1
30 a=0:b=1
40 forc=0to2*PIstepPI/200
50 ifa=0thengosub200:rem getting data
60 ford=7to0step-1
65 fore=0to1
70 gosub300:ifx<>0thendraw1,127+(60+d*2+e)*sin(c)+sin(c),87+(60+d*2+e)*cos(c)+cos(c)
75 nexte
80 nextd
90 a=a+1
100 ifa=8thena=0:b=b+1:ifb>len(a$)thenchar1,13,24,"press any key!":getkeyq$:graphic0:end
110 nextc
200 rem ==== position of char ====
210 z=asc(mid$(a$,b,1))
220 ifz<64thenreturn
230 ifz>63andz<96thenz=z-64:return:elsereturn
300 rem ==== get a pixel ====
310 bank14:ad=53248
320 zn=ad+(z*8)
330 by=peek(zn+d)
340 x=byand(2^(7-a))
350 return

Miro
« Last Edit: June 18, 2009, 11:00 PM by MIRKOSOFT »
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    4%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Little fun again- character in ring in 80 columns mode
« Reply #1 on: June 23, 2009, 01:03 AM »
I had created in BASIC 8 the same program for 80 columns mode. Works also in VICE.
Who don't have Basic 8, I attached program and also Basic8.bin for VICE.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

mikeebean

  • Guest
Re: Little fun - character in ring
« Reply #2 on: March 07, 2010, 06:19 AM »
Very cool program! Just a note to others who might copy/paste into Vice:

Line 40: Change both instances of PI to π (pi symbol, Shift-Delete on my version of Vice.)

Line 340: Change the ^ to an up arrow (Delete key on my version of Vice.)

You will probably want to put Vice in Warp mode (Alt-W) to speed up the process.

Again, very well done!
Michael

 



Back to top