Commit graph

9702 commits

Author SHA1 Message Date
adventuresin9
e83e2c31c7 /spim/include/ape/ureg.h: fixed missing ifndef 2023-03-07 04:26:34 +00:00
adventuresin9
57120705a1 /spim/include/ape/ureg.h: ape for spim 2023-03-07 04:21:25 +00:00
adventuresin9
f7a296922b /spim/include/ape/stdarg.h: ape for spim 2023-03-07 04:20:38 +00:00
adventuresin9
6d9a739ab6 /spim/include/ape/math.h: ape for spim 2023-03-07 04:19:06 +00:00
adventuresin9
4484b31b85 /spim/include/ape/float.h: added, and endian fix 2023-03-07 04:16:47 +00:00
adventuresin9
3d7957fbf0 /sys/src/libc/mips/tas.s: remove _tas() problem elsewhere 2023-03-06 16:41:24 +00:00
adventuresin9
b67b2eeac8 /sys/src/libc/mips/tas.s: add _tas() 2023-03-06 15:38:26 +00:00
adventuresin9
6f23cfbdec endian fix for spim 2023-03-06 15:07:45 +00:00
glenda
c2b0f9aa69 endian fix for spim 2023-03-06 14:11:13 +00:00
rodri
1ff642d9c6 ip(3): corrections to Udphdr field descriptions 2023-03-05 15:50:04 +00:00
Alex Musolino
a7016ce078 Mail: don't start plumb procs in their own note groups
Doing so means these procs hang around after acme exits.
2023-03-05 14:14:13 +00:00
Jacob Moody
633bac1e91 /sys/src/games/^(aout2gba gba/rom): basic gba toolkit 2023-03-05 07:47:21 +00:00
Jacob Moody
4fc2780a5a import tc and tl from 9ferno 2023-03-05 06:12:27 +00:00
sl
23d5a950c9 /lib/troll: Running Rust code on Plan 9 using webassembly 2023-03-05 04:34:42 +00:00
Ori Bernstein
4db748a473 diff: add missing file 2023-03-04 22:06:52 +00:00
Ori Bernstein
40486d3641 diff, merge3: refactor diff, implement merge3
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-03-04 20:03:54 +00:00
Humm
835d20a095 a.out(6): document dynamically loadable modules
The loaders can generate export tables in executables and build
dynamically loadable modules and there is a library to load those
floating around.  This documents the format of dynamically loadable
modules.
2021-11-27 15:38:55 +00:00
Sigrid Solveig Haflínudóttir
4d340ba0c4 test(1): add a missing space after -T 2023-03-01 17:28:25 +00:00
qwx
cb5b36f7c6 games/dmid: fix running status for streams
regression from previous commits; better handling
2023-02-28 23:37:21 +00:00
rodri
53d5501359 geometry(2): corrections and improvements
The dot and inner products are not the same, and neither are cross and
outer ones.
Trimmed function signatures—similar to those in draw(2)—were added to
aid in comprehension.
2023-02-25 19:24:23 +00:00
Jacob Moody
e6c6217b35 games/gb: crude serial port emulation
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-24 06:53:14 +00:00
james palmer
f5eaa9b867 etherbcm: support for newer BCM5717 series cards.
talk to the right phy for cards with many ports.
fix pci ids.
2023-02-22 21:01:01 +00:00
cinap_lenrek
cc4ac997a0 libc: fix strchr() for little endian mips (thanks adventuresin9)
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-22 23:24:54 +00:00
sl
acf50236c1 /lib/theo: I don't care if code is old. 2023-02-22 02:13:17 +00:00
Ori Bernstein
c6a92afc7a cmd/mkfile: don't recurse into test/ when looping
the test mkfile doesn't support targets like install
2023-02-20 04:22:35 +00:00
Ori Bernstein
fa0f9a4645 cmd/mkfile: make tests depend on cmd build 2023-02-20 03:24:45 +00:00
Ori Bernstein
31913a8524 mkfiles: add 'mk test' support
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-19 20:44:56 -05:00
Ori Bernstein
c3ba64f693 git: fix nil dereference in corrupt repositories 2023-02-18 18:54:13 +00:00
cinap_lenrek
cd5bafe7cb devproc: Fix a double-free reading note file (thanks Josiah Frentsos)
Oversight, was using free() instead of freenote(),
which handles the refcounting for gorup notes.
2023-02-17 11:41:59 +00:00
Sigrid Solveig Haflínudóttir
87a6e1873b libtags: work around encoders producing Ogg containers with first granule position set to non-zero outside of the first page 2023-02-11 16:52:56 +00:00
sl
7f071685e9 /lib/rsc: I am not suggesting that instrumentation be added by the Go compiler to all Go programs in the world: that's clearly inappropriate. 2023-02-11 04:29:13 +00:00
Jacob Moody
28e362d368 games/gb: implement internal window line counter
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-11 03:38:26 +00:00
cinap_lenrek
9651e5cbd6 reform: put default "console=0" in #ec
The default configuration for "console=0" should go into CONFADDR
when using /dev/reboot.
2023-02-10 22:49:19 +00:00
Jacob Moody
9f6096b431 audio/vocdec: handle non type 1 blocks better
* skip over unrecognized blocks
* correct improper read for reserved field in block 9
* read block type 2 correctly
2023-02-10 00:32:58 +00:00
Jacob Moody
89cb83a426 audio/vocdec: Creative Voice File decoder
slight correction in file.c from previous commit
2023-02-09 02:41:21 +00:00
Jacob Moody
8af84630a8 file: identify Creative Voice File 2023-02-09 00:41:08 +00:00
Sigrid Solveig Haflínudóttir
6b9e381867 /lib/rsc: "Go is the only software with telemetry you don't need to worry about." 2023-02-08 22:18:26 +00:00
cinap_lenrek
e982ca2f8d rio: refactor the keyboardtap code a bit
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-06 19:04:15 +00:00
cinap_lenrek
32acb3ebd8 7c: eliminate MOVWU r, r instructions when possible 2023-02-06 18:50:43 +00:00
cinap_lenrek
bf1dca5be2 libmemdraw: don't return Buffer copy from calc functions
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-06 18:35:02 +00:00
cinap_lenrek
74cc358c2c reform: move SAI iomux/clock initialization into probe() 2023-02-06 18:28:54 +00:00
mkf
d20cf9ff42 add standard farsi keymap 2023-02-06 17:40:26 +00:00
cinap_lenrek
bc8eb6ef45 7c: help and improve peephole optimizer
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-04 20:54:45 +00:00
Sigrid Solveig Haflínudóttir
693325b47a zuke: leave the fds alone (thanks deuteron) 2023-02-04 17:41:22 +00:00
Jacob Moody
05889d4454 ktrans: tests and various bug fixes
* 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-31 04:24:12 +00:00
Jacob Moody
006b925a2a ktrans: simplify kbdtap read loop
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-30 19:28:44 +00:00
rodri
a5c6374b77 libgeometry revamp 2023-01-29 23:11:05 +00:00
cinap_lenrek
08a080e8c2 nusb/ether: support for asix ax88179 (thanks Aidan K. Wiggins)
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-29 22:21:56 +00:00
cinap_lenrek
b883050361 sysinfo: use usbtree instead of just cating #u/usb/ctl 2023-01-29 20:35:10 +00:00
cinap_lenrek
f57df70853 nusb/kb: GAOMON S620 tablet support
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-29 16:36:57 +00:00