What's new

Porting Mupen64Plus to Android

OP
paulscode

paulscode

New member
I've got the dynarec working in a JNI project finally. Since I based the project initially off of CPasjuste's project, it is Mupen64Plus 1.5. I'm honestly not sure what I changed to make it work, but one thing I did was to plug it into the latest version of Pelya's SDL port, so who knows if that might have done something. I tend to be good at the "screw around with it until it works" approach to programming ;D. Anyway, my next step is to try and get it working in version 1.99.4.
 
OP
paulscode

paulscode

New member
Since I've been getting quite a few messages asking about my progress on this project, here's a quick update. I've got Ari64's dynarec working for Mupen64Plus 1.99.4 in JNI (meaning it runs my phone without crashing -- I still need to run tests on other devices). I'm putting together some test APKs (with a couple variations of the dynarec). I'll be posting them (and the sourcecode) hopefully in the next couple of days for folks who have Android devices to run.
 
OP
paulscode

paulscode

New member
Yeh, saw that Youngzh had released some sourcecode a couple days ago, and I spent some time digging around in it to see if I could find anything useful for my project. Ultimately, it's really not that useful to me. His project is partially closed-source, and I already have all the components that he has posted. I'm mainly just going to use it for comparison purposes and practice debugging.

Anyway, quick progress update: I'm trying to see if I can get one of the GLES video plug-ins to work without too much effort. I'll be posting the working app and sourcecode in a couple hours (with or without a video plug-in, depending), plus two other apps designed to gather compatibility/ debug data.
 
Last edited:
OP
paulscode

paulscode

New member
The video plug-ins weren't quite plug-and-play, so I've decided to leave video out for now. The glide64 plug-in doesn't compile (port to GLES is incomplete), and the gles2n64 plug-in shuts down stating that a functionality is missing. I'll work on debugging these as well as the audio plug-in next. In the mean time, here are links to the test APKs. Note that test C is the only one that works on my phone; tests A and B may work on other devices, but are mainly for gathering debug information to help me with development:

--Links Removed--

NOTE: All of these first three tests require a device with ARM7a and minimum Android version 2.2. Sorry to the folks with older devices. I'll be posting more compatible tests hopefully later this week. Also note that there is no video plug-in and the audio plug-in is broken, so "working" means the app doesn't crash.

NOTE 2: These apps do not have a "shutdown" functionality built into them yet, so if they work on your device, you'll have to either force close the app or reboot your device to shut the dynarec down. Please be sure to do this after running each test.

The test aps will automatically download the Mupen64Plus configs and data files, as well as a rom the first time you run one of them. If your device doesn't have an internet connection, or if you have a data limit, you can manually install this data BEFORE running any of the tests. Simply unzip the following file and place all the contents onto your device's SD card under
/app-data/paulscode.android.mupen64plus/
App Data ZIP (not necessary if your device has internet access)

Testers, please note that you must uninstall each test app before installing another one. Debug files will be generated on your device's SD card under app-data/paulscode.android.mupen64plus/DEBUG_test*.txt. Please also provide logcat output in addition to the DEBUG_test*.txt files. You can use the free app "aLogcat" from the Android Market to get the logcat output. Just run aLogcat, press the menu button and choose "Clear". Then run one of the test APKs above, return to aLogcat, and choose "Save" from the menu. Be sure to clear the logcat output between tests. You can email me the logcat output and debug files to [email protected]. Be sure to include your device model, Android version, and whether or not your device is rooted in the email. Also describe any odd behavior you might have experienced when running the test.

And here is the sourcode for the above test apps. I haven't had time to streamline the project yet, so I apologize for all the extra garbage included.

--Links Removed--
 
Last edited:

Ari64

New member
Test A (my core, optimized dynarec, not working)
This appears to contain the dynarec from 2010-10-26. It is lacking the changes to the memory layout which are needed for android, so I would not expect it to work. If you want an optimized dynarec, then use the latest version.

Test B (Youngzh's core, not working)
Yongzh's source contained 1.99.4 with the dynarec from 2011-01-28. It had a bunch of SDL stuff removed, and some changes to the plugin protocol. It looks like you reverted some of the plugin stuff. I don't know why you're bothering with this. However, it does appear to have the dynarec configured correctly, albeit an old version.

Test C (gTan64's core, working)
If this is working, then I'm not sure how. rdram is declared in memory.c, but I don't see RAM_OFFSET defined anywhere.
 
OP
paulscode

paulscode

New member
This appears to contain the dynarec from 2010-10-26. It is lacking the changes to the memory layout which are needed for android, so I would not expect it to work. If you want an optimized dynarec, then use the latest version.
By "optimized" I meant using the method of allocating the BASE_ADDR target in .bss rather than the trampoline method. This version of the dynarec "works" (doesn't crash) when built into a command-line binary, and also works when plugged into MP64P 1.5 in a JNI project. I expected this test to be broken, because I haven't yet been able to get that version of the dynarec to function in MP64P 1.99.4. The purpose of the test was to see if it was only broken on my device, and to see if I could get anything useful from the logcat, memory maping, and debug output that folks sent me.

BTW I don't think i mentioned this here (I've been mainly discussing the project on my own website), but there are two more tests in the works, utilizing the latest version of your dynarec (which does "work" on my phone). However, the memory layout changes you refer to are the trampoline stuff you added, right? (correct me if there were other changes that I missed). I expect that the dynarec would run faster without the trampolines, hence Test A. Comparing the code again, though, I'm thinking the problem I'm having is with the RDRAM parts anyway, which now come to think of it is probably what you are talking about :)

Yongzh's source contained 1.99.4 with the dynarec from 2011-01-28. It had a bunch of SDL stuff removed, and some changes to the plugin protocol. It looks like you reverted some of the plugin stuff. I don't know why you're bothering with this. However, it does appear to have the dynarec configured correctly, albeit an old version.
Main reason is to have more than one working core, so I'll have multiple working versions for reference when something breaks. Its not to reinvent the wheel, but rather to compare how other folks have done it. Youngzh's project is not going to be the basis for my version of the core, so it is just for reference (and debugging practice). (UPDATE) I actually just figured out what was causing the crash with this version, and I have it "working" on my phone now.

If this is working, then I'm not sure how. rdram is declared in memory.c, but I don't see RAM_OFFSET defined anywhere.
I should have quantified my statement by saying "it doesn't crash", rather than "it is working". The test results that folks have been sending me also verify it doesn't crash on several other devices as well. I actually just acquired this version recently, so I haven't had time to look into the dynarec and memory parts very closely. Since it has neither a working audio or video plug-in I'll concede that it is likely not working.. I see exactly what you are talking about.. maybe its just a random configuration thats allowing it to run without crashing.. who knows?? Anyway I'll fix this.
 
Last edited:
OP
paulscode

paulscode

New member
As promised, here is the app that utilizes the latest version of Ari64's dynarec (the June15 version, I think that's the most up-to-date):

--Link Removed--

And the sourcecode:

--Link Removed--

As with the earlier tests, this one requires a device with ARM7a and minimum Android version 2.2. The last upcoming test will be compiled for ARM5 and minimum Android version 1.6. I haven't decided if I'll work on it next, or if I'll debug the audio and video plug-ins first.
 
Last edited:

Ari64

New member
By "optimized" I meant using the method of allocating the BASE_ADDR target in .bss rather than the trampoline method. This version of the dynarec "works" (doesn't crash) when built into a command-line binary, and also works when plugged into MP64P 1.5 in a JNI project. I expected this test to be broken, because I haven't yet been able to get that version of the dynarec to function in MP64P 1.99.4. The purpose of the test was to see if it was only broken on my device, and to see if I could get anything useful from the logcat, memory maping, and debug output that folks sent me.

BTW I don't think i mentioned this here (I've been mainly discussing the project on my own website), but there are two more tests in the works, utilizing the latest version of your dynarec (which does "work" on my phone). However, the memory layout changes you refer to are the trampoline stuff you added, right? (correct me if there were other changes that I missed). I expect that the dynarec would run faster without the trampolines, hence Test A. Comparing the code again, though, I'm thinking the problem I'm having is with the RDRAM parts anyway, which now come to think of it is probably what you are talking about :)
Keeping everything within 32M does result in a small speedup due to the way branch instructions work on ARM. If the branch is farther than 32M, the dynarec generates a branch to a ldr [pc, #x], pc instruction, and these extra instructions take up a bit of CPU time (about 1% in my tests). This is handled by genjmp(addr) in assem_arm.c. If you're unsure if this is happening, then I suppose you could add some debugging code to that function to make sure it's outputting what you want.

If you want to optimize as much as possible, use armv7-a instruction set, enable VFP (with -mfpu=vfp -mfloat-abi=softfp) and don't set using_tlb for games that don't need it (yongzh did this for some reason, probably because he copied one of the old patchsets posted here). 20110615 has some fixes to the register allocation which speed things up a bit, so you'll want to use that version.

A few of the larger games (and Majora's Mask in particular) use a lot of memory and some parts will be recompiled frequently if you use a 16M cache. For these games it can be advantageous to increase the dynarec cache size, even if it puts you slightly beyond the 32M branch limit. You can experiment with that after you get audio and video working.

The one optimization that you won't get away with on Android is mapping the ram at 0x80000000 and avoiding RAM_OFFSET. ZodTTD tried it with pcsx-rearmed, and got a lot of complaints about it not working. This is what I meant about the memory layout. The 20101026 version did not handle this properly, so it won't work for you.

I should have quantified my statement by saying "it doesn't crash", rather than "it is working". The test results that folks have been sending me also verify it doesn't crash on several other devices as well. I actually just acquired this version recently, so I haven't had time to look into the dynarec and memory parts very closely. Since it has neither a working audio or video plug-in I'll concede that it is likely not working.. I see exactly what you are talking about.. maybe its just a random configuration thats allowing it to run without crashing.. who knows?? Anyway I'll fix this.

The N64 bootcode performs a checksum, and enters an infinite loop if the checksum fails. It's probably failing the checksum due to the RAM being mapped incorrectly.

You can tell if this happened because the debug log will be very short, as nothing beyond the bootloader will be compiled.
 
OP
paulscode

paulscode

New member
The N64 bootcode performs a checksum, and enters an infinite loop if the checksum fails. It's probably failing the checksum due to the RAM being mapped incorrectly.

You can tell if this happened because the debug log will be very short, as nothing beyond the bootloader will be compiled.
How big would I expect a very short debug log to be? I am generating debug log files that are around 30-40MB in size for both of the tests I marked as "working", after I let them run for a few seconds. But I'm not sure if that is small compared to what they would be if the dynarec were actually working. Probably the best thing is to just get an audio or video plug-in to work, and that will make it much easier to know if it is working or not.
 
Last edited:

Ari64

New member
In the debug log, it prints a "NOTCOMPILED" line before each block it compiles. If you run Super Mario 64, it will compile about 500 blocks by the time it gets to "It's a-me, Mario!" Mario's head is about 1100, and the part where Mario grabs Bowser by the tail is around 2000. Also, it will enable the TLB after "It's a-me..." If it gets that far, then it's probably working.
 
OP
paulscode

paulscode

New member
Thanks for the help. It is printing NOTCOMPILED before each block, but I'll need to rewrite the way I'm logging the messages, because the way I'm doing it now with open/closing the file each print would take a really long time for it to reach 500 blocks. I recall a while back intending to leave the file open and just write to it, but I must have forgot to come back to fix that part (probably since it was crashing before very much logging was taking place, and I wasn't sure how safe it would be to not close the file, which happens if the app crashes). I'll need to map a button to safely shut down the app (come to think of it, I probably should have done that already :D). Either way, I'm pretty sure it is getting that far when I turn logging off, because I've let it run for several minutes. It will still be good to verify that with a log, though.

As for debugging the audio plug-in, I should probably first determine if the issue is with the linkage to SDL, or if it is just not receiving any data to play in the first place. I'll have to look at the code to see where I can inject some artificial data for it to try playing.
 
OP
paulscode

paulscode

New member
Hello all, here is the last test app in my core test series. This one is compiled for ARM5 and should be compatible back to Android 1.6. This is the same core as in Test D, plus a couple changes in the jni/core/Android.mk file:
Code:
LOCAL_CFLAGS += -DARMv5_ONLY
#LOCAL_CFLAGS += -mfpu=vfp -mfloat-abi=softfp

And in the jni/Settings.mk file:
Code:
APP_ABI := armeabi
TARGET_CPU_ABI	:= armeabi
#APP_ABI			:= armeabi-v7a
#TARGET_CPU_ABI	:= armeabi-v7a

--Link Removed--

As with the previous tests, I'm measuring "success" as the app enters into a black screen and does not crash. Be sure to either restart your device after running the test, or force-close the app, or it will continue running in the background slowing down your device.

I haven't posted the full project source for this one yet, because I fully expect I'll need to fix a few initial bugs in the Java code, XML manifest, or project settings. It runs fine on my phone, but I don't have an older device myself, and my netbook is too slow to emulate an AVD to test it on (an emulator running within an emulator - now theres a fun thought). I'm mainly interested in getting ahold of some logcat outputs from older devices which do not have SDCards. This should help me identify where any problems are located.
 
Last edited:
OP
paulscode

paulscode

New member
After fixing the debug output code, I've discovered that the core is in fact not working, even though the app itself does not crash. It does 515 "NOTCOMPILED" blocks before stopping with the following output:
Compile at bogus memory address: 80800000

I'm not intelligent enough to understand the debug output, but I did notice a pattern where starting at the third NOTCOMPILED block, the address for each subsequent NOTCOMPILED block starts exactly 0x4000 after the previous one, until the bogus address of 80800000 is reached. Some of the NOTCOMPILED lines for reference:
Code:
NOTCOMPILED: addr = a4000040 -> 883b8000
NOTCOMPILED: addr = a4000778 -> 883baca0
NOTCOMPILED: addr = 80000000 -> 883be610
NOTCOMPILED: addr = 80004000 -> 883be668
NOTCOMPILED: addr = 80008000 -> 883be6b0
...
NOTCOMPILED: addr = 807f4000 -> 883c7548
NOTCOMPILED: addr = 807f8000 -> 883c7590
NOTCOMPILED: addr = 807fc000 -> 883c75d8
NOTCOMPILED: addr = 80800000 -> 883c7620

Here's a link to the full debug output (compressed, because it was quite huge):
DUBUG_testD_dynarec.7z

Ari64, I'm hoping maybe this is something you've seen before and might be able to give me some pointers about what could potentially cause this type of behavior. One thing I haven't checked yet is if the ROM itself is corrupt, so I'll test that and try some different ROMs as well. I'll post the results after I finish testing that.

I did change the dynarec a tad to allocate the 32MB for BASE_ADDR in the .bss section, but that shouldn't have affected anything. The behavior is the same if I leave BASE_ADDR allocated at 0x6000000 the way you had it originally (still get 515 compiled blocks before the bogus address 80800000).

For reference, the changes I made to your code (in case I did something stupid):

linkage_arm.S:
Code:
	.file	"linkage_arm.S"
/*	.global	rdram
rdram = 0x80000000 */
	.global extra_memory
	.global	dynarec_local

...

	.bss
	.align	12
	.type	extra_memory, %object
	.size	extra_memory, 33554432
extra_memory:
	.space	33554432+64+16+16+8+8+8+8+256+8+8+128+128+128+16+8+132+4+256+512+4194304
dynarec_local = extra_memory + 33554432
	.type	dynarec_local, %object
	.size	dynarec_local, 64

assem_arm.h:
Code:
#define RAM_OFFSET 1
extern char extra_memory[33554432];

//#define BASE_ADDR 0x6000000 // Code generator target address
#define BASE_ADDR ((int)(&extra_memory))
//#define TARGET_SIZE_2 24 // 2^24 = 16 megabytes
#define TARGET_SIZE_2 25 // 2^25 = 32 megabytes

Let me post the memory mappings for reference:
Code:
DYNAMIC SYMBOL TABLE:
03ebc460 g    DO .bss	0000a000 insn
023b8188 g    DO .bss	00000008 lo
027b9000 g    DO .bss	00000001 isGoldeneyeRom
000aa500 g    DO .bss	00000004 rom_size
023b8320 g    DO .bss	00000004 branch_target
000aa49c g    DO .bss	00000004 g_CoreConfig
003b7ac4 g    DO .bss	00000004 no_compiled_jump
023b8328 g    DO .bss	00000084 fake_pc
03ebc428 g    DO .bss	00000004 next_vi
027b9960 g    DO .bss	00040000 readmemd
023b8060 g    DO .bss	00000008 readmem_dword
023b8324 g    DO .bss	00000004 PC
027f9960 g    DO .bss	00040000 readmemh
03ebc434 g    DO .bss	00000004 fast_memory
039bbc70 g    DO .bss	00000004 jump_target
039bbc74 g    DO .bss	00000004 local_rt32
03ec6460 g    DO .bss	00004000 jump_in
02839960 g    DO .bss	00000034 sp_register
039bbc78 g    DO .bss	00000008 local_rs
03eca460 g    DO .bss	00004000 ccadj
03ece460 g    DO .bss	00000004 is_delayslot
039bbc80 g    DO .bss	00000004 actual
03ece464 g    DO .bss	00000004 linkcount
003b8000 g    DO .bss	02000000 extra_memory
03ece468 g    DO .bss	00001000 ooo
03ecf468 g    DO .bss	00004000 instr_addr
044b48b4 g    DO .bss	00000004 previousPC
039bbc84 g    DO .bss	00000680 tlb_e
039bc304 g    DO .bss	00000004 rompause
03ed3468 g    DO .bss	00000004 start
02839994 g    DO .bss	00040000 writememb
03ed346c g    DO .bss	00001000 rs2
023b8190 g    DO .bss	00000080 reg_cop0
03ed446c g    DO .bss	00001000 rt2
02879994 g    DO .bss	00000040 PIF_RAM
03ed546c g    DO .bss	00001000 bt
03ed646c g    DO .bss	00000004 using_tlb
003b7ae4 g    DO .bss	00000004 vi_counter
003b7b10 g    DO .bss	00000004 g_NumBreakpoints
027b9004 g    DO .bss	00000004 ROM_HEADER
03ed6470 g    DO .bss	00008000 branch_unneeded_reg_upper
03ede470 g    DO .bss	00008000 requires_32bit
000aa4fc g    DO .bss	00000004 rom
03ee6470 g    DO .bss	00008000 p32
03eee470 g    DO .bss	00000400 needs_clear_cache
023b8180 g    DO .bss	00000008 hi
03eee870 g    DO .bss	00001000 likely
03eef870 g    DO .bss	00001000 itype
03ef0870 g    DO .bss	00004000 jump_out
03ef4870 g    DO .bss	00001000 us2
023b8044 g    DO .bss	00000004 cycle_count
03ef5870 g    DO .bss	00001000 opcode2
027b9008 g    DO .bss	00000808 g_romdatabase
03ebc438 g    DO .bss	00000004 inst_pointer
023b8074 g    DO .bss	00000002 hword
023b83b0 g    DO .bss	00000100 mini_ht
039bbc40 g    DO .bss	00000030 Controls
023b805c g    DO .bss	00000004 address
03ef6870 g    DO .bss	00001000 lt1
039bc308 g    DO .bss	00000004 llbit
023b8040 g    DO .bss	00000004 next_interupt
039bc30c g    DO .bss	00000004 CIC_Chip
03ef7870 g    DO .bss	00060000 stubs
028799d4 g    DO .bss	0000003c vi_register
039bc310 g    DO .bss	00000100 reg_cop1_fgr_64
039bc410 g    DO .bss	00000004 local_rs32
02879a10 g    DO .bss	00000028 ai_register
03f57870 g    DO .bss	00004000 ba
02879a38 g    DO .bss	00000004 rdword
044b48c4 g    DO .bss	00000600 g_Breakpoints
03ebc43c g    DO .bss	00000004 return_address
03f5b870 g    DO .bss	00008000 branch_unneeded_reg
000aa4ac g    DO .bss	00000004 g_TakeScreenshot
02879a3c g    DO .bss	00000030 dpc_register
03f63870 g    DO .bss	00000004 literalcount
003b7b00 g    DO .bss	00000004 tracedebug
03f63874 g    DO .bss	00004000 wont_dirty
023b83ac g    DO .bss	00000004 ram_offset
023b8310 g    DO .bss	00000010 rounding_modes
03f67878 g    DO .bss	00068000 constmap
03fcf878 g    DO .bss	00008000 unneeded_reg
03fd7878 g    DO .bss	00004000 needed_reg
039bc414 g    DO .bss	00400000 blocks
023b8000 g    DO .bss	00000040 dynarec_local
03fdb878 g    DO .bss	00001000 us1
023b8050 g    DO .bss	00000004 pcaddr
03ebc42c g    DO .bss	00000004 interp_addr
02879a6c g    DO .bss	00040000 readmemb
03fdc878 g    DO .bss	00001000 is_ds
03fdd878 g    DO .bss	00000004 stop_after_jal
028b9a6c g    DO .bss	00000028 rdram_register
03ebc440 g    DO .bss	00000004 max_code_length
028b9a94 g    DO .bss	00000010 si_register
044b48b8 g    DO .bss	00000004 debugger_done_cond
03ebc444 g    DO .bss	00000004 dst_block
028b9aa4 g    DO .bss	00040000 writememd
023b8058 g    DO .bss	00000004 invc_ptr
03fdd87c g    DO .bss	00001000 dep1
023b86b0 g    DO .bss	00400000 memory_map
003b7b0c g    DO .bss	00000004 g_DebuggerActive
003b7ae0 g    DO .bss	00000004 vi_field
03ebc448 g    DO .bss	00000004 code_length
023b8076 g    DO .bss	00000001 byte
000aa4a4 g    DO .bss	00000004 g_MemHasBeenBSwapped
028f9aa4 g    DO .bss	00040000 writememh
03ebc44c g    DO .bss	00000004 src
03fde87c g    DO .bss	00000004 pagelimit
023b8078 g    DO .bss	00000004 FCR0
03dbc414 g    DO .bss	00000004 jump_to_address
044b48bc g    DO .bss	00000004 run
03fde880 g    DO .bss	0000d000 regmap
03feb880 g    DO .bss	0000d000 regmap_entry
044b48c0 g    DO .bss	00000004 mutex
02939aa4 g    DO .bss	00000034 pi_register
023b8068 g    DO .bss	00000008 dword
023b8210 g    DO .bss	00000080 reg_cop1_simple
003b7afc g    DO .bss	00000004 jump_marker
023b84b0 g    DO .bss	00000200 restore_candidate
03ff8880 g    DO .bss	00008000 unneeded_reg_upper
04000880 g    DO .bss	00000004 slen
03dbc418 g    DO .bss	00000004 last_addr
000aa4a8 g    DO .bss	00000004 g_EmulatorRunning
003b7b04 g    DO .bss	00000004 file
04000884 g    DO .bss	00004000 will_dirty
003b7acc g    DO .bss	00000004 dyna_interp
02939ad8 g    DO .bss	00002000 SP_DMEM
027b9810 g    DO .bss	00000125 ROM_SETTINGS
003b7ad0 g    DO .bss	00000008 debug_count
03ebc430 g    DO .bss	00000004 op
04004884 g    DO .bss	00001000 opcode
0293bad8 g    DO .bss	00000080 outBuffer
04005888 g    DO .bss	000c0000 branch_regs
040c5888 g    DO .bss	00004000 jump_dirty
023b807c g    DO .bss	00000004 FCR31
003b7ac8 g    DO .bss	00000004 skip_jump
031bbc40 g    DO .bss	00400000 tlb_LUT_r
040c9888 g    DO .bss	000c0000 regs
0293bb58 g    DO .bss	00000020 ri_register
023b8290 g    DO .bss	00000080 reg_cop1_double
023b8054 g    DO .bss	00000004 stop
03dbc41c g    DO .bss	00000004 delay_slot
04189890 g    DO .bss	00100000 hash_table
03ebc450 g    DO .bss	00000004 dst
035bbc40 g    DO .bss	00400000 tlb_LUT_w
0293bb78 g    DO .bss	00040000 readmem
04289890 g    DO .bss	00000004 cop1_usable
0297bb78 g    DO .bss	00040000 writemem
000aa90c g    DO .bss	00000004 savestates_job
029bbb78 g    DO .bss	00000001 cpu_byte
04289898 g    DO .bss	00008000 pr32
03dbc420 g    DO .bss	00000008 local_rt
04291898 g    DO .bss	00000004 copy
0429189c g    DO .bss	00001000 dep2
0429289c g    DO .bss	00000004 expirep
029bbb7c g    DO .bss	00000024 MI_register
023b804c g    DO .bss	00000004 pending_exception
042928a0 g    DO .bss	0000c000 link_addr
0429e8a0 g    DO .bss	00004000 imm
042a28a0 g    DO .bss	00001000 rs1
000aa4a0 g    DO .bss	00000004 g_FrameCallback
027b9938 g    DO .bss	00000024 empty_entry
042a38a0 g    DO .bss	00001000 minimum_free_regs
042a48a0 g    DO .bss	0000d000 regmap_pre
023b8070 g    DO .bss	00000004 word
029bbba0 g    DO .bss	00000008 rsp_register
042b18a0 g    DO .bss	00000004 stubcount
042b18a4 g    DO .bss	00000004 source
023b8080 g    DO .bss	00000100 reg
029bbba8 g    DO .bss	00000080 cmdBuffer
003b7b08 g    DO .bss	00000004 notcompiledCount
029bbc28 g    DO .bss	00000010 dps_register
023b8048 g    DO .bss	00000004 last_count
03dbc428 g    DO .bss	00100000 invalid_code
042b18a8 g    DO .bss	00001000 rt1
042b28b0 g    DO .bss	00200000 shadow
027b995c g    DO .bss	00000004 use_flashram
029bbc40 g    DO .bss	00800000 rdram
044b28b0 g    DO .bss	00002000 literals
044b48b0 g    DO .bss	00000004 out

Code:
00008000-00009000 r-xp 00000000 b3:35 16         /system/bin/app_process
00009000-0000a000 rwxp 00001000 b3:35 16         /system/bin/app_process
0000a000-002d8000 rwxp 00000000 00:00 0          [heap]
10000000-10001000 ---p 00000000 00:00 0 
10001000-10100000 rwxp 00000000 00:00 0 
40000000-4000b000 r-xs 00000000 00:04 1224       /dev/ashmem/system_properties (deleted)
4000b000-4000c000 r-xp 00000000 00:00 0 
4000c000-4028d000 rwxp 00000000 00:04 24407      /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
4028d000-41e0c000 ---p 00281000 00:04 24407      /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
41e0c000-41e3b000 r-xs 00000000 b3:35 498        /system/fonts/DroidSans.ttf
41e3b000-41e3d000 r-xs 00013000 b3:35 624        /system/framework/moto-res.apk
41e3d000-41e4c000 rwxp 00000000 00:00 0 
41e4c000-41e82000 rwxp 00000000 00:00 0 
41e82000-41e83000 r-xs 00000000 00:04 24502      /dev/ashmem/SurfaceFlinger read-only heap (deleted)
41e83000-41e84000 r--s 00000000 fe:03 38724      /mnt/asec/paulscode.android.mupen64plus-1/pkg.apk
41e84000-41e87000 rwxp 00000000 00:00 0 
41e87000-41e88000 ---p 00000000 00:04 24409      /dev/ashmem/dalvik-LinearAlloc (deleted)
41e88000-420a7000 rwxp 00001000 00:04 24409      /dev/ashmem/dalvik-LinearAlloc (deleted)
420a7000-42387000 ---p 00220000 00:04 24409      /dev/ashmem/dalvik-LinearAlloc (deleted)
42387000-42396000 r-xs 00000000 b3:35 612        /system/framework/core.jar
42396000-428dd000 r-xp 00000000 b3:35 515        /system/framework/core.odex
428dd000-42922000 rwxp 00000000 00:00 0 
42922000-42923000 r-xs 00000000 b3:35 614        /system/framework/ext.jar
42923000-429bd000 r-xp 00000000 b3:35 517        /system/framework/ext.odex
429bd000-429c0000 r-xs 00000000 b3:35 616        /system/framework/framework.jar
429c0000-4317e000 r-xp 00000000 b3:35 520        /system/framework/framework.odex
4317e000-43213000 rwxp 00000000 00:00 0 
43213000-43214000 r-xs 00000000 b3:35 101        /system/framework/android.policy.jar
43214000-43254000 r-xp 00000000 b3:35 366        /system/framework/android.policy.odex
43254000-43255000 r-xs 00000000 b3:35 638        /system/framework/services.jar
43255000-43406000 r-xp 00000000 b3:35 527        /system/framework/services.odex
43406000-43417000 rwxp 00000000 00:00 0 
43417000-43418000 r-xs 00000000 b3:35 144        /system/framework/com.motorola.android.frameworks.jar
43418000-43451000 r-xp 00000000 b3:35 379        /system/framework/com.motorola.android.frameworks.odex
43451000-43452000 r-xs 00000000 b3:35 599        /system/framework/com.motorola.android.widget.jar
43452000-43461000 r-xp 00000000 b3:35 384        /system/framework/com.motorola.android.widget.odex
43461000-43477000 r-xs 00000000 b3:35 624        /system/framework/moto-res.apk
43477000-434ab000 rwxp 00000000 00:00 0 
434ab000-43628000 r-xs 00000000 b3:35 368        /system/framework/blur-res.apk
43628000-4365a000 r-xs 00137000 b3:35 368        /system/framework/blur-res.apk
4365a000-43660000 rwxp 00000000 00:00 0 
43660000-43661000 rwxs 00000000 00:04 104188     /dev/ashmem/SurfaceFlinger Client control-block (deleted)
43661000-43662000 rwxs 80000010000 00:0c 1165    /dev/pvrsrvkm
43662000-43663000 rwxs 80000012000 00:0c 1165    /dev/pvrsrvkm
43663000-43664000 rwxs 48088000 00:0c 1165       /dev/pvrsrvkm
43664000-43665000 rwxs 80000015000 00:0c 1165    /dev/pvrsrvkm
43665000-43666000 rwxs 80000016000 00:0c 1165    /dev/pvrsrvkm
43666000-43667000 rwxs 80000017000 00:0c 1165    /dev/pvrsrvkm
43667000-43677000 rwxs 80000019000 00:0c 1165    /dev/pvrsrvkm
43677000-43688000 rwxs 8000001a000 00:0c 1165    /dev/pvrsrvkm
43688000-43689000 rwxs 8000001b000 00:0c 1165    /dev/pvrsrvkm
43689000-4368a000 rwxs 8000001c000 00:0c 1165    /dev/pvrsrvkm
4368a000-4368b000 rwxs 8000001d000 00:0c 1165    /dev/pvrsrvkm
4368b000-4368c000 rwxs 8000001e000 00:0c 1165    /dev/pvrsrvkm
4368c000-436ad000 rwxs 80000021000 00:0c 1165    /dev/pvrsrvkm
436ad000-436ae000 rwxs 80000022000 00:0c 1165    /dev/pvrsrvkm
436ae000-436bf000 rwxs 80000023000 00:0c 1165    /dev/pvrsrvkm
436bf000-436c0000 rwxs 80000024000 00:0c 1165    /dev/pvrsrvkm
436c0000-436c1000 rwxs 80000025000 00:0c 1165    /dev/pvrsrvkm
436c1000-436c2000 rwxs 80000026000 00:0c 1165    /dev/pvrsrvkm
436c2000-436c3000 rwxs 80000027000 00:0c 1165    /dev/pvrsrvkm
436c3000-436c4000 rwxs 80000028000 00:0c 1165    /dev/pvrsrvkm
436c4000-436c5000 rwxs 80000029000 00:0c 1165    /dev/pvrsrvkm
436c5000-436c6000 rwxs 8000002a000 00:0c 1165    /dev/pvrsrvkm
436c6000-436c7000 rwxs 8000002b000 00:0c 1165    /dev/pvrsrvkm
436c7000-436d4000 r--s 00033000 fe:03 38724      /mnt/asec/paulscode.android.mupen64plus-1/pkg.apk
436d4000-436fb000 r-xp 00000000 b3:38 307298     /data/dalvik-cache/mnt@[email protected]@[email protected]
436fb000-436fc000 rwxs 8000002c000 00:0c 1165    /dev/pvrsrvkm
436fc000-43701000 rwxs 8000002d000 00:0c 1165    /dev/pvrsrvkm
43701000-43702000 rwxs 8000002e000 00:0c 1165    /dev/pvrsrvkm
43702000-43703000 rwxs 8000002f000 00:0c 1165    /dev/pvrsrvkm
43703000-43704000 rwxs 80000030000 00:0c 1165    /dev/pvrsrvkm
43704000-43705000 rwxs 80000031000 00:0c 1165    /dev/pvrsrvkm
43705000-43706000 rwxs 80000032000 00:0c 1165    /dev/pvrsrvkm
43706000-43707000 rwxs 80000033000 00:0c 1165    /dev/pvrsrvkm
43707000-43708000 rwxs 80000034000 00:0c 1165    /dev/pvrsrvkm
43708000-43709000 rwxs 80000035000 00:0c 1165    /dev/pvrsrvkm
43709000-4370a000 rwxs 80000036000 00:0c 1165    /dev/pvrsrvkm
4370a000-4370b000 rwxs 80000037000 00:0c 1165    /dev/pvrsrvkm
4370b000-43a2e000 r-xs 00000000 b3:35 615        /system/framework/framework-res.apk
43a2e000-43b2d000 r-xs 00209000 b3:35 615        /system/framework/framework-res.apk
43b2d000-43b6e000 rwxp 00000000 00:04 24496      /dev/ashmem/mspace/dalvik-heap/zygote/1 (deleted)
43b6e000-456ad000 ---p 00041000 00:04 24496      /dev/ashmem/mspace/dalvik-heap/zygote/1 (deleted)
456ad000-456ae000 ---p 00000000 00:00 0 
456ae000-457ad000 rwxp 00000000 00:00 0 
457ad000-457ae000 rwxs 80000038000 00:0c 1165    /dev/pvrsrvkm
457ae000-457af000 rwxs 80000039000 00:0c 1165    /dev/pvrsrvkm
457af000-457b0000 rwxs 8000003a000 00:0c 1165    /dev/pvrsrvkm
457b0000-457b1000 rwxs 8000003b000 00:0c 1165    /dev/pvrsrvkm
457b1000-457b2000 rwxs 8000003c000 00:0c 1165    /dev/pvrsrvkm
457b2000-457b3000 rwxs 8000003d000 00:0c 1165    /dev/pvrsrvkm
457b3000-457b4000 rwxs 8000003e000 00:0c 1165    /dev/pvrsrvkm
457b4000-457b5000 rwxs 8000003f000 00:0c 1165    /dev/pvrsrvkm
457b5000-457b6000 rwxs 80000040000 00:0c 1165    /dev/pvrsrvkm
457b6000-457b7000 rwxs 80000041000 00:0c 1165    /dev/pvrsrvkm
457b7000-457b8000 rwxs 80000042000 00:0c 1165    /dev/pvrsrvkm
457b8000-457b9000 rwxs 80000043000 00:0c 1165    /dev/pvrsrvkm
457b9000-457ba000 rwxs 80000044000 00:0c 1165    /dev/pvrsrvkm
457ba000-457bb000 rwxs 80000045000 00:0c 1165    /dev/pvrsrvkm
457bb000-457bc000 rwxs 80000046000 00:0c 1165    /dev/pvrsrvkm
457bc000-457bd000 rwxs 80000047000 00:0c 1165    /dev/pvrsrvkm
457bd000-457be000 rwxs 80000048000 00:0c 1165    /dev/pvrsrvkm
457be000-457bf000 rwxs 80000049000 00:0c 1165    /dev/pvrsrvkm
457bf000-457c0000 rwxs 8000004a000 00:0c 1165    /dev/pvrsrvkm
457c0000-457c1000 rwxs 8000004b000 00:0c 1165    /dev/pvrsrvkm
457c1000-457c2000 rwxs 8000004c000 00:0c 1165    /dev/pvrsrvkm
457c2000-457c3000 rwxs 8000004d000 00:0c 1165    /dev/pvrsrvkm
457c3000-457c4000 rwxs 8000004e000 00:0c 1165    /dev/pvrsrvkm
457c4000-457c5000 rwxs 8000004f000 00:0c 1165    /dev/pvrsrvkm
457c5000-457c6000 rwxs 80000050000 00:0c 1165    /dev/pvrsrvkm
457c6000-457c7000 rwxs 80000051000 00:0c 1165    /dev/pvrsrvkm
457c7000-457c8000 rwxs 80000052000 00:0c 1165    /dev/pvrsrvkm
457c8000-457c9000 rwxs 80000053000 00:0c 1165    /dev/pvrsrvkm
457c9000-457ca000 rwxs 80000054000 00:0c 1165    /dev/pvrsrvkm
457ca000-457cb000 rwxs 80000055000 00:0c 1165    /dev/pvrsrvkm
457cb000-457cc000 rwxs 80000056000 00:0c 1165    /dev/pvrsrvkm
457cc000-457cd000 rwxs 80000057000 00:0c 1165    /dev/pvrsrvkm
457cd000-457ce000 rwxs 80000058000 00:0c 1165    /dev/pvrsrvkm
457ce000-457cf000 rwxs 80000059000 00:0c 1165    /dev/pvrsrvkm
457cf000-457d0000 rwxs 8000005a000 00:0c 1165    /dev/pvrsrvkm
457d0000-457d1000 rwxs 8000005b000 00:0c 1165    /dev/pvrsrvkm
457d1000-457d2000 rwxs 8000005e000 00:0c 1165    /dev/pvrsrvkm
457d2000-457d3000 rwxs 80000060000 00:0c 1165    /dev/pvrsrvkm
457f3000-45879000 rwxp 00000000 00:00 0 
45879000-4589c000 r--s 00008000 fe:03 38724      /mnt/asec/paulscode.android.mupen64plus-1/pkg.apk
4589c000-458bf000 rwxp 00000000 00:00 0 
458bf000-458fb000 rwxp 00000000 00:04 104191     /dev/ashmem (deleted)
4590d000-4597e000 rwxp 00000000 00:04 104150     /dev/ashmem/mspace/dalvik-heap/2 (deleted)
4597e000-4744d000 ---p 00071000 00:04 104150     /dev/ashmem/mspace/dalvik-heap/2 (deleted)
4744d000-4744e000 ---p 00000000 00:00 0 
4744e000-4754d000 rwxp 00000000 00:00 0 
4754d000-4754e000 ---p 00000000 00:00 0 
4754e000-4764d000 rwxp 00000000 00:00 0 
4764d000-47763000 r-xp 00000000 00:0c 1120       /dev/binder
47763000-47764000 ---p 00000000 00:00 0 
47764000-47863000 rwxp 00000000 00:00 0 
47863000-47864000 ---p 00000000 00:00 0 
47864000-47963000 rwxp 00000000 00:00 0 
47963000-47aa6000 r--s 00000000 fe:03 38724      /mnt/asec/paulscode.android.mupen64plus-1/pkg.apk
47aa6000-47be9000 r--s 00000000 fe:03 38724      /mnt/asec/paulscode.android.mupen64plus-1/pkg.apk
47be9000-47bea000 ---p 00000000 00:00 0 
47bea000-47ce9000 rwxp 00000000 00:00 0 
47ceb000-47d58000 rwxp 00000000 00:04 104174     /dev/ashmem/dalvik-heap-bitmap/mark/0 (deleted)
47d58000-47dc6000 rwxp 00000000 00:04 104175     /dev/ashmem/dalvik-heap-bitmap/mark/1 (deleted)
47dc6000-47e3e000 rwxp 00000000 00:04 104176     /dev/ashmem/dalvik-heap-bitmap/mark/2 (deleted)
47e3e000-47e3f000 ---p 00000000 00:00 0 
47e3f000-47f3e000 rwxp 00000000 00:00 0 
47f3e000-480d0000 rwxs 8000000f000 00:0c 1165    /dev/pvrsrvkm
480d0000-481d0000 rwxp 00000000 00:04 104189     /dev/ashmem/dalvik-jit-code-cache (deleted)
481d0000-48362000 rwxs 80000011000 00:0c 1165    /dev/pvrsrvkm
48362000-4893f000 rwxs 80000018000 00:0c 1165    /dev/pvrsrvkm
4893f000-48a08000 rwxs 8000005d000 00:0c 1165    /dev/pvrsrvkm
48a08000-48ad1000 rwxp 00000000 00:00 0 
48ad1000-48b9a000 rwxs 8000005f000 00:0c 1165    /dev/pvrsrvkm
48b9a000-48c11000 rwxp 00000000 00:00 0 
49412000-49c13000 rwxp 00000000 00:00 0 
80000000-804fb000 r-xp 00000000 b3:35 910        /system/lib/libicudata.so
804fb000-804fc000 rwxp 004fb000 b3:35 910        /system/lib/libicudata.so
80800000-80807000 r-xp 00000000 b3:35 806        /system/lib/libgps_rds.so
80807000-80808000 rwxp 00007000 b3:35 806        /system/lib/libgps_rds.so
80900000-80901000 r-xp 00000000 b3:35 246        /system/lib/libril_rds.so
80901000-80902000 rwxp 00001000 b3:35 246        /system/lib/libril_rds.so
80a00000-80a04000 r-xp 00000000 b3:35 530        /system/lib/libnmea.so
80a04000-80a05000 rwxp 00004000 b3:35 530        /system/lib/libnmea.so
80b00000-80b02000 r-xp 00000000 b3:35 1480       /system/lib/libmot_bluetooth_jni.so
80b02000-80b03000 rwxp 00002000 b3:35 1480       /system/lib/libmot_bluetooth_jni.so
80c00000-80c04000 r-xp 00000000 b3:35 205        /system/lib/libmot_bthid_jni.so
80c04000-80c05000 rwxp 00004000 b3:35 205        /system/lib/libmot_bthid_jni.so
80d00000-80d1e000 r-xp 00000000 b3:35 1479       /system/lib/libmetainfo.so
80d1e000-80d1f000 rwxp 0001e000 b3:35 1479       /system/lib/libmetainfo.so
80e00000-80e02000 r-xp 00000000 b3:35 1537       /system/lib/libdlnaprofileparser.so
80e02000-80e03000 rwxp 00002000 b3:35 1537       /system/lib/libdlnaprofileparser.so
80f00000-80f06000 r-xp 00000000 b3:35 201        /system/lib/libmediaext.so
80f06000-80f07000 rwxp 00006000 b3:35 201        /system/lib/libmediaext.so
81000000-81038000 r-xp 00000000 b3:38 97129      /data/data/paulscode.android.mupen64plus/lib/libsdl-1.2.so
81038000-81039000 rwxp 00037000 b3:38 97129      /data/data/paulscode.android.mupen64plus/lib/libsdl-1.2.so
81039000-8103d000 rwxp 00000000 00:00 0 
81100000-8116b000 r-xp 00000000 b3:38 97124      /data/data/paulscode.android.mupen64plus/lib/libsdl_mixer.so
8116b000-81175000 rwxp 0006a000 b3:38 97124      /data/data/paulscode.android.mupen64plus/lib/libsdl_mixer.so
81175000-81199000 rwxp 00000000 00:00 0 
81200000-81229000 r-xp 00000000 b3:38 97103      /data/data/paulscode.android.mupen64plus/lib/libsdl_image.so
81229000-8122a000 rwxp 00029000 b3:38 97103      /data/data/paulscode.android.mupen64plus/lib/libsdl_image.so
8122a000-8123a000 rwxp 00000000 00:00 0 
81300000-81303000 r-xp 00000000 b3:35 449        /system/lib/hw/gralloc.omap3.so
81303000-81304000 rwxp 00003000 b3:35 449        /system/lib/hw/gralloc.omap3.so
81400000-81415000 r-xp 00000000 b3:35 55         /system/lib/libsrv_um.so
81415000-81416000 rwxp 00015000 b3:35 55         /system/lib/libsrv_um.so
81500000-81505000 r-xp 00000000 b3:35 1083       /system/lib/libpvr2d.so
81505000-81506000 rwxp 00005000 b3:35 1083       /system/lib/libpvr2d.so
81600000-81601000 r-xp 00000000 b3:35 783        /system/lib/egl/libEGL_POWERVR_SGX530_125.so
81601000-81602000 rwxp 00001000 b3:35 783        /system/lib/egl/libEGL_POWERVR_SGX530_125.so
81700000-8170c000 r-xp 00000000 b3:35 75         /system/lib/libIMGegl.so
8170c000-8170d000 rwxp 0000c000 b3:35 75         /system/lib/libIMGegl.so
81800000-8186a000 r-xp 00000000 b3:35 785        /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so
8186a000-8186c000 rwxp 0006a000 b3:35 785        /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so
81900000-8194a000 r-xp 00000000 b3:35 789        /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
8194a000-8194b000 rwxp 0004a000 b3:35 789        /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
81a00000-81a01000 r-xp 00000000 b3:35 1084       /system/lib/libpvrANDROID_WSEGL.so
81a01000-81a02000 rwxp 00001000 b3:35 1084       /system/lib/libpvrANDROID_WSEGL.so
81b00000-81b07000 r-xp 00000000 b3:38 97123      /data/data/paulscode.android.mupen64plus/lib/libapplication.so
81b07000-81b0c000 rwxp 00007000 b3:38 97123      /data/data/paulscode.android.mupen64plus/lib/libapplication.so
81c00000-81c01000 r-xp 00000000 b3:38 97016      /data/data/paulscode.android.mupen64plus/lib/libsdl_main.so
81c01000-81c02000 rwxp 00000000 b3:38 97016      /data/data/paulscode.android.mupen64plus/lib/libsdl_main.so
81d00000-81d23000 r-xp 00000000 b3:38 97125      /data/data/paulscode.android.mupen64plus/lib/libgles2n64.so
81d23000-81d25000 rwxp 00022000 b3:38 97125      /data/data/paulscode.android.mupen64plus/lib/libgles2n64.so
81d25000-81d2d000 rwxp 00000000 00:00 0 
81e00000-81e03000 r-xp 00000000 b3:38 97122      /data/data/paulscode.android.mupen64plus/lib/libaudio-sdl.so
81e03000-81e04000 rwxp 00002000 b3:38 97122      /data/data/paulscode.android.mupen64plus/lib/libaudio-sdl.so
81f00000-81f05000 r-xp 00000000 b3:38 97128      /data/data/paulscode.android.mupen64plus/lib/libinput-sdl.so
81f05000-81f06000 rwxp 00004000 b3:38 97128      /data/data/paulscode.android.mupen64plus/lib/libinput-sdl.so
81f06000-81f07000 rwxp 00000000 00:00 0 
82000000-82008000 r-xp 00000000 b3:38 97015      /data/data/paulscode.android.mupen64plus/lib/librsp-hle.so
82008000-82009000 rwxp 00008000 b3:38 97015      /data/data/paulscode.android.mupen64plus/lib/librsp-hle.so
82009000-8201a000 rwxp 00000000 00:00 0 
88000000-880a4000 r-xp 00000000 b3:38 97130      /data/data/paulscode.android.mupen64plus/lib/libcore.so
880a4000-880aa000 rwxp 000a3000 b3:38 97130      /data/data/paulscode.android.mupen64plus/lib/libcore.so
880aa000-8c4b5000 rwxp 00000000 00:00 0 
9d100000-9d13a000 r-xp 00000000 b3:35 219        /system/lib/libstlport.so
9d13a000-9d13c000 rwxp 0003a000 b3:35 219        /system/lib/libstlport.so
9d700000-9d735000 r-xp 00000000 b3:35 200        /system/lib/libjpeg.so
9d735000-9d736000 rwxp 00035000 b3:35 200        /system/lib/libjpeg.so
9ea00000-9ea08000 r-xp 00000000 b3:35 895        /system/lib/libdrm1.so
9ea08000-9ea09000 rwxp 00008000 b3:35 895        /system/lib/libdrm1.so
a2f00000-a2fab000 r-xp 00000000 b3:35 57         /system/lib/libstagefright.so
a2fab000-a2fae000 rwxp 000ab000 b3:35 57         /system/lib/libstagefright.so
a3500000-a3503000 r-xp 00000000 b3:35 218        /system/lib/libstagefright_color_conversion.so
a3503000-a3504000 rwxp 00003000 b3:35 218        /system/lib/libstagefright_color_conversion.so
a3600000-a3605000 r-xp 00000000 b3:35 217        /system/lib/libstagefright_avc_common.so
a3605000-a3606000 rwxp 00005000 b3:35 217        /system/lib/libstagefright_avc_common.so
a3700000-a370c000 r-xp 00000000 b3:35 215        /system/lib/libstagefright_amrnb_common.so
a370c000-a370d000 rwxp 0000c000 b3:35 215        /system/lib/libstagefright_amrnb_common.so
a3900000-a39cc000 r-xp 00000000 b3:35 816        /system/lib/libopencore_common.so
a39cc000-a39d2000 rwxp 000cc000 b3:35 816        /system/lib/libopencore_common.so
a4800000-a48be000 r-xp 00000000 b3:35 539        /system/lib/libopencore_player.so
a48be000-a48c6000 rwxp 000be000 b3:35 539        /system/lib/libopencore_player.so
a5900000-a5916000 r-xp 00000000 b3:35 537        /system/lib/libomx_amrenc_sharedlibrary.so
a5916000-a5917000 rwxp 00016000 b3:35 537        /system/lib/libomx_amrenc_sharedlibrary.so
a6800000-a682f000 r-xp 00000000 b3:35 1484       /system/lib/libopencore_net_support.so
a682f000-a6832000 rwxp 0002f000 b3:35 1484       /system/lib/libopencore_net_support.so
a6d00000-a6d14000 r-xp 00000000 b3:35 815        /system/lib/libomx_sharedlibrary.so
a6d14000-a6d15000 rwxp 00014000 b3:35 815        /system/lib/libomx_sharedlibrary.so
a7500000-a7502000 r-xp 00000000 b3:35 898        /system/lib/libemoji.so
a7502000-a7503000 rwxp 00002000 b3:35 898        /system/lib/libemoji.so
a7e00000-a7e08000 r-xp 00000000 b3:35 807        /system/lib/libhardware_legacy.so
a7e08000-a7e09000 rwxp 00008000 b3:35 807        /system/lib/libhardware_legacy.so
a7f00000-a7f01000 r-xp 00000000 b3:35 907        /system/lib/libhardware.so
a7f01000-a7f02000 rwxp 00001000 b3:35 907        /system/lib/libhardware.so
a8100000-a8126000 r-xp 00000000 b3:35 575        /system/lib/libutils.so
a8126000-a8127000 rwxp 00026000 b3:35 575        /system/lib/libutils.so
a8200000-a821f000 r-xp 00000000 b3:35 870        /system/lib/libbinder.so
a821f000-a8225000 rwxp 0001f000 b3:35 870        /system/lib/libbinder.so
a8300000-a879d000 r-xp 00000000 b3:35 387        /system/lib/libwebcore.so
a879d000-a87de000 rwxp 0049d000 b3:35 387        /system/lib/libwebcore.so
a87de000-a87f0000 rwxp 00000000 00:00 0 
a8a00000-a8a13000 r-xp 00000000 b3:35 899        /system/lib/libexpat.so
a8a13000-a8a15000 rwxp 00013000 b3:35 899        /system/lib/libexpat.so
a8b00000-a8b51000 r-xp 00000000 b3:35 1097       /system/lib/libsqlite.so
a8b51000-a8b53000 rwxp 00051000 b3:35 1097       /system/lib/libsqlite.so
a9000000-a9054000 r-xp 00000000 b3:35 808        /system/lib/libmedia.so
a9054000-a9060000 rwxp 00054000 b3:35 808        /system/lib/libmedia.so
a9300000-a930d000 r-xp 00000000 b3:35 1478       /system/lib/libmedia_jni.so
a930d000-a930e000 rwxp 0000d000 b3:35 1478       /system/lib/libmedia_jni.so
a9400000-a941c000 r-xp 00000000 b3:35 576        /system/lib/libvorbisidec.so
a941c000-a941d000 rwxp 0001c000 b3:35 576        /system/lib/libvorbisidec.so
a9500000-a9551000 r-xp 00000000 b3:35 1095       /system/lib/libsonivox.so
a9551000-a9552000 rwxp 00051000 b3:35 1095       /system/lib/libsonivox.so
a9552000-a9553000 rwxp 00000000 00:00 0 
a9c00000-a9c0a000 r-xp 00000000 b3:35 1092       /system/lib/libskiagl.so
a9c0a000-a9c0b000 rwxp 0000a000 b3:35 1092       /system/lib/libskiagl.so
ab100000-ab20e000 r-xp 00000000 b3:35 146        /system/lib/libskia.so
ab20e000-ab212000 rwxp 0010e000 b3:35 146        /system/lib/libskia.so
ab212000-ab215000 rwxp 00000000 00:00 0 
ab900000-ab912000 r-xp 00000000 b3:35 574        /system/lib/libui.so
ab912000-ab914000 rwxp 00012000 b3:35 574        /system/lib/libui.so
aba80000-aba90000 r-xp 00000000 b3:35 195        /system/lib/libcamera_client.so
aba90000-aba93000 rwxp 00010000 b3:35 195        /system/lib/libcamera_client.so
abb00000-abb09000 r-xp 00000000 b3:35 52         /system/lib/libexif.so
abb09000-abb0a000 rwxp 00009000 b3:35 52         /system/lib/libexif.so
abb0a000-abb0c000 rwxp 00000000 00:00 0 
abd00000-abd02000 r-xp 00000000 b3:35 193        /system/lib/libETC1.so
abd02000-abd03000 rwxp 00002000 b3:35 193        /system/lib/libETC1.so
abe00000-abe08000 r-xp 00000000 b3:35 60         /system/lib/libEGL.so
abe08000-abe09000 rwxp 00008000 b3:35 60         /system/lib/libEGL.so
abe09000-abe0b000 rwxp 00000000 00:00 0 
ac100000-ac104000 r-xp 00000000 b3:35 73         /system/lib/libGLESv2.so
ac104000-ac105000 rwxp 00004000 b3:35 73         /system/lib/libGLESv2.so
ac200000-ac205000 r-xp 00000000 b3:35 72         /system/lib/libGLESv1_CM.so
ac205000-ac206000 rwxp 00005000 b3:35 72         /system/lib/libGLESv1_CM.so
ac400000-ac41a000 r-xp 00000000 b3:35 784        /system/lib/egl/libGLES_android.so
ac41a000-ac41b000 rwxp 0001a000 b3:35 784        /system/lib/egl/libGLES_android.so
ac700000-ac715000 r-xp 00000000 b3:35 221        /system/lib/libsurfaceflinger_client.so
ac715000-ac718000 rwxp 00015000 b3:35 221        /system/lib/libsurfaceflinger_client.so
ac900000-ac919000 r-xp 00000000 b3:35 1073       /system/lib/libpixelflinger.so
ac919000-ac91b000 rwxp 00019000 b3:35 1073       /system/lib/libpixelflinger.so
aca00000-aca9a000 r-xp 00000000 b3:35 897        /system/lib/libdvm.so
aca9a000-acaa1000 rwxp 0009a000 b3:35 897        /system/lib/libdvm.so
acaa1000-acaa3000 rwxp 00000000 00:00 0 
ad100000-ad12e000 r-xp 00000000 b3:35 1447       /system/lib/libnativehelper.so
ad12e000-ad131000 rwxp 0002e000 b3:35 1447       /system/lib/libnativehelper.so
ad300000-ad37b000 r-xp 00000000 b3:35 794        /system/lib/libandroid_runtime.so
ad37b000-ad383000 rwxp 0007b000 b3:35 794        /system/lib/libandroid_runtime.so
ad383000-ad389000 rwxp 00000000 00:00 0 
ad900000-ad9db000 r-xp 00000000 b3:35 911        /system/lib/libicui18n.so
ad9db000-ad9df000 rwxp 000db000 b3:35 911        /system/lib/libicui18n.so
ad9df000-ad9e0000 rwxp 00000000 00:00 0 
ade00000-aded2000 r-xp 00000000 b3:35 912        /system/lib/libicuuc.so
aded2000-adeda000 rwxp 000d2000 b3:35 912        /system/lib/libicuuc.so
adeda000-adedc000 rwxp 00000000 00:00 0 
ae300000-ae304000 r-xp 00000000 b3:35 1488       /system/lib/libnetutils.so
ae304000-ae305000 rwxp 00004000 b3:35 1488       /system/lib/libnetutils.so
ae400000-ae402000 r-xp 00000000 b3:35 388        /system/lib/libwpa_client.so
ae402000-ae403000 rwxp 00002000 b3:35 388        /system/lib/libwpa_client.so
ae700000-ae745000 r-xp 00000000 b3:35 889        /system/lib/libdbus.so
ae745000-ae746000 rwxp 00045000 b3:35 889        /system/lib/libdbus.so
ae900000-ae902000 r-xp 00000000 b3:35 803        /system/lib/libbluedroid.so
ae902000-ae903000 rwxp 00002000 b3:35 803        /system/lib/libbluedroid.so
af000000-af090000 r-xp 00000000 b3:35 885        /system/lib/libcrypto.so
af090000-af0a2000 rwxp 00090000 b3:35 885        /system/lib/libcrypto.so
af0a2000-af0a4000 rwxp 00000000 00:00 0 
af400000-af424000 r-xp 00000000 b3:35 1099       /system/lib/libssl.so
af424000-af427000 rwxp 00024000 b3:35 1099       /system/lib/libssl.so
af700000-af712000 r-xp 00000000 b3:35 1062       /system/lib/libz.so
af712000-af713000 rwxp 00012000 b3:35 1062       /system/lib/libz.so
af900000-af90e000 r-xp 00000000 b3:35 888        /system/lib/libcutils.so
af90e000-af90f000 rwxp 0000e000 b3:35 888        /system/lib/libcutils.so
af90f000-af91e000 rwxp 00000000 00:00 0 
afa00000-afa03000 r-xp 00000000 b3:35 1456       /system/lib/liblog.so
afa03000-afa04000 rwxp 00003000 b3:35 1456       /system/lib/liblog.so
afb00000-afb16000 r-xp 00000000 b3:35 1457       /system/lib/libm.so
afb16000-afb17000 rwxp 00016000 b3:35 1457       /system/lib/libm.so
afc00000-afc01000 r-xp 00000000 b3:35 1102       /system/lib/libstdc++.so
afc01000-afc02000 rwxp 00001000 b3:35 1102       /system/lib/libstdc++.so
afd00000-afd41000 r-xp 00000000 b3:35 880        /system/lib/libc.so
afd41000-afd44000 rwxp 00041000 b3:35 880        /system/lib/libc.so
afd44000-afd4f000 rwxp 00000000 00:00 0 
b0001000-b000c000 r-xp 00001000 b3:35 1377       /system/bin/linker
b000c000-b000d000 rwxp 0000c000 b3:35 1377       /system/bin/linker
b000d000-b0017000 rwxp 00000000 00:00 0 
bedbe000-bedca000 rwxp 00000000 00:00 0          [stack]
 
Last edited:

Ari64

New member
Ari64, I'm hoping maybe this is something you've seen before and might be able to give me some pointers about what could potentially cause this type of behavior. One thing I haven't checked yet is if the ROM itself is corrupt, so I'll test that and try some different ROMs as well. I'll post the results after I finish testing that.

Okay, so the first two blocks (a4000040 and a4000778) are the bootcode. This is normal and expected for the 6102 bootloader.

The bootloader copies the rom into ram, at 80000000 (or possibly a higher address) and then runs it. What you're seeing here is that the ram is empty, and it's compiling blocks of zeros, which are interpreted as no-operation instructions. The 0x4000 block size is a limit defined by MAXBLOCK in new_dynarec.c

So why is the RAM full of zeros except for the first few bytes? Something is set up incorrectly, but I don't see any obvious mistakes in the source code.

I did change the dynarec a tad to allocate the 32MB for BASE_ADDR in the .bss section, but that shouldn't have affected anything. The behavior is the same if I leave BASE_ADDR allocated at 0x6000000 the way you had it originally (still get 515 compiled blocks before the bogus address 80800000).
Putting it in .bss is safer, since the Android SDK appears to ignore the linker flags which reserve the area of memory that I used. However, looking at the memory map you posted, there doesn't appear to be a conflict, so it will probably work either way.

For reference, the changes I made to your code (in case I did something stupid):
Looks fine.
 

Ari64

New member
This looks suspicious:
Code:
unsigned char byte;
extern rom_header* ROM_HEADER;
extern unsigned char* rom;
The declaration of byte here duplicates the declaration in linkage_arm.S. That probably won't link correctly.
 
OP
paulscode

paulscode

New member
Doh! I forgot to use the word "extern" before "unsigned char byte". I probably should try and figure out why I needed to add these three lines for the library to compile in the first place - maybe along the way I'll discover the cause of my "ram full of zeros" problem.
 

Ari64

New member
Doh! I forgot to use the word "extern" before "unsigned char byte". I probably should try and figure out why I needed to add these three lines for the library to compile in the first place - maybe along the way I'll discover the cause of my "ram full of zeros" problem.

Well, it shouldn't need to be there at all, since it's in memory.h. The problem is that between 1.5 and 1.99.4, byte was renamed cpu_byte, so you need to make that change in assem_arm.c and linkage_arm.S. Also put the declaration back inside the ifdef, as it was before.

This probably isn't the cause of the "ram full of zeros" problem, and I'm not sure what's causing that. You might want to put some logging in write_rdram to see if that's being called. It should be called a little under 300 times.
 
Last edited:
OP
paulscode

paulscode

New member
Well, it shouldn't need to be there at all, since it's in memory.h. The problem is that between 1.5 and 1.99.4, byte was renamed cpu_byte, so you need to make that change in assem_arm.c and linkage_arm.S. Also put the declaration back inside the ifdef, as it was before.
Aha, I see - having it outside the ifdef would result in it declared twice again. Really not sure what I was thinking when I edited that part - it's pretty obvious now. I probably better spend a little time comparing 1.5 to 1.99.4 again now that I am slightly more familiar with the code and how the pieces fit together, in case I made any other stupid mistakes like this. I should also compare to Yongzh's project some more, since he already plugged your dynarec into 1.99.4 (no reason for me to reinvent the wheel).
 

Top