home *** CD-ROM | disk | FTP | other *** search
/ TCE Demo 2 / TCE_DEMO_CD2.iso / demo_cd_.2 / mags / dba / dba_05b.arj / dba_05b.msa / OMIKRON / OKIKRON0.TXT < prev    next >
Text File  |  1989-04-06  |  17KB  |  347 lines

  1. OMIKRON LESSON
  2.  
  3. OMIKRON LESSON BY MR.Ni!
  4.  
  5. Programming in Basic and in Omikron Basic in particular.
  6.  
  7. Why program in Basic?
  8.  
  9. Sometimes I'm asked why I program in Basic and not in Pascal, Mudula (Yes, I 
  10. DID write MUDULA, ask University Twente why.) C or Assembly. Well, I program in 
  11. all mentioned languages, but I like Basic best, and then comes C and assembly. 
  12. I use Pascal and Mudula only when I'm forced to because a silly professor 
  13. thinks those are good languages to teach students programming. (Maybe they are, 
  14. but they are NOT good programming languages!)
  15.  
  16. I still have to answer why I like Basic best. About ten years ago I learned 
  17. programming on a Sinclair ZX81 in (you guessed it!) Basic. After a year 
  18. programming on the ZX81 I switched to a Sinclair ZX Spectrum. On the ZX 
  19. Spectrum I made some very huge Basic programs (the Spectrum had together with 
  20. the Basic extension 'BETA Basic' a real powerful Basic and I programmed some 
  21. administration programs with it).
  22.  
  23. After the ZX Spectrum came an Atari ST. The computer came with a real lousy 
  24. Basic so I stopped with Basic programming and played games. In the mean time I 
  25. learned Pascal at the University but I thought it was a lousy programming 
  26. language. Also when I got a copy of Gfa Basic, I tried to write some programs 
  27. with it, but I didn't like it, so I played more games.
  28.  
  29. Then came Omikron Basic. For only 25 Dutch Guilders you could purchase a copy 
  30. including a manual (what a luxury!). I really liked Omikron Basic very much (we 
  31. are still in love with each other, you know?). It was more similar to Spectrum 
  32. Basic than Gfa ever was. Again I programmed some administration programs (to be 
  33. honest with you, I programmed just one big program that could do all the things 
  34. that the several Spectrum programs did and many more). I really liked Omikron 
  35. Basic so I bought the compiler and I was really satisfied with the speed of my 
  36. programs (Jeez, can you imagine?!). After that I learned assembly and many 
  37. things about the hardware of the Atari ST. Then I wrote a bouncing proportional 
  38. scroller for the high resolution of the ST in assembly. But my 
  39. scroll-techniques weren't good enough to write a decent demo with it. At that 
  40. time I saw a Basic demo by the Double Dutch Crew (DDC) and I thought: 'That's 
  41. not bad at all for Basic, maybe I also can do things like that.'. So I tried to 
  42. write a scroller in Omikron Basic. It was a real disaster: I could scroll a 
  43. text, just ten lines high, in one bitplane and needed about 700kB of memory.
  44.  
  45. A few months later I learned about the Memory_Move command in Omikron Basic. 
  46. That made things a lot easier and next I was writing a scroller, 64 lines high 
  47. this time, fitted in less than 2kB sourcecode, which I intended as a 
  48. contribution to a contest (no, I didn't win, a Whaaaaaamiga did... Still I did 
  49. include the source with this article).
  50. Some days later I wrote a 80 lines high sized scroller for high rez. On the 
  51. first fair in Eindhoven I met the DDC and they gave me a copy of their last 
  52. demo, 'the Tea Party demo', a very nice Omikron Basic demo. I showed them my 
  53. programs and they were surprised that there was someone else programming demos 
  54. in Omikron Basic and they asked me if I could make a monochrome guest screen 
  55. for their next demo. They also told me that there was a demo, called the 
  56. Ultimate Gfa Demo, that removed the lower border in Basic and they thought it 
  57. couldn't be done in Omikron Basic. (They were so wrong, yes, they were!)
  58.  
  59. After the fair I sat down behind my computer and thought: if they can remove 
  60. the border in Gfa Basic it's also possible in Omikron Basic. So with some help 
  61. of Insh_Allah (who removed the border in assembly some years ago) I tried to 
  62. remove the lower border. Guess what; after two evenings trying on and on the 
  63. lower border was gone. And in the night of the third evening the upper border 
  64. was gone too. Than I designed the Mowzes Creeble screen with some moving 
  65. rasters and featuring low and medium resolution on the same scanline (Title and 
  66. the colors of the beam by Insh_Allah, all else done by me). After this screen 
  67. (which is still not ready) I decided to make a good screen with many scrollers 
  68. and rasters, hence I started developing the QED screen.
  69.  
  70. During the coding of that screen I decided that I needed some music. I didn't 
  71. know how to play chip music so it had to be digisound music. Insh_Allah (again) 
  72. had some digisound tables and knew how to use them. (He had patched a MOD 
  73. replay program to make it work on all three resolutions and play more modules 
  74. (replay 1.2.10). Now there's one more year doing little gone, but still I 
  75. (Insh_Allah) recently finished a totally redesigned replay-program that works 
  76. on every ST, STe, MEGA Ste and TT and on every resolution (GEM-based). This 
  77. tool can cope with every MOD and lots of types of chip music. It works as 
  78. accesoire or program, it understands the commandline (xArg and ARGV 
  79. commandline-passing protocol support), has a jukebox mode, can spool/play 
  80. through MODs in fast forward and REVERSE! mode and above all it is crash 
  81. resistant. It's called Insh_Allah's Replay++, version 3.10.01B...
  82.  
  83. Insh_Allah is backing away from the keyboard fetching some sleep; he deserves 
  84. it! Now I (Mr Ni!) can finally continue my story... Where were we? Ah yeah, I 
  85. remember: we were talking about digisound and my beloved Omikron Basic.) The 
  86. first tests turned out to be really ugly; the timing of the digisound wasn't 
  87. good and there were some problems with the calculations of the offsets in the 
  88. digi-table. When Chainsaw heared this crappy shit-noise, he said (honestly!): 
  89. "Well, not bad at all for Basic!!!"
  90. If you were stunned by this opinion you should consider the fact that Chainsaw 
  91. loves trash-metal, so we can be confident about it this aint no objective view 
  92. of it all...
  93. Anyway, Chainsaw kept on nagging so he made me so mad I sat down a next time to 
  94. fix those bugs. At the end of the day I had perfect digisound in Omikron Basic 
  95. without using any interrupt routine!
  96. The next thing to do were some bouncing color-bars, but they had to be special. 
  97. So I designed a 'pipe' in Degas Elite and tested a lot of color-combinations. 
  98. Then I thought of enhancing the 'rotation'-effect by inserting some lines that 
  99. should rotate around the color-bars. No big deal, but the color-selection was a 
  100. pain-staking operation that took a lot of time. In the end I made a small 
  101. utility just for the purose of calculating the colors of the last few bars, 
  102. because I was totally out of inspiration.
  103. Furthermore I made a tool that should do all the font-conversion for me. I took 
  104. a nice monochrome font and converted it to a color-font (one color per pixel!) 
  105. by using Newtons law on calculating the color-shades. It was a hell of a job 
  106. but I wouldn't likely have done the job with some paint-program: I'm a coder, 
  107. NOT a painter!
  108. Then came summer and the holidays with it, so Lord Q got his parents leaving 
  109. the house to him for a couple of weeks: we moved in. (Indeed, papa anda mama 
  110. were really desperate when they came back: we had the whole place torn apart, 
  111. but who cares anyway?! Lord Q himself had to clean the whole mess, marvellous! 
  112. During that time the bouncing color-bars were tuned to their final state while 
  113. I introduced the special effects to the scroller.
  114. Now the thing was starting looking neat.
  115. After a little coding-related depression and an in-depth discussion with my 
  116. personal shrink I decided to finish 'em off: at a members-only party at MBH 
  117. (Moir Brandts Honk BBS in The Hague, Ed.) the scrolltexts were written by 
  118. Insh_Allah (me staring at his back trying to mentally force him to move on with 
  119. it: he was much more busy gasping around than typing, although he had promised 
  120. to write the whole scrolltext ("I can do it, no problem, I can do it, just 
  121. easy!").
  122. Then the QED Demo got released at MBH the same day. (End of summer 1991)
  123.  
  124. After I had finished the QED demo I decided it would be nice to make a MEGA 
  125. demo in Omikron Basic. So here I am, just four demos are finished but the most 
  126. terrible piece: the main-menu has been finished too.
  127. In coding the main-menu I forced myself towards the painting program in order 
  128. to draw the necessary sprites. (Aint it beautiful if you can afford yourself a 
  129. 'grafix-man', eh? Well, I'm not that 'rich'; the only one around able to achive 
  130. little (grin) is Insh_Allah: capabality: TERRIBLE PAINTER, even worse than me, 
  131. but he can really build-up someone. If you meet 'em, no trouble to recognize 
  132. 'em, he's the guy who always has some utterly 'nice' remark about someone when 
  133. a mistake is made: 5 minutes Insh_Allah around when you are coding and you're 
  134. eating wall-paper to get yourself cooling down!)
  135. That main-menu took most of the time and lots of spirit (of the mental kind, 
  136. yeah? (I understand, you've never heard about spirit, meaning 2, but it does 
  137. exist, really! There's not only boose on this world! (Ed. I_A))), the other 
  138. demo-screens took a lot less time but it's very troublesome to think about new 
  139. effects, new 'looks' and so on if you're on your own.
  140. Thus I asume the planned release-date end Mai 1992 will not be met at all due 
  141. to the fact that I'm a little out of inspiration this time, so sorry.
  142.  
  143. So that is the story about my Basic programming until now and I hope that you 
  144. understand now why I still like Basic most.
  145.  
  146. In general there are many reasons to program in Basic. I will mention some:
  147. - Easy to learn; you can learn to program Basic just by trying out some 
  148. statements and discover the working of them. In special the direct modus of 
  149. Basic is very suitable for that purpose. You can immidiately see the results of 
  150. the used command. You don't have to bother about the troubles you can get when 
  151. compiling and linking programs, because (nearly) all the stuff runs in the 
  152. interpreter very well.
  153. - Many powerful commands; in Basic there are standard commands for almost 
  154. anything you want to do. There are sophisticated commands for input and output, 
  155. commands for drawing lines and circles, filled or unfilled shapes, but there 
  156. are also low level commands like PEEK and POKE (very, very nice).
  157. - Good debugging facilities; if a program doesn't work properly you can check 
  158. out all the values of the variables in interpreter mode at any time. It's also 
  159. possible to monitor a critical process closely by adding some PRINT and INPUT 
  160. commands.
  161. - High-speed development/programming; if you want to write a program in a very 
  162. short time, i.e. table calculation or text conversion from ASCII to some 
  163. sophisticated format for you demo, Basic will be the best solution, because of 
  164. the above-mentioned advances.
  165. - To show the world it's possible in Basic; there are some weird fellas who 
  166. want to show the world what's possible in Basic. They want to show that it IS 
  167. possible to write decent demos in Basic without using any assembly subroutines. 
  168. (The real nacko-nackoos think that you shouldn't even use assembly routines for 
  169. playing digisound or chipsound. (See Mr Ni! (the Great).) (If you ask my 
  170. opinion (I_A) I must add Mr Ni! probably is the only nacko-nackoo around, 
  171. because he's using his own chip-sound routines (written in Basic). All the 
  172. other folks are using XBIOS 32 (How low can you go?! VERY low!) or are just 
  173. calling the assembly-shit in MUS-files (OVR, DDC, etc.) (very bad habit!) 
  174. (Ed.)))
  175.  
  176. Also, now you know why you should program in Basic. If you think it's all 
  177. bullshit what I just told you then stop reading and go playing games or if you 
  178. don't like games (in that case you are very probably a Feb Aludum (this is NOT 
  179. possitive at all...)) go and suck your mamma's dick.
  180.  
  181. Still with us?
  182.  
  183. Good! In that case you should know that we included a very small source to show 
  184. you how small things can be in Basic. (And how ugly it all looks!)
  185. To be more precise: it's the source of one of the 2 K sourcecode entries for 
  186. the contest I was talking about a while ago. It just goes like this:
  187.  
  188.  
  189. ########################## DEMO.BAS #############################
  190.  
  191.  CLEAR 400000,10240
  192.  POKE $FF820A,2
  193.  IPL 7
  194.  A= MEMORY(339455)
  195.  A=A+255
  196.  A=A AND $FFFF00
  197.  B=A
  198.  A=A+32000
  199.  PRINT "f"
  200.  CLS
  201.  PALETTE 7,$660,$700,$701,$702,$703,$704,$705,$706,$707,$710,
  202.          $720,$730,$740,$750,0
  203.  XBIOS (,5,L B,L -1,0)
  204.  TEXT COLOR =2
  205.  TEXT HEIGHT =4
  206.  TEXT STYLE =O
  207.  FOR D=1 TO 25
  208.   FOR C=0 TO 19
  209.     TEXT C*16+4,D*8-2,""
  210.   NEXT C
  211.  NEXT D
  212.  MODE =2
  213.  TEXT HEIGHT =31
  214.  FOR D=1 TO 6
  215.   FOR C=0 TO 19
  216.     TEXT STYLE =1
  217.     TEXT COLOR =1
  218.     TEXT C*16,D*32-5, CHR$(C+20*D+12)
  219.     TEXT STYLE =0
  220.     TEXT COLOR = RND(13)+3
  221.     TEXT C*16,D*32-5, CHR$(C+20*D+12)
  222.   NEXT C
  223.  NEXT D
  224.  DIM E(16)
  225.  DIM F(16)
  226.  FOR C=0 TO 16
  227.   F(C)=A+C*19200
  228.   E(C)=F(C)+13758
  229.  NEXT C
  230.  A=F(15)+32000
  231.  G=A+10240
  232.  SWAP F(16),F(0)
  233.  XBIOS (,5,L A,L -1,-1)
  234.  TEXT COLOR =2
  235.  TEXT HEIGHT =6
  236.  TEXT 0,6,"TOS"
  237.  BITBLT 0,0,24,8 TO G
  238.  PRINT @(0,0);" ";
  239.  H$="Hi everybody. This is a little fucky scroll-message, I don't want"
  240.  H$=H$+" to type any more. CU, Mr Ni! says Bye. Now here's the font: "
  241.  FOR C=32 TO 152
  242.   H$=H$+ CHR$(C)
  243.  NEXT C
  244.  DIM I( LEN(H$)+1)
  245.  FOR C=1 TO LEN(H$)
  246.   I(C)= ASC( MID$(H$,C,1))-32
  247.  NEXT C
  248.  FOR C=1 TO LEN(H$)
  249.   D=I(C)
  250.   Z=D\20
  251.   D=(D MOD 20)*8+Z*5120
  252.   I(C)=D+B
  253.  NEXT C
  254.  J%=148
  255.  K%=72
  256.  L!=0
  257.  M!=0
  258.  REPEAT
  259.   L%= LEN(H$)-1
  260.   FOR X%=1 TO L%
  261.     FOR O%=0 TO 4800 STEP 160
  262.       MEMORY_MOVE I(X%)+O%+160,8 TO A+8+O%
  263.     NEXT O%
  264.     FOR P%=0 TO 15
  265.       WVBL
  266.       XBIOS (,5,L A,L F(P%+1),-1)
  267.       MEMORY_MOVE E(P%)+8,4800 TO E(P%)
  268.       FOR O%=160 TO 4800 STEP 160
  269.         MEMORY_MOVE A+O%,8 TO E(P%)-6+O%
  270.       NEXT O%
  271.       BITBLT 1,1,31,32 TO 0,1,31,32
  272.       XBIOS (,5,L F(P%),L -1,-1)
  273.       L!=L!+.01
  274.       M!=M!+.02212323
  275.       BITBLT G TO 148+148* SIN(L!),36+36* COS(M!),24,8
  276.       IF P%=1 THEN
  277.         XBIOS (,5,L F(16),L -1,-1)
  278.         BITBLT G TO 148+148* SIN(L!-.01),36+36* COS(M!-.02),24,8
  279.       ENDIF
  280.     NEXT P%
  281.   NEXT X%
  282.  UNTIL 0
  283.  END
  284.  
  285. ######################### END DEMO.BAS ##########################
  286.  
  287. I suppose the code is self-explaining. If not we'll call it reader-feedback if 
  288. you ever get the courage to write back to me.
  289.  
  290. Whaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa $%&£$&$% 
  291. f*cking shit! ***verdommese klotuhbak, gloeiendegloeiende"£$%&^£$£%!!!
  292. (This is a softened version of the text just so fanatically exclaimed by Mr Ni! 
  293. sitting by the keyboard getting a 19"-rack computer (lots of steel and 
  294. alumimium, litlle computer) on his foot. It seems to hurt... I think... (I_A))
  295.  
  296. Insh_Allah will be taking over here: what's Mr Ni! chatting about next time? 
  297. (If he's recovered from foot-ache and other major brain-problems (you'll 
  298. understand...))
  299. He'll discuss scrollers in-depth (wow, we love this!). It should be interesting 
  300. for the starting assembly-freak too, because the scrolling-principles are 
  301. appicable to every language, not just Basic. (Excluded from the category 
  302. 'programming language' are MUDULA and PASCAL)
  303. Anyway, cocksucker numero uno is leaving you, hope you enjoyed reading this 
  304. shit.
  305.  
  306. Credits:
  307.  
  308. This text originated from Mr Ni! but after he said he lost his feeling 
  309. (ayayayaya!) and he couldn't reach his brains no more (thoughts seem to have 
  310. huge problems jumping over/travelling through a 19" rack), the whole text was 
  311. edited by Insh_Allah (that's me, the Ed. & I_A dirtbag!).
  312.  
  313. If you ever would consider taking a pen and paper to write (analphabetics can 
  314. be cured, order our special discount prices on Special Cures You Will Like (you 
  315. don't want to hear bout this!)) write to:
  316.  
  317.   Mr Ni!
  318.   Rohofstraat 116
  319.   7604 AK   Almelo
  320.   The Netherlands
  321. (You know? The tulips, the windmills and the hasheesh?! Yes!)
  322.  
  323. Comments, requests about Replay++ (yeah, advertisement time, folks!) and so on 
  324. are gladly and quickly (???????????) answered by us (Oh no, Mr Ni! I cannot 
  325. write and read very well, so you answer those letters; besides, they were all 
  326. addressed to you (grin) so off you go, pal! Happy answering, yeah! Oh, and 
  327. please do include a copy of my Replay++ otherwise we will never get that piece 
  328. of shit outdoors. ... You wish I did what?!... Well, fucking myself was 
  329. allready done by me before (no fun, strange... probably not the right 
  330. pheripheral, maybe next time plugging in a DB9 connector???) so you'll have to 
  331. think about something else...).
  332.  
  333. Hope you write us soon, until the next article, stand up for your programming 
  334. rights: do it in Omikron!
  335.  
  336.                                     WAS signed by:
  337.  
  338.                                     Mr Ni! (the poor guy ;-) )
  339.                                       &
  340.                                     Insh_Allah (the DB9-thing)
  341.                                       of 
  342.                                     the TOS-Crew
  343.                                    ("Fidulus Bittus et Fuckus Clockcyclus")
  344.  
  345.  
  346.  
  347.