Jump to content
fabrice montupet

TI994W emulator problem

Recommended Posts

On 11/27/2021 at 12:32 PM, fabrice montupet said:

A sound problem subsist. In the example, I step 100 by 100 to go quickly to the problem.

10 FOR T=110 TO 44733 STEP 100 :: CALL SOUND(-1,T,0) :: PRINT T :: NEXT T

The frequency is not growing up higher than about 5000. Above, the emulator is playing the same frequency.
 

 

And the near future has allready passed.

I think it has something to do with the older sound code I borrowed from Classic99.

This is something for the to do list sometime.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, F.G. Kaal said:

And the near future has allready passed.

I think it has something to do with the older sound code I borrowed from Classic99.

This is something for the to do list sometime.

Classic99 had an upper frequency limit above which it would not attempt to generate the waveform. You could probably just change the upper limit if it's lower than you like.

 

Emulation is not hardware - there is an upper limit of frequencies that can be generated. If it's running at 44khz as the output sample rate, the maximum rate you can generate is 22khz (and it won't come out correctly after it runs through Windows). At 22khz, you're down to 11khz. If you don't refuse to generate these higher frequencies, then you get aliased noises and it's completely wrong.

So, the original code trying to generate audio from 110hz to 44,733hz is not going to work on any emulator today. The emulator would need to be generating audio at a sample rate of 89,466hz to even have a chance.

  • Like 3

Share this post


Link to post
Share on other sites

I noticed that there is a problem with the speech feature.
With "Extended Basic" and the "speech" and "sound" options activated, when I execute:
CALL SAY("HELLO"), the emulator hangs for a while and no speech is played.
Note that  I use the emulator at normal speed (no acceleration)

 

Share this post


Link to post
Share on other sites

I can maximize the emulator window but I can't get a full screen mode, sadly the title and menu bars always appears. Is there a way to force a real full screen?  This feature can be added to the emulator option?

Edited by fabrice montupet

Share this post


Link to post
Share on other sites
On 12/24/2021 at 3:19 AM, fabrice montupet said:

I can maximize the emulator window but I can't get a full screen mode, sadly the title and menu bars always appears. Is there a way to force a real full screen?  This feature can be added to the emulator option?

It's is beginning to look a lot like ... work ;-) Maybe next year. I'm busy with other things now.

  • Like 3

Share this post


Link to post
Share on other sites

Nothing important, it's just a suggestion for a next possible update 🙂

That said, I found solutions to get a full screen by using the MS- Windows Magnifier, in Accessibility Options, with 5% magnification increment. I adjust the magnification and the Magnifier position to get a perfect full screen, then a reduce the Magnifier bar. Another solution is to press Windows and "+" keys to zoom the screen and to move the mouse to the borders to center the zoom  ^^

Edited by fabrice montupet
  • Like 1

Share this post


Link to post
Share on other sites
On 12/27/2021 at 8:48 PM, fabrice montupet said:

Nothing important, it's just a suggestion for a next possible update 🙂

What do you know ... it is happy new year allready.

 

This feature was not so simple as it looks. If there is no menu then it is also not possible to do a restore of the window size or exit the emulator.

Added some features for show menu, hide menu, minimize, maximize, restore in the context menu (right mouse click) and double clicking in the left or right black bars also leaves the maximized window.

 

enjoy ...

 

Ti994w.zip

  • Like 3
  • Thanks 3

Share this post


Link to post
Share on other sites

This feature added is beyond my expectations, very practical et efficient. I am embarrassed by all the work that I give to you. Thank you very much.
I also see that you've added TiBUS option ! 8-)

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, fabrice montupet said:

I also see that you've added TiBUS option ! 8-)

Yes, TiBus is a work in progress. I want to be able to test the whole DSR in my emulator and not only bits and pieces. Added some functionality to transfer CRU bits via a serial connection (baudrate 115K2) over USB to an Arduino Uno which translates this back to parallel bits for the TiBus and visa-versa. The picture below shows the PC-TiBus interface (right) connected to a TiBus Real-Time-Clock (left, also an Arduino Uno). During communication the hex display shows A (Await message) or the device ID (0-9, 0=broadcast to all connected devices, i.e. for a reset message). Error code is displayed as aternating E with code 0-9. I still have to start the project this was all invented for; a TTL-chip test program in Extended Basic ;-)

 

afbeelding.thumb.png.10a354cc7b13f9cd4475c9d143503d32.png

  • Like 4

Share this post


Link to post
Share on other sites

ti994w setup offers three keyboard behavior: PC Keyboard input buffer, PC Keyboard and TI Keyboard. I noticed two problems:

- Using, the 'PC Keyboard' option, I can use CALL KEY(0,K,S) or CALL CALL KEY(3,K,S) but not CALL (1,K,S) or CALL KEY(2,K,S) where K returns no key value then -1.

- Regularly, when I swap between the 'PC Keyboard' and 'TI Keyboard' options and  I enable/disable  the "all free CPU" speed option, the keys pressed are repeatedly displayed on several lines.

Share this post


Link to post
Share on other sites
On 6/11/2022 at 5:19 PM, fabrice montupet said:

ti994w setup offers three keyboard behavior: PC Keyboard input buffer, PC Keyboard and TI Keyboard. I noticed two problems:

- Using, the 'PC Keyboard' option, I can use CALL KEY(0,K,S) or CALL CALL KEY(3,K,S) but not CALL (1,K,S) or CALL KEY(2,K,S) where K returns no key value then -1.

- Regularly, when I swap between the 'PC Keyboard' and 'TI Keyboard' options and  I enable/disable  the "all free CPU" speed option, the keys pressed are repeatedly displayed on several lines.

- Using, the 'PC Keyboard' option, I can use CALL KEY(0,K,S) or CALL CALL KEY(3,K,S) but not CALL (1,K,S) or CALL KEY(2,K,S) where K returns no key value then -1.

 

It appears that keyboard mode 1 and 2 does not scan the complete keyboard and because of that unused keys for kb mode 1 and 2 locks up the PC keyboard method until a keyboard mode of 3, 4 or 5 is used again. This is fixed.

 

 

- Regularly, when I swap between the 'PC Keyboard' and 'TI Keyboard' options and  I enable/disable  the "all free CPU" speed option, the keys pressed are repeatedly displayed on several lines.

 

This is a TI keyboard method feature. If you speed-up the machinery than you also have to work faster yourself. This can't be fixed. This has to do with the autorepeat delay and autorepeat speed built in the kb SCAN function. Use the PC keyboard method if you run the Ti994w emulator full blast.

 

See ti99-geek.nl for the new version.

  • Like 2

Share this post


Link to post
Share on other sites

 Using CALL KEY(0,key,status) is just a bad idea as 0 indicates use same value as was previously called.

So using CALL KEY(0,key,status) after a CALL KEY(3,key,status) will only read upper case ONLY! 

As stated CALL KEY(0,key,status) just repeats last key mode was last called. 

 

MODES:

0 repeat what ever key mode previously used.

1 Left Side of Keyboard there is a map of these keys and tied to JOYST 1 mode

2 Right Side of Keyboard there is a map of these keys and tied to JOYST 2 mode

3 XB or Upper Case only key mode (This is due to original mockup keyboard only had UPPER CASE)

4 Pascal mode as has some special keys, not sure as I do not use PASCAL just assumed special keys as most languages do

5 Full keyboard scan of all keys even all Control and Function and Shift keys, including up to 4 keys read at same time for very odd values

  • Like 2

Share this post


Link to post
Share on other sites

Thank you for the quick answer.

But there are problems with the new version.

- In PC keyboard mode (with the use All free CPU ):  pressing "," causes to display the key two times ",," , pressing "." causes display ";." or pressing "/" causes display "/:"

- In PC Keyboard mode (with the use All free CPU time feature or not)  running the program:

10 CALL KEY(1,K,S) :: CALL KEY(2,K2,S2)
20 PRINT K,K2
30 GOTO 10

causes K and K2 always return the -1 value.

 

 

Share this post


Link to post
Share on other sites
21 hours ago, fabrice montupet said:

Thank you for the quick answer.

But there are problems with the new version.

- In PC keyboard mode (with the use All free CPU 😞 pressing "," causes to display the key two times ",," , pressing "." causes display ";." or pressing "/" causes display "/:"

- In PC Keyboard mode (with the use All free CPU time feature or not)  running the program:

10 CALL KEY(1,K,S) :: CALL KEY(2,K2,S2)
20 PRINT K,K2
30 GOTO 10

causes K and K2 always return the -1 value.

 

 

You are not using the CALL KEY function properly. CALL KEY is a non-blocking read. When CALL KEY returns you have to check the S(tatus): 0 : No key was pressed, 1 : a new key was pressed, -1 : the same key was pressed as in the previous CALL KEY (autorepeat). You should use something like this:

 

  100 CALL KEY(1,K,S)           
  110 IF S<>0 THEN 150          
  120 CALL KEY(2,K,S)           
  130 IF S<>0 THEN 170          
  140 GOTO 100                  
  150 PRINT "Left";K            
  160 GOTO 100                  
  170 PRINT "Right";K           
  180 GOTO 100                  

This is also true for mode 3, 4, 5 and 0.

 

If K = -1 (which is 255 or >FF) also means that no key was pressed. Alternatively you could check IF K<>-1 or IF K>=0.

 

 

When the emulator is set to "Use all free CPU time" then it seems that for some keys a WM_CHAR message and a WM_KEYDOWN message is passed through to the keyboard function. Look like this is happening for those keys that are fctn-keys on the TI keyboard. I am not going to spent more time on this. The "use all free CPU time" option is not meant for this. It is a feature I have build in to do some special stuff like calculations or whatever when no further user input is required.

 

PS: I also see my collegues doing this with our traffic controller emulator(s) ... select the option "use all free CPU time" and then setting other options to slow the emulator down so that they can see what is happening and doing manual tests. The result is that some traffic flow is generated every 1/10 of a second and the remaining (free CPU) time the CPU working like hell doing nothing (only heating up the environment). In this case (these kind of emulators) the "use all free CPU time" is for doing endurence tests and keep the traffic controller program running for the rest of the day/week or whatever.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Here is a page from the Tabellen boek (Table book) of the dutch TI users group (TIUG) with all the key codes genereated for all modes:

 

TOETS CODES
+-------+-----+-----+-------------+-----------------+-----------------+-------+
|       |     |     |             |                 |                 |       |
|       |MODE1|MODE2|    MODE3    |      MODE4      |      MODE5      | KSCAN |
|       |     |     |             |                 |                 |       |
| toets |     |     |     shf fct |     shf fct ctl |     shf fct ctl |       |
| ===== | === | === | === === === | === === === === | === === === === | ===== |
|   1   | >13 | >FF | >31 >21 >03 | >31 >21 >83 >B1 | >31 >21 >03 >B1 |  >2B  |
|   2   | >07 | >FF | >32 >40 >04 | >32 >40 >84 >B2 | >32 >40 >04 >B2 |  >0B  |
|   3   | >08 | >FF | >33 >23 >07 | >33 >23 >87 >B3 | >33 >23 >07 >B3 |  >13  |
|   4   | >09 | >FF | >34 >24 >02 | >34 >24 >82 >B4 | >34 >24 >02 >B4 |  >1B  |
|   5   | >0A | >FF | >35 >25 >0E | >35 >25 >8E >B5 | >35 >25 >0E >B5 |  >23  |
|   6   | >FF | >13 | >36 >5E >0C | >36 >5E >8C >B6 | >36 >5E >0C >B6 |  >24  |
|   7   | >FF | >07 | >37 >26 >01 | >37 >26 >81 >B7 | >37 >26 >01 >B7 |  >1C  |
|   8   | >FF | >08 | >38 >2A >06 | >38 >2A >86 >1E | >38 >2A >06 >9E |  >14  |
|   9   | >FF | >09 | >39 >28 >0F | >39 >28 >8F >1F | >39 >28 >0F >9F |  >0C  |
|   0   | >FF | >0A | >30 >FF >FF | >30 >29 >BC >B0 | >30 >29 >BC >B0 |  >2C  |
|   =   | >FF | >FF | >3D >2B >05 | >3D >2B >85 >1D | >3D >2B >05 >9D |  >07  |
|   Q   | >12 | >FF | >51 >51 >FF | >71 >51 >C5 >11 | >71 >51 >C5 >91 |  >29  |
|   W   | >04 | >FF | >57 >57 >FF | >77 >57 >7E >17 | >77 >57 >7E >97 |  >09  |
|   E   | >05 | >FF | >45 >45 >0B | >65 >45 >8B >05 | >65 >45 >0B >85 |  >11  |
|   R   | >06 | >FF | >52 >52 >5B | >72 >52 >5B >12 | >72 >52 >5B >92 |  >19  |
|   T   | >0B | >FF | >54 >54 >5D | >74 >54 >5D >14 | >74 >54 >5D >94 |  >21  |
|   Y   | >FF | >12 | >59 >59 >FF | >79 >59 >C6 >19 | >79 >59 >C6 >99 |  >25  |
|   U   | >FF | >04 | >55 >55 >5F | >75 >55 >5F >15 | >75 >55 >5F >95 |  >1D  |
|   I   | >FF | >05 | >49 >49 >3F | >69 >49 >3F >09 | >69 >49 >3F >89 |  >15  |
|   O   | >FF | >06 | >4F >4F >27 | >6F >4F >27 >0F | >6F >4F >27 >8F |  >0D  |
|   P   | >FF | >0B | >50 >50 >22 | >70 >50 >22 >10 | >70 >50 >22 >90 |  >2D  |
|   /   | >FF | >10 | >2F >2D >FF | >2F >2D >BA >BB | >2F >2D >BA >BB |  >2F  |
|   A   | >01 | >FF | >41 >41 >FF | >61 >41 >7C >01 | >61 >41 >7C >81 |  >2A  |
|   S   | >02 | >FF | >53 >53 >08 | >73 >53 >88 >13 | >73 >53 >08 >93 |  >0A  |
|   D   | >03 | >FF | >44 >44 >09 | >64 >44 >89 >04 | >64 >44 >09 >84 |  >12  |
|   F   | >0C | >FF | >46 >46 >FF | >66 >46 >7B >06 | >66 >46 >7B >86 |  >1A  |
|   G   | >11 | >FF | >47 >47 >FF | >67 >47 >7D >07 | >67 >47 >7D >87 |  >22  |
|   H   | >FF | >01 | >48 >48 >FF | >68 >48 >BF >08 | >68 >48 >BF >88 |  >26  |
|   J   | >FF | >02 | >4A >4A >FF | >6A >4A >C0 >0A | >6A >4A >C0 >8A |  >1E  |
|   K   | >FF | >03 | >4B >4B >FF | >6B >4B >C1 >0B | >6B >4B >C1 >8B |  >16  |
|   L   | >FF | >0C | >4C >4C >FF | >6C >4C >C2 >0C | >6C >4C >C2 >8C |  >0E  |
|   ;   | >FF | >11 | >3B >3A >FF | >3B >3A >BD >1C | >3B >3A >BD >9C |  >2E  |
| enter | >FF | >FF | >0D >0D >0D | >0D >0D >0D >0D | >0D >0D >0D >0D |  >05  |
|   Z   | >0F | >FF | >5A >5A >5C | >7A >5A >5C >1A | >7A >5A >5C >9A |  >28  |
|   X   | >00 | >FF | >58 >58 >0A | >78 >58 >8A >18 | >78 >58 >0A >98 |  >08  |
|   C   | >0E | >FF | >43 >43 >FF | >63 >43 >60 >03 | >63 >43 >60 >83 |  >10  |
|   V   | >0D | >FF | >56 >56 >FF | >76 >56 >7F >16 | >76 >56 >7F >96 |  >18  |
|   B   | >10 | >FF | >42 >42 >FF | >62 >42 >BE >02 | >62 >42 >BE >82 |  >20  |
|   N   | >FF | >0F | >4E >4E >FF | >6E >4E >C4 >0E | >6E >4E >C4 >8E |  >27  |
|   M   | >FF | >00 | >4D >4D >FF | >6D >4D >C3 >0D | >6D >4D >C3 >8D |  >1F  |
|   ,   | >FF | >0E | >2C >3C >FF | >2C >3C >B8 >00 | >2C >3C >B8 >80 |  >17  |
|   .   | >FF | >0D | >2E >3E >FF | >2E >3E >B9 >1B | >2E >3E >B9 >9B |  >0F  |
| space | >FF | >FF | >20 >20 >20 | >20 >20 >20 >20 | >20 >20 >20 >20 |  >06  |
|       |     |     |             |                 |                 |       |
+-------+-----+-----+-------------+-----------------+-----------------+-------+
| De KSCAN routine gebruikt >83C7->83CA voor toetscode opslag (dit is niet    |
| ASCII). Deze codes staan in de laatste kolom van de tabel. >83C8 wordt als  |
| opslag van MODE0 gebruikt, >83C9 voor MODE1 en >83CA voor MODE2.            |
| >83C7 bevat de volgende vlaggen:                                            |
| >01:= >02:space >04:enter >06:vuur >10:fctn >20:shift >40:ctrl              |
+-----------------------------------------------------------------------------+

				- 101 -

 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Spent some time on the PC keyboard problem anyway and changed my keyboard table definition a bit. In the PC mode keyboard I allowed for some key's the WM_CHAR and WM_KEYDOWN message. This seems no problem in normal speed but when the "use all free CPU speed" is selected then both key messages are passed through my keyboard function (don't ask me why).

 

The key board table describes how to translate the PC keyboard to the TI keyboard layout like so:

Spoiler

static KEYTABLE KeyTable[] =
{
//            Key_Code Ti_Code  Ti_Mod     Ti_Rel Ti_Row      Ti Col       Key mode
   /*   */   { ' ',    ' ',    TIMK_NONE , 0,     KB_ROW_SPC,  KB_COL_SPC  , KM_ALLW },
   /* ! */   { '!',    '1',    TIMK_SHIFT, 0,     KB_ROW_1,    KB_COL_1    , KM_ALLW },
   /* " */   { '"',    'P',    TIMK_FUNC , 0,     KB_ROW_P,    KB_COL_P    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* # */   { '#',    '3',    TIMK_SHIFT, 0,     KB_ROW_3,    KB_COL_3    , KM_ALLW },
   /* $ */   { '$',    '4',    TIMK_SHIFT, 0,     KB_ROW_4,    KB_COL_4    , KM_ALLW },
   /* % */   { '%',    '5',    TIMK_SHIFT, 0,     KB_ROW_5,    KB_COL_5    , KM_ALLW },
   /* & */   { '&',    '7',    TIMK_SHIFT, 0,     KB_ROW_7,    KB_COL_7    , KM_ALLW },
   /* ' */   { '\'',   'O',    TIMK_FUNC , 0,     KB_ROW_O,    KB_COL_O    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ( */   { '(',    '9',    TIMK_SHIFT, 0,     KB_ROW_9,    KB_COL_9    , KM_ALLW },
   /* ) */   { ')',    '0',    TIMK_SHIFT, 0,     KB_ROW_0,    KB_COL_0    , KM_ALLW },
   /* * */   { '*',    '8',    TIMK_SHIFT, 0,     KB_ROW_8,    KB_COL_8    , KM_ALLW },
   /* + */   { '+',    '=',    TIMK_SHIFT, 0,     KB_ROW_EQ,   KB_COL_EQ   , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* , */   { ',',    ',',    TIMK_NONE,  0,     KB_ROW_COM,  KB_COL_COM  , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* - */   { '-',    '/',    TIMK_SHIFT, 0,     KB_ROW_SLSH, KB_COL_SLSH , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* . */   { '.',    '.',    TIMK_NONE , 0,     KB_ROW_DOT,  KB_COL_DOT  , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* / */   { '/',    '/',    TIMK_NONE , 0,     KB_ROW_SLSH, KB_COL_SLSH , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* 0 */   { '0',    '0',    TIMK_NONE , 0,     KB_ROW_0,    KB_COL_0    , KM_ALLW },
   /* 1 */   { '1',    '1',    TIMK_NONE , 0,     KB_ROW_1,    KB_COL_1    , KM_ALLW },
   /* 2 */   { '2',    '2',    TIMK_NONE , 0,     KB_ROW_2,    KB_COL_2    , KM_ALLW },
   /* 3 */   { '3',    '3',    TIMK_NONE , 0,     KB_ROW_3,    KB_COL_3    , KM_ALLW },
   /* 4 */   { '4',    '4',    TIMK_NONE , 0,     KB_ROW_4,    KB_COL_4    , KM_ALLW },
   /* 5 */   { '5',    '5',    TIMK_NONE , 0,     KB_ROW_5,    KB_COL_5    , KM_ALLW },
   /* 6 */   { '6',    '6',    TIMK_NONE , 0,     KB_ROW_6,    KB_COL_6    , KM_ALLW },
   /* 7 */   { '7',    '7',    TIMK_NONE , 0,     KB_ROW_7,    KB_COL_7    , KM_ALLW },
   /* 8 */   { '8',    '8',    TIMK_NONE , 0,     KB_ROW_8,    KB_COL_8    , KM_ALLW },
   /* 9 */   { '9',    '9',    TIMK_NONE , 0,     KB_ROW_9,    KB_COL_9    , KM_ALLW },
   /* : */   { ':',    ';',    TIMK_SHIFT, 0,     KB_ROW_SEMC, KB_COL_SEMC , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ; */   { ';',    ';',    TIMK_NONE , 0,     KB_ROW_SEMC, KB_COL_SEMC , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* < */   { '<',    ',',    TIMK_SHIFT, 0,     KB_ROW_COM,  KB_COL_COM  , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* = */   { '=',    '=',    TIMK_NONE , 0,     KB_ROW_EQ,   KB_COL_EQ   , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* > */   { '>',    '.',    TIMK_SHIFT, 0,     KB_ROW_DOT,  KB_COL_DOT  , KM_PCKB+/*KM_PCCHAR+*/KM_PCDOWN | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ? */   { '?',    'I',    TIMK_FUNC , 0,     KB_ROW_I,    KB_COL_I    , KM_PCKB+KM_PCCHAR           | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* @ */   { '@',    '2',    TIMK_SHIFT, 0,     KB_ROW_2,    KB_COL_2    , KM_ALLW },
   /* A */   { 'A',    'A',    TIMK_SHIFT, 0,     KB_ROW_A,    KB_COL_A    , KM_ALLW },
   /* B */   { 'B',    'B',    TIMK_SHIFT, 0,     KB_ROW_B,    KB_COL_B    , KM_ALLW },
   /* C */   { 'C',    'C',    TIMK_SHIFT, 0,     KB_ROW_C,    KB_COL_C    , KM_ALLW },
   /* D */   { 'D',    'D',    TIMK_SHIFT, 0,     KB_ROW_D,    KB_COL_D    , KM_ALLW },
   /* E */   { 'E',    'E',    TIMK_SHIFT, 0,     KB_ROW_E,    KB_COL_E    , KM_ALLW },
   /* F */   { 'F',    'F',    TIMK_SHIFT, 0,     KB_ROW_F,    KB_COL_F    , KM_ALLW },
   /* G */   { 'G',    'G',    TIMK_SHIFT, 0,     KB_ROW_G,    KB_COL_G    , KM_ALLW },
   /* H */   { 'H',    'H',    TIMK_SHIFT, 0,     KB_ROW_H,    KB_COL_H    , KM_ALLW },
   /* I */   { 'I',    'I',    TIMK_SHIFT, 0,     KB_ROW_I,    KB_COL_I    , KM_ALLW },
   /* J */   { 'J',    'J',    TIMK_SHIFT, 0,     KB_ROW_J,    KB_COL_J    , KM_ALLW },
   /* K */   { 'K',    'K',    TIMK_SHIFT, 0,     KB_ROW_K,    KB_COL_K    , KM_ALLW },
   /* L */   { 'L',    'L',    TIMK_SHIFT, 0,     KB_ROW_L,    KB_COL_L    , KM_ALLW },
   /* M */   { 'M',    'M',    TIMK_SHIFT, 0,     KB_ROW_M,    KB_COL_M    , KM_ALLW },
   /* N */   { 'N',    'N',    TIMK_SHIFT, 0,     KB_ROW_N,    KB_COL_N    , KM_ALLW },
   /* O */   { 'O',    'O',    TIMK_SHIFT, 0,     KB_ROW_O,    KB_COL_O    , KM_ALLW },
   /* P */   { 'P',    'P',    TIMK_SHIFT, 0,     KB_ROW_P,    KB_COL_P    , KM_ALLW },
   /* Q */   { 'Q',    'Q',    TIMK_SHIFT, 0,     KB_ROW_Q,    KB_COL_Q    , KM_ALLW },
   /* R */   { 'R',    'R',    TIMK_SHIFT, 0,     KB_ROW_R,    KB_COL_R    , KM_ALLW },
   /* S */   { 'S',    'S',    TIMK_SHIFT, 0,     KB_ROW_S,    KB_COL_S    , KM_ALLW },
   /* T */   { 'T',    'T',    TIMK_SHIFT, 0,     KB_ROW_T,    KB_COL_T    , KM_ALLW },
   /* U */   { 'U',    'U',    TIMK_SHIFT, 0,     KB_ROW_U,    KB_COL_U    , KM_ALLW },
   /* V */   { 'V',    'V',    TIMK_SHIFT, 0,     KB_ROW_V,    KB_COL_V    , KM_ALLW },
   /* W */   { 'W',    'W',    TIMK_SHIFT, 0,     KB_ROW_W,    KB_COL_W    , KM_ALLW },
   /* X */   { 'X',    'X',    TIMK_SHIFT, 0,     KB_ROW_X,    KB_COL_X    , KM_ALLW },
   /* Y */   { 'Y',    'Y',    TIMK_SHIFT, 0,     KB_ROW_Y,    KB_COL_Y    , KM_ALLW },
   /* Z */   { 'Z',    'Z',    TIMK_SHIFT, 0,     KB_ROW_Z,    KB_COL_Z    , KM_ALLW },
   /* [ */   { '[',    'R',    TIMK_FUNC , 0,     KB_ROW_R,    KB_COL_R    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* \ */   { '\\',   'Z',    TIMK_FUNC , 0,     KB_ROW_Z,    KB_COL_Z    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ] */   { ']',    'T',    TIMK_FUNC , 0,     KB_ROW_T,    KB_COL_T    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ^ */   { '^',    '6',    TIMK_SHIFT, 0,     KB_ROW_6,    KB_COL_6    , KM_ALLW },
   /* _ */   { '_',    'U',    TIMK_FUNC , 0,     KB_ROW_U,    KB_COL_U    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ` */   { '`',    'C',    TIMK_FUNC , 0,     KB_ROW_C,    KB_COL_C    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* a */   { 'a',    'A',    TIMK_NONE , 0,     KB_ROW_A,    KB_COL_A    , KM_ALLW },
   /* b */   { 'b',    'B',    TIMK_NONE , 0,     KB_ROW_B,    KB_COL_B    , KM_ALLW },
   /* c */   { 'c',    'C',    TIMK_NONE , 0,     KB_ROW_C,    KB_COL_C    , KM_ALLW },
   /* d */   { 'd',    'D',    TIMK_NONE , 0,     KB_ROW_D,    KB_COL_D    , KM_ALLW },
   /* e */   { 'e',    'E',    TIMK_NONE , 0,     KB_ROW_E,    KB_COL_E    , KM_ALLW },
   /* f */   { 'f',    'F',    TIMK_NONE , 0,     KB_ROW_F,    KB_COL_F    , KM_ALLW },
   /* g */   { 'g',    'G',    TIMK_NONE , 0,     KB_ROW_G,    KB_COL_G    , KM_ALLW },
   /* h */   { 'h',    'H',    TIMK_NONE , 0,     KB_ROW_H,    KB_COL_H    , KM_ALLW },
   /* i */   { 'i',    'I',    TIMK_NONE , 0,     KB_ROW_I,    KB_COL_I    , KM_ALLW },
   /* j */   { 'j',    'J',    TIMK_NONE , 0,     KB_ROW_J,    KB_COL_J    , KM_ALLW },
   /* k */   { 'k',    'K',    TIMK_NONE , 0,     KB_ROW_K,    KB_COL_K    , KM_ALLW },
   /* l */   { 'l',    'L',    TIMK_NONE , 0,     KB_ROW_L,    KB_COL_L    , KM_ALLW },
   /* m */   { 'm',    'M',    TIMK_NONE , 0,     KB_ROW_M,    KB_COL_M    , KM_ALLW },
   /* n */   { 'n',    'N',    TIMK_NONE , 0,     KB_ROW_N,    KB_COL_N    , KM_ALLW },
   /* o */   { 'o',    'O',    TIMK_NONE , 0,     KB_ROW_O,    KB_COL_O    , KM_ALLW },
   /* p */   { 'p',    'P',    TIMK_NONE , 0,     KB_ROW_P,    KB_COL_P    , KM_ALLW },
   /* q */   { 'q',    'Q',    TIMK_NONE , 0,     KB_ROW_Q,    KB_COL_Q    , KM_ALLW },
   /* r */   { 'r',    'R',    TIMK_NONE , 0,     KB_ROW_R,    KB_COL_R    , KM_ALLW },
   /* s */   { 's',    'S',    TIMK_NONE , 0,     KB_ROW_S,    KB_COL_S    , KM_ALLW },
   /* t */   { 't',    'T',    TIMK_NONE , 0,     KB_ROW_T,    KB_COL_T    , KM_ALLW },
   /* u */   { 'u',    'U',    TIMK_NONE , 0,     KB_ROW_U,    KB_COL_U    , KM_ALLW },
   /* v */   { 'v',    'V',    TIMK_NONE , 0,     KB_ROW_V,    KB_COL_V    , KM_ALLW },
   /* w */   { 'w',    'W',    TIMK_NONE , 0,     KB_ROW_W,    KB_COL_W    , KM_ALLW },
   /* x */   { 'x',    'X',    TIMK_NONE , 0,     KB_ROW_X,    KB_COL_X    , KM_ALLW },
   /* y */   { 'y',    'Y',    TIMK_NONE , 0,     KB_ROW_Y,    KB_COL_Y    , KM_ALLW },
   /* z */   { 'z',    'Z',    TIMK_NONE , 0,     KB_ROW_Z,    KB_COL_Z    , KM_ALLW },
   /* { */   { '{',    'F',    TIMK_FUNC , 0,     KB_ROW_F,    KB_COL_F    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* | */   { '|',    'A',    TIMK_FUNC , 0,     KB_ROW_A,    KB_COL_A    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* } */   { '}',    'G',    TIMK_FUNC , 0,     KB_ROW_G,    KB_COL_G    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /* ~ */   { '~',    'W',    TIMK_FUNC , 0,     KB_ROW_W,    KB_COL_W    , KM_PCKB+KM_PCCHAR | KM_TIKB+KM_TIDOWN+KM_TICHAR },
   /*DEL*/   { 0x7F,    0 ,    TIMK_NONE , 0,     KB_ROW_W,    KB_COL_W    , KM_ALLW },
   /*SHFT*/ { TI_SHFT, TIMK_SHIFT,TIMK_SHIFT, 0,  KB_ROW_SHFT, KB_COL_SHFT , KM_ALLW },
   /*FUNC*/ { TI_FUNC, TIMK_FUNC, TIMK_FUNC , 0,  KB_ROW_FUNC, KB_COL_FUNC , KM_ALLW },
   /*CTRL*/ { TI_CTRL, TIMK_CTRL, TIMK_CTRL , 0,  KB_ROW_CTRL, KB_COL_CTRL , KM_ALLW },
   /*ENTR*/ { TI_ENTR,  13,    TIMK_NONE , 0,     KB_ROW_ENTR, KB_COL_ENTR , KM_ALLW },
};

Seems that I have fixed this problem for the + = - _ / : ; < > keys.

 

Here is the updated version Ti994w62d.zipand can also be downloaded from ti99-geek.nl.

Edited by F.G. Kaal
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, F.G. Kaal said:

You are not using the CALL KEY function properly. CALL KEY is a non-blocking read. When CALL KEY returns you have to check the S(tatus): 0 : No key was pressed, 1 : a new key was pressed, -1 : the same key was pressed as in the previous CALL KEY (autorepeat). You should use something like this:

 

With my method I thought that it was the best way to capture two keys pressed (one in each side of the keyboard) at the same time. Thank you for the precision.

 

Quote

When the emulator is set to "Use all free CPU time" then it seems that for some keys a WM_CHAR message and a WM_KEYDOWN message is passed through to the keyboard function. Look like this is happening for those keys that are fctn-keys on the TI keyboard. I am not going to spent more time on this. The "use all free CPU time" option is not meant for this. It is a feature I have build in to do some special stuff like calculations or whatever when no further user input is required.

For me, the "use all free CPU time" is the best feature of your emulator for programs development because it permits to directly simulate the behavior of a XB256 program when compiled .  Of course, for that, I have calibrated the speed of my Core i7 CPU computer to execute the emulator (with "use all free CPU time"  enabled) at a speed that is equal to the speed a compiled program runs on a real TI-99/4A. With this manner, in emulation,  when I modify my program by adding functions I can directly see if it will be playable at the speed that I desire on the real hardware. (I hope that I was clear, my English has some limits, easily reached 😛)

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, F.G. Kaal said:

 

Here is the updated version Ti994w62d.zipand can also be downloaded from ti99-geek.nl.

I am really sorry but this new version causes problems too: in PC Keyboard mode the ".","+","-","/" on the numeric keypad doesn't work anymore, pressing the "$" key causes display ";$", the "<>" key no longer works too.

Edited by fabrice montupet

Share this post


Link to post
Share on other sites
21 hours ago, fabrice montupet said:

I am really sorry but this new version causes problems too: in PC Keyboard mode the ".","+","-","/" on the numeric keypad doesn't work anymore, pressing the "$" key causes display ";$", the "<>" key no longer works too.

Well ... this is just another fine mess you bright me into 🤯

 

Just kidding ... I am happy with you as a tester.

 

Now I know again why a WM_CHAR and WM_KEYDOWN message was allowed for some keys in the PC keyboard mode. The keyboard and numeric keypad send different type of messages for what appears to be the same key, but ... it isn't. It can be a normal (ASCII) character and it can be a virtual key defined as VK_OEM_something in the windows header file.

 

When the "Use all free CPU speed" is enabled then for those problematic keys both messages are send for some reason. What I have added now is that the message type and key code is stored. If a different type of WM_keymessage is received with the same key code as with the previous WM_keymessage than this one is ignored. Seems to work properly on my system now.

 

Still version 6.2d and can also be downloaded from ti99-geek.nl

 

Ti994w62d.zip

  • Thanks 1

Share this post


Link to post
Share on other sites
23 hours ago, fabrice montupet said:

With my method I thought that it was the best way to capture two keys pressed (one in each side of the keyboard) at the same time. Thank you for the precision.

If you need it that way you can also do something like this:

10 CALL KEY(1,K,S) :: CALL KEY(2,K2,S2)
20 IF S=0 THEN SKIP K
30 IF S2=0 THEN SKIP K2
30 GOTO 10

or 

10 CALL KEY(1,K,S) :: CALL KEY(2,K2,S2)
20 IF K=-1 THEN SKIP K
30 IF K2=-1 THEN SKIP K2
30 GOTO 10

SKIP is offcourse some neat function for not handling that key.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, F.G. Kaal said:

Well ... this is just another fine mess you bright me into 🤯

Just kidding ... I am happy with you as a tester.

Now I know again why a WM_CHAR and WM_KEYDOWN message was allowed for some keys in the PC keyboard mode. The keyboard and numeric keypad send different type of messages for what appears to be the same key, but ... it isn't. It can be a normal (ASCII) character and it can be a virtual key defined as VK_OEM_something in the windows header file.

When the "Use all free CPU speed" is enabled then for those problematic keys both messages are send for some reason. What I have added now is that the message type and key code is stored. If a different type of WM_keymessage is received with the same key code as with the previous WM_keymessage than this one is ignored. Seems to work properly on my system now.

Still version 6.2d and can also be downloaded from ti99-geek.nl

 

Ti994w62d.zip 1.71 MB · 0 downloads

I am happy to use your emulator 🙂  and I appreciate a lot your efforts and your availability to make it better and better.

I tried this new version and I always have the problem with the keys ":", ",", ";" and "$".

Note that I use the ti994w62d as is, without importing any files from previous versions and that I also encounter the problem even if I disable the "Use all free CPU time" after enabled it.

Edited by fabrice montupet

Share this post


Link to post
Share on other sites
22 hours ago, fabrice montupet said:

I tried this new version and I always have the problem with the keys ":", ",", ";" and "$".

Note that I use the ti994w62d as is, without importing any files from previous versions and that I also encounter the problem even if I disable the "Use all free CPU time" after enabled it.

I don't see "the" problem what you describe. What do you see in the debug window:

 

1) Start Ti994w

2) Select in the menu View/Debug

3) In the debug window select in the menu Devices/keyboard, deselect anyhing else

4) In the main window select TI BASIC

5) Enter there ;.$ and maybe other probematic keys

 

Now what do you see in the debug window. This is what I get on my system:

 

Command line = <-cD:\Ti994w\startupscript.cmd>
Windows Version 6.02.02
Ini file = <D:\Ti994w\Ti994w.ini>
Load file: SMEM   @ >0000 <.\system\994arom.bin>
Load file: GROM   @ >0000 <.\system\994agrom.gpl>
Load file: VDP    @ >0800 <.\system\chara1.vdp>
Load file: VDP    @ >0380 <.\system\colortable.vdp>
Load file: DSR    @ >1000 <.\system\Dsr1000.bin>
Load file: DSR    @ >1100 <.\system\Disk.bin>
Command file = <D:\Ti994w\startupscript.cmd>
Load file: SMEM   @ >6000 - Page 0 <.\system\Exbas_B0.bin>
Load file: SMEM   @ >6000 - Page 1 <.\system\Exbas_B1.bin>
Load file: GROM   @ >6000 <.\system\Exbas_G1.gpl>
Load file: GROM   @ >8000 <.\system\Exbas_G2.gpl>
Load file: GROM   @ >A000 <.\system\Exbas_G3.gpl>
Load file: GROM   @ >C000 <.\system\Exbas_G4.gpl>
Interrupt level 00 granted
Keyboard  KEY: ' ' >20 032 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_CHAR
Keyboard  KEY: '1' >31 049 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_CHAR
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: ';' >3B 059 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: ';' >3B 059 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_CHAR        NOT ALLOWED
Keyboard  KEY: ';' >3B 059 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: ';' >3B 059 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_CHAR        NOT ALLOWED
Keyboard  KEY: ',' >2C 044 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: ',' >2C 044 : Caps=off Shft=off Fnct=off Ctrl=off Msg=WM_CHAR        NOT ALLOWED
Keyboard  KEY: '.' >01 001 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_KEYDOWN
Keyboard  KEY: '4' >34 052 : Caps=off Shft=on  Fnct=off Ctrl=off Msg=WM_CHAR

First the space and '1' for selecting TI Basic

Then a lot of autorepeats from the shift key

Then the ';' key with shift on this makes a ':' send with a WM_KEYDOWN message

Then a second ';' key with shift on send with a WM_CHAR message and not allowed because WM_KEYDOWN was allready handled for that same key. etc etc.

 

and my Ti994w window then looks like this:

afbeelding.png.482e1ed668aa7944b8341c8bbc1bba5f.png

 

If this is al not "the" problem then send me a piece of code that demonstrates "the" problem.

 

Or do you maybe have a special/french keyboard that sends different codes then the American/English keyboards?

I'm asking this because if there is a problem with ',' then I also expect a problem with '<' (shift < on an American/English) keyboard. Also the '$' why don't you have a problem with the '4'. Questions, questions, question.

 

 

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