ct6502 / apple2ts

Apple II Emulator in TypeScript
Creative Commons Attribution Share Alike 4.0 International
62 stars 10 forks source link

Add WebSerial support #61

Closed code-bythepound closed 7 months ago

code-bythepound commented 7 months ago

First cut at webserial support. Like WebMidi, WebSerial allows accessing the system's serial ports from the browser. This allows the emulated super serial card to drive a physical device connected to the system. The UI allows connecting the SuperSerial to the builtin imagewriter or allows selection of an external device. The dialog is provided by the browser and I can't customize it, nor can I query the name of the selected port. If you select "cancel" in the dialog it will revert to built in imagewriter. I have found that not all usb serial devices seem to support buffering and flow control correctly. A good test is to try to print from MousePaint. If it gets about half way through and then begins printing junk, your device may not be compatible. Real serial ports (at least on Linux) seem to work well. Icon was drawn by me in Inkscape.

code-bythepound commented 7 months ago

Will fix errors. :(

code-bythepound commented 7 months ago

I don't regularly run 'npm run build' so i didn't see the errors. Hopefully i fixed them appropriately.