6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 4:49 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: SBC and Z flag
PostPosted: Wed Aug 16, 2023 3:50 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
NoLand wrote:
What's somewhat interesting is that nobody noticed or reported this in all those years. Even more so, as the same emulation (with a few additions for cycle accurate timing) is powering the PET 2001 emulator at https://www.masswerk.at/pet and not a single program seems to have been affected by this. (So, for all practical means, this seems to be quite a rare edge case.)

Hi, Norbert.

In the recent past I have used your PET 2001 emulator for quick-and-dirty tests and demonstrations, but it now appears to be broken on Windows 8/Edge and Windows 7/Chrome. I know I shouldn't be messing around with old browsers and crummy OSes, but do you have any insights into my problems? I miss having a neat old PET just a mouse click away.

Thanks.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Thu Aug 17, 2023 6:19 am 
Offline

Joined: Mon Aug 14, 2023 10:18 pm
Posts: 7
And, finally, the "virtual 6502" emulator also passes Bruce Clark's extensive BCD mode test (http://www.6502.org/tutorials/decimal_mode.html#B) along with the full Dormann test suite.

(There's also a hidden 65C02- config flag that adjusts BCD-specific behaviour and the timing of some instructions. Notably, it does not introduce any of the new, 65C02-specific instructions, nor does it disable any of the "illegal" NMOS 6502 instructions. Hence, as this is merely a basic support and not a proper emulation by any means, this is not recommended for use and the flag is not exposed in the UI.)

-- Norbert


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Thu Aug 17, 2023 7:05 am 
Offline

Joined: Mon Aug 14, 2023 10:18 pm
Posts: 7
barrym95838 wrote:
NoLand wrote:
What's somewhat interesting is that nobody noticed or reported this in all those years. Even more so, as the same emulation (with a few additions for cycle accurate timing) is powering the PET 2001 emulator at https://www.masswerk.at/pet and not a single program seems to have been affected by this. (So, for all practical means, this seems to be quite a rare edge case.)

Hi, Norbert.

In the recent past I have used your PET 2001 emulator for quick-and-dirty tests and demonstrations, but it now appears to be broken on Windows 8/Edge and Windows 7/Chrome. I know I shouldn't be messing around with old browsers and crummy OSes, but do you have any insights into my problems? I miss having a neat old PET just a mouse click away.

Thanks.


Hi,

could you go a bit more into detail what's broken (and since when)? I really try to keep this as compatible as possible.

However, following popular (and urgent) requests I recently rewrote the keyboard implementation, in order to support multiple, concurrent key presses. (Which must rely on different properties of the keyboard events than previously, also properties which I tried to avoid in the past, since Chrome had once a flawed implementation of this. However, despite my fears, it worked fine for beta testers on various systems. Moreover, this should be future proof, as the method previously used is now officially deprecated.) — May it be this?
Also, please try to reload from origin/source. (E.g., on Firefox and Chrome/ium by CTRL+SHIFT+R.)

Norbert

PS: If you could risk a peek into the browser's JS console for any errors, this would be of great help!

Moreover, there's still the now rather outdated old version (but this features another CPU emulation by Tom Skibo): https://masswerk.at/pet/v1.html


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Thu Aug 17, 2023 7:22 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
It's past my bedtime, but I'll try to PM you tomorrow to avoid drifting too far off topic in this thread. Long story short ... yeah, it could be the new keyboard code, because I make it to the READY prompt just fine before losing responsiveness.

[Edit: Tom's old version works great for me, so I'll just bookmark that until I update my systems.]

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Thu Aug 17, 2023 9:26 pm 
Offline

Joined: Mon Aug 14, 2023 10:18 pm
Posts: 7
Regarding the PET 2001 emulator on older systems:

I updated (backdated?) the keyboard handling for additional support of an older API (which isn't found on current browsers) and fixed an issue elsewhere, where old browsers would hick up over the syntax of a 5-byte Unicode regular expression (in order to recognise the Unicode range for legacy systems).

The emulator runs without issues on the following system, which is the oldest "modern" system, I have:

OS X 10.9.5 "Mavericks" (MacPro, Late 2008 – this is 15 years old, now, with its original graphics card)

under the following desktop browsers (which are respectively the last official builds for this system):

* Chrome 65 (64-bit)
* Firefox 78.15.0esr (64-bit)
* Safari 9.1.3

(I other words, I do not have access to a desktop browser, this wouldn't run on.)

This correlates with an updated system as of ca. 2016/2017 and should be fairly backward compatible to earlier systems and builds.
(As far as I can see, the above fixes concern Safari 9 only. At least, I can confirm that it did run on Firefox 78esr before this.)

BTW, V 1.0 isn't really Tom's version, either (it's only the CPU emulation). But there is nothing in my CPU emulation, which wouldn't run on any 20 years old browser.

(The compatibility hurdle for the CPU emulation is really the JS strict equality operator "===", which is supported by Chrome 1, Firefox 1, Safari 1, Opera 4, and Edge 12. For other parts of the emulator, it's about the FileReader API for importing any files/programs, which is Chrome 9, Firefox 3.6, Safari 6, Opera 11, and Edge 12. The question of CSS features used/required by the UI is much more finicky and probably the real breaking point, as this is a constantly moving target. — Which is, BTW, the same compatibility target as for the "virtual 6502" suite, including the emulator.)

P.S.: There's still the possibility of the screen updates clogging up the system and rendering it unresponsive to input, in which case I have still a trick up my sleeve. If this is an issue for you, please contact me. (As I do not want to post a test-URL here, publicly.)


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Thu Aug 17, 2023 10:59 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
I regret being unqualified to help you diagnose this, but I can confirm that your recent version works fine for me with Windows 10/Edge but still seizes up with Windows 7/Chrome Version 109.0.5414.120. Windows 8/Edge will have to wait until I get home from work. My last Computer Science class occured deep within the previous millenium, and my modern I.T. skills are in a sorry state of ignorance.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Fri Aug 18, 2023 12:16 am 
Offline

Joined: Mon Aug 14, 2023 10:18 pm
Posts: 7
According to semi-official documentation (Mozilla Developer Network or MDN), the keyboard handling should work with

* Chrome 51 (this had a few bugs/issues in the beginning)
* Firefox 2.3
* Opera 38
* Safari 10
* Edge 12

and, with this older API, also with Safari 1.2 and newer.

Back in the last millennium, I used to know much about OS and browser interoperability, but this has somewhat dwindled, since… :-)
I really don't know what Win 7 would do differently regarding the keyboard. (Back then, I avoided this approach, because there were still buggy versions of Chrome around and other approaches worked just fine.) But, maybe, a test page may help.


Top
 Profile  
Reply with quote  
 Post subject: Re: SBC and Z flag
PostPosted: Fri Aug 18, 2023 5:29 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
NoLand wrote:
There's still the possibility of the screen updates clogging up the system and rendering it unresponsive to input, in which case I have still a trick up my sleeve. If this is an issue for you, please contact me. (As I do not want to post a test-URL here, publicly.)

That possibility is becoming more likely, since your keyboard test url seemed to work fine for me on Windows 8/Edge Version 109.0.1518.115 :idea:

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: