-
Notifications
You must be signed in to change notification settings - Fork 117
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
inital commit of elkscmd/beep #1796
Conversation
Hi @floriangit Thank you. May be I need to add codes with ifdef. |
Hello @floriangit, Thanks for the PR, the C source looks good. However, I'd like to have it live in elkscmd/sys_utils (as it is system-dependent) rather than its own directory, as that makes things easier to maintain. That would entail moving the two Makefile build lines into elkscmd/sys_utils/Makefile. Would you like to do this, or should I after commit? Regarding the Hello @tyama501,
Yes, the Thank you! |
Thanks @ghaerr and @tyama501, since you guys are more experienced I take your ideas and will try to address your suggestions! I'm a bit newbie with the github workflow (but OK with git), so let's see how I can come up with "moving" things around now. If stuck, I'll shout. I will verify your port<->value reversed theory @ghaerr and check to ignore it to just keep my version and remove the Thanks. |
Sounds good. A |
Yes...now that you're saying it :-) ....fixed! |
Thanks @floriangit, looks great. I'll commit this now and see whether @tyama501 wants to update it for conditional compilation on PC-98 as well. |
It seems that PC-98 use TIMER1 of 8253, which is not defined in ports.h yet. io port is 0x73 or 0x3FDB. On/Off is controlled by 8255A and I will try it when I have time. |
BTW, isn't it fun if it can change frequency and time by option? It seems that Ubuntu beep can do that. |
Feel free to play around, frequency and durations are just magic numbers in the code ;-) Maybe add a Japanese かわいい special sound (like the JR lines in Tokyo with those really catchy plays depending on arrival/departure at station). But that's more than 'beep' I guess.... |
It seems that someone made nice music:) |
Feel free to make |
For both PC-98 and IBM PC refinements to |
Hello @ghaerr , It seems that the "beep" is included in fd1440.img but it is not included in fd1440-fat.img for IBM-PC. beep/beep :sysutil |
It looks like the commit didn't include |
Every UNIX needs a beep. So there it is for ELKS.
A beep could be as simple as a
# echo "\a"
(orputchar('a')
), but this does only work if your TTY is local, i.e. it won't work within a telnet or ssh or qemu session. Thus this solution.Tested in qemu with the proposed changes in
qemu.sh
and on a real PC-Speaker of my 286 machine.As for the
#if 1
in the code: I wanted to re-useinb()
andoutb()
ofio.h
, but these variants did not work for me (no error, but also no sound). If you figure this out, feel free to change without notice (or let me know how to do).Also: fixed a typo in
LICENSE
.