#uACPI - a portable and easy-to-integrate ACPI implementation
1 messages · Page 54 of 1
not yet i went to bed after that
Maybe wait until they added c23? To the fork?
they dont even have c95
they do have c23 binary constants anyway https://github.com/open-watcom/open-watcom-v2/commit/ef4cac7bb2d4cc5c0d8d72c90e80f0aff7cb8940
yeah but that requires using a recent build of ow
and not one released in the 90s
surely to god rdos isn't using the pre open watcom?
probably not since they did mention open watcom specifically, but if the build they're using doesn't have stuff it's supposed to have then it must be some old one
still don't understand them using openwatcom to begin with
i actually have encountered some scenarios where openwatcom is the recommended solution though idk if rdos is doing any of them
but the general thing ive heard is that openwatcom is way less bad at real mode compilation than gcc or clang
so it might be natural to then use one compiler for everything and if you have real mode parts that need compiled for some reason that lends itself to wanting openwatcom
id just. not compile to real mode. but thats just me ig lmao
no clue why rdos in particular is using openwatcom though
i believe rdos doesn't use a flat memory model?
thats the impression ive gotten from random messages ive seen on the osdev forums at least
oh yeah that might do it
the reason ive seen given to use openwatcom for real mode compilation is it handles non-flat segmented memory models better
idk but the forum post mentions 64-bit support
Took a few hours, but I can now compile kernel C files on the host machine, even on Windows. It re-creates the kernel source tree with some files copied verbatim and some containing fake test stubs, thanks to cmake magic it even automatically re-copies them if the source was changed
i made it so i can specify the kernel files I want to copy to the synthetic kernel tree
Now i can start writing tests finally
very nice
tbh the worst part was stubbing shit for MSVC, but its very convenient to debug stuff with the msvc debugger in visual studio
also fixed a small uacpi bug that monkuous found a while back
we should try running uacpi on ps4 
id like to see a dump from it
i dont have one sadly
i have one but its not hacked
I have a hackable one
zamn
Does it have ACPI?
I thought it wasn't a PC
well
it isn't an ibm compatible pc
but it has hpet
and tsc
it's a real oddball of a system though
iirc only for the bluray drive tho, the hdd is over an usb-sata adapter 
afaicu it's an arm soc that also has a pcie endpoint on one side that has access to it's entire address space (and vice versa, mapping the host memory into the soc address space)
wouldn't be surprised if it was almost just a pc
i cant find anything about linux on it
maybe without legacy ibm pc peripherals
but without insane stuff like the arm soc as a southbridge
"""""southbridge"""""
hm can't find anything either, apart from articles that did s/xbox/xbox one/g for some reason
no way there's no homebrew on the xbox
i guess there isn't any incentive because of dev mode
🤯 most people won't hack your system if you let them run their own code on it
it's like what happened with the ps3 :^)
are there any consoles out there which could be feasible for hobby osdev
anything with webkit is just a ticking time bomb so theoretically yeah
wii u
ps4/ps5
Dreamcast 
switch iirc
although the switch is just a nvidia tegra x1 more or less so you could just buy a dev board instead :^)
most of the 1st gen ones have broken down
I have Wii U which I need to hack anyway
Wii is doable
Since its drive broke
i have a wii u
Has been around for a while so more documentation most likely
which is still fully functional
Kinda funny the Wii U was a flop but I know lots of people who have one me included
or 5
it depends on whether you like powerpc or not
i think it's high time for a powerpc hobby os here
i gotta do device tree support
is there devicetree on wii/wii u?
wtf is this PR
it disables logging on openwatcom entirely, adds random tabs, tons of ifdefs and whatever this is https://github.com/uACPI/uACPI/blob/4cc7489483ecb68e44ca8cbee07aecd6cd33eae0/rdos/acpi.wpj
what have i brought upon myself
0
i would be fine accepting openwatcom support if it wasnt that invasive, but holy shit at least clean up your pr
can watcom really not handle that? that's been standard c since C fucking 90
also i'm guessing (hoping) the logging disable thing is because C90 doesn't have vararg macros and watcom doesn't support it?
watcom can't even handle C99 stuff
lol
yea but this is older than C99
it should at least support it
can openwatcom do scanf 
like C90 literally defines assert-without-ndebug in terms of that construct
Like what the actual fuck
we are in 2025 why use old compilers that don't even work properly?
exactly
@calm latch can you teach them how to make a proper microkernel pls
can you ask him that
What The Fuck
why no gcc
Just use the fucking _Pragma
doesn't support it
it doesn't have that
it does
Did he just apply that to literally everything

bruh
yep
again, just don't support it
tell him to use a c99 compiler
I'd bet even fucking tcc can compile uacpi
also lol @ the random rdos directory
Like the thing is it can be supported cleanly, but wtf is this slop
Lmao at always inline
yeah, wtf is that file
this does not have the same semantics!!! (unless those are the only fields in that struct but i don't think so)
They aren't
Like wtf
it looks like some bespoke serialization format
oooof
Yeah i was about to say lol
I'm sorry but this PR is just low-quality and should stand no chance unless fundamental changes are made IMHO
He didn't even bother abstracting it behind platform.h
Just slap everything under ifdefs
going around and bending backwards to a compiler that doesn't support stuff like FUCKING VARIABLE DECLARATIONS in the middle of blocks is insane
^
It doesn't even support them at the begining
just say min requirement is C99
Only at function entry
Yeah.. and youd need to keep maintaining it with this burden of a compiler always in mind
true
Exactly
and also, uACPI in userspace?
Works fine if your kernel is sane
that's fine
Like @calm latch
can it call io ports directly or it needs syscalls?
There are multiple ways on x86
depends on the kernel, but x86 has two mechanisms for allowing userspace to access io ports
iopb (which allows you to specify which io ports can be accessed) and iopl (which gives access to all io stuff, including disabling/enabling interrupts)
Lol
You can also make it a syscall, it's not a big deal
k
Like io doesn't have to be fast
that too, io port access is incredibly slow anyways
i'll keep my uACPI on kernel space
Depends on your design
Why are spinlocks not necessary?
because it's single-threaded, presumably
thank me later
shit like this gets me real mad
even if I obv don't call any shots there
HAHAHAHAHA tests fail
he managed to break CI as well
lmfao
/Users/runner/work/uACPI/uACPI/source/tables.c:981:5: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
memcpy(id.signature.text, signature_string, 4);
^
/Users/runner/work/uACPI/uACPI/source/tables.c:981:5: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
to really top it all off, it breaks compile for sane compilers
or gcc
because this is not a clang-specific error, the only reason macos is the one that failed is because it was fastest
i wonder if msvc even allows that when compiling with reasonable options
also, shouldn't that be using uacpi_memcpy instead of memcpy?
lets see
If they're doing it in userspace anyway, why not use a sane compiler?
true actually
I mean realistically memcpy is always going to be there anyways
for gcc/clang at least 
nobody uses those
ah sorry forgor
D:\a\uACPI\uACPI\source\tables.c(981,5): warning C4013: 'memcpy' undefined; assuming extern returning int [D:\a\uACPI\uACPI\tests\runner\reduced-hw-build\test-runner.vcxproj]
hm yes nobody uses GCC or clang
Lily-CC is clearly the better option 
he added that memcpy himself btw
its not in the original uacpi source
so he didnt even check his code
well watcom probably allows it
luckily i have warnings as errors 
For real though adding -Werror=extra to my library projects is the best thing I've ever done
he said
The op code tables fail to compile, and I have no idea why but I suspect it is related to the incredibly complex macro structure used. I will need to redo this to decrease complexity, and in fact, also to increase readability (and debuggability) of the code.
so i guess he never actually compiled it
Ah how nice it is from him to increase readability
(also, the opcode table issue is probably due to the [] = ... syntax, since i believe that's C99)
love that he (implicitly) complains about readability and then prs this
lmao
oh wait .wpj probably stands for watcom project doesn't it
this is just an ide config file
Why exactly are people seriously using the watcom compiler if it doesn't support basic shit like compound initializers?
it supports several things mainstream compilers don't, like segmentation
and real mode (proper real mode, unlike 80386-compatible-running-in-real-mode)
also he hardcoded pointer_size as 4, does it not support 64-bit x86?
it does but they didn't complete it
Inb4 Lily-CC competes with watcom by supporting segmentation but also c17
That and because it's one of the most locked down PCs in existence, the bios is fully signed, both ram and pcie traffic is encrypted, it has full iommu, it uses all the fancy hyperv based VBS, it uses different certificates than the rest of the windows ecosystem.
how do they not support such basic things if its an actively maintained compiler
it seems rdos guy is not enabling C99 compile mode, so he doesn't want things like e.g. VA_ARGS
most of the bs could've been avoided by simply enabling a compile mode??
nor stdint.h nor many other things
That seems extremely hard to work around with any modern C project
wtf?
that's my inference as to why he'd strip out the log macros
also why he hoisted declarations to top of blocks
Why not enable it?
presumably he builds in c89 mode only
Maybe he doesnt know about it
It is beyond me why any project developed today supports any compiler older than C99
he doesn't like C in any case: https://www.rdos.net/rdos/cversus.htm
I wish him good luck then 
I can tell by the quality of his PR 
this is not true unless you use watcom or something similar
this is not true if you use a mainstream compiler like gcc/clang (because i don't count msvc as mainstream, and thus the two mainstream compilers support eachothers extensions for the most part)
that's surprising
He's thinking of reaaaaaally old compilers, so old that none of them actually exist today
it's an ancient optimisation
I seriously doubt he can write assembly as fast as from GCC/clang
i don't stand for watcom slander, it's a fantastic compiler which unfortunately needs significant work on its modern c/c++ support
wait so why did he get rid of all of the binary literals
is he using an ancient version of it or something?
i guess so
You know, with all the modern langs it's cool to hate like Rust and Zig, I wasn't expecting someone that seriously thought C was slow.
lmao
this guy lmfao
There's good reason why modern OSes use paging
the greatest hit is still the neanderthal aspergers theory
bruh what
i really hope this is just a ux thing
as well as discovering mind-to-mind communication
MF what scientology shit is this
@jaunty fox do u still have a link to the commit that added 0b support?
Thanks, ill add this to my reply
it literally supports this in C99 + extensions mode
Especially since there is no ACPI on i386
WTF is this guy's problem with autism
Why does he want to paint us as some form of troglodytes
Send a mail
Someone should refute his argument and send him a mail.
how many people use uACPI with clang vs GCC?
probably most use gcc
i use clang
clang!
I mean me too
Oh, it's also him who's spreading misinformation about interrupts in userspace
https://forum.osdev.org/viewtopic.php?p=347483#p347483
i use both
good that PR was just insane
Does watcom not have atomic intrinsics as well?
Also where is this even used?
16 byte compare exchange
Wait
Does this not use mutex?
mutex between uacpi and firmware?
No, the kernel API
the global lock is a firmware thing
I agree that the rdos directory should not be there. Cannot find out how to remove these.
???
yeah basic git is very hard
Oh, ok
"i386 is the only architecture"
also wtf #define uintptr_t unsigned int *
cursed stuff
what the hell
that's also going to break any kind of arithmetic done on it, though you probably don't do any in uacpi?
they have at least these
wth are those libs
targets
probably not but still
oof
so it does support 64-bits
fuck uacpi abstractions, include libc directly
string.h is memcpy?
I think so
yes memcpy is in string.h
at this point frankly it would be better if someone else made a reasonable port to watcom
or just don't bother and tell them to fuck off lol
But string.h is not even related to watcom
preferably someone that knows what they are doing
Again, why can't they use a different compiler, considering they're not even linking it with the kernel
yeah this is just astonishing incompetence, from the lack of basic git knowledge to not knowing how watcom works (e.g. that it has _Pragma etc)
just passing -zastd=c23 would probably eliminate 90% of the problems
or even zastd=whatever sets c99 + extensions like binary literals
how do u write software for so many years and still lack basic skills like that
dear lord
But that's not their case?
mr rdos seems to be somewhat adapted to the demands of mostly assembly with a little c programming around 30 years ago
well he seems to be selling his os commercially
lol
also its supposed to be a POS os?
who uses it?
i hope it has been tested VERY troughly then
so the difference in semantics between struct mystruct foo = { .x=1, .z=3 }; and struct mystruct foo; foo.x=1; foo.z=3; is that the former zero-initializes foo.y, while the latter leaves it uninitialized and therefore UB to use?
yes
this is even more cursed if you know Swedish
how does this guy not know that difference
I mean idk who in their right mind would buy it to begin with so it doesn't really matter how garbage it is 
Though I guess he has a bunch of drivers and network support
what means it in Swedish?
some comepany that wants cheap stuff
prob
"wälcome to reälity"
well, we are talking about corporations, they are very stupid sometimes
apart from that it's pretty reasonable language-wise, I guess
they arent dumb enough to pay for a gpl os lol
it's $10 a licence so it's no great cost
i saw POS with literal windows on them...
although it seems translated through e.g. google translate
lol
3 hours too late, but yeah, nobody has fully pwned any Xbox since the 360, the original Xbox One (2013) even is still not hacked yet
even the 360 is debatable, you need hardware mods to run Linux
they really dont want you to freely use the hardware do they
indeed, they actually are
they basically achieved perfection with the XBOne, and then just did that but again™️ for One S/X and Series S/X
bc they are consoles, they want you to pay for multiplayer
meanwhile PS3 was sold as an ideal machine to run linux on

like it was so cool u could dual boot linux and the ps3 os for gaming and work at the same time
but no fun allowed anymore
also they want to prevent piracy at all costs because it loses them money
which is probably the biggest reason why its all so locked down tbh
say that eg. you achieve arbitrary code execution in the context of a game (e.g. with some heap vuln and you are a really good pwner, so you can manage to get anything at all inthere)
is this something which has been done? how is process isolation etc. on the xbox (is it just NT)?
they are just greedy
yeah, and also make you pay 90€ for a shitty game
They run stuff in a hypervisor
then you own the Game VM at that point
you still don't get full hardware access
ahh
you literally can pay double at some points for console games vs pc one
so we gotta do hypervisor pwn
yes, except that you can't see it
Because consoles are sold for cheap, but you get revenue on the games
even at the bus level
cheap?...
all data going in or out of the APU is encrypted
only time plaintext data exists is inside the APU silicon
so u need a huge chain of vulnerabilities basically?
1k$ ps5 pro that is literally the base 500$ version?
Like a gaming console should cost much less than an equally powerful PC
they cost way more tho
New GPUs alone cost the same as consoles, or more
gpus are literally cheap to get for them
an unreasonably long chain of vulns, and you need to somehow develop a working hypervisor exploit with no eyes
The PS3 for example was sold for a loss
- they also lock them to 30 fps on most games
(a big loss)
you get 60fps only for some
if you could find some entryway into the hypervisor from inside gameos or systemos, then yes
but nobody has exploited gameos yet, and there has only been 1 exploit in systemos, and it was patched immediately
can u explain what those are?
gameos etc
the chances of them ever being hacked is low tbh
there's just no drive to get into them, they're just mid PC hardware
nothing funny like PPC or ARM
Wait, the pull request has disappeared again?
my guess is gameos is the os that runs under hypervisor and runs the game software
so the game software doesnt have to include an entire os
GameOS is where games run
SystemOS is where the "systen" UI and services run (chat features, dashboard, etc)
iirc there's one more VM running in the background too but I don't remember what it's called / does
all of that is running inside a tiny hypervisor that gatekeeps everything
each one is an independant copy of Windows
so you always have hw<->hypervisor<->(one of gameos and systemos)
so its nested virtualization?
that's why the games take so long to download?? 
does openwatcom not support (void)x; for unused variables?
probably not nested
gameos and systemos probably communicate with each other via the hypervisor
not actually nested, no
it's multiple VMs running under one HV
not VMs inside of VMs
lol
using whpx?
so its a new kernel?
iirc the one on the 360 was like, 64KB or something
it'd be funny if it was xen or something
windows runs under a HV too
kinda
hard to really call it a kernel
(optionally)
when you use wsl
it's sole job is to run the VMs and make sure they don't try anything funny
I don't think we know how big the one on the Xbox One / Series line is
since it hasn't been exploited yet
nobody's dumped it
maybe it is in some leaks?
has M$ even had a leak recently, they haven't that I've heard of
last one I know of was the OG Xbox + NT4 + NT5 source leak
title suggests nothing Xbox related
I'm not gonna go check it myself, but I'd doubt it
anything Xbox-related would probably also be modern Windows-related, and that'd make a huge splash
i think the sdk got leaked
and i think the code for the xbox os
lmfao
but only the original one
it's so similar that people have made compatibility layers w/ DLL injection, that make it just work™️ on regular Windows
git is really hard what can u do
you're welcome
using a normal compiler is too
but 64-bit locked operations are not supported in 32-bit mode, and the atomic inc and dec cannot return the real value as an atomic operation.
Huh?
i386 doesn't have xadd, is he talking about that?
i386 doesn't have ACPI either
well yeah but try telling that guy his acpi module will have to be i486+ at the very least
i586 if uacpi needs cmpxchg8b
I don't think it does?
he should compile his acpi driver in 16-bit mode 
pretty sure some of the cpus he's targeting don't have FP at all (yes these systems won't have acpi but above comment applies)
And you can emulate the rest?
also 8-byte fp ops are only atomic on >=pentium iirc
only 32 is used atm
xadd
xdd
xd
x
⠀
@kindred beacon lol thanks for the comment again, i dont have the patience to explain things like that
id rather just ignore it until it goes away
lmao
idk at this point because he made a bunch of changes to things that watcom just supports
The reason for these fixes is that the structures are only partly initialized. I cannot see the difference between declaring a variable and then initializing the same (partial) fields.
bro
because it does support a lot of these things from what i can see
i looked at his website earlier and it suggests he's using a version from jan 2025
btw buy my kernel
this guy just does not know C
yeah idk at this point
Casually includes stddef.h and still defines u?int[0-9]+_t
uintX_t is from stdint.h
i know
which doesn't exist in C90
size_t
apparently slapping an include <string.h> is fine but including stdint is not
This just gets stupider by the second
priorities
it's a freestanding header, you can just copy paste it smh
i double dare yall to just tell him to use clang
??????
This does nothing other than break things
???
nah trust me, this makes sure the compiler doesn't OOM while allocating the var name
would be funny
but also just ignore them and hope they will stop when nobody is responding to them
were there 486s with ACPI?
tbh seeing how awful this person prolly is with views on autism, just ban from uACPI GitHub if he opens PRs again
why even target that ancient hardware anyway
wait what, where his views of autism?
Just go to his site's homepage
every single time
I do not appreciate that and in my projects someone would be blanketly banned just for that.
Probably among other things, he tries to link autism to neanderthals, a species we combined with a very long time ago
He calls us "aspies" 💀
Even if it doesn't, your C library should provide it
Bigots cannot afford to keep their mouths shut when they also have the option of hating on people
otherwise what are you doing
i left a comment on the PR, hopefully it makes it a bit more clear
but its basically what leo said but nicer
i don't think he's bigoted, i think he is just practicing pseudoscience
like ppl on X
i didnt want to offend him and stuff lol
Doesn't seem like a person I'd want to be around either way.
RDOS source code is distributed as GPL, except for commercial usage.

Not how GPL
considering how that stuff was created and by who idk theres much of a meaningful difference you can draw
ah yes, the GPL-capitalism clause
what happend
Delucional
this for instance is just wild speculation
oof
A PR 
A disastrous PR
a very very bad PR
also you are allowed to use it commercially for free as long as what you are trying to run it on isn't an embedded system
basically a very incompetent person trying to port uacpi to openwatcom
A weird subset of openwatcom*
At this point he is trying to port uacpi to whatever compilation it does
yeah thats the thing
whats worse is this is almost tempting me to try and do it properly. and i barely know C and dont use openwatcom
its not even an openwatcom port
wait, from when GTNH has a tag??
its a port to his crappy os buildsystem
It's like passing to GCC --be-stupid and porting to that
lmfao
gcc -Dint=float
Y e s
idk lol
i literally know enough c to make zig bindings for uacpi and thats it
lol
and this is tempting
-Duintptr_t="unsigned int*"
The problem is that nobody wants to maintain openwatcom support
I know enough C to know that this rdos person doesn't know C.
Just adding support for it now seems simple enough
i have felt some temptation myself though i don't know a great deal about openwatcom (i have used it once in the past and i have a high opinion of it as a compiler despite its lag in modernising)
But that's gonna bitrot insanely quickly
if he adds a CI target ill maintain whatever breaks, but hes obviously not going to get that far lol
Btw, can't uACPI just use atomic.h through some flag or something?
hm?
So people with weird compilers can just be directed to implementing that
Do you mean stdatomic.h ?
Yeah
Yknow I was gonna try myself but $ pacman -Ss watcom $
what is shocking is he isn't even familiar with watcom's capabilities around e.g. struct packing, which i found by ctrl-f the manual
atomic.h in uacpi is in platform/, its meant to be overriden by your platform unless you're lazy and use whatever is shipped by default
so yeah
The problem is when the compiler doesn't support aspects of regular C syntax
Fixing that requires editing the main source
It's in AUR but that's yucky
Yeah but we found that lots of uACPI source code is supported by owc
But uACPI is relying on compiler-specidic functions for atomics
ikr, this is scary incompetence for an open watcom shill
But if your compiler doesn't support stdatomic, you can implement it yourself
idk
i mean
And is not one of the typically used ones
the docs say it works for msvc gcc and clang, for anything else u gotta do it yourself
Fuck it I'm gonna see how much of the BS comes from watcom and how much comes from this guy
What if it turns out to be a decent compiler? 
Bro you don't get it us Aspies are close relatives to Neanderthals man
I channel the neanderthal spirit through my sutism
Why is there an uninstal.exe in the linux package
$ file /opt/watcom/uninstal.exe
/opt/watcom/uninstal.exe: PE32 executable for MS Windows 4.00 (GUI), Intel i386, 5 sections``` ???
run it 
lmfaooo
lazy
maybe it relies on wine
LOL WHAT
Why not
does this support rdos in-tree??? or is this something else
probably upstreamed support lol
/opt/watcom/rdos/dwarf.dll: PE32 executable for Unknown subsystem 0xffffad05, Intel i386, 4 sections``` lovely
probably one of their hyperfixations, wouldn't be surprised if they're autistic themselves
from what ive seen its likely
an nt clone using open watcom
lol
at least use goddamn msvc lol 
does it even run windows .exe files?
I don't think so
prolly not
does msvc handle segmentation properly?
because thats the single point in favor of openwatcom
Isn't segmentation extra painful if you use dynamic libs?
openwatcom can do non-flat segmentation and true real mode compilation thats its only benefit
people might think open watcom is a pile of trash if they look at that pr lol
yeah lol
I wonder how the prs he made to ow look like
poor ow devs 
He had an issue saying ow doesn't support switch with long long 
he had some irritation with watcom using bool
i don't even wanna see his source
Wait that's from fucking 2016
large parts of it are in asm
or more like 90% of it lol
Why would anyone compile using OW?
at least it supports #pragma once
do you hate yourself so much that you have to write bad code?
i was surprised he didnt remove that tbh lol
svn 😭
ohh thats why hes so terrible at git
oh my
...
what
sorry
Does he store segments in eax or smth
Wait
he fucking uses pack
How do return types work?
right well i can't find a way to detect the pointer size without just checking a bunch of raw target macros (like __386__ and such)
why not use it at least in uACPI
guess that's why the guy hardcoded 4
__SIZE_MAX__ or __UINTPTR_MAX__?
Fair, it probably only supports i386 or x86_64 so that's ok
doesn't have it :)
U can check either or
owc doesn't have those? bruv
Wouldn't C library provide it?
Not in freestanding
i'm not particularly a fan of using c library headers in uacpi
I'm defining those myself in pmOS
esp non-freestanding ones
^
Huh
Well gcc does
How is this not freestanding?
UINTPTR_MAX is in stdint.h
you're defining SIZE_MAX/UINTPTR_MAX, the underscore-prefixed/suffixed versions are provided by the compiler
same, i just don't like the naming, lol
Oh
oh right yeah these ones are
Yeah
hm
centralized
i guess this'll do
But it supports 64 bit too no?
Hmm
but it's not like i'm hardcoding anything without checking first, so shouldn't be too much effort to add if i figure out how to get a 64 bit build of it
True
is there decentralized one, maybe with nfts and ai?
Lol
nft code
Hm yes lettuce add NFTs generated by AI to git
every line of code is paid
types.h only has 65 lines???
every hobby OS kernel crash should be an NFT, they are all (mostly) unique
does this thing use the line number post-macro expansion or something
This reeks of "hehe moi first compoiler"
well it's just a warning so i won't bother
maybe it's a different types.h
try adding an #error into the one you are looking at
it's a nonsensical warning (W135: Shift amount too large) but still
is there uacpi port to linux maybe
oh right i was looking at the platform one, not the public one
My friend is making their own compiler with custom ABI and seemingly C syntax
they're on this c UACPI_OBJECT_DEBUG_BIT = (1 << UACPI_OBJECT_DEBUG), UACPI_OBJECT_REFERENCE_BIT = (1 << UACPI_OBJECT_REFERENCE), UACPI_OBJECT_BUFFER_INDEX_BIT = (1 << UACPI_OBJECT_BUFFER_INDEX),
Noobs taking on huge projects and making nothing standard is such a phenomenon
Hm yes 16-bit acpi
Sure
right well this is annoying, openwatcom does support designated initializers, but only as actual initializers, e.g. &(struct uacpi_table) { .index = idx } is invalid, you have to add struct uacpi_table tmp_table = {} at the top of the function and set .index manually later
so it's only really useful if you already have all the values at the top of the function
Error! E1073: Invalid option '-zastd=c23' how fun, the version i'm using doesn't include support for either binary constants or the c23 option
Maybe clone the github repo?
yeah maybe
although if i'm adding openwatcom support i want it to work on a released version of the compiler and not just trunk
Its from January I think
Ye
the build i'm using is Version 2.0 beta Mar 1 2025 02:29:14 (64-bit)
actually they do provide ci builds
oh this is also fun: struct x = {} is invalid syntax on owc! you have to either leave it uninitialized and use memcpy or something, or provide all fields explicitly
or maybe {0} works?
oh thank god
oh and designated initializers only support constant values

constexpr?
Bruh
now I know to avoid openwatcom at all costs at least
(though I didn't even know about it to begin with before this garbage rdos stuff)
There go some uacpi points
You can probably rewrite it without using them 
Is this that difficult to implement in compiler?
no
Maybe we could get rid of binary constants idk, not that many of them are used
yeah i'm doing that
at least you do seem to be able to declare variables at the top of blocks, not just at the top of functions
which is a relief
seems so yeah
also seems like __VA_ARGS__ is broken? this triggers source/event.c(437): Error! E1030: Cannot take the address of an rvalue c uacpi_trace( "executing GPE(%02X) handler %.4s\n", event->idx, uacpi_namespace_node_name(event->aml_handler).text );
yea the manually expanded version doesn't work so it's not va args thankfully
fixed when replaced by c uacpi_object_name name = uacpi_namespace_node_name(event->aml_handler); uacpi_trace( "executing GPE(%02X) handler %.4s\n", event->idx, name.text );
Oh well
He said it didn't I think(?)
well files where i used it compiled fine so
maybe it only works with -zastd=c99?
oh great the syntax (struct foo){} just doesn't work at all
so in some places i have to replace it with a memset
0?
no, it's the (struct foo){} part
aka initializers as random expressions don't work
things like struct foo x = {0} work fine
but things like random.thing.foo = (struct foo){0} don't
There's a uacpi_memzero I think btw
ah yeah ty
i don't think watcom supports atomics at all
i'll probably have to use inline asm for those but for now i'll just make them assume single threaded no interrupts
Yeah just do that
oh ffs apparently owc doesn't support offsetof(type, foo.bar)
you have to do offsetof(type, foo) + offsetof(<type of foo>, bar)
What the hell
and i don't see anything like typeof
I don't think I use that in uacpi
Since msvc didn't have that as well until recently
resources.c:882
NATIVE_F(gpio_connection, interrupt.triggering)
and a bunch more interrupt. stuff right below that
there is __typeof seemingly
oh? i couldn't find it with a simple ctrl+f in the user manual
Yeah, it's more the segmented memory model stuff.
i sometimes just search the repo
If you want compact, medium, large, or huge, what are your options?
That's type of?
ohh wait no this isn't a offsetof foo.bar thing
they appear to have the nested offsetof too
no the offsetof foo.bar
but i was wrong about what the issue was
GCC-IA16 and bcc only support tiny and small. GCC-IA16 has experimental support for medium, but large and compact and huge are still an issue.
apparently interrupt is a fucking keyword in owc
or a predefined macro for a keyword or something
I don't think I use type of at all otherwise it wouldn't compile under msvc
yeah it's not typeof
That leaves the old Open Watcom, Microsoft C, and Borland Turbo C compilers.
And Open Watcom is the only one that is actively maintained afaik.
What the hell
Oh, there's also Digital Mars.
guess i know the reason for this change now
Lmao
yeah, for interrupt handlers
Imagine reserving arbitrary words as keywords
nah, they didn't give a fuck about the standard
some of those conventions are pre-standard afaik
wait, will the watcom support be official?
You guys are such a gossip. 😁 have written whole novel about rdos today here.
he seems to have the mindset of a ~1992 DOS programmer
maybe this server is too advanced 
he has lofty ambitions and sometimes makes snide comments about uACPI not being real "portable c" but in fact you cannot implement uACPI in "portable c" - it needs must be in "really existing C" because true "portable c" is underpowered
that's the hidden price of using uACPI 
it was actually very recent in terms of geologic time :^)
and while it's a bit easier now with c11 atomics and such it's truly impossible in c90
idk, he did bizarrely make a autism screening questionnaire which was validated in a study
and is seemingly taken seriously by psychiatrists
wait it actually fucking compiled?
although idk if he loves or hates autistic people
his theory is definitely out there tho
i didn't even have to modify the opcode tables the guy was having trouble with
also idr if he was neurodivergent himself
well i still have to link it
how does linking work with openwatcom
why is the help bnf
Damn that was quick
Lmfao
oh, he does seem to have a MSc
Any sad changes you had to make?
Portable C without the interrupt keyword used mind you
none that i haven't mentioned here i think
i'm gonna have dinner then figure out linking
Linking is gonna be fun
Btw any way to add watcom builds to CI?
So it doesn't bitrot
wait you actually got it to compile? damn
wlink is horrible but i got it to link (or, well, i got it to the point where all the errors are ones i expect: https://hst.sh/luwusozexu.coffeescript)
Not bad
need to figure out where i'm supposed to get mem* from
oh there's a compiler driver i missed
that's useful
much better than using the compiler directly
still doesn't link anything providing memcpy and friends by default
got it! everything except uacpi kernel api resolves
test_runner uses new c++ features that watcom doesn't support unfortunately
it complains about <filesystem>, <string_view>, <variant>, <span>
and some syntax errors but i hope those are symptoms of those missing headers
Yeah test runner uses cutting edge c++ unfortunately lol
Just for fun for the most part
He left a new comment complaining that it doesn't build still
While monkuous gets it to build in an hour
I'm trying to port it anyways because it'd be nice to have as CI
Yeah definitely
Wait does openwatcom not support fucking enum classes
Bro
right and it doesn't have attributes either
of course
and no unordered_map either
great!
the in-source docs say since c++11
it also doesn't support auto vars
💀
Error! E029: col(38) symbol 'nullptr' has not been declared wtf
not even nullptr lol
????? that's a keyword
at least cmake supports owc out of the box
damn
apparently owc's std::map doesn't have .at(key) or [key]??? cppreference doesn't list any "since ..." for these
how the fuck are u supposed to use it then lol
Error! E715: col(30) member 'at' has not been declared in 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char>>,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std:
note that it has slightly different semantics
.at throws
[] silently makes a new element
Fuck
lol
lmao
u mean == .end()
oh right yeah
yeah looks correct
actually how the fuck am i supposed to replace auto there
perhaps you need a parameter to the c++ compiler, they appear to be having nullptr https://github.com/open-watcom/open-watcom-v2/pull/343
clangd doesn't even accept that
uhhh
my c++ args are managed by cmake
the cmakelists.txt has set(CMAKE_CXX_STANDARD 20) so it should have it
that worked, thanks
without std:: sorry lol
it does need the ugly std::map<..., std::vector<...> > space between the closing brackets
loool
perhaps cmake is not doing it right, or i suppose you can convert uacpi to c++03
and yeah decltype isn't supported by owc
c++11 too
https://github.com/open-watcom/open-watcom-v2/pull/325 seemingly also there, is cmake broken?
i'll check out the generated makefile ig?
there's VERBOSE thing u can use
cmake doesn't generate that for watcom wmake apparently
what the hell is wmake lol
the make included with owc
💀
and yeah cmake --build . -v makes no difference
ok yeah i manually added -za0x and now nullptr is recognized
decltype doesn't work still
interesting
Error! E938: col(23) 'auto' is no longer a storage specifier in C++11 mode what do you mean "no longer" it didn't work in the first place
why would that be an error
thats literally how c++ works
yeah like static vs auto
auto means automatically cleaned up
its implicit
tests/runner/argparser.h(257): Error! E157: col(38) left expression must be integral
tests/runner/argparser.h(257): Note! N393: col(38) included from tests/runner/test_runner.cpp(8)
tests/runner/argparser.h(257): Note! N717: col(38) left operand type is 'std::ostream (lvalue)'
tests/runner/argparser.h(257): Note! N718: col(38) right operand type is 'std::basic_string<char,std::char_traits<char>,std::allocator<char>> const (lvalue)'```
what the fuck
on the stack variables for example
yeah so its disallowing auto as a type because auto is a storage specifier ig
you can't do stream << std::string("whatever");??
doesn't work either way
lol
but in c++11 onwards its not a storage specifier
it means automatically deduce the type
lmao its using the c# rules for it
well sorta the c# rules for overloading say the right operand must be numeric iirc
not the left
oh for fucks sake does not support foreach
thats also c++11 probably
doesn't support this init syntax either
Did C++ have C auto?
lmao
yeah pre c++11
that's just syntactic sugar?
like it can't be hard to implement
yeah its just annoying
Though C has cool auto now as well
what does C auto even do
Saying "C++" and "can't be hard to implement" is a recipe for disaster
it just exists as the opposite of static
also just auto is int 
because everything is int in C
maybe it was const?
Rewrite the runner in C :^)

