Only tested on ipod 5g (as that is all I have). Could someone with a Gigabeat confirm that pacbox still runs but now has a working Audio Playback menu? Also could someone with any other device confirm that pacbox still works for them?

This is cool though the ultimate plan is to do playback decoding on COP to leave the CPU available for foreground tasks. This would probably keep the SPC codec from operating with the COP trying to run two emulators at once.

At jhMikeS's suggestion, adding cache flush and cachealign_attr code. Probably, it would have been better to use a separate (cachealigned) section for data that needs to be local to cop only rather than sprinkling CACHEALIGN_ATTR thru the codebase.

The section idea for writeable data is one I've been thinking about for awhile and would be preferrable as the general one. I'm not sure how to pull it off in a scalable way (need to read up on the linker script syntax myself). Can we ensure that its size is 0 if nothing is allocated there?

Add to the list any I forgot for sections the COP should have to iself (in core, plugins, and codecs):
.bss
.data

Of course the same sections must be aligned for CPU so that adjacent and shared .rodata and such don't play ping-pong.

I think 16 bytes is actually the correct value as well but I played cautious for the moment.

BTW, threads can also switch cores. An implementation that flip-flops the main thread from CPU<=>COP would be a nice test of that capability.

EDIT to clarify: you could switch the main thread to the COP when it's running emulation and switch back to CPU when leaving the emulation to display menus or whatever. Just use switch_core(int core_num)

For the framebuffer CACHEALIGN_AT_LEAST(16) is preferrable since that automatically selects the greater of the alignments.
For the cache functions, CACHE_FUNCTION_WRAPPERS(rb) allows use without the "rb->" and allows for the case where cache maintenence APIs are inlines instead of calls.

I realise that this hasn't been sync'd in a while, but a big part of that reason is that putting pacbox emulation on COP no longer interacts nicely with having mp3 parallelised decoder on cpu/cop , which was added to svn at some point after the last update above. I'll try and figure out a clean solution at some point (maybe just as simple as improve the pacbox emulation so it doesn't need so much juice)