Skip to content

Implement input event specific system calls for SDL support #27

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

Closed
jserv opened this issue Aug 2, 2022 · 7 comments · Fixed by #35 or #38
Closed

Implement input event specific system calls for SDL support #27

jserv opened this issue Aug 2, 2022 · 7 comments · Fixed by #35 or #38
Assignees

Comments

@jserv
Copy link
Contributor

jserv commented Aug 2, 2022

rv32emu comes with experimental SDL support, which can render the frame via SDL2. However, it is unlikely useful to most visual applications, and there should be some relevant system calls associated with input events.

Expected output:

  1. Add syscall_poll_event amd syscall_get_input which listen to keyboard/mouse events abstracted by SDL2.
  2. Provide a neat and minimal test suite (RV32 ELF executables) for SDL support.
@alanjian85
Copy link
Collaborator

I guess we could create a fork of quakembd in the sysprog21 organization, and use mechanisms like CMake's subdirectory or Makefile directly to automate the build process of the RV32 elf. even though it may add an external submodule dependency, it would be more convenient to review the source, instead of checking the git log and find the source repo's link.

@jserv
Copy link
Contributor Author

jserv commented Aug 3, 2022

sysprog21/quake-embedded is now ready for testing. Please check git log for build instructions. It can be regarded the testbed for new SDL oriented system calls.

@jserv
Copy link
Contributor Author

jserv commented Aug 3, 2022

smunaut/doom_riscv would be the next target to facilitate SDL oriented system call. Check its forks as well.

@jserv
Copy link
Contributor Author

jserv commented Aug 8, 2022

commit 5d782b8 introduces a new system call, poll_event, which attempts to pop events from the internal event queue and returns input specific event information to the user code. The next step is to ensure both Quake and Doom can facilitate the new system call.

@alanjian85
Copy link
Collaborator

I opened a pull request sysprog21/quake-embedded#1.

@alanjian85
Copy link
Collaborator

We should have another system call to enable and disable the relative mouse mode. This system call should be used to sync with Quake, enable relative mode when the user is playing and disable it when the user opens the menu.

@jserv
Copy link
Contributor Author

jserv commented Aug 10, 2022

I opened a pull request sysprog21/quake-embedded#1.

Great. Please send a pull request which updates Quake ELF executable file along with basic operation manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants