Jump to content
IGNORED

Js99'er


Asmusr

Recommended Posts

On 12/24/2022 at 9:50 AM, Asmusr said:

I have made some experiments with pointer lock and it seems to be working fine, but I haven't decided what the best way of activating it would be. Just clicking anywhere would prevent the other mouse functionality (that you can click on numbers in the menus) from being used. I was thinking either a toolbar button that you have to click before entering full screen mode, or that you have to click in the border, which is a bit obscure. Because of Christmas I don't have much time for this now.

I have added a toolbar button for pointer lock.

  • Like 5
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

10 years ago I suggested to implement a feature where you could load a list file into a debugger and follow that instead of a disassembly view as you were debugging your code.

Yesterday I finally added a simple version of the feature to https://js99er.net. In the debugger you choose List view and Load the list file. Then, as long as your program stays within the limits of the addresses in the file, you can use the List view to keep track of where you are as you run or step through the code. If you call code outside the limits of the list file, you will have to switch to one of the other views. I haven't tried it in a real situation yet, but it seems like it's working OK. Unfortunately, being a browser based app, you will have to open the list file again each time you have made a change to it.

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

I have a feature request.  It's an idea I had earlier.  Occasionally, I try to create old arcade games on the TI99, that used to use a different screen to 4:3 ...  for example, "Space Invaders", "Lunar Rescue", and "HunchBack" all used a TV on it's side for the screen, so it was longer than it was wide.  Would it be possible to add a feature that rotates the TI screen 90 degrees?  We can do this in Windows but it's too invasive as it rotates the PC screen itself.

 

In doing so,  it might get around the 4 sprites limitation one-way.  

  • Like 3
Link to comment
Share on other sites

14 hours ago, Retrospect said:

I have a feature request.  It's an idea I had earlier.  Occasionally, I try to create old arcade games on the TI99, that used to use a different screen to 4:3 ...  for example, "Space Invaders", "Lunar Rescue", and "HunchBack" all used a TV on it's side for the screen, so it was longer than it was wide.  Would it be possible to add a feature that rotates the TI screen 90 degrees?  We can do this in Windows but it's too invasive as it rotates the PC screen itself.

 

In doing so,  it might get around the 4 sprites limitation one-way.  

Kind of crazy, but if there's room for F18A, then why the hell not !? Absolutely brilliant ! I'd considering developing for that ! Sorry for those of you, who'd actually try and turn your "TV" on it's side !
 

  • Like 3
  • Haha 1
Link to comment
Share on other sites

3 hours ago, sometimes99er said:

Kind of crazy, but if there's room for F18A, then why the hell not !? Absolutely brilliant ! I'd considering developing for that ! Sorry for those of you, who'd actually try and turn your "TV" on it's side !
 

Thanks :)  Here's my example .... note the red "rotate" option in "Graphics".  This would be awesome.

example1.thumb.png.1c799cbab679f2d87d73b0c2ce704054.pngexample2.thumb.png.2b8d865f324ffa3be055d5958cce15dd.png

Edited by Retrospect
  • Like 1
Link to comment
Share on other sites

27 minutes ago, Retrospect said:

Thanks :)  Here's my example .... note the red "rotate" option in "Graphics".  This would be awesome.

It's easier to make a special version than adding an option. Try this: https://rotated.js99er.net/#/

Are you sure you don't want it rotated the other way? It seems more natural to have 'address 0' at the bottom left corner.

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

12 minutes ago, Asmusr said:

It's easier to make a special version than adding an option. Try this: https://rotated.js99er.net/#/

Are you sure you don't want it rotated the other way? It seems more natural to have 'address 0' at the bottom left corner.

Thank you Rasmus!  :):)    That'll be perfect.  I'll start creating code for this screen layout now, and see how I get on.  Nice one!

  • Like 1
Link to comment
Share on other sites

3 hours ago, Asmusr said:

It's easier to make a special version than adding an option. Try this: https://rotated.js99er.net/#/

Are you sure you don't want it rotated the other way? It seems more natural to have 'address 0' at the bottom left corner.

I also got a request 😀

 

Could you point me to the direction where in the F18a VDP a change could be made, so that the amount of available rows in 80 columns mode is doubled.

So, if the bit is set you would get:

 

- 48x80 instead of 24x80

- 60x80 instead of 30x80

 

Really would like to have such mode for seeing how that looks like in stevie. The scanline doubling could be removed in that case I guess.

I discussed that topic also with Mat for the FPGA, but it wouldn’t be easily possible to implement in the F18a mk1 because of the VHDL and lack of memory (if I recall correctly, topic must be here somewhere in the forum)

 

However really would like to evaluate that possibility in js99er, and you never know real hardware may follow (f18a mk2 feature request?)

 

 

 

 

  • Like 1
Link to comment
Share on other sites

11 hours ago, retroclouds said:

I also got a request 😀

 

Could you point me to the direction where in the F18a VDP a change could be made, so that the amount of available rows in 80 columns mode is doubled.

So, if the bit is set you would get:

 

- 48x80 instead of 24x80

- 60x80 instead of 30x80

 

Really would like to have such mode for seeing how that looks like in stevie. The scanline doubling could be removed in that case I guess.

I discussed that topic also with Mat for the FPGA, but it wouldn’t be easily possible to implement in the F18a mk1 because of the VHDL and lack of memory (if I recall correctly, topic must be here somewhere in the forum)

 

However really would like to evaluate that possibility in js99er, and you never know real hardware may follow (f18a mk2 feature request?)

As a hack, I think you can do something like this around F18A line 409:
 

this._drawScanline(y * 2);
if (this.screenMode === F18A.MODE_TEXT_80) {
    this._drawScanline(y * 2 + 1);
}
Link to comment
Share on other sites

15 hours ago, Asmusr said:

As a hack, I think you can do something like this around F18A line 409:
 

this._drawScanline(y * 2);
if (this.screenMode === F18A.MODE_TEXT_80) {
    this._drawScanline(y * 2 + 1);
}

I must be missing something. VDP memory looks good, both for tiles and color attributes. But it still does not show more than 30 lines.

 

As a test I additionally did the below (note drawHeight*2)

 

    _drawScanline(y) {
        const imageData = this.imageDataData;
        let imageDataAddr = this.imageDataAddr;

        if (this.displayOn && y >= this.topBorder && y < this.topBorder + this.drawHeight*2 ) {
            this.log.info("drawHeight y = " + this.drawHeight + ", topBorder y =  " + this.topBorder );    

 

and this is what I get:

 

js99er-20230119220550.thumb.png.e36d864279d91e8aa88ddd6592ebbd9e.png

  • Like 1
Link to comment
Share on other sites

19 hours ago, retroclouds said:

I must be missing something. VDP memory looks good, both for tiles and color attributes. But it still does not show more than 30 lines.

 

As a test I additionally did the below (note drawHeight*2)

 

    _drawScanline(y) {
        const imageData = this.imageDataData;
        let imageDataAddr = this.imageDataAddr;

        if (this.displayOn && y >= this.topBorder && y < this.topBorder + this.drawHeight*2 ) {
            this.log.info("drawHeight y = " + this.drawHeight + ", topBorder y =  " + this.topBorder );    

 

and this is what I get:

 

js99er-20230119220550.thumb.png.e36d864279d91e8aa88ddd6592ebbd9e.png

It's because of these lines (line 473-) that it duplicates. Try to comment them out.

if (y1 >= scrollHeight) {
    y1 -= scrollHeight;
    nameTableBaseAddr ^= this.vPageSize1;
}
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I can't believe it's 4 year ago I posted the parent message, but I finally changed the central drawScanline routine for the TMS9918A emulation to use WebAssembly. Did it matter? - not much. Actually my first attempts were a lot slower than regular JavaScript, and it was only after a lot of optimization that it started to catch up. It just shows that the people responsible for JavaScript execution are brilliant. Web-based emulators will always be a bit slower than native emulators, but on my machine JS99'er now takes about 4% CPU time while Classic99 takes 2%. 

 

  • Like 10
Link to comment
Share on other sites

On 3/11/2023 at 8:22 AM, retroclouds said:

Rasmus, what is your preferred way of handling changes to js99er.

In the meantime I did some modifications to my own version of js99er tailored for stevie. 

Perhaps of use for others as well. Main area of changes is in the debugger.

The standard way would be a pull request. 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 3/10/2023 at 11:38 AM, Asmusr said:

I can't believe it's 4 year ago I posted the parent message, but I finally changed the central drawScanline routine for the TMS9918A emulation to use WebAssembly. Did it matter? - not much. Actually my first attempts were a lot slower than regular JavaScript, and it was only after a lot of optimization that it started to catch up. It just shows that the people responsible for JavaScript execution are brilliant. Web-based emulators will always be a bit slower than native emulators, but on my machine JS99'er now takes about 4% CPU time while Classic99 takes 2%. 

 

Hi Rasmus, could you talk about this a little more?  Did you write the WASM opcodes by hand, or did you compile TypeScript to WASM?  (I didn't see it in a quick look at the changes in js99er on github)

Link to comment
Share on other sites

15 hours ago, PeteE said:

Hi Rasmus, could you talk about this a little more?  Did you write the WASM opcodes by hand, or did you compile TypeScript to WASM?  (I didn't see it in a quick look at the changes in js99er on github)

I'm using AssemblyScript to compile TypeScript to WASM. The code is on the assembly-script branch. Currently the deployed version has been reverted to the master branch because somebody found an issue, and I haven't had time to test the fix yet.

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

  • 3 months later...

I have a question (or feature request if you like) 😀

 

There’s this feature in JS99er, where you can use the mouse (haven’t tried the dedicated mouse mode on TI-99/4a) to point to a letter on the screen, and it is fed to the keyboard buffer. This works really great and I use it all the time.

 

My question is, if it’s possible and feasible to assign the right button click to FCTN-9.

That way you can navigate in menus on the TI-99/4a and revert back to the parent menu (as long as they use the FCTN-9 back standard). 

  • Like 1
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...