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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  .mod file format ?
« previous next »
  • Print
Pages: 1 [2] 3

Author Topic: .mod file format ?  (Read 15008 times)

Offline Sherv

  • Member
  • *
  • Posts: 66
Re: .mod file format ?
« Reply #15 on: June 19, 2006, 10:20:27 AM »
Quote from: theli on June 08, 2006, 04:51:22 AM
Quote from: mahen on June 07, 2006, 05:26:35 PM
Actually I would be much interested in .spc support ;) What lib / player code are you using atm ?
as i've said - a quick and _dirty_ patch is availible on tracker
it is here
http://www.rockbox.org/tracker/task/2727
as you can see it uses openspc

Sweet!! It's always been a dream of mine to have portable SPCs and NSFs....one day, hopefully :)
Logged

Offline orfax

  • Member
  • *
  • Posts: 37
    • The Stuff of Orfax
Re: .mod file format ?
« Reply #16 on: June 22, 2006, 06:11:13 PM »
Quote from: orfax on June 17, 2006, 10:51:44 PM
I've now played around with it a bit (created a codec), but there are some issues (such as no sound). The version thats in rockbox is an old version. It appears to be modified a little.
I have created a working codec using DUMB that plays .mod, .xm, .it & .s3m, BUT (and its a big but) only for the simulator. DUMB uses some floating point functions (floor, pow, log, exp) in order to play these formats. The modified rockbox version had these functions #define'd to something else which breaks playback. As I believe we don't have the floating point functions available for the host devices (ie ipod, iriver, etc)  as there is no FPU, I don't think we can use DUMB in its current form.

I'm now having a look at libmikmod (which is used in the PS2 dev community though I haven't used it before). It looks promising as it appears it doesn't use floating point functions. The added benefits are that it supports even more formats (669, med, plus more), though I'm not sure what the quality is like.
Logged
Look deep into their eyes for what they have to say, Emotions take control of life everyday
 - Death (Nothing Is Everything)

Offline dma

  • Member
  • *
  • Posts: 21
Re: .mod file format ?
« Reply #17 on: June 23, 2006, 05:57:45 AM »
Orfax : Ah great news that you're looking at those replay routs. :)

LibMikMod seems to have been the choice for tracker replay in iPodLinux, so it might be a good one to try indeed.
Its replay is good as far as i recall hearing tunes replayed with it.
Logged

Offline orfax

  • Member
  • *
  • Posts: 37
    • The Stuff of Orfax
Re: .mod file format ?
« Reply #18 on: June 27, 2006, 09:25:11 PM »
Quote from: orfax on June 22, 2006, 06:11:13 PM
I'm now having a look at libmikmod
I've played around with libmikmod and had a working version of the codec in the simulator.

The following is going to be a little technical...

There are a couple of issues between rockbox and libmikmod (both define BOOL and use it differently) so I've made some changes to libmikmod and created a rockbox driver for it. libmikmod also doesn't provide a way of finding out how long a song is. The codec build in the simulator is a little too big (around 540K) as there is a limit of 512K for a codec, at least for an ipod simulator build. I can strip the debug stuff out and it falls down to ~160K. There are a number of functions that reference FILE * that would never be used so I could remove these and hope the build falls under 512K. Or remove some of the file format loaders, but I don't want to do this. I also only include the rockbox driver, so nothing like the wav file driver, OSS driver, Windows MM driver, etc is included.

Happy with that, I tried to do an ipod build, but came across more problems. There are a number of standard library (and non standard but often available) functions it needs (ie isalnum, malloc, sprintf, strdup, strncat, strncpy,...). Some of these I've had to write myself (strdup, strncat) and others I've referenced the code from firmware/common. Eventually it built, but I decided to remake the simulator again because of the changes. Now the codec in the simulator no longer works, but I'll fix that soon.

Hopefully shortly I'll have a working codec on actual hardware.
Logged
Look deep into their eyes for what they have to say, Emotions take control of life everyday
 - Death (Nothing Is Everything)

Offline orfax

  • Member
  • *
  • Posts: 37
    • The Stuff of Orfax
Re: .mod file format ?
« Reply #19 on: June 29, 2006, 11:14:09 PM »
Quote from: orfax on June 27, 2006, 09:25:11 PM
Hopefully shortly I'll have a working codec on actual hardware.
Unfortunately this will not happen soon. After a bit more investigation, the memory consumption of libmikmod is too high for Rockbox. For my test mod (~200K) it allocated around 750K in internal structures. This of course is much higher than is available for a codec. This means to be able to use libmikmod much of the code will need to be rewritten to utilize less memory. Not a simple task. I'm unlikely to do any more to this (my hope was to be able to use an existing library).
Logged
Look deep into their eyes for what they have to say, Emotions take control of life everyday
 - Death (Nothing Is Everything)

Offline dma

  • Member
  • *
  • Posts: 21
Re: .mod file format ?
« Reply #20 on: July 24, 2006, 07:37:41 AM »
Great to have a SID emulation codec!
The emulation isn't the most faithful, but it isn't bad either. :)

I can now browse HVSC in my H120 to discover new gems, yeah! :)

Could the "durations" file of HVSC be implemented in the codec btw?
Logged

Offline iobound

  • Member
  • *
  • Posts: 1
Re: .mod file format ?
« Reply #21 on: July 26, 2006, 08:30:36 AM »
Quote from: orfax on June 22, 2006, 06:11:13 PM
Quote from: orfax on June 17, 2006, 10:51:44 PM
I've now played around with it a bit (created a codec), but there are some issues (such as no sound). The version thats in rockbox is an old version. It appears to be modified a little.
I have created a working codec using DUMB that plays .mod, .xm, .it & .s3m, BUT (and its a big but) only for the simulator. DUMB uses some floating point functions (floor, pow, log, exp) in order to play these formats. The modified rockbox version had these functions #define'd to something else which breaks playback. As I believe we don't have the floating point functions available for the host devices (ie ipod, iriver, etc)  as there is no FPU, I don't think we can use DUMB in its current form.

About half a year ago, I created a plugin (not a codec) which includes realtime playback with sound in simulator, plus a disk-writer (since it's not running at 100% speed and also because play_pcm() in CVS was broken for plugins at the time) for the target device (h340). The disk-writer on the iriver produced a bit-perfect raw pcm file compared to the same code running on the simulator.

I solved the floating point issues by porting the necessary maths routines from FreeBSD's math library as well. Unfortunately I kind of lost interest, but I posted what I got to the tracker at http://www.rockbox.org/tracker/task/2793 .
Logged

Offline orfax

  • Member
  • *
  • Posts: 37
    • The Stuff of Orfax
Re: .mod file format ?
« Reply #22 on: July 28, 2006, 09:17:20 AM »
Quote from: iobound on July 26, 2006, 08:30:36 AM
I solved the floating point issues by porting the necessary maths routines from FreeBSD's math library as well. Unfortunately I kind of lost interest, but I posted what I got to the tracker at http://www.rockbox.org/tracker/task/2793 .
Cool. I'll have a look at what you have done. It doesn't sound promising about the memory allocation / free thing though.

I also have another library I want to try out, which is xmp.
Logged
Look deep into their eyes for what they have to say, Emotions take control of life everyday
 - Death (Nothing Is Everything)

Offline Starius

  • Member
  • *
  • Posts: 2
Re: .mod file format ?
« Reply #23 on: January 17, 2007, 06:04:37 PM »
If you guys ever do get amiga mod (.mod, .it, .s3m, .xm, etc) supported in RockBox, I'd consider buying a ipod just to use it.  

I see this thread hasn't been updated in awhile, any progress here?
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: .mod file format ?
« Reply #24 on: January 17, 2007, 06:09:08 PM »
http://www.rockbox.org/tracker/task/5241
Logged

Offline Starius

  • Member
  • *
  • Posts: 2
Re: .mod file format ?
« Reply #25 on: January 17, 2007, 06:26:59 PM »
Quote from: Llorean on January 17, 2007, 06:09:08 PM
http://www.rockbox.org/tracker/task/5241
Ah, thanks for the link there.
Logged

Offline gnu

  • Member
  • *
  • Posts: 269
Re: .mod file format ?
« Reply #26 on: January 22, 2007, 01:50:31 PM »
You could also use IPL, someone made a module that plays most mod formats..
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: .mod file format ?
« Reply #27 on: February 01, 2007, 06:14:30 PM »
this is a great addon indeed!
but unfortunately most of my old modfiles have thier comments filled with not that useful data. so updating my ID3 tag database reads these tags and totally screws up my database. is it possible to still read the tags in the NPS but to exclude them from the database indexing??
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: .mod file format ?
« Reply #28 on: February 01, 2007, 10:38:59 PM »
Disable auto-update and copy them off the player before running the initialize, then back on after it's done.

Right now there's no way to set it to skip certain folders.
Logged

Offline cynric

  • Member
  • *
  • Posts: 12
Re: .mod file format ?
« Reply #29 on: February 03, 2007, 12:46:58 PM »
thanks, it works this way... maybe a ".skipdir" file or something like that to make DB indexing skip the current folder (and its subfolders) would be useful for these formats; the meanwhile fully impemented .nsf format might cause similar problems (did not test it yet).
strangely rockbox now reads all my genre tags wrong, but that is likely to be some other problem..
Logged

  • Print
Pages: 1 [2] 3
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  .mod file format ?
 

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

Page created in 0.118 seconds with 15 queries.