00:00:08 | HCl | and next to that, being able to process the conditions efficiently |
00:00:17 | preglow | rasher: if you do it that way, you'll need tons of memory anyway |
00:00:19 | HCl | no point in thinking about it yet. |
00:00:43 | Bagder | tons of file seeks at least ;-) |
00:00:45 | HCl | i had thoughts about an array whether a song is in or out *shrugs* |
00:00:47 | preglow | will probably have to apply all the conditions simulteneously for all files |
00:01:11 | rasher | it'll pretty much have to look at all files I guess |
00:01:23 | rasher | well except for some condition that can be "tabled" |
00:01:29 | preglow | why a ton of file seeks? |
00:01:46 | Bagder | well, hopefully the runtimedb is not all files |
00:02:00 | rasher | that's helpful |
00:02:15 | rasher | so looking at conditions that apply to the runtimedb |
00:02:32 | rasher | is a good thing to do quick/first |
00:02:41 | rasher | but if none of them do :- |
00:02:44 | rasher | :-/ |
00:02:46 | rasher | oh well |
00:02:50 | rasher | they'll just have to wait :) |
00:02:53 | preglow | rasher: if you apply the conditions partially, you will probably need a ton of memory |
00:02:56 | rasher | a progress bar would probably be nice |
00:03:02 | Bagder | haha |
00:03:24 | Bagder | if the music isn't playing, I know a big buffer we can use! ;-) |
00:03:25 | rasher | http://www.rockbox.org/mail/archive/rockbox-archive-2005-04/0136.shtml |
00:03:28 | preglow | hahaha |
00:03:32 | preglow | oh well |
00:03:36 | preglow | i really don't care about this stuff |
00:03:45 | preglow | i know my own music collection in and out |
00:03:55 | preglow | and know pretty much exactly where what i want is |
00:04:06 | rasher | but what about the things you don't know that you want? |
00:04:20 | preglow | like i said, i know my music in and out |
00:04:23 | preglow | i know what i want :P |
00:04:26 | Bagder | I like the idea of stats |
00:04:35 | preglow | i don't care about stats either |
00:04:35 | Bagder | what songs do I usually skip? |
00:04:48 | preglow | i don't skip songs, i choose what i want to listen to and then listen to it |
00:04:55 | preglow | heh |
00:04:57 | rasher | a thing like "average play percent" |
00:05:15 | rasher | a song that's played 5% usually isn't going to gain much respect from me :) |
00:05:25 | Bagder | I usually play my 4000 entries playlist in shuffle... |
00:05:32 | preglow | hah |
00:05:34 | rasher | but could make for an interesting playlist :) |
00:05:38 | preglow | is there an album shuffle? :P |
00:05:52 | preglow | find random album, play it, find random album, play it |
00:06:18 | Bagder | preglow: we leave that feature for you to write |
00:06:19 | Bagder | ;-) |
00:06:21 | preglow | haha |
00:06:24 | rasher | Hurray, Debian release! (of Woody - r5) :( |
00:06:33 | * | preglow hugs ubuntu |
00:06:58 | rasher | I keep coming back to Debian.. |
00:07:03 | rasher | It just feels more like home |
00:07:04 | preglow | why? |
00:07:06 | preglow | hahah |
00:07:12 | preglow | windows feels like home to me |
00:07:24 | rasher | Ubuntu's like visiting a fancy house.. it all looks nice, but I dare not touch anything |
00:07:39 | Bagder | I have windows in my home too... .-P |
00:07:53 | preglow | i'm in linux for easy development right now |
00:07:59 | preglow | but for ordinary use i like windows, for some reason |
00:08:05 | rasher | well I run windows on my laptop |
00:08:14 | preglow | linux also sucks for sound applications |
00:08:21 | preglow | because it hasn't got any good ones, mainly... |
00:08:25 | rasher | mostly because my wifi nic is a bitch, and I'm stuck in the world of IM |
00:08:27 | preglow | and i do a lot of sound |
00:09:02 | rasher | Bagder: did you see - http://rasher.dk/rockbox/ircstats/ |
00:09:19 | Bagder | no... |
00:09:23 | * | Bagder runs over there |
00:10:09 | | Quit BBub (""Fange nie an aufzuhören. Höre nie auf anzufangen." - Tiki") |
00:10:32 | preglow | why, there he goes proving why he's the /me king ;) |
00:10:58 | | Quit zezayer ("Chatzilla 0.9.67 [Firefox 1.0.1/20050311]") |
00:11:52 | Bagder | well, 1138 /me is about one per day ;-) |
00:12:01 | | Join [1]MoosCamaro [0] (HydraIRC@m214.net81-66-158.noos.fr) |
00:12:35 | | Quit [1]MoosCamaro (Client Quit) |
00:12:41 | rasher | there are 1000 days of logs, in fact |
00:13:00 | rasher | or 1001 if I updated now :) |
00:13:09 | t0mas | ok, bmp loading tomorrow :) |
00:13:21 | Bagder | ls -1 rockbox-200*txt | wc -l |
00:13:21 | Bagder | 1034 |
00:13:27 | t0mas | I have it loading correctly.. and displaying in * with debugf() |
00:13:38 | rasher | strange.. maybe pisg limits to 1000 days |
00:13:51 | Bagder | the first ones aren't dancer ones |
00:13:53 | * | t0mas is away: tv |
00:13:58 | rasher | ah |
00:14:00 | rasher | that's it then |
00:15:24 | rasher | what, no wiki updates on saturday!? |
00:26:39 | preglow | why doesn't the rockbox list have a subject prefix? |
00:29:06 | Bagder | because we don't like prefixes |
00:29:23 | preglow | it's the first list i've ever been on that doesn't have them :/ |
00:29:26 | Bagder | we use procmail |
00:29:38 | Bagder | man, you haven't been on many lists ;-) |
00:29:42 | preglow | true |
00:29:59 | preglow | i'm on about five at the moment |
00:30:11 | preglow | two of them digest |
00:30:38 | Bagder | I've lost count |
00:32:01 | Bagder | I get >700 emails per day |
00:32:28 | Bagder | half of them are spam of course |
00:32:36 | preglow | ugh |
00:32:51 | | Quit asdsd_ (Read error: 131 (Connection reset by peer)) |
00:32:55 | preglow | how do you ever get things done :P |
00:33:26 | Bagder | I just avoid real work ;-) |
00:34:17 | | Join asdsd_ [0] (~asdsd@h-67-100-30-151.miatflad.dynamic.covad.net) |
00:34:34 | preglow | i think we've got nick of the year contest winner right here |
00:36:34 | rasher | I have a handy procmail rule |
00:37:21 | rasher | :0: |
00:37:24 | rasher | * ^(X-(Mailing-)?[Ll]ist(-Id)?: <?|Sender: owner-|X-BeenThere: |Delivered-To: mailing list |X-Loop: )\/[-A-Za-z0-9_ ] |
00:37:32 | rasher | lists/$MATCH |
00:37:37 | rasher | catches most mailing lists |
00:37:40 | rasher | it's like magic |
00:37:52 | * | preglow vomits |
00:38:00 | rasher | I know |
00:38:03 | rasher | but it works |
00:38:10 | rasher | and I didn't write it :) |
00:40:04 | preglow | gotta love regex |
01:00 |
01:05:51 | t0mas | hmz.. |
01:05:58 | t0mas | I have a working bmp loader... |
01:06:08 | t0mas | only.. I don't understand the rockbox format.. |
01:07:09 | Bagder | it is simple: the first byte is top left, column 0 eight pixels high |
01:08:48 | t0mas | yeah, got that from comments |
01:09:00 | t0mas | now thinking of a nice way to convert... |
01:09:39 | t0mas | I have two for loops... for (row) { for (col) { ... } } |
01:09:57 | t0mas | is there a calculation from row, col to what byte + bit I need to set? |
01:09:58 | Bagder | doesn't the conversion in the original bmp.c work? |
01:10:03 | t0mas | (I have a setbit function too) |
01:10:42 | t0mas | (*bitmap)[ (row/8) * bitmap_width + col ] |= |
01:10:42 | t0mas | 1<<(row&7); |
01:10:43 | t0mas | that? |
01:10:51 | t0mas | hmz... |
01:11:07 | Bagder | yes that |
01:11:22 | t0mas | Don't understand the 1<<(row&7) part |
01:11:28 | t0mas | 1 shifted by what? |
01:11:58 | Bagder | the lowest three bits of the row |
01:12:05 | Bagder | what else can I say? |
01:12:13 | Bagder | the other bits are used already |
01:12:15 | t0mas | hmz... I'll just test it |
01:12:21 | Bagder | row/8 uses the other bits |
01:12:35 | t0mas | ah ok |
01:13:24 | | Join Camilo [0] (~chatzilla@userca029.dsl.pipex.com) |
01:14:08 | Bagder | so row 7 becomes (1<<7) and row 0 is (1<<0) |
01:14:22 | Bagder | 0 being the top |
01:15:15 | t0mas | ok |
01:15:20 | t0mas | and can you explain the if here: |
01:15:21 | t0mas | if(bmp[(bitmap_height-1 -row) * PaddedWidth + col]) { |
01:15:21 | t0mas | bitmap[ (row/8) * bitmap_width + col ] &= ~ (1<<(row&7)); |
01:15:21 | t0mas | } |
01:15:21 | t0mas | else { |
01:15:22 | *** | Alert Mode level 1 |
01:15:22 | t0mas | bitmap[ (row/8) * bitmap_width + col ] |= 1<<(row&7); |
01:15:24 | t0mas | } |
01:15:37 | Bagder | the first condition clears the bit, the other sets it |
01:15:46 | Bagder | the first block |
01:16:04 | t0mas | ok |
01:16:20 | Bagder | so it checks in the bmp if the byte is zero or non-zero to figure that out |
01:18:11 | | Quit asdsd_ (Read error: 60 (Operation timed out)) |
01:18:22 | t0mas | well.. the rockbox conversion makes a mess of it |
01:19:04 | Bagder | I think the math there is right |
01:19:26 | t0mas | ghehe... and I'm sure the image given to it is correct... as it's displayed in debug :) |
01:19:39 | t0mas | so something else is wrong |
01:19:43 | Bagder | then the input data to the math is wrong |
01:20:02 | Bagder | is the bmp 8 bit or 1 bit? |
01:20:29 | t0mas | wait... there is no input data like that |
01:20:35 | t0mas | I have a row, col and bit |
01:20:38 | t0mas | bit = 1 or 0 |
01:20:44 | t0mas | row = y and col = x |
01:21:13 | Bagder | right, that code is for 8bit bmp |
01:21:20 | Bagder | check bmp2rb.c for a 1bit one |
01:21:50 | t0mas | byte = (bitmap_width * (row/8)) + col; |
01:21:50 | t0mas | bit = (row % 8); |
01:21:51 | t0mas | bitmap[byte] = bitmap[byte] + (1 << bit); |
01:22:02 | t0mas | isn't that the right way too? |
01:22:06 | Bagder | + ? |
01:22:17 | Bagder | you mean | |
01:22:27 | t0mas | ghehe |
01:22:29 | t0mas | *oops* |
01:22:46 | Bagder | but if you had it cleared from start it makes no diff I guess |
01:22:46 | t0mas | it's getting a little late... |
01:23:48 | Bagder | but that doesn't show how you use the variables |
01:23:58 | Bagder | again, there is working code in bmp2rb.c |
01:24:19 | t0mas | yeah |
01:25:23 | t0mas | testing takes some time... |
01:25:24 | *** | Alert Mode OFF |
01:25:47 | Bagder | don't you use the sim? |
01:25:52 | t0mas | yes I doo |
01:26:20 | t0mas | but compiling + make install takes some time with cygwin |
01:26:29 | Bagder | right |
01:27:20 | t0mas | bitmap[ (row/8) * bitmap_width + col ] &= ~ (1<<(row&7)); |
01:27:24 | t0mas | that sets a bit? |
01:27:31 | Bagder | no, that clears it |
01:27:35 | t0mas | ah ok |
01:27:35 | t0mas | bitmap[ (row/8) * bitmap_width + col ] |= 1<<(row&7); |
01:27:38 | t0mas | and this is set? |
01:27:40 | Bagder | yes |
01:31:53 | | Join _Lucretia_ [0] (~munkee@abyss2.demon.co.uk) |
01:31:55 | | Quit _Lucretia (Read error: 110 (Connection timed out)) |
01:32:54 | * | Bagder got another runtimedb idea |
01:33:20 | t0mas | how big is the statusbar? |
01:33:21 | t0mas | 20px? |
01:33:38 | Bagder | system font height |
01:33:42 | Bagder | 8px |
01:34:32 | t0mas | k |
01:35:23 | t0mas | hm... how can i test it from a plugin? |
01:35:56 | Bagder | test what? |
01:35:57 | t0mas | (or add something to debug?) |
01:36:01 | | Join _ferenczy [0] (ferenczy@a3brn-191.dialup.vol.cz) |
01:36:02 | t0mas | my loading code |
01:36:38 | Bagder | you mean the code is not accessible via the plugin API? |
01:36:54 | t0mas | don't know.. is it automatically? |
01:37:05 | *** | Saving seen data "./dancer.seen" |
01:37:10 | Bagder | no, you need to add it in apps/plugin.h and plugin.c |
01:37:16 | t0mas | ok |
01:38:26 | t0mas | #define PLUGIN_API_VERSION 37 |
01:38:29 | t0mas | should I raise that? |
01:38:45 | Bagder | yes |
01:42:06 | t0mas | hm.. just add the name in the .h? |
01:42:11 | t0mas | and what in the .c ? |
01:42:15 | t0mas | just the name too? |
01:42:28 | Bagder | just as all the other functions |
01:42:37 | Bagder | add it last in the struct |
01:42:54 | t0mas | ok |
01:43:19 | Bagder | but you're only adding it there for testing, aren't you? |
01:44:10 | t0mas | well... maybe it is usefull for plugin's if it works |
01:44:38 | t0mas | maybe a viewer plugin... or some game wants to use it |
01:44:40 | Bagder | true, and if the code is there anyway it could as well be accessible |
01:44:57 | t0mas | plugin.c:297: warning: excess elements in struct initializer |
01:44:57 | t0mas | plugin.c:297: warning: (near initialization for `rockbox_api') |
01:45:01 | t0mas | what did I do wrong? |
01:45:19 | Bagder | you didn't do the .h part right probably |
01:45:54 | t0mas | #ifdef HAVE_LCD_BITMAP |
01:45:54 | t0mas | int read_bmp_file(char* filename, |
01:45:54 | t0mas | int *get_width, |
01:45:54 | t0mas | int *get_height, |
01:45:54 | t0mas | char *bitmap); |
01:45:54 | *** | Alert Mode level 1 |
01:45:54 | t0mas | #endif |
01:45:58 | t0mas | that's in there... |
01:46:12 | Bagder | compare with the others |
01:46:17 | Bagder | they don't look like that |
01:46:25 | t0mas | jup |
01:46:27 | t0mas | I see |
01:46:44 | t0mas | int (read_bmp_file)(char* filename, int *get_width, int *get_height, char *bitmap); |
01:46:49 | t0mas | eh |
01:46:51 | Bagder | because the struct contains function pointers |
01:46:52 | t0mas | int (*read_bmp_file)(char* filename, int *get_width, int *get_height, char *bitmap); |
01:46:55 | t0mas | like that? |
01:46:58 | Bagder | yeps |
01:47:10 | t0mas | ghehe |
01:47:38 | t0mas | I know function pointers... but I'm still bad at recognizing things like these... |
01:47:52 | t0mas | don't know what * is either... |
01:47:55 | t0mas | eh ** |
01:48:11 | t0mas | * = pointer.... but what's a ** (saw Linus using it somewhere) |
01:48:19 | Bagder | a pointer to a pointer |
01:48:26 | t0mas | sounds weird to me? |
01:48:35 | Bagder | very common C thing |
01:48:50 | t0mas | hmz... I should do more C... |
01:50:07 | | Part MoosCamaro |
01:51:27 | t0mas | hmz... |
01:51:30 | t0mas | just one mistake... |
01:51:38 | t0mas | it's displaying upside down |
01:51:46 | Bagder | hehe |
01:52:35 | preglow | are we talking about regular bmps here? |
01:52:43 | Bagder | yes |
01:52:44 | t0mas | black/white |
01:52:45 | preglow | they're saved upside down, no surprises there |
01:52:53 | t0mas | I know |
01:52:59 | t0mas | that's why I reversed it... |
01:53:04 | preglow | :P |
01:53:35 | preglow | but i'd better get to bed |
01:53:39 | preglow | nite, all |
01:53:49 | | Quit preglow ("leaving") |
01:54:50 | t0mas | hmz... this reversing thing is a problem with the bit setting lines... |
01:55:07 | t0mas | the for loop is reversed... to display it ok... |
01:55:14 | t0mas | but when setting it.. that doesn't matter... |
01:55:15 | t0mas | bitmap[ (row/8) * bitmap_width + col ] &= ~ (1<<(row&7)); |
01:55:55 | *** | Alert Mode OFF |
01:56:03 | Bagder | I'd say your check is wrong, not the part that clears the bit |
01:56:07 | Bagder | but that's me |
01:56:11 | Bagder | you could change either one |
01:56:13 | t0mas | bitmap[ ((bitmap_height - row)/8) * bitmap_width + col ] &= ~ (1<<(row&7)); |
01:56:25 | | Part gromit` ("Client exiting") |
01:56:32 | t0mas | is that ok? |
01:56:49 | Bagder | if((bmp[(bitmap_height - row - 1) * PaddedWidth + byte] & (1 << bit))) { |
01:56:57 | Bagder | the code in bmp2rb |
01:56:58 | | Join gromit` [0] (~gromit`@ras75-5-82-234-244-69.fbx.proxad.net) |
01:57:01 | Bagder | ;-) |
01:57:13 | t0mas | eh... |
01:57:40 | Bagder | doing the flip in the check makes the adjustment on one place |
01:57:46 | Bagder | doing it in the bit set/clear puts it on two |
01:58:22 | Bagder | thinking about it, the clear (or the set) should be done on byte-level anyway |
01:58:23 | Bagder | for speed |
01:58:47 | Bagder | but we can save that for later ;-) |
01:59:04 | t0mas | yeah, I have getbit() and setbit() functions |
01:59:22 | t0mas | wrote em some time ago for calculating primes... and storing in bit array... |
01:59:22 | Bagder | no clearbit? |
01:59:39 | t0mas | nope, never had to remove a prime ;) |
01:59:50 | Bagder | :-) |
02:00 |
02:01:07 | t0mas | if(bmpbuf[(bitmap_height-1 -row) * PaddedWidth + col]) { |
02:01:08 | t0mas | bitmap[ (row/8) * bitmap_width + col ] &= ~ (1<<(row&7)); |
02:01:08 | t0mas | } else { |
02:01:08 | t0mas | bitmap[ (row/8) * bitmap_width + col ] |= 1<<(row&7); |
02:01:08 | t0mas | } |
02:01:12 | t0mas | that's making a mess of it... |
02:01:50 | t0mas | but my bmpbuf[] is a 1 bit / pixel |
02:01:56 | t0mas | and this looks like 8? |
02:02:14 | Bagder | yeps |
02:03:21 | Bagder | you need to and out the pixels on 1bit bmps |
02:03:41 | t0mas | & (1 << bit) |
02:03:43 | t0mas | ? |
02:04:10 | Bagder | yes, if bit is set right |
02:04:35 | Bagder | as the bytes are horizonal in bmp |
02:05:36 | Bagder | sleep time now, see ya around |
02:06:36 | t0mas | yeah |
02:06:50 | t0mas | I'm gonna sleep too... |
02:07:41 | t0mas | WORKING :D |
02:19:03 | rasher | working? |
02:22:01 | Shagnar | ? |
02:29:58 | t0mas | my code |
02:30:11 | t0mas | it load's a bmp from file and returns a rockbox format image |
02:30:43 | t0mas | just tested it in wps :D |
02:31:10 | t0mas | It auto loads an image ./rockbox/wpsbg.bmp and displays it on the wps, or just ignores it when the image isn't present :D |
02:31:16 | | Quit Sucka ("a bird in the bush is worth two in your house") |
02:32:02 | rasher | woo |
02:32:57 | t0mas | hope it compiles on archos too... |
02:33:07 | t0mas | but that's for tomorrow :) |
02:33:22 | rasher | test in the sim? |
02:33:26 | t0mas | yeah |
02:33:33 | t0mas | but not at 2:30 in the night :P |
02:33:43 | rasher | :) |
02:34:05 | _ferenczy | t0mas> where are you from??? |
02:34:11 | t0mas | Netherlands |
02:34:24 | _ferenczy | well ;) |
02:34:42 | _ferenczy | I'm from Czech republic... ;) |
02:34:55 | t0mas | ah.. |
02:35:49 | Shagnar | nice work! |
02:35:52 | Shagnar | gn8 cya |
02:38:23 | | Quit Shagnar ("( www.nnscript.de :: NoNameScript 3.81 :: www.XLhost.de )") |
02:48:27 | rasher | regarding my file-hash experiment: 512byte from start of file 512 kb from end of file produced no duplicates.. 256 256 produced one |
02:48:42 | rasher | (using crc32) |
02:48:57 | t0mas | maybe use a #define for it? |
02:49:09 | t0mas | so when people have problem's they can change it? |
02:50:01 | rasher | maybe.. or just grab 1kb from start and end to be on the safe side |
02:50:13 | rasher | and try to skip tags |
02:50:21 | t0mas | yeah... |
02:50:25 | t0mas | how did kazaa do it? |
02:50:32 | t0mas | they had a very simple hash thing? |
02:50:40 | rasher | They didn't hash anything |
02:50:56 | rasher | as witnessed by the posibility of polluting files |
02:51:01 | t0mas | no, they did hash something... but only some part.. |
02:51:18 | rasher | maybe this was after I last tried it |
02:51:34 | t0mas | well.. I haven't used it for at least year |
02:51:57 | t0mas | the pollution was possible because they hashed just a part of the file |
02:52:20 | rasher | well what I'm thinking is this: for mpeg files, seek to the first frame and start hashing from there, seek back to id3v1 tag 1kb longer, then hash a kb from there |
02:52:27 | rasher | and similar for other formats |
02:52:42 | rasher | it's sortof costly, but very efficient |
02:54:01 | rasher | but being able to re-tag and still have it recognised as the same file would be great |
02:54:23 | t0mas | yeah |
02:55:21 | t0mas | ghehe |
02:55:31 | t0mas | original firmware not booting == empty batt :) |
02:55:40 | rasher | totally |
02:56:08 | * | t0mas is going to charge his iriver |
02:56:13 | t0mas | and sleep while it is :) |
02:56:28 | | Quit t0mas ("goodnight") |
03:00 |
03:02:23 | | Quit rasher ("CGI:IRC (EOF)") |
03:12:04 | * | HCl goes to sleep |
03:12:06 | | Quit cYmen ("zZz") |
03:18:58 | | Quit thegeek (Read error: 54 (Connection reset by peer)) |
03:23:48 | | Join asdsd_ [0] (~asdsd@h-67-100-29-22.miatflad.dynamic.covad.net) |
03:24:10 | | Part asdsd_ |
03:34:01 | | Quit courtc (Remote closed the connection) |
03:37:07 | *** | Saving seen data "./dancer.seen" |
03:39:02 | | Join karim [0] (~karim@ip-42.net-81-220-108.rev.numericable.fr) |
03:39:13 | | Join courtc [0] (~court@adsl-33-162-17.asm.bellsouth.net) |
04:00 |
04:02:41 | | Join ashridah [0] (ashridah@220-253-120-247.VIC.netspace.net.au) |
04:05:35 | | Join QT [0] (as@area51.users.madwifi) |
04:08:40 | | Quit QT_ (Read error: 60 (Operation timed out)) |
04:12:25 | | Quit Camilo ("Chatzilla 0.9.67 [Mozilla rv:1.8b2/20050404]") |
04:13:42 | | Quit _ferenczy (Read error: 60 (Operation timed out)) |
04:17:25 | | Quit karim (Remote closed the connection) |
04:40:29 | | Join TCK [0] (TCK@81-86-98-191.dsl.pipex.com) |
05:00 |
05:37:09 | *** | Saving seen data "./dancer.seen" |
06:00 |
06:35:32 | | Join stevenm [0] (~steve@stevenm-router.student.umd.edu) |
06:35:43 | stevenm | Hello people. anyone here ? |
06:40:58 | | Part kergoth ("Leaving") |
06:57:55 | stevenm | Hello. Does anyone feel like running a speed check on the MIDI codec for me? |
06:58:31 | stevenm | it's some new code, not in CVS yet |
06:59:06 | stevenm | oh rasher, where art thou |
06:59:28 | | Join Strath [0] (~mike@dgvlwinas01pool0-a202.wi.tds.net) |
07:00 |
07:03:10 | stevenm | anyone ? |
07:03:21 | Strath | guess not |
07:03:29 | stevenm | that's a shame.. |
07:03:41 | stevenm | I really hoped at least this would run above 10% realtime this time.... |
07:03:55 | stevenm | maybe 11% ? |
07:06:30 | Strath | keep in mind i have no idea what you're talking about :) |
07:08:11 | stevenm | ah.. I am looking for someone to test my latest code on target |
07:08:21 | stevenm | and tell me just HOW painfully slow it runs |
07:08:42 | stevenm | unoptimized, we got 10%. I just put some stuff into iram.. |
07:08:55 | Strath | oy ;) |
07:09:18 | Strath | supper time |
07:09:25 | | Nick Strath is now known as StrathAFK (~mike@dgvlwinas01pool0-a202.wi.tds.net) |
07:31:45 | | Join booper [0] (~boop@nat01-silvers-ext.Rutgers.EDU) |
07:37:10 | *** | Saving seen data "./dancer.seen" |
08:00 |
08:22:47 | | Quit Rob- (Read error: 145 (Connection timed out)) |
08:30:17 | stevenm | Ooo, a some more optimization.. |
08:30:40 | stevenm | can someone possibly do me a favor and test a new version of this thing on target, see how fast it runs ? |
08:44:17 | stevenm | is everyone asleep or something? |
08:50:59 | | Join darkstar147 [0] (~43a18ffe@labb.contactor.se) |
08:51:34 | | Quit darkstar147 (Client Quit) |
09:00 |
09:09:06 | | Join Harpy [0] (gsDZFe4s3t@dsl-hkigw7wbb.dial.inet.fi) |
09:22:21 | | Quit Stryke` ("Friends don't let friends listen to Anti-Flag") |
09:37:14 | *** | Saving seen data "./dancer.seen" |
09:38:42 | | Join t0mas [0] (~Tomas@ip503c08d1.speed.planet.nl) |
09:39:12 | t0mas | morning |
09:39:27 | t0mas | does anybody know the stacksize of the iriver? |
09:41:48 | t0mas | not like 45kb i guess? :) |
10:00 |
10:04:32 | | Quit _Lucretia_ (Read error: 60 (Operation timed out)) |
10:04:32 | | Quit booper (Read error: 54 (Connection reset by peer)) |
10:12:00 | t0mas | testplugin.c:54: error: structure has no member named `fprintf' |
10:12:15 | t0mas | isn't fprintf() in the plugin arg? |
10:20:22 | | Join _Lucretia_ [0] (~munkee@abyss2.demon.co.uk) |
10:33:05 | | Join Mirfle [0] (~chatzilla@ADSL222150.BRK.biu.ac.il) |
10:42:59 | | Join berserker [0] (a@193.19.178.25) |
10:47:58 | | Part berserker |
11:00 |
11:13:39 | | Join muesli- [0] (muesli_tv@brsg-d9b8e188.pool.mediaWays.net) |
11:13:46 | muesli- | morning |
11:13:57 | t0mas | hi |
11:19:30 | stevenm | good morning people |
11:19:42 | stevenm | (I am still awake from the 'night') |
11:35:02 | muesli- | well done stevenm |
11:35:03 | muesli- | ;) |
11:35:24 | | Quit muesli- (Read error: 104 (Connection reset by peer)) |
11:35:31 | | Join muesli- [0] (muesli_tv@brsg-d9b8e188.pool.mediaWays.net) |
11:37:15 | *** | Saving seen data "./dancer.seen" |
11:41:37 | stevenm | yea I been waiting for rasher to come on |
11:41:54 | stevenm | and maybe test and tell me just HOW inefficient this code is |
11:42:23 | stevenm | feels like I been awake forever |
11:42:37 | t0mas | ghehe |
11:42:41 | t0mas | Help! |
11:43:00 | t0mas | my code isn't working on iriver... |
11:43:04 | t0mas | but it is on simulator... |
11:45:14 | t0mas | problem 1: How can I debug on iRiver? (like write debugf() info to file?) |
11:45:28 | t0mas | problem 2: What's the stacksize of the Iriver? |
11:49:57 | ashridah | probably as big as whatever the heap hasn't taken up :) |
11:50:34 | t0mas | can I output it someway? |
11:51:10 | | Join Querty [0] (~michiel@heren.demon.nl) |
11:51:52 | Querty | stevenm: can I relieve you of your sleep deprived misery by testing something? |
11:51:55 | ashridah | i doubt it. the heap has no clear boundary. the stack typically just grows until it overwrites something vital and things blow up (at least, from my vague knowledge of 68k style cpus) |
11:53:20 | t0mas | ok, then I know what's happening :P |
11:54:24 | t0mas | and problem 1? |
11:54:35 | t0mas | some simple way to make debugf() write a file? |
11:54:41 | ashridah | damned if i know. i'm just a groupie |
11:55:01 | t0mas | ghehe ok |
11:57:03 | | Quit stevenm ("Leaving") |
12:00 |
12:05:42 | HCl | fprintf |
12:05:55 | HCl | you can look at the dynarec core in rockboy, it debugs to file |
12:06:07 | t0mas | ok, tnx |
12:06:30 | HCl | it has to, because it typically crashes all the time |
12:14:55 | t0mas | hmz... nice... now I can look at my own error message... and start thinking what the **** caused that :) |
12:16:05 | * | t0mas thanks Linus for RoLo :D |
12:19:20 | * | t0mas slaps t0mas with a really BIG-endian :P |
12:24:30 | | Join preglow [0] (thomj@s183a.studby.ntnu.no) |
12:24:36 | | Quit Mirfle ("Chatzilla 0.9.67 [Firefox 1.0.2/20050317]") |
12:24:41 | preglow | the stack is not very big |
12:24:50 | t0mas | nope, but it works now :) |
12:24:54 | t0mas | just need 2,5 KB |
12:24:55 | | Quit muesli- (Read error: 60 (Operation timed out)) |
12:24:56 | t0mas | is that ok? |
12:24:59 | preglow | 2.5k it has |
12:25:05 | t0mas | ghehe |
12:25:06 | t0mas | oh ow :P |
12:25:21 | t0mas | so nothing else works when I use 2.5? |
12:25:35 | preglow | hmm? |
12:25:46 | preglow | you can probably use more than 2.5 |
12:25:52 | preglow | but try not to use the stack for large things |
12:25:52 | t0mas | oh ok |
12:26:05 | preglow | i crushed it with 100k, that's all i know :P |
12:26:12 | t0mas | ghehe |
12:26:17 | t0mas | I did with 40 :) |
12:26:21 | t0mas | but 2.5 works |
12:26:26 | t0mas | 2560 bytes |
12:26:44 | t0mas | for iriver... on archos it uses less... as the LCD is smaller |
12:27:23 | preglow | the stack on the archos might very, very well be smaller |
12:27:33 | preglow | i have no idea |
12:28:09 | t0mas | well... on the archos with LCD_BITMAP it uses (LCD_HEIGHT * LCD_WIDTH) / 8 |
12:31:04 | | Quit Harpy (Read error: 60 (Operation timed out)) |
12:36:37 | t0mas | ok, it load's a bmp... and writes the contents as an "ascii art" to file... and display's it :D |
12:36:43 | t0mas | time to remove some debug code... |
12:39:02 | | Join MoosCamaro [0] (HydraIRC@m214.net81-66-158.noos.fr) |
12:39:13 | | Part MoosCamaro |
12:39:30 | | Join matsl [0] (~matsl@1-1-4-2a.mal.sth.bostream.se) |
12:41:06 | | Join MoosCamaro [0] (MoosCamaro@m214.net81-66-158.noos.fr) |
12:41:17 | MoosCamaro | Hi all |
12:41:23 | t0mas | hi |
12:45:11 | MoosCamaro | your bmp works it's done? |
12:45:19 | t0mas | allmost |
12:45:26 | t0mas | it can load images... and display |
12:45:41 | t0mas | but it uses a lot of memory... so I'll need to optimize some things there |
12:46:05 | MoosCamaro | ok |
12:50:18 | | Join cYmen [0] (~cymen@nat-ph3-wh.rz.uni-karlsruhe.de) |
12:56:19 | t0mas | hi |
13:00 |
13:05:08 | HCl | bmp loading stuff? |
13:05:16 | t0mas | yeah |
13:05:28 | t0mas | loading a bmp into a rockbox native format buffer |
13:06:24 | HCl | ah. |
13:06:35 | HCl | well, uncompressed bmps are fairly simple... |
13:06:41 | HCl | but i dunno about compressed ones :/ |
13:06:51 | t0mas | compressed ones are never used.. |
13:07:02 | t0mas | but rockbox format isn't that simple :) |
13:07:08 | * | HCl once wrote a bit of code to write a bmp from some image data |
13:07:25 | HCl | only annoying thing was the alignment stuff |
13:07:32 | t0mas | yes |
13:07:37 | t0mas | it's weird order... |
13:07:42 | t0mas | and stored upside down |
13:08:05 | HCl | mmm, forgot about that, i guess, at least, i don't remember it being upside down |
13:08:08 | HCl | but i'll take your word for it : |
13:08:09 | HCl | :P |
13:08:14 | t0mas | ghehe |
13:10:59 | t0mas | only one issue left... I'm having some weird pixels in simulator... |
13:14:57 | | Quit Querty ("Leaving") |
13:15:30 | t0mas | HCl? |
13:15:37 | t0mas | how do you do this in a plugin: fd=open(meow,O_WRONLY|O_CREAT|O_TRUNC); |
13:23:42 | HCl | um. same thing. |
13:23:44 | HCl | look at rockmacros.h |
13:23:48 | HCl | rockboy is a plugin |
13:24:01 | HCl | we just used macros to not have to rewrite every posix function it uses. |
13:37:18 | *** | Saving seen data "./dancer.seen" |
13:40:09 | | Join belgarath [0] (~acd44a19@labb.contactor.se) |
13:43:18 | | Join Sucka [0] (~NNSCRIPT@host81-156-210-120.range81-156.btcentralplus.com) |
13:43:20 | HCl | lol |
13:43:28 | HCl | my kitty recognises the cats in this movie |
13:43:31 | HCl | its cute |
13:58:06 | | Nick Sucka is now known as Sucka`away (~NNSCRIPT@host81-156-210-120.range81-156.btcentralplus.com) |
13:59:42 | preglow | cats are superior animals |
14:00 |
14:05:49 | | Join rasher [0] (~3e4f4094@labb.contactor.se) |
14:15:32 | t0mas | hi rasher |
14:15:48 | HCl | http://titania.student.utwente.nl/funnycats.wmv |
14:17:08 | | Join _ferenczy [0] (ferenczy@a1brn-117.dialup.vol.cz) |
14:17:35 | preglow | ahah |
14:17:38 | preglow | cats + babies = not good |
14:17:56 | | Quit _ferenczy (Client Quit) |
14:26:53 | | Join edx [0] (edx@pD952239A.dip.t-dialin.net) |
14:35:25 | | Quit rasher (Read error: 110 (Connection timed out)) |
14:39:22 | t0mas | <flood> |
14:39:33 | t0mas | ret = getbit((PaddedWidth * row * 8) + col - (col % 8) + (7 - (col % 8))); |
14:39:33 | t0mas | if (ret == 1) |
14:39:33 | t0mas | { |
14:39:33 | DBUG | Enqueued KICK t0mas |
14:39:33 | t0mas | bitmap[ ((bitmap_height - row)/8) * bitmap_width + col ] &= ~ (1<<((bitmap_height - row)&7)); |
14:39:33 | t0mas | fdprintf(debugfd,"-"); |
14:39:33 | *** | Alert Mode level 1 |
14:39:33 | t0mas | } |
14:39:35 | t0mas | else if(ret == 0) |
14:39:37 | t0mas | { |
14:39:41 | t0mas | bitmap[ ((bitmap_height - row)/8) * bitmap_width + col ] |= 1<<((bitmap_height - row)&7); |
14:39:43 | t0mas | fdprintf(debugfd,"|"); |
14:39:45 | t0mas | } |
14:39:47 | t0mas | </flood> |
14:40:06 | t0mas | the debugf() part prints the image correctly... only upside down... |
14:40:18 | t0mas | the bitmap part (by Bagder) makes a mess :) |
14:40:25 | t0mas | anybody sees why? |
14:46:35 | Ctcp | Ignored 1 channel CTCP requests in 0 seconds at the last flood |
14:46:35 | * | HCl is too tired :p |
14:49:34 | *** | Alert Mode OFF |
14:51:13 | * | t0mas just doesn't really understand it :P |
15:00 |
15:01:40 | | Join Harpy [0] (VIKwvwzg4x@dsl-hkigw7wbb.dial.inet.fi) |
15:07:59 | HCl | i must be odd |
15:08:15 | HCl | t0mas: you know what the bitmap format is like internally? |
15:08:29 | t0mas | well... sort off |
15:08:43 | t0mas | I have a paper laying around here... |
15:08:55 | t0mas | what bits in which byte are what pixels |
15:09:08 | t0mas | but I don't have calculations for it at hand... |
15:09:41 | HCl | every byte stores 8 pixels |
15:09:47 | HCl | top pixel being top bit |
15:09:54 | HCl | you can try using setpixel for now |
15:10:00 | HCl | or check the rockboy implementation |
15:10:19 | t0mas | well... I want em in an array... |
15:10:37 | t0mas | so I need a calculation for what bit to set in the array for what piel |
15:10:40 | t0mas | *pixel |
15:11:39 | t0mas | I had this: Byte: (width * (row/8)) + col |
15:11:56 | t0mas | Bit: col % 8 |
15:12:28 | HCl | you need row % 8 |
15:12:42 | t0mas | I have em as X and Y here :) |
15:12:44 | HCl | take a look at sys_rockbox.c |
15:12:50 | HCl | it pretty much has the same thing |
15:12:50 | t0mas | X = col, Y = row? |
15:12:57 | HCl | yes |
15:13:08 | HCl | except rockboy processes them one row at a tyime |
15:13:09 | HCl | time |
15:13:16 | HCl | it might be a good place to start for an example |
15:13:28 | HCl | dunno how much of the old code is still there and not removed |
15:13:40 | t0mas | for (row) { for (col) { ... } } |
15:13:44 | t0mas | is what I have |
15:13:48 | HCl | it started with a setpixel or clearpixel function |
15:13:55 | HCl | and evolved from there for speed |
15:15:10 | | Join rasher [0] (~3e4f4094@labb.contactor.se) |
15:15:16 | t0mas | hi rasher |
15:15:23 | t0mas | HCl: what function? |
15:15:31 | HCl | vid_update |
15:15:50 | t0mas | k |
15:16:07 | rasher | excellent.. cgi:irc didn't tell me of any activity here |
15:16:26 | HCl | awesome :3 |
15:17:14 | * | HCl has been watching the same 1 minute 38 seconds long movie for over an hour and a half :3 |
15:18:41 | t0mas | hmz... HCl... that function is an ASM hell... |
15:18:47 | HCl | browse down. |
15:18:51 | HCl | there's a c version |
15:19:20 | * | t0mas is to stupid to understand... |
15:19:34 | HCl | hmm |
15:19:45 | HCl | it seems the old version was removed since our optimized versions worked fine |
15:20:01 | HCl | it should prolly still be in cvs somewhere |
15:20:02 | HCl | hold on |
15:20:51 | t0mas | I have 4 vars... ret (1 or 0, for the bit to set), row, col, and a bitmap buffer where it should be set in.. |
15:21:11 | t0mas | (ret = 1 -> set bit, ret = 0 -> clear bit) |
15:21:42 | HCl | hrm. |
15:21:48 | HCl | i guess the old version was lost... odd. |
15:21:51 | HCl | brb |
15:23:18 | HCl | side effect of rockboy being developed outside of cvs for a long time |
15:23:55 | HCl | i'm not really up to looking at it at the moment |
15:24:54 | t0mas | :( |
15:25:09 | HCl | but its something like |
15:25:44 | HCl | (byte = width * (row/8) + col) |= 1<<(row%8) |
15:26:06 | HCl | make sure your array is of the type byte.. |
15:26:19 | t0mas | ok, next problem :) |
15:26:22 | t0mas | it's unsingned char |
15:26:29 | HCl | that'll do |
15:26:32 | t0mas | k |
15:26:57 | | Quit belgarath ("CGI:IRC (EOF)") |
15:27:09 | t0mas | and the byte in your calculation is what? |
15:27:24 | HCl | just the location of the byte to change for that pixel |
15:28:04 | t0mas | so buffer[width * (row/8) + col] |= 1<<(row%8) |
15:28:33 | HCl | yea |
15:28:47 | t0mas | that's what I had... only written more complicated... |
15:29:07 | HCl | sorry, not really up to coding for rockbox at the moment. |
15:29:20 | HCl | still feeling a bit nauseous from lunch |
15:29:52 | t0mas | well... you have helped me some way |
15:29:58 | t0mas | as I have a new idea now :D |
15:37:22 | *** | Saving seen data "./dancer.seen" |
15:41:08 | t0mas | unsigned char bitmap[100]; |
15:41:18 | t0mas | I have a pointer to something like that |
15:41:27 | t0mas | and I want to know the size (100 here) |
15:41:28 | t0mas | sizeof(*bitmap) |
15:41:31 | t0mas | doesn't work? |
15:41:37 | HCl | no. |
15:41:46 | HCl | i'd say sizeof(bitmap) |
15:42:08 | t0mas | that returns 1 |
15:42:16 | t0mas | as an unsigned char is 1 in size... |
15:42:18 | HCl | mk |
15:42:27 | HCl | maybe you need to omit the ( ) ? |
15:42:29 | HCl | *shrugs* |
15:56:08 | t0mas | ##C : "It's impossible to get the size of an array from it's pointer." |
15:56:45 | preglow | of course |
16:00 |
16:03:09 | t0mas | unsigned char = 1 byte? |
16:04:09 | preglow | on most platforms, yes |
16:08:37 | | Nick Sucka`away is now known as Sucka (~NNSCRIPT@host81-156-210-120.range81-156.btcentralplus.com) |
16:18:45 | * | rasher yawns |
16:22:25 | | Quit rasher ("CGI:IRC") |
16:27:22 | | Quit ashridah (Read error: 113 (No route to host)) |
16:46:28 | HCl | ddr ish fun |
17:00 |
17:14:44 | t0mas | ok... now I have a weird problem... |
17:15:16 | t0mas | when I call rb->read_bmp_file("/test.bmp", &BMPWIDTH_plaatje, &BMPHEIGHT_plaatje, plaatje, 2560); |
17:15:37 | t0mas | the last argument is comming out like this: 2089879603 |
17:18:36 | HCl | whats your definition of read_bmp_file ? |
17:18:46 | t0mas | int read_bmp_file(char* filename, |
17:18:46 | t0mas | int *get_width, /* in pixels */ |
17:18:46 | t0mas | int *get_height, /* in pixels */ |
17:18:46 | t0mas | char *bitmap, |
17:18:46 | t0mas | int bufsize) /* the size off bitmap in bytes. */ |
17:19:29 | HCl | hrm. |
17:19:32 | HCl | dunno then |
17:19:35 | HCl | *shrugs* |
17:19:43 | t0mas | and then: debugf("Size: %d \n", bufsize) gives 2089879603 |
17:21:08 | HCl | i'd say you're either getting a random value or a pointer. |
17:21:24 | t0mas | yeah... |
17:24:36 | | Join biggoof [0] (~jirc@pD9EC58CD.dip0.t-ipconnect.de) |
17:25:30 | | Join asdsd_ [0] (asdsd@h-67-100-30-190.miatflad.dynamic.covad.net) |
17:29:32 | | Quit TCK (Read error: 54 (Connection reset by peer)) |
17:32:46 | | Join TCK [0] (TCK@81-86-209-86.dsl.pipex.com) |
17:37:23 | *** | Saving seen data "./dancer.seen" |
17:41:47 | t0mas | ghehe |
17:41:49 | t0mas | new size... |
17:41:49 | t0mas | 52489964 |
17:42:09 | * | t0mas is going mad... |
17:43:04 | | Quit matsl (Remote closed the connection) |
17:51:33 | | Join muesli- [0] (muesli_tv@Bbc73.b.pppool.de) |
17:52:38 | muesli- | high |
17:52:48 | t0mas | hi |
17:53:10 | muesli- | hi t0mas |
18:00 |
18:02:22 | | Quit biggoof (Read error: 131 (Connection reset by peer)) |
18:03:02 | | Join thegeek [0] (na@ti521110a080-1991.bb.online.no) |
18:15:59 | | Join XShocK [0] (~XShocK@pcp09492659pcs.nrockv01.md.comcast.net) |
18:21:05 | t0mas | ok, anybody with an archos and a buildenvironment here? |
18:32:27 | t0mas | it compiles... but I can't confirm it's really working... |
18:34:38 | | Join Stryke` [0] (~Chairman8@resnet-241-86.resnet.umbc.edu) |
18:36:02 | | Join rasher [0] (~3e4f4094@labb.contactor.se) |
18:36:10 | rasher | can't you test it in the sim? |
18:53:47 | * | rasher prods t0mas |
18:57:10 | | Quit thegeek (Read error: 60 (Operation timed out)) |
19:00 |
19:05:41 | | Quit muesli- (Read error: 145 (Connection timed out)) |
19:06:46 | HCl | mrf |
19:11:23 | rasher | Damn straight |
19:11:39 | HCl | lack of sleep sucks... |
19:12:08 | t0mas | rasher: I was eating :) |
19:12:34 | t0mas | but the first version worked in iriver sim... and didn't work on iriver |
19:12:44 | * | HCl doesn't trust the sims. |
19:12:46 | t0mas | now it works on iriver, iriver sim, recorder sim and player sim... |
19:12:56 | rasher | ah |
19:12:58 | t0mas | but I can't test the real archos things |
19:13:01 | HCl | first rockboy version ran on iriver, but not on sim |
19:13:19 | * | rasher has no archos either |
19:14:38 | t0mas | well.. It compiles for player and recorder... |
19:15:14 | t0mas | should I test for all recorder versions? |
19:16:06 | rasher | no idea how much different hey are |
19:18:50 | | Quit asdsd_ (Read error: 54 (Connection reset by peer)) |
19:23:37 | | Join thegeek [0] (na@ti521110a080-1991.bb.online.no) |
19:23:56 | | Join muesli- [0] (muesli_tv@brsg-d9b8e193.pool.mediaWays.net) |
19:26:48 | muesli- | re |
19:27:03 | rasher | hi |
19:27:23 | t0mas | hi |
19:29:25 | | Quit DMJC ("Leaving") |
19:33:44 | t0mas | lol |
19:33:44 | t0mas | http://www.userfriendly.org/static/ |
19:33:50 | t0mas | everybody seen that one? |
19:33:51 | t0mas | :) |
19:34:29 | muesli- | :) |
19:37:24 | *** | Saving seen data "./dancer.seen" |
19:59:24 | | Join amiconn [0] (~jens@pD9E7F725.dip.t-dialin.net) |
20:00 |
20:01:37 | HCl | its amiconn! |
20:01:42 | HCl | quick, think the other way. |
20:01:54 | HCl | o.o |
20:01:56 | HCl | sup? |
20:02:09 | amiconn | hi |
20:02:25 | t0mas | hi |
20:05:06 | | Join Shagnar [0] (~tester@p54A0C2DE.dip.t-dialin.net) |
20:23:02 | | Join zezayer [0] (~chatzilla@host81-152-218-69.range81-152.btcentralplus.com) |
20:23:03 | | Quit muesli- (Read error: 104 (Connection reset by peer)) |
20:35:24 | t0mas | hm.. "ld: region FLASH is full" |
20:35:47 | t0mas | for an archos recorder v2 |
20:35:49 | t0mas | 2mb mem |
20:35:59 | t0mas | does that exist? |
20:36:02 | t0mas | or was it 8? |
20:40:28 | | Join pfavr [0] (~Peter_Fav@213.237.46.232.adsl.ron.worldonline.dk) |
20:42:43 | t0mas | ji |
20:42:46 | t0mas | j=h |
20:46:29 | | Join stevenm [0] (~steve@stevenm-router.student.umd.edu) |
20:46:48 | stevenm | Hello people |
20:47:01 | | Join TCK- [0] (TCK@81-86-209-13.dsl.pipex.com) |
20:47:31 | rasher | evening |
20:47:40 | stevenm | morning here :) |
20:47:42 | stevenm | well, afternoon |
20:47:57 | stevenm | ah, just the person I am looking for. Feel like running another time test " |
20:47:58 | stevenm | ? |
20:49:46 | stevenm | rasher, I think this time it may run at say, 11% instead of 10. I moved a bunch of stuff to iram |
20:50:31 | rasher | heh |
20:50:35 | rasher | well sure |
20:51:21 | stevenm | http://wam.umd.edu/~stevenm/midi.tbz2 |
20:51:35 | stevenm | untar that into apps/plugins/ .. I haven't dared to commit that yet |
20:52:54 | amiconn | t0mas: "region FLASH is full" is to be expected. |
20:53:17 | t0mas | out of mem? |
20:53:26 | amiconn | This only says that RomBox (rockbox executing directly from flash rom) isn't possible |
20:53:35 | amiconn | ...because it doesn't fit. |
20:53:46 | t0mas | ok |
20:54:52 | | Quit TCK (Read error: 145 (Connection timed out)) |
20:55:00 | amiconn | Archos uses a somewhat complex boot procedure. The point is that the archos firmware (even if it is the version in the rom, not loaded from disk) is copied to ram before execution |
20:55:10 | rasher | test starting... |
20:55:13 | rasher | now |
20:55:16 | stevenm | rasher, ooh sweet |
20:55:22 | stevenm | rasher, 120Mhz ? |
20:55:33 | rasher | oops |
20:55:39 | stevenm | :) |
20:56:11 | amiconn | t0mas: [IDC]Dragon's boot loader allows having 2 firmware images in flash rom (archos and rockbox), by using compression |
20:56:21 | rasher | now, then |
20:56:39 | amiconn | The compression is optional, so when the rockbox image is uncompressed, it can be executed directly from flash rom |
20:57:25 | amiconn | Unfortunately this isn't possible for all units any more, because of continually increasing rockbox size |
20:57:52 | amiconn | See http://www.rockbox.org/twiki/bin/view/Main/WebHome?topic=RomBox if you want to read more |
20:58:08 | stevenm | rasher, I cut slow ram access by 75% or so. there's only 5 places it happens now |
21:00 |
21:00:33 | rasher | 4 minutes and counting |
21:00:41 | stevenm | :( |
21:00:53 | rasher | if you were aiming for 11% :) |
21:01:04 | stevenm | I don't expect it to be down to 1 minute after iram, but maybe at least maybe 8 instead of 10 |
21:02:09 | stevenm | all the function variables were in slow ram.. now all but the sample data is in iram |
21:02:44 | rasher | it would be nice to have some kind of indicator of how far in the file you were |
21:03:29 | stevenm | i guess i can have it splash every 100 events or so |
21:04:06 | stevenm | you did rebuild the source from that tarfile, right ? |
21:04:10 | rasher | yes |
21:04:12 | rasher | 7 minutes |
21:04:19 | rasher | 8 |
21:04:34 | stevenm | ah |
21:04:43 | rasher | DONE |
21:04:49 | rasher | 8:15 or so |
21:04:50 | stevenm | Haha |
21:05:06 | HCl | how long was the song supposed to be? |
21:05:21 | stevenm | 1:30 |
21:05:26 | HCl | mk... |
21:05:27 | stevenm | rasher, heh, 18 % |
21:05:34 | HCl | i never thought midi would be that hard on cpu. |
21:05:41 | stevenm | rasher, I had another thing to try |
21:05:44 | HCl | didn't they work on basic cpus that couldn't even play mp3? :/ |
21:05:55 | rasher | well this is doing wavetable thingy |
21:05:58 | stevenm | well.. it's a lot of work |
21:06:03 | HCl | but i guess those had hardware synths.. |
21:06:07 | stevenm | rasher, try this.. in synth.c |
21:06:10 | rasher | that sure didn't happen on those kind of cpus |
21:06:16 | HCl | yea. |
21:06:19 | HCl | well |
21:06:26 | HCl | if we can't manage to get it to run fast... |
21:06:31 | HCl | we might have to drop down to lesser quality.. |
21:06:34 | HCl | :/ |
21:06:41 | stevenm | rasher, put a /* on line 347 in synth.c |
21:06:55 | stevenm | rasher, and a */ on line 384 |
21:07:20 | stevenm | that ought to disable ADSR and all the if statements and shift/mul associated with it. it doesn't make a significant difference |
21:07:38 | stevenm | maybe we'll get 7 out of this |
21:08:41 | rasher | starting... now |
21:08:45 | rasher | uh, not |
21:08:52 | stevenm | hm ? |
21:08:58 | stevenm | compile error ? |
21:09:05 | rasher | no, just hit the wrong button :) |
21:09:09 | stevenm | oh |
21:09:15 | rasher | now |
21:09:45 | stevenm | rasher, just out of curiosity, how long does it take to go from start to "START PLAYING" ? |
21:10:04 | rasher | a couple of seconds |
21:10:10 | stevenm | oh wow, that's it? |
21:10:21 | stevenm | i guess the slow ram isn't as slow as I thought |
21:10:22 | rasher | hm.. 5-6 seconds maybe |
21:10:34 | stevenm | during that time it loads about 7 megs of data into slow ram |
21:10:40 | stevenm | and does a bunch of other random access |
21:10:44 | stevenm | and HD access too |
21:10:52 | rasher | I'll try and time it |
21:11:04 | stevenm | nah, don't bother |
21:11:14 | stevenm | as long as it's not like, a minute |
21:11:28 | rasher | :) |
21:11:31 | stevenm | rasher, now.. is this timing with write to disk, or no ? |
21:11:37 | rasher | with |
21:11:42 | rasher | didn't make much of a difference did it? |
21:11:42 | stevenm | ah |
21:11:51 | stevenm | i dont remember.. dont think so though |
21:12:07 | stevenm | rasher, well I know how to double the speed :) |
21:12:15 | stevenm | cut the sampling rate in half |
21:13:14 | stevenm | sounds a bit different when I do that... like the higher sampling rate better though |
21:14:06 | amiconn | stevenm: It's probably a good idea to change the sample rate anyway, to 44100 Hz (or 22050 Hz) |
21:14:34 | stevenm | amiconn, ah, all right |
21:14:48 | stevenm | amiconn, I had it at 48000. i guess i switch to 41 |
21:14:50 | stevenm | er 441 |
21:15:05 | rasher | yeah, that's what we'll be able to output on iriver anyway isn't it? |
21:15:12 | amiconn | Iirc the iriver hardware isn't capable of 48000 Hz, so 48000 would require resampling |
21:15:31 | stevenm | ah I see |
21:15:47 | HCl | yup. |
21:15:51 | stevenm | rasher, still going ? |
21:15:55 | rasher | yes |
21:15:59 | rasher | 6:45 |
21:17:09 | * | stevenm cries. 'i don't know asm!! waah' |
21:17:29 | stevenm | man there's gotta be a way to get this thing faster than THAT |
21:17:48 | rasher | uh.... |
21:18:00 | rasher | 8:45... |
21:18:01 | stevenm | still not done ? |
21:18:05 | stevenm | ok WHAT ? |
21:18:06 | rasher | and counting |
21:18:12 | stevenm | .. how is THAT possible |
21:18:36 | stevenm | wwwait a second .... |
21:19:04 | rasher | 9:40 |
21:19:08 | stevenm | rasher, sequencer.c line 179 is NOT commented out, is it ? |
21:19:31 | rasher | no |
21:19:42 | rasher | should it be? |
21:19:46 | stevenm | nope |
21:19:53 | stevenm | if it were, the thing would NEVER finish |
21:19:57 | stevenm | rasher, is this 120Mhz ? |
21:20:00 | rasher | heh |
21:20:10 | rasher | yup |
21:20:21 | stevenm | Okay, what the hell ? |
21:20:38 | rasher | maybe whatever I commented out was causing a later operation to complete faster? |
21:20:46 | stevenm | you COMMENTED OUT all the ADSR crap |
21:20:54 | stevenm | I doubt it. |
21:21:07 | rasher | I could try a clean build.. but it did rebuild it |
21:21:49 | stevenm | try if you want.. |
21:21:54 | stevenm | but that is the strangest thing. |
21:21:54 | rasher | :) |
21:22:09 | stevenm | maybe some sort of synth bug where it doesnt cut voices off.. but it works fine here |
21:22:15 | stevenm | here, lemme tar this up again |
21:23:44 | stevenm | rasher, http://wam.umd.edu/~stevenm/midi.tbz2 |
21:23:50 | rasher | 7-8 seconds until it starts playing |
21:24:09 | stevenm | rasher, there I took out a bunch of other crap, so all it does is synthesize |
21:24:59 | rasher | alright |
21:26:19 | HCl | hmm. |
21:26:26 | HCl | ever had it when you like. |
21:26:33 | HCl | bought 5 kilos of your favorite candy |
21:26:46 | HCl | and at the end, it ending up not being your favorite candy anymore |
21:27:03 | HCl | ? o.o |
21:27:11 | rasher | never |
21:27:16 | rasher | no, really |
21:27:19 | HCl | i feared so :/ |
21:28:08 | HCl | hmmm. |
21:28:16 | HCl | i think that once the midi codec is all finished.. |
21:28:31 | HCl | i'm gonna try to take a look at a really low quality one, and see if i can get it to run at 11mhz |
21:28:38 | rasher | heh |
21:29:22 | HCl | it'd be nice to have the option between quality and batterylife :) |
21:30:04 | stevenm | well it would be a matter of #define SAMPLING_RATE 8000 |
21:30:11 | HCl | really? |
21:30:15 | HCl | nice. |
21:30:31 | stevenm | yea you tell it how fast to sample |
21:30:38 | rasher | could it even be runtime-configurable? |
21:30:47 | stevenm | oh yea |
21:31:01 | rasher | that'd be cute |
21:31:54 | stevenm | I have it running at 8000 sampling rate right now |
21:32:06 | stevenm | runs realtime on a Pentium M clocked at 78 Mhz |
21:32:30 | stevenm | and it's actually not as bad as I had expected |
21:33:35 | rasher | it was a correct build I used - 9:40 again (not the one you gave me last) |
21:33:47 | stevenm | 9:40 ? BAH |
21:33:51 | stevenm | w e i r d. |
21:33:57 | stevenm | try the new one ? |
21:34:02 | rasher | building now |
21:34:05 | stevenm | cool |
21:34:16 | stevenm | I was thinking, maybe I ought to optimize the sequencer itself as well |
21:34:27 | stevenm | there is a huge division operation here that I am seeing |
21:34:51 | stevenm | sequencer code is only called once like, every 400 samples or so, depending on file |
21:35:21 | stevenm | but there is kind of a lot of it |
21:35:28 | stevenm | maybe that's something to work on next |
21:35:45 | rasher | trying your latest now |
21:35:51 | stevenm | sweet |
21:35:52 | rasher | now |
21:37:26 | *** | Saving seen data "./dancer.seen" |
21:38:04 | stevenm | running realtime at 150 Mhz and 22050 sampling rate |
21:38:14 | stevenm | but again, pentium M |
21:38:44 | | Join muesli- [0] (muesli_tv@brsg-d9b8e18f.pool.mediaWays.net) |
21:40:44 | rasher | hm |
21:40:47 | rasher | think it has crashed |
21:40:54 | stevenm | what .. ? |
21:41:02 | rasher | no hdd activity and showing "start playing" |
21:41:06 | stevenm | thats fine |
21:41:08 | stevenm | I took taht out |
21:41:21 | rasher | ah |
21:41:53 | stevenm | I am curious now. is the sequencer causing THAT much slowdown |
21:42:23 | rasher | 6:30 now |
21:42:28 | stevenm | done ? |
21:42:36 | rasher | now |
21:42:43 | stevenm | ah ok |
21:42:51 | rasher | no, I mean |
21:42:53 | rasher | 7:00 |
21:42:54 | stevenm | oh |
21:42:58 | stevenm | fark ... |
21:43:04 | Shagnar | perhaps it helps, i d/l the patch-file yesterday and opened a midi with "midi2wave", after over half an hour, just "start playing" on the screen |
21:43:23 | rasher | that's to be expected |
21:43:41 | rasher | especially if it's a complicated file, and long |
21:43:45 | stevenm | Shagnar, you decompress it into .rockbox? |
21:43:54 | Shagnar | yes |
21:44:07 | stevenm | well yea I guess it would have yelled at you otherwise |
21:44:24 | stevenm | rasher, still going ? |
21:44:31 | rasher | yes |
21:44:39 | stevenm | rasher, let's try this instead |
21:44:45 | rasher | done |
21:44:46 | rasher | 8:45 |
21:44:51 | stevenm | comment out, midi2wav.c, line 190 |
21:44:57 | stevenm | wow that didnt make any difference at all |
21:45:05 | stevenm | so its not the ADSR slowing it down |
21:45:22 | stevenm | yea, comment out midi2wav.c, line 190 |
21:45:47 | HCl | wouldn't it be easier to profile it in the sim? :X |
21:45:52 | stevenm | this will be meaningless sound-wise but it will tell the slowdown due to sequencer alone |
21:46:00 | stevenm | HCl, don't know how to do that .. |
21:46:06 | HCl | fair enough |
21:46:08 | HCl | neither do i :) |
21:46:11 | HCl | but i know its possible |
21:47:07 | stevenm | rasher, with that commented out, it should take seconds. I hope it takes longer though |
21:47:20 | stevenm | so I have something else to optimize |
21:49:14 | rasher | I'll try |
21:49:43 | rasher | now |
21:49:48 | stevenm | ok |
21:50:03 | rasher | that didn't take long |
21:50:09 | rasher | 10 seconds or so |
21:50:16 | stevenm | I see |
21:50:17 | stevenm | thanks |
21:50:21 | stevenm | so its all in the synth code |
21:50:57 | rasher | from start playing to finished playing: 2 seconds |
21:51:25 | stevenm | I guess going to 22050 sampling rate will take us to 4 and a half minutes |
21:51:33 | Shagnar | no more endless loop? |
21:51:49 | stevenm | well it's not TECHNICALLY endless.... |
21:51:56 | stevenm | it's just THAT slow |
21:52:37 | stevenm | I guess 22050 gives us say 34% realtime. |
21:52:51 | stevenm | can we really expect a 3x boost from ASM stuff ? |
21:53:23 | | Quit muesli- (Read error: 54 (Connection reset by peer)) |
21:55:39 | stevenm | Anyway, I am going to go get breakfast |
21:55:41 | stevenm | at 4 PM |
21:55:46 | stevenm | rasher, thanks a lot for the help |
21:56:21 | stevenm | bye all |
21:56:25 | rasher | bye |
21:56:34 | | Quit stevenm ("Leaving") |
21:57:54 | | Join matsl [0] (~matsl@1-1-4-2a.mal.sth.bostream.se) |
22:00 |
22:07:59 | | Quit Shagnar ("( www.nnscript.de :: NoNameScript 3.81 :: www.XLhost.de )") |
22:15:24 | | Quit t0mas (Read error: 110 (Connection timed out)) |
22:19:16 | | Quit pfavr ("ChatZilla 0.9.61 [Mozilla rv:1.7.6/20050324]") |
22:27:18 | | Quit zezayer ("Chatzilla 0.9.67 [Firefox 1.0.1/20050311]") |
22:29:57 | | Join Kafka [0] (~meh@209.8.233.242) |
22:37:33 | | Join t0mas [0] (~Tomas@ip503c08d1.speed.planet.nl) |
22:37:36 | t0mas | *ooops* |
22:38:17 | Kafka | ? |
22:38:27 | t0mas | ping timed out |
22:38:49 | Kafka | happens to the best of us |
22:38:51 | * | amiconn has been really lazy lately :( |
22:38:51 | t0mas | linux uptime: 22:27:47 up 119 days, 10:29, 2 users, load average: 0.03, 23.81, 42.70 |
22:39:06 | t0mas | load was over 50 for a moment... and it started killing random processes... |
22:39:13 | t0mas | bye bye pptp connection |
22:39:13 | Kafka | heh |
22:40:39 | * | HCl hands amiconn coffee. |
22:40:48 | HCl | meh, i got class again tomorrow... no more vacation.. :/ |
22:40:55 | * | preglow hands amiconn speed |
22:52:02 | | Quit Harpy (Read error: 60 (Operation timed out)) |
23:00 |
23:00:20 | rasher | evening preglow |
23:00:27 | rasher | and HCl |
23:00:32 | HCl | hello. |
23:00:41 | HCl | how's your cat? (if you have one) |
23:01:38 | * | HCl likes to ask unordinary questions to confuse people :3 |
23:02:20 | rasher | My cat is experiencing a severe existence failure |
23:02:29 | | Quit matsl (Read error: 54 (Connection reset by peer)) |
23:02:44 | HCl | :( |
23:02:48 | HCl | you should get one :3 |
23:02:49 | | Join Rob- [0] (~robbie@haylott.plus.com) |
23:04:19 | Kafka | cats are evil |
23:04:58 | HCl | nuhuh. |
23:04:59 | | Join matsl [0] (~matsl@1-1-4-2a.mal.sth.bostream.se) |
23:05:47 | Kafka | they scratch |
23:05:52 | Kafka | and meh |
23:05:53 | HCl | they cuddle |
23:06:02 | | Join stevenm [0] (~steve@stevenm-router.student.umd.edu) |
23:06:09 | ze | and purr |
23:06:24 | Kafka | they don't show any emotion |
23:06:37 | stevenm | are these, kittens ? |
23:06:41 | HCl | o.o; they do here. |
23:06:50 | Kafka | =\ |
23:06:56 | ze | they show it in bucketloads here |
23:06:57 | ze | heh |
23:06:58 | Kafka | dogs are cool |
23:07:12 | HCl | dogs drool :/ |
23:07:18 | HCl | and smell :/ |
23:07:26 | HCl | and have to be walked cause they're too dumb to walk theirselves :/ |
23:07:32 | ze | heh |
23:07:37 | | Join TCK [0] (TCK@81-86-102-214.dsl.pipex.com) |
23:07:37 | HCl | but. |
23:07:39 | HCl | they're happy. |
23:07:40 | HCl | and loyal. |
23:07:42 | stevenm | can they optimize midi2wav in asm for realtime performance ? heh |
23:08:15 | Kafka | can you? |
23:08:33 | stevenm | I don't know ASM... can optimize in C as much as I can but ASM.. i do not know :( |
23:08:57 | Kafka | i know a little |
23:09:06 | Kafka | handed in a project last year for school |
23:09:22 | Kafka | 2 digit +/- calculator |
23:09:32 | Kafka | no negative numbers |
23:09:34 | HCl | asm compared to optimized C isn't that much better |
23:09:37 | rasher | Heh.. midi synth in coldfire sound fun? |
23:10:01 | HCl | probably only if you use the emac instructions, cause gcc doesn't utilize them. |
23:11:53 | Kafka | blah |
23:11:57 | Kafka | i'm off |
23:12:03 | Kafka | bye |
23:12:55 | HCl | cya.. |
23:13:26 | preglow | stevenm: minimize functions calls, branches, utilize iram where you can, use the emac unit for multiplication |
23:13:43 | preglow | i wish i had time to do it, but i don't |
23:13:54 | stevenm | preglow, emac ? |
23:14:08 | preglow | yes, unit for multiplication and addition |
23:14:15 | stevenm | I don't think it is ready for ASM optimization yet |
23:14:22 | stevenm | there are still things in C I can do |
23:14:23 | preglow | that might also very much be true |
23:14:25 | preglow | indeed |
23:14:26 | preglow | then do that |
23:14:34 | stevenm | I will.. I was saying, in the future |
23:14:44 | stevenm | because at this moment, i need at least a 3x speed boost |
23:14:56 | preglow | you need lots more than that |
23:15:07 | preglow | but ok |
23:15:10 | preglow | this midi file you use |
23:15:11 | HCl | yea, we're not gonna run midi at 120mhz.. |
23:15:20 | preglow | how many voices does it use simultaenously? |
23:15:32 | stevenm | I do not remember. I want to say, medium. |
23:15:45 | stevenm | it can be checked |
23:15:53 | preglow | 'medium''s not much of a number |
23:15:58 | preglow | do so, if you can |
23:16:18 | stevenm | okay |
23:17:36 | stevenm | preglow, checking now |
23:18:00 | | Quit Kafka (Read error: 54 (Connection reset by peer)) |
23:18:06 | stevenm | o far peak is 23, still going |
23:18:29 | | Quit TCK- (Read error: 110 (Connection timed out)) |
23:18:47 | preglow | but ok |
23:18:55 | preglow | what do you do with each voice? |
23:18:59 | preglow | interpolate and amplify? |
23:19:13 | stevenm | peak is 27 voices for that file |
23:19:28 | stevenm | there is more work than it seems |
23:19:32 | preglow | then explain |
23:19:52 | stevenm | a check to see which direction to go - if it's looped |
23:20:00 | stevenm | a looping check, looping reversal if needed |
23:20:08 | stevenm | then shift it foreward |
23:20:23 | stevenm | then check to see if it is being 'ramped down' after it's been killed |
23:20:31 | preglow | direction check? why don't you just make the delta be negativ |
23:20:33 | preglow | e |
23:20:33 | stevenm | this only lasts for 255 samples fortunately, and eliminates annoing clicks |
23:20:44 | preglow | that you can do on note on |
23:21:04 | stevenm | it starts out positive |
23:21:18 | stevenm | if the loop is pingping, it needs to switch to negative, then back to positive, etc |
23:21:28 | stevenm | then get 2 samples, interpolate |
23:21:53 | stevenm | do envelope stuff to it, ie, check which way the rate should go, do the rate stuff |
23:22:00 | stevenm | if the rate or the offset ran out, kill the voice |
23:22:11 | stevenm | amplify based on current offset |
23:22:18 | stevenm | (for envelope) |
23:22:29 | stevenm | and shift back accordingly |
23:22:37 | preglow | you've got an if where you check for direction |
23:22:40 | preglow | that can be eliminated |
23:22:43 | stevenm | yes |
23:22:56 | stevenm | then amplify based on channel volume and note volume |
23:23:00 | stevenm | and again shift accordingly |
23:23:11 | preglow | just do so->delta = -so->delta each time you reach a backwards loop |
23:23:41 | stevenm | I guess channel and note volume can be combined, but then iut has to be recomputed everywhere for every note on that channel the minute channel volume changes |
23:24:02 | preglow | a mul is nothing |
23:24:12 | preglow | removing one mul isn't going to do much |
23:24:14 | stevenm | I was thinking about combining the several shifts into one but I run out of bit percision |
23:24:26 | preglow | hmm |
23:24:44 | stevenm | because the number varies so much.. I make it bigger, I make it smaller, then bigger again |
23:24:52 | preglow | yes |
23:24:54 | preglow | well |
23:25:02 | stevenm | ie, here s = (s * (so->curOffset >> 22) >> 6); |
23:25:07 | preglow | for volume muls, interpolation and so on, you should use the emac unit |
23:25:17 | stevenm | preglow, how do I use the emac unit ? |
23:25:27 | stevenm | is it a #define or something or what ? |
23:25:52 | stevenm | then there's the whole loop outside the synth. ie, run thru all the voices, etc |
23:25:54 | preglow | i've made a file with macros |
23:25:59 | preglow | but you need to learn how to use it first |
23:26:18 | stevenm | I made that variable a global variable and in iram, so that it eliminates the overhead of copying the variable and putting it in plaes |
23:26:49 | | Join Aison [0] (~hans@zux166-181.adsl.green.ch) |
23:26:55 | preglow | all this shifting also takes a lot of cpu |
23:26:57 | stevenm | everything synth related is in iram except for the samples. and it went from 10 minutes to 8 minutes |
23:27:04 | stevenm | shifting is expensive ? |
23:27:12 | preglow | well, no, but you do a lot of it |
23:27:21 | preglow | and when the shift is above 8 bits, the shift takes two instructions |
23:27:28 | preglow | because the shift number has to be put in a register |
23:27:34 | stevenm | ah right |
23:27:48 | stevenm | I am also using signed ints but I went to signed short ints as much as possible |
23:27:56 | stevenm | what is the relation between speed and variable size |
23:27:57 | preglow | that won't save you much |
23:28:02 | preglow | go for ints |
23:28:20 | preglow | hmm |
23:28:24 | preglow | gimme a sec |
23:28:55 | amiconn | stevenm: Using short on a 32 bit cpu is most often slower than using int |
23:29:09 | preglow | stevenm: not on coldfire |
23:29:11 | preglow | ehh |
23:29:16 | amiconn | Using short only pays off if you need to save space |
23:29:16 | stevenm | what do you recommend on coldfire ? |
23:29:17 | preglow | amiconn, i mean |
23:29:28 | preglow | but it is also like amiconn says |
23:29:34 | preglow | the only place you save cycles is with muls |
23:29:39 | amiconn | preglow: I guess this is also true for coldfire |
23:29:39 | stevenm | what should I aim for? int? short int? unsigned char ? |
23:29:40 | preglow | where shorts are a wee bit faster |
23:30:06 | stevenm | i converted a bunch of ints to unsigned chars. did I make it better or worse ? |
23:30:20 | preglow | what were they used for? |
23:30:56 | preglow | for coldfire, you're better off using ints, the coldfire instruction set often doesn't support byte and word operations |
23:30:56 | amiconn | The ops will most likely be the same speed regardless of short or int, but loading a short from memory often needs additional instructions (signed/unsigned extend) |
23:31:59 | stevenm | signed/unsigned extend? waht do you mean |
23:32:19 | preglow | when it loads a 8 bit value into a 32 bit register, it has to move and extend bits |
23:32:29 | preglow | the sign needs to be moved to bit 31, for instance |
23:32:43 | preglow | and all the other top 23 bits need to be set if it's negative |
23:32:53 | stevenm | ah. so I should declare it unsigned ? |
23:33:00 | preglow | no, you should use ints |
23:33:12 | amiconn | Btw, this is even more 'fun' on sh1, because the sh1 sign-extends by default. So loading an 'unsigned short' into a register is real fun.... |
23:33:41 | preglow | hahahha |
23:33:54 | amiconn | (Well, not too much, since there is a special instruction for this) |
23:34:08 | stevenm | wow you guys know a lot of asm |
23:34:10 | preglow | stevenm: but no, bottom line, ints are fine, mostly |
23:34:22 | amiconn | Still, loading a byte or short needs 2 instructions, loading an int (long) takes 1 |
23:34:37 | stevenm | so I should declare stuff LONG ? |
23:34:42 | preglow | 'int' will do |
23:34:47 | stevenm | okay |
23:34:49 | preglow | but i don't know |
23:34:51 | amiconn | There are some simple rules |
23:34:56 | preglow | maybe long is prefered |
23:35:12 | stevenm | is there a way to find out ? |
23:35:18 | preglow | that depends on rockbox |
23:35:21 | preglow | and the other targets |
23:35:26 | preglow | int is 16 bit on some archs |
23:35:31 | amiconn | Use 'int' wherever a 'short' would suffice range-wise, but space is not an issue. This is usually the fastest |
23:35:44 | stevenm | okay, so I stick to int |
23:36:00 | stevenm | preglow, now.. do you believe this emac unit would make life much faster ? |
23:36:04 | preglow | stevenm: you must also make sure that all the data you use are aligned to a 32 bit boundary |
23:36:10 | amiconn | Use 'long' only when the value might exceed the range of 'short'. Of course this is only necessary in case we're compiling for a 16 bit target cpu |
23:36:20 | stevenm | preglow, what do you mean ? |
23:36:22 | amiconn | Use 'short' only when space is an issue |
23:36:32 | stevenm | amiconn, okay |
23:37:24 | preglow | stevenm: all data you access should be placed at an address that is divisible by four |
23:37:27 | *** | Saving seen data "./dancer.seen" |
23:37:41 | amiconn | Of course, the 'long' rule should be obeyed in rockbox, because we do have a 16-bit target. (Although it seems that development for that has come to a (temporary?) halt) |
23:37:57 | preglow | stevenm: you try to access a 32 bit int and it is not thusly aligned, the cpu will have to do two moves and combine it to a single 32 bit value, this takes time |
23:38:17 | preglow | amiconn: it's worth heeding anyway, that arch seems to be semi-popular |
23:38:20 | stevenm | amiconn, this thing would never be for archos I dont think .. |
23:38:29 | preglow | stevenm: gmini |
23:38:33 | amiconn | stevenm: Talking Archos _gmini_ here |
23:38:43 | stevenm | amiconn, ah.... I see |
23:38:51 | preglow | jyp actually did port libmad to the gmini |
23:38:54 | amiconn | The archos jukeboxes are 32 bit |
23:38:55 | preglow | never heard if it worked |
23:38:56 | amiconn | SH1 |
23:39:00 | preglow | god, that sounds like nightmare |
23:39:38 | stevenm | preglow, data aligned to 32 bits... when I declare a variable in C, does that automatically happen? |
23:39:47 | stevenm | does this only apply to malloc'd stuff or to everything I declare |
23:40:03 | stevenm | because I can easily enough modify the malloc to return things divisible by 4 |
23:40:09 | stevenm | just skip a few bytes |
23:40:10 | preglow | stevenm: variables in c should be auto aligned if the compiler knows what it's doing, malloc i don't know about |
23:40:24 | preglow | but yes |
23:40:32 | preglow | modifying malloc should be easy, you just do what you're saying |
23:40:56 | thegeek | amiconn : got your h140 yet? |
23:40:56 | stevenm | preglow, but m68k-gcc is smart enough to align declared variables? |
23:40:57 | amiconn | Keeping 32 bit alignment is also important. Some cpus don't only get slower on unaligned accesses (like the coldfire does), but count unailgned accesses as a severe error |
23:41:01 | preglow | stevenm: i don't know |
23:41:13 | preglow | stevenm: i really would think so |
23:41:53 | amiconn | In fact, m68k is the only architecture I know of that does *not* throw an address exception on unaligned accesses |
23:42:06 | preglow | x86? :P |
23:42:06 | amiconn | stevenm: yes it is |
23:42:24 | preglow | x86 only tosses exceptions if you use movaps and the like |
23:43:21 | amiconn | I must admit that although I played with x86 asm a little (waaay back in the past, at the time of the '286), I never really understood it |
23:43:47 | preglow | and movaps is an sse extension |
23:43:58 | preglow | x86 is very simple |
23:44:02 | preglow | a pain to program |
23:44:29 | preglow | the number of registers make you want to cry |
23:44:59 | stevenm | ouch.. at least it aint a PIC16F877 |
23:45:14 | | Join Strath [0] (~mike@dgvlwinas01pool0-a202.wi.tds.net) |
23:45:30 | stevenm | preglow, now if I do all this emac stuff.. will I still be able to use the Simulator to see it it worked ? |
23:45:50 | preglow | stevenm: no |
23:45:57 | stevenm | preglow, ... ! bah |
23:46:07 | preglow | so you stick to c for now |
23:46:11 | stevenm | preglow, is there a way to at least tell if I am adding the right numbers? |
23:46:11 | preglow | there's more to be done anyway |
23:46:16 | stevenm | preglow, yes. |
23:46:35 | preglow | if you haven't got a player, then no, you can't do emac without having to bother someone else excessively to test the code |
23:46:49 | stevenm | convert everything back to long, make the delta signed, possibly rearrange the loop conditions |
23:47:04 | stevenm | yea I think I bugged rasher way too much already |
23:47:28 | rasher | haha, no that's just fine |
23:47:32 | rasher | glad to help |
23:47:37 | stevenm | :) thanks |
23:47:58 | preglow | i was planning to write an emac howto to help familiarise other people with it |
23:48:04 | rasher | but doing emac optimization tests would take ages I guess |
23:48:13 | stevenm | yesw |
23:48:14 | stevenm | yes |
23:48:57 | stevenm | preglow, if emac are functions, how hard would it be to write c equivalents of them for the sim ? |
23:49:06 | preglow | they're not function |
23:49:12 | preglow | they're assembly level instructions |
23:49:24 | stevenm | ouch |
23:49:24 | preglow | but i guess what you say could be done |
23:49:27 | stevenm | I guess that is for last then |
23:49:35 | preglow | if we access them through macros |
23:49:40 | stevenm | maybe, #define something? |
23:49:43 | stevenm | yea yea exactly |
23:49:57 | preglow | http://glow.m0f0.net/rockbox/emac.h |
23:50:06 | preglow | i made those macros when i first tried to learn how it worked |
23:50:10 | preglow | but since then i've never even used them |
23:50:23 | t0mas | amiconn? |
23:50:33 | preglow | to truly utilize it, you have to write in assembly, to use the instructions with parallell loads |
23:50:57 | t0mas | your memory idea.. |
23:51:04 | stevenm | preglow, woah, that is the sound of a bunch of code going so far over my head I cant even see it |
23:51:30 | t0mas | I had a "new" idea, but I meight be the way you wanted it... |
23:51:43 | preglow | stevenm: here's an example use of it: http://glow.m0f0.net/rockbox/dsptest.c |
23:51:50 | t0mas | adding a pointer to the place to start saving the file, and a size for how far to save |
23:51:51 | preglow | stevenm: in sine() i do linear interpolation |
23:51:58 | t0mas | (just return error if the image doesn't fit.) |
23:52:25 | t0mas | that way it should be possible to make plugins load images subsequent... in the pluginbuffe |
23:52:26 | t0mas | r |
23:52:42 | preglow | stevenm: the nice thing with it is that you can do 32 bit x 32 bit multiplies with a 64 bit answer |
23:53:13 | stevenm | oh no I dont need ant=ything that big |
23:54:19 | preglow | it can also do ordinary muls, but it does them faster |
23:54:27 | preglow | and i can add the result to another register |
23:54:49 | preglow | special registers... |
23:55:20 | preglow | but if you haven't got a device, don't bother |
23:55:25 | stevenm | i guess i can jump off that bridge what I come to it |
23:55:26 | preglow | just do what you can in c |
23:55:37 | stevenm | yea definitely |
23:55:44 | preglow | i'd love to help, but i need to finish libmad first |
23:55:46 | stevenm | I was considering buying an H3x0 for this |
23:55:49 | preglow | and now i need to get back to work |
23:55:54 | stevenm | preglow, oh definitely, that is more important |
23:56:17 | stevenm | but since 3x0 is nowhere near supported, I am waiting.. plus I already have an ajbrec |
23:56:23 | * | amiconn fiddles with add_dir_entry() |
23:56:33 | thegeek | amiconn : got your h140 yet? |
23:57:00 | amiconn | Still no iriver here :( Need to mail the dealer.... |
23:57:05 | preglow | call |
23:57:10 | preglow | use a loud voice ;) |
23:57:15 | stevenm | Speaking of... if you wired a CF card into an ajbrec, to the HD connector, would it work? ie, assuming the wiring is right, would the software work with it? |
23:57:17 | thegeek | indeed |
23:57:21 | thegeek | that's a loong time |