Jump to content
IGNORED

xdt99: New TI 99 cross-development tools available


ralphb

Recommended Posts

In doubt, you can, of course, take the time. (I actually did that often to verify my results in MAME; with the Geneve this is even more comfortable with its real-time clock.) Build a nested loop that takes some seconds (e.g. a full inner loop (65536) and e.g. 20 iterations in an outer loop) with the command to be tested in the body, and the same loop without a command.

 

As for your shift question, I'd guess we have cycles 1, 2, 3, 4, 9, then C, and the two following them.

  • Like 1
Link to comment
Share on other sites

42 minutes ago, mizapf said:

take the time [...] As for your shift question, I'd guess we have cycles 1, 2, 3, 4, 9, then C, and the two following them.

Timing is a good (but time consuming) idea.  I'll do that.

 

For the cycles, if "9" and "9 + C" were different cycles, and say C=1, then the cycle for actually shifting the register would be missing.  So either the presentation is weird, or "9 + C" should read "10 + C", like in the other examples (see B, for example).

Link to comment
Share on other sites

I seem to remember having a discussion about clock cycles on the TI 99 before, but for the life of me I just cannot find it.  So please don't mind me asking again ...

 

How long is a "cycle" on the TI 99 to begin with?  Is it one "phi" or four "phis"?  For a 3 MHz clock, that'd be 1/3 us or 4/3 us, resp.?  4/3 us seems awfully long, as a typical multiplexed read cycles takes 2 us.

 

And do the 4 wait states for memory accesses already include the cost of the multiplexer?

  • Like 1
Link to comment
Share on other sites

One cycle is 333 ns (see the "TI-99/4A console and peripheral expansion system technical data", p. 15 (Figure C)).

 

The 4 wait states are created by the multiplexer circuitry. See the same figure, you have two memory operations, one with A15=1 and one with A15=0. After the six cycles, the memory access is complete.

 

 

 

 

  • Like 2
Link to comment
Share on other sites

That means that for the cases 8 and 16 where no shift operations are needed, one cycle is used. Or, in other words: The minimum cycle count is 1 (maybe to find out that there is no shift).

 

C=8 v C=16: C'=1

C<8: C'=8-C

C>8: C'=16-C

 

I'll have to check how I did it in MAME. It's already 10 years ago that I re-implemented the CPU, so I really don't remember.

  • Like 2
Link to comment
Share on other sites

I've released a new version of xdt99 with improvements to all tools, but focusing mostly on xas99 and xga99.

 

The new features are a relaxed syntax for xas99 and xga99 allowing arbitrary spaces in and between operands, a much improved cycle counter for xas99 with support for user-provided fine-tuning, pragmas for xas99 that influence assembly, warning categories for xas99 and the ability to suppress individual categories, and unused symbols for xga99.  Additionally, all tools now support color and offer a new environment variable to store default options for each tool.

 

To learn about these new features (and any future features), I've created a new file MANUAL.diff showing just the additions to the manual.  This way, an experienced user does not have to re-read the manual again and again.

 

The cycle counter should be very accurate and account for addresses and workspace.  Additionally, pragmas may provide hints for unknown target addresses such as *R1 or @>20(R2).

 

The relaxed syntax, activated with -r, makes no assumptions about spaces, but requires that all comments (except for * comments) be preceded by semicolon (;).

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

  • 2 months later...

I've just published a new release of xdt99.  While the changes to the tools are minor, I spent a lot of time on the Emacs mode and especially on the IntelliJ IDEA plugin, bringing the grammar up-to-date and implementing a lot of more features.

 

The idea plugin supports assembly (with related families supported by xas99), GPL, and TI BASIC and TI Extended BASIC.  There are also variants for the new relaxed syntax and BASIC with labels.

 

If you have no idea what IDEA is, or what the plugin does, or if you're happy with Notepad+, or do not like "bloaty" tools, please do have a look at the IDEA plugin manual with images that demonstrates the TI-related functionality.  Emacs fans might want to check out the Emacs mode, even though it is much more limited.

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

16 minutes ago, Asmusr said:

I'm getting this when I try to install the plugin.  [not compatible with version of IDE]

Yes, unfortunately I had to make some choices during development, which means you need at least version 2020.3 for the new plugin (not sure how that translates to those internal versions 212).  It also requires Java 11, but I guess that comes with the IDE?!

 

What version do you use currently?

Link to comment
Share on other sites

I get the same error in Community Edition IC-213.6461.79

Looks like a typo in the idea-version tag in idea-303.jar:META-INF/plugin.xml

<idea-version since-build="212.5457" until-build="212.*"/>

Edit: I changed it to until-build="214.*" and updated the jar and zip; now the IDE accepted the plugin.

Edited by PeteE
  • Like 1
Link to comment
Share on other sites

2 hours ago, PeteE said:

I get the same error in Community Edition IC-213.6461.79

Looks like a typo in the idea-version tag in idea-303.jar:META-INF/plugin.xml


<idea-version since-build="212.5457" until-build="212.*"/>

Edit: I changed it to until-build="214.*" and updated the jar and zip; now the IDE accepted the plugin.

Sorry, you're right, that is a bug.  I didn't even remember setting an upper version limit ...  I'll fix it tomorrow.

  • Like 2
Link to comment
Share on other sites

There are a few things that are still shown as errors even though they assemble correctly:

  • some operators like modulo (%) when used without spaces, e.g. gpu_prg_tmp%256
  • aorg without any argument (used to 'return' from xorg)
  • the cross-bank modifier x# and 'bank n'
  • alternative names for registers (probably difficult to fix without relaxing the syntax too much)

 

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

9 minutes ago, Asmusr said:
  • alternative names for registers (probably difficult to fix without relaxing the syntax too much)

Thanks for testing the plugin right away, please keep the issues coming.

 

But what do you mean by alternative registers?  A bunch of names EQU'ed to 0, ..., 15?  What exactly is the problem?

Link to comment
Share on other sites

5 minutes ago, ralphb said:

Thanks for testing the plugin right away, please keep the issues coming.

 

But what do you mean by alternative registers?  A bunch of names EQU'ed to 0, ..., 15?  What exactly is the problem?

tmp    equ  14
       li   tmp,2

<register> expected, got 'tmp'

 

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

4 hours ago, ralphb said:

Thanks for testing the plugin right away, please keep the issues coming.

  • Shift with R0 as a count is flagged as an error "<expression> expected, got R0" , for example:
    SLA R2,R0       ; shift shutter bit into carry

    I prefer to use R0 as a reminder that the register is used instead of a fixed count.

  • Single quotes around filenames, error: Xas99RTokenType.OP_FQUOTE expected, got '''

    COPY 'hero.asm'

     

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

On 2/2/2022 at 2:33 PM, ralphb said:

Sorry, you're right, that is a bug.  I didn't even remember setting an upper version limit ...  I'll fix it tomorrow.

I too am really enjoying this plugin!  Thank you very much!

 

I don't think this is a bug in the plugin.xml file as much as it's probably a bug in your build.gradle.

 

It looks like you are manually setting the correct value in plugin.xml and have not turned off the automatic run of the gradle task patchPluginXml.

 

https://plugins.jetbrains.com/docs/intellij/gradle-guide.html#patching-the-plugin-configuration-file

 

In your build.gradle file, the quickest fix is to add: intellij.updateSinceUntilBuild = false

perhaps something like this:

 

intellij {
  version = '2020.3.2'
  updateSinceUntilBuild = false
}

 

Thanks again! This is amazing!

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

4 hours ago, Antharian said:

In your build.gradle file, the quickest fix is to add: intellij.updateSinceUntilBuild = false

Thanks, that is very helpful.  I'm not really into Java, and I don't fully understand all those build systems, which IDEA thankfully handles all by itself.  I'll apply your fix.

  • Like 1
Link to comment
Share on other sites

I really like how unused labels are greyed out in the new version. And also how undefined labels are marked in red. :)

 

One more issue I found is that suggestions for the first operand don't seem to be working. For instance, I type

a    @

and press Ctrl-Space. It says "No suggestions". Whereas if I type:

a    r1,@

and press Ctrl-Space there are plenty of suggestions.

  • Thanks 1
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...