This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6567 - Rockboy Work (H10, X5, Nano)
Attached to Project:
Rockbox
Opened by Tom Ross (midgey34) - Wednesday, 24 January 2007, 07:07 GMT+2
Last edited by Tom Ross (midgey34) - Wednesday, 24 January 2007, 07:20 GMT+2
Opened by Tom Ross (midgey34) - Wednesday, 24 January 2007, 07:07 GMT+2
Last edited by Tom Ross (midgey34) - Wednesday, 24 January 2007, 07:20 GMT+2
|
DetailsRecently, I began looking at the Rockboy code in an attempt to get it running on more targets. After a few days work, here's the result. Rockboy should now work on the Nano, X5, and H10 (all models). The keymappings may be a little rough but should work. Please comment back with suggestions and if I broke anything :)
PS: H10 5/6GB owners, I'm aware that there is a blank line on the right side of the screen; I'm not sure if anything can be done about that. |
This task depends upon
Closed by Tom Ross (midgey34)
Tuesday, 06 February 2007, 22:42 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed to SVN
Tuesday, 06 February 2007, 22:42 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed to SVN
1. Make sure /.rockbox/rockboy/ doesn't exist
2. Load a GB rom
3. Go to the menu->options->screen options and change it to "Scaled - Maintain Ratio"
4. Back out of the menu
5. Get a splash about invalid opcode... (it's too quick to see properly)
Unfortunately, I am still experiencing the problem I mentioned previously. I've done some further investigation and found that it is not related to the presence of the options file after all (I can cause the crash both when the file is present and not present). Rather, I now think that it only happens the first time Rockboy is run after powering my H10 on. Steps to reproduce are:
1. Power on H10
2. Load gb rom
3. Enter options menu and change an option
4. Back out of menu
5. Get a splash saying "invalid opcode 0x1FDE274 at address 0x0924, rombank = 33106944"
6. Plugin exits
If try to load the same rom again, everything works perfectly and I am unable to cause the crash. I can only cause the crash again by powering off and back on again. I also tested with a different ROM and get the exact same symptoms and error message, including the exact same numbers.
I've tried to reproduce this problem on my Sansa and in the H10 simulator, but I haven't managed to do so yet. I can cause the crash 100% of the time on my actual H10 though.
I've included my rockboy.map file here in case it is of any help. I've tracked the error message down to the cpu_emulate function in cpu.c. It's clear from that that the opcode is very very wrong. Also notice that errormsg is at 0x1FDE274 according to rockboy.map. Not sure how much help that is.
My guess is that somehow the PC is getting moved to an invalid address when exiting the menu, but for some reason only the first time Rockboy is run after powering on. Could there be an uninitialized variable somewhere? It's just a guess though.
!) Supports changing palettes for Game Boy ROMS. Presets only and you can't save a specific palette per ROM yet.
2) Change all tabs to space.
3) Remove a bunch of unused code, variables, and garbage.
4) Minor reshuffling of IRAM (No idea whether this causes the emu to speed up or slow down, I think its slightly faster).
Let me know if I broke anything. The bulk of the patch is the whitespace changes. Still no word on the H10 bug.
PS: For people not following along the bug doesn't occur on the Nano or X5. So far it's only the H10 20GB, no word on the 5/6 GB.
Also added some of the changes found in the short-lived gnuboy CVS.
A few more whitespace changes.
Change C++ comments to C comments.
On my test roms, this version seems just barely (1 or 2 fps) faster than SVN.
(SUBDIRS change is included)
make[3]: *** No rule to make target `palette-presets.h', needed by `/home/user/rockbox-20070131/h10-build/apps/plugins/rockboy/lcd.o'. Stop.
make[2]: *** [rockboy] Error 2
2) Let's not write and read sound when sound is off.
3) Include some changes found in WAC gnuboy CE
4) Include sound fixes from the old gnuboy CVS that I forgot in last patch
5) Clean up dynarec code to make it resemble the rest of the rockboy code
6) Completely remove all remaining C++ style comments
7) Have each opcode in dynarec write debugging info
8) Add FIXMEs to all unimplemented opcodes
9) Add in a few unimplemented opcodes (although my work is probably wrong)
Hopefully the cleaned up dynarec.c inspires someone to pick up work on dynarec. Rockboy with sound is slightly faster than before and with sound disabled I'm getting about a 5-10% speed up (especially when few sprites are on screen and there isn't much motion).
For Coldfire targets (iriver H100, H300 and iAudio X5) the framework of dynarec is already in place and I cleaned it up a lot. Currently, it will disassemble the rom and write the disassembly to a file. It is missing about 130 opcodes out of the 256 possible operations. Much of this code is repeated so its less code than it sounds.
Unfortunately, the dynarec code seems way over my head and I am probably not the best person to work on it. Someone like jhMikeS, preglow, or amiconn would probably much more comfortable considering how familiar they are with m68k asm. I have tried to implement a few more opcodes but I may be writing them wrong. This dynarec code won't be useful for any PortalPlayer targets.
The error is with ../plugins/rockboy/loader.o
hope this will be of some help!