**** BEGIN LOGGING AT Mon Apr 29 03:08:39 2002

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

