Jump to content
IGNORED

TI994W emulator problem


fabrice montupet

Recommended Posts

18 hours ago, fabrice montupet said:

To re-concentrate to the subject of this thread, an other strange behavior of TI994W: 

With CALL SPRITE(#1,48,16,1,1), a white "0" should appear at row1 and column 1 but it doesn't. To see it, it must be moved to row 2 (!) 

 

Had to read the datasheet for the interpretation of the sprite attribute list again, just a small bug(ette) ;-)

 

From the TMS9918 datasheet, page 2-26:

"The first byte indicates the vertical distance of the sprite from the top of the screen, in pixels. It is defined sucht that a value of -1 puts the sprite butted up at the top of the screen, touching the backdrop area. The second byte describes the horizontal displacement of the sprite from the left edge of the display. A value of 0 butts the sprite against the left edge of the backdrop".

 

This means that:

The Y value is from -1 to 255

The X value is from 0 to 256

 

I have to add +1 to the Y value in my emulator.

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, F.G. Kaal said:

This means that:

The Y value is from -1 to 255

The X value is from 0 to 256

I think that should be:

The Y value is from -1 to 254

The X value is from 0 to 255

 

Edit: Or maybe it's more correct to say that the Y value is from -1 to 190 if we're talking about the visible values? 

Edited by Asmusr
  • Like 3
Link to comment
Share on other sites

20 hours ago, Asmusr said:

I think that should be:

The Y value is from -1 to 254

The X value is from 0 to 255

 

Edit: Or maybe it's more correct to say that the Y value is from -1 to 190 if we're talking about the visible values? 

It is al about definitions:

-1 <= Y <= 254

0 <= X <= 255

 

Link to comment
Share on other sites

On 9/30/2021 at 11:11 PM, fabrice montupet said:

To re-concentrate to the subject of this thread, an other strange behavior of TI994W: 

With CALL SPRITE(#1,48,16,1,1), a white "0" should appear at row1 and column 1 but it doesn't. To see it, it must be moved to row 2 (!) 

 

There is an updated version of Ti994w available at ti99geek.nl version 6.2b (https://www.ti99-geek.nl/Projects/ti994w/ti994w.html#ti994w)

 

Fixed the sprite problem and fixed the range checking for sprites so that portions of sprites are not displayed outside the display area (or in the border area).

I must still check this with the real iron to see how sprites are displayed when x/y position is reaching the border.

 

Added a new menu option to disdable the keyboard buffer (this does not fix the keyboard auto repeat problem yet).

 

 

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

Thank you very much  Fred ! ?

I am now able to continue my programming with your emulator, I'm very happy.

 

Here is a wish of two features I think it could be very useful for some programmers:

- A shortcut to quickly insert texts from the clipboard.

- The ability to modify the CPU Time to use (0 to 100%). The current option is : disable=normal speed execution of the 99/4A (and it is realistic) , enable= speed of light execution. This option would be very practical to adjust the simulator speed behavior in a particular context. Let me explain, the EXtBas program I am writing is consuming a lot 99/4A CPU/VDP resources,  so it will be compiled to be usable on the real computer. Add to this, I would like to add the maximum features into this program but, when running it on the emulator during the development (so non compiled) , I don't know if the real computer will be able to finally run it in a acceptable speed when compiled. So, it would be great to be able to approximately simulate the execution of the compiled program on the real computer thanks to Ti994w when launching it non compiled by setting the speed ratio. Because currently , for each optimization, I have to compile the program, to put it on a disk image, copy it on a SD-Card, and run it on the real computer with a FDC and a Gotek to see the speed result. I loose a lot of time. I hope my explanation is not confuse ?

 

 

If one day, you have some free time to add them (and the desire too)  that would be great.

In any case, thank you so much for your work.

 

Edited by fabrice montupet
  • Like 2
Link to comment
Share on other sites

Just for information, I tried CPUKiller 3 to reduce the speed of the Emulator when "Use all the free CPU Time" enabled. I obtained an acceptable result and now the ExtBas program runs near at the same speed when it is executed compiled on real computer and when executed non compiled on the emulator in Extended Basic editor,  it is not perfect because sometimes I notice a few jerks.  But it helps.

  • Like 1
Link to comment
Share on other sites

19 hours ago, fabrice montupet said:

- A shortcut to quickly insert texts from the clipboard.

 

 

Can you explain this to me Fabrice? What do you want to do? Or do you just mean some keystroke (like ctrl-v) to insert text from the clipboard instead of using the menu function? (simetimes my thinking is just to complex ;-) )

 

 

Edited by F.G. Kaal
Link to comment
Share on other sites

1 hour ago, fabrice montupet said:

yes, just a shortcut key.

I'm sorry, I should have mentioned about a keystroke

It is a rainy Sunday so here is an unofficial release. The shortcut was easy to do, a gearbox is a little bit more work and I also want to do an alternative keyboard implementation.

 

Ctrl+Shift+V it is.

(Quickly stop inserting text from clipboard or file can be done with F4)

 

Just quickly checked the TI-writer manual for Ctrl and Fctn shortcuts and I just hope that not any software is using Ctrl+Shift, Fctn+Shift or Ctrl+Fctn combinations.

Ti994w.zip

 

Enjoy ;-)

 

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

I propose a free alternative to the Shareware CPUkiller 3 and that works better and smoother ?

 

- Execute TI994w, load and run your XB program.
- Select the 'full all free CPU time' option (note the execution speed, the XB program is running very very quickly)
- Keep the program running.

- Now, execute the same program, but compiled on the real 99/4A, note the execution speed.

Of course the execution speeds are different. We will now adjust the two speeds:

 

- On MS-Windows, execute CMD and launch the Configuration panel command:
'Control.exe'
- Go to Power Options.
- Create a personalized power profile, select Next, Create.
- Select advanced setting for your personalized profile.
- Select Modify Advanced settings.
- Go to CPU power performances.
- For 'Minimum processor State', chose a value that correspond to the slowdown speed you want, try different percents to find the one that will slowdown your computer for getting the same execution speed on the two computers.
- Put the same percent for 'Maximal processor State'.
- Apply

 

Then:

- Execute CMD and type the following command:
'powercfg –list'
- Copy the GUID number of your default power plan (Select it and copy it with CTRL-C )
- Don't close the CMD window.
- Right-click on your Desktop and choose New > Shortcut.
- Type: powercfg.exe /setactive GUIDNUMBER1 and click Next. (GUIDNUMBER1 is the number that you have copied, paste it with CTRL-V). Don't forget the space after setactive.
- Give a name to the shortcut, like "Normal Speed"
Returning to the CMD window, redo the same operation for the second power plan:
- Copy the GUID number of your personalized power plan reducing the CPU speed. (Select it and copy it with CTRL-C)
- Right-click on your Desktop and choose New > Shortcut.
- Type: powercfg.exe /setactive GUIDNUMBER2 and click Next. (GUIDNUMBER2 is the number that you have copied, paste it with CTRL-V)
- Give a name to the shortcut, like "Slowdown Speed"

Now you have two shortcuts created on your desktop, one for each power plan, The first sets the speed of your computer to normal and the second slowdown its speed when it will be needed.
Like this, I personally can continue to add feature to my XB programs and see what it (approx.) should be on the real computer after compiling.

 

Note that I use a french MS-Windows, I do my best  to translate the messages in English but they could be a bit different on a real US MS-Windows.

 

So, Fred, I think that the gearbox is not really necessary ?

 

  • Like 2
Link to comment
Share on other sites

There is one point where the speed can't be slowdown: The disk access. The emulator reads FIAD and DOAD files instantaneously and it is extremely practical in most of situations, but not realistic if one wants to simulate the real computer behavior.  Is there a way to add an option simulating the slow disk access of a real TI floppy disk?

Link to comment
Share on other sites

Until there is some support in the emulator you may use the XB256 CALL LINK(“SYNC”) with the CALL LOAD(-1,N) with n/60 resp. n/50 seconds delay, i.e. a disc operation takes 2 seconds on a 50Hz European console/emulator setting:

 

CALL LOAD(-1,100)

<Do disk stuff>

CALL LINK(“SYNC”)

 

When the disk stuff is slower than 100 ticks, the sync just continues, otherwise it waits.

 

Without XB256 you may setup a sprite in the invisible area row>192 with horizontal speed 1 and wait for it to pass a certain column in busy waiting:

 

1000 CALL SPRITE(#1,36,9,198,1,0,1)

1010 CALL POSITION(#1,R,C) :: IF C< 100 THEN 1010

 

You may remove the code when the program is finished...

 

  • Like 1
Link to comment
Share on other sites

Finally got my alternative keyboard working properly. These functions uses the WM_KEYDOWN and WM_KEYUP messages for setting the correct CRU bit for the keyboard matrix in stead of if using the WM_CHAR messages. Now the keyboard is more responsive and no more keyboard repeat delay. I get a lot further now in Parsec, instead of being hit by a missale in the first 3 seconds  I get to the next round where I crash the space craft trying to refuel. I still suck in playing computer games though.

Which type of keyboard is an option in the menu.

 

Now I am going to spend some time for some configuration for delaying the DSK access and CPU speed.

 

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

I  return to the CALL SOUND problem subject. I think that the ti994w emulator has really some sound problem with XB256.
I verified again the code of my XB256 program and I didn't see any problem with it.  Despite this, the program crashes when it plays a sound on any PC computers on which I launched ti994w. As all of them have a different audio chip and driver, we can put aside a PC compatibility trouble.  
I tried an other program: "I'm not saying it's aliens" by Retrospect. When I launch it on XB256 and ti994w the program hangs too when it generates a sound. And when I removed all the CALL SOUND in the code, it works fine, like my XB256 program when I remove the CALL SOUNDs too .

  • Sad 1
Link to comment
Share on other sites

22 hours ago, fabrice montupet said:

I  return to the CALL SOUND problem subject. I think that the ti994w emulator has really some sound problem with XB256.
I verified again the code of my XB256 program and I didn't see any problem with it.  Despite this, the program crashes when it plays a sound on any PC computers on which I launched ti994w. As all of them have a different audio chip and driver, we can put aside a PC compatibility trouble.  
I tried an other program: "I'm not saying it's aliens" by Retrospect. When I launch it on XB256 and ti994w the program hangs too when it generates a sound. And when I removed all the CALL SOUND in the code, it works fine, like my XB256 program when I remove the CALL SOUNDs too .

Is there something to see in the debug window: Menu View -> Debug and in the debug window menu Devices -> Sound. Do you see something like this:

afbeelding.png.25c67d5086558b0325fdd359727089ab.png

 

To tackle this problem I need some code.

 

Fred ;-)

Edited by F.G. Kaal
Link to comment
Share on other sites

I don't know if the information collected thanks to the debugger will help you. I hope ?

For example: When my program executes a series of:

CALL SOUND(10,330,0)

in a loop, it very quickly hangs.  This is just an example, because it crashes in any case where a CALL SOUND is executed.

Here is the debug.txt content: (I opened the file DEBUG.TXT, run my XB256 program, it played a sound and hanged right after, I closed the file DEBUG.TXT and here is it:

Debugfile opened [DEBUG.TXT]
SOUND: >83 >15    Tone 1: Frequency: >153 -  339 (329.97 Hz)
SOUND: >A0 >00    Tone 2: Frequency: >000 -    0 (inf Hz)
SOUND: >C0 >00    Tone 3: Frequency: >000 -    0 (inf Hz)
SOUND: >90        Tone 1: Volume   : >00  -    0 (-0 dB)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >9F        Tone 1: Volume   : >0F  -   15 (off)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >83 >15    Tone 1: Frequency: >153 -  339 (329.97 Hz)
SOUND: >A0 >00    Tone 2: Frequency: >000 -    0 (inf Hz)
SOUND: >C0 >00    Tone 3: Frequency: >000 -    0 (inf Hz)
SOUND: >90        Tone 1: Volume   : >00  -    0 (-0 dB)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >9F        Tone 1: Volume   : >0F  -   15 (off)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >83 >15    Tone 1: Frequency: >153 -  339 (329.97 Hz)
SOUND: >A0 >00    Tone 2: Frequency: >000 -    0 (inf Hz)
SOUND: >C0 >00    Tone 3: Frequency: >000 -    0 (inf Hz)
SOUND: >90        Tone 1: Volume   : >00  -    0 (-0 dB)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)
SOUND: >9F        Tone 1: Volume   : >0F  -   15 (off)
SOUND: >BF        Tone 2: Volume   : >0F  -   15 (off)
SOUND: >DF        Tone 3: Volume   : >0F  -   15 (off)
SOUND: >FF        Noise : Volume   : >0F  -   15 (off)

 

May be, the best thing would be that you launch any  XB256 game that uses CALL SOUND like the one of Retrospect and see if there is any information explaining this sound problem with your debugger ?

 

Link to comment
Share on other sites

Of course! ?

This is why I said that my program was just an example, as the one of Retrospect.

Just the little program you wrote can reproduce the problem (when I run it with XB256 and ti994w, the emulator has crashed when the I variable reached the value 125) . Because the problem is not the XB256 program but the CALL SOUND execution in XB256 using this emulator.

I even haven't tried after a compilation, because that crashes just using XB256.

Edited by fabrice montupet
Link to comment
Share on other sites

On 10/20/2021 at 11:47 PM, fabrice montupet said:

Of course! ?

This is why I said that my program was just an example, as the one of Retrospect.

Just the little program you wrote can reproduce the problem (when I run it with XB256 and ti994w, the emulator has crashed when the I variable reached the value 125) . Because the problem is not the XB256 program but the CALL SOUND execution in XB256 using this emulator.

I even haven't tried after a compilation, because that crashes just using XB256.

I was hoping you would present a ready to run and crash example for me, now I have to dive into XB256 and looking for trouble ;-)

 

What if you single step through the code when the program hangs, can you recognize some kind of loop? I expect the XB256 program is checking something that is not in my emulator yet.

 

Anyway, I can delay the CPU speed (0-10 us) and delay reading and writing of fiad and doad files (0-250 ms) now with my Ti994w emulator.

Also added a context menu (right mouse click) for the TI window for copying text or bitmap or pasting clipboard or file.

I wil release this version when this strange sound problem is solved.

 

Link to comment
Share on other sites

5 hours ago, F.G. Kaal said:

I was hoping you would present a ready to run and crash example for me, now I have to dive into XB256 and looking for trouble ;-)

 

Yes, I could have by extracting a subprogram including several CALL SOUND in chain but as any XB256 program using a series a CALL SOUND generates the problem I thought that it was useless. I'm sorry.

That said, the single line program presented given by Senior Falcon generates the CALL SOUND problem that I  noticed, you can use it for ti994w tests ?


Thank you for all the new improvements !

 

Link to comment
Share on other sites

13 hours ago, fabrice montupet said:

Yes, I could have by extracting a subprogram including several CALL SOUND in chain but as any XB256 program using a series a CALL SOUND generates the problem I thought that it was useless. I'm sorry.

That said, the single line program presented given by Senior Falcon generates the CALL SOUND problem that I  noticed, you can use it for ti994w tests ?


Thank you for all the new improvements !

 

 

Those XB256 demo's look faboulous ?

There is a demo that contineous plays that tombstone city tune; But I haven't noticed any problem yet with sound.

 

Also I haven't noticed any problems with this single line program: 10 FOR I=110 TO 1100 :: CALL SOUND(50,I,0):: PRINT I;:: NEXT I

 

Maybe I'm missing the point here.

 

What module must I use? The normal TI Extanded Basic I suppose; Those demos work with this.

And what are the steps I have to take with XB256?

 

 

Onother question I have; Do you still have all those noise1.voc to noise8.voc in the Ti994w directory?

(This is just some other thing I have to change like done in Classic99)

 

 

 

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