Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Would this work?
« previous next »
  • Print
Pages: [1]

Author Topic: Would this work?  (Read 2625 times)

Offline hobosrock

  • Member
  • *
  • Posts: 5
Would this work?
« on: November 08, 2009, 12:53:15 PM »
I am completely new to any type of serios programming and programming an operating system may not be the best way to get into it but I might as well try. So my question is would I be able to develope soething for the iPod Video with this?
http://www.iar.com/website1/1.0.1.0/68/1/
Wouldn't there also be additional things I would have to take into account for example te iPod's ability to detect if headphones are plugged in or not. How would i do that?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Would this work?
« Reply #1 on: November 08, 2009, 12:58:47 PM »
Quote from: hobosrock on November 08, 2009, 12:53:15 PM
I am completely new to any type of serios programming and programming an operating system may not be the best way to get into it but I might as well try. So my question is would I be able to develope soething for the iPod Video with this?

No.  You need to use the rockbox dev tools:

http://www.rockbox.org/wiki/DevelopmentGuide

I suggest taking some time to read about rockbox development before trying to reinvent the wheel.
Logged

Offline hobosrock

  • Member
  • *
  • Posts: 5
Re: Would this work?
« Reply #2 on: November 09, 2009, 07:21:32 PM »
That might be a good idea... I looked through the Rockbox source and i have no idea what does what or what Rockbox even boots from so playing around with Rockbox might be a good idea. Also why wouldnt that compiler work? After all it compiles for arm7 tdmi.
« Last Edit: November 09, 2009, 07:36:28 PM by hobosrock »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Would this work?
« Reply #3 on: November 09, 2009, 09:21:05 PM »
Quote from: hobosrock on November 09, 2009, 07:21:32 PM
Also why wouldnt that compiler work? After all it compiles for arm7 tdmi.

We're quite firmly wedded to gcc.  You're welcome to try other compilers, but it will be a lot of work.  Even switching gcc versions can be difficult for us. 
Logged

Offline hobosrock

  • Member
  • *
  • Posts: 5
Re: Would this work?
« Reply #4 on: November 10, 2009, 12:33:50 AM »
Oh I see thanks for the heads up there  :) so far I just started with a simple plugin. Is there an easy way to compile one plugin and just pop it into an install or do I have to recompile each time? Also where would I find a more complete list of rockbox functions? [rb->functionname();] Thanks for all the help so far!

Edit:
I'm also a bit confused about rb->(lcd-update) I dont get how I would get things into memory and not display them until this is called. rb->splashf() makes no sense to me (It seems the same as splash...) and rb->lcdputsxy() is a bit confusing to me since I have programmed in Ti-Basic (too slow for most games) and when displaying strings of text if you set the coordinates as 0,0 half the characters where cut off.... when you use 0,0 as your coordinates does it simply place it in the corner or cut a part off the characters

Maybe this would be easier if you pointed me to the file in which these functions are defined... Eventually I'll figure out the source. Thanks again!
« Last Edit: November 10, 2009, 12:41:13 AM by hobosrock »
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: Would this work?
« Reply #5 on: November 10, 2009, 01:36:21 AM »
Quote from: hobosrock on November 09, 2009, 07:21:32 PM
Also why wouldnt that compiler work? After all it compiles for arm7 tdmi.
Because compilers are different, even at the C language level. The most important issue is support for the C99 standard here, and apart from gcc I haven't seen a compiler with reasonable support for C99. The moment you use special features like inline assembly you're pretty much bound to a compiler, and Rockbox does make use of (and needs) such features. Not to forget about so simple things like compiler command line usage, which can be heavily different between compilers even if they build for the same target CPU.

I don't know the compiler you mentioned. Building by itself could be possible, but will definitely require adjusting heaps of the Rockbox sources. Besides, why use a commercial compiler if a free one is available that's pretty good?
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Would this work?
« Reply #6 on: November 10, 2009, 08:38:46 AM »
Quote from: hobosrock on November 10, 2009, 12:33:50 AM
Oh I see thanks for the heads up there  :) so far I just started with a simple plugin. Is there an easy way to compile one plugin and just pop it into an install or do I have to recompile each time?
When you run "make" only files which have changed will be recompiled - once you've built Rockbox once, it will only recompile the plugin whose source you are changing. You don't need to reinstall rockbox, you can just copy the one plugin you have changed over, but the install of rockbox needs to be close (ideally identical) to the version you are building the plugin from.

Quote
Also where would I find a more complete list of rockbox functions? [rb->functionname();] Thanks for all the help so far!
In apps/plugin.h.

Quote
Edit:
I'm also a bit confused about rb->(lcd-update) I dont get how I would get things into memory and not display them until this is called.
You don't have to do this, the LCD code does it for you. *None* of the drawing functions are actually guaranteed to update the screen (unless they say they do), so you always need to call lcd_update() to make sure what you have drawn gets displayed.

Quote
rb->splashf() makes no sense to me (It seems the same as splash...)
splash() can only print strings, splashf() is like printf, it can format arbitrary values. e.g. rb->splashf(5*HZ, "The value of x is %d", x); will print "The value of x is 7", assuming x is indeed 7.

Quote
and rb->lcdputsxy() is a bit confusing to me since I have programmed in Ti-Basic (too slow for most games) and when displaying strings of text if you set the coordinates as 0,0 half the characters where cut off.... when you use 0,0 as your coordinates does it simply place it in the corner or cut a part off the characters
It sounds like Ti-Basic uses that as the center point for the text. We position text such that the top left corner of the text is at the coordinate given, so 0,0 will start at the very top left corner of the display with no margin, but will not cut off any pixels.

Quote
Maybe this would be easier if you pointed me to the file in which these functions are defined... Eventually I'll figure out the source. Thanks again!
The actual implementations of the plugin API functions are all over the place: lcd related functions are in the LCD drivers, playback related functions are in the playback code, etc. The API is declared in plugin.h, though.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline hobosrock

  • Member
  • *
  • Posts: 5
Re: Would this work?
« Reply #7 on: November 10, 2009, 06:05:54 PM »
Thanks and if you don't mind I have one other question (sorry I don't know anything  :-\) I dont see why you used %d there... I get the x after the comma however I dont see how %d is replaced by x...
(good point bluebrother  :o I just didnt know where to start)
« Last Edit: November 10, 2009, 06:08:42 PM by hobosrock »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Would this work?
« Reply #8 on: November 10, 2009, 08:11:56 PM »
Quote from: hobosrock on November 10, 2009, 06:05:54 PM
Thanks and if you don't mind I have one other question (sorry I don't know anything  :-\) I dont see why you used %d there... I get the x after the comma however I dont see how %d is replaced by x...
(good point bluebrother  :o I just didnt know where to start)

Thats a pretty common programming convention in many languages that are based on c.  Take a look at the documentation for printf:

http://www.cplusplus.com/reference/clibrary/cstdio/printf/

Rockbox uses many of those options (though obviously not all of them are applicable).
Logged

Offline hobosrock

  • Member
  • *
  • Posts: 5
Re: Would this work?
« Reply #9 on: November 10, 2009, 10:33:03 PM »
Well thanks I guess thats pretty much all I needed. It was an easier start than I thought, thanks guys!
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Would this work?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.088 seconds with 15 queries.