Jump to content
dhe

tp99 Challenge

Recommended Posts

The last file of every TP99 program loads into the memory top at FD40-FFDF. I suppose this breaks the loader.

Edited by mizapf
  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 4

Share this post


Link to post
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 7

Share this post


Link to post
Share on other sites
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:

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

 

The documentation is currently in German:
CHARSHELP        Screen and Graphic documentation
GS-BEFEHL         External Procedures from the libraries [email protected], [email protected], [email protected], [email protected] and [email protected]

 

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

Share this post


Link to post
Share on other sites
49 minutes ago, Keneg said:

I keep seeing the term FIAD folder.  What does this mean.  Are there different types of folders?

 

Files In A Directory (such as a Windows directory/folder) as opposed to files in a disk image (DSK extension, usually).

 

...lee

Share this post


Link to post
Share on other sites
14 minutes ago, Lee Stewart said:

 

Files In A Directory (such as a Windows directory/folder) as opposed to files in a disk image (DSK extension, usually).

 

...lee

So, since TIPI automatically converts disk images to folders, I only have FIAD directories?

Share this post


Link to post
Share on other sites
1 minute ago, Keneg said:

So, since TIPI automatically converts disk images to folders, I only have FIAD directories?

 

I believe that is correct.

 

...lee

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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! 😃

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Gotcha, causes some of the stuff I seen on stackoverflow said, with pascal procedures and arrays - was to use pointers, as in free pascal with real pointers.

I'd hoped I had missed a feature! 😃

Share this post


Link to post
Share on other sites

So I have both the Zak's and Wirth's book on Pascal.

Neither really appeals.

 

I found it for $5, I tried Turbo Tutorial (imaginary author Frank Borland) - it's really good stuff.

 

image.thumb.png.c27afc29d91628a4c13ff00c4b1f14d1.png

  • Like 3

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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. . .

Share this post


Link to post
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 1

Share this post


Link to post
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.

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...