Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hpcvra.cv.hp.com!rnews!hpcvbbs!akcs.falco From: akcs.falco@hpcvbbs.UUCP (Andrey Dolgachev) Newsgroups: comp.sys.handhelds Subject: Re: HP48: new ML tetris in ASC format Message-ID: <280b63a2:2787.2comp.sys.handhelds;1@hpcvbbs.UUCP> Date: 16 Apr 91 21:40:06 GMT References: <1991Apr15.061548.12826@colorado.edu> <280a9907:2787.1comp.sys.hand Lines: 31 Well, I thought about taking the ML Tetris apart to see what made it tick (and take a look at the routines). So, I started by making the library into a directory. What I found was a USERLANG program, a configuration program (17000 ATTACH), a string, a GROB, and a machine code routine. Now, maybe some of you have cautght on to the imortatnt part? Well, I'll giv you another hint, remember how the ON key does not function wile playing Tetris? Not yet, wel, if you look at the Start program, the USERLANG program that is, you find that it recalls the string to the stack, and then executes the machine code routine. And, finally, if you haven't caught on yet, the string can't be visited or edited because you "can't edit null character". Unfortuantely, I have the old version of CHIP48, not 2.25, so I wasn't able to make sure if ML Tetris reallly is a CHIP program or not, but it sure does seem like it, don't it? I would appreciate it if somebody takes a llok and sees if the string can be run with their CHIP or if one of ttheir chip games can be run with the code segment in ML Tetirs. The library can be recalled as a directory by using the RCLLIB program in HACKIT, posted by a kind soul a few days ago. Also, it looks like I'm going to have to delve into machine code to speed up my Tetris. BTW, it looks like the main speed increase is not the speed of the actual routines, like the rotating or moving routines , but the speedup comes about from the way that key-presses arehandled. THe partial ML Tetris uses KEY, which doesn't care if you you hold down the the ke. Becuase of this, there's a noticeable lag and you have to repeatedly press the keys. Anyways, I tried making the rotate function do contnuous and it was very fast (you could barely see the piece when it rotated) so it look slike I'm going to have to modify my key-handling routine with ML. Unless a kind soul has info on pokeing the key buffer and directly polling the status of keys from ML or RPL, it looks like I'm going to be spending some time manuallly dissambling the KEY routine. However, it's good that there is a faster Tetirs out (which means better) , after all, competition always improves the product. ---Falco