New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial debug printing device #35
Comments
I don't necessarily mind this feature. But I think there might be a bit of a duplication in functionality. Do you need it to behave like a serial port specifically? |
@fmahnke , Regarding the Web frontend. Do you get any output from the JS console in your browser? Sounds like it fails to load the disk image perhaps? Have a look at this project: https://github.com/realmode-games/realmode.games |
The Bochs Ultimately, I want as much of the same code as possible to run on all the targets instead of special-casing for certain ones. That's why my use case needs it to behave like a real serial port. I've also started using the output to verify the results of automated tests, which I'd like to ultimately do on real hardware as well. So it's kind of the beginning of a "network" device above and beyond a debug device. (No JS console output. I'll take a look at the realmode-games site and try again). |
I have a pass-through COM and LPT device on my TODO. I think that will serve double duty for what you want. Let's open a new issue for the WASM/JS discussion and I can help you debug it. (To the best of my abilities... I'm not a very good "web" programmer.) |
You can now specify |
Thanks! |
@fmahnke Did you ever get this going? If you have an image of your OS on a webserver (public) you should just be able to boot it from this URL: You might also want to append If you want to self host it you can download the web root from here. |
Thanks for the follow up! I've spent the last several weeks on the Forth implementation that is the user shell for the OS. I'm getting fairly close to ready for a public demo. I plan to use virtualxt as part of that demo, so I'll keep you posted on this and the packaging story as well. |
Fyi: It can be used with the Lua module system and works just like before. |
Thank you. Took me awhile to figure out how to use it, but I found the answer in serial_debug.lua. This is timely because I'm currently using COM2 in QEMU to send binary CPU profiling data to the host. That's probably a temporary measure, but it's a convenient one. I'll try adding a second serial port in vxt using the Lua script. |
The operating system I develop uses the COM1 serial port for debugging without a framebuffer. This is some code I use to transmit characters to the serial port:
QEMU and Bochs both have capabilities to print COM1 data to standard output or a file. I made a VxT peripheral to print data to stdout: https://github.com/fmahnke/virtualxt/tree/serial-dbg-pr
The device is very simple and is only tested for my use case. The
in
function always reports THRE set, so calling code may send data at any time. Theout
function echoes whatever data was transmitted to standard output usingVXT_PRINT
.This patch adds the
-Dserial-dbg
build option. When enabled, it compiles serial_dbg.c into libvxt and defines the VXTP_SERIAL_DBG macro in libvxt, SDL, and web targets. When disabled, it compiles mouse.c into libvxt as normal. sdl/main.c and web/main.c use VXTP_SERIAL_DBG to choose which device to create.It looks like the serial mouse is only supported in SDL and web frontends, so I added this there. I tried to build and run the web target, but I'm just getting a black screen when opening index.html. If there are some instructions on working with the web target, I can try again.
@andreas-jonsson are you interested in this feature? If not, I can just maintain this patch for my use case. Otherwise, let me know if you propose any changes to the approach. I could also enhance it if there are any other known use cases.
The text was updated successfully, but these errors were encountered: