#general-chat
1 messages ยท Page 58 of 1
[clever@amd-nixos:~/apps/rpi/roms]$ ls -lh *.bin
-rw-r--r-- 1 clever users 32K May 29 2022 pi400-0xdaaa69e8.bin
-rw-r--r-- 1 clever users 64K May 3 2020 pi4-maskrom.bin
-rw-r--r-- 1 clever users 20K Oct 28 2020 rpi1-230aad04.bin
-rw-r--r-- 1 clever users 20K Oct 28 2020 rpi1-55a4377c.bin
-rw-r--r-- 1 clever users 20K Oct 28 2020 rpi2-1077df95.bin
-rw-r--r-- 1 clever users 32K Oct 28 2020 rpi3-9080d9b6.bin
i also have a boot rom for each model, but not all of the revisions within one
another potential DMCA case, which is why i havent shared it
] db 0x60000000 0x5000
if you want a rom, just boot up little-kernel, and run this hexdump command in the prompt
and the whole rom will just spill out
Get hundreds of people to each publish a fraction of it ๐
Espressif are good on the customer experience and supply to individuals side. They don't seem to boast about being open or anything
the only real protection ive found, is that the official start.elf binary somehow turns the ROM off
so if you try to dump things from arm, after booting fully, the rom isnt on the bus
The more I hear about the pi, the more it reminds me of a game console
but a custom start.elf intercepts that, and can just dump it
one of the early ipod's used a videocore SoC, back before VC had arms
so the entire OS ran on the VPU core
I mean, if it's Turing-complete.... :P
and at some point in the SoC's life, an engineer said, "why not throw an arm in there, we might need it later"
and thus, the bcm2835 was born
the arm is very much a slave/co-processor within the soc
Please tell me the ARM is an AXI/AHB peripheral to the videocore :P
the VPU is a dual-core RISC-like design
32 registers, int or float in the same register, 32bits each
some of the upper registers are special purpose, like arm (stack/status/pc)
all memory access is via dedicated load/store opcodes, none of that mov insanity x86 has
each core has a 64x64x8bit vector register bank
Listen. Very few things in this world compare to x86 assembly.
:P
at 0x7E00B000 in the address space, is the arm control registers
thru that, you can:
- turn the arm on/off
- allow jtag on the arm, and route it to either the gpio header, or an internal bitbang unit
- access some FIFO's that bridge the arm/vpu boundary
- control what parts of memory the arm is allowed to touch
- even block userland access to MMIO!
It's like a reverse of ship of Theseus, with multiple jet engines and a carbon fiber shell retrofitted onto a Phoenician merchant ship core
there is a dedicated broadcom custom MMU, that splits the "1gig physical" view of the arm, into 64 pages of 16mb
for each page, you can point it anywhere in the VPU's bus space
so, you can partition the arm off in its own 64mb pocket of ram, where it can just never touch the DRM keys or VPU firmware
And for this we are immensely grateful.
Hello, Iโm new and wondering where I can ask a troubleshooting question about a raspberry pi lcd screen. Thanks!
you can just not map MMIO to the arm, so the arm has no way of escaping its jail
for (int i=0; i<16; i++) { int temp = a[i] * b[i]; if (store) c[i] = temp; if (accumulate) accumulator[i] += temp; }
with the vector extensions on the VPU, you can perform this entire line of code in 2 clock cycles
and it can run back2back, with nearly 100% uptime, at the full 500mhz
the question then, is what fun can you do with this?
for most operations, it supports 8/16/32bit int
but for mult, the inputs are 16bit max, but output can be 32bit
sadly, no floats in vector mode
yep
You might try #help-with-projects - that's kind of a catch-all channel. If the raspberry pi is an RP2040 board and you're using Arduino, you could try #help-with-arduino or if you're using CircuitPython you could try #help-with-circuitpython - but maybe start with #help-with-projects unless someone there sends you somewhere else ๐
it does have vectorized bit shifting and masking
so you can shift your fixed-point stuf around
Ok ty
I see you already found it ๐
thats one thing i did implement
https://github.com/librerpi/lk-overlay/blob/master/app/fir/pink.S
.global do_fir
do_fir:
v16ld HX(0++,32), (r1+=r2) REP r0
v16ld HX(0++,0), (r3+=r2) REP r0
vmul32.ss -, HX(0++,0), HX(0++,32) REP r0 CLRA SACC
vgetaccs32 -, -, 15 SUMS r0
rts
just please don't cross-post unless someone sends you to another channel ๐
first, load 2 arrays, both are uint16_t[r0*16] in size
then multiply each element, and add the sums to the uint48_t accumulator[16]
Crosspost meaning submit the same question to multiple channels?
then sum all 16 accumulators, >>15 the sum, and shove it into r0
Yup! I think asking where to post was fine ๐ but asking a technical question in multiple places is usually frowned upon. Also since it's the weekend things may be pretty slow, so it may be a while till someone can get back to you.
and boom, you can now apply a FIR filter with between 1 and 1024 coefficients
the coefficients array must be a multiple of 16, but you can just pad it with 0
anything*0 == 0 of course!
Got it thanks
@raw jasper but, there is a trick you can pull off, for FIR filters
lets say the table is 64 elements long
if i load 64+16 elements into the vector array
then i can run part of the FIR loop twice
and produces samples N and N+16
boom, for the cost of loading an extra 16 elements, i avoided loading 64 elements in the future
dram bandwidth down massively, at the cost of having a 16 sample latency
arm vector extensions cant do this, because you cant store the whole bloody uint16_t[64] in registers at once
that's cool
you can also just omit loading the coefficients array, halving your dram bandwidth
its constant, so why load it each time?
but, that assumes you have exclusive use of the vector registers
and now your back to the same problem as x86/arm, when do you context-switch the fpu
I mean, if (all) you're doing is some random DSP, you probably do
yeah
the official rpi firmware, protects the vector state with a mutex, and threads cant migrate to another core
so you grab the mutex, do your thing, then release it
but, you can be pre-empted mid computation
and the vector state will wait for you to resume execution
is your state stored somewhere?
nope, other threads are just banned from touching the vector core
they would block on the mutex
and wait until its their turn
But you just said applications can be preempted
Unless I'm missing something, which, you know, it's late over here :P
you can lose control of the cpu, and the scalar registers (32x4byte) get context-switched out
but the vector registers dont get context-switched
anything else that wants to use the vector, must grab a mutex, where it will then block, until your done
Ah, so the other app tries to use the vector registers, and gets blocked by the mutex
yep
with this, you give the firmware the addr of a function, and 6 args to pass to it
the firmware will grab the vector mutex for you, and execute whatever you pointed it at
and when that function returns, the mailbox tells you what was left in r0 (the return value)
Is there a public programming manual for the videocore somewhere?
ah, I was thinking official broadcom stuff :P
the official compiler is behind NDA
ah
https://github.com/itszor/vc4-toolchain is the RE'd compiler, binutils+gcc
binutils supports the vector opcodes
but gcc only supports the scalar opcodes
so any vector fun you do, must be entirely hand-written asm
I wonder whether there are any SoCs with publicly documented vector accelerator cores
the 3d core on the rpi is documented far better, with official docs, and is vector only
the VPU is very arm-like, mainly scalar, with vector extensions
Ah, so there's the videocore, which is for 2d, and the.... 3D core, which is something different? (Mali GPU?)
while the QPU is vector only, every opcode runs 16 times, with 16 banks of registers and 16 inputs
https://docs.broadcom.com/doc/12358545
the copy i got, was saved as VideoCoreIV-AG100-R.pdf
the HVS/PV/DPI/DSI/VEC/HDMI make up the entire 2d subsystem
the v3d makes up the 3d subsystem
"video core" is just the collection of everything, all of the above, the VPU, and the uart/i2c/dram/other
the HVS is a sprite-only gpu
for each sprite, you define:
- its XY on screen
- its source WH
- if scaling is in effect, the WH on screen
- the addr/stride of each plane in ram
- the pixel format
- hflip/vflip flags
- alpha control flags
this demo has 13 sprites, all using the same image data
and uses basically 0 cpu power
@raw jasper that all make sense so far?
the pixel format for the sprite can be anything in this list
so youve got rgb332 all the way to rgba8888
and you have several planar variants of yuv
the HVS automatically converts that to rgba8888 and automates alpha blending of the sprites
and supports both pre-multiplied alpha, and non
the HVS takes a max of 3 sprite lists, and generates 3 FIFO's of pixels
for the pi0-pi3 family, there are then 3 pixel valves
the PV stores all of the video timing parameters (like a crtc in x86 land)
and the PV will throttle the flow of pixels to a defined pixel clock, generate hsync/vsync, and turn flow off during blanking
the PV then feeds the pixels and control data to an encoder
which turns it into various video formats
only 1 encoder can be active, for each PV
dsi0 isnt exposed on the main rpi boards, only the compute modules
so you have no choice with PV0
smi isnt documented, so you have no choice with PV1
Back to vector acceleration on the rpi
so your only real choice, is vec(ntsc/pal) or hdmi
and if you want to enable dpi and/or dsi1
there are at least 5 cpu clusters in the "video core"
1: arm
2: vpu
3: v3d
4: isp
5: vce
the ISP is heavily involved in pixel format conversions, scaling, bayer->yuv, and camera correction
the VCE is involved in vc1/mpeg2/h264 encode/decode
the VPU mostly just doing non-integer samplerate conversion on audio, for the analog audio port
and runs the firmware that coordinates everything
v3d runs all of the shaders for 3d jobs
VCE has shown signs of being turing complete
v3d is turing complete, but your conditional opcodes have an extra flag, "any lane" or "all lanes"
ISP is mostly a black-box still
the original scalar mandlebrot from upstream LK
https://github.com/littlekernel/lk/blob/master/lib/gfx/gfx.c#L730
VPU was running at 243mhz
@raw jasper this would be a mandelbrot somebody else wrote, using floats (i forget if its hw or sw float) in scalar mode, on the VPU
it takes ~10 seconds to render 1 frame
final version of https://github.com/librerpi/lk-overlay/tree/master/app/vpu-mandelbrot
VPU accelerated, completing a frame in 150ms, at 486mhz
i found a guy in another discord, that wrote mandelbrot in VPU asm, with vector opcodes
it does a frame in ~90ms
10s->90ms is a pretty big speed leap
Has anyone used the QPUs?
there is an official QPU fft example
and with mesa, you can just run your own shaders, but i dont think compute shaders work yet
i also have baremetal QPU examples
Why is it not often used for accel, since it does float?
the mesa stack doesnt support compute shaders
so you have to bodge something into the rendering stack
(presuming you are hitting the bare metal -- don't worry, I'm reading what you write :P)
ive also not figured out how to do compute jobs in baremetal
this is the official QPU FFT example, it relies on the broadcom GL stack
and uses a mailbox call to fire the job off
back when broadcom first opened the v3d/qpu docs, somebody made a project called "hackdriver", that rendered a single static triangle
the broadcom GL stack sits somewhere in linux land, right?
https://github.com/cleverca22/hackdriver/
i forked that, and extended it more
the broadcom GL stack lives on the VPU within start.elf
the linux side is just a bunch of RPC shims in a libGL.so shell
......ok o.o
in theory, that broadcom GL stack supports DRM and secure video playback
you could send some encrypted h264 to the VPU, and decrypt+decode it into a protected frame
you can then use that frame as a texture in the broadcom GL
and now the render is "tainted" and can only be played over hdmi hdcp
and even if you compromise the linux side, you can never get the raw video frames
but all of the DRM support logic is missing, and the rpi firmware doesnt setup the security
the hw is capable, but the firmware has been lobotomized
the mesa stack runs the entire 3d system from linux
...by RPCing an oracle binary living in the firmware
mesa doesnt do that
mesa/linux have proper drivers, that directly control the v3d core
Ah, OK
Black Mesa does
So, default raspbian talks to the blackbox oracle
depends on the model
pi0-pi3 have low ram, and the broadcom GL is better at managing that
pi4 v3d isnt compatible with broadcom GL, so mesa must drive the show
but pi0-pi3 can be switched to mesa GL, at the cost of more ram usage
I'm trying to find a gif of the half-life microwave, but no dice
the VPU firmware and palmos on the treo650, both use a thing called a relocatable heap
any time you alllocate an object, you get a handle to it, not a pointer
Wait, so broadcom (the chip manufacturer) hasn't provided a GL stack for their own product?
its more, that they didnt want to bother maintaining the VPU side of things, and making more of that RPC mess
so they skipped it, and just gave linux full control from day 1
that's actually pretty cool, that they actually mainlined oss drivers
they are moving towards linux managing everything, piece by piece
when contracts allow
hw h264 doesnt
hw h265 does
interesting
if you want to operate on the object in the relocatable heap, you call lock() on the handle, and get the current phys addr
when your done operating on it, you call unlock() and must forget about its addr
the firmware is then free to defrag the heap, and consolidate free space, by moving any unlocked object around
palmos on the treo650 does this, because it lacks an MMU, and every running app has to share the ram, and as it fragments, you must defrag
and the VPU firmware, for basically the same reasons
mesa uses the CMA heap on linux, but linux CMA isnt capable of defrag
so the more you fragment it, the harder it is to find a 4mb chunk for a buffer
so you need more ram allocated to CMA
for the pi0-pi3 family, the v3d has unrestricted DMA access to all of system ram, and maybe even MMIO
for the pi4, v3d was put behind a custom MMU, that maps its 4gig/32bit view, onto the 8gig of system ram
ah, you found one!
I wonder why they did not do the heap defrag in hardware
it might use DMA to do the actual moves
but its the same basic problem even userland linux has
the malloc() heap in glibc gets fragmented over time
and while you may have 20mb free in the heap, you dont have a 1mb hole
so you have to ask the kernel for another 1mb
heap defrag lets you move things around and fix that
Yup!
I actually found this one, but I wanted to find an original capture from the game :)
with the mailbox interface, you can access the relocatable heap
and alloc/lock/unlock/free any object
there is also an undocumented unlock flag, to say you dont care about the buffer contents
so, if your done with a buffer, you can use that flag when you unlock it
the system will move the reservation around, but not preserve the contents
which can be a performance improvement
the v3d is a tile based 3d core
i think 64x64 pixel tiles
to render a frame, you first have to write a binner control list
this tells the 3d core various things
the w/h of the 2d output
the addr of the vertex attributes
the coordinate shader
the coordinate shader will turn each set of attributes, into an XY on the screen
the binner then figures out which 64x64 tile(s) a polygon covers
and add the polygon to a per-tile list
It seems you really like thinking about graphics rendering
ive had to memorize all of this, to write usable drivers
the render control list, will then go over the trimmed list of polygons, for each tile
and render 1 tile at a time
you need to write a book one day
and that involves running the vertex shader, to turn attributes into XY+vary[]
and then it runs the fragment shader on every pixel within the rasterized polygon
on the surface, the coordinate/vertex/fragment shaders are just functions running on a scalar core
but behind the scenes, the v3d will batch 16 jobs for the same shader, and run them on a vector-only core
all running in lock-step, 1 opcode, 16 register banks, doing the same thing 16 times
I mean, the shader had to filter multiple pixels, so it only makes sense
(I am not really a graphics person, so if my terminology or understanding are off.... you've got what to blame :P)
i think its technically a 4 lane vector-only core
but, due to the pipeline, it takes 4 clock cycles to execute an opcode
to hide that, it interleaves things
so, on the 1st clock, stage0 of the pipeline is running threads 1/2/3/4
Does it do one instruction per cycle with a depth of 4, or is it part sequential?
on the 2nd clock, stage0 is running threads 5/6/7/8
stage1 is doing 1/2/3/4
and so on...
so, after 4 clocks, you have done 16 lanes worth of work
but its actually just 4 lanes in hw
and each thread, is only starting an opcode every 4 clocks
4 lanes / 16 threads?
so the latency doesnt show up, when you try to read a register right away
yeah, you could describe it like that
kind of hyperthreading
and because of this, it only has to decode an opcode once every 4 clocks
hyperthreading would imply logic duplication though
4 of these, then shader an opcode decoder
a lot of weirdness, so it can cut down on gate-count
some math ive done, says its effectively a 192 core cpu
but when i later learned more, i'm now doubting that, and i need to go back and confirm things
I mean, we are talking about the kitchen sink of IP here :P
yeah, lol
an open source start.elf, demoing both the 2d and 3d cores at the same time
-rwxr-xr-x 1 root root 2.0M Sep 7 00:52 start.elf
entire program and image data is all in an open source start.elf
cpu is running at 216mhz on an rpi1
cpu usage is very low, due to hw acceleration
It's really admirable how much they've managed to cobble together on that chip
this is running baremetal on the VPU
the triangle is a single polygon, with only a fragment shader
its rendering into a double-buffered image
and page-flips on vsync
but i made a slight mistake in the logic
it schedules the pageflip to happen on the next vsync
then it immediately begins rendering into the "old" buffer, that is still on-screen
so the top tip of the triangle tears
(if you were doing a consumer demo you'd have to have a rotating prism to "prove" it's 3D :P)
funny thing, I didn't even notice that
at the time, i never got vertex shaders working
so its doing the coords in software
i did get texture based rendering working, in another codebase
each character is made up of 4 polygons
2 triangles for the black version
2 for the white version, creating a shadow effect
i wrote my own opengl stack from scratch, and piped wowmapviewer into it, lol
back before the mesa stack was a thing
i have since figured out a rough idea of how vertex shaders work, but havent tested it yet
the 3d core, has its own vector memory, similar to the VPU
and the hardware will load the vertex attributes into that
the vertex shader must then read it, compute XY, and write XY back to the vector memory
lol
ha
@raw jasper where compute shaders come into play, is that you can just do arbitrary read/write of anywhere in ram
so a properly crafted shader could fetch data, and then compute things for you, and then just write back to ram, and ignore the entire image layer
there is also priority stuff, to balance all 4 types of shaders, coordinate/vertex/fragment/compute
the other fancy thing, is the opcodes themselves
0x819e7540, 0x114248a3, /* fadd r2, r2, r5; mov r3.8a, r0 */
left is the fully assembled opcode
fadd r2, r2, r5; mov r3.8a, r0 is a single 64bit opcode
the left column, is entirely add based opcodes only
the right column is entirely mult based opcodes
both run in parallel
some DSP's have a thing called "fused multiply add"
QPU instead just lets you do non-dependant mult and add
so the 1st opcode can mult things
the 2nd opcode can do the add, and mult other things
mesa includes a compiler that can generate QPU assembly
@raw jasper most recently, ive been working on usb-host support in #tinyusb
that will allow the open firmware to boot from usb (both MSD and network), and also give keyboard access
ha, it's really interesting they didn't go with FMA. Everybody does FMA
FMA would have probably made the pipeline longer
this method gives you the same performance, for bulk FMA operations
but a slight bit of overhead at the start/end
and enables other trickery when your not doing FMA
mov r0, vary; mov r3.8d, 1.0
fadd r0, r0, r5; mov r1, vary
fadd r1, r1, r5; mov r2, vary
fadd r2, r2, r5; mov r3.8a, r0
nop; mov r3.8b, r1
nop; mov r3.8c, r2
mov tlbc, r3; nop; thrend
nop; nop; nop
nop; nop; sbdone
Yeah, you could in theory be doing preprocessing for another step while doing an accumulate in parallel
vary in this case, is a FIFO
the 1st line will pop the FIFO, and load a 1.0 into the alpha
the 2nd line will add the popped value with r5, and pop another
then repeat that a few times
What is r3.8d? Fixed-point format?
the fancy packing/unpacking thing
r3 is a 32bit register
r3.8d says to treat the d byte as an 8bit float
so it bi-directionally casts 0-255 into 0.0 to 1.0
oh
It looks fairly flexible
so it can cheaply turn a RGBA8888 pixel into 4 floats
I wonder why they haven't made a beefier version
do you guys buy stuff from ali express?
Depends on the seller?
You're in Europe, right? You'll have to wait a few months
15 day delivery
i've ordered other things from there before
they're not too bad
its usually a day or 2 before or after then it says it will come
btw, this assembly is very arm like :P
all of them are around august 12th
yeah its weird
woo.
i think this style was done by the RE team, before mesa made their own compiler
the RE team does everything in an arm style, so arm devs can easily pick it up
this whole year has been wake up, eat, teach lessons, eat, code, shower, sleep
every day
Do you have a link to the mesa assembler thing?
Make sure to leave some time for yourself sometime
i love coding 
Nah, I meant besides coding
it seems to support both 8bit and 16bit unpacking
You're young, and you'll have to keep doing this for decades
It's a marathon
Not a race
so r3.16a and r3.16b are 16bit int<->float conversions
Yeah, just make sure not to burn out
It doesn't hurt to go outside and touch grass for an hour or so ;P
(Seriously)
Oh that is not alright
i just find it cool that i can have an idea and then i can make that idea a reality
and then upload it to github
and move on
Your body is not designed to take that
Try to go out for an hour or so every day
If you don't do it not, you'll have to do it later
then give me the human equivalent of an EOBD reader and i'll reprogram myself
hopefully my brain doesn't have a core panic
it is a brain think, when you go outside and get excercise your brain releases endorphins because of caveman things
i cant spell
Nah, the body's circulatory, musculoskeletal and GI systems have not been designed (evolved) for a sedentary life
One (or more!) of those will getcha if you don't start taking care of yourself now
That's a good idea
Just remember you have a body beyond your head too! :P
heh
Or a heart ๐
Just cold hard processing power
my brain has about as much processing power as a 6502
ha
Pentium 3 for me
literally me
youtube keeps auto turning subtitles on for me
and jeff geerling has broken subtitles

it does that for me too
turn it off and back on, with the CC button
then its fixed
Or use the c key
@raw jasper do you know much about usb?
Nah, I've never worked with the thing
Somebody linked this cool book about USB over at #books-and-tutorials message . It's now in my to-read list
ive just been reading the official usb2 specs
but its kind of dry and not clear in parts
Well, I guess that book would make things at least a bit clearer :P
and is more of "how it should work", and doesnt mention all of the quirks from devices not following the spec
I've heard making a usb host stack is notoriously hard
luckily, ive got the stack already, tinyusb
but the dwc hardware is rather lacking, and i need to do a lot to make it work
dwc?
the usb controller in all pi models
interrupt endpoints are mis-named, and used for things like keyboard/mouse, and also a hub to say when things are plugged in
the usb host must send an IN token, which includes an addr and endpoint#
the device can then respond with a DATA0 or DATA1 packet, and some data, the host then answers with ACK
but, if nothing has happened, the device answers with NAK instead of DATAn
and the host just tries the IN again later
for any proper usb controller, it will retry the IN automatically
where's this diagram from?
and only tell the host when it found a reply
for the dwc controller, it stops at the NAK, and fires an interrupt
you must then manually retry it
(the usb2 spec is 650 pages. I am not surprised, but... yeah. Good luck)
the other major limitation of the dwc, is that there is only 8 channels
so, if you have more then 8 devices, in the hub/keyboard/mouse category, the dwc is incapable of querying them all at once
and the driver must manually switch them out
and give each a turn
I can't imagine plugging >8 devices into a pi anyway... but isn't the ethernet one of the 8 devices?
Or am I misremembering?
ethernet is usb, but i'm not sure its using an interrupt endpoint
id need to double-check
i also have a usb dongle for a wireless keyboard&mouse, that uses 2 interrupt endpoints!
also, the internal hub uses up one int endpoint
heh, usb "interrupts" are weird
Even I, who hasn't worked with USB anything, know about the interrupt polling
my usb headset is also using ...
It's kind of infamous at this point :P
3 endpoints
2 for audio, 1 interrupt for the buttons
and audio is always moving data, so that eats up channels
so, with just the headset and keyboard dongle
thats 3+2+1 channels used
there goes 6 of 8
a usb drive also needs 2
and now youve run out, and the ethernet has none to spare when it needs to send a packet
so the driver has to decide what gets a turn next, and alternate
presumably one for r and one for w?
As a point of comparison, how many concurrent interrupt channels could a PC controller serve?
i dont think xhci has a limit
each endpoint has its own buffer in ram, and the controller will hit them all up
for the pi0-pi3 family, the dwc2 is the only usb controller
you have a single 480mbit high-speed port, that can run in host or device mode
but the model-b's have a hub in the way, forcing host-only
the zero's expose the dwc bare on the micro-b port, with OTG_ID wired up properly
so it can function as both host and device, and detect when you use an OTG adapter cable
and the model-a's expose it bare on a host usb-a port
a mis-wired cable can use it in device mode, but auto-detection wont know, so you have to force it in config.txt
pi4(00) changes things around
the dwc, and an xhci controller, share the same D+/D- pins, and you can only select one at a time
both come out via the usb-c port
a second xhci controller lives on the pcie bus, and gives you 4 usb ports, 2 at usb3 speeds
so the pi400 can operate in both host and device at the same time
yeah, the bcm2711 has a single pcie x1 lane
and the vl805 pcie<->usb3 controller is on the board, so you dont have access to pcie
if you replace the vl805 with this PCB, the pcie lane will be exposed over one of the usb3 ports
then you can just hook it up like this
I am going to save this image to scare people with
bad bot
shal i try again?
wait for some time and post it
Yeah, you have to send a friend request
Next step is to plug in an ancient GPU
the CM4 also just gives you proper access to it, and jeff geerling has been working on getting GPU's working
I'm surprised there aren't any breakout boards for the CMs...
I thought there were
There are? In that case, I am not well-informed ;P
Not that it matters anyway
The things are backordered to death
there are many
LOL, there's one, right from the horse's mouth
the idea, is that you make your own breakout board, to suit your needs
Unless you're me and can't design PCBs :P
it's still way easier to get the carrier boards than the CM4's ๐ though I have one of each and should really put some time in on it
Just make something crazy with the PCIe :P
I just want faster storage ๐
Whatever you do, you'll prolly be bottlenecked by the cpu ;)
Happier to be bottlenecked by that than by an SD card ๐ or USB drive
the usb3 can already saturate the pcie link
nvme wont really get around that
hah, yeah. running an operating system from an sd card gets quite old... fast
the cm4 has an extra trick up its sleeve, for emmc
on the pi0-pi3, its a 4bit 50mhz SDR interface
so it can move 4*50mil bits/sec, or 200mbit
the pi4, has a 4bit 50mhz DDR interface, so double that, 400mbit!
the CM4 with emmc, has an 8bit 50mhz DDR interface, double it again, 800mbit!
but thats just the interface, if the flash can keep up is an entirely different question
til emmc supports double data rate access
[root@system76:~]# find /sys -name ios
/sys/kernel/debug/mmc0/ios
[root@system76:~]# cat /sys/kernel/debug/mmc0/ios
clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
the SD reader in my laptop, is running at 50mhz, 4bit, SDR i think
root@pi400:~# cat /sys/kernel/debug/mmc0/ios
clock: 50000000 Hz
actual clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 7 (sd uhs DDR50)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
but on my pi4 (ignore the hostname), its DDR 50mhz
youll also notice, the pi4 is using 1.8v
the bits can wiggle faster, if they dont have to wiggle as much!
but the pi4 wifi, is 50mhz 4bit SDR, so back to 200mbit
root@pi400:~# cat /sys/kernel/debug/mmc1/ios
clock: 50000000 Hz
actual clock: 41666667 Hz
correction, 41.6mhz
166mbit
Also, lower voltage helps with timing (hold violations)
๐
please also add "das" and "der" buttons ๐
exactly! ๐
no
So, I've been playing with a 3D-printed crosspoint matrix keypad, and ali1234 has been working on OpenSCAD code to generate keyboard layouts. I'm now thinking about combining the two ideas, adding a Feather to decode the matrix and act as an HID device to make it into a custom keyboard.
how do i find which size screws i need to mount a board adafruit boardd?
the drawing should tell you the hole diam
which usually matches (close) the M metric screw thread
where can i find drawings for
thanks!
where did u find this?
i need them for other parts
My goodness from over 1800 to 407. Methinks I gotta make my move for my first PI...
Too expensive for me, maybe when my pi3 dies
Do we think PI3 will ever be stocked?
yes
3B+ and 3A+ get stocked semi regularly
Thanks.
what abt zero 2w ?
not as much, but improving
@glacial wigeon https://en.wikipedia.org/wiki/PowerUP_(accelerator)
heh, the pistorm/emu68 stuff is more crazy
they use a JIT to translate m68k into aarch64 asm
then just run it naked (not even a vm) on the pi, in kernel mode
That's... as if apple had transitioned to ARM from PowerPC
it has access to the rpi peripherals and all 1gig of ram
they then created a virtual expansion rom, that talks to the sd card, and advertises a disk to the amiga kernel
as-in, they wrote drivers for the rpi sd card, compiled it to m68k asm
then JIT'd it back to aarch64, lol
and the whole thing runs in big-endian mode
so it has to byte-swap every time it touches rpi peripherals
The amiga will do those kinds of things to your mind ;P
Playing with scaling kernel of emu68-vc4 driver using newly written VC4Tweak tool
with my help, they added drivers for the rpi's 2d core
that allows changing the "guest" resolution instantly, and adjusting the up-scaling parameters as seen in this demo
wow!
internally, the 2d core on the rpi is just a sprite-only gpu
for each sprite, you define its XY on screen, its source WH, and the dest WH
you can change the "guest" resolution by just changing the definition of the amiga framebuffer, and telling the rpi to up-scale it to fit
I initially thought they had the accelerator act as an extension through the amiga's "trapdoor" interface, but nope, it's completely replacing the m68k CPU on the socket. So, essentially, you have the raspi software-emulating a m68k interfacing with the amiga's peripherals in real time and producing output while running amigaos
exactly
And it's even JIT
the rpi memory is treated as "fastram" which is a concept that amiga accelerators already had
fastram is tied to the cpu, and cant be accessed by legacy DMA
but can then run at a faster clock, with the cpu
"slowram" and legacy MMIO is a mmu trap i think, that will use SMI to wiggle pins on the m68k cpu socket
so the amiga software just seamlessly works
I understood some of those words!
its also using the existing RTG (retargetable graphics) framework, which is what original amiga GPU's used, to extend the system
the emu68 RTG driver, routes to the hdmi port, and can run at 4k
Using 3840 ร 2160 (4K UHD) screen mode on Amiga 2000.
10hrs uptime? No problems... ๐
Join to the Emu68 channel via IRC!
irc.libera.chat:6697 / #pistorm-emu68
All they now need is a HiDPI mod for amigaos :P
I love how they have IRC in the background :D
Same
Multitasking with the Amiga. ๐
and here, its doing bloody raytracing, while playing an mp3
dat WinAMP skin... oh how I miss win amp
the amiga people are nuts
This is a showcase for the in-progress firmware for piStorm using emu68 JIT core. The core has support for RTG graphics and can mount amiga partitions on the PI's SD card. What you will see:
- SysInfo - 833 MIPS :)
- Duke Nukem 3D 320x200
- Quake 1 320x200 (Time Demo and Game Attract mode)
- Quake 2 320x200 (There is still a bug somewhere ...
I admire their spirit in keeping the machine alive for so long
they ported(or found a port?) duke nukem 3d
Ah yes, computing speed -> Off the chart >:P
yeah, lol
the other crazy thing
the JIT cache, and JIT hit/miss counters, are exposed as m68k co-processor registers
I would not want to play that duke nukem port for too long though :(
so "native" m68k programs, can query those counters, and adjust the JIT cache size
and provide stats
and a lesser known fact, the arm core in every rpi, is capable of running in both LE and BE mode
for 32bit arm, there is just the setend opcode, and it has caused issues in the past, userland can flip it!
for 64bit arm, the kernel has to co-operate, and linux doesnt support BE userland with LE kernel
but linux does support BE everything
emu68 is barematal aarch64, so it can just go BE and stay BE
Is this an aarch64 thing, or a broadcom extension thing?
a standard arm thing, in every arm core
I'm inspired by Northridgefix to quit DJing in a strip club for $50/hr and dive into electronics repair but I didn't study any electrical engineering
I didn't either, you don't need a degree to understand how to fix stuff
Or how to design around high powered lasers
Or work for some massive companies like IBM ๐
Madbodger is my hero in that regard. Showing that a piece of paper doesnโt mean you actually get to do cool things; but actually being ambitious and curious can get you there.
i never finished grade 11, and my dad always went on about how you need to finish highschool to even pick up trash
a decade later, being self-taught over many computer subjects, i got a remote programming job
school might have gotten me there faster, but i still got there in the end
Itโs not how fast you get there, itโs the journey
Your journey seems to have taken you where you want to be and thatโs amazing
it was a long and complex chain of events, heh
back when i was in school, i already knew c64 basic/qbasic/visualbasic, and some c/perl
I graduated high school in 2011, tried my hand at engineering 2013-2014, didnโt make it. Floundered for 3 more years. Finally went back to school, got an associates, then another, and another. And finally December 2020 I got my Bachelorโs in Computer Engineering
around when i got kicked out of school, i was playing a webgame, and used mirc to chat with others
and somebody linked some http txt files for scraping data from the game
and mirc scripting is where i first figured out how to do socket programming
Hehe mIRC was so fun
and that project slowly evolved over time, eventually growing to a mix of mirc/php/mysql
which got me into linux
years of bouncing between distros eventually led to gentoo, but then somebody i was sharing memes with on teamspeak mentioned that he cant view them easily
I made a Texas hold โem game in mIRC scripting. I discovered years later how algorithmically complex Texas hold โem is to code and that I did it for fun without realizing that.
clicking the links didnt do anything
and i installed his distro, to try and debug the problem, lol
at first i couldnt reproduce it, but did eventually figure it out and fix it
Nice!
and thats how i got into https://nixos.org/
then a few more years of using that distro, and helping users out, and i caught the eye of somebody who then offered me a job, after seeing how i could diagnose issues with nix
Iโm not that accomplished, Iโve made a few small things but nothing significant. Not that I can publicly share anyway
Iโve accomplished plenty at my day job but it isnโt exactly public facing work so the world will never know ๐
ive also picked up the rpi-open-firmware project on the side, and have been working on improving it
i now work for https://github.com/input-output-hk and most of the stuff they do is open source
I enjoyed reading your conversations about Linux/raspbian and stuff.
Anyway, great chat! Gotta get some sleep. 5am comes too quickly these days
laters
sleep is for the weak
For powering an Arduino Nano with a battery pack through USB. Would a 5V/3.4A capacity of 12000 mAh or 5.1v/2.1A capacity of 3300 mAh be sufficient? The official site says operating voltage is at 5V and input voltage is 7-12V. I'm assuming the operating voltage means through USB/5V and input voltage is unregulated?
Overkill
What do you suggest? Those are the only two battery packs I have.
The 2nd one 3300 mah is sufficient, the arduino nano has a really low power draw
If you have one of those 3.7v LiPo batteries around, they will work aswell
How can I read an analog voltage higher than 5v on an arduino uno
one option is to use a voltage divider
AmigaOS had pretty good CPU priority control
But last time I played MP3s on it I had to play it in mono at around 11KHz or somesuch.
how thick is this part of a male USB-A part?
im guessing it's 0.2mm but it seems a bit too thick
It depends, not all of them are 100% precisely identical. If you just need a rough estimate then a set of calipers would work for a quick measurement.
or you could look up usb connector schematics on digikey
a quick measurement with my calipers says 0.30mm
4.5mm x 12mm for the housing
ummm where can i get help for basic py and maybe how to use vs code?
if it is circuitPY, there's a channel for it, but i guess this channel may work too (along with VSCode questions)
for python and vscode honestly i would say look up some youtube videos. plenty of good video tutorials out there and plenty of websites that will teach you the basics of syntax and setup.
if you have specific questions those are easier to answer than a general walkthrough via text chat.
Stayed here last week, great place close to Gatwick Airport if you are traveling. The home of Lady Ada and her family in adult years.
I wonder how many peripherals exist which use the full AXI enchilada...
there is flags in arm's axi master port, to indicate if a request came from secure/nonsecure, and kernel/user
the rpi can use the kernel/user flag, to just ban MMIO from userland entirely
Yup!
AXI is also used beyond ARM, in FPGA and ASIC designs to interconnect peripherals
yeah
Yeah, the spec is defined by ARM though.
(AXI terminology is kind of fragmented. However, ARM appears to have pivoted to manager/subordinate, at least in official documentation)
...at least for AXI5 ๐
what you guys think, i take out that screen
and install a fuel sensor
and program a screen to display everything
because for some reason, lexmoto in their infinite wisdom didn't add a fuel gauge or meter
wut?!
should i change the screen to a custom one and add a fuel gauge to my bike
the wut, was for not adding any fuel meter!
how is that a good idea?? lol
How are you even supposed to drive that? Just refuel regularly and pray?
to my knowledge
:P
idk
i only got it yesterday
(Check the manual, it might be an additional "mode")
because i was bored so i decided to buiy it
i got it second hand for half the price
it's only 2 years old
because the guy thought the engine was broken
it was sat for 6 months
i went up in my friends car
with a battery jump starter
i jumped the battery after paying for it
and it started

the guy was mad
Find the manual somewhere on the 'net or fiddle around with the buttons -- My guess is that the fuel level display is an additional option/mode/whatever and you have to switch to it
it might be
i haven't played with it much
i took the battery out
it's charging
hopefully in an open or well-ventilated space ๐
oh my stepdad owns a mechanic shop
it's charging with the proper equipment
in the correct place
and it has full power cutoff
or whatever its called
Hi @glacial wigeon, A quick question about USB 3.0 and USB2.0:
If I have a USB 2.0 device streaming data (like RTL-SDR and FT2232H), the total bandwidth is within 480Mbits spec but given the USB2.0 shared bus nature it is not that stable, Do you think it will help if I use VL671 to turn those in to USB 3.0 devices?
something i recently learned, is that the pi4 vl805 only has a single 480mbit usb2 port
there is a hub inside the vl805, to split it 4-ways, for the usb2 pins ont he 4 main ports
so yeah, that would have to share with the other ports
i would assume that a VL671, or any usb3 hub with TT, would be able to fix things
the usb-c is a second entirely seperate 480mbit usb2 interface
yeah the USB-C is connected directly to the SoC, and you can actually see they are trying to do something with the USB-PD but messed up
VL671 specifically is a translator from USB 2 to USB 3
which is not allowed in usb spec but they do that anyways
ahhh
usb1/usb2 has the same problem, usb2 hubs have a "transaction translator" and the host has to send special "split transactions"
i had assumed usb3 had the same fix
but it sounds like the spec says, to just shove a usb2 hub in the same package
Correct, but that means the USB 2 device is still under USB 2 hub arch
and on something like a pi4, every usb2 device shares a single root port, even when using a usb3 hub!
i can see how that would just suck
I think VL671 specifically was designed for VR, NVIDIA's VirtualLink uses the USB 2.0 pair on USB-C connector for additional lanes for USB 3.0, so the VR headset doesn't have USB 2 connection and you still need that for things like audio.
But I think that is also useful for things like Analog discovery or RTL-SDR and Logic16, that you don't have to worried about USB2 bus dropping the packages
But again, I'm not 100% sure that will help so that is why I asked
it sounds like it would help, but i dont know enough about the usb3 protocol to be sure
in the usb2/usb1 case, the big difference is where the host has to send half a transaction as usb2 speeds
then go off and do other usb2 things, on other devices
and once the thing finishes, send a usb2 packet to the hub again, to ask for success/failure
hence, it being called a "split transaction"
i need to make a global pointer to an object, if i construct it inline then it core panics, if i construct it in the source file it core dumps, if i construct it inside the member that calls for its creation it goes out of scope
any ideas, im really lost
can you post source and a backtrace from gdb?
construct pointer globally as nullptr and then somewhere (maybe in the member that calls for its creation) change it to the actual location ๐ค
i cant post any gdb because i dont ahve it
what about source?
where you think its segfaulting
i know it's happening here
#include "SSID_Scanner.h"
#include "Wifi.h"
#include "../../../OLED/OLED.h"
#include "../../../Menu/Menu.h"
Menu SSID_List_Cache("SSID List", true);
// Menu* SSID_List = new Menu("SSID List", true);
namespace Wifi::SSID_Scanner {
// Define the pointer to Menu and initialize it with a new Menu object
void Run() {
SSID_List_Cache = Menu("SSID List", true);
CurrentMenu = & SSID_List_Cache;
display.clearDisplay();
}
}```
that's the CPP file
#pragma once
#include "../../Application.h"
namespace Wifi::SSID_Scanner {
constexpr auto Type{EApplicationTypes::Wifi};
void Run();
}```
header file
the line that breaks it is
Menu SSID_List_Cache("SSID List", true);
// Menu* SSID_List = new Menu("SSID List", true);```
either of these
i cant create an empty menu object because it tells me off
what is the constructor for Menu()?
it takes a const char* and a boolean
can you paste its source?
the const char* is the display name
yes
class Menu {
public:
Menu(const char* HeaderText, bool displayMenuHeader = true, Menu* ParentMenu = nullptr) : Header(new MenuHeader(HeaderText, displayMenuHeader)), ParentMenu(ParentMenu) {};
MenuHeader* Header; // Header For the Current Menu
LinkedList Items; // Linked List of All the Menu's Items
static uint8_t ItemsToDisplay; // How Many Items Should be Displayed
static uint8_t SelectedID; // The Selected Item ID
static uint8_t ItemsOffset; // Display Offset for the Menu Being Drawn to the Screen
Menu* ParentMenu;
void AddItem(MenuItem Item); // Add an Item to the Menu
void NavUp(); // Navigate Up the Menu
void NavDown(); // Navigate Down the Menu
void Display(); // Show put the Menu on the screen
void RunSelected(); // Run the selected Item
void Back(); // Go to the Previous Menu Item if One Exists
};```
that's the header
Menu* CurrentMenu;
uint8_t Menu::ItemsToDisplay = 4;
uint8_t Menu::SelectedID = 0;
uint8_t Menu::ItemsOffset = 0;
void Menu::AddItem(MenuItem Item) {
this->Items.append(Item); // Add Items to the Menu
}
void Menu::NavUp() {
if(this->Items.size() < 1) return;
if(this == nullptr) return;
if (Menu::SelectedID == 0) {
Menu::SelectedID = this->Items.size() - 1; // Wrap around to the last index
} else {
Menu::SelectedID -= 1;
}
// Check if the selected item is above the display range
if (SelectedID < ItemsOffset) {
// Wrap the offset back to the last items when it reaches the beginning
ItemsOffset = SelectedID;
} else if (SelectedID >= ItemsOffset + ItemsToDisplay) {
// Move up the Menu
ItemsOffset = SelectedID - (ItemsToDisplay - 1);
}
Menu::Display();
}
void Menu::NavDown() {
if(this == nullptr) return;
if(this->Items.size() < 1) return;
if (Menu::SelectedID >= this->Items.size() - 1) {
Menu::SelectedID = 0;
} else {
Menu::SelectedID += 1;
}
// Check if the selected item is below the display range
if (SelectedID >= ItemsOffset + ItemsToDisplay) {
// Scroll the menu down by one item
ItemsOffset = SelectedID - ItemsToDisplay + 1;
} else {
// Overflow Gack to item 0
ItemsOffset = 0;
}
Menu::Display();
}
void Menu::Display() {
this->Header->Draw();
uint8_t offsetSize = this->Items.size() - this->ItemsOffset;
uint8_t itemsToShow = min(this->ItemsToDisplay, offsetSize);
display.fillRect(0, HEADER_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT-HEADER_HEIGHT, 0);
// Loop through the menu items that should be shown.
for(uint8_t i = 0; i < itemsToShow; i++) {
uint8_t itemID = (ItemsOffset + i) % this->Items.size();
MenuItem* item = this->Items.findMenuItemByID(itemID);
item->Draw(i);
}
}
void Menu::RunSelected() {
if(this->Items.DoesItemExistByID(this->SelectedID) == true) {
this->Items.findMenuItemByID(this->SelectedID)->Run();
}
}
void Menu::Back() {
if(this->ParentMenu != nullptr) {
Menu::SelectedID = 0;
Menu::ItemsOffset = 0;
this->ParentMenu->Display();
CurrentMenu = this->ParentMenu;
}
}
that's the source
so, it populates the Header field only
yes, the rest is manual
by design
puts("before");
Menu* SSID_List = new Menu("SSID List", true);
puts("after");
the menu works
and this only prints before?
yes
the menu works fine
normally
except in this instance
like if i remove it
i can navigate through the menu
go forwards
back
nav up and down
open applications
its just in this instance
which i find weird
Menu(const char* HeaderText, bool displayMenuHeader = true, Menu* ParentMenu = nullptr) {};
if you dont initialize the Header, does it print the after?
if i dont initialise the header it doesn't compile
and what is the source, for just the MenuHeader() function?
its literally just printing to the screen
it doesn't
because it's fine
unless i run it from there
class MenuHeader {
public:
MenuHeader(const char* Header, bool display = true) : Header(Header) {
if(display == true) {
this->Draw();
}
};
const char* Header; // Text to Display at the Top of the Screen.
void Draw(); // Draw the Header to the ScreLinkeden
};
void MenuHeader::Draw() {
if(this == nullptr) return;
display.fillRect(0, 0, SCREEN_WIDTH, HEADER_HEIGHT, 1);
display.setTextColor(0);
display.setTextSize(1);
display.setTextWrap(false);
uint8_t textOffset = (SCREEN_WIDTH - (strlen(this->Header) * TEXT_WIDTH)) / 2;
display.setCursor(textOffset, 4);
display.print(this->Header);
display.display();
}
MenuHeader(const char* Header, bool display = true) {
puts("before");
this->Header = Header;
puts("after");
if(display == true) {
this->Draw();
}
};
what if you change it to this?
i really need a jtag debugger
im on an esp32 using platformio
it has debugging tools
oops
It's a risc-v core
It posts backtraces to the serial console when something bad happens to it
the bot muted him for correcting a typo too quickly
I guess it's some hook the bootloader puts
so we had to move to PM
Yeah, the bot kinda does that
the exception handler printed all the registers, and a large chunk of the stack
the return-addr was inside Adafruit_GFX::fillRect(short, short, short, short, unsigned short)
I'm guessing some casting was going on in the call?
4200163a: 8441 srai s0,s0,0x10
is where it faulted
and S0/FP : 0x00010000
that feels like a null framebuffer, plus an offset to a button on-screen
but i dont know risc-v, so i'm not sure what srai is doing
Google says shift right arithmetic
I don't know risc-v asm either. I've made it a point to get a RISC-V devboard and learn
wb!
ha
i got my 3d prints in the mail. need to make some alterations and reorder a couple. but its coming along. im going to do 20 of that set of 4. see how fast they sell. will it be 2 days, 2 months, 2 years? ๐
the jlc sls nylon prints are super nice. module 0.5 gear turned out clean. as did my work gear threads. nice uniform black colour.
Seems cool
i hope someone things its cool ha. i see other people selling keys for $40-$100 each. but its so hard to know what epople will like and buy
and how many.
If I had the $$ I would
Ask me at the end of November after Iโve been working 20+ hours of OT a week trying to keep my programs afloat lol
im not fully set on price yet on this. need to fully finish them and add up any extra costs
ha
๐
i mada a nice desk top for photographing these things.
Does anyone here live in an apartment like me? Cause when buying from the adafruit site, it won't let me enter my address with an apartment number
Put your apt on the second street line
Thatโs usually how you have to put it
May it be bs?
https://twitter.com/Andercot/status/1686286684424691712
First claimed successful replication of LK-99
Accomplished by a team at the Huazhong University of Science and Technology and posted 30 minutes ago.
Why this is evidence:
The LK-99 flake slightly levitates for both orientations of the magnetic field, meaning it is not simply aโฆ
4353
1465
Room temp super conductors exist in theory so it might be legit
MIT researchers have flown to Seoul so we'll know soon enough
in hope that it doesn't get paywalled if it's legit
A recent report of room temperature superconductivity at ambient pressure in
Cu-substituted apatite (`LK99') has invigorated interest in the understanding
of what materials and mechanisms can allow for high-temperature
superconductivity. Here I perform density functional theory calculations on
Cu-substituted lead phosphate apatite, identifying c...
look every time civilization has a big advance, like plumbing or gasoline, we all get lead poisioning so i think that's a big vote in the favor of this new superconductor
253
๐คฃ
is there a faster way to draw on an OLED screen
its so slow
im using Adafruit_SSD1306 if anyone knows how
There is actually someone who has documented some hidden capabilities in the SSD1306...
https://community.arduboy.com/t/hardware-accelerated-3d-on-the-ssd1306/11116
i found something rather intresting, one can achieve hardware-accelerated 3D graphics on the SSD1306. Hereโs how it works: First, we need to set the screen to mux=1. Then, we activate the accelerator by accessing register 0xD2, 4 (5?,0xC?). it wil also work without the register, if unsupported, but then vram needs to be redrawn ...
Huh, so there's a bunch of fascinating stuff that never really stuck in the 3D world because everybody just built hardware to do z-buffered triangles but if you are rendering triangles as strips, there's a bunch of algorithms to do things like hidden surface removal without a z-buffer.
Everybody but SGI, who decided to do Z-buffered Gouraud shaded trapezoids for reasons of their own
Hallo ppl quick question, any updates on lk99? The last time i checked a 3rd paper was released
All dramas
It seems to be patented, and if proved to be legit, likely will be expensive af
If legit why would someone respect the patent
Remember svarosky
Well never forget you cant patent a formula,only procedure of synthesis. If its ligit i expect tons of it being manufactured in india and china
Anyhow, anyone knows any free netscanners, that do list ports, mac adress, ip, device and other related informations
There's a lot of donkey work, that seem to not be automated in some way or another (at least by download random software on the net)
The old "Security Administrator Tool for Analyzing Networks" might do what you want
I'll take a look thanks
If that's the case, the boss will be happy to use the satan software being highly catholic
If I recall correctly, it comes with a "repent" command that renames all the scripts "SANTA"
The name certainly has some old tool charm :P
does anyone have any experience separating a stepper motor from a dvd drive from it's metal frame?
they are using some pretty strong glue and i can't get it off
That might be welded or riveted.
I sacrificed one for science and it seems like you are right :L i was hoping it was just glued...
hmmmm, i guess i could try to open it more carefully and then 3d print a case for it within the design....
or i could just cut off the braket, but that wouldn't look very nice i'd guess...
I think you mean sacrificed for science
What are you going to do with your room temperature superconductors once they become commercially available
maybe
get rid of these awful chair wheels
Adafruit Skunk Works is already working on a way to use superconductors to improve CircuitPython controlled RGB LEDs
It will finally allow you to power a pi 4 without it browning out due to the voltage drop.
the super-noodles ๐ :P
anyone know how i could go about generating something inside of a function then keeping it in scope after the function has finished
but like many things
... you mean like a class?
right so i have the menu i've been working on right
but now i need to be able to programmatically generate menu items
for SSID names
but most of it works with pointers so it needs to stay in scope
i don't know how many SSIDs will show up and i only have 320k of memory so i cant just make a list of 128 places
linked lists and vectors work with pointers will will turn null after the scope ends
Usually graphical interface code is object-oriented. Meaning there will be a menu object, and somewhere in that object will be a container holding references to each item. As long as you free those items when you are done with them it should be fine.
Pointers can refer objects on the stack. You only need to free things if they are dynamically allocated.
well when i call the back function i'll make it delete the objects
im a bit lost
how do i put it on the stack
it just needs to stay there and not leave until i say so
... then you'll probably want to dynamically allocate that.
What language?
In C++ dynamic memory allocation is done with the new operator. Then you can free objects using delete.
You should read the stroustrup c++ intro book
The scope depends on where you keep your pointer(s) to it.
#include "strings.h"
#include "SSID_Scanner.h"
#include "Wifi.h"
#include "SPI.h"
#include "../../../OLED/OLED.h"
Menu SSID_List_Cache("SSID List1", false);
// Menu* SSID_List = new Menu("SSID List", true);
namespace Wifi::SSID_Scanner {
Vector<MenuItem> SSIDs;
void BackMenu() {
CurrentMenu->Back();
}
void Run() {
Menu::SelectedID = 0;
Menu::ItemsOffset = 0;
display.clearDisplay();
SSID_List_Cache.ParentMenu = CurrentMenu;
Application::DisplayPrompt("Scanning...");
delay(1);
SSID_List_Cache.Header->Draw();
int8_t SSIDCount = WiFi.scanNetworks();
SSID_List_Cache.Display();
delay(10);
if(SSIDCount <= 0) {
CurrentMenu = &SSID_List_Cache;
return;
} else {
display.clearDisplay();
CurrentMenu = &SSID_List_Cache;
for(uint8_t i = 0; i < SSIDCount; i++) {
const char* SSIDName = WiFi.SSID(i).c_str();
}
}
}
}```
this is what i got so far
ignore the 1 i wasn't sure if my code was being compiled correctly
Kinda hard to read from my phone, but I think what you want to do here is inherit the Menu class. You can then store your SSID cache there and delete anything you allocated for it in the destructor. That should ensure your SSID cache is kept in the same scope as the menu, and goes out of scope along with it.
it's kinda unorthodox
the way its all structured
depending on if its a menu or an app
it will run a void pointer
to a function
that i specify on item init
or when i make the item
Another approach would be to create a wrapper class that manages the menu and SSID cache. That could be stack-allocated and clean up the menu and cache (both heap-allocated) when it goes out of scope.
That is the C-style approach.
In C++ you almost always want to avoid void*.
i know i was going to use virtual functions but i forgot about them and i'd already made it work
Keep in mind though that void* thing is not the same as void (*thing)(). The former is a "blank check" that could be pointing to any location in memory. The latter is a pointer to a function that accepts no arguments and returns nothing.
Yeah, so unless you have something in global scope you've backed yourself into a bit of a corner.
You don't want a global cache list.
i mean of just the currently displayed menu items
then i can delete them when a new menu is entered
that means everything would then be in scope always unless something is running
The issue is that without explicitly deleting it your cache will persist in memory even if the menu is long gone.
That's why I'm suggesting either inheriting the menu or creating a wrapper class for it.
im so lost
if i made a class for it
then it would still go out of scope
because the pointers would be out of scope
wouldn't they?
Desktop MRI machine
Not if the pointers are stored in your class instance.
where do I go to find help with my ESP32 feather boarda that I can not upload code to? must be something wrong with them since I can upload code to all boards I have except for the once from adafruit
Side note @fossil dawn there are no explosives anywhere in that image. The massive fireball is due to the air in front of the projectile being compressed and ionized. It's the same thing that happens when a spacecraft enters the atmosphere.
The massive fireball is due to the air in front of the projectile being compressed and ionized
sounds like "air = explosive" to me ๐
Just combustible, not explosive.
then how do i keep the class instance in scope
That's up to you. Ultimately you want to to be accessible to things that need it, but nothing else.
ๆต็ณใซw
I mean that is where currently most superconductors goes
But yeah I think I know the reference?
Nah, I didn't reference anything. It means "just as one would expect" in Japanese, my IME just went ahead and decided to use the most obscure ateji for it instead of keeping it all in hiragana lol
Ahhh yes Sorry I thought you mean a maker in JP that builds such a thing
Nah haha. Though it does look like a surname
deepl thinks it means "quicksilver" ๐
Ihttps://twitter.com/yashiro_ld/status/1650694809752068097?s=20
Google translate gets it right
I wonder where they found all that liquid helium
Yeah I can read it in hiragana but not ateji...
It's fairly obscure, but the mac OS IME insists on using it, and I'm too lazy to teach it
Apparently, there's also ้
which is read the same, but my IME does not have it
Oh no he just use strong magnets
Like MRI machine you can use strong magnets it just that the signal is weak
ah, I only read the tweet you linked me to. Besides, there's probably something weird in the way twitter now displays an user's messages, because as far as I (non-logged in visitor) am concerned, they only tweeted in April, March, and 2021
I took a class on imaging when I was in uni. They did not tell us that ๐
Digital Image Processing?
No, inner workings of microscopes and stuff
Ah I see, processing MRI images is one of the topics for Digital Image Processing that I've taken back in uni
probably a lot of convolution was involved
that's our matlab coding homework, but it is pretty straightforward.
Later on the course just turns in to machine learning basically
Image processing ML so compression, AI resolution stuff
Those are cool, but I doubt medical MRI will be using these ;)
Yeah so the reason why MRI is at the beginning is mostly because the convolution and 2D FFT, which is the basics for digital image processing algorithm.
But recent research on this field is just flood with machine learning stuff, so the end it is mostly that
Well, as long as it can pass medical device certification....
You don't really need those (Compression and AI resolution) for MRI anyways