summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-08games/gb: fix reversed audio channelsMichael Forney
The high bits correspond to the left channel, and the low bits to the right channel. Reference: https://gbdev.io/pandocs/#sound-control-registers Tested with pokemon crystal.
2021-02-08games/gb: various HDMA fixesMichael Forney
H-blank DMA should only transfer 16 bytes per h-blank, rather than waiting for the first h-blank and then transferring the whole size. HDMAC should read 0xff when the transfer is finished, and 0 in the high bit when the transfer is ongoing. Also, if 0 is written in the high bit, the current transfer should be aborted. Introduce two flags, DMAREADY and DMAHBLANK rather than special constants 1 and -1. If dma is non-zero, there is an ongoing DMA. If DMAREADY is set, the next chunk is ready to transfer. Reference: https://gbdev.io/pandocs/#ff55-hdma5-cgb-mode-only-new-dma-length-mode-start Tested with pokemon crystal. What was happening is that when the game was loading N background tiles into vram (each 16 bytes, so one per h-blank), it did something like this: - start an hdma transfer for N+1 tiles - after the Nth tile is transferred, it would read HDMA5, clear the high bit, then write it back to abort the transfer. games/gb would instead transfer all N+1 tiles at once, overwriting one extra tile with whatever was 1 past the end of the source array, and then would interpret the cancel request as the start of a new transfer of 16 bytes, which would copy an additional tile past the end. The end result is that every transfer would end up copying N+2 tiles instead of just N, overwriting certain tiles with whatever was after the end of the source data.
2021-02-08games/gb: fix timer divider for input clock 0Michael Forney
According to [0], input clock 0 should divide by 1024=2¹⁰, not 2¹². This caused audio to run at quarter-speed in one game I tried. [0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w Tested with zelda: oracle of seasons, and dr. mario ---
2021-02-07[9front] upas/vf: install %τ format specifierMichael Forney
upas/vf was converted to use tmdate, but the formatter was never installed. This caused it to send attachments to validateattachment with header `From virusfilter %τ%`, which always failed since upas/fs would just skip over the message.
2021-02-06mergecinap_lenrek
2021-02-06bcm64: get inbound and outbound pci window base address from device treecinap_lenrek
On the pi400, the xhci reset firmware mailbox request assumes that the pci windows match the ones specified in the device tree. The inbound window (pcidmawin) also varies now depending on the amount of memory installed. It is all pretty ridiculous, as the firmware could as well just read the pci controllers hardware register to determine the window configuration and the os could keep a nice simple 1:1 mapping (with pci dma addresses == physical addresses).
2021-02-06pc: increase number of Conf.mem[] entries from 4 to 16cinap_lenrek
2021-02-06pc, pc64: warn when running out of conf.mem[] entries in meminit()cinap_lenrek
2021-02-06test: fix expression parserAlex Musolino
The old parser code was rubbish and only worked for trivial expressions. The new code properly handles complex expressions, including short circuit evaluation. As such, the BUGS section has been removed from the test(1) man page. The description of an unimplemented feature has also been removed.
2021-02-04libdraw: enter/eenter: fix ^W removing the text on the right side of the tickSigrid
2021-02-04libdraw: enter/eenter: fix Kleft for non-ascii textSigrid
2021-02-03[9front] [PATCH] audiohda: add PCI ID for Intel C610/X99Michael Forney
--- Tested and seems to work fine.
2021-02-03acmemail(1): Nail => MailOri Bernstein
Forgot to change the program name when importing the rewrite.
2021-02-03mklib, upas/common: clean up libcommon properly (thanks mikan)Ori Bernstein
Despite pervious efforts, mk clean still doesn't remove libcommon.a* files from cmd/upas/common/. To fix this, let's tell cmd/mklib to do the job instead.
2021-02-03acme: fix use after free in warning() call (thanks igor)cinap_lenrek
2021-02-02mergeOri Bernstein
2021-02-02runq: clean up code, fix error handling.Ori Bernstein
Runq spawns a number of processes, and wait()s for them in 2 different places. Because of the way that the exit handling is done, the wait can get the wrong message. It turns out that only one place in the code needs to wait for the child, and in all other cases, it's just muddling the problem. This change adds the RFNOWAIT call to all the processes we don't need to wait for, so that the places that do need wait will always get the correct child.
2021-02-02fortunes: SATANSigrid
2021-02-02winwatch: always reflow when possible (thanks telephil9)Sigrid
2021-02-01Mail: only clear upas-maintained flags on change (thanks deuteron)Ori Bernstein
When message flags change, Mail would clear all the flags and recompute them. This would clobber internal flags like Ftodel. So, don't do that.
2021-01-31mothra: don't insert newline after div (thanks phil9)Ori Bernstein
2021-01-30ape/libm: implement log2 in libcOri Bernstein
2021-01-29Mail: fix inverted reply-all conditionOri Bernstein
2021-01-29Mail: rewrite.Ori Bernstein
Acme mail made it hard to do threading, so I wrote a new one.
2021-01-28screenlock: use initdisplay(2), top the window (thanks stuart morrow)Ori Bernstein
Screenlock should use libdraw(2) to init the display and create the window, instead of looking at the screen file directly. Also, to prevent new windows from popping up over screenlock, bring it to the top periodically.
2021-01-26news: make -a and -n get along (thanks lyndon)Ori Bernstein
currently, -a and -n are mutually exclusive. this change allows them to be used together.
2021-01-24cc: mk clean should delete cc.a$OOri Bernstein
It's surprising when 'mk clean' doesn't actually do a clean build in cc -- fix this.
2021-01-235l: fix shifts by zeroOri Bernstein
on arm32, we can do one of 4 shifts by a constant: reg<<(0..31) reg>>(1..32) ((u32int)reg)>>(1..32) reg ROT (0..31) There's no way to encode a 0 bit right shift, so when encoding reg>>0, flip it to the equivalent nop reg<<0, which can be encoded.
2021-01-23ape/libm: add back fmod, remove modfOri Bernstein
We removed the wrong file. Put it back.
2021-01-23[9front] ape: remove _SUSV2_SOURCE guard from inttypes.hMichael Forney
inttypes.h was added to C99, and this is the only header that used _SUSV2_SOURCE. Also, remove now unneeded _SUSV2_SOURCE from python mkfile.
2021-01-23[9front] nusb(4): fix typoMichael Forney
2021-01-23[9front] cc: fix comparison warning with constant LHSMichael Forney
This prevents an incorrect warning for a comparison such as `0 < x`, where x is an unsigned type. Previously, this would get normalized as `x >= 0` rather than `x > 0` when checking the comparison.
2021-01-23[9front] cc: remove unnecessary 128-bit add functionMichael Forney
Instead, just change the comparisons from <=/>= to </>.
2021-01-23upas/fs: fix swapped argument, dead codeOri Bernstein
With ntlm auth, we were trying to set 0 bytes of the auth struct to its size. The args were clearly swapped. Fix it. While we're here, remove some dead code.
2021-01-23upas/runq: fix typoOri Bernstein
one slipped in to the last commit.
2021-01-23upas/runq: bring back -aOri Bernstein
Turns out -a is useful in crontab, so bring back a simplified version of it. This only iterates through directories one at a time.
2021-01-24ape: update mkfile for removed fmod.cqwx
2021-01-23vnc: I don't like your face.Ori Bernstein
Cosmetic improvements to vnc auth code. Should not have user-visible changes.
2021-01-23upas/runq: support parallel queue processing, drop -aOri Bernstein
When running a mail queue, it's useful to run it with limited parallelism. This helps mailing lists process messages in a reasonable time. At the same time, we can remove the load balancing from runq, since the kinds of systems that this matters on no longer exist, and running multiple queues at once can be better done through xargs.
2021-01-23vt(1): document optional command argument (thanks sl)cinap_lenrek
2021-01-23ape: apply infinite recursion in fmod() fix (thanks jxy and ality)cinap_lenrek
Apply changeset 2880:cab2b9d13a73 to ape's fmod() implementation. Remove the unused math/fmod.c copy.
2021-01-23syscall: don't rely on . being in $path (thanks Silas)cinap_lenrek
2021-01-22nusb/kb: correct Mod4 scancode (125 → 91, to match what kbdfs has)Sigrid
2021-01-22aux/acpi: do not expose empty filesSigrid
2021-01-22stats: don't query battery and temp as often when using acpiSigrid
Querying battery (or temperature) using ACPI takes quite some resources, which makes the battery discharge faster. It doesn't make much sense to have it queried as often either. So, when using ACPI: 1) set battery query period to 10s minimum 2) set temperature query period to 5s minimum
2021-01-19ape/libap: fix _startbuf, check rfork return (thanks pixelherodev)Ori Bernstein
When _startbuf is invoked, it would crash on the second invocation if creating a mux segment failed. This is because the first attempt would assign the return value -1 to the global mux variable, and the second attempt would notice that the global mux was not nil, and would attempt to use it. This change only assigns to the global variable if the allocation of the segment was a success. While we're here, we should also check the return of the rfork call.
2021-01-19webcookies: remove straggling custom date parserOri Bernstein
One place missed in the tmdate purge.
2021-01-19upas/ml: touch the artworkOri Bernstein
Global variables deserve more greppable names, since I'm likely to know where they're used.
2021-01-19dd(1): update manpage to match programOri Bernstein
Document the dd changes
2021-01-19dd: error with invalid size suffixes, add 'm'Ori Bernstein
When invoking with dd with an invalid size suffix, we silently accept the suffix. This can lead to confusion, because lines like: dd -bs 1K dd -bs 1m will silently copy in 1-byte increments. This has caught people by surprise. While we're at it, megabytes are convenient, so let's have them too.