CPCWiki forum

General Category => Programming => Topic started by: AMSDOS on 12:14, 29 November 12

Title: Interesting Type-Ins.
Post by: AMSDOS on 12:14, 29 November 12
I'd thought I'd start a new thread where people can put an interesting type-in from a magazine or just something they have knocked up. It doesn't need to be something ground breaking, it could simply be something which works well or something with a nice effect for example. :)


I dug out this old game from AA which I mentioned in the Scrolling Thread called "Apple Days", it's a simple game of catching the apples falling from the tree into your basket, though the extra factor the game has is some Hardware Scrolling which moves the screen as your moving your Basket, kind of giving the Illusion of movement, though your basket is always centre of the screen. :) I typed this game in thinking it was pretty good and was running pretty smoothly, though after I ironed the bugs I'd made in it, there were more bugs, even though their Typewriter codes were correct for the lines which were buggy. So I've polished the program up a bit so it looks better. :) It could be polished up a bit more, perhaps I'll do if I enhance the program a bit more. :)
Title: Re: Interesting Type-Ins.
Post by: Gryzor on 17:42, 04 December 12
Maybe if this catches on we should also create a wiki page/repository for the listings?
Title: Re: Interesting Type-Ins.
Post by: Nich on 23:06, 05 December 12
Maybe if this catches on we should also create a wiki page/repository for the listings?
How about this page (http://www.cpcwiki.eu/index.php/Type_Ins)?

This recent discussion about type-ins has reminded me that I ought to upload more Amstrad Action type-ins (http://www.cpcwiki.eu/index.php/AA_Type_Ins), but I never seem to find the time to do it! :(
Title: Re: Interesting Type-Ins.
Post by: ervin on 00:36, 06 December 12
Yes, me too!
I really should continue my ACU type-ins project one of these days... but it's so time consuming!
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 10:05, 06 December 12
Hi guys. Interesting discussion though I wasn't asking for much, just a thread with some interesting Type-ins in it.  ;D
I guess the only problem with that is what would people define as interesting, I was trying to keep it as easy as possible by saying it could simply be a type-in with a nice effect or something appealing. Everyone would agree that a type-ins with Machine Code Loaders could mean some nice treats when it comes to testing out the final product, unfortunately "DATA" statements probably won't mean a lot unless you can read M/C.  :D  Though I guess it's open to debate.  ;D


@Nich the list of programs you have there from your link are extremely nice programs and I dare say some of those are lengthy, unsure "Apple Days" falls into that bunch of programs, though I thought it was nice enough to have in here.  :D



Title: Re: Interesting Type-Ins.
Post by: Gryzor on 12:07, 14 December 12
Quote from: Nich
Quote from: Gryzor on 04 December 2012, 17:42:18 (http://www.cpcwiki.eu/forum/programming/interesting-type-ins/msg53926/#msg53926)Maybe if this catches on we should also create a wiki page/repository for the listings?
How about this page (http://www.cpcwiki.eu/index.php/Type_Ins)?

This recent discussion about type-ins has reminded me that I ought to upload more Amstrad Action type-ins (http://www.cpcwiki.eu/index.php/AA_Type_Ins), but I never seem to find the time to do it! (http://www.cpcwiki.eu/forum/Smileys/SoLoSMiLeYS1/sad.gif)
Ooh, shame on me.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 05:09, 15 December 12
I guess if Time is an issue, you could always look up CPC-Power and see if the program already exists. It may just be the program has been typed in cause it was in another magazine and it just needs the English to go back into the program.  :o
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 12:32, 15 December 12
Got around to typing in this 3D Star Field program. Considering it was all done in BASIC, it's going to show, though given it's calculating the movement and is full of arrays, it's interesting to see the approach they have used. :)
Title: Re: Interesting Type-Ins.
Post by: Gryzor on 17:09, 18 December 12
What do you mean "it's going to show"? I'm getting 10fps[nb]With WinAPE set to 1000%[/nb]! 
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 11:11, 19 December 12
What do you mean "it's going to show"? I'm getting 10fps[nb]With WinAPE set to 1000%[/nb]!


I'd probably get 10fps easy out of a 386sx @ 16Mhz!  :laugh:


May have a look at this Star Field program under CPC Basic 3, it maybe able to generate some Assembly from it.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 11:24, 11 January 13
In Issue 66 of AA came an interesting game of Pyramids. I haven't seen another game quite like this before and you can watch the Computer play against the Computer, or you can play against the Computer (either as Player 1 or Player 2), or 2 Players can also play this game.


The idea of this game is to use the Pattern shown on the Right hand side and match up the Colours, the Cursor keys are used to position where you want to place the pattern, the placing is kind of important (especially if you're playing against the computer) and a bit of luck is involved regarding what pattern you receive which is random. The more colours you can match up the more points you score and towards the end whoever has the most points wins. In addition to placement you ran rotate the patterns clockwise so it's always good to rotate the pattern into position where some points can be scored (up to 4 points if you're lucky), and the likely event you cannot place a pattern onto the board, you can pass, unfortunately this gives the opportunity for your opponent to score more points.


This program has already popup in a couple of places on NVG & CPC-Power has got a copy of it, though I've had a go at making this program run on a 464 in BASIC 1.0. The result is a functioning game which looks like the original. The original game had Graphic Pen commands, some PEN & MOVE statements with the additional parameters being used & some MASK commands were also used to draw up the board. For the Board I've gone to the trouble to incorporate my own plotting routine (with some modifications) to generate a criss-crossing effect which the MASK was doing, there are probably other more effective techniques which could be done in BASIC to generate this, I was more concerned with getting the right dimensions of the board and play around with my routine, it hasn't produce the fastest effect and even the original program is faster than my assembly routine.


With my version earlier there seemed to be some minor bugs in the game which weren't occurring in the original version, though I made some modifications and didn't notice any more bugs occurring, that's not to say there not there, I wouldn't say they were serious and the game is still playable, though it was kind of happening during the gameplay, not all the time though. I'm unsure if it's  because of a bit of a different between BASIC 1.0 and BASIC 1.1 respectively, in some places I had to change the listing so it would look better in BASIC 1.0.



Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 14:47, 04 May 13
I came across some interesting suite of Circle/Oval routines from an old issue of Your Computer which I thought was interesting enough to attach here along with the article for people who love Circle routines or like to see different approach to making Circles.  :D
Title: Re: Interesting Type-Ins.
Post by: Border_7 on 02:40, 06 May 13
Gotta love those old Your Computer mags! (Popular Computing Weekly & Home Computing weekly have some interesting type-ins as well)  ;D
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 09:39, 06 May 13
Gotta love those old Your Computer mags! (Popular Computing Weekly & Home Computing weekly have some interesting type-ins as well)  ;D


Don't know which magazine it's from, though I've got a scan of a programs called Skyscrapers, initially I just thought it might of been another Bomber clone, though it sounds more like a PC game called "Bouncing Babies" where something falls out of a Skyscraper and you guide your trampoline so they land on it and bounce to safety. If it's any good I'll stick it in here.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 13:22, 06 May 13

Don't know which magazine it's from, though I've got a scan of a programs called Skyscrapers, initially I just thought it might of been another Bomber clone, though it sounds more like a PC game called "Bouncing Babies" where something falls out of a Skyscraper and you guide your trampoline so they land on it and bounce to safety. If it's any good I'll stick it in here.


Well typed it in, it's got some nice graphical touches to it and I thought the use of colour looked fine for Mode 1, though the Game is quite difficult and in some cases if the man falls into the corner, even if your men are there with the trampoline, they die!  ???  I found some bugs in the game (ones I made), though I think I've fixed them all, this is also a good example of a game which needs the keyboard buffer to be cleared once it's Game Over, so I've used a "WHILE INKEY$<>"":WEND", which works on all the computers.  :D




Title: Re: Interesting Type-Ins.
Post by: Gryzor on 19:31, 06 May 13
Heheh nice little silly type-in...
Title: Re: Interesting Type-Ins.
Post by: Border_7 on 01:51, 07 May 13
Skycapers! Nice  :D  Looks like it came from one of those multi-platform mags...
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 14:06, 07 May 13
Heheh nice little silly type-in...


Didn't consider it silly enough for the Silly thread, plus that's all my stuff I consider silly.  ;D


Quote
Skycapers! Nice    Looks like it came from one of those multi-platform mags...


Some of the stuff that they have in those multi-platform magazines is very impressive. That Popular Computing Weekly for example has some game called Road Toad which is entirely M/C spanning over 3 issues, probably not Interesting in the sense it comprises mostly of Data Statements, though looks like a nice gem which could be added to the list of games Nich was pointing to.  :D
Title: Re: Interesting Type-Ins.
Post by: Nich on 22:37, 09 May 13
Some of the stuff that they have in those multi-platform magazines is very impressive. That Popular Computing Weekly for example has some game called Road Toad which is entirely M/C spanning over 3 issues, probably not Interesting in the sense it comprises mostly of Data Statements, though looks like a nice gem which could be added to the list of games Nich was pointing to.  :D
There is a short (5K) program already on NVG called Road Toad. Could this be the same program? Please could you let me know which issues of PCW it was published in?

I've been tidying up NVG a bit recently and have moved some type-in games where they should belong (i.e. the games/typeins directory), but there is still a lot more work to do! :laugh:
Title: Re: Interesting Type-Ins.
Post by: Johnny Olsen on 00:53, 10 May 13
Yes Nich it's the same program.

Here is a 8k version with 28k dat file.

Popular Computing Weekly vol 5 no 38-39-40  1986.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 10:41, 10 May 13
Cool, that'll save some of the typing.  :D
Title: Re: Interesting Type-Ins.
Post by: Nich on 18:34, 11 May 13
Yes Nich it's the same program.

Here is a 8k version with 28k dat file.

Popular Computing Weekly vol 5 no 38-39-40  1986.
Thanks very much for this. I have just uploaded it to the games/typeins directory of NVG.
Title: Re: Interesting Type-Ins.
Post by: Carnivius on 15:20, 04 June 13
I've not noticed that Type-Ins section before.

Just looking at this one Axys: The Last Battle - CPCWiki (http://www.cpcwiki.eu/index.php/Axys:_The_Last_Battle)  The player's ship sprite looks very likely based on the one from the classic Amiga shooter Battle Squadron though it isn't mentioned in the article.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 12:06, 05 June 13
I've not noticed that Type-Ins section before.


It's been there for ages, though it's had a face lift to have that list of significant games included there. Unfortunately it's not kept very up to date  :'(  Cause there are probably more type-ins which have been typed-in, which haven't been added to be available from there. I'm unsure if there was some plan to link it to the Type-ins from NVG?? CPC-Power had the most complete list of Type-ins until it went down, though I know it didn't have a lot of Type-ins from Amstrad Action, except for some of the nicer type-ins (mostly games I think) & I've only added a few from our Australian The Amstrad User which are mainly games as well.

Quote
Just looking at this one Axys: The Last Battle - CPCWiki (http://www.cpcwiki.eu/index.php/Axys:_The_Last_Battle)  The player's ship sprite looks very likely based on the one from the classic Amiga shooter Battle Squadron though it isn't mentioned in the article.


I've known about this game since the days of AA, which reviewed it on their Public Domain pages, though I'm lead to believe that this isn't in the Public Domain which is interesting and it was only recently I found out it was a Type-in.  :o  When I played it I just thought it was a flashy version of the early FTL (Faster Than Light) "Light Force" which was on one of the earlier AA Covertapes.
Title: Copychr$ to the Fore
Post by: copychr$ on 00:43, 18 June 13
[attachimg=1]

This material has been presented in several issues of CPC Oxygen web-magazine about 10 years back.

Copychr$ turned out to be useful in 3 different programs and everything later was on a single web page with a dsk download.
Use is limited to 6128, as copychr$ function is new in Basic 1.1

But, to leave things digestible, they get separated out again into parts and you will have to wait on the next installment as is proper.
Please allow for some inconsistencies or lack of context.

As type-ins they were fully documented in the type-along learn-along tradition that weaned us …
So, prepare for some overbearing presentation, especially seeing as to how this first program doesn’t actually do anything :-)
It’s a pretty fair showcasing of copychr$ though and sets up the rest.

The attached Introduction.doc holds a walk through and information on use of copychr$.

The Basic 1.1 program ZIP.BAS consists of two parts: a Demo and a Module.
 
When you Run it, all you see is the Module at work. Only when hitting "Return" will you get the Demo.
Demo, as is, allows you to chain CATs while swapping discs or changing drives, until you Run or Load a file or Quit.

Module ZIPCAT.CPC 1K, a Basic only Module in LINEs 64000-
It’s job is to return a file name you select on screen with the Arrow keys, to any main program.
 
Hitting the "Return" key chooses a file name. The Demo now awaits your choice; hit "R, L, M, C or Q" to get better than a BEEP.
Please note the use of a flag drive in Line 64010. Default is fdr=2 for a 2-drive system. Set fdr=1 for 1 drive.  Spacebar switches drives.

The following code is not usable as it is broken at width 80! Refer to the copychrs.dsk please, post #28.

Code: [Select]
10 REM ** ZIP.BAS **
20 'Lines 10-1000 are a DEMO calling ZIPCAT.CPC in lines 64000-
30 '
90 INK 0,10:INK 1,0:BORDER 10
100 GOSUB 200:END
200 GOSUB 64000 'Zipcat.cpc will return filename c$
210 LOCATE 5,2:PRINT "Run  Load  More  Cat  Quit"
300 tex$="RLMCQ":GOSUB 900:ON k GOTO 310,320,330,340,350
310 IF c$=SPACE$(12) THEN 340 ELSE CLS:RUN c$
320 IF c$=SPACE$(12) THEN 340 ELSE CLS:LOAD c$
330 LOCATE 5,2:PRINT CHR$(18);"Your Code Here":FOR zip=1 TO 2000:NEXT
340 GOTO 200
350 RETURN
360 '
900 REM ** Merci Monsieur Archambault
910 r$="":WHILE r$="":r$=UPPER$(INKEY$):WEND
920 k=INSTR(tex$,r$):IF k=0 THEN PRINT CHR$(7);:GOTO 910
930 RETURN
1000 '
64000 REM ** module ZIPCAT.CPC v2.0 (c)2002 by F. Leighton
64010 fdr=2:MODE 2:fb%=0:x%=1:y%=7:x2%=61:y2%=25:LOCATE 1,4:CAT
64020 FOR z%=8 TO 25:LOCATE 9,z%:IF COPYCHR$(#0)="."THEN NEXT ELSE y2%=z%-1
64030 FOR c%=29 TO 69 STEP 20:LOCATE c%,y%:IF COPYCHR$(#0)="."THEN NEXT ELSE x2%
=c%-28
64040 LOCATE 30,y2%+2:PRINT CHR$(24);" * C=Cat * ";CHR$(24);
64100 GOSUB 64200
64110 IF INKEY(2)<>-1 THEN y%=y%+1:GOTO 64100
64120 IF INKEY(0)<>-1 THEN y%=y%-1:GOTO 64100
64130 IF INKEY(1)<>-1 THEN x%=x%+20:GOTO 64100
64140 IF INKEY(8)<>-1 THEN x%=x%-20:GOTO 64100
64150 IF INKEY(18)<>-1 THEN LOCATE 30,y2%+2:PRINT c$;:GOTO 64500
64160 IF INKEY(62)<>-1 THEN 64000 'C
64170 IF INKEY(47)<>-1 AND fdr=2 THEN LOCATE 7,5:IF COPYCHR$(#0)="A"THEN |B:GOTO
 64000 ELSE |A:GOTO 64000 'Space
64180 CALL &BB06:GOTO 64110
64200 IF y%<7 THEN y%=y2% ELSE IF y%>y2% THEN y%=7
64210 IF x%<1 THEN x%=x2% ELSE IF x%>x2% THEN x%=1
64220 IF y%=yb% THEN IF x%=xb% AND fb% THEN 64500
64300 c$=SPACE$(12):z%=0:FOR c%=x% TO x%+11:z%=z%+1:LOCATE c%,y%:MID$(c$,z%,1)=C
OPYCHR$(#0):NEXT
64400 IF fb% THEN LOCATE xb%,yb%:PRINT bk$;ELSE fb%=1
64410 LOCATE x%,y%:PRINT CHR$(24);c$;CHR$(24);:xb%=x%:yb%=y%:bk$=c$
64500 fr!=FRE(""):RETURN

I was tickled to find thread
run"$ - or another disc directory tool (http://www.cpcwiki.eu/forum/programming/run%27$-or-another-disc-directory-tool/)
by SRS and his $.BAS program. Talk about synchronicity, the similarity in purpose is quiet striking.
With instant file selection over the whole range of CPCs, we may now safely chuck all non 8-bit machinery …

---------------------------------------------------------------
Please note some modifications:
Zip file removed. Much smaller doc file reposted.
All code is now in copychrs.dsk at foot of post #28.
Title: Copychr$ over the Top
Post by: copychr$ on 16:08, 19 June 13
CAT.BAS, 3K is just that, a souped up CAT.

It will not modify anything in the file system, apart from copying or erasing itself on demand.
Things have been made as smooth as possible and there aren’t really any gotchas.

It’s both a Standalone and a Module. That use is described in the attached doc.
Best use is to have it on your working disks and copy it when desired on any disks you visit.
With 2 drives you just need one copy on any drive.

Here is the Help File to get an idea:
Code: [Select]
100 REM *** CATHELPE.BAS
110 MODE 2
120 '
130 PRINT "CAT.BAS offers repeat basic file access to users"
140 PRINT "of all levels of experience.":PRINT
150 PRINT "To get the most out of it please consult the documentation.":PRINT
160 PRINT "Arrow Keys and Joystick let you move the Highlight."
170 PRINT "All features are risk free and just one key press away.":PRINT
180 PRINT "X - Cycles through 4 Cat, Dir & Mode choices. Return selects."
190 PRINT "S - Saves Cat.Bas to current disc."
200 PRINT "E - Erases Cat.Bas from current disc."
210 PRINT "C - CAT and |DIR are repeated. You may swap discs anytime."
220 PRINT "Q - Quits program."
230 PRINT "Return or Fire Button 1 - RUNs Selection."
240 PRINT "L - LOADs Selection and sets f7 to LIST. Hit f7 then Return to view."
:PRINT
250 PRINT "Spacebar or Fire 2 - TOGGLEs Drives.":PRINT
260 PRINT "Control + A or B - RUNs Cat.Bas from Drive A or B"
270 PRINT "allowing you to indifferently work both Drives.":PRINT
280 PRINT "Any Key to continue...";:CALL &BB06:PRINT CHR$(11)
290 PRINT "Please note following changes when in use as a Module:"
300 PRINT "S - Selects the File Name to be returned."
310 PRINT "E - Not available."
320 PRINT "Q - Quits back to main program, no choice is made.":PRINT
330 PRINT "CATCALL.BAS can help you get a handle on Module use.":PRINT
340 PRINT "Pressing Control + A or B Keys will start CAT.BAS"
350 PRINT "Now...":PRINT
360 '
370 KEY 156,"RUN"+CHR$(34)+"A:CAT.BAS"+CHR$(13):KEY DEF 69,1,97,65,156 '^A
380 KEY 157,"RUN"+CHR$(34)+"B:CAT.BAS"+CHR$(13):KEY DEF 54,1,98,66,157 '^B

CAT.BAS
Full Listing in the doc. But this is some of what you get …

[attachimg=1]

The doc will get you up to speed, but you don’t need much more than the help file on the dsk.
Why not use this download link:  ftp://ftp.lip6.fr/pub/amstrad/misc/TYPEINS.ZIP (ftp://ftp.lip6.fr/pub/amstrad/misc/TYPEINS.ZIP)
RUN”CAT and have a go.

On a real CPC:
Using only one drive, you will have to delete a file to get Cat.bas on that full typins.dsk.
Also set flag drive to fdr=1 in the first line to avoid error messages.
Pink (16) on blue (1) happens to be flicker-free and readable for mode 2.
Setting k1%=16 in Line 60040 will do it.

-------------------------------------------------------------------------------------
Please note a modification:
dsk file removed. All code is now in copychrs.dsk at foot of post #28.
Title: Re: Interesting Type-Ins.
Post by: Gryzor on 21:56, 20 June 13
This is very appealing in a geeky way, but it needs to replace CAT in the ROM to be of much use...
Title: Re: Interesting Type-Ins.
Post by: copychr$ on 14:35, 21 June 13
Thank you, Gryzor, and all who make it go, for providing a welcome here.

Also, thank you for the compliment.
That’s the nicest thing anybody ever said to me … geeky.
Makes me think of the girl with the coke bottle in Head First Java; “Wouldn’t it be dreamy if …”

I really don’t know a pig from a poke and that’s why things turned out this way.
Somehow cozy, like sitting around the fire after rubbing your sticks together.

As for keeping cats in roms, mine are both elderly and lack an eye and get about a lot :-)

I agree it would be slick to type or call CAT, even have a dedicated key and get something along these lines.
That’s very tempting, but beyond me.

As a primitive one should be content to rub one’s sticks.
Hey, let’s make torches and all go mess up the sacred cave! Yeah.
Title: Copychr$ the Aftermath
Post by: copychr$ on 15:38, 23 June 13
DOS.BAS 8K.

[attachimg=4]

DOS? Sure.

Everybody is standing around, going “Who can do sh*t like this?”
And sure enough, BG can do it … DOS for short.

That pun has caused a lot of confusion until today, as most professional computer journalists only interpret acronyms.
Nothing gets operated whatsoever, but one does a lot of the other.

Here Basic users also get to do some.
With the added comfort of selection by a flying cursor, both in CAT Screen and Menu and not a command line in sight …

That is a big claim and something will always be wrong or uncomfortable.
No, not bugs, that’s another misnomer. BUG stands for big user guide. One can be found in the Doc.

If you still code and get some jollies here, then all options can be rewritten to your taste.
I’d shy away from messing with the zooming about part though.
Information helpful to start coding that is available in the doc from post #24, and one can search for some other examples.

To a remarkable extent, only copychr$ was needed or used to make plain Basic bootstrap itself a working environment.

The process is so productive, because user selection of displayed information implies instant access for the working code.
There is no more need to retrieve from memory or file at that point.

Today, the same routine is exploited in the beta version of Google Glasses.
My memory has long gone, but they have a nice app that manages marital strife.

After staring at a female person for a few seconds, I am informed; “This is NOT your Wife.” or “This IS your Wife, her name is Optional.”
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 10:40, 08 April 14
I've been typing in and playing around with a few sound programs which included this one called Alto from AA64 which makes use of a Graphics Pen and the more difficult FILL command, however I have been able to come up with a BASIC 1.0 solution so the program appears to be functioning in the same manner.

Running this BASIC 1.0 program now in BASIC 1.1 appears to be just as functional as the original (despite being 2Kb larger), and in BASIC 1.0 everything appears normal, though the sound from the Notes seem to sound a little bit clipped, I'm unsure if it's due to the extra carry from the program or constraints from BASIC 1.0, this program is full of Arrays though and I've included another one for filling in the areas and it could easily be shortened down to each individual key pattern which is presented in the program.

Anyway I thought I'd include it in here along with the original for people to compare.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 10:42, 24 June 14
Skycapers! Nice  :D  Looks like it came from one of those multi-platform mags...


I must of grabbed the scan of this particular program off CPC-Power when it was the old site and typed it in and posted it here while the site was down. It appears to have come from Computer & Video Games (or C+VG) from the mid-80s.
According to Wikipedia (which is contradicting itself), Future Publishing produce that magazine which began Nov 1981, though clicking on Future Publishing reveals they didn't start until 1985 with Amstrad Action. I can only assume that C+VG were subjected to Future Publishing at some stage during it's publication.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 09:52, 04 January 15
This program was a little filler in the Type-Ins pages of AA65 which produces some interesting graphic patterns as it moves forwards & backwards on the screen.
Originally made use of "GRAPHICS PEN", it's so easy to convert for a 464, I must of missed the issue with the solution in it.  ;D


I was curious to see how this program would go in Pascal, and was able to produce something similar which runs a little bit faster which I'll post in the Pascal Thread (http://www.cpcwiki.eu/forum/programming/hisoft-pascal-4t/msg91861/#msg91861).
Title: Re: Interesting Type-Ins.
Post by: Gryzor on 19:42, 06 January 15
Nice early gfx demo, just make sure you run it at 500%
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 14:16, 24 May 15
Nice early gfx demo, just make sure you run it at 500%


Hmmm. I tried this 500% on my old WinXP computer in WinApe and my computer nearly had a seizure.
Title: Re: Interesting Type-Ins.
Post by: Gryzor on 20:59, 24 May 15
Ahh poor thing it can't stand the Z80 power...
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 13:21, 14 October 15
I came across this program a while ago, unfortunately I'm breaking my own rules because it's a RSX Library, lots of RSX Library programs come with commands, to allow easier access to the Firmware, but this one allows you to play around with Registers (Singular or Pair) & a RSX command FWCALL followed by Firmware Address. So a BASIC program with a lot of different commands, could be given a boost under this program or could be useful for a Lengthy Program which might have too much stuff in it for a BASIC compiler to deal with.


regiload &copy popular computing weekly (1987) (http://www.cpc-power.com/index.php?page=detail&onglet=notices&num=10806)
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 09:37, 15 October 15
Well I couldn't resist typing in that program & found something to test it on. I have much to learn!  :o


I've attached some variations of the same program (Hypno-Strobe/Colour Fader), which is using a series of MOVE & DRAWR commands within a loop as well as a INK . Around that I've put a WHILE loop to check if Return has been pressed, program exits when this happens and resets INKs back to normal.


What's surprising is the BASIC result (HYPNO.BAS) is faster than Regiload (STROBE.BAS & STROBE2.BAS). In addition to the DRAWR command, a Graphics Pen is being used to alternate the colour, which initially had me setting the GRA PEN (&BBDE) for it throughout the loop. In STROBE2.BAS I've reduce the use of &BBDE, the result looks a little bit different, but still no faster than the BASIC! (both 1.0 or 1.1), which draws to the centre of the screen in around 8 seconds. STROBE.BAS & STROBE2.BAS do this in around 13-14secs!


In the original program, maths is being used with those MOVE & DRAWR commands. Perhaps that's slowing things down being in the RSX, though it's a big turnout, or maybe it's no better than what the program is currently using. I haven't disassembled the Regiload M/C to see what it's doing, it might be it's design and nature of it, which cannot be improved. I can test this with another program which directly sends RSXs to MOVE & Drawing Commands.
Title: Re: Interesting Type-Ins.
Post by: Fessor on 01:13, 16 October 15
it has to do with the circumstance that rsx cant be stored tokenized as basic-commands and the basic interpreter has to interpret each byte of the name of the rsx-command and compare it with the nametable of rsx-commands to look if this rsx-command is defined and where its entry-point is. also the parameters of the rsx are adressed and accessed via the index-registers. This makes the Parsing of RSX slower than parsing a Basic-Command which for the most common keywords is simply one byte.



Title: Re: Interesting Type-Ins.
Post by: TFM on 02:11, 16 October 15
Positive an MC side is that you search for the address of the RSX once, store the address and then use the address.  :)  Maybe doable in BASIC too?

Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 03:14, 16 October 15
Ok, so if RSXs are bad in interpreted BASIC, I guess a BASIC CALL with parameters would help smooth the process if a CALL gets tokenised.


Otherwise I've got some great results using RSXs by incorporating it into a Compiled Program.
Title: Re: Interesting Type-Ins.
Post by: AMSDOS on 13:32, 19 June 16

After AA discontinued the Type-ins from issue 109 onwards, the next best thing was the Basically basic page and in Issue 112 (January 1995), Angela Cook and Rob Buckley posted this fun little game of dodging the square meteors with your wire frame starship. :)


[attachimg=1]


I actually found a small bug in the program where, after a while all these square meteors appeared out of nowhere and you had no chance of dodging them. This program had typechecker codes in it, but they all seemed to match up, so the bug was present when the program got published.
I can't remember if I sorted this out back then, but I found the bug on Line 120, specifically this code:


Code: [Select]
bl3(aa)=0

which should read:


Code: [Select]
bl3(a)=0

Now this starfigher game is much more enjoyable. But it's quite well written, using BASIC functions MAX and MIN instead of IF statements to optimize this program, it also works in BASIC 1.0 with the use of PLOT to set the GRAPHICS PEN & it also sets the Control Code to set the Screen Write Mode to XOR.


When you run out of lives though the program ends and all this Character Garbage displays itself onscreen. BASIC 1.0 doesn't support CLEAR INPUT, so I've added a:


Code: [Select]
WHILE INKEY$<>"":WEND

which effectively does the same thing.