Jump to content

Recommended Posts

IDE for developing in TI99 Assembler on the PC (Windows)
(using NotePad++ Editor, xdt99 Cross-Assembler and MAME Emulator)

 

https://github.com/miriki/TI-xdt99-IDE/

 

Hi, all!

 

A few may have noticed: In an xdt99 thread I have published a Batch for DOS that shortens a lot of typing work when developing software. After years of abstinence from the TI99 I actually remembered the "good old days" developing tools and libraries again and tried to recall what I was doing those days. Well, 35 or so years...

 

Firing up the MAME emulator, using TI99_4ev as machine, a cartridge with Editor/Assembler inserted and the needed disk in DSK1 mounted I started typing a few lines while reading through a bunch of books and forum articles. Hmmm... A PC keyboard and the function keys of the TI99, two worlds collide. Yes, the editor _was_ a very good one, at least that days. But nowadays I really, really prefer the comfort of NotePad++ or at least any other GUI based editor.

 

Then I've read about the one or another Cross-Assembler to develop in Windows and using the output to mount within MAME. Almost right from the beginning I got stuck with xdt99, a collection of not only a cross-assembler, but other tools like a "disk creation", too. An integration into "IntelliJ IDEA" sounded good, but.... Hmmm... Maybe I have not digged deep enough, but there is only the editor used for syntax highlighting, isn't it?

 

Putting things together: A batch for DOS (Windows, Microsoft, sorry...) was created that enabled the workflow from

  • editing the Assembler source code
  • assembling the source code into object code
  • creating a disk which contains the object file
  • starting an Emulator with this disk mounted
  • plus a few more tasks...

 

To be honest: I don't like DOS batches with more than, let's say, 25 or so lines. The syntax is ugly and the CLI commands are far from comfortable - not comparable with a high level language. Changing default values is a pain, (re)storing

user settings a tremendous effort and doing all with user parameters results in a jungle of % characters shattered across the lines. So I used that batch only as a sketch for a "real" project: An IDE for those tools written in a high level language. I decided on C# (VB.Net would have been the alternative), because it is the preferred language right now in our company. Training...

 

If anybody would like to have a look at it: I just published that project on GitHub. That was kind of training, too. We use Azure DevOps in our company and I have to get familiar with those cloud based team thingy. So hopefully I published correctly - it is my first published project over there.

 

https://github.com/miriki/TI-xdt99-IDE/

This is the main page of the project. There is a README, but empty as of now. You will find a subfolder "TI xdt99 IDE" though...

 

There is a subfolder "snap" which contains a few screenshots of the published project:

  • Settings_Xdt.png shows the settings to include the tools from the xdt99 package.
  • Settings_Mame.png shows parameters for the emulator, including configuration of the peripherals etc.
  • Settings_Ide.png shows the standard working area with buttons to start actions and checkboxes to set options.
  • Output_CommandStack.png shows the list of calls to external tools like the editor, assembler etc.
  • Output_Standard.png shows the standard output of the last command, for example the directory of the disk.
  • Output_Errors.png shows the error output of the last command, if there is any.
  • Emulator_AutoStart.png shows the XB output from DSK1.LOAD if "catalog" and "autostart" is checked.
  • Output_Result.png shows the loaded and started demo program I was just working on.

 

Another subfolder "publish" contains a "setup.exe" that should install the IDE. I'd like to get feedback, if that thing runs without any problems.

 

But what has to be done? Well... Perhaps it is best to show my setup:

 

E:\TI99
  mame64.exe
  >roms
    ti99_*.zip
  >hash
    ti99_cart.xml (thanks again, mizapf!)
  >cart
    editass.zip
    minimem.zip
    exbasic.zip
  >disk
    *.dsk
  >hard
    *.chd

 

This should be enough to start MAME using e.g. ti99_4ev as machine. Try it...

  • mame64 ti99_4a

 

If successful, try inserting a cartride:

  • mame64 ti99_4a -gromport single -cart exbasic

 

If successful, try connecting a peb with a hfdc in slot 8, a disk drive connected and a disk inserted:

  • mame64 ti99_4a -gromport single -cart exbasic -ioport peb -ioport:peb:slot8 hfdc -ioport:peb:slot8:hfdc:f1 525dd -flop1 disk/flopdsk1.dsk

 

whew...

 

After the first start of MAME there will be a few more subdirs like cfg, nvram etc. You might like to start MAME with -createconfig and edit the output mame.ini to suit your needs. I added cart and cart2 subdirs to the roms path, disabled the info screen at startup and the like...

 

Then I added a subdir
  >xdt99
    xas99.py
    xdm99.py
    xbas99.py
  >lib
    vdptools.a99
  >projects
    >gmode
      gmode1.a99 etc.

 

The "lib" folder contains a "vdptools.a99" file right now. There are only a few routines to avoid "BLWP VSBW" etc. in it. The "projects" folder contains the, as you already might have guessed, projects I am working on - for example a "gmode" subfolder. And in the "gmode" folder there are gmode1.a99, tmode.a99, mulcol.a99 and bitmap.a99.

 

With this setup the settings on the XDT and MAME tabs should be self explanatory, kind of... The right hand side shows extensions for the filenames. For example the source "gmode1" gets expanded to "gmode1.a99" for the editor, is compiled into "gmode1.obj" and will become "GMODE1O" when copied to the TI disk.

 

You may change the settings on the MAME tab and can use the IDE purely as a frontend, if you like. The "run" button will start the emulator without fiddling around with an assembler or anything else.

 

BTW: Settings are loaded at startup of the IDE and saved when the IDE is closed or any external program is called.

 

The IDE tab is the "all singing, all dancing" desktop for your development. The left box lists all subdirs aka projects, the right box lists the source files in that (selected) project. The selection is shown additionally in the two textboxes in the upper right (for later extensions).

 

The "edit" button starts the editor, the "assemble" buttons starts the xdt99 cross assembler. It creates the object, image and rpk files, if checked. If "all" is checked, not only the actual selected source but all within the project will be assembled. The "disk" button creates the disk to be mounted for the emulator. It copies the source, list, object and image files, if checked. Again: For "all", if checked. Additionally it can create a DSK1.LOAD to show the contents of the disk and / or load and run the object file of the selected source. The "emulator" button starts the MAME emulator with the configured devices. If set up properly you might select "TI Extended Basic" from the master selection, get the disk contents displayed and after "please wait..." the compiled program should start.

 

The "ADE" button is a shortcut: (A)ssembler, (D)iskManager and (E)mulator - all in one shot. So after editing / saving the source the test only needs 1) click on "ADE" button, 2) any key at the master title screen 3) "2" for XB, then wait... and enjoy!

 

The menu at the top has no function as of now. The status bar at the bottoms shows info about running external tools to the left, "idle" to the right otherwise.

 

Have fun!

Michael

 

  • Like 8

Share this post


Link to post
Share on other sites

You've got support for the TI-99/4A systems.  Is there support for the Geneve 9640 system?

 

Beery

  • Like 1

Share this post


Link to post
Share on other sites
21 minutes ago, BeeryMiller said:

Is there support for the Geneve 9640 system?

Hmmm... I have to admit: I have absolutely no clue. ;-)

I don't have _any_ experience with the Geneve at all. But it _may_ be possible, theoretically.

 

The IDE starts an editor with parameters, e.g. the source filename. You may choose another editor instead of NotePad++, of course. This is the Windows side, no Geneve involved.

 

Then the IDE starts an assembler, again with parameters for input, output and other options. Again: Windows side. I have the IDE designed for use with the xdt99, because it has the tools I thought were needed for my needs. But if the functionality can be achieved by another tool (or other tools) that can be set up at the settings tab.

 

The xdt99 cross-assembler produces object (EA3) and image (EA5) output. If the Geneve can use those, then it should be possible. But still yet: Windows side.

 

Next step within the IDE is the creation of the disk (disk image file, to be a bit more accurate). Still: Windows side, but... The disk is created in a format that can be read by MAME and... uhm... the other one... V9T9? Not sure about that right now. The files (object, image etc.) are transferred from their Windows format as DIS/VAR80, DIS/FIX80, PROGRAM etc., according to their designation, to the disk. That's the TI99 side. So after this step there is _one_ file stored in the Windows filesystem that contains one or more files in the TI99 filesystem.

 

So if the Geneve reads the same files from a disk in the same format as the 99, then... You just have to find a way to mount the *.dsk files at the Geneve side (emulator) or write it to a real floppy. And, as much as I want to, I can't help with that.

 

Michael

 

Share this post


Link to post
Share on other sites

I think most of the construct for the TI-99/4A and for a Geneve would pretty much be the same.  They would use the same assembler, and would still use Notepad.

 

The output could still be EA5 output, but with the Geneve, the starting point for any program would be at >0400 for MDOS mode.  It would still be the same for the GPL (i.e. TI-99/4A) side of things.

 

Things would still be transferred to the DSK file system.

 

I would be interested in this bit of extra support, as I am sure a couple of others that would be as it would allow things to be migrated to GitHub which I think your setup would allow???

 

Beery

 

  • Like 1

Share this post


Link to post
Share on other sites
41 minutes ago, BeeryMiller said:

I would be interested in this bit of extra support,

So, as far as I understand: All (currently pre-defined) tools could be used as is, only the cross-assembler itself has to be exchanged. The disk manager to create the disk image and copy / convert the files could still be used from the xdt99 package, like the Basic converter, too.

 

I don't know of a cross assembler for the Geneve, but the xdt99 calls itself "a TMS9900 cross-assembler" and a quick check of the docs didn't reveal any options for creating Geneve compatible output. But if anybody could name a Geneve compatible cross assembler this would be the place to set it up, the XDT tab of the IDE:

622007858_AssemblertoadaptforGeneve.thumb.gif.6eede6e98f900aeba6b231b5c53124f6.gif

 

And please keep in mind: This is a "user" setting that can be changed by the user at any time and will be saved in the user options locally.

 

If somebody replaces one or more of the tools successfully I should consider changing the headline into something more general. ;-)

 

Michael

 

Share this post


Link to post
Share on other sites

The assembler itself that takes the source code and creates the EA3 object file would still be the same.

 

The EA5 file creation would be different with the file header needing to be a bit different.  I would not think it would be anything substantial.

 

Beery

 

Share this post


Link to post
Share on other sites

I just went and tried to run the setup.exe file in the publish folder.  I got an error indicating "Cannot download the application.  The application is missing required files.  Contact application vendor for assistance."

 

I am attaching the log file it created.  Is there things I need to install first?  At this point, I do not have xdt99 installed.

 

Beery

 

KF3A7E0L.log

Share this post


Link to post
Share on other sites
4 hours ago, BeeryMiller said:

I am attaching the log file it created.

Is there things I need to install first?

At this point, I do not have xdt99 installed.

Thank you very much for the logfile. I have checked it and wasn't sure at first sight, but after digging a bit deeper...

 

The problem seems to be that the installation routine tries to download (and install) .NET framework 4.8 and fails at this step. I have checked my setup:

1603833767_VSpublishcomponents.thumb.png.2447c7bd5fade20825f05c9129c2c5ca.png

 

In the "publish" (see left menu "Veröffentlichen") properties section via "required components..." (see right button "Erforderliche Komponenten...") the .NET framework 4.8 is checked and the option "download from component creator" (see option "Erforderliche ... Komponentenherstellers ...") is checked - that'd be Microsoft. Hmmm... Looks to me as if the download link to their download site is broken.

 

The alternative (2nd option) would be to store a copy for downloading at the (my) GitHub repository, but I'm not sure how and, even more important, if I am allowed to do that. And with the 3rd option I'd have to specify an alternative download link. I'll have a closer look at this problem.

 

And: No, you do not need to have xdt99 installed at this point. The IDE is "standalone" unless you try to start any external applications like the assembler, emulator etc. via the buttons. Up until that point the IDE should start without any error.

 

Thanks for your feedback!

 

Michael

 

Share this post


Link to post
Share on other sites
52 minutes ago, Michael Rittweger said:

I'll have a closer look at this problem.

Argh... My first attempt with that "ClickOnce" installer and after getting your response I found:

stackoverflow.com: will clickonce be ported to net core 3 as well as winforms

 

That at least sounds as if this could be the problem. I'll have to dig even deeper, but I will have to search for an alternative installer, too, I'm afraid.

 

Michael

 

Share this post


Link to post
Share on other sites
3 hours ago, Michael Rittweger said:

That at least sounds as if this could be the problem.

Seems so... I tried a while to get this d**n thing working, but to no avail.

 

I searched for alternatives and after 3 other attempts I stumbled over "Visual Studio Installer". That one at least produced usable output. I had to change / extend the original project a bit, but then... a setup.exe and a setup.msi came out! You need both of them and so I combined 'em in a "TI xdt99 IDE.zip" file. And the zip for download is found directly from the root in the "Setup" folder.

610718882_Setupdownloadfolder.png.624e5a6387190e90c75afd937bad40f3.png

Not using .exe as file extension for the download has some other benefits, too. ;-)

 

Although an option "remove previous versions" (internally) is checked it refuses to install over an existing version. You'd have to uninstall via Windows. But hey...

 

Michael

 

Share this post


Link to post
Share on other sites

I got the IDE installed.  Here is my batch file I use to startup a Geneve.  I'm thinking you pretty much only have to add the geneve to the list of computers and the memex as an option as well for the slots.  I also have the socket.localhost:10000 in there should I want to do some RS232 work

 

mame64 geneve -peb:slot4 memex -peb:slot5 tirs232 -peb:slot8 hfdc -peb:slot8:hfdc:h1 generic -peb:slot8:hfdc:h2 generic -peb:slot8:hfdc:h3 generic -peb:slot8:hfdc:f3 525dd -peb:slot8:hfdc:f4 525dd -hard1 Bootdisk1.HD -hard2 Bootdisk2.HD -hard3 Bootdisk3.HD -flop1 DSDD1.dsk -flop2 DSDD2.hfe -flop3 DSDD3.dsk -flop4 DSDD4.dsk -serl1 socket.localhost:10000 -debug
 

Share this post


Link to post
Share on other sites
7 hours ago, BeeryMiller said:

I'm thinking you pretty much only have to add the geneve to the list of computers and the memex as an option as well for the slots.

Yep, you're absolutely right with that.

 

As of now the ComboBoxes have a "hard coded" list for their lookups. Later on I would like to have them dynamically filled. So, if you place any ROM or catridge files into the appropriate folders the list would show them up autmatically. But right now I will (just) have to add the entries manually. That's a 5 minute task, indeed.

 

On the other hand... You should be able to manually type in the machine name (or the card name for the peb) into the text field of the ComboBox and that should be saved in the settings then, too.

 

I just tried... Hmmm... There's another (small) problem. The Geneve doesn't know about the -gromport. But de-selecting that one and the cartidge doesn't help: Some line in the code seems to put ExBasic into the cartridge option, even without an actice gromport, and that leads to an error message (at least with MAME) again. I'll check that asap.

 

Are you using the -debug option all the time? I'd suggest to set it in the mame.ini then, until... I will add a textbox to enter additional options for the emulator. (That might help for the next paragraph, too.)

 

What might be a bit more of a task will be the RS232 settings... I'm not quite comfortable with the way I collect the settings for the peb and their slots. I would love to see that more dynamically. Right now it is very static as you can set options for "a" (yes, not "the") f/hdc. The most important drawback as of now: You can only use _one_ controller, kind of. Specifying a fdd in slot 6 and slot 8 will only use slot 8 then. hfdc in slot 6 and tifdc in slot 8 would result in using the fdc from slot 8 and the hdc in slot 6.

 

I'm not sure how I will add options for other cards, like the RS232, right now. I'll have to have a closer look at that tab page after some other, minor changes and extensions.

 

Michael

 

Share this post


Link to post
Share on other sites

I suppose you configure the multiple floppy controllers to different CRU bases? The TIFDC does not have such a setting (always >1100), but the others do. You cannot provide this in the command line, unfortunately (anyway, it would bloat the command line even more).

 

Also, there is a problem with the image/drive assignment in MAME. Floppy drives are named flop1, flop2, ... as they are found during the startup process. They are not explicitly assigned to a card. If you had two controllers in the system (at different CRU bases) with two drives each, the first one would get flop1, flop2, the second gets flop3, flop4, independent of the way the DSKx names are set within the DSR. So there could be some surprise that flop3 becomes DSK1. Since MAME has no clue what a "DSR" is, there is no way to make it behave differently.

 

The sequential assignment is a classic mechanism from early times. However, anything else would involve long path specs, as we already see with :ioport:peb:slot8:hfdc:f1.

Share this post


Link to post
Share on other sites
8 hours ago, BeeryMiller said:

Here is my batch file I use to startup a Geneve.

mame64 geneve -peb:slot4 memex -peb:slot5 tirs232 -peb:slot8 hfdc -peb:slot8:hfdc:h1 generic -peb:slot8:hfdc:h2 generic -peb:slot8:hfdc:h3 generic -peb:slot8:hfdc:f3 525dd -peb:slot8:hfdc:f4 525dd -hard1 Bootdisk1.HD -hard2 Bootdisk2.HD -hard3 Bootdisk3.HD -flop1 DSDD1.dsk -flop2 DSDD2.hfe -flop3 DSDD3.dsk -flop4 DSDD4.dsk -serl1 socket.localhost:10000 -debug

Hmmm... There is no "-ioport peb" with the Geneve, too? That rises another problem...

 

Michael

 

Share this post


Link to post
Share on other sites
3 minutes ago, mizapf said:

I suppose you configure the multiple floppy controllers to different CRU bases?

I would, if I would... ;-) I'm only using hfdc as the single controller for floppies and hard drives in my setup.

 

The problem I meant is another one, solely created by me. ;-)

 

The IDE collects the info the for peb slots one after another. After that it scans from 2 to 8 if the inserted card, if any, is a hdc. If yes the slot is kept as device for the following -ioport:peb:slot<x>:<ctrl>:h<y> options. The same is done for the fdc part. That's what I meant: If you put a fdc/hdc combo like the hfdc into slot 6 and another pure fdc like the tifdc into slot 8, then the hdc in slot 6 will be used, because there is no other one, but the fdc in slot8 overrides the one in slot 6. Thus it would result in

  • -ioport:peb:slot6:hfdc:h1 generic
  • -ioport:peb:slot8:tifdc:f1 525dd

for example. There is currently no way to use the fdc of the slot 6 hfdc in this configuration. If the hfdc is in slot 8 and the tifdc in slot 6, then both fdc and hdc would be used from slot 8. Pull out the card in slot 6, it's useless in that configuration. And that's what I did. ;-)

 

Michael

 

Share this post


Link to post
Share on other sites
32 minutes ago, Michael Rittweger said:

Hmmm... There is no "-ioport peb" with the Geneve, too? That rises another problem...

 

Yes, the I/O Port is the connection at the right edge of the TI console. The Geneve sits in a slot of the PEB. The same is true (with the same idea) for the SGCPU aka TI-99/4P.

 

I once thought about declaring the PEB as an integral part of the Geneve, so you would have slots of the Geneve, not slots of the PEB, but this would have meant extensive refactoring of the code for the sole purpose of keeping the "peb" out of the paths. It sounds a bit philosophical - should one consider the unity of the card and the PEB as the "Geneve system"?

 

I introduced the I/O Port in the architecture to be eventually able to model sidecar expansions (and the sidecar modules).

  • Like 2

Share this post


Link to post
Share on other sites

Hi, all!

 

Ok, I managed to get the Geneve up and running from the IDE, although I have absolutely no idea what I may type in at that prompt. But anyhow...

1479885223_emuateGeneve.thumb.png.ec81ea183ccbdec4b7ab03f70942eeb2.png

 

I added the "memex" to the comboboxes. But there is no ROM file for them, isn't it? Well, the Geneve starts up, so why bother? ;-)

 

I made something I really don't like: I coded a few (well, a few more...) exceptions to deal with the Geneve. So, if "geneve" is selected as machine the syntax is a bit different for the whole ioport thingy. I will have to change that ugly hardcoded behaviour some time.

 

I found an unexpected behaviour (wouldn't call it a bug) with the various text fields: If you want to "clear" them, they filled up on next startup again. This was a security branch in the "load settings" routine, that prevented overwriting of values with empty ones, which resulted in default values showing up. I disabled that behaviour.

 

I still have no idea how to implement additional options for e.g. the TIRS232 in an ergonomic way at the IDE tab page. But: I have added an extra "options" textbox on the MAME tab page where you can store those options. That'd be the place for the "-debug" or whatever.

 

A new setup zip is online: 0.3.5.1

 

Michael

 

Edited by Michael Rittweger
pic added
  • Like 1

Share this post


Link to post
Share on other sites

Michael,

 

Thanks for the updates.  I'm about to get them.

 

As far as some of your questions, yes, I do use the DEBUG option frequently when I use MAME.  It's a good tool for debugging purposes, and since one is writing code, it makes all the more sense to have it as an option.  Myself, I had thought about a checkbox to put it into the command line.  Check if on, it adds the command line option.  Off, it is removed.  Your way makes sense as well, so no issue.

 

Beery

Share this post


Link to post
Share on other sites
On 5/23/2020 at 1:43 PM, mizapf said:

The Geneve sits in a slot of the PEB.

Does it have a -joyport and / or does it support -cass1 / -cass2?

 

I'll have to extend the exceptions on those one, too, if not.

 

Michael

 

Share this post


Link to post
Share on other sites

For reference, my Geneve.

 

Connectors at the right edge from top to bottom: Video, Mouse, Joystick, Keyboard. So no cassette, but a joystick port, and the colorbus (mouse connector).

geneve2b.jpg

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I'd like to have a peb again, to get started. ;-) I had to dump my peb roughly 2005 when I realized that the hole thing became rusty all over after 15 or so years in the basement. But as far as I can see: Nobody is selling a peb these days. Or is there any source I have overlooked?

 

Michael

 

  • Like 1

Share this post


Link to post
Share on other sites

I've seen a couple show up on eBay once a month or every other month. That's where I got mine. But advertise that you are looking for one on the 99er Facebook site. 

Edited by GDMike

Share this post


Link to post
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.

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