Your Computer type-ins

Discussion, Reviews & High-scores

Moderator: Moderators

carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Let's see if any listing spurs so much discussion it is worth splitting it. I'd think in that case it is better to open a new thread about a particular game.

By the way, Dirke Lampe also contributed one of the few football games. Well, if I remember correctly it was more of a Pong variation (says he who yet hasn't got his players to move a single square).
Anders Carlsson

Image Image Image Image Image
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

I've got two problems with The Guardian listing, they might be there from the original print though...

- complaint about syntax error on line 381
- if I enter a difficulty above 1 then it complains of OUT OF MEMORY. What range should it be?
Lie with passion and be forever damned...
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Line 381 is IFW>100THENSTOP which for some reason gives the syntax error when your wounds go above 100. I tried replacing it with THENEND and it seemed to fix it, but I have no idea why. Not sure about the difficulty level thing. I'll look at possible typos related to difficulty level.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

It appears your listing was tokenized as IF W > 100 THEN S TO P. Which program did you use to tokenize it, as I suppose you didn't type it in line by line on a real VIC or emulator?
Anders Carlsson

Image Image Image Image Image
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Oh, funny!
I used Shlowski's BasEdit. Looks like another little problem with that :)
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

TANK BATTLE
by Serge Simon

Data entry and and debugging by Kweepa

Your Computer, May 1985.

Screenshot:
Image

Instructions
Serge Simon with a very fast Basic game for the unexpanded Vic-20.

AS REGULAR readers of Your Computer can see, machine code is used more and more for writing games. Such programs are much faster and more sophisticated than Basic programs, but are they better? Typing in those programs, mostly consisting of endless data lines is not a pleasant task, and for beginning computer enthusiasts it may be very discouraging. Also it seems as if people have forgotten that in Basic too, one can write good and reasonably fast games.

Therefore I have written this 100 per cent Basic program. It is Tank Battle, a two-player game for the unexpanded Vic-20. The program starts with displaying a title page, where you will be asked to enter the names of the two players.

If you have done this, and you have hit Return, you can see a sort of map on the screen, and two tanks.

The two players can move around the tanks and they can fire in the direction they move. The aim is - naturally - to destroy the other's tank and to score points. The keys to be used are:

For player one (black tank)
forward, Ctrl; turn, Shift; and fire, CBM
For player two (blue tank)
forward, F5; turn, F7; and fire, F3

The game itself is divided into two parts because of the limited memory of the standard Vic-20. First type in the program with the data statements for the user defined graphics. Then save it and type in the second part. Save this immediately after the first one. If you later load in the first program, the main program will be loaded automatically.

One last note: player one, who sits at the left side, may accidentally hit the Run-Stop key and thus break into the program. To prevent this add line:

2 POKE 45,240: POKE 46, 26: POKE 788,194

[Kweepa note: When loading from disk, comment out line 60 of the first part before running it. Then load and run the second part.]
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Kweepa wrote:I used Shlowski's BasEdit. Looks like another little problem with that :)
Well, something for Schlowski to look into. Probably just a matter of reordering the list of tokens so STOP appears before TO. The VIC-20 Basic ROM should be a good place to look for the right order to tokenize keywords.

This program won't work on a VIC-20:

5 S=2
7 P=5
10 FORA=STOP:PRINTA:NEXT

One needs to add a space either before or after TO. Sorry for this intermission, but perhaps you should re-tokenize further listings although this kind of issue should be ultra rare.
Anders Carlsson

Image Image Image Image Image
gklinger
Vic 20 Elite
Posts: 2051
Joined: Tue Oct 03, 2006 1:39 am

Post by gklinger »

Jim Butterfield was fond of using examples where code broke because BASIC tokens were created by variables plus other tokens (like using the variable T before the operator AND etc.)
In the end it will be as if nothing ever happened.
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

gklinger wrote:(like using the variable T before the operator AND etc.)
I make the ol' TAND mistake almost every time I write a program, and it still takes me 15 minutes to figure out what I am doing wrong.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Mayhem wrote:I've got two problems with The Guardian listing, they might be there from the original print though...

- complaint about syntax error on line 381
- if I enter a difficulty above 1 then it complains of OUT OF MEMORY. What range should it be?
Retokenized theguardian.prg using petcat. Fixes the line 381 problem - although when you die it just stops the program anyway so it doesn't make a lot of difference :) Uploaded to kweepa.com again.

The out of memory thing seems to be a problem with the original listing. The code to calculate the number of monsters NM from difficulty D is:

Code: Select all

NM=10*D*INT(RND(1)+1)+11
...
DIMM(NM+1,1)
which just works out to 11, 21, 31, 41 etc for D=1,2,3,4. For a 3k VIC, anything above 11 monsters runs out of memory. Seems to work ok on an 8k VIC, although there really should be some form of range check on D! (And a fixed NM calculation...)
User avatar
Mayhem
High Bidder
Posts: 3027
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

Well I've entered Guardian as a 8k program in GB20, let it ride heh...
Lie with passion and be forever damned...
User avatar
Mike
Herr VC
Posts: 4846
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

DEFENDER for unexpanded VIC-20

Post by Mike »

DEFENDER

Data entry and debugging by Mike

Compute mit, February 1986.

This is a type-in game for the unexpanded VIC-20 from a German computer magazine, which had been published as an hex-dump spanning four pages. In those days, I'd never have had the patience to actually type it in by hand, but nowadays, in the Ages of OCR, I thought it might be worth a try. The listing contained checksum bytes, which hopefully (and indeed!) helped to catch errors - to a degree. However, the OCR *had* difficulties to discern '8', and 'B', and the checksum algorithm would not notice two simultaneous exchanges of these in one line.

When I had finally found all these errors, the game still didn't work: as it appeared, the first 14 bytes had been corrupted by something that looked like two BASIC variable entries. The remainder of the following code resembled a joystick routine, and from this I tried to guess, what was missing. Indeed the replacement routine I thought out is *exactly* 14 bytes in length, and quite possibly truly reconstructs the original contents.

Here's the corrected hexdump. Download DEFENDER as one of the 21 games in my unexpanded type-in collection.

The game is controlled by joystick. Press fire in the title screen to start the game. When the game is over, press left shift to restart.

The translation of the game's instructions is given below.

Cheers,

Michael
Alien invaders have landed in the Sahara desert. To reach the most important capital cities of Earth, they drilled a long tunnel under the Atlantic to America. By chance the tunnel exit has been found, and you've been assigned the task to destroy the alien invaders in the tunnel.

But beware! The enemies shoot at you, and the tunnel is secured by mines and barriers. Aim to get as many enemies you can, before they get you.


DEFENDER for unexpanded VIC-20


The program is entirely written in machine language, and uses 3 K of the available memory. For this reason, it is impossible to type in the program as DATA lines.

To type in the program nevertheless, I wrote a small monitor, which only needs 384 bytes, and so fits into memory besides the program.

The monitor is put into DATA lines. To get it into memory, proceed as follows:

Code: Select all

NEW
POKE44,18:POKE4608,0:NEW
Type in, and start the DATA program.

Code: Select all

POKE44,16:NEW
10 SYS4324
POKE46,18:POKE45,0:CLR
Saving the monitor:

With M aaaa the memory contents at aaaa are displayed, with M aaaa bbbb the range between aaaa, and bbbb is displayed. Each line contains four data bytes, and one checksum byte. If the data bytes, and checksum byte don't match, the line is rejected.

When the program has been typed in completely, the monitor is left with STOP/RESTORE.

Then enter 'NEW', and '10 SYS 6656', and also 'POKE 46,29:POKE 45,240:CLR', and save
the program.

The program has been stored on tape. The monitor, and the DATA loader of the monitor have also been saved.

To print the HEXDUMP:

Load DEFENDER, load the monitor, enter 'OPEN 4,4:CMD 4', 'RUN', and 'M 1200 1DFF'.
Last edited by Mike on Sun Aug 03, 2014 4:21 am, edited 2 times in total.
regor97
Vic 20 Newbie
Posts: 2
Joined: Sat Oct 15, 2005 8:30 am

Your Computer type-ins

Post by regor97 »

GRIDMANIA
by Damian Mc Comb

Listing kindly supplied by Kweepa
Data entry and debugging by regor97

Your Computer, October 1983

Screenshot
Image

Gridmania is an Amidar-type game that runs on an unexpanded VIC-20. Other than a BASIC loader the game is written in machine language. Unfortunately some of the characters in the listing are barely legible. After some debugging the game seems to run OK. It will eventually freeze if left on the GAME OVER screen, but this appears not to affect actual game play. GRidMAnia.zip contains:

GRIDMANIA.prg - BASIC loader (program one)
GM.prg - ML program

Note: in BASIC, to save the ML part to tape you need to enter POKE43,1:POKE44,16:POKE45,0:POKE46,30:SAVE"",1,1

Gridmania.tap - emulator ready tape version

all the above files are based on the original listing


Gridmania.d64 - modified loader for disk version


The following instructions are extracted from the magazine article and include how to adjust game speed.

------------------------------------------

To control your grid-glider you can use a joystick or a large selection of keys.

(not mentioned in the original magazine article is that to start play from the "GAME OVER" screen you can press one of the following keys: F1, F3, F5, F6, RETURN, CRSR down or CRSR right.)

The key at the top left of the keyboard freezes the game indefinitely until pressed again.

There are eight different kinds of alien attackers and they start off fairly slowly at level 1 and get faster with each level. Each level has two phases. Phase one has six of the aliens after you and phase two has eight of them. After that it goes back to six, but the level goes up one and a new kind of alien appears.

Your task is to completely cover the white grid with black and then return to home base in the quickest time. If you return to base before completing the grid you will lose a life. You cannot destroy the pursuing aliens so you must avoid them.

If that wasn't enough against you there is also a continually decreasing energy supply at the bottom of the screen. If this falls empty you lose a life. However when you complete a grid and return to base you will get a bonus for remaining energy. You will have to be quick though since this is the only way you can score.

The lowest high-score the game will register is 1500 and you will also gain a free life at this score.

Incidentally you can speed up or slow down the game with the following two locations:

6131 = speed of your grid-glider.
14 is normal, any less is faster.
6057 = speed of aliens.
14 is normal.

In order to change these you will have to delete the part of program one which disables the run stop/restore, i.e. the last five items of data in line 200 - A9,02,8D,1E,91.

Whenever you do break out of the game, to resume play SYS 5915.
Last edited by regor97 on Thu Jun 17, 2010 9:53 am, edited 1 time in total.
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

South Africa?! No way! Welcome!
High Scores, Links, and Jeff's Basic Games page.
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Post by ravenxau »

Jeff-20 wrote:These look great! I find type in programs so much more interesting than carts for some reason!

Maybe someone (maybe a mod) should separate program postings and discussion like the Italian type-in threads.
Type-ins are great - They were a great way to distribute programs back in the day. I can't begin to remember how many programs/games I collected from just photocopying pages from magazines in the school library. Also when you played a game and thought "Wow! I wonder how the programmer did that?", all you had to do was sit down with the listing and work it out. I learned 90% of what i know from programming during these formative years.
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
Post Reply