Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Lephenixnoir | e4766ba89e | |
Lephenixnoir | 69e6445d93 | |
Lephenixnoir | 03622f0d32 | |
Lephenixnoir | 87e26a935f | |
Lephenixnoir | 4b6f66fb99 |
23
README.md
23
README.md
|
@ -5,6 +5,10 @@ by forwarding VNC framebuffers through USB. It was made as a test of the new
|
|||
USB driver features introduced in gint 2.10. The program also supports multiple
|
||||
parallel monitors and can transmit key presses on calculators back to the PC.
|
||||
|
||||
* [Demo video with explanations](https://www.youtube.com/watch?v=rXAcUgodzik)
|
||||
* [Another video of the setup](https://www.youtube.com/watch?v=of1vAH6FpIs)
|
||||
by Tituya
|
||||
|
||||
![](/images/triple-monitor-setup.jpg)
|
||||
|
||||
## How it works
|
||||
|
@ -41,7 +45,7 @@ and/or parallelizing both bottlenecks by reading directly to the display.
|
|||
|
||||
## Download
|
||||
|
||||
TODO: Direct link to the .g3a
|
||||
You can download the calculator add-in here: [CGVirtMo.g3a](https://gitea.planet-casio.com/attachments/dfb57302-f77f-4dab-bedc-922fc1f088b8)
|
||||
|
||||
You'll need to build the VNC client, though.
|
||||
|
||||
|
@ -98,7 +102,7 @@ doesn't seem to be a unified method.
|
|||
|
||||
On X, [Xvfb](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml)
|
||||
seems to allow this (but I'm not sure whether it can run alongside the normal
|
||||
display).
|
||||
display). Or you can use a section of your primary display (see below).
|
||||
|
||||
**Step 2: Exposing the virtual output on a VNC server**
|
||||
|
||||
|
@ -110,11 +114,18 @@ output, so I run two instances to get both monitors.
|
|||
% wayvnc -o "HEADLESS-1" 127.0.0.1 5900
|
||||
|
||||
# For a second monitor:
|
||||
% wayvnc -o "HEADLESS-2" 127.0.0.1 5910
|
||||
% wayvnc -o "HEADLESS-2" -S /tmp/second-wayvnc.socket 127.0.0.1 5910
|
||||
```
|
||||
|
||||
As the name suggests, wayvnc is for Wayland, but here I'm not worried about
|
||||
X-based alternatives.
|
||||
As the name suggests, wayvnc is for Wayland. There are alternatives on X, such
|
||||
as [TigerVNC](https://tigervnc.org/). The following setup
|
||||
([courtesy of Tituya](https://www.planet-casio.com/Fr/forums/topic17303-1-teaser-usb-utiliser-une-calto-comme-ecran-pour-son-pc.html#191111))
|
||||
grabs the top-left corner of the primary display:
|
||||
|
||||
```bash
|
||||
% vncpasswd
|
||||
% x0vncserver -rfbauth ~/.vnc/passwd -rfbport 5910 -Geometry 394x224+0+0
|
||||
```
|
||||
|
||||
**Step 3: Run the VNC client and calculator add-in**
|
||||
|
||||
|
@ -146,6 +157,6 @@ finally remove the outputs.
|
|||
|
||||
## Known issues
|
||||
|
||||
- The VNC client seems to lost connection with the calculator sometimes (libusb
|
||||
- The VNC client seems to lose connection with the calculator sometimes (libusb
|
||||
returning "No such device"). Not sure why yet, as it's hard to reproduce. In
|
||||
that case restart the VNC client.
|
||||
|
|
|
@ -9,14 +9,14 @@ if(DEFINED "$ENV{FXSDK_PATH}")
|
|||
endif()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(SDL2 2.0 REQUIRED)
|
||||
find_package(LibFxlink 2.9 REQUIRED)
|
||||
|
||||
pkg_check_modules(libvncclient REQUIRED libvncclient IMPORTED_TARGET)
|
||||
pkg_check_modules(sdl2 REQUIRED sdl2 IMPORTED_TARGET)
|
||||
|
||||
add_executable(cgvm_vnc src/main.c)
|
||||
target_compile_options(cgvm_vnc PRIVATE -g)
|
||||
set_target_properties(cgvm_vnc PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_link_libraries(cgvm_vnc PRIVATE
|
||||
PkgConfig::libvncclient SDL2::SDL2 LibFxlink::LibFxlink)
|
||||
PkgConfig::libvncclient PkgConfig::sdl2 LibFxlink::LibFxlink)
|
||||
|
|
|
@ -305,9 +305,9 @@ void monitor_update(struct monitor *mon, int mon_id)
|
|||
struct fxlink_device *fdev = &app.devices.devices[i];
|
||||
char const *id = fxlink_device_id(fdev);
|
||||
|
||||
if(fdev->status != FXLINK_FDEV_STATUS_IDLE || !fdev->comm)
|
||||
if(!fxlink_device_ready_to_connect(fdev))
|
||||
continue;
|
||||
if(fdev->comm->ep_bulk_IN == 0xff) {
|
||||
if(!fxlink_device_has_fxlink_interface(fdev)) {
|
||||
hlog("cgvm");
|
||||
log_("ignoring %s: no fxlink interface\n", id);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue