Jump to content

Photo

XB Game Developers Package


430 replies to this topic

#351 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 30, 2018 9:29 PM

Yep, just as I expected. Byte 1 of the PAB was not being cleared after the error and so the second error this causes forces the compiled program to halt. Here is a revised version of RUNTIME7. There are two changes:

The error bug is fixed.

I now reserve >110 bytes for the PAB which should allow a name with a length of up to 255 characters.

Replace RUNTIME7 in the FRAPPATO disk with this one. With any luck this will fix up the problems you are having.

This works in my (not very thorough) testing but it is a good idea to save the old version of RUNTIME7 just in case...

Attached Files



#352 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 4,054 posts
  • Location:Portland, Oregon USA

Posted Wed Oct 31, 2018 1:01 PM

Yep, just as I expected. Byte 1 of the PAB was not being cleared after the error and so the second error this causes forces the compiled program to halt. Here is a revised version of RUNTIME7. There are two changes:

The error bug is fixed.

I now reserve >110 bytes for the PAB which should allow a name with a length of up to 255 characters.

Replace RUNTIME7 in the FRAPPATO disk with this one. With any luck this will fix up the problems you are having.

This works in my (not very thorough) testing but it is a good idea to save the old version of RUNTIME7 just in case...

 

That resolved it!  

Greg



#353 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 4,054 posts
  • Location:Portland, Oregon USA

Posted Wed Oct 31, 2018 3:56 PM

btw.. with the new version on the latest classic99 I get a screen like this (and lockup/beeeeeeee)  when i go to assembler.. i end up running fw from the old version to assemble

 

Attached File  crash.jpg   19.19KB   3 downloads

 

Greg



#354 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Wed Oct 31, 2018 8:52 PM

btw.. with the new version on the latest classic99 I get a screen like this (and lockup/beeeeeeee)  when i go to assembler.. i end up running fw from the old version to assemble

 

Greg

That is a mystery to me. It works fine on my system. I was using QI398 so to be sure I just downloaded the latest version, QI399.004. It works the same - no funny colors and no lockup.

Maybe there is some setting in classic99 that is wrong? Maybe you downloaded a corrupted copy of either Classic99 or my program?

I am using Windows XP. Maybe it is a problem with Windows 10, but I don't see why that would matter.


Edited by senior_falcon, Wed Oct 31, 2018 8:56 PM.


#355 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,414 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Nov 1, 2018 3:04 AM

I develop in Windows 10. If there's a Windows conflict with Classic99, it's from NOT running Windows 10. ;)



#356 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Thu Nov 1, 2018 6:02 AM

I develop in Windows 10. If there's a Windows conflict with Classic99, it's from NOT running Windows 10. ;)

As I remember you thoroughly tested Encruzado and had no problems like this.  



#357 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 4,054 posts
  • Location:Portland, Oregon USA

Posted Thu Nov 1, 2018 6:22 PM

That is a mystery to me. It works fine on my system. I was using QI398 so to be sure I just downloaded the latest version, QI399.004. It works the same - no funny colors and no lockup.

Maybe there is some setting in classic99 that is wrong? Maybe you downloaded a corrupted copy of either Classic99 or my program?

I am using Windows XP. Maybe it is a problem with Windows 10, but I don't see why that would matter.

 

Ok well I had this problem in cl99 older version and in the latest (I downloaded latest and overwrote the dir..)  I'll try first..resetting cl99 to stock (remove the ini) and then second re-downloading the compiler and try that..

 

Greg



#358 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 4,054 posts
  • Location:Portland, Oregon USA

Posted Thu Nov 1, 2018 6:31 PM

 

Ok well I had this problem in cl99 older version and in the latest (I downloaded latest and overwrote the dir..)  I'll try first..resetting cl99 to stock (remove the ini) and then second re-downloading the compiler and try that..

 

Greg

 

It took resetting the ini AND redownloading the package.. /shrug   I can crash again with the old ini..(attached)

Attached Files



#359 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Thu Nov 1, 2018 9:01 PM

 

It took resetting the ini AND redownloading the package.. /shrug   I can crash again with the old ini..(attached)

I tried your ini file and the assembler worked fine. Be sure to check "Write DV80 as windows text". Also it is helpful (but not essential) to "Enable long file names" and "allow more than 127 files"



#360 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,414 posts
  • HarmlessLion
  • Location:BUR

Posted Fri Nov 2, 2018 3:08 PM

I tried your ini file and the assembler worked fine. Be sure to check "Write DV80 as windows text". Also it is helpful (but not essential) to "Enable long file names" and "allow more than 127 files"

 

Both of those options are for directories only. They default to off, and I recommend they not be turned on in the general case, as any software that makes assumptions about the directory will probably crash. (My experience was that long filenames were often tolerated, but more than 127 files was almost always a crash).

 

New software that wants to read the directory in a more flexible manner may open the directory as IV0 rather than IF38 (IF0 was also legal for legacy) -- if it succeeds, you can expect long filenames and a potentially unlimited file count. If it fails, fall back on IF38 and expect the legacy behaviour.

 

https://docs.google....dit?usp=sharing


Edited by Tursi, Fri Nov 2, 2018 3:10 PM.


#361 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Sat Nov 3, 2018 1:19 PM

Tursi knows best. And come to think of it, you'll have trouble if you try to transfer a long filename to a real TI99. 



#362 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,414 posts
  • HarmlessLion
  • Location:BUR

Posted Sun Nov 4, 2018 2:34 PM

Oh, I use long filenames extensively, I just don't recommend letting Classic99 return them in the standard directory reads. Too much software was written with strong assumptions. :)

 

When I first did it I thought it was great, cause the standard TI BASIC directory program worked just fine. Then assembly software started crashing. ;) Having the different open mode lets programs that can deal with long filenames directly ask for them.



#363 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Wed Nov 14, 2018 10:47 PM

I'm excited about a change that is in the works. Currently the bottleneck in the compilation process is the compiler, which is an XB/Assembly hybrid program. I thought it would be too complex to convert it all to assembly, but I figured out how to modify it so that at least the main loops are totally in assembly. Although it is still an XB/Assembly hybrid, there is about a 5x improvement in speed. A program which used to take 60 seconds to compile now takes 12.

I am still in the testing stages at this point.



#364 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 849 posts
  • Location:The Great White North

Posted Thu Nov 15, 2018 7:00 AM

 A program which used to take 60 seconds to compile now takes 12.

I am still in the testing stages at this point.

 

I am curious. Is that compile time in Normal speed or overdrive?  Any idea how many lines are compiled in that time?

 

In normal speed I can't get Forth past 14 lines per second last time I checked. That is using the DSRLINK in Assembler and the wordlist search (linear linked list) in Assembler.



#365 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Thu Nov 15, 2018 9:47 PM

 

I am curious. Is that compile time in Normal speed or overdrive?  Any idea how many lines are compiled in that time?

 

In normal speed I can't get Forth past 14 lines per second last time I checked. That is using the DSRLINK in Assembler and the wordlist search (linear linked list) in Assembler.

This is compiling the BASIC program APERTURE. The modified compiler is now fully functional. Using CPU overdrive on an old Dell Optiplex 780, APERTURE is compiled in 14 seconds with the new version vs 89 seconds with the old version, so the speed increase is more than 6x to fully compile the program.

APERTURE has 506 lines. Running in normal speed compiling it takes 95 seconds which gives 5.3 lines per second. The 506 line XB merge file is read in two passes. The first time through no DATA statements are processed, and the second time through only DATA statements are processed. An assembly source code file of 2068 lines is created during the compilation process. (If you were running this on a real TI99 I think it would be slower; as far as I know Classic99 has faster disk access.)



#366 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 849 posts
  • Location:The Great White North

Posted Fri Nov 16, 2018 8:35 AM

Thanks for the info.  After asking you the question I stayed up and looked for any roadblocks in the Camel Forth compiler code and I got it up to 18 lines per second.

(EDIT: This was loading my tools file which has more empty lines.  I tried again this morning with my Assembler which is 252 lines in total and much denser text and I only got 12 lines per second.)

Added a video of the test process In the CAMEL99 thread:

 

http://atariage.com/...here/?p=4158571

 

 I removed a repeated call to a memory copy routine and put it inline in the parsing routine. Makes the kernel a bit bigger, but I had room.

 

So old fashioned Forth is still pretty good in the compiling department. But yes it is much slower waiting for my floppy drives to move their heads around the tracks than Classic99.  However when you consider that it compiles directly to memory, with no Assembly phase it makes for a pretty productive environment on the old TI-99.  

 

The negative is that it is not generating native code like your compiler. (unless you load the Forth Assembler and write assembly language)

 

I know the guy who runs MPE Forth in the U.K.  On modern systems, they claim their native code compiler can generate about 500KB of binary code per second, limited only by the disk drive speed!  Things have certainly changed in 40 years. 


Edited by TheBF, Fri Nov 16, 2018 9:23 AM.


#367 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Sat Nov 17, 2018 12:04 AM

Here is the newer compiler mentioned in the posts above. As near as I can tell the code created is exactly the same as the earlier version, only 5 to 6 times faster. Just replace COMPILER in the FRAPPATO package with this COMPILER.

 

The thing that made this fairly straightforward was the realization that you can open a file in XB and write lines to it, then an assembly routine can use the pointer at >833C to find the address of the PAB. The PAB has the address of the buffer, and with that information you can have the assembly routine write lines to the same file that was opened in XB. When done you can jump back to XB and write still more lines to the file. The disk system doesn't care whether the lines are created in XB or Assembly.

Attached Files


Edited by senior_falcon, Sat Nov 17, 2018 12:04 AM.


#368 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Sat Nov 17, 2018 9:31 AM

Here is a "real world" speed comparison between the old and new compilers. First I loaded APERTURE and made a change to it. At that point, to save the modified program, compile it, assemble it (using Asm994a), load it and save the resulting program in both EA5 and XB format it took:

35 seconds with the new version

110 seconds using the old compiler.

This is using Classic 99 and cpu overdrive on my 10 year old Dell Optiples 780. With a newer and faster computer you would be able to get almost instant feedback on the results of changes.



#369 RXB OFFLINE  

RXB

    River Patroller

  • 3,457 posts
  • Location:Vancouver, Washington, USA

Posted Sat Nov 17, 2018 6:41 PM

Brilliant! Love this examination of the way XB works.



#370 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Tue Dec 11, 2018 9:26 PM

I have just finished some modifications to the compiler that allow the programmer to use "nested arrays".

If you have:

10 DIM A(5,5,5)

20 DIM B(10,10)

and you want a line like this:

30 X=A(1,2,B(3,4))

previously you had to break it into two segments:

30 T=B(3,4)

40 X=A(1,2,T)

Now the compiler handles that automatically. The code works, but I want to be sure it is thoroughly tested before releasing.

 

While I am at it I will also add this capability:

10 A,B,C,D=7

Till now, I never knew that XB permitted this in a program line like this:

10 IF Z=3 THEN A,B,C,D=7

 

Going away on vacation, so it will be a while...


Edited by senior_falcon, Tue Dec 11, 2018 9:27 PM.


#371 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Wed Dec 26, 2018 10:57 AM

The compiler now supports nested arrays and multiple variables in a LET statement such as 10 A,B,C=7 and even nexted arrays in a LET statement like 10 A,B,C(1,(D,4))=7

I fixed a minor bug in printing a value in an array followed by a semicolon.

I am looking into adding speech. I have never done speech from assembly and to me, that section of the manual might as well be written in a combination of gaelic, swahili and mandarin. However, I am making progress.

 

(edit) I also added a tiny bit of error checking. The compiler now looks for decimal points in program lines. i.e.

10 X=3.14

This would give the message:

L10   NON INTEGER

and then you can go back to XB to fix the error. 

 

Before it would compile fine but the assembler would complain with a cryptic message.


Edited by senior_falcon, Wed Dec 26, 2018 1:32 PM.


#372 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,360 posts
  • Location:Hustisford, WI

Posted Wed Dec 26, 2018 11:50 AM

:D

How lucky are we to have this incredible stuff at our fingertips?!!

#373 HOME AUTOMATION OFFLINE  

HOME AUTOMATION

    Chopper Commander

  • 241 posts
  • Location:"trapped in interspace"

Posted Wed Dec 26, 2018 2:29 PM

I am looking into adding speech. I have never done speech from assembly and to me, that section of the manual might as well be written in a combination of gaelic, swahili and mandarin. However, I am making progress.

Hola senior f,

The pages on speech in my E/A MANUAL are "most worn" second only to; the page on "9901 interupts"(multiple error patterns). The operation and example are quite simple, however their presentation/explanation seems mythical... combining the two examples of different ways to address the system into one program was a needlessly complicating and a seemingly "dirty trick"... including use of a few new lines not described anywhere else in the book... and the comments...Never mind,... I'm sure you'll get it though, with enough patience! :twisted:

       Ha!(HOME AUTOMATION)


Edited by HOME AUTOMATION, Wed Dec 26, 2018 2:30 PM.


#374 LASooner OFFLINE  

LASooner

    Moonsweeper

  • 340 posts

Posted Wed Dec 26, 2018 5:17 PM

Great stuff Harry!



#375 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,326 posts
  • Location:Lansing, NY, USA

Posted Wed Dec 26, 2018 9:11 PM

Speech is starting to come together. This program now talks when compiled!

10 CALL SAY("HELLO")
20 GOTO 10
 
Now I have to make it handle things like CALL SAY("HELLO HOW ARE YOU") and spelling out words that aren't in the resident vocabulary.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users