**** BEGIN LOGGING AT Mon Apr 29 03:08:39 2002 hiya there boys hi Yo! I think it's about time with a status-report mail to the list Zagor hmm, yes. i'be been secretly hoping for the irc digests from adi further, have anyone thought about what document format we want? man pages? doxygen? ascii? html? html is good, i'd say * Bagder thinks about API docs etc well, html can be generated from man pages and doxygen for example... :-) yes, but what is the source format? how do we WRITE the docs? right doxygen might be cool, I haven't really worked with it though WRITE DOCS? YUCK! :-) * Zagor takes away Linus' coffee. See? Motivated enough now? we see more and more people asking about various APIs now it'll just grow AAAAAAH! I'll write docs....please GIVE ME MY COFFEEEEEEEE! on the other hand, this is not the best time to document them since they are still changing frequently things like the file.h isn't true anyway, if we'd use doxygen, it generates docs based on function comment headers morning so it should be correct hey wavey_ hi there wav. dug yourself up from under the cvs mails yet? ;) --- wavey_ is now known as wavey yikes, those sure came as a tsunami! heh - i haven't looked since friday * wavey winces ooh, you're up for a treat! (in for?) been a productive weekend wow - busy weekend for everyone! :) indeed no one with a life in sight ;-) i've been busy too. i've written a playlist impl doc which states some fundamentals and asks some qs you wanna read it or shall i throw it to the list? I'd say the list i was thinking we could have a docs/ subdir for complex explanations * Bagder agrees or will the website do? i also wrote about 400 lines of code i'm currently hosting it my own main.c to test it is the simulator at all ready to host that sort of thing? very soon coolio i won't check in my harness then both sims are now supporting the lcd and buttons the same lovely i still haven't checked it out Zagor define "irc digest" ive just been logging :) and i'm busy today :( wavey: your code is mostly using the file api, right? its stubbed out any actual file operations still getting my high level api rite right anyway, when you commit your code we'll make it run in the simulator yus it has an "embryo" for an app now so we could make a playlist editor cool stuff :) i'll be able to do some more later thisafternoon adiamas: someone offered to write up an "irc digest", summarizing discussions and desicions. I thought that was you, but maybe it was someone else? i'll work out what can be checked-in nope was't me ;) im just logging ;) which reminds me, someone is going to have to get today... i was missing a few hours either that or i just pick up where i came in a few hours more or less don't matter * adiamas nods anyone have an id3 tag editor that they would recommend? i can't find anything i like and im to lazy to write my own for linux? yeah I use the command line ones that come with id3lib or 'easytag' for a GUI one nods both kind of works but not extremtly good i use xmms interactively or just tag them when i rip them due to id3lib being rather lame :-/ 800K package for reading and writing Id3 tags?!! lol hehe the most recent versin also fails to compile to my machine they claim I have a "too new" gcc silly persons Whoo. I just tested the event queue primitives. The Alpha version works! But they are not safe for interrupts to post in... good progress I suggest adding a lcd_update_rect() function, for updating only a part of the LCD (recorder) sure it would probably enable cooler stuff s/would/will * adiamas screams i really really hate the recorder some times * Bagder pats adiamas on his head and talks in a gentle tone to calm him down this rebooting thing is realkly starting to piss me off... rebooting? let's hope it is a sw issue yeah... i don't know if its my unit or what... randomly seems like the sw chokes and dies which, since its embedded and all, causes the hardware to reboot i don't get this... I haven't seen it. what are you doing when it reboots? i have a perfectly valid playlist, i go to play it, it loads all 117 file entries, then on "Play" it just lists (Root) "listening to music" :-) when i move to next, it reboots "I was just riding along" I've never had that happen really realy really starting to annoy me. Bagder: you should rewrite id3.c to use nonbuffered io. true unless you plan to implement it :) shouldn't be that hard adiamas: it sure sounds like a sw bug what sw version ? checking 1.25b I have that one too im really starting to think its a hw issue... because it's not related to any particular action does it only happen when you do that, or other times as well? randomly just happened now when i scrolled up the directory menu does it happen when do things that aren't disk-oriented? +you and again sees to be actually.. mis read that.. when its disk oriented or disk related perhaps im really starting to think that the guy i bought it from sold it for this reason sounds like hardware to me this keeps up and i may just buy one off shelf and crack this one open... but the idea of spend 200+ for crap hw really burns my balls. sooooo if we get any more 'donations' and ya'll feel like forwarding them along ;) hehe do you still have warranty on it? id love to break the warentee on this mf. not really... i bought it second hand off ebay, so dunno if i have a claim on it. check with Archos US. if you have it, send it to them. this is definitely a warranty issue. if you don't have warranty, crack it open and check a number of solder points s/check/resolder/ * adiamas has _no_ experiance soldering :) it sounds like a bad connection somewhere to me ok. umm, maybe this isn't a good learning project then :) yeah.. expensive one :) nice.. and archos only gives a 90 day warranty really? I think it's a year in europe "Archos warranrts to the end user customer that Archos products will be free from defects in materials and workmanship for the duration of 90 days, which begins on the date of purchase by the customer. Customer is responsible for maintaining proof of date of purchase." gosh im reading it off their warranty card reboot again swedish law dictates a minimum two years "reclaim time" wow.... that and nice hot blond chicks... im in the wrong country ;) hehe ill tell you this.. your country has one hell of a PR dept. good or bad? i have yet to meet an ugly chick from your country :) seems you only send of the hot chicks as 'opairs' or those live in baby sitters yep, we have a selection board strict regulations hehehe my mailing addresss is: 60 Collyer Ave.. send one on over i promise ill share with my gf.. no worries ;) haha, and she'd take care of...? ;) anything she wants ;) ...you...? * adiamas nods happilty hell... id be happy to sit back and watch her and the 'wife' go at it * adiamas growls it's our compensation for the long dark winters LOL and high suicide rate nature always finds a balance or was that finland? that's a myth, actually we mostly die of cardiac arrest being compensated for the long winters... :-) finland is higher, yes * adiamas is from america, home of the 'fast food, gun ordering, beer buying, convenince store drive through' * adiamas laughs merrily at linus Linus, I ment to ask. Just how common is your name in sweden? Not very. suicide rates per 100k people: USA 11.3, Sweden 14.2, Finland: 23.8 gotta love the internet :) * Zagor should be writing code review protocols right now. Bleh.. hey, look, another reboot heheh code review protocols? yeah. medical equipment requires lots of red tape nod anyone else having a hard time loading the rockbox site? No. why? hmm, it's gone blank again i don't know why that happens Oh. Now i see. I saw that yesterday too. Itäs probably Zagors lame update cron job that fucks up. it is, but why? thats simple 42 ello Hi! hey ironi ellooo wat append to te ''s? ah, now I get it * Zagor is slow tey were lost in te ash ahhh, missed one :) hehehehe tougher then it looks ;) you wanna really cook your brains? take a look at: http://orion.ramapo.edu/~rhak/misc/illusions/pic19692.gif yeah, seen it. it's cool cool yes folks... rob has hit double digits on reboots yikes. your archos is next to useless ya think? it seems fine for a while, then *poof* Curious. Does it happen when you have the charger connected as well? haven't tried. Do it. trying good test. there's a known problem with the spirals holding the batteries how do you mean? s/spirals/springs/ btw.. what time is it by you? your what, gmt+2? +1 so its like 11 there? yup * adiamas nods stupid sunlight sunlight? i wish we had some * Zagor saw some last week yep well i hoped for sun tomorrow night but no luck, it seems Hi alan hi ! we should add "tetris" in the status list ;-) nods :) we should add scores ;-) how about adding the ability for the game to end ;) that's not a bad idea! hehe adia: what do you mean ? --- Linus is now known as Linus|lunch the game has no "game over" ? alkorr when the blocks reach the top and you are out of room, the game keeps sending blocks :) arf quite annoying :) let's blame Björn! ;-) time for lunch, cu --- Zagor is now known as Zagor|lunch * Bagder silently points out that we *are* gmt+2 while having daylight savings time because britain is gmt+1 right now :) yeps funnily enough ;-) stupidly enough timezones are an abortion indeedo nah.. timezones only happen because of buisness and the railroads if i remember correctly what's wrong with a single hour across the globe ? who cares that 0500 is midday? or that you wake at 1900? I bet the chinese are on our side they have one time zone for a country as wide as five or so yus probably the only thing they agree with us on ;) hehe very probably well, i think its part psychology... you try and convince a new yorker that 0800 is really noon or 1 depending hey ho ad: you'd soon get used to it even a new yorker ;) when britain conquers the globe again, we'll insist it :) actually the only way britain could conquer the globe again is if everyone else goes to mars on holiday --- Bagder is now known as Bagderfood #define file_width 5 #define file_height 7 static unsigned char file_bits[] = { 0x11, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x11 }; /* Created with The GIMP */ was at the top of that heh thats 1 char [duh] the gimp makes it easy hmmm? whats that? what? your bit about file_bits whats it in reference to? i just drew a thing in the gimp and saved it like that heh heheh okay... * adiamas still doesn't get it, but thats okay.. hes off to nap --- Linus|lunch is now known as Linus made a new 5x7 image, image->mode->indexed, set it to black/white (1-bit) palette then drew it with the pencil tool with a 1x1 brush and saved as an xbm and thats what it outputs i'm gonna paste it directly into some cgram code and see how they look heh --- Zagor|lunch is now known as Zagor so yeah it looks just like it does in the gimp on the player LCD heh nice its 8 custom chars though i think i think i said something about 11 before but if i did i think i was wrong heh but i tested it again and it's not detected by usb-storage with custom firmware running huh? that sounds strange. we have no control over the usb interface must have *some*, at least one some models if nothing else... i have to plug in the usb cable as soon as the rom version shows its boot screen and before it loads the HD firmware "With custom firmware running"? Recorder? no, player, studio 20 So you can't plug it in when the device is off? i dunno i probably can what does the linux log say? but once non-archos firmware has been loaded from the HD, usb-storage doesn't recognize it if i plug it in you should see a log entry from usb.c or hub.c anyway yeah it loads up and thats it it just says it loads I guess the firmware must disable the ATA buffers when it senses that the USB is connected. so i let it boot up with archos firmware till it shows the first directory on the screen, then i plug it in, says "USB ..Active..." with the little logo, then i modprobe usb-storage, the unit clicks and in dmesg i see a bunch of output about USB and scsi and the drive info etc --- Zagor is now known as Zagor|away and then i can mount it and use it blah blah blah... so now i'll do the same thing with other firmware running and say what it says :p Initializing USB Mass Storage driver... usb.c: registered new driver usb-storage USB Mass Storage support registered. thats it the archos doesn't click or do anything either and when i unplug the usb cable the archos still doesn't react those 3 lines are every new message in dmesg after the last time i unloaded usb-storage, and includes the nothing it printed when i plugged the device in :p --- Bagderfood is now known as Bagder It looks as if the firmware has to enable the ISD200 chip somehow. apparently Is this a problem for you as it is now? no just interesting :p OK. I'll put it to prio -7. :-) it'll be annoying not to support that though Of course we will support it. when our sw is running I'll just have to dust off my multimeter. hi hi man... heh - still at school ;) oh, from a computer at school ? yea * edx gets his funky rockbox tshirt today did you do anything to the simulator code? * Bagder hasn't i meant calpefrosch :) he wanted to change stuff (maybe) * Bagder understands now * Bagder doesn't work from home today, blaaa had to shave ;-) --> alkorr (alkorr@srs07v-8-105.n.club-internet.fr) has joined #rockbox Hi alan Hi Linus * edx doesnt work from home as well * edx is at school and has lesson :) hi hi edx sorry.... re :=) I did nothing. ok edx: :) =) what's up , guys Not much. Working... Welcome Hi there. Hi ok - gotta go :) cya later Bye cu welcome elinenbe --- Linus is now known as Linus|work well cu Badger: with the simulator, is there a cut between the firmware and the PC-code ? that I know where to do what .. well, the simulators offer a few APIs using the very same functionality as the firmware code will offer so that code could be written to get displayed in the simulators and then moved to real firmware without much trouble ok. currently we offer the lcd API and button API (recorder style) in both simulators check out the uisimulator/app.c code and you'll see how you can program code that should work in simulatorss and target in the button API, there must be some repeat functions and some function to avoid a dubble press double how do we make a function that avoids double press? we have to do it twice, I think we do know when a button is pressed and when it is released I don't know the english word for "entprellen" me neither ;-) if a button is pressed, we have to wait until it is released. and then recognize the next we don't have to we get separate events not? we can just wait until a button is released button = button_get() if(button & (BUTTON_PLAY | BUTTON_RELEASED)) yada yada but yout want the action when pressed, not when relased... yes then you fix that thing is Did you test it on the target hardware? you may want to support having the key pressed a long time too right so currently, if you wanna do funny checks you need to do it yourself the api returns the button-press event "entprellen" = "debounce" it is a hardware-thing if a key is debounced. the api actually checks for key-repeat if I'm not mistaking if not, we have to do it in software... what is debounced? released? ok, think about a key pressed. in digital like this: ___|----|____ but it could be: ____|-|_|-|_____ because there is no full contact you're worrying too much ;-) if that'll be a problem, we'll fix it it is only one press, but two digital signals with µs between them that is because I did some key-programming for a tanning bed. I had this problem there... yeah, a common problem for this kind of thing if I would have the hardware to test some things, I would feel better you don't have the hardware? sure, but I don't want to destroy it or lose the guarantee ah, you want to mess around with thw hw, I thought you meant sw Yes, the keys must probably be debounced somehow. right, but can I load the firmware on the recorder? is it safe ? uuuuh safe? ;-) naaah I will try the simulator...;-) hehe no debounce problem there ;-) cool * Bagder curses .pac files do we have a message loop in the firmware? not yet --- Zagor|away is now known as Zagor Linus works on the message queue I believe we need no debounce, since the keys are polled an not interrupt controlled it is important for me to know how the key-thing will work in future so if we poll them @10Hz debounce is not really a problem ok, I agree yes, there are some details left to figure out Bagder's statement above holds true only there is a problem with key-release example: 1. I press and hold ON, get_button() returns KEY_ON|KEY_HELD --> ghssg (~fdsasf@pD9560C13.dip.t-dialin.net) has joined #rockbox --- ghssg is now known as edx 2. I keep pressing ON and also press down PLAY. get_button() returns KEY_ON|KEY_PLAY|KEY_HELD <-- edx has quit (Client Quit) ok, but where will the get_button be called? 3. I keep pressing ON but release PLAY. what does get_button() return? I agree calpefrosch: from the UI code. it will read from a message queue it would need a hold for each key the timer interrupt polls the keys and posts events to the message queue ok, I will do it in the win32 gui. the code is not working like that now Bagder: so, we actually have UP and DOWN events for individual keys, rather than a bitmap for all keys? calpefrosch: why does it have to work like that? calpefrosch: the events and queues is implementation specific. only the get_button() api needs to work the same. Zagor: that's possible too on windows it is difficult to choose one position, because it repeats the key very fast. calpefrosch: yes, that has to be filtered in the simulator, because edx has polled the key Bagder: well, we have to decide on a system I'll try this now, ok? I can send you the diff. on which adress? Zagor: yeps how does win32 handle multiple keys? hmmmm, I will look. wait calpefrosch: I don't have a win32 compiler, so I can't test it I'm afraid I think diffs could very well be posted to the list imho i agree ok Are you sure the keys should be polled? What about a lockup? lockup? you can always hold down the off button on the current recorder and it will always shut it off, even if there is a crash such as a hard drive crash, etc. we have no alternative to polling. there are no interrupt lines conneted to the keys It seems the off but at least must trigger an interrupt... how do they currently do it? i don't know but you have to crash very hard to lockup the timer interrupt... well, we don't have to stop polling just because the drive crashes... :-) so I don't see a problem Is that the way it is currently done? we don't have their source code, so it's difficult to say since there is no irq from the keys it is hard to figure out how else it is done I see. It just seems polling anything is a waste of cycles... polling has its' place Actually, polling is a good medicine for bouncing buttons. polling in general is good when you want control of the rate of events well, you know more then I do, so I guess. We try hard to sound like we know something. :-) :) sshhhh ;-) ok, in windows I get an event for keydown and keyup. I could send the keycode to the button.c and save it there and wait until the polling main programm do a get_button. or what ? so both X and win32 use key down/up events. I guess we should do the same calpefrosch: sounds good how do you do in x ? it the key handles remembers the last button and you get it with button_get() that's it. I could make my own buffer... buffeR? but that would be too complex, I think a queue is best we should have that on x11 too that's what I meant ok --> edx (Krutzs@p5081384C.dip.t-dialin.net) has joined #rockbox hi edx. I changeg some code for key-handling in your win32 simulator. Because I have much work now, I only give you the changed code. Please commit it after reformating it. :-) ok? or I send it to the mailing-list I have to go in 2 Minutes... don't worry about committing nonworking code in this early stage, that is ok it's a better way to collaborate than mailing code back and forth I can't commit. I send it to rockbox@cool.haxx.se. But it's working !!! ok mny tnx, bye --- calpefrosch is now known as calpefrosch|away <-- edx has quit () <-- calpefrosch|away (~calpefros@62.52.174.30) has left #rockbox <-- Zagor (~bjst@labb.contactor.se) has left #rockbox --> edx (edx@pD4B9E9D6.dip.t-dialin.net) has joined #rockbox good afternoon hey again --- edx is now known as edx| --- edx| is now known as edx hi <-- Linus|work (~linus@labb.contactor.se) has left #rockbox I'm about to leave too <-- Bagder (~daniel@as3-3-2.ras.s.bonet.se) has left #rockbox --- edx is now known as edx|away --- edx|away is now known as edx is anybody here? <-- jb1081 has quit ("[x]chat") --> calpefrosch|away (~calpefros@62.52.174.30) has joined #rockbox hi --- calpefrosch|away is now known as calpefrosch hi check this out: http://codeforce.d2g.com/rockbox/tshirt2.jpg :) *checking out the code you mailed* that is the backlight thing? boolean IsButton(int key) { return (key == last_key) ; } hmmm... if (key & last_key) might be mroe than one key pressed and there's a tab :p yea not my code :P i replaced tabs with spaces right, but I had no time to make it more comfortable heh .. what is the new_key function for? I'M just hacking it into the machine. couldnt that be done within button_get? and I'm at work now, so we have to discuss this later. 30 Minutes ? ok. tnx cool shirt. thanks :D * PsycoXul wonders how he ended up on a t-shirt :p hehe :P i just had to put some names on there i hope you dont mind :) but it is cool shirt... though i can't say the same for the hair :p haha --- calpefrosch is now known as calpefrosch|brb edx.. i love the shirt :) --- calpefrosch|brb is now known as calpefrosch ok, back again edx? the main message loop of the windows programm sends every character (WM_KEYDOWN) to the new_char(int Key) function the new_char of the button.c stores this character. in future maybe in a loop. s/loop/queue when somewhere the get_button is called, the stored key is given to the caller bakc hmmmm bakc ??? back :) oh the problem is that you cannot simulate that on a jukebox device. ok, do you understand the new_key thing? i understand it but you cannot use that outside the simulator. sure, the jukebox should so it the same way, i think s/so/do it wont. it will be polling the keys. in future the "rockbox" gets a message-loop also for keypresses? we dicussed this earlier this day that is new to me :) you has been to school ;-) but you must be able to press more than one button at the same time. return (key & last_key) ; right, I had no time to do it. Can you ? not key == last_key yea i'll try. maybe you shouldn't use this isbutton function i don't know they didnt declare the functions yet. hm is it commited ? ytf is nobody here (Zagor, Bagder) not yet. anyways. the simulator is not responsible for calling the new_key function. this method has a second effekt. the backlight is only a "nicety" that is still done by the firmware hmmm, the firmware should generate the key_down ( like windows does )message. Who polls the message_queue ?? that is done by the thread i guess (thread.c) that is bagders work i think... and the thread should fill the button.c's button_queue, I think. We have to discuss this with Zagor and Badger they have the experience uhm.. we should wait till they definded the functions. but like this it's working even with the key-repeat of windows the button queue.. hmm i do not think that this is a really good idea :? well but you cant catch multiple key presses with this message queue only if you poll all keys. we don't need it. but we should save the button til the programm wants it. async i fully understand. it is not a bad idea. but we still need to support multiple keyrpesses also, what if one process "grabs" a key and the second one doesnt get it anymore, tho it is still pressed yes, I know what you mean. this is a problem. ill wait for Zag to show up :) i'll ask him about that then. I think he do it in the x-version ( x-files, hehe ) ... *having a look* not yet. hmmm, it is an important, I think thing its a basic. the hardware interface didn't allow multiple keystrokes at any compination well.. yes s/p/b :-) but I like the color of the backlight ;-) i think for the player.. to regulate noise or somethign.. there was a multiple combination hmm, I never saw the player. only the recorder i had a player before.. the lcd sucks.. where did you buy the recorder ? i bought a player at Promarkt (lol) then I damaged it and sent it back - the sent me a recorder :) *the = they hey you lucky ... go and play Lotto ;-) hehe.. Lotto never works ;) tried a lot of times hehe --- You are now known as adi|home hi hehe hi I'll go home and eat a pice of cow. bye hehe.. cu maybe we talk later k * edx cries out desperating where is Björn? --- calpefrosch is now known as calpefrosch|away <-- calpefrosch|away has quit () hi hey ironi so i wonder if you hook up IR to the serial port or whatever what kinda crazy things you can do with furbys and pda's and ir-capable printers etc :p morning. morning how are you ? ah hi ;) tired :) --- edx is now known as edx|breakfast --- calpefrosch is now known as calpefrosch|brb --- calpefrosch|brb is now known as calpefrosch cya. <-- edx|breakfast has quit ("school") <-- calpefrosch has quit () * adi|home pokes Bagder in the forehead * Bagder hrmpfs how did the background suddenly go green on the uisimulator? I changed it to look slightly more like a real recorder k... but is the width correct? seems to be wider then my screen. having white on black was too far the square is drawn outside the actual size ? actually 3 pixels outside I believe I should change that we should have exactly 112x64 within the square well... define 'square' the full app? because i don't see any boarder inside the app. you don't? wait grrr my X-redirect over ssh is not working properly sorry :( anyway if you want.. i can give you a screen shot of what i see. there's meant to be a box within the windows -s the box us meant to define the actual recorder lcd size okay.. i get the box as soon as the menu loads, but not before... which seems odd well, it might be because my silliness ;-) I mean it could possibly be fixed in the code I haven't bothered that much not really needed... was just curious :) heh, ok, I committed a little fix now that should make the box appear before the app gets called nod did you change the makefile as well? yes didn't work on Solaris heheh k... cause now it bitchs on linux ;) ill look into it ok, hang on now interesting.. dind't know you could do += in a make... cool. I'm not 100% that is really kosher Make but we're already using gmake extensions nods --> Zagor_ (~bjst@labb.contactor.se) has joined #rockbox --- Zagor_ is now known as Zagor morning morn --> Linus (~linus@labb.contactor.se) has joined #rockbox morning Linus Hey ho on a win machine, does sleep(1) sleep for one second or what? edx's simulator has its own sleep() that is shorter k... the x11 one will too, to better much the target sleep() to better much? :) gee match cause i was wondering if it made sense to have a sleep in uisim or so... * Bagder smacks himself one with #defines for win and *nix *nixs calling utime we have a sleep() in kernel.h ahh.. we do? does it work :) yes. sleep(ticks) apart from utime() not being very portable... the declaration works excellent :-) * adi|home giggles ummm. wtf is TIME_BEFORE? it's a wrap-safe macro to compare ticks, for timeout handling "if (current_tick < timeout)" is not wrap safe nods "if (TIME_BEFORE(current_tick,timeout))" is what exactlly does 'wrap safe' mean? and since TIME_BEFORE(a,b) is just a macro of TIME_AFTER, why not just call TIME_AFTER? it means the comparison still works if "timeout" is just below the wrap value and you compare after current_time wraps umm.. k having both macros is just to make the source a little more clear. (instead of if(!TIME_AFTER()) that makes sense.. --- Tumm is now known as coyote- do you see lcd_drawpixel being any faster then lcd_drawline if you want to draw a line :) umm, no makes more sense to call drawline, no? yes nods k, then im fixing tetris ah :) first step to scaleability Zagor: what'll be the name of the root dir? ummm, root ;) / * Bagder considers having a go at some directory stuff later on neat we'll support different partitions, but only one at a time for starters im gonna ask a really foolish question, but... (in fact, the fat32 code isn't working on partitioned disks right now...) considering we are working on our own kernel and file stuff... how exactly do you write, well.. 'open()' and 'readdir()'? w/o unix or win calls? * adi|home has never gotten that deep we have our own everything unix/posix style open() calls fat_open(), which calls ata_read() got ya... we have a severe NIH syndrome ;) and aside from peering over your shoulders, how does one go about learning this? NIH syndrome? "Not Invented Here" lol --> alkorr (alkorr@srs06m-3-131.n.club-internet.fr) has joined #rockbox we must document the APIs hi so were still at the: "E=mc^2 => *insert magic here* => universe is born" kinda stage learning about it... hmm, reading books about operating system design, I guess. or reading source code :-P nah, practically no magic left. we only need to glue the pieces together hi alan --> wavey (~wavey@dlan1431.dircon.co.uk) has joined #rockbox ah, alan! hi. 'lo wavey hi guys what's up ? the x11 sim runs on solaris again :-) unfortunately, I need to work too much... tell me about it :( * wavey considers quitting work to concentrate on rockbox do you guys give sick leave? :) I should sure do... you leave... and ill make you sick hehe --> calpefrosch (~calpefros@62.52.174.30) has joined #rockbox hi hi did you discuss the button-thing with edx yesterday? no i had to run off hmm, ok. ok i have some problems with my emails new commitings ? nothing came thru here in the last 15 mins but my company run m$ exchange, so i'm surprised when any get through i wasn't here 15 ago :) 15 mins ago :) Bagder: you create x11 in uisimulator as a module ? i was forced to do a checkout instead of a update for uisimulator to get x11 alan: you need to run "update -dP" to get new directories yes but that's strange because when a directory is created in firmware. With a update, i get it. so i was wondering what the difference should be strange can someone look at tetris.c and tell me if im missing something? function draw_block should be around line 126 if ( (clear ? 0 : block+1) ) wouldn't it just make more sense to do "if (!clear)" * Zagor agrees unless block is ever -1 would be a little less, um... obfuscated no? shouldn't be, block should always be positive im gonna play and see I didn't write the code from scratch, I stole most of it. There, blame assigned elsewhere. ehehe im not blaming.. just wanna feel like im doing something useful, and this time of night i hove no confidence ;) adi: please, stop with obfuscating feeling adi: for me, clear ? 0 : block+1 is clear alkorr: but surely, (!clear) is even more clear adi: i suppose i are clever enough to catch it, aren't you ? * adi|home nods but i have to stop and think about it. sorry i mean : you are clever enough... why both with a ternary operator when "if(clear)" is obvious ;) code should only make you think when it has to... but thats just my opinion adi : sorry, but if (!clear) is not the same as if (clear ? 0 : (block + 1)) !? adi|home: go over it again. that 'block+1' has me worried. why is it even there? I can't stop thinking that the ternary operator is there for a reason... thats why i asked. far as i can see, i cant see how block would be negative 0, sure, but can't see negative ok, try it. if it works, it works and if its zero, then in this case it becomes 1 * adi|home shrugs oh well i you can give us an evidence that "block" could never be -1, okay 04:41 here... hehe thats why i asked for confrimation :) right i cannot :) now nods then we leave it be :) I'd write it (clear || (-1 == block)) arf lol uh no block is the block type: 0-6 it can't ever be negative it must be a late-night leftover from the author * adi|home points at the clock and says 'ha!' i defy you sleep! * adi|home slaps mr. sleep around please chech the precedency check ? that doesn't change much here the statement is: if ( (clear ? 0 : block+1) ) i don't remmeber if clear ? 0 : block + 1 and clear is supposedly a bool. ahh.. so what you think is that its maybe is (clear ? 0 : block +1) or (clear ? 0 : (block + 1)) if (( (clear ? 0 : block) + 1)) alkorr: they're the same +1 is way much higher than ?: prioritized nods either way... if clear == 1 we get 0 or 0 +1 it doesn't make a sense what could be the value of clear if would be true it especially if block is never -1 i don't get what you are saying al if block can't be -1, we can make it if(!clear) nods if clear == 0 and block >= 0, ((clear ? 0 : block) + 1) => block + 1 >= 1 if clear == 1 and block >= 0, ((clear ? 0 : block) + 1) => 0 + 1 == 1 so your "if" is always true !? right... unless block can be -1 sooooo precidence is ((clear > 0 : (block +1)) no since block can be 0 if clear is TRUE the first block is NOT run * adi|home nods no matter what block is .me nods * alkorr nods :) >Bagder< lotsa discussion for clear code ;) uh Bagder: you said : "if clear == 1 and block == 0 ?" * Zagor proposes if (clear) clearpixel(); else drawpixel(); alkorr: if(!clear || (-1 == block)) * adi|home agrees with zagor hey ! we were speaking about the ternary version !!! alkorr: it's the same logic result if clear==0, it doesn't matter what block is sorry, the opposite :) baaaah nooooo if you have "if ((whatever) + 1)", this 'if' is always true except when whatever is -1 now 'whatever' is clear ? 0 : block yes, but this is not the statement here. we have so for whatever to be -1, block must be -1 that's all if it doesn't make a sense to have block == -1 but if clear==1, block kan be whatever because it's never evaluated well i'm okay this ternary is a non sense if block would be -1, we would read outside the array anyway if clear == -1, clear ? 0 : block always returns 0, then added to 1 => 'if' is again true clear = 1 now stop arguing and clean up the mess! :-) argh mistake well we aggree on the fact that this ternary is a non-sense if we are sure that block would never be -1, so "if (clear)" is the rigth thing to do already commited :) its wrong ;-) btw.. anyone know if edx is willing to make up other shirts and mail them out for a fee? is it? yes it should be if(!clear) to match the former or switch the blocks no it shouldn't i did ah you did * adi|home nods didn't spot that sorry lol adi|home: you used TABs! but i forgot to go into rockbox mode when i edited, so spacing is messed up :( ill fix it Iknow.. im fixing it * Zagor spanks adi uh * adi|home shivers with pleasure i was afraid that you didn't aggree on the final result wrong-sized too... no.. only wrong sized for rockbox ;) bah, no sane man uses TAB!=8 * Zagor holds The One Truth i don't i use 4 spaces I use 2 spaces you prob also use a 140 char wide display too huh ;) i'm talking about the size of TAB, not indentation yes we know :) for assembly, i use a 8-space tab, for c/c++ 2-space tab fixed alkorr: that's criminal. why don't you just use spaces? because in fact, tab are turned into spaces :P ah because there are only 2 developers in my office, we came from the same college, so we do it _our_ way... * Zagor breathes a sigh of relief so there except for assembly code of course * adi|home sticks his tongue out at Zagor * Zagor takes his ball and goes home lol oh.. and i figured out why tetris doesn't end. * Bagder smacks the "code police" stick in Zagor's forehead lol * Zagor wears it proudly /me frenzy sticker I meant to write im too tired to rework it, but its basically the calls to valid position okay i must depart, some people are waiting for me to have a lunch see you bye you don't know exactly why it fails, so it just continues playing... <-- alkorr has quit () need a seperate check to see if we reached the top line or limit and on that.. i bid you .... fondu... --- You are now known as adi|asleep mm, fondue... * wavey cmiles * wavey blinks * wavey smiles * Bagder got a mail from a Kjell Ericson who said he's working on a "magnifyer" for the x11 sim cool * Zagor just got the donated Archos working with gdb * Zagor cheers great! Well, actually, it's a marriage between his newly-swapped Player and the donated one... yeah, so we have the wrong flash so the built-in firmware can't control the LCD * Linus feels like Frankenstein oh this is great, now I can debug the ata code how can we fix so debugf() calls are not even called in "release" code? Maybe a DEBUGF() macro? DEBUG(("moo %d", 23)); ? DEBUGF("%d", x); yes but that limits the use to a single line, which is not always practical plus, macros don't have variable parameters They do in gcc ah, ok SIngle line? but be careful if you wanna be able to run that code in debug purpose with other compilers Linus: you can't write: DEBUGF("asdalkdkajsdl kasdl %d %d %d %d %d", val1, val2, val3 ); etc. Ah. I thought the preprocessor recognizer the parentheses... recognized umm, i'm sure it does. So...? i just haven't had my piiza today * Zagor hides in a corner You mean chicken? Sambal adi promised fondue... :) --- Linus is now known as Linus|lunch --- Zagor is now known as Zagor|lunch --- calpefrosch is now known as calpefrosch|lunc --> simo (~NWO@ws2014.tu-varna.acad.bg) has joined #rockbox hy hi hey ho everyones lots of people eating right now... I'm about to do that too! ooo sorry if you want eat :) do you can help me with what? do you can tell me any channel for HARDCORE music no idea ok or any for hard music nope ok 10x <-- simo (~NWO@ws2014.tu-varna.acad.bg) has left #rockbox --- calpefrosch|lunc is now known as calpefrosch --- Zagor|lunch is now known as Zagor bwahaha my current client got som many hits from a link on my web page they have complained... they complained on you having a link to them? Yes they did. --- Linus|lunch is now known as Linus <-- Bagder (~daniel@as3-3-2.ras.s.bonet.se) has left #rockbox <-- Linus (~linus@labb.contactor.se) has left #rockbox --> Bagder (~daniel@as3-3-2.ras.s.bonet.se) has joined #rockbox * Bagder is now chatting from his home again... aaaah grrr wish i was home i keep getting interrupted from playlist coding * Bagder fixes the id3.c to use the proper file api Bagder: how about adjusting your little menu program to read a directory, parse the id3 tags and show the files? umm, strike the id3 part. just read the dir and show the filenames now, how did you know I was about to do that? ;-) ah, goodie first fix the id3 then read dir and show it what about the lack of opendir on win32? they need to emulate that edx is onto that coolio i had thought cygwin had wrapped those calls, but apparently not :( edx doesn't use cygwin 2 questions: the CONTRIB file says no 'const' and no new types. why the former, and what do you mean by the latter? * Bagder redirects those sorts of questions to Zagor, the code police ;-) eg: void get_indices_as_string( char *string, playlist_info_t *playlist ) does that break both rules? :) regarding the type thing, I don't think that concerns structs damn, i mean const char *string it's more the uint32 things etc ah, goodie i did wonder. the const stuff, I don't know why it is said so i like to flag unchanging strings as so, to help the compiler let me know if i fuck up the compiler can also do better optimizations when const is used yus id3.c fixed does id3.c still have main() defined? the reason I don't want people to use const is that many people tend to overuse it within an #ifdef DEBUG_STANDALONE --> elinenbe (~chatzilla@bgp01080511bgs.wanarb01.mi.comcast.net) has joined #rockbox b: ok or use it wrong, so you can't (for instance) call a function with a dynamically generated string z: what is overuse? ah ok the "new type" rule is just like bagder said. also I prefer to have structs as structs, not as typedefs that way, it's plainly obvious it's a struct and not some other magic type oh, ok regarding file operations do you mind if I just come up with a relative path we use as root when simulating? like "archos" or so z: struct playlist_info *playlist in place of playlist_info_t *playlist ? how do you mean? wavey: yes, preferrably ok, no prob * wavey changes a millon prototypes Zagor: I need a simulated hard drive that opendir("/") opens Bagder: ok. so basically the simulator defines the root as some specific directory yes but the application code never knows it's not the root right i'm all for it the application uses / for root * Bagder calculates, 112/6 = 18 letters in a single line i was thinking, wouldn't it be a good idea to word-wrap filenames? not sure personally, I prefer seeing the whole name of a few rather than half the name of many they're sometimes so extremely long anyway, I'll start with something simple for now What did you do with my code for the simulator ? btw, I'm ashamed of having tabs in the code.... * Bagder hrmpfs at the added #ifdef WIN32 in the app.c code... calpefrosch: you should make diffs and mail instead ok, I will do that in future. the ifdef is not my work no, I didn't mean that either, sorry ok the major change it made was the different key-handling. we should talk about the right way to handle the keys ( in win32 AND firmware) yes i propose single-key events just like win32 and x11 1. the button is pressed, so an interrupt occure no interrupts ah so you poll the ports, right ? yes ok, if a button is recognized, the thread sends a message to the main-queue my thinking is more: the timer interrupt polls the keys if a change is detected (or "repeat" is triggered), it sends a message to the UI thread so a "repeat" is only one message ? "repeat" is triggered by a key behing kept down during X consecutive polls good question we should probably have a defined repeat rate I think in the win32-sim windows creates the messages like in windows... in dos 6.22 (e.g.) the keyboard generates the repeat. I thi nkin windows windows does.. ok, next. Let's say the timer-thread creates one message ( single, or every second if repeat) what will the ui-thread do with the message? it will get it from the queue with button_get() then it will, well, do what applications do :) tnx ;-) the button_get will scan the queue for a button-event, or the application will do something if there IS a button event? wocka showing a dir ;-) nice! I'll commit not very fancy, but it works --- Disconnected (Connection timed out). **** ENDING LOGGING AT Tue Apr 30 09:33:31 2002