Jump to content
IGNORED

Js99'er


Asmusr

Recommended Posts

Just to make sure you know ... there is also JSMESS, a project that is unrelated to the mainline MAME/MESS development. They ported MESS 0.142 to JavaScript, so it is somewhat outdated (with all the glitches that have been fixed in the meantime) but still pretty impressive.

 

http://jsmess.textfiles.com/

http://archiveteam.org/index.php?title=Javascript_Mess

 

This is not intended to put you off your implementation, of course. :-)

Link to comment
Share on other sites

Just to make sure you know ... there is also JSMESS, a project that is unrelated to the mainline MAME/MESS development. They ported MESS 0.142 to JavaScript, so it is somewhat outdated (with all the glitches that have been fixed in the meantime) but still pretty impressive.

 

Yeah I know, I looked at that before I started. They are using Emscripten to compile LLVM bitcode generated from C/C++ into Javascript. So contributing that project would not really help me learning advanced JavaScript.

Link to comment
Share on other sites

Finally managed to get BASIC working. It was using a LIMI >0003 instruction, which I had never encountered before, and this made my emulation jump to the wrong interrupt routine address. It's approaching a stage where I expect things to work, so if you find any module that's not working let me know.

 

Next step would be to implement some kind of storage. I have no experience writing DSRs. Any suggestions for how this could be fast tracked?

js99er-1.3.zip

  • Like 1
Link to comment
Share on other sites

Wow well done! Brilliant job!

 

Regarding the DSR, write a very basic DSR (just a header and an unused op code) and trap on the unused opcode AND the cru address. At that point, pass control over to javascript for all facilities that the browser offers!

Link to comment
Share on other sites

Yeah I know, I looked at that before I started. They are using Emscripten to compile LLVM bitcode generated from C/C++ into Javascript. So contributing that project would not really help me learning advanced JavaScript.

I already guessed you're doing this project in order to do some JavaScript programming; I think you did say so at the beginning.

 

You're spending quite some efforts here, so I just wanted to avoid a "could've told me earlier..." :-)

Link to comment
Share on other sites

Rasmus .... I have a bug report.

 

I've just tried TI INVADERS .... the player''s ships and enemy missiles are not showing up.

 

Fixed!

 

Edit: I should have said 'fixed on the web site'. In the future I will keep the web site up to date but only post local files once in a while. Note that the web site consists of nothing but static files (html, js, css) - everything takes place at the client side.

  • Like 1
Link to comment
Share on other sites

Help! I'm trying to implement a DSR for DSK1-3, and I'm testing it with TI BASIC:

 

10 GOTO 10

SAVE DSK1.TEST

 

This is what I get:

 

* I/O ERROR 60

 

I thought this error would only appear if the error code is 0 and the COND bit in >837C is set, but the error code is 0 and the COND bit is not set. Is there anything else a DSR has to do to tell BASIC that the operation was successful?

 

Thanks - R

 

[Edit] Further info: My DSR routine is just a "B *R11". I trap when the CPU gets to this point and execute the JavaScript routine that performs the disk operation before executing the "B *R11". Any reason this should not work?

 

[Edit 2]: Solved it: I had to return with INCT R11, B *R11 instead.

  • Like 1
Link to comment
Share on other sites

Wow. So you solved the problem while posting. Incredible work you've done and congratulation with your award.

 

Thank you. Often writing about a problems helps you solve it. I should soon have a version ready where you can save and load to memory or the browser's local storage,

  • Like 2
Link to comment
Share on other sites

There is now a high level DSR for DSK1-DSK3. No sector stuff, only the standard op-codes plus directory.

 

https://googledrive.com/host/0B68J8LwEkfDyTUdTQWlVN0VPaEU/index.html#

 

You can load TIFILES (no V9T9 files) either individually, multiple files at the same time, or even or zipped archives of TIFILES. There is no support for disk images (.dsk) - the sector dump format does not seem very nice to work with.

 

Currently the disks are stored in memory (on your computer) only, so they are wiped you when you refresh the page, but not when you reset the TI. Note that nothing you load will be sent to any server, everything is running on your own computer.

  • Like 1
Link to comment
Share on other sites

Impressive! I find it nice, how you have combined learning with passion.
Can you give us some details on the javascript technology you use?

Angular JS got quite popular these days, does it has todo with it?
Or Jquery?

Thx kl99

Link to comment
Share on other sites

Well, whaddaya know?! I just tried a TurboForth RPK in the on-line emulator, and it works!! WOW!

 

However, there seems to be a problem with key scanning. It's not able to detect the : and ; keys (very important for Forth!) so I can't enter Forth definitions.

 

Load the attached RPK (unzip it - I had to zip it to get past Atariage) and start TF in 40 columns. Type WORDS and press enter. All good. Now, try this:

 

: TEST 100 0 DO . LOOP ;

 

On my system, I can't get : and ; and some other keys. In fact, when I press the @ key (which is paired with ' on a UK British keyboard) the QuickFind dialog opens in Firefox - looks like not all keypresses are being passed by the browser.

 

I'm using the very latest version of Firefox with the dumb-ass Fischer Price menus, because, you know... we're too stupid to understand menus the "old" way!

 

turboforth.zip

Link to comment
Share on other sites

Well, whaddaya know?! I just tried a TurboForth RPK in the on-line emulator, and it works!! WOW!

 

However, there seems to be a problem with key scanning. It's not able to detect the : and ; keys (very important for Forth!) so I can't enter Forth definitions.

 

Load the attached RPK (unzip it - I had to zip it to get past Atariage) and start TF in 40 columns. Type WORDS and press enter. All good. Now, try this:

 

: TEST 100 0 DO . LOOP ;

 

On my system, I can't get : and ; and some other keys. In fact, when I press the @ key (which is paired with ' on a UK British keyboard) the QuickFind dialog opens in Firefox - looks like not all keypresses are being passed by the browser.

 

I'm using the very latest version of Firefox with the dumb-ass Fischer Price menus, because, you know... we're too stupid to understand menus the "old" way!

 

attachicon.gifturboforth.zip

 

I haven't looked much at the keyboard mapping yet. On my keyboard : and ; are on the key next to the left shift key.

Link to comment
Share on other sites

Impressive! I find it nice, how you have combined learning with passion.

Can you give us some details on the javascript technology you use?

Angular JS got quite popular these days, does it has todo with it?

Or Jquery?

 

Thx kl99

 

 

I use a little bit of JQuery and Bootstrap for the user interface. But the reason you can make an emulator in JavaScript these days is because of HTML5 technologies like Canvas, Web Audio, File API and typed arrays.

And also because the performance of the JavaScript engines has improved tremendously over the last years.

Link to comment
Share on other sites

However, there seems to be a problem with key scanning. It's not able to detect the : and ; keys (very important for Forth!) so I can't enter Forth definitions.

 

I have remapped a few keys - hope it works better. I only have a Danish keyboard.

Link to comment
Share on other sites

Found a few issues:

When trying Donkey Kong, the only keys that work are; Tab, Q, Space and Enter. I have pressed every key on my keyboard with and without cap-lock on.

 

Also, it does not seem to work in Safari on Mac or iPad (Latest versions).

It displays the blank colored screen and teh log underneath only shows:

"Web Audio API detected

AudioContext: Sample rate is 44100"

Link to comment
Share on other sites

Found a few issues:

When trying Donkey Kong, the only keys that work are; Tab, Q, Space and Enter. I have pressed every key on my keyboard with and without cap-lock on.

 

Also, it does not seem to work in Safari on Mac or iPad (Latest versions).

It displays the blank colored screen and teh log underneath only shows:

"Web Audio API detected

AudioContext: Sample rate is 44100"

 

The problem with the keys was that I had mapped the PC arrow keys to both activate the TI joystick and the TI arrow keys (Fctn S, D, E, X), but apparently this was breaking Donkey Kong so they are now back to only control the joystick.

 

I don't have a Mac to test with Safari. Are there any error messages in the developer console?

Link to comment
Share on other sites

I didn't check. I'm not at my Mac right now but I do have my iPad with me. I can check later (tonight, tomorrow, not sure...)

 

One other item I forgot to add to the list was that the "Preloads" menu appears to be empty (with Safari).

The menu appears as a thin wide bubble between the word "Preloads" and the TI display screen.

 

As a side note, it all works fine in Forefox on Mac (but I'm sure you knew that would be the case :-)

 

Loving this thing though !!! Awesome work !!

Edited by thej
Link to comment
Share on other sites

One other item I forgot to add to the list was that the "Preloads" menu appears to be empty (with Safari).

The menu appears as a thin wide bubble between the word "Preloads" and the TI display screen.

 

There is probably a JavaScript error before the Preloads menu is initialized.

Link to comment
Share on other sites

I enabled the "Develop" menu in Safari 7.0.3 and opened the error console.

Here is what I got:

 

[Error] ReferenceError: Can't find variable: indexedDB

open (database.js, line 27)
Database (database.js, line 19)
(anonymous function) (js99er.js, line 24)
j (jquery-1.11.0.min.js, line 2)
fireWith (jquery-1.11.0.min.js, line 2)
ready (jquery-1.11.0.min.js, line 2)
K (jquery-1.11.0.min.js, line 2)
Link to comment
Share on other sites

 

I enabled the "Develop" menu in Safari 7.0.3 and opened the error console.

Here is what I got:

 

[Error] ReferenceError: Can't find variable: indexedDB

open (database.js, line 27)
Database (database.js, line 19)
(anonymous function) (js99er.js, line 24)
j (jquery-1.11.0.min.js, line 2)
fireWith (jquery-1.11.0.min.js, line 2)
ready (jquery-1.11.0.min.js, line 2)
K (jquery-1.11.0.min.js, line 2)

 

 

Thanks, that explains it. It should work now.

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