Jump to content
IGNORED

Pascal on the 99/4A


apersson850

Recommended Posts

Actually, you could add UNITS to UCSD Pascal to cover most of the machine-dependent functionality. TI did that for their IV.0 (99/4A) and IV.11 (99/8) implementations. It also allowed use of Assembly modules and I'm pretty sure you could swap modules on the fly too--that was all part of the UCSD IV environment. Apple's implementations were based on the earlier I.x and II.x versions of UCSD (ISTR I.5, II.0, and II.1). There is even a TI module out there to allow Pascal code using Apple's TURTLEGRAPHICS extensions to be run on the TI.

 

Yes indeed. Many graphical libraries and other supports were written for the UCSD Pascal on the TI. Not sure about the speed issue as compared to other high level languages, but I guess I'll find out :)

Link to comment
Share on other sites

You can change the ScrollLock key to any other key: http://www.ninerpedia.org/index.php/Change_MESS_menu_mode_key

 

Check the file mess.ini for the entry "uimodekey". Maybe there is something similar in QMC2.

 

 

Edit: In the configuration tab of QMC2 on the right side, find "Keyboard mapping", unfold it, and there is "uimodekey". Replace SCRLOCK by another name you can take from the above location on ninerpedia.

 

Well, there is no mess.ini file anywhere in the MESS directory, the QMC2 version 0.49 configuration does not have a keyboard mapping option... This is really frustrating. Why the hell does the MESS team insist on using an obsolete key anyway??? In any case, I went ahead and connected an external keyboard with a scroll lock key and managed to set the dip switch on the p-code.

Now the system boots appropriately into the p-code environment, but there is a new issue:

The emulation crashes if I have any other disk than the Editor/Filer disk image in floppy drive 1. And even then, all the other floppy drives have to also be empty. This is of course through QMC2. Not sure if this is an issue with the frontend software or with the p-code emulation itself. I know for a fact that the other p-code disk images I have for the compiler and assembler are good because I am able to access them via the Classic99 p-code emulation. I need to have at least the compiler disk and a work disk in the other drives for efficient coding...

Any ideas?

Link to comment
Share on other sites

No keyboard mapping? Have a look at my screenshot below - this is also 0.49 (with MESS 0.155).

 

The mess.ini file should be in the mess folder, but only if you created it with the command line option "-createconfig". This file is pretty important when you want to set up a persistent configuration; otherwise, either the defaults are used, or you have to supply the settings when launching MESS (which is done by QMC2). I thought mess.ini would be created by QMC2 as well.

 

The usage of this obsolete key by default is not bad as such. What key would you assign to switch between the two keyboard modes? You cannot use the F1-F10 keys because many of them are predefined in the partial mode (for making screenshots or chaning emulation parameters). Also, keyboards look different. On laptops you don't have a separate number pad, hence those keys are no choice either. The reason for ScrollLock is simply because no one has suggested a better key yet. But as I said, at least you can define another menu key if you need to.

 

Concerning the disk issue, I have to admit I did not really try it. I just noticed that my new floppy support (hfdcnew) has a problem with the UCSD Pascal disks ; I'm getting an error and the emulation crashes. You must use the legacy implementation of the HFDC (slot option "hfdc"). With that I was able to launch the P-System with the compiler disk in drive 1.

post-35000-0-38184000-1426612882_thumb.png

Link to comment
Share on other sites

I assure you there is no keyboard mapping tab:

 

QMC2 config

 

QMC2 apparently did not create a mess.ini file, so I created it from the command line using the -createconfig switch as you instructed, but it still did not have a keyboard mapping option either! I tried adding a uimodekey entry, and it had no effect... I am using the 64bit version of MESS 0.159, which is newer than the one you are using.

 

I did switch the disk controller to the legacy one and that solved the disk issues. I finally have a functional p-code system running! I need a stiff drink...

Link to comment
Share on other sites

Ehm ... just noticing one thing:

#
# SDL KEYBOARD MAPPING
#
keymap                    0
keymap_file               keymap.dat
uimodekey                 SCRLOCK

in the mess.ini file ... "SDL" ... this only applies to Linux and OSX (at this time; it is planned to port that to Windows). I'll have to ask the others what to do for MESS in Windows.

 

Edit: Try this:

 

http://www.mess.org/faq#for_some_reason_esc_does_not_quit_mess_nor_does_tab_bring_up_the_menu

Edited by mizapf
Link to comment
Share on other sites

I found the problem with the new floppy system: I relied too much on the entries in sector 0 (VIB). The UCSD Pascal disks do have a VIB, but it is incomplete. The number of heads and sectors is 0, and well, you guess ... some division ...

 

I just added a sanity check which treats the VIB as non-existent when it is incomplete.

Link to comment
Share on other sites

Well, I may have celebrated too fast. I just noted as I was entering test code in the p-code editor (MESS p-code emulation) that the minus (-) key is not registering with either the laptop keyboard or an external keyboard. I can fix this by switching from emulated to natural keyboard, but then the ctrl functions of the p-code stop working. This is a pretty important key I should think...

Michael, have you encountered this issue before?

Link to comment
Share on other sites

If you have trouble with keys, open the menu (in your case, ~, then TAB), check "Input (this system)" and look for the key that holds the minus character. Try to set it (Return, then press the key). If it does not work, the key may be dead (by definition from the OS, not by hardware); you can try to assign another key for it.

Link to comment
Share on other sites

I see... It's not exactly an intuitive layout: - is shift -, / is - , alt Z is \, alt U is _ etc... Reminds me of the overloaded keys of the handheld computers of old...

What I might do is wire up a real TI keyboard to an Arduino (Teensy ++2) and customize the key codes so they match what MESS expects. That way it will be seamless to me as if I was typing on a real TI. Fun little project :)

Link to comment
Share on other sites

I see... It's not exactly an intuitive layout: - is shift -, / is - , alt Z is \, alt U is _ etc... Reminds me of the overloaded keys of the handheld computers of old...

What I might do is wire up a real TI keyboard to an Arduino (Teensy ++2) and customize the key codes so they match what MESS expects. That way it will be seamless to me as if I was typing on a real TI. Fun little project :)

 

Those are the TI mappings, Walid, with the Alt key as FCTN.

 

...lee

Link to comment
Share on other sites

I know that the "natural keyboard" looks much easier to use, but it is also funny to see how fast you can get used to the emulated keyboard with the TI mapping. I have to take care not to type AltGr-P on the PC to get quotes. :-)

 

The problem with the natural keyboard is not only that it is much slower (don't ask me - I did not write that part in the MAME kernel) but that it must somehow map a PC key to one or more TI keys; and it gets worse when you have a n:m mapping, e.g. when you want to use the "Del" key and F1 and AltGr-1 in the same way.

 

But I agree, when I tried my TI keyboard to USB adapter, it is indeed fun to use it together with MESS; you soon forget that you have an emulation.

  • Like 2
Link to comment
Share on other sites

I tried, but then things like ctrl-C are not recognized by the p-code emulation. This command is vital to change editing modes in the editor...

 

Yes, this is the big shortcoming of the natural keyboard. It is quite simple to define F4 (PC) as Fctn-4 (TI): When F4 is pressed, the natural keyboard pretents that both Fctn and 4 are pressed. When Del is pressed, we can make both Fctn and 1 be detected as pressed. You see that MESS's duty is to translate the natural keyboard presses to line states of the 9901 interface.

 

This is a typical definition of an input line in MESS:

    PORT_START("COL4")  // col 4
        PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B)     PORT_CHAR('b') PORT_CHAR('B')
        PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T)     PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(']')
...

If the core detects a KEYCODE_B in the emulated keyboard mode, the leftmost bit in column 4 is set. The keycode is actually the key on the PC keyboard (which can be accompanied by modifier keys).

 

The next entries are used by the natural keyboard. The main idea of the natural keyboard is that a key on the PC keyboard should be appropriately mapped to the TI keys. If you press arrow left, you expect a reaction like Fctn-S. If I press AltGr-7, I expect a left brace. You certainly don't, because you might not have a German keyboard, so your brace is somewhere else.

 

Accordingly, the natural keyboard uses characters and not raw keycodes, defined by PORT_CHAR in the shown lines. The input subsystem loops through all options of all lines. The first is without modifiers, the second is with Shift, the third (if available) is with Fctn.

 

In the third line you see such a case. When it detects a right bracket, it signals bit line 0x40 and assumes that Fctn was also pressed; this is defined in another line.

 

So you can now guess what is the problem. We just cannot map Ctrl-C because there is no character on the PC side that can be sent to the input core.

Edited by mizapf
Link to comment
Share on other sites

Michael, is there an rpk repository somewhere available, at least for XB and EA?

 

As already said above, all on WHTech. I think some time we need a guidance through that server, maybe by HTML pages with appropriate links. I already started with such a page on http://ftp.whtech.com/info/geneve.html

 

(important: ftp server, but http schema!)

 

I would suggest to also think about using the zip cartridges. Most of the RPKs are also available as ZIP files. The difference between both is that the ZIP versions can be selected via MESS using a built-in software list, you don't have to provide a file name, only the program name. And the ZIP support comes from the MAME core, while the RPK support is a prior concept which is quite lonely inside the MESS world, namely only available for the TI emulation. I insisted to retain it because in the meantime, when the others finally came up with the ZIP support, we got used to the RPKs, and they do their job pretty well.

 

From the command line, instead of "-cart extended_basic.rpk" or "-cart editor_assembler.rpk" you would write "-cart exbasic" or "-cart editass". In QMC2 there is a software list selection.

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