<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox, branch puzzles</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>[WIP] Port of Simon Tatham's Puzzle Collection</title>
<updated>2016-11-24T21:23:09+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>frankhwei536@gmail.com</email>
</author>
<published>2016-11-20T20:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=56c9984511f016eab7e1278ba9e40d88bb59a162'/>
<id>56c9984511f016eab7e1278ba9e40d88bb59a162</id>
<content type='text'>
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9

MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.

The following games are at least partially broken for various reasons:

Cube:     crash with certain settings
Galaxies: crash
Inertia:  crash
Keen:     input issues
Loopy:    weird stuff happens
Map:      crash on input
Mines:    weird stuff happens on target
Palisade: input issues
Signpost: crash on input
Solo:     input issues
Towers:   input and drawing issues
Train Tracks: drawing issues
Twiddle:  weird animation on target
Undead:   input and drawing issues
Unequal:  input and drawing issues
Untangle: input issues

All in all, about 40% of the games are at least partially broken.

Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Original revision: 5123b1bf68777ffa86e651f178046b26a87cf2d9

MIT Licensed. Some games still crash and others are unplayable due to
issues with controls. Still need a "real" polygon filling algorithm.

The following games are at least partially broken for various reasons:

Cube:     crash with certain settings
Galaxies: crash
Inertia:  crash
Keen:     input issues
Loopy:    weird stuff happens
Map:      crash on input
Mines:    weird stuff happens on target
Palisade: input issues
Signpost: crash on input
Solo:     input issues
Towers:   input and drawing issues
Train Tracks: drawing issues
Twiddle:  weird animation on target
Undead:   input and drawing issues
Unequal:  input and drawing issues
Untangle: input issues

All in all, about 40% of the games are at least partially broken.

Change-Id: I7c69b6860ab115f973c8d76799502e9bb3d52368
</pre>
</div>
</content>
</entry>
<entry>
<title>Add circle drawing/filling to xlcd</title>
<updated>2016-11-20T20:13:13+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>frankhwei536@gmail.com</email>
</author>
<published>2015-04-08T18:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=29648f817677b84c03c2bcfe89eb8cf53653e7db'/>
<id>29648f817677b84c03c2bcfe89eb8cf53653e7db</id>
<content type='text'>
Change-Id: I5d28ade42145d9d82babcf62c0db7948927cafec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I5d28ade42145d9d82babcf62c0db7948927cafec
</pre>
</div>
</content>
</entry>
<entry>
<title>XWorld: some fixes</title>
<updated>2016-11-19T18:17:14+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>frankhwei536@gmail.com</email>
</author>
<published>2016-11-04T02:27:01+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=05733649bce2623acfad7b163501c6fdefea985a'/>
<id>05733649bce2623acfad7b163501c6fdefea985a</id>
<content type='text'>
Fixes sound on most platforms, original root cause was bad menu code
as well as DMA callbacks taking too long. Worked around with smaller
chunk sizes. Permanent fix would include moving mixing out of the
callback. Rewrites input with code from rockboy/doom. Cherry-picks a
change from Gregory Montoir's `rawgl' to patch the code wheel
screen. Finally, adds a motion blur filter on select targets.

Change-Id: I8df549c923c5075800c6625c36c8202e53de1d27
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes sound on most platforms, original root cause was bad menu code
as well as DMA callbacks taking too long. Worked around with smaller
chunk sizes. Permanent fix would include moving mixing out of the
callback. Rewrites input with code from rockboy/doom. Cherry-picks a
change from Gregory Montoir's `rawgl' to patch the code wheel
screen. Finally, adds a motion blur filter on select targets.

Change-Id: I8df549c923c5075800c6625c36c8202e53de1d27
</pre>
</div>
</content>
</entry>
<entry>
<title>Add KAS for NWZ-E470</title>
<updated>2016-11-14T19:54:05+00:00</updated>
<author>
<name>Marcin Bukat</name>
<email>marcin.bukat@gmail.com</email>
</author>
<published>2016-11-14T19:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=deaeb73912c1bb9fd4d3498e59d1789761f3e322'/>
<id>deaeb73912c1bb9fd4d3498e59d1789761f3e322</id>
<content type='text'>
Change-Id: I1b8272a486ba2377e5047855acda3f80aa92c232
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I1b8272a486ba2377e5047855acda3f80aa92c232
</pre>
</div>
</content>
</entry>
<entry>
<title>nwztools: rework dualboot</title>
<updated>2016-11-12T21:16:48+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-11-12T21:16:48+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=0c1a96101cdfc778dbffa7ceffea5765ffd4d1bd'/>
<id>0c1a96101cdfc778dbffa7ceffea5765ffd4d1bd</id>
<content type='text'>
The new code gets closer to an actual bootloader:
- it provides a menu with three options: Sony, Rockox, tools with icons (and
  extracts the Sony logo from the NVP)
- the dualboot install script now creates a symlink from /.rockbox to
  /contents/.rockox which is necessary to run rockbox
- more text drawing / framebuffer functions
In the long run, we will move this under bootloader/ and rbutil/ and also use
firmware/ drawing facilities, at the moment we use OF display program which
is slow and creates some flickering.
The logo extraction/placement code was tested with resolution 240x320 and I
guessed some reasonable values for 240x400, but those will probably need some
tweaking.

Change-Id: I0319be902d21a7d33c1dee0fffdb4797065dbf8a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new code gets closer to an actual bootloader:
- it provides a menu with three options: Sony, Rockox, tools with icons (and
  extracts the Sony logo from the NVP)
- the dualboot install script now creates a symlink from /.rockbox to
  /contents/.rockox which is necessary to run rockbox
- more text drawing / framebuffer functions
In the long run, we will move this under bootloader/ and rbutil/ and also use
firmware/ drawing facilities, at the moment we use OF display program which
is slow and creates some flickering.
The logo extraction/placement code was tested with resolution 240x320 and I
guessed some reasonable values for 240x400, but those will probably need some
tweaking.

Change-Id: I0319be902d21a7d33c1dee0fffdb4797065dbf8a
</pre>
</div>
</content>
</entry>
<entry>
<title>nwztool/scsitools: cleanup and add destination changer tool</title>
<updated>2016-11-11T15:07:14+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-11-11T15:04:15+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=33856d9ceb6df817c4f40f42bfcf9ee9fa188848'/>
<id>33856d9ceb6df817c4f40f42bfcf9ee9fa188848</id>
<content type='text'>
Now that we have a nice database of player index, the scsitool becomes more
useful and supports a lot more players. I did some general cleanup of the code,
though eventually it would be nice to really split it into a library and a CLI.
The SCSI vendor command allow to read but also write most NVP nodes. Since there
seems to a demand to change destination and sound pressure settings on device,
I implement this feature in the tool. I do not plan to allow arbitrary NVP
writes because this could easily brick the device. Changing the destination
should be safe, but as usual, use at your own risks.

Change-Id: Iff4e8cc3ac97b965c1df849051c5fd373756cda5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have a nice database of player index, the scsitool becomes more
useful and supports a lot more players. I did some general cleanup of the code,
though eventually it would be nice to really split it into a library and a CLI.
The SCSI vendor command allow to read but also write most NVP nodes. Since there
seems to a demand to change destination and sound pressure settings on device,
I implement this feature in the tool. I do not plan to allow arbitrary NVP
writes because this could easily brick the device. Changing the destination
should be safe, but as usual, use at your own risks.

Change-Id: Iff4e8cc3ac97b965c1df849051c5fd373756cda5
</pre>
</div>
</content>
</entry>
<entry>
<title>nwztools/plattools: use player database and rework stuff</title>
<updated>2016-11-11T15:07:14+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-11-11T15:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c95e30b75d75b674f0d645b7c41377bbd0511213'/>
<id>c95e30b75d75b674f0d645b7c41377bbd0511213</id>
<content type='text'>
Using the database, we can now safely read/write the NVP. I also add more
support for Sony's "display" tool.

Change-Id: I8439fe9bad391c7f29859d99f236781be7983625
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the database, we can now safely read/write the NVP. I also add more
support for Sony's "display" tool.

Change-Id: I8439fe9bad391c7f29859d99f236781be7983625
</pre>
</div>
</content>
</entry>
<entry>
<title>nwztools/database: add database of information on Sony NWZ linux players</title>
<updated>2016-11-11T15:07:14+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-11-11T14:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=44bb2856a59be53ef5ede154a39c54a59b1cc6d0'/>
<id>44bb2856a59be53ef5ede154a39c54a59b1cc6d0</id>
<content type='text'>
There must be an evil genius in Sony's Walkman division. Someone who made sure
that each model is close enough to the previous one so that little code is needed
but different enough so that an educated guess is not enough.

Each linux-based Sony player has a model ID (mid) which is a 32-bit integer.
I was able to extract a list of all model IDs and the correspoding name of
the player (see README). This gives us 1) a nice list of all players (because
NWZ-A729 vs NWZ-A729B, really Sony?) 2) an easy way to find the name of player
programatically. It seems that the lower 8-bit of the model ID gives the storage
size but don't bet your life on it. The remaining bytes seem to follow some kind
of pattern but there are exceptions.

From this list, I was able to build a list of all Sony's series (up to quite
recent one). The only safe way to build that is by hand, with a list of series,
each series having a list of model IDs. The notion of series is very important
because all models in a series share the same firmware.

A very important concept on Sony's players is the NVP, an area of the flash
that stores data associated with keys. The README contains more information but
basically this is where is record the model ID, the destination, the boot flags,
the firmware upgrade flags, the boot image, the DRM keys, and a lot of other stuff.
Of course Sony decided to slightly tweak the index of the keys regularly over time
which means that each series has a potentially different map, and we need this map
to talk to the NVP driver. Fortunately, Sony distributes the kernel for all its
players and they contain a kernel header with this information. I wrote a script
to unpack kernel sources and parse this header, producing a bunch of nw-*.txt
files, included in this commit. This map is very specific though: it maps Sony's
3-letter names (bti) to indexes (1). This is not very useful without the
decription (bti = boot image) and its size (262144). This information is harder
to come by, and is only stored in one place: if icx_nvp_emmc.ko drivers, found
on the device. Fortunately, Sony distributes a number of firmware upgrade, that
contain the rootfs, than once extracted contain this driver. The driver is a
standard ELF files with symbols. I wrote a parsing tool (nvptool) that is able
to extract this information from the drivers. Using that, I produced a bunch
of nodes-nw*.txt files. A reasonable assumption is that nodes meaning and
size do not change over time (bti is always the boot image and is always
262144 bytes), so by merging a few of those file, we can get a complete picture
(note that some nodes that existed in older player do not exists anymore so
we really need to merge several ones from different generations).

The advantage of storing all this information in plain text files, is that it
now makes it easy to parse it and produce whatever format we want to use it.
I wrote a python script that parses all this mess and produces a C file and
header with all this information (nwz_db.{c,h}).

Change-Id: Id790581ddd527d64418fe9e4e4df8e0546117b80
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There must be an evil genius in Sony's Walkman division. Someone who made sure
that each model is close enough to the previous one so that little code is needed
but different enough so that an educated guess is not enough.

Each linux-based Sony player has a model ID (mid) which is a 32-bit integer.
I was able to extract a list of all model IDs and the correspoding name of
the player (see README). This gives us 1) a nice list of all players (because
NWZ-A729 vs NWZ-A729B, really Sony?) 2) an easy way to find the name of player
programatically. It seems that the lower 8-bit of the model ID gives the storage
size but don't bet your life on it. The remaining bytes seem to follow some kind
of pattern but there are exceptions.

From this list, I was able to build a list of all Sony's series (up to quite
recent one). The only safe way to build that is by hand, with a list of series,
each series having a list of model IDs. The notion of series is very important
because all models in a series share the same firmware.

A very important concept on Sony's players is the NVP, an area of the flash
that stores data associated with keys. The README contains more information but
basically this is where is record the model ID, the destination, the boot flags,
the firmware upgrade flags, the boot image, the DRM keys, and a lot of other stuff.
Of course Sony decided to slightly tweak the index of the keys regularly over time
which means that each series has a potentially different map, and we need this map
to talk to the NVP driver. Fortunately, Sony distributes the kernel for all its
players and they contain a kernel header with this information. I wrote a script
to unpack kernel sources and parse this header, producing a bunch of nw-*.txt
files, included in this commit. This map is very specific though: it maps Sony's
3-letter names (bti) to indexes (1). This is not very useful without the
decription (bti = boot image) and its size (262144). This information is harder
to come by, and is only stored in one place: if icx_nvp_emmc.ko drivers, found
on the device. Fortunately, Sony distributes a number of firmware upgrade, that
contain the rootfs, than once extracted contain this driver. The driver is a
standard ELF files with symbols. I wrote a parsing tool (nvptool) that is able
to extract this information from the drivers. Using that, I produced a bunch
of nodes-nw*.txt files. A reasonable assumption is that nodes meaning and
size do not change over time (bti is always the boot image and is always
262144 bytes), so by merging a few of those file, we can get a complete picture
(note that some nodes that existed in older player do not exists anymore so
we really need to merge several ones from different generations).

The advantage of storing all this information in plain text files, is that it
now makes it easy to parse it and produce whatever format we want to use it.
I wrote a python script that parses all this mess and produces a C file and
header with all this information (nwz_db.{c,h}).

Change-Id: Id790581ddd527d64418fe9e4e4df8e0546117b80
</pre>
</div>
</content>
</entry>
<entry>
<title>nwztools/upgtools: cleanup</title>
<updated>2016-11-11T15:07:14+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2016-11-11T14:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=19de536ce2f3c8066ca5be9b570f72e5c1e88342'/>
<id>19de536ce2f3c8066ca5be9b570f72e5c1e88342</id>
<content type='text'>
There is no need to store the key and sig since those are derived from the KAS
anyway.

Change-Id: I228913b1cb32e496db265e9a7aaf3bb4200a9f6b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to store the key and sig since those are derived from the KAS
anyway.

Change-Id: I228913b1cb32e496db265e9a7aaf3bb4200a9f6b
</pre>
</div>
</content>
</entry>
<entry>
<title>ATJ hwstub make irq based usb driver work</title>
<updated>2016-11-10T12:57:02+00:00</updated>
<author>
<name>Marcin Bukat</name>
<email>marcin.bukat@gmail.com</email>
</author>
<published>2016-11-10T11:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=ba9f405dc47c1ec24327537b77a61c886ad13f34'/>
<id>ba9f405dc47c1ec24327537b77a61c886ad13f34</id>
<content type='text'>
0e2b490 introduced rework of usb driver which was broken. It was reverted
in f2da975 to restore hwstub functionality on ATJ.

This commit reenables usb rework AND fixes remining issues.
The problem was with 0 length OUT thransfers. Additionally
a few cleanups were made.

Change-Id: I529ea9ad6540509e9287ca7e1cd2b44369b03cbb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
0e2b490 introduced rework of usb driver which was broken. It was reverted
in f2da975 to restore hwstub functionality on ATJ.

This commit reenables usb rework AND fixes remining issues.
The problem was with 0 length OUT thransfers. Additionally
a few cleanups were made.

Change-Id: I529ea9ad6540509e9287ca7e1cd2b44369b03cbb
</pre>
</div>
</content>
</entry>
</feed>
