Jump to content
IGNORED

xdt99: New TI 99 cross-development tools available


ralphb
 Share

Recommended Posts

Posted (edited)
1 hour ago, pixelpedant said:

That having said, one issue I experienced is just that as written (at least on Windows and Python 3.11), it was necessary to change all the string conversion in XBAS99.PY to Latin1 rather than ASCII, as my program uses the full range of characters available to (i.e., which can be typed under) TI BASIC.  Which is to say, 127-159 and 176-198 inclusive.

Thanks for the kind feedback, I'm really glad you find the tool useful.  Regarding Latin1, do you CALL CHAR characters above 127 to their corresponding Latin1 pattern?  If so, it's probably a good idea to make the input encoding a parameter.  (The other tools already have such a parameter for the output encoding.)

 

EDIT: Rereading your post, are you using Latin1 char codes as part of the program, i.e., as variable names?  Or only within strings?

 

BTW, have you tested the IDEA plugin that's part of xdt99?  While you need to install the rather heavy Jetbrains IDEA Community Edition IDE, the plugin has some advanced editing features, like renaming variables or line numbers consistently, finding all occurrences, finding the definition of a symbol (first occurrence in the case of BASIC), showing unused and undefined variables, and syntax highlighting.

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

1 hour ago, ralphb said:

Thanks for the kind feedback, I'm really glad you find the tool useful.  Regarding Latin1, do you CALL CHAR characters above 127 to their corresponding Latin1 pattern?  If so, it's probably a good idea to make the input encoding a parameter.

Well, CALL CHAR uses a numeric value as its character value, so this does originate as a character with a value greater than 127 in the DATA statements from which the value and ensuing pattern string is read, but ends up as a numeric value as far as CALL CHAR is concerned.  In any case, all instances of characters greater than 127 (of which there are a great many) are now being successfully read from source and written to disk as desired, so I'm happy.  XBAS99.PY is having no trouble with lines like the following, with all the string .encode and .decode methods just using Latin1 by default (and my editor set to Latin1 likewise):

 

15 DATA "¹RLCONSPIRING¹SMTO DESCEND¸h821928C492462831i9146482184126289¹RNTO CONQUER¹SOIN THE ENDÁBBA¾!9B^!6DZ¸jB2096A92AC219A44k4299244242249942"
16 DATA "¾ =;¼>7ÁBBH¾^8B^^5DZ]7=G>UÁNBAGBH¹KIHELL@S HEART°I°G°F°C³D¸l914E5045A20A7289m924C419205649229n894658A4251A6291oB25C42D684749A01"

 

I shall perhaps have to try the IDEA option, in the future.  This project is so built around interpreted data (housed in DATA statements, as above), that conventional code editing tools aren't as useful as they might be, but perhaps when next I have a saner project on my hands. 

Link to comment
Share on other sites

I'd like to chime in here to second PixelPedant's sentiments.

 

I'm now using the XDT99 assembler and IDEA plugin for my AL project. It's a total game-changer in terms of coding efficiency and enjoyment. Like many, I love coding to the limitations of the TI hardware to see what can be accomplished, etc., but I've "done my time" back in the 80's in terms of ever wanting to actually write/debug code using the console itself. That's a whole level of pain that no amount of nostalgia can overcome. :)

 

So many thanks for putting this amazing project together. My code/assemble/load/run cycle is now a few seconds vs. even the streamlined/semi-automated cycle required when I was using compiled XB256. And I'm able to develop completely natively on my M2 mac (excepting classic99_64.exe which runs under WINE).

 

One thing I wish IDEA had was a simple left-side nav pane with the just the labels listed so I could navigate quickly by clicking on them. Perhaps it's "not a thing" in the IDEA world.

 

 

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

Posted (edited)
7 hours ago, pixelpedant said:
15 DATA "¹RLCONSPIRING¹SMTO DESCEND¸h821928C492462831i9146482184126289¹RNTO CONQUER¹SOIN THE ENDÁBBA¾!9B^!6DZ¸jB2096A92AC219A44k4299244242249942"
16 DATA "¾ =;¼>7ÁBBH¾^8B^^5DZ]7=G>UÁNBAGBH¹KIHELL@S HEART°I°G°F°C³D¸l914E5045A20A7289m924C419205649229n894658A4251A6291oB25C42D684749A01"

Thanks for the clarification.  There's an alternative to the latin1 encoding: How useful would it be for you (and others) if you could insert arbitrary chars by their code point the way Python does it?  For example, you could write

 

10 PRINT "Copyright \xa7 pixelpedant"

 

and the \xa7 would be replaced by the char whose ORD is >A7 in the generated program.  This would work for quoted and unquoted strings.

 

I thought about implementing this before, but it doesn't really offer any advantages for (GPL) assembly, where you can mix hex strings and text anyway.

Edited by ralphb
Link to comment
Share on other sites

56 minutes ago, retrodroid said:

I'd like to chime in here to second PixelPedant's sentiments.

[...]

One thing I wish IDEA had was a simple left-side nav pane with the just the labels listed so I could navigate quickly by clicking on them. Perhaps it's "not a thing" in the IDEA world.

Thank you very much.  I don't think that IDEA offers this symbol list out of the box.  I guess using Navigation / Symbol ... to quickly navigate to a symbol is the next best thing (after changing the Ctrl-Shift-Alt modifier to something sane 😉).

Link to comment
Share on other sites

8 minutes ago, ralphb said:

Thank you very much.  I don't think that IDEA offers this symbol list out of the box.  I guess using Navigation / Symbol ... to quickly navigate to a symbol is the next best thing (after changing the Ctrl-Shift-Alt modifier to something sane 😉).

The Structure panel works like that for Java. Perhaps it's possible to write support code for the Structure panel?

  • Like 3
Link to comment
Share on other sites

10 minutes ago, Asmusr said:

The Structure panel works like that for Java. Perhaps it's possible to write support code for the Structure panel?

Oh, I didn't know that tool window.  Yes, that might be a good idea,  I'll see if I can implement it.

  • Like 2
Link to comment
Share on other sites

3 hours ago, ralphb said:

Thanks for the clarification.  There's an alternative to the latin1 encoding: How useful would it be for you (and others) if you could insert arbitrary chars by their code point the way Python does it?  For example, you could write

 

10 PRINT "Copyright \xa7 pixelpedant"

 

and the \xa7 would be replaced by the char whose ORD is >A7 in the generated program.  This would work for quoted and unquoted strings.

I think that would make a great deal of sense.  I'd considered writing a script to do this on my own behalf, actually, just because it would arguably result in more readable DATA statements.  Since the character is ultimately not being used for the sake of the character itself in this case - it is being used for its numeric value.  And so the Latin1 representation is ultimately meaningless, and a numeric representation, whether hex or decimal, would be more useful, in general. 

Link to comment
Share on other sites

7 hours ago, ralphb said:

Thank you very much.  I don't think that IDEA offers this symbol list out of the box.  I guess using Navigation / Symbol ... to quickly navigate to a symbol is the next best thing (after changing the Ctrl-Shift-Alt modifier to something sane 😉).

Upon further review it seems the "Bookmarks" panel is quite useful for navigating between key sections, though it requires managing the bookmarks yourself.

  • Like 1
Link to comment
Share on other sites

I've just pushed the new xbas99 version with support for char escape codes.  You can find all the information here.

 

I wasn't sure if incorrect escape codes should be interpreted verbatim, as that would improve backwards compatibility.  But on the other hand the code (and I think the logic) is much simpler without that.  You can still disable the new feature (and any future ones) with the new strict option -s.

 

  • Like 3
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...
 Share

  • Recently Browsing   0 members

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