News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_AMSDOS

Xen Plus

Started by AMSDOS, 12:04, 02 October 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AMSDOS

I'd been meaning to type in this set of RSX routines which was published in Popular Computing Weekly back in 1986 and recently I noticed a single DATA line was missing from the program (line 1230), however I typed in the program and think I worked out what the DATA was from that missing line once I had all the other DATA lines correct, unfortunately the program only checks from a single checksum value, which meant checking every single line! :D There was some mistakes in the Popular Computing Weekly article which seems to include the name of RSXs and some of the parameters:


* HELP1 is actually HELP to list all the commands
* EMPHASISE,x,y,@a$ becomes EMPHASIZE,x,y,@a$ - in addition this was the affected routine which was missing the data from it, however I think I've got it working, which makes the text look bold.
* DOTLINE,n,direction - nothing actually wrong with this routine, though PCW gave me the impression that n represented the spacing between dots and was using a small number with bad results. n is actually the length across the screen.
* GCOORD,x,y,@n% - the x,y arrangement PCW had is actually back-to-front, so it's GCOORD,y,x,@n% - n% also needs to be set to zero or an Improper Argument occurs, so GCOORD,398,0,@n% returns -16384 or &C000 if HEX is used.
* PUT and SIZE was my main reason for typing up this program, SIZE is used to setup the size of a Graphic, PUT,x,y,source places the graphic at x,y graphical co-ordinates with sourcing being the address of the sprite. Initially I thought I could of typed in a program for drawing the graphic and placing somewhere in memory, though this program doesn't have that, instead a Sprite Editor has to be used to Draw the Graphic and then the DATA is saved to memory. Anyway I made this example out of a GWBASIC program I had which draws a Person walking across the screen and like the original you can specify the speed you want the person to walk, values like 50 or 60 look fine for the PUT command, though anything now and it really flickers a lot.  :D




100 INK 0,0:INK 1,26:INK 2,15:INK 3,3:GOSUB 1000
110 IF PEEK(39004)<>&3E THEN LOAD"XENPLUS.BIN",39000:CALL 39000
120 |SIZE,4,14
130 INPUT"SPEED";X
140 MODE 0
150 MOVE 0,370:DRAW 638,370,3
160 FOR A=0 TO 592 STEP 16
170   |PUT,A,398,&4000:FOR E=1 TO X:NEXT:|PUT,A,398,&4000
180   |PUT,A+4,398,&4038:FOR E=1 TO X:NEXT:|PUT,A+4,398,&4038
190   |PUT,A+8,398,&4070:FOR E=1 TO X:NEXT:|PUT,A+8,398,&4070
200   |PUT,A+12,398,&40A8:FOR E=1 TO X:NEXT:|PUT,A+12,398,&40A8
210   |PUT,A+16,398,&40E0:FOR E=1 TO X:NEXT:|PUT,A+16,398,&40E0
220 NEXT A
230 GOTO 130
1000 MEMORY &3FFF:RESTORE 1100:p=1:i=0
1010 FOR l=1 TO 18
1020   READ a$
1030   FOR a=1 TO 31 STEP 2
1040     POKE &4000+i,VAL("&"+MID$(a$,a,2))
1050     i=i+1
1060   NEXT a
1070 NEXT l
1080 RETURN
1100 DATA 00408000008448000084480000408000
1110 DATA 0040800000C0C0004040808080408040
1120 DATA 00408000004080000040800000804000
1130 DATA 40000080800000400040800000844800
1140 DATA 00844800004080000040800000C0C000
1150 DATA 40408080404080400040800000408000
1160 DATA 00408000008040004000008040000040
1170 DATA 00408000008448000084480000408000
1180 DATA 0040800000C0C0004040808040408080
1190 DATA 00408000004080000040800000804000
1200 DATA 40000080400000800040800000844800
1210 DATA 00844800004080000040800000C0C000
1220 DATA 00C0808000C080800040800000408000
1230 DATA 00408000004040000040008000400080
1240 DATA 00408000008448000084480000408000
1250 DATA 0040800000C0C00000C0C00000C0C000
1260 DATA 00408000004080000040800000408000
1270 DATA 00408000004080000000000000000000




Anyway I've put together a Disk Image, I altered the original program slightly to include MEMORY command to protect the DATA and I also Saved a Binary File which can be loaded with RUN"disc and the Demo program (which I posted above), can also be loaded and executed with RUN"demo
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod