jsdf / pce

Emulates Mac Plus, PC, & Atari ST in the browser using WebAssembly
https://jamesfriend.com.au/pce-js
GNU General Public License v2.0
864 stars 154 forks source link

Interaction between page and simulated PC #5

Open dluciv opened 10 years ago

dluciv commented 10 years ago

First, it is Amazing! Great work. Thank you very much, it is the best web x86 simulator I have ever seen, really. Runs well enough on a netbook with Atom N270 CPU, nothing else to wish =).

I would like to propose 2 features.

  1. Highlevel JS API to simulate keyboard events using characters or scancodes. Will be useful to create simulators running on devices with touchscreens.
  2. Some API to interact with simulator. Preferably virtual auxilary port which can be handled in JS or something like it, so software inside simulator can interact with surrounding web page. There is a lot of great DOS software using fax-modems or even null-modems, but now all those programs are "ex-communicated". Providing such a feature can help to link them again.
jywarren commented 8 years ago

I love this - I was thinking of it could be implemented also by mounting a kind of virtual floppy disk, which when ejected would offer the user a downloadable image of the disk.

jywarren commented 8 years ago

Ah, perhaps this process shows how to mount a disk at boot time?

https://github.com/jsdf/pce/issues/2#issuecomment-58745224

jywarren commented 8 years ago

Hmm, indeed more info here on mounting disk images: https://www.npmjs.com/package/pcejs-macplus

I guess this can be used to mount any floppy from a .ROM file?

jywarren commented 4 years ago

Coming back here after a long time, it looks like this page is set up to do this from a live web instance of pce.js running a Mac Plus: https://hypercardadventures.com/

image

https://github.com/DrJosh9000/pce

I'm also interested in how to /download/ files from a disk that's been mounted in the OS. Just posted in this issue:

https://github.com/jsdf/pce/issues/20

dluciv commented 4 years ago

Wow, that's cool. Interesting to see!

I guess mapping file data onto memory disk image with some simple FS can be simpler than implementing somewhat like auxillary port. Although I do not know how they pause simulator, eject disks to modify them, etc.