Jump to content
IGNORED

Research on Myarc Extended Basic II


retroclouds

Recommended Posts

UPDATE: 2020/07/02 07:05 UTC

 

This thread shall be used for documenting research on Myarc Extended Basic II.

 

Purpose

  • Create a version that can be used with SAMS and a RAM cartridge (superspace)
  • Target modern storage devices like CF7+/Nanopeb, TIPI or HRD4000B.
  • No longer rely on the unobtainable MEMEXP-1 128K/512K memory expansion.
  • Recreate assembly source code
     

 

Research originated on discussions found here: 

 

 

This post will be updated on a regular basis as more accurate information is collected.

 

BASIC variants

  • (1) Armadillo Basic on the TI-99/8
    • The new "standard" Basic interpreter on the TI-99/8. Only appeared on some early TI-99/8 prototypes.
    • The plan with Armadillo Basic was that it forms the "basis" for what is later known as Extended Basic II
      • Share as much code as possible between the two basics,
      • Modular setup: 
        • One idea was to keep core part of the basic interpreter in ram (statement dispatch table for functions), 
          where it can be modified by the extended basic interpreter startup sequence
        • Interface document exists that outlines the dispatch table
           
    • Possibility to load & save Extended Basic programs from DV80 files
    • 60K of free space for program code (170K) if 128K memory expansion installed
    • Certain parts rewritten in assembly language for optimized speed (e.g. screen handler)
    • Unknown if source code exists
    • Unknown if ROM dumps exist
       
  • (2) Extended Basic II on the TI-99/8
    • Extension of the Armadillo Basic found on early prototype
    • All later TI-99/8 preproduction units had Extended Basic II built-in, instead of Armadillo Basic
    • Unknown if source code exists
    • Confirmed ROM dumps, emulation in MESS/MAME possible.

 

  • (3) Myarc Extended Basic II on the TI-99/4a is basically (2), the Extended Basic found in the TI-99/8:
    • Written in Assembly language 
    • Versions known to exist: v2.10, v.2.11, v.2.12
      • Memory map changed to match TI-99/4a (+Myarc MEMEXP1) instead of TI-99/8
      • FREESPACE removed, memory allocation changes, comma instead of dash in list command, ...
      • Removed loading/saving extended basic programs from/to DV80 (at least in >v2.11)
    • Unclear if source code exists
       
  • (4) Myarc Extended Basic II for the Geneve
    • Written in Assembly language
    • Variant of (3)?  It’s the initial version of Extended Basic shipped with the Geneve
       
  • (5) Myarc Advanced Basic (ABASIC)
    • Written in Assembly language
    • Versions known to exist:
      • 4.04 (last version by Jim Uzzel)
      • 4.05 (~2013 by InsaneMultitasker, fixed assembly language parameter passing bug)
    • Based on (2)?
    • Source code exists, heavily commented
    • Backport to TI-99/4a probably difficult due to the XOP's used
       
  • (6) Basic on the Tomy Tutor
    • Variant of 99/8 Armadillo Basic 
    • Basic tokens compatible with TI Extended Basic
    • GPL involved, but no GROMS 
       
  • (7) TI-Basic on the 99/2
    • TI internal name “Ground Squirrel BASIC”
    • Developed outside of TI at a contracted university
    • Completely written in assembly language, no GPL involved. Very fast
    • Source code not related to Armadillo Basic (1) on the 99/8

 

Documents Armadillo Basic on the 99/8

 

There are actually quite a few documents floating around, created during a 2 years’ period (1982-1984):

  • ?/??/?? - 99/8 Basic / EXT. Basic interface specification
  • ?/??/?? - 99/8 Armadillo Basic specification
  • ?/??/?? - VDP RAM usage in Armadillo Basic
  • 5/26/82 - 99/8 The mapper and us
  • 9/30/82 - Armadillo Basic internal design
  • 3/23/83 - 99/8 Mapper specifications
  • 2/07/84 - 99/8 Bugs found after 7/34/84 release (TI998.BASLCP.BUG)
  • 2/07/84 - Usable XML’s, XOPs (TI998.BASLCP.DOC.ASSM)
  • 2/07/84 - Symbol table entry bits in use for the Armadillo (TI998.BASLCP.DOC.LINKBITS)
  • 2/07/84 - Interpreter variables V0.002 (9/10/82) (TI998.DOC.VARS)
  • 2/07/84 - PAD memory usage (TI998.DOC.PAD)

 

Myarc Extended Basic II on the TI—99/4a

 

Requirements

  • Myarc MEMEXP-1 128K (or 512K) memory expansion card required
    • Has 8K DSR in >4000-5fff (program loader, RAMDISK setup code, spooler?)
  • Myarc Extended Basic II cartridge required
    • It's confirmed that a 8K RAM cartridge (superspace) in >6000-7fff works fine.
  • Disk with Myarc Extended Basic II interpreter


Workings

  1. When selecting the '128K BYTE O.S.' cartridge option, the file loader in the MEMEXP-1 DSR space is triggered
  2. The whole process of loading the Extended Basic II interpreter into the appropriate MEMEXP-1 memory pages seems to be handled from inside DSR space.
  3. In the cartridge space the memory management routines required by the interpreter are stored (required for banking the appropriate MEMEXP-1 pages)
    The code at >6030-7fff seems to be put there are the very end when XBII is loaded into memory. Could be this is part of XBII initialisation itself?
  4. When quitting XBII by using "BYE" command the cartridge space >6030-7fff is cleared with >00, only the cartridge header is present.
  5. While XBII runs it writes to the cartridge space >6000-61ff (clarify exact memory addresses). This is probably to compensate the fact that the 99/4a only has 256 scratchpad where 99/8 has 1K.

 

Cartridge space:

6000-602F   Cartridge header '128K BYTE O.S.'
6030-612F   Written to by XBII while running               
6130-7fff   Appears to be static code, haven't seen any writes here so far

 

Unclarified behaviour

  • The DSR space >4000 is briefly activated every 5-10 seconds while XBII is idling in command mode. This does not happen when a program is running (e.g. 10 GOTO 10). Seems to be a background task:
    • Perhaps the access to the DSR rom space is related to the print buffering code checking to see if anything in the buffer on interrupts?

 

  • Like 9
  • Thanks 1
Link to comment
Share on other sites

Yesterday evening I downloaded as much information as I could find on the TI-99/8 armadillo Basic (XB II).

There are actually quite a few documents floating around, created during a 2 years’ period (1982-1984)

  • ?/??/?? - 99/8 Basic / EXT. Basic interface specification
  • ?/??/?? - 99/8 Armadillo Basic specification
  • ?/??/?? - VDP RAM usage in Armadillo Basic
  • 5/26/82 - 99/8 The mapper and us
  • 9/30/82 - Armadillo Basic internal design
  • 3/23/83 - 99/8 Mapper specifications
  • 2/07/84 - 99/8 Bugs found after 7/34/84 release (TI998.BASLCP.BUG)
  • 2/07/84 - Usable XML’s, XOPs (TI998.BASLCP.DOC.ASSM)
  • 2/07/84 - Symbol table entry bits in use for the Armadillo (TI998.BASLCP.DOC.LINKBITS)
  • 2/07/84 - Interpreter variables V0.002 (9/10/82) (TI998.DOC.VARS)
  • 2/07/84 - PAD memory usage (TI998.DOC.PAD)

 

This does bring a whole bunch of questions:

 

1. ARMADILLO BASIC (XBII on the 99/8)

  • How many XB II versions existed on the 99/8 ?
     
  • The XB II on the 99/8 has substantial parts rewritten from GPL to assembly language, but certainly not everything
    • I did find source code for the 99/8 GPL interpreter itself, but not for XB II. Is it available somewhere?
    • Did anyone ever try to do a speed comparison between XB II on the 99/8 and Myarc XB II on the TI-99/4a?
       
  • According to the Armadillo Basic specification, the goal was to make XB II a true extension of the standard basic interpreter instead of having a separater interpreter that shared only a few routines.
    • Does the 99/8 also have a “standard” TI Basic like there was on the TI-99/4a ? From the 99/8 videos I’ve seen so far I only saw XBII
       
  • The Armadillo Basic also does heavily rely on XOP’s, as does ABASIC on the Geneve (3)

 

2. MYARC XB II on the TI-99/4A

  • Is Myarc XB II on the TI-99/4a really all assembly language or are there still GPL parts involved
    • Could be that improved speed impression is due to the new screen handler that support faster scrolling (e.g. when listing source code)
    • Is the source code for Myarc XB II available? At this time it is not confirmed that it still exists.

 

3. ABASIC on the Geneve

  • Source code available (need to check what version) 
    • Started as variant of (1) or rather (2) ?
      • Does the geneve memory architecture more resembles the 99/8 memory architecture ?
         

4. BASIC on the TUTOR

  • I believe the Tutor Basic was pretty much the 99/8 Armadillo Basic (1).
    However, here I read that it’s in fact GPL (needs to be confirmed)

 

Conclusion:

  • Backport from Armadillo Basic on the 99/8 to Myarc XB II on the 99/4a probably involved:
    • Rewriting XOP code
    • Rework scratch PAD usage from 1K on 99/8 to 256 bytes on the 99/4a.
      This probably explains the memory writes to the cartridge space >6000-61ff, it’s used as a PAD extension.
    • Fully rewrite memory handling/paging to make it match the Memory Expansion MEXP-1 
    • PAB handling (PAB stored in VDP instead of CPU RAM to make it compatible with the stock Disk Controller
    • Rewrite keyboard scan to make it work on the 99/4a 
       
  • ABASIC on the Geneve more likely variant of Armadillo Basic on the 99/8 instead of XB II on the 99/4a.

 

There is a lot of speculation in all this, so more reseach required for confirming. As usual feedback welcome.

Edited by retroclouds
PAD usage, typos corrected, PAB handling
  • Like 4
Link to comment
Share on other sites

this might help evaluating some of the systems:

here is a .zip of 99/8, 99/2, Geneve and Tomy I once made in MESSui 221 (a variant made of MAME with top menu). included is all the manuals and software I have found for the systems. just click the batch files and go. requires min i5 for the 99/8 and 99/2 is only 4k tape based version at this time. 99-8,-2, Geneve & Tomy.zip

  • Like 2
Link to comment
Share on other sites

On 6/30/2020 at 2:37 AM, retroclouds said:

. ABASIC on the Geneve

  • Source code available (need to check what version) 

Version 4.04 was the last version Jim Uzzell released.  Source is available.  I fixed the assembly language parameter passing bug ~2013 as version 4.05.  The source code is heavily commented so you may find hints by reading it. 

  • Like 1
Link to comment
Share on other sites

Myarc XB-II on the Geneve is definiely a derivative of XB-II for the TI, using the 2.12 code base. It is also somewhat buggier than the TI version, as some programs that work on the TI crash on the Geneve version--and vice versa. I did some extensive testing of this when I first received my Geneve in late 1987, as one of my friends in the Errorfree group at that time (Manfred Kraus) had the TI version, and we were both curious about it.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, retroclouds said:

I know they are all closely related, but what about ABASIC on the Geneve.
Is it also a derivate of XB II on the TI99-4a or is it a direct port of Armadillo Basic on the 99/8?

 

If you are talking about the Advanced Basic developed from the source from the MDOS buyout, I would say it was a derivative from some port, probably Myarc XBII with new enhancements, and modifications to code to use MDOS XOP's where necessary, especially for video. All file access, video, and keyboard went through the XOP's.  Not sure on details on the level of dependency for math/floating point.  Memory management routines from the XOP's would be heavily used as well.

 

Myself, I never dug into the code.  Jim Uzzell probably was the most familiar with the code.

 

If someone wanted to ever develop something for the SAMS, that is likely the only known, commented source code base to work from I am aware.  Conversion back to something suitable for the TI-99/4A would be a major undertaking removing the pieces the 4A could not support such as 9938 features and developing a new page mapping scheme to be compatible with the SAMS.

 

I'm still hoping Lou can come up with something, only time will tell to get us to the Myarc XBII codebase.

 

Beery

 

Edited by BeeryMiller
  • Like 2
Link to comment
Share on other sites

On 7/2/2020 at 5:57 PM, BeeryMiller said:

If you are talking about the Advanced Basic developed from the source from the MDOS buyout, I would say it was a derivative from some port, probably Myarc XBII with new enhancements, and modifications to code to use MDOS XOP's where necessary, especially for video. All file access, video, and keyboard went through the XOP's.  Not sure on details on the level of dependency for math/floating point.  Memory management routines from the XOP's would be heavily used as well.

 

Myself, I never dug into the code.  Jim Uzzell probably was the most familiar with the code.

 

If someone wanted to ever develop something for the SAMS, that is likely the only known, commented source code base to work from I am aware.  Conversion back to something suitable for the TI-99/4A would be a major undertaking removing the pieces the 4A could not support such as 9938 features and developing a new page mapping scheme to be compatible with the SAMS.

 

I'm still hoping Lou can come up with something, only time will tell to get us to the Myarc XBII codebase.

 

Beery

 

 

At this time I see 2 possibilities for getting Myarc XB II to run on the TI-99/4a:

  • Use the existing Myarc XB II with the 128K OS.  
    • Requirements:
      • SAMS, FGROM or superspace cart, floppy drive
    • Work involved:
      • disassemble cartridge image, get to understand everthing, create new image
    • Advantage:
      • Could be sufficient to replace the memory handling functions located in cartridge space
    • Disadvantage:
      • No assembly source, reduced feature set compared to ABASIC, more bugs?
      • Doing changes or bugfixes to XB II would be very hard to do, if not impossible
         
  • Backport ABASIC 4.05 to the TI-99/4a
    • Requirements:
      • SAMS, FGROM or superspace cart, F18a?
    • Work involved:
      • Get to understand inner workings
      • Backport ABASIC to the TI-99/4a
    • Advantage:
      • Source code available, most recent version 4.05 could be used as starting point for backport
      • Changes, new features and bugfixes to XBII possible
    • Disadvantage:
      • Iron out architecture differences between the 9640 and TI-99/4a
        • MDOS XOPs (scanned source code and counted 61 XOP calls)
        • PAB handling
        • CRU usage
        • Rework memory handling / paging
        • Rewrite 9938 VDP code (replace with F18a code?) 
  • Like 1
Link to comment
Share on other sites

Yesterday, I looked at the Armadillo Basic document specifying the statement dispatch table with equates for the basic tokens.

Then I compared with the ABASIC (3.0) source code.

 

I can confirm that for the most part the token labels and token values match with the document.

There were a few tokens that had a changed token label, but I presume they still do the same functionality (if I understand the abbreviation in the label name correctly).

 

Have to recheck and confirm, but I think there were only 3 token values that were unused in Armadillo Basic and are allocated in ABASIC.

 

Link to comment
Share on other sites

3 hours ago, Asmusr said:

I would start with that option because it sounds doable within a reasonable time frame.

 

That what I also thought in the beginning as well. Now I'm not so sure anymore. 

Having a good documented assembly source is a very valuable tool.

 

At this time I'm still trying to better understand how well the Armadillo Basic internal design document matches with the ABASIC assembly source.

Also the source code is really well documented, and it looks that it's pretty modular as well. 
Perhaps starting from the assembly source is not as bad as it sounds, but guess it's still too early to tell. 

 

EDIT: I stand corrected, the use of the many MDOS XOP calls (as Beery already pointed out), makes it impossible to backport ABASIC to the TI-99/4a

  • Sad 1
Link to comment
Share on other sites

Today I compared the value stack as described in the Armadillo Basic Internal design document with the value stack definition in the ABASIC assembly source. That part seems to have been completely reworked by Myarc and does not match the Armadillo Basic spec. 

Link to comment
Share on other sites

I also looked at the various XOP's used in the ABASIC source.

The XOP's that get called in the source code are of following categories:

 

FIVE
SIX
SEVEN
EIGHT
NINE
TEN

 

Comparing with what Ninerpedia says: https://www.ninerpedia.org/wiki/MDOS_XOP_Definitions

 

5 Keyboard
6 Video display
7 Memory Management
8 Device Operation
9 Utility functions
10 Mathematical function

 

So it seems that MDOS OS calls are used to its full potential, throughout the ABASIC source code.

 

Conclusion

I can say -that unless you also backport most of MDOS to the TI-99/4a as some kind of compatibility layer-, this makes it impossible to run ABASIC on the TI-99/4a. Backporting all used MDOS calls, including argument compatibility is certainly not for the faint of heart.  That's a task that would require multiple years.

 

So I guess this rules out ABASIC as starting point for XBII port on the TI-99/4a.
That doesn't mean all is lost though. I'm quite sure that certain part of that code is used on the TI-99/4a as well.

 

Guess it's back to square 1:

  • Look at Myarc XBII that runs with 128K OS. 
  • Do some comparisons with Armadillo Basic internal design document
  • Do some disassembly, diagnose what memory is used by using MAME debugger, etc.
  • Sad 1
Link to comment
Share on other sites

Years ago I  got a hold of the Abasic and some disassembly MYXBII source to see what could be added to RXB commands.

Abasic and MYXBII are truly Geneve only products it was built for the Geneve and designed for the Geneve processor.

I saw they used different symbol table then XB in some places for interpreter making it very hard to be backwards compatible.

XOPs were very different, and some XB syntax was very very different.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

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