-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
ZDI support broken because of PS2Controller default config #247
Comments
interesting a while back I experimented with only starting up the PS/2 mouse support when a "mouse enable" command is received. as noted against #126 this did not work, and would crash the VDP I suspect the approach you've used here will suffer with essentially the same issues, i.e. you'll have a VDP where you can never use the mouse attempting to fix the issues inside vdp-gl that prevent one potential solution to this issue, and #126, is via #36 - i.e. support a persistent configuration option for dictating that the VDP should start up with the mouse port disabled. changing the config to enable the mouse port would require a reboot, but that's probably an acceptable compromise. for this issue, i.e. allowing ZDI to work, I suspect the better solution may be to just use different GPIO pins on the ESP32. those seem to be configured on lines 12 and 13 of pins ESP26 and ESP27 are defined as the default PS/2 mouse port for fab-gl system boards, so that's the model that Bernado used when designing the Console8, as the Agon hardware design builds on the fab-gl design. this is therefore what the firmware will use for any Agon model to attempt to support a mouse. i don't understand enough about how the ZDI support in the VDP works to know if there's a reason why different ESP pins can't be used |
I did look into this further, and discussed this on Discord. ESP26 and ESP27 are the only two GPIO pins on the ESP32 chip that are bi-directional, and thus the only two that are suitable to be used for ZDI |
In newest Console8 VDP (and classic 1.0.4) ZDI interface is broken.
This is caused by ZDI pins (26 and 27 on VDP) being also used by fabgl::PS2Controller default configuration.
https://github.com/AgonConsole8/vdp-gl/blob/c16101479337e9967aa5c61b06b3fc0447e56f64/src/comdrivers/ps2controller.cpp#L1209
Simple solution I found is to recompile VDP soft with mouse disabled like this:
fabgl::PS2Controller::begin(fabgl::PS2Preset::KeyboardPort0, fabgl::KbdMode::CreateVirtualKeysQueue);
in this line:
fabgl::PS2Controller::begin();
agon-vdp/video/agon_ps2.h
Line 49 in 471dc92
I tried to disable mouse to make ZDI work again while agon is working but either I'm missing something or it cannot be done after CPU already started.
I tried these in
vdu_sys.h
(as test only):This works for me on my fork: https://github.com/mikolajmikolajczyk/agon-vdp/pull/2/files
The text was updated successfully, but these errors were encountered: