wormy 0.96.C24
authorMischa Poslawsky <wormy@shiar.org>
Mon, 24 Dec 2001 11:02:06 +0000 (12:02 +0100)
committerMischa Poslawsky <wormy@shiar.org>
Mon, 2 Mar 2009 21:31:53 +0000 (22:31 +0100)
wormy.txt
wormy.z80

index 6ed31945b38ba21ae8f9e0f8c7d939ec117be7e4..1d5c319d3c373a4932aa1b391f48d30f2a7ac0fe 100644 (file)
--- a/wormy.txt
+++ b/wormy.txt
@@ -1,27 +1,37 @@
-  _      _  ___  ____  __  __ _   _ __________________________________________
- | \    / |/ _ \|  _ \|  \/  | | / |------------------------------------------
- |  \/\/  | | \ | |_) | \  / |\ ~ / ------------------------------------------
-  \      /| \_| |  _ <| |\/| | | | -------------------------------------------
-   \_/\_/  \___/|_| \_\_|  |_| |_|____________________________________________
-
-Version:                 0.95.905 (released summer 2001)
+   ����                                                        ����
+  ����                                                         �����
+ ���                                                            ����     ����
+���      �����          ��������       �����     ����  ����      ���     �����
+���     �������       �����������     �������   �������������     ��    ��� ���
+��     ���   ���     �����    ����   ����  ��� ���  ����  ���     ���  ���� ���
+��     ��     ��     ��  �      ��� ����      ���  ������  ���    ���  ���   ��
+��     ��     ��     �� ��      ��� ���       ��� ���� ��� ���    ��� ����   ��
+��     ���   ���     �� ��       �� ���       �������   ��� ��     �������   ��
+��     ���   ���    ��� ��       �� ��        �� ���    ��� ���     �����   ���
+���     ��� ���     ��� ��       �� ���       �� ����  ���� ���             ���
+���      �����     ���  ���     ��� ���       ��  ��������  ���            ���
+ ���      ���      ���  ���     ��� ���       ���  ������   ���            ���
+  ����  �������  ����    ���   ���  ����      ���            �����       ����
+   �������� ��������     ���������   ���      ���             ���������������
+    �����     �����       �������     ��       ���              �����������
+
+Version:                 0.96.C24 (released end 2001)
  Author:                  SHIAR (wormy@shiar.org - www.shiar.org)
   File(s):                 wormy.86p (main program, 6kB)
-                            wormy.86s (levels, 1kB)
+                            wormy001.86s (levels, 1kB)
                              wormy.txt (readme); wormedit.exe (level editor)
      Description:             Free-movement Nibbles game, 1-4 players.
-      Where to get this game:  shiar.org (home of Wormy) or ticalc.org
+      Where to get this game:  shiar.org, the official home of Wormy
        Additional Credits to:   Matthew Shepcar and Jonah Cohen
 
           -= [THE BEGINNING] =-
 
             First you'll want to upload wormy.86p to your calculator (or emu),
-              and probably a levelfile like wormy001.86s. Then you simply run
-               Wormy by typing Asm(wormy or using a shell (except for AShell.)
-                 Then you just choose your levelfile; internal levels are
-                    located within Wormy itself and thus always present.
-                      You'll get in the main menu. Here you can alter game
-                       settings with the arrow keys (game mode, level,
+              together with a levelfile like wormy001.86s. Then you simply run
+                Wormy by typing Asm(wormy or using a shell (except for AShell.)
+                   When multiple levelfiles are present, you have to choose one
+                      first. You'll get in the main menu. Here you can alter
+                       game settings with the arrow keys (game mode, level,
                        linkplay, and players (+names and controls).
                       Select (enter/2nd) the level to customize
                     multiplayer games (lives, score-
@@ -38,13 +48,13 @@ Version:                 0.95.905 (released summer 2001)
      [1] left/right  [2] F1/F2  [3] sto/,  [4] enter/+
          but they can be altered to anything except EXIT
             (which always exits to the stats-screen)     and MORE
-                 (turns your calc off and pauses at the same time ;)
+                 (which pauses and allows you to change contrast.)
 
                       -= [WELL DONE] =-
 
-                        At the end of each game , the stats-screen will
+                        At the end of each game, the stats-screen will
                           be displayed. It shows the score and deaths for
-                            each worm, and hi score for singleplayer games.
+                            each worm, and hiscore for singleplayer games.
                              The winner(s) of multiplayer games will
                               be denoted with an *.  Hit enter
                                to return to the main menu.
@@ -71,7 +81,7 @@ Version:                 0.95.905 (released summer 2001)
      alive longer      RACE
       than the other      All worms
        players. If the        have to move
-       growth is set to 0          aound like race-cars.
+       growth is set to 1          aound like race-cars.
         you will get a nice                For each completed lap
          multiplayer Tron-game.                         you'll get 20 points.
                                   CTF
@@ -90,38 +100,44 @@ Version:                 0.95.905 (released summer 2001)
                the Wormy level editor for DOS I wrote.
                Start wormedit.exe and make some kick-ass
               levels! (Please do.) Also send me your levels
-             so I can put them on my page. blabla blabla blablah
+             so I can put them on my page. More info at shiar.org.
 
             -=[OF COURSE]=-
 
-           I am not responsible for any damage Wormy causes. Furthermore,
-          you may not release an altered version of Wormy, distribute it
-         w/o this readme file included, nor may you charge money for it.
+           Argh, a disclaimer :( Just note Wormy was a non-profit project
+           which took a lot of my (spare) time, so please don't go demand
+          stuff (fixes, features..) or sue me (f)or anything. By default
+          I am not responsible for any damage Wormy causes. Furthermore,
+         you may not: release an altered version of Wormy (the source
+         has been included for learning practises ONLY), distribute
+         it w/o this readme file included (plz leave the zipfile
+         intact), nor may you charge money for it. Thanks.
 
         -=[HISTORY]=-
 
         This is a short historical overview of Worm(y):
-                                                 (facts may not match reality)
+                                         (facts may not match reality)
       * End 1998: Matthew Shepcar releases Peaworm, worm in it's simplest form
      * Scabby didnt release another version with levels and vertical scrolling
-    * End 1999: I (Shiar) asked him whether I could complete his Worm
+    * End 1999: I (Shiar) got his permission to entirely screw up his Worm >:)
    * Jonah Cohen helped me for a while, but soon he either died or got bored
   * June 2000: Worm just didn't want to work correctly (linkplay problems
                 mostly), so I decided to take a break to continue later..
  * Feb 2001: After a huge break I figured it's time to complete WormY
-* Summer 2001: Completed at last, and everyone lived happily ever after
+* End 2001: Completed at last, and everyone lived happily ever after
 
 -=[CREDITS]=-
 
- EMAiL shiar@shiar.org      Please send me comments, fanmail and your levels!
+ EMAiL wormy@shiar.org      Please send me comments, fanmail and your levels!
   WWWW http://shiar.org        Be sure to visit :) Lotsa stuff for your ticalc
    iRC shiar @ #ti [efnet]      Idling here.
 
     Matthew Shepcar - for writing the original Peaworm and Wonderworm
      Jonah Cohen     - wrote some parts of Worm (like scrolling)
       Free Bird       - (forced) calc2calc linkplay testing
-       JQL             - beta testing blabla blab labla
-        Willyslice      - excellent .93 betatesting
-         John Nesler     - betatesting blaatbla
+       Willyslice      - some excellent betatesting
+        John Nesler     - more betatesting
+         Many More       - betatesters
+          too much..      - to list
 ______________________________________________________________________________
-=----------------------------------------------------------------------------=
+=----------------------------------------------------------------------------=
\ No newline at end of file
index 0ff73a0d022c78b5e47506baadee378103e2217c..ad959602f680f6442e57c3502c5e5c3fa472b387 100644 (file)
--- a/wormy.z80
+++ b/wormy.z80
@@ -1,5 +1,5 @@
 ; Title                      : Wormy
-; Version                    : 96% (0.96.C21)
+; Version                    : 96% (0.96.C24)
 ; Release Date               : UUHHhhh... soon?!?
 ; Filename                   : wormy.86p (5kb)
 ; Author(s)                  : Shiar
 
 ; 96% = DONE
 
-;     * complete readme
-;  1% * misc (pollish, bugs, &&&)
-;     * mem at worm #4 (still 12 bytes or so.....)
-;     * fix line proc (+large circles)
+;  1% * misc (bugs, &&&, pollish, &&, &)
+;     * mem at worm #4 (still 12 bytes or so.. or more? or less?)
+;     * look at init-z in line routine again
 ;   * LINK
-;  1% * fix transmit game/level data
+;  1% * fix transmit game/level data (?)
+;     * >Somehow do a lot of testing with 2 calcs< *sigh*
 
 ;100% = bugs fixed + levels done
 
-;>110%:        sound, startpos
+;>110%:        sound, startpos (?)
 ;>120%:        coop (DON'T COUNT ON IT)
 
 ;-----------------------------
 ;-----------------------------
 ;-----------------------------
 
+;NOTES:
+;* Use for LEARNING practises ONLY!
+;   Don't ever release altered code w/o permission!
+;* Code was originally by Scabby (Matthew Shepcar),
+;   a few lines by Jonah Cohen,
+;    and everything else by me - Shiar (Mischa Poslawsky).
+;* Although I've commented quite some stuff, I can't guarantee
+;   everybody will understand it. This is probably not the best source
+;    to learn z80 from. w00t the Shyer Way (tm).
+;* Don't scroll down if you get scared easily.
+
 #define buffer      ;use display buffer (otherwise write directly to screen)
 #define readymask   ;"greys" out the field before starting a level
 #define coolzgfx    ;nice graphics for game over screen
@@ -107,9 +118,9 @@ worm4p      = $F000 ;-F3FF (400)      %11110O00
 leveldata   = $F400 ;-FA70 (<=671)
        ;can you believe i actually left $269 bytes of memory unused?!?
 
-;MEM|8---9---A---B---C---D---E---F---|
-;   |..[------]||[]|......[-----]|[].|
-;   |   SCREEN 2* 13      PRGM   4LV |
+;MEM|8---9---A---B---C---D---E---F---| ;there's something wrong
+;   |..[------]||[]|......[-----]|[].| ;if you still understand
+;   |   SCREEN 2* 13      PRGM   4LV | ;after looking at this
 
 ;--- temporary
 
@@ -127,8 +138,8 @@ DispBuffer  = $FC70
 
  .org %1101011101001000
 
-start:
-  nop
+start:         ;turn back NOW!
+  nop      ;and so it begins...
   jp  Start
   ld  bc,42
  .org $-1   ;3y3 M 1337!
@@ -148,7 +159,7 @@ WormTxt:
   .db %1010010
   jr  nz,$+47
   dec l
-  .db " 96% C21",0
+  .db " 96% C24",0
 WormIcon:
   .db 8,2
   .db %00000000,%00111100
@@ -251,7 +262,7 @@ stringfound:
   inc ix
 _searchnext:
   cal _RAM_PAGE_7
-  jr searchnext
+  jr  searchnext
 
 loadgametype:
   psh de
@@ -278,8 +289,12 @@ searchcomplete:
 #else
   ld  ix,templevels-3
 #endif
-levelselectmenu:
+  cp  (ix+3) ;1st=255
+  jp  z,ExitNoStats ;->no lvls
   psh ix ;offset
+  cp  (ix+6) ;2nd=255
+  jr  z,loadlevel1 ;->1 lvl
+levelselectmenu: ;load next page
   ld  a,-2
   ld  (availevels),a
   cal _clrWindow
@@ -295,7 +310,9 @@ levelselectmenu:
   ld  hl,$0601 ;x=1
   ld  (_penCol),hl
 dispnextlevel:
-  ld  a,(ix+3)
+  ld  de,3
+  add ix,de
+  ld  a,(ix)
   ld  b,a
   inc a ;cp 255
   jr  z,__levselect
@@ -308,8 +325,6 @@ displevel:
   ld  (hl),a ;y+6
   cp  49 ;bottom of screen
   jr  nc,_levselect
-  ld  de,3
-  add ix,de
   ld  hl,availevels
   inc (hl)
   ld  a,b ;(ix+0)
@@ -319,6 +334,11 @@ displevel:
   cal _vputs
   jr  dispnextlevel
 
+loadlevel1:
+  pop hl
+  ld  b,-2
+  jr  loadlevel
+
 readylevelfile: ;selected level at ahl
 ; ld  hl,templevels-3/0
   ld  a,b
@@ -463,11 +483,11 @@ setdeflevels:
 ;----- build trig tables -----
 ;-----------------------------
 
-  ld  hl,TrigPrecalc
-  ld  de,SinCosTable
-  psh de
-  ld  bc,65
-  ldir
+  ld  hl,TrigPrecalc ;I believe this
+  ld  de,SinCosTable  ;is one of the few
+  psh de              ;pieces of original
+  ld  bc,65            ;Peaworm code still
+  ldir                  ;left intact..
   dec hl
   ld  b,63
 MirrorSineWave:
@@ -3280,9 +3300,9 @@ savestr:
 
 ;-----------------------------
 
-DisplayField:
-  ld  a,c
-  sub 29
+DisplayField:  ;all done by Jonah Cohen iirc. (-scrolling is scary-)
+  ld  a,c      ;not the fastest routine outthere, but it does get the job done.
+  sub 29       ;if something doesn't work, I probably _did_ alter it ;)
   jr  nc,NotMinYScroll
   xor a
 NotMinYScroll:
@@ -3551,7 +3571,7 @@ FindPixel: ;(b,c) to hl:a
 FP_Bit =$+1
   set 0,a
 
-  psh de ;&&&
+  psh de ;&&& C`MON! THIS IS UGLY! *hit myself*
   ld  de,ScrBuffer
   add hl,de
   pop de
@@ -3589,6 +3609,12 @@ drawsmtn:
 ; dec a ;4 = circle
 ; jp  z,drawcircle
 
+;IMHO, one weery nice routine. Oh lemme be proud just *once*.
+;Not perfect since it uses a screwy lineroutine to draw stuff
+;but, just _look_ at it. Ain't it grand? Z80 at its best.
+;Nice comments, also. So here we go: Shiar's Circle Routine:
+;(using the Bresenham method)
+
 drawcircle: ;(d,e),h   ;de=x,y; h=z
   ld  c,h              ;c=yy=z
   ld  a,h
@@ -3652,7 +3678,7 @@ circledraw:               ;destr:de
   ld  b,c
   ld  c,a              ;ex b,c
   pop hl
-  ret
+  ret                  ;thats it
 
 drawbox: ;(d,e)-(h,l)
   ld  b,l ;Delta-y
@@ -3676,8 +3702,10 @@ drawfatline:
   dec h
 ; jp  drawline
 
-;LINE (d,e)-(h,l)
-;destroyes a
+;A lot like Scabby's line routine in Wonderworm (dunno whether he wrote it
+;himself.) I did make a few optimizations and commented the thing.
+;A nice routine (also Bresenham), but for Wormy not perfect since really
+;large lines (>128 pixels in length or something) won't be flawless.
 
 drawline: ;(d,e)-(h,l)
   psh bc  ;destr: a