+mizapf Posted November 12, 2021 Share Posted November 12, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 12, 2021 Author Share Posted November 12, 2021 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). Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 19, 2021 Author Share Posted November 19, 2021 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? 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted November 19, 2021 Share Posted November 19, 2021 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. 2 Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 19, 2021 Author Share Posted November 19, 2021 OK, thanks! So it's one "phi" and the wait states are the multiplexer. ? 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 20, 2021 Author Share Posted November 20, 2021 I've just finished timing LDCR, STCR, and the shift operations. For STCR, it turns out that the datasheet is correct but the data manual isn't: There are four cases: <8, 8, >8 and <16, and 16. The data manual only lists 2 cases. 3 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted November 20, 2021 Share Posted November 20, 2021 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. 2 Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 20, 2021 Author Share Posted November 20, 2021 13 minutes ago, mizapf said: C=8 v C=16: C'=1 C<8: C'=8-C C>8: C'=16-C Yes, exactly. Which also means the formulas in the Data Manual are garbled. 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted November 25, 2021 Author Share Posted November 25, 2021 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 (;). 2 2 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 25, 2021 Share Posted November 25, 2021 Thanks, the new features will come in very handy for the stuff I'm currently working on. ? Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 1, 2022 Author Share Posted February 1, 2022 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. 4 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 Fantastic. That has been on my wish list for a long time. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 I'm getting this when I try to install the plugin. 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 2, 2022 Author Share Posted February 2, 2022 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? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 (edited) 1 hour ago, ralphb said: What version do you use currently? I'm using 2021.3 Ultimate Edition. I read the error message as if my version is too new. Edited February 2, 2022 by Asmusr Quote Link to comment Share on other sites More sharing options...
PeteE Posted February 2, 2022 Share Posted February 2, 2022 (edited) 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 February 2, 2022 by PeteE 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 1 hour ago, PeteE said: I changed it to until-build="214.*" and updated the jar and zip; now the IDE accepted the plugin. Thanks. I did the same. Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 2, 2022 Author Share Posted February 2, 2022 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. 2 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 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) 3 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 2, 2022 Author Share Posted February 2, 2022 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? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 2, 2022 Share Posted February 2, 2022 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' 1 1 Quote Link to comment Share on other sites More sharing options...
PeteE Posted February 3, 2022 Share Posted February 3, 2022 (edited) 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 February 3, 2022 by PeteE 3 1 Quote Link to comment Share on other sites More sharing options...
Antharian Posted February 4, 2022 Share Posted February 4, 2022 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! 3 1 Quote Link to comment Share on other sites More sharing options...
ralphb Posted February 4, 2022 Author Share Posted February 4, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted February 4, 2022 Share Posted February 4, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.