#avr Logs

May 13 2018

#avr Calendar

12:07 AM day__ is now known as day
12:14 AM antto: why aren't bitfields used in the io headers?
12:14 AM antto: like, do they generate less optimal codez?
12:14 AM antto: does it have something to do with the SFRs being volatile?
12:17 AM rue_shop4: so , I can #define BOOL uint1_t ?
12:17 AM antto: i think bool is more than that
12:18 AM rue_shop4: true, false, and maybe?
12:18 AM antto: bool x = someinteger; // i think you get true for any value besides zero
12:18 AM rue_shop4: c dosn't have bool
12:18 AM rue_shop4: its a stupid c++ thing
12:19 AM rue_shop4: today I wrote a compressed address LUT FSM, I'm happy!
12:19 AM antto: ah, so that must mean that you don't need bool
12:19 AM rue_shop4: there are 10 types of people, those who understand binary, and
12:19 AM antto: #if RUE #undef BOOL #endif
12:20 AM rue_shop4: why dont you just #ifdef around every peice of code that rue used bool in?
12:21 AM rue_shop4: I'm going to write a program, that will take two programs and use #ifdef to lace them togethor into one source
12:21 AM rue_shop4: and it'll be just as unreadable as must of the source out there
12:21 AM * rue_shop4 hates split source via #ifdef
12:38 AM Ameisen: those changes to gcc made my .text size go from 238822 to 238694
12:40 AM Ameisen: __float24 doesn't quite work yet. I need to implement __truncsfpsf2 and __extendpsfsf2
12:40 AM Ameisen: probably the hf versions as well
12:40 AM Ameisen: same with __float16
12:42 AM antto: Ameisen any opinion about my bitfields question?
12:42 AM Ameisen: it is funny to see uint1 * uint1 assembly
12:42 AM Ameisen: it's just an and
12:46 AM Ameisen: C99 has _Bool
12:48 AM Ameisen: it does NOT like generating multiply instructions for anything larger than uint64
12:49 AM antto: the biggest numbers i use on avr is 64bit integers, with division
12:49 AM antto: unsigned iirc
01:52 AM rue_mohr: iirc, long long long int foo "is too long for gcc"
03:04 AM polprog: melt a teaspoon of butter on a pan, put 4 eggs, add some rosemary, black pepper and salt, heat up under cover on very small power, until the yolks get a slight white layer. server with whatever is left in th fridge. bon apetit
03:04 AM polprog: if you want you can also fry some bacon beforehand and fry the eggs on it
08:03 AM Ameisen: it'
08:04 AM Ameisen: it's fun cheating at old games
08:04 AM Ameisen: and probing their memory
08:04 AM Ameisen: make them do weird stuff
08:04 AM Ameisen: still haven't figured out quite how oregon trail 2 stores its money
08:04 AM Ameisen: its in a two-byte, unaligned value in some way
08:04 AM Ameisen: some kind of fixed representation
09:33 AM Ameisen: https://pastebin.com/LjWQ29Bt
09:33 AM Ameisen: should something like that work for extending/truncating arbitrary floats?
09:33 AM Ameisen: I don't recall if you can just truncate both the significand and the exponent
09:33 AM Ameisen: Not sure what else you could do (though I think if you detect truncation you're supposed to emit an invalid value?)
09:47 AM * Ameisen is more impressed that he wrote all that in one go in notepad and it compiles
09:50 AM Ameisen: no, you can't do that :|
09:50 AM Ameisen: need to handle the bias and such
09:50 AM Ameisen: blech
09:58 AM * Ameisen hates normal floats. Complex to handle.
10:05 AM inflex: A lot of people try find ways to do it in fixed-dp "floats" (ie, integers :D )
10:44 AM Ameisen: well, so far I'm able ot convert quickly but I lose the decimal
10:44 AM Ameisen: 100.123123123 becomes 100.0
11:12 AM Ameisen: there we go
11:12 AM Ameisen: [07:29:13] <Ameisen> still haven't figured out quite how oregon trail 2 stores its
11:12 AM Ameisen: err
11:12 AM Ameisen: https://pastebin.com/L392iRqD
11:12 AM Ameisen: that works
11:53 AM Ameisen: doesn't handle errors/exceptions/such
11:53 AM Ameisen: it's a simple, fast converter
11:53 AM Ameisen: so it's not fully IEEE-compliant. It presumes you aren't breaking things.
12:15 PM polprog: anyone here does ham radio stuff?
12:39 PM Ameisen: while I know better, I lke to imagine that that's using a block of ham to power a radio
12:39 PM antto: my cat would be highly interested
01:02 PM polprog: lol
01:02 PM polprog: its just that i got a motorola mc micro and the soft to reprogram it (its a trunking radio) needs something not newer than a 386 and dos
01:02 PM polprog: it has a ti eeprom (windowed)
01:03 PM polprog: im thinking if there was an alternative to swap it with something newer
01:03 PM polprog: that eeprom
01:03 PM polprog: so i dont have to use the crappy software
01:03 PM Emil: http://rachelbythebay.com/w/2018/04/20/iso/
01:03 PM Emil: https://news.ycombinator.com/item?id=17057377
01:03 PM Emil: That blog makes me irrationally angry
01:04 PM Emil: "Hurr durr not reading the documentation means everyone should pander to me!"
01:04 PM polprog: >hacker news
01:04 PM polprog: i mean
01:04 PM polprog: what did you expect?
01:04 PM Emil: aww
01:04 PM Emil: comeone
01:04 PM Emil: HN has some cool content from time to time
01:04 PM Emil: what do you use for "news"?
01:05 PM polprog: i barely read news
01:05 PM polprog: my reddit is TFTS, retrobattlestations and games
01:05 PM Emil: bro
01:05 PM Emil: append programmerhumor to that
01:05 PM polprog: ikr
01:06 PM polprog: im subbed to that as well
01:18 PM Jartza: eveningh
01:18 PM Emil: evening
01:29 PM polprog: hey
01:52 PM circuit is now known as elektirnis
06:21 PM gruetzkopf: the software for my motorola gp300 select5 works on dos on cache-less dos machines
06:21 PM gruetzkopf: and on dosbox under linux with a usb serial adapter ;)
06:31 PM nuxil: now. make it work without dosbox :D
08:04 PM JanC_ is now known as JanC
08:38 PM Ameisen: ah
08:39 PM Ameisen: that was why it was crashing
08:39 PM Ameisen: had to add mangling routines for the new types
08:39 PM Ameisen: it didn't know how to mangle float16/float24
08:45 PM eszett: j #deutsch
08:46 PM Ameisen: silly ß
09:00 PM nuxil: how many decismals can you have on your float 16 ?
09:00 PM nuxil: *do you use
09:16 PM Ameisen: it's an IEEE-754 half
09:17 PM Ameisen: 5 exponent bits, 10 significand bits. 3.311 decimal digits.
09:20 PM nuxil: hmm you should also make one thats optimized for the ain pins. seen a minimum step is, Vcc(5)/2^10 ~= 0.0049 per step.
09:21 PM Ameisen: wouldn't that be a fixed-precision thing
09:22 PM nuxil: idk. my point was more like. but lets assume you want to use the value on the ain pin. setup as with full 10bit resolution. you have to use a float which is 32 bit. so its kind of overkill.
09:23 PM Ameisen: Sure, but floating point is meant for varying precision
09:23 PM Ameisen: whereas that's fixed precision
09:23 PM Ameisen: you'd be better off making a fixed-precision type using uint16
09:24 PM nuxil: oki.