mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
beeps are now processed sorely on the computer, added speaker driver (wip)
Former-commit-id: c8339104815a62db51e5bd26460a87f1f653a775 Former-commit-id: f22320a45734b141c4f02ca61fbd79772e32c7c5
This commit is contained in:
@@ -8,7 +8,7 @@ ROMBASIC adds global functions and constants for operability.
|
||||
\endhead
|
||||
\unemph{\_G.}runScript(\textbf{fun}: str, \textbf{env}: str) & nil & Runs Lua script \textbf{fun} with the environment tag \textbf{env}.
|
||||
\\ \\
|
||||
\unemph{\_G.}bell(\textbf{pattern}: str) & nil & Strike bell (or beeper) with pattern. Accepted pattern letters: . - (space) Aliased to \unemph{\_G.}beep.
|
||||
\unemph{\_G.}bell(\textbf{pattern}: str) & nil & Strike bell (or beeper) with pattern. See section \emph{Bell Codes} for more information. Aliased to \unemph{\_G.}beep.
|
||||
\\ \\
|
||||
computer.totalMemory() & int & Returns the total size of the memory installed in the computer, in bytes.
|
||||
\\ \\
|
||||
@@ -52,4 +52,16 @@ ROMBASIC adds global functions and constants for operability.
|
||||
computer.OEM & string & Manufacturer of the computer. If you \emph{are} a manufacturer, you may want to fill in this variable with your own company's name.
|
||||
\\ \\
|
||||
computer.beep(\textbf{len}, \textbf{freq}) & nil & Generates square wave. \textbf{len} is integer, in milliseconds, \textbf{freq} is number, in Hertz.
|
||||
\end{tabularx}
|
||||
|
||||
\subsection{Bell Codes}
|
||||
|
||||
Bell Codes are patterns for driving bell/beeper. Each code is followed by short break of 50 milliseconds.
|
||||
|
||||
\begin{tabularx}{\textwidth}{l X l X}
|
||||
\textbf{.} (dot) & Short beep. 50 ms & \textbf{-} (dash) & Medium beep. 200 ms
|
||||
\\ \\
|
||||
\textbf{=} (equal) & Long beep. 500 ms & \textbf{,} (comma) & Short break. 50 ms
|
||||
\\ \\
|
||||
(space) & Break. 200 ms
|
||||
\end{tabularx}
|
||||
Reference in New Issue
Block a user