summaryrefslogtreecommitdiff
path: root/sys/src
AgeCommit message (Collapse)Author
2023-03-06/sys/src/libc/mips/tas.s: remove _tas() problem elsewhereadventuresin9
2023-03-06/sys/src/libc/mips/tas.s: add _tas()adventuresin9
2023-03-05Mail: don't start plumb procs in their own note groupsAlex Musolino
Doing so means these procs hang around after acme exits.
2023-03-05/sys/src/games/^(aout2gba gba/rom): basic gba toolkitJacob Moody
2023-03-05import tc and tl from 9fernoJacob Moody
2023-03-04diff: add missing fileOri Bernstein
2023-03-04diff, merge3: refactor diff, implement merge3Ori Bernstein
Refactor diff internals to allow multiple diffs to be done in the same process. This allows a merge3 to be implemented off the guts of diff. Tests are added, files with no end of line terminator are currently broken.
2023-02-28games/dmid: fix running status for streamsqwx
regression from previous commits; better handling
2023-02-24games/gb: crude serial port emulationJacob Moody
Timing is not as good as it needs to be, but servicable in more forgiving scenarios. Clock drift between two paired systems sits around 8 - 32 cycles when tested locally.
2023-02-22etherbcm: support for newer BCM5717 series cards.james palmer
talk to the right phy for cards with many ports. fix pci ids.
2023-02-22libc: fix strchr() for little endian mips (thanks adventuresin9)cinap_lenrek
adventuresin9 wrote: I finally found the time to get the kernel working for the Mediatek mt7688. Just the uart works now, so I still need to do the ethernet and hopefully wifi and other stuff. But it boots all the way to the bootargs ask, and then running !rc lets you run rc in paqfs. https://github.com/adventuresin9/9front-mt7688 I had a heck of a time getting it to work at first, till I tracked down an issue in strlen, that comes from the strchr code. Lots of stuff broke, and this bug also meant error messages wouldn't print properly. running this on the mt7688; int n1, n2, n3, n4, n5, n6; char *a1, *a2, *a3, *a4, *a5, *a6; a1 = "\0"; a2 = "A"; a3 = "AA"; a4 = "AAA"; a5 = "AAAA"; a6 = "AAAAA"; n1 = strlen(a1); n2 = strlen(a2); n3 = strlen(a3); n4 = strlen(a4); n5 = strlen(a5); n6 = strlen(a6); iprint("STRLEN %d %d %d %d %d %d\n", n1, n2, n3, n4, n5, n6); would get ; STRLEN 0 1 1 2 1 6 and now it gets; STRLEN 0 1 2 3 4 5
2023-02-20cmd/mkfile: don't recurse into test/ when loopingOri Bernstein
the test mkfile doesn't support targets like install
2023-02-20cmd/mkfile: make tests depend on cmd buildOri Bernstein
2023-02-19mkfiles: add 'mk test' supportOri Bernstein
9front has several tests scattered throughout the source, as well as more tests in an external 'regress' repository. Many of these tests are broken, because there is no easy way to build and track all of them. This pulls in several tests from different sources, deletes the broken tests, tests with missing data, and adds a single command that can be run from the root of the src directory to test our system. The hope is that as we develop new code, we add more tests, and eventually start running the tests on every commit. Please enter the commit message for your changes. Lines starting
2023-02-18git: fix nil dereference in corrupt repositoriesOri Bernstein
2023-02-17devproc: Fix a double-free reading note file (thanks Josiah Frentsos)cinap_lenrek
Oversight, was using free() instead of freenote(), which handles the refcounting for gorup notes.
2023-02-11libtags: work around encoders producing Ogg containers with first granule ↵Sigrid Solveig Haflínudóttir
position set to non-zero outside of the first page
2023-02-11games/gb: implement internal window line counterJacob Moody
The y offset used for windows is not based on LY but another internal window counter that is incremented alongside LY but only when the window is on screen. This fixes an issue with the dmg-acid2 and cgb-acid2 test roms. https://github.com/mattcurrie/dmg-acid2 https://gbdev.io/pandocs/Tile_Maps.html#window
2023-02-10reform: put default "console=0" in #eccinap_lenrek
The default configuration for "console=0" should go into CONFADDR when using /dev/reboot.
2023-02-10audio/vocdec: handle non type 1 blocks betterJacob Moody
* skip over unrecognized blocks * correct improper read for reserved field in block 9 * read block type 2 correctly
2023-02-09audio/vocdec: Creative Voice File decoderJacob Moody
slight correction in file.c from previous commit
2023-02-09file: identify Creative Voice FileJacob Moody
2023-02-06rio: refactor the keyboardtap code a bitcinap_lenrek
run the keyboardtap as a thread instead of a proc so that we can read input window variable. This gets rid of the wintap channel. do focus handling by tracking the last window and only send context switch when we start typing into a different window. have fromtap, totap channels created by open and use the variable also as the in-use flag. handle use nbsendp() when sending to the tap program, as it might be blocked or misbehaving. if the totap channel is full, we bypass the tap and send to input again. handle keyup on focus loss in the window thread instead (just like the artificial mouseup) it is unrelated to keyboardtap.
2023-02-067c: eliminate MOVWU r, r instructions when possiblecinap_lenrek
2023-02-06libmemdraw: don't return Buffer copy from calc functionscinap_lenrek
The calc functions get their buffers passed by value. This is convenient as the code usually modifies the buffers during iteration. However, making ANOTHER copy (odst) and returning it at the end is a bit silly. We already made a copy when passing the arguments, and the caller of the calc function can just reuse the copy it already has. So changing the return type from Buffer to void.
2023-02-06reform: move SAI iomux/clock initialization into probe()cinap_lenrek
2023-02-047c: help and improve peephole optimizercinap_lenrek
When using non signed integer variables, the registerizer would produce multiple converting load instructions on each use, which gives the peephole optimizer a hard time as it assumes that converting move instructions are there to actually change the data type (hence it cannot eleminate them). To avoid this, when we replace a variable reference with a register, we check that the move instruction is in fact the same as used in the initial load (which is based on variable type only), and replace the instruction with a full register move (AMOV). The peephole optimizer then is able to eleminate these instruction giving way better code.
2023-02-04zuke: leave the fds alone (thanks deuteron)Sigrid Solveig Haflínudóttir
2023-01-31ktrans: tests and various bug fixesJacob Moody
* exit if we get eof on kbdtap * do not nuke the line if we restore a kanji selection without okurigana * guard against unfortunate scheduling, the dictthread needs to get through all it can before the keythread processes more. In typical use, the processing was fast enough to never notice this condition but writing out a large set of input can trigger it.
2023-01-30ktrans: simplify kbdtap read loopJacob Moody
we were not handling multi null delimted messages with one read. This makes us a bit more uniform to other handling on the system as well ... something about clever code.
2023-01-29libgeometry revamprodri
2023-01-29nusb/ether: support for asix ax88179 (thanks Aidan K. Wiggins)cinap_lenrek
Tested with tp-link UE305, works well. From all other sources it seems this should also work for the 88178a, but I didn't have one on hand.
2023-01-29nusb/kb: GAOMON S620 tablet supportcinap_lenrek
The GAOMON S620 tablet is recognized as a HID device, but is restricted in the X-axis to the width of a mobile phone. I sniffed usb traffic for generic windows 10 hid driver and there didnt seem anything out of the ordinary. It turns out that this is some kind of phone feature and i suspect they have some heuristic for how windows reads the device and config descriptors to decide if this is windows or android. Checking the DIGImend project git repository, they suggest this is some kind of UCLOGIC compatible tablet, which once a series of string properties have been read will switch itself to some different mode. The report descriptor is supposed to be generated from the string properties, but the report format didnt really match theirs. So i ignore the string properties and just looked at the report data. The format after reading the magic string properties seems to be: 08 - report id bb - buttons: 0x80 = inrange, 0x04 = eraser, 0x02, barrel, 0x01 = touch xx xx - x-axis: [0x0000-0x80000) yy yy - y-axis: [0x0000-0x50000) pp pp - pressure: [0x0000-0xffff] ?? ?? - unknown So i hand rolled a hid report descriptor for this and call it a day :)
2023-01-28rio: sync keyboard state with active window on switchJacob Moody
this addresses issues with stuck modifier keys when clicking off and on from vncv with a modifier held.
2022-11-10libsec: add minimal support for the tls renegotiationAnthony Martin
OpenSSL 3.0 clients refuse to connect to servers that do not support the renegotiation extension (RFC 5746) unless the default configuration is changed to allow it. Since we do not support renegotiation, we only need to make minor changes to the initial handshake to comply with the specification: 1. For tlsClient, simply add the proper SCSV to the ClientHello cipher list (cf. RFC 5746 § 3.3); 2. For tlsServer, respond with an empty renegotiation extension in the ServerHello if we received either the SCSV or an empty renegotiation extension in the ClientHello. Since we close the hand file and never open it after the initial handshake, we can rely on tls(3) to send the "no renegotiation" alerts if subsequent handshake records are received.
2023-01-286c: copy all of packed structs in OASJacob Moody
code assumed struct was aligned to atleast LONG. For packed structs we need to copy the reaminder as well. Repro: typedef struct { char a; char b; short c; short d; char e; char f; char g; char h; } A; void main(int argc, char **argv) { A a1, a2; a2.a = 1; a2.b = 2; a2.c = 3; a2.d = 4; a2.e = 5; a2.f = 6; a2.g = 7; a2.h = 8; a1 = a2; print("%d %d %d %d %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d, a1.e, a1.f, a1.g, a1.h); }
2023-01-26games/wadfs: parse hexen map behavior lumpJacob Moody
2023-01-22lock: Fix some memory leaks (thanks steve simon!)cinap_lenrek
2023-01-22games/dmid: no longer threadedqwx
2023-01-21games/dmid: update for opl3 streamingqwx
2023-01-21games/opl3: implement real time streaming modeqwx
this pushes all responsibility for timing to opl3, absolving dmid(1) and other writers from constantly sending sync events to force opl3 to synthesize audio in between events. it reduces cpu usage and syscalls dramatically and enables applications other than dmid(1) to modify its state in real time, for instance to use it as a synth.
2023-01-15games/dmid: simplify and reuse input code for streamingqwx
2023-01-15games/dmid: add control 00h, bank selectqwx
akai mpk mini 2 and similar midi pianos: this is a nice way to select opl3 banks 0-127 using a knob, while the pads are mapped to percussions on channel 9
2023-01-15games/dmid: properly skip delay field from streamqwx
2023-01-15sdmmc: implement boot partition access for emmccinap_lenrek
We expose the boot partitions as separate units, such as sdM0 is the user data partition and sdM1 is the first boot partition and sdM2 is the second boot partition. On access, we automatically switch the BOOT_PARTITOIN_ACCESS bits in the EXT_CSD. Also, the units ctl file contains "boot enabled" or "boot disabled" if that unit is the active or inactive boot partition.
2023-01-15devsd: fix wrong range check for subunit numbercinap_lenrek
2023-01-14upas/Mail: stop splitting headersOri Bernstein
when sending messages, we do not merge headers, so splitting headers the way we did leads to invalid messages getting sent; stop doing it.
2023-01-14vt: ignore xterm Set/reset key modifier options escape sequencecinap_lenrek
2023-01-14pic: error instead of crashing on nonexistent variablesOri Bernstein
2023-01-12games/midi: fix desyncs after tempo changes in multitrack filesqwx
same as 89c60481afd8307f7825281bd561995f83a7bfb2.