Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#220940 - 08/02/2002 15:40 New layouts for the receiver
pedrodeoliveira
stranger

Registered: 08/02/2002
Posts: 3
Are there any new layout for the receivers or are we stuck with the ones provided. I took a look at
http://www.differentpla.net/~roger/empeg/receiver/layout/

and

http://www.dasnet.org/David/Rio/Layout.html

but I can't figure out what to do with all this information. I downloaded a hex editor to look at the original files but was stumped

Anyone have some ideas / layout files to share please.

Cheers
Pedro

Top
#220941 - 11/02/2002 07:27 Re: New layouts for the receiver [Re: pedrodeoliveira]
dschuetz
new poster

Registered: 08/05/2002
Posts: 42
> ....but I can't figure out what to do with all this information.

Hmph. I was afraid of this -- Roger's pages are too c-centric, mine are too...obtuse.

Let me try and give a brief explanation, and maybe I'll try and write up something easier to deal with (and maybe even a perl script, or something).

The layout file is a binary file. It's comprised of a group of "Field Definitions," each of which provides a location for a given field to be dispalyed on the Rio, as well as information about what to put into that field.

The fields are defined like this:
* Field type
* Field Location
* Field details

The "details" part (Roger calls this the "Payload," and I'm accepting that nomenclature) is broken down into lots of other stuff.

The fields are defined in the file, one after the other. So, you might end up with something (conceptually) like this:

<artist field><album field><track
field><time display><play display>

Most important here is the fact that there's no line breaks or formatting of any kind within the layout file -- it's just a bunch of bytes describing a field, followed by a bunch of bytes describing another field, etc.

All the entries (with some exceptions) are stored as 32-bit wide integers (also called INT32 or DWORDs). That is, instead of storing, say, "A" as "41" hex (commonly written as 0x41), it's stored as "00000041". 32-bits, 4-bytes, 8 hex digits.

But wait, there's more! When you write "00000041" to a file, you don't actually write it left-to-right. The layout file is made in what's called "Little-endian" order (which means that the little end, the "41", of the 4-byte-long word is written first). So, if you were writing the letter "A" into an INT32, little endian field in a file, you'd actually enter "41 00 00 00" into your hex editor.

To create a very simple file that only displays the current track and the current time, do something like this:

0x02 0x00 0x09 0x80 0x12 0x04 0x00000000 (name)
0x03 0x3e 0x2a 0x80 0x40 0x04 0x00030002 (time)

but you'd write it like this, in your hex editor:

02 00 00 00 00 00 00 00 09 00 00 00 80 00 00 00
12 00 00 00 04 00 00 00 00 00 00 00 03 00 00 00
3e 00 00 00 2a 00 00 00 80 00 00 00 40 00 00 00
04 00 00 00 02 00 03 00

(note that I just noticed an error on my page -- I shouldn't have made the "track name" field end at 0x34, but 0x12).

Anyway, punch this into your text editor, and save it as "test1" or somesuch. Copy that file into the receiver's layout folder (program files \ receiver \ .... \ layout \ en_UK, or something very close to that). In that folder, you'll see the other layouts, as well as an "index" file. Edit the index file to add a pointer to your new file (I think you'll need to add a line like "layout/en_UK/test1=My First Layout" -- use the existing lines as a guide). Then, go to the rio, select the layouts, and you'll see "My First Layout" added to the list. With luck, it'll work.

I hope this helps get you closer... as I said, maybe I'll try and do a better howto on it sometime.


david.

Top
#220942 - 14/02/2002 08:20 Re: New layouts for the receiver [Re: dschuetz]
pedrodeoliveira
stranger

Registered: 08/02/2002
Posts: 3
Thanks for the marathon explanation. I will try to make sense of it tonight but from what I have read - it should be perfect to make me stop chasing my tail.

Cheers
pedro

Top