Jump to content
IGNORED

tp99 Challenge


dhe

Recommended Posts

I tried it myself.. and it also crashes. Seems there is a dependency outside of the E/A utilities.

 

It appears that after running for a very short time it ends up branching back into the GPL interpreter. Since this is executing Extended BASIC (probably in a corrupted state), it doesn't work very well. It's trying to execute at GPL >0018 (load small capital letters), but it appears not to exit correctly, landing inside the XB ROM. (Perhaps the E/A GPLLNK is not compatible with XB?)

 

When the E/A cartridge is in place, the GPL call returns to the E/A utility. Soooo.. that's probably it. The GPLLNK in E/A's utilities needs to be replaced with an XB compatible one?

 

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Hi again,

 

this is the game EIMERKETTE (Bucket Chain) converted from BASIC to Turbo Pascal 99 by Manfred Kraus.

The original program is from a German magazine "Computer Praxis Nr 6/84" from page 66.

In the readme file on the dsk image Manfred Kraus explains the convertion tricks he used.

 

Today I translated the game to english and here it is:

EIMERKETTE.dsk

 

To run the game you need the EA cartridge or the Turbo Pascal Linker program.

You can use the EA option 5 RUN PROGRAM FILE: "DSK1.EIMER1"

It runs on real hardware and on classic99 (maybe on all emulators, but that i didn't test).

 

The disk contains the source files, all the link libraries and the program image files "EIMER1, EIMER2, EIMER3, EIMER4"

To run the program it is also necessary to have the file RUNLIB on DSK1.

 

image.png.00a04d5edc72b9cd287b080eb47091b5.png  image.png.df3204a5d449d511f34b324fea1c978d.png  image.png.0a6266e288fd5250ca2806b02ad148c1.png

 

This game is also in the XB version in the GameBase and you can find some hints in the following AA link:

 

 

 

Have fun!

 

  • Like 5
Link to comment
Share on other sites

Here is a first go at a comprehensive TP99 manual.

Wolfgang translated the manual from German to English.

I've added some stuff and did a bit of editing.

  The main problem, I need to overcome is getting the index right, and making it clickable.

   One whole in manual, is apparently, with the discover of TP99 V3, we have the sound and graphics library, but not official documentation.

Also included is Wolfgang's step by step getting started. It seems perfect to me, for getting your first TP99 program compiled and running.

 

The plea... Please send any corrections or additions to me!

 

Thanks,

Dano

 

TurboPasc99_manual_english.pdf TurboPasc99_first steps.docx

  • Like 8
Link to comment
Share on other sites

  • 3 months later...
On 5/1/2020 at 8:01 AM, wolhess said:

TURBO PASCAL 99 Version 3.0

 

This disk image and the zip file contains the program Turbo Pascal 99 version 3.

The program is not copy protected and runs from DSK1.

 

TP99V3A.dsk 360 kB · 14 downloads

 

TP99_V3A.zip 61.32 kB · 13 downloads

 

In classic99 you can map the disk image TP99V3A to DSK1.
Or you can unpack the zip file TP99V3A in a FIAD folder and map the folder to DSK1.

 

image.png.8e7b11514dcc298040b88e1afce5e27b.png  image.png.b7cca5086a39f5d6ad01d9cb6be59a0f.png

 

 

 

I don’t know about the differences between version 2 and 3 but during my tests
the editor / compiler and the linker works the same way.

The colors in the compiler and in the linker are different to version 2, more professional, I think.

 

The Compiler loads from EA option 5 RUN PROGRAM FILE and the FILE NAME: DSK1.TP3

The Linker loads from EA option 5 RUN PROGRAM FILE and the FILE NAME: DSK1.LK3A

 

You can use this Turbo Pascal version with the DEMO programs showed in the posts before
(POST #2=TP-DEMO, POST #52=TP-WIN and POST #63=TP-LINES) or any other Turbo Pascal Program.

 

There are some more libraries for Turbo Pascal 99 included:

CHARS@             CHAR, CHARS, CHARP, COLOR, GCHAR, HCHAR, VCHAR, JOYST
SOUND@             SOUND, SOUND2, SOUND3, SOUND4
SPEECH@            SAY, SPGET
SPRITES@           SINIT, MAGNIF, MOTION, PATTRN, LOCATE, POSITN, SPRITE, SCOLOR, DELALL,
                          DELSPR, DISTSS, DISTSL, COINC
PACKBIT@           CLEAR, BITMAP, PIXEL, LINE

 

The documentation is currently in German:
CHARSHELP        Screen and Graphic documentation
GS-BEFEHL         External Procedures from the libraries CHAR@, CHARS@, SPRITES@, SOUND@ and SPEECH@

 

There is also a RUNLIB80 file and a RUNLIBHELP documentation included. It seems that Turbo Pascal can be used
with a 80 character card or it can produce programs for a 80 character card.

 

Have fun programming with Turbo Pascal!

LKV3.bmp 658.24 kB · 11 downloads

I downloaded the zip file and copied the files to my TIPI in directory TP3.  Setting TP3 to DSK1, I am finally able to run TurboPasc99!  I can even run it from the TIPI using CALL TIPI("DSK1.TP3").  i think the issue with using the disk images for TP99V2 was that the TP2 file was written as a VAR/80 file instead of a PROGRAM file.  I did also upgrade the TIPI to version 2.7 yesterday also.  Don't know if that fixed something.  Now on with learning to use it. 

  • Like 2
Link to comment
Share on other sites

  • 7 months later...

I've been able to spend some time with TP99v3.

 

Some observations..

 

I tried on Classic99 to use maxcpu. While TP99v3 handles this well, the developers must not have used the same line entry command they did in the editor (or that TI used for all the assembler cart stuff), because one quick push of the key in the linker, results in about four repeats.

 

I have three sets of documentation I use, the original German manual, the manual the was distributed by LL Conner Ent (v2), and the translation of the German manual with v3 stuff added by Wolfgang. One of the items that isn't well addressed, I guess it's a given, what is the difference between functions and procedures? The bottom line is function returns values, procedures don't.

 

The reason I went down that particular road, is I wanted to shuffle a deck of cards.

Initially, I was going to create and array with 4 columns and 13 rows.

  Suits + Cards.

 

Unfortunately, TP99v3 only has single dimensional arrays.

 

Another way of passing arrays by name; say shuffle(hearts) or shuffle(diamonds) is with pointers. We don't have those either.

 

So, I thought, I'd been a good weasel, and I would use a function. Not so fast, said the compile I can only return base types.

Unfortunately, arrays aren't a base type.

 

I got the job done, by cramming all four arrays in a procedure, buy it wasn't very elegant.

 

I've grown soft having machines with 64Gigabyte or memory...

 

I think I need to look at some type of chain loader, shuffle the deck and then discard the code to do it, and load the main program.

 

When dealing with 32K, I've gained a new appreciation for the need to load character sets, create variables, change video and keyboard mode, and then discard all the code that did that, so you can't get on with the main event.

 

 

 

 

  • Like 5
Link to comment
Share on other sites

48 minutes ago, dhe said:

I've been able to spend some time with TP99v3.

 

Some observations..

 

I tried on Classic99 to use maxcpu. While TP99v3 handles this well, the developers must not have used the same line entry command they did in the editor (or that TI used for all the assembler cart stuff), because one quick push of the key in the linker, results in about four repeats.

 

I have three sets of documentation I use, the original German manual, the manual the was distributed by LL Conner Ent (v2), and the translation of the German manual with v3 stuff added by Wolfgang. One of the items that isn't well addressed, I guess it's a given, what is the difference between functions and procedures? The bottom line is function returns values, procedures don't.

 

The reason I went down that particular road, is I wanted to shuffle a deck of cards.

Initially, I was going to create and array with 4 columns and 13 rows.

  Suits + Cards.

 

Unfortunately, TP99v3 only has single dimensional arrays.

 

How about a 1 dimensional array to 52?  1 through 13 is hearts, 14-26 is diamonds, 27-39 is clubs, and 40-52 is spades?

Link to comment
Share on other sites

Yea, I thought about that route, but algorithmically, that makes for just about as much ugly for the shuffling routine, IF you want to keep the suits separate, if you just want a deck of cards shuffled, absolutely, that would be the way to go.

  • Like 1
Link to comment
Share on other sites

On 4/21/2021 at 3:59 PM, dhe said:

Yea, I thought about that route, but algorithmically, that makes for just about as much ugly for the shuffling routine, IF you want to keep the suits separate, if you just want a deck of cards shuffled, absolutely, that would be the way to go.

You could just keep 4 separate pointers to the start of each suit in the array, and then do your preferred shuffling procedure, adding the appropriate pointer to each process as you go along. That should keep your suits shuffled separately, wouldn't it?

Link to comment
Share on other sites

tp99 = No Pointers. =(

 

I did do a bit of file i/o this week. I can tell you the one or two examples I found were really bad c := stream[80], f := string[1];

 

Finally I got it rewritten with some sanity, using names like FILENAME[something], RECPOINT (for RECord POINTer)[something].

 

Example programs are a really bad place to save a few bytes, by using one character variable names! ?

Link to comment
Share on other sites

1 hour ago, dhe said:

tp99 = No Pointers. =(

 

I did do a bit of file i/o this week. I can tell you the one or two examples I found were really bad c := stream[80], f := string[1];

 

Finally I got it rewritten with some sanity, using names like FILENAME[something], RECPOINT (for RECord POINTer)[something].

 

Example programs are a really bad place to save a few bytes, by using one character variable names! ?

By pointers I meant a variable holding an integer value "pointing" to the array index value at the start of each suit. Indeed, one of the greatest limitations of TP99 was the lack of pointers, among other things, which makes little better than plain XB... A missed opportunity.

Link to comment
Share on other sites

  • 2 weeks later...

Do you have access to a copy of the WIPOSoft Turbo-Pasc99 book? It only exists in German so far as I know--and I've never seen an online scan of it. Mine isn't accessible at the moment, or I would dig it out and scan it. Note: this isn't the manual, it is about 200 pages long.

  • Like 1
Link to comment
Share on other sites

No to the "WIPOSoft Turbo-Pasc99 book". Thanks to Wolfgang I have a copy of the original German manual, which I have went back to a couple of times.  I believe that was one of the starting points for the manual Wolfgang put out, so my use of it has been limited. Would like to see the "book" if it comes up.

Thanks for the information.

Link to comment
Share on other sites

There is also a series of articles on TP99 in the Munich User's Group newsletters. I have scans of the articles, but the scans cut off a few lines from each page, making them of limited utility. There is also a Windows99 manual out there that extends TP99. I think I have a usable scan of that one if you need it. . .

Link to comment
Share on other sites

This is a bit of a tangent, but...

 

I have been working on a 8080 simulator to allow running CP/M programs on the 680x and 65[x]02.  One of the posters on the forum at 6502.org said he is interested in what I am doing because he was "collecting languages" on his Apple II.  Turbo Pascal was one of the compilers he mentioned; he did not say he had a Z80 card.

 

That reminded me of my discovery long ago that Turbo Pascal for CP/M required a Z80 processor, both for running the compiler as well as for the programs it generated.  I went back to MT+ or assembly language for things needing to run on an 8080 or 8085.  But I also briefly considered trying to modify Turbo Pascal to generate 8080 programs; that effort did not go very far as programming on the then new IBM PC took up more of my time.

 

I took a closer look at the CP/M version of Turbo Pascal after that discussion.  I have since disassembled most of the run-time library and commented much of it.  I still believe that creating a version of the compiler to run on an 8080 system is not feasible, but it now seems very doable to:

 

* write an 8080 version of the run-time library

* write a post-compiler to translate Z80 code generated by the compiler to 8080 assembly language

* write a tool to stitch the two together

 

If that can be done, it is not a huge stretch to

 

* write enough of a Z80 simulator to run the Turbo Pascal compiler on processor X

* write a version of the run-time library for processor X

* write a version of a converter to translate Z80 code to processor X

 

I believe this can be done with substantially less effort than writing a new Turbo compatible compiler to run natively on processor X

  • Like 2
Link to comment
Share on other sites

I just released this game for the Coleco Adam computer which uses the same video processor as the TI which I programmed in Turbo Pascal 3 with custom graphics and sound extensions for the Adam under CP/M 2.2. While the program does not use pointers, it does however use records which I believe TP99 does not support either, but there are ways around that. So one could potentially create fairly elaborate programs with TP99 which already incorporates the graphic and sound facilities of the TI, although available memory could be a problem here...

 

 

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...