Release DraStic Nintendo DS emulator


Played Dr Layton and the Diabolical box, got to a part where I had to use the microphone to proceed, and...It just worked! Amazing stuff.

One thing I noted, though: Am I correct in assuming that internal game saves aren't synced to the SD-card until the emulator is exited? I've had a few crashes by now (one from forgetting to put the charger in, and two of the mystical lock-ups. No systematic reason as to cause, though), and in all cases, my savegames had disappeared when I restarted the pandora. (that is, the saves done during this session - not wiped completely). If it is not too much trouble, I think it'd be preferable if an in-game save triggered a sync-to-card.
 
That is correct re-save games only getting written when the game is closed (like if you load a new one, maybe if you reset, don't remember) or the emulator is exited. I did intend to add something to make it automatically save the file X frames after the last time it's updated, just forgot to do so. >_>

Do you have any recollection if the mysterious lockups happened not too long after exiting the menu or starting the game?
 
Last edited by a moderator:
New article, coming back on the development story behind DraStic, the recent DS Emulator which won the DragonBox competition. The article includes several extracts of an interview conducted with Exophase.

seedsdrastic.png


Continue reading : http://www.pandoralive.info/?p=792#more-792
 
Apollo Justice, second part of the second episode: the most freezes i've ever had with DraStic. Something like 1 every ten minutes.
 
That is correct re-save games only getting written when the game is closed (like if you load a new one, maybe if you reset, don't remember) or the emulator is exited. I did intend to add something to make it automatically save the file X frames after the last time it's updated, just forgot to do so. >_>
Heh, I fully understand that :D

Do you have any recollection if the mysterious lockups happened not too long after exiting the menu or starting the game?
One after having played for a very long time, when I attempted to go into the menu, and one after playing for a very short time, when I had just solved a puzzle (it froze on the "Prof Layton is approaching you to say 'correct'"-screen) when I had not even thought about going into the menu. It is hard to do something systematic from two cases, and even more so when they are each others opposites :p
 
Can anyone confirm that the freezes started with 1.2.0.0 and weren't happening before?

I'm trying to confirm that the problem is related to an issue with microphone DMA in the kernel. The kernel should log this problem; notaz says that in SuperZaxxon 1.54 the kernel is retained

According to notaz SuperZaxxon 1.54 will retain kernel logs between reboots, so long as power isn't lost (http://boards.openpandora.org/index.php/topic/11841-usb-otg-port-does-not-appear-to-be-working/page-3#entry233529) So what'd be most helpful for me is if you could check the log file after and see if there was anything written before the reboot happened. Be sure to reboot with Pandora button + power switch, not anything that could remove power.
 
Last edited by a moderator:
Will check next time it happens. /proc/last_kmsg, is it?
 
If it is a problem in the kernel, do you think notaz would release a hotfix for it?
 
Will check next time it happens./proc/last_kmsg, is it?
Just forced a crash by going into low power mode (a generally reliable way to get a crash, fyi). /proc/last_ksmgs just says:
'$ last /proc/last_kmsg


wtmp begins Sun Mar 17 21:25 '


That was about the right local time when the crash happened (damn crashes screwing up the clock)


I can usually get a crash when trying to play normally eventually, so I'll try that again and report back when I get a moment.


It would be great to get an update where it would write the save file more frequently. I often lose progress when it crashes on me. Any plans for an updated release soon?
 
Next version is still a ways out, I want a substantial rewrite of the geometry engine code before I release again.

I recommend using save states habitually as a backup for this sort of thing. The backup memory isn't included in the save state so if you load one remember you'll have to save again.
 
Last edited by a moderator:
Yes, I tried using savestates on Picross, but it was a faff that on reloading it would use the completed level from the last good save combined with the state of the current puzzle, so on completing that puzzle I'd see that puzzle icon in an otherwise blank level - all previously completed levels would be uncompleted again. So I gave up on that approach and just quit and restarted DraStic every couple of levels instead.

Oddly, I had assumed it was doing some sort of save on returning to the main game menu, as I'd usually see a fair bit of disc activity there. If I can just hit space and quit and restart after returning to the level menu, that will save me a few seconds every time.
 
I'd still recommend building the version which doesn't start mic needlessly, as it doesn't look like we can solve this properly. Judging on how many games enable the mic from my limited testing, it should solve the problem in something like 80% cases and improve battery time for all them. If you have lots of pending work it's easy to go back with git or do a separate clone at that revision, I think it was commit b11d82b7358209.
 
Here's two logs from Apollo Justice:

Code:
[    0.121520] _omap_mux_init_gpio: Could not set gpio192
[    0.122589] _omap_mux_init_gpio: Could not set gpio193
[    1.461090] twl4030_wdt twl4030_wdt: Failed to register misc device
[   11.697662] FAT-fs (mmcblk0): invalid media value (0x00)
[   12.865875] FAT-fs (mmcblk0): invalid media value (0x00)
[   13.008178] FAT-fs (zram0): bogus number of reserved sectors
[   13.664642] FAT-fs (zram0): bogus number of reserved sectors
[  981.340576] ------------[ cut here ]------------
[  981.340667] kernel BUG at arch/arm/mach-omap2/omap_l3_smx.c:186!
[  981.340789] Internal error: Oops - undefined instruction: 0 [#1]
[  981.340881] Modules linked in: aufs squashfs xz_dec bluetooth g_cdc omaplfb(O) pvrsrvkm(O) zram(C) snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ipv6 fuse ads7846 hwmon
[  981.342315] CPU: 0    Tainted: G         C O  (3.2.39 #872)
[  981.342407] PC is at omap3_l3_app_irq+0x11c/0x120
[  981.342559] LR is at handle_irq_event_percpu+0x54/0x194
[  981.342651] pc : [<c002ea74>]    lr : [<c007b340>]    psr: 200001d3
[  981.342651] sp : c0577e88  ip : f8000000  fp : 00000001
[  981.342864] r10: c058faf8  r9 : c05d5af0  r8 : 0000000a
[  981.342987] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00080000
[  981.343078] r3 : 00000000  r2 : 00080000  r1 : 00000000  r0 : 00080000
[  981.343231] Flags: nzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
[  981.343292] Control: 10c5387d  Table: 9d7f0019  DAC: 55555555
[  981.343444] Process swapper (pid: 0, stack limit = 0xc05762f0)
[  981.343536] Stack: (0xc0577e88 to 0xc0578000)
[  981.343658] 7e80:                   c0029024 00000000 c05d5af0 00000000 00000000 de865a00
[  981.343811] 7ea0: 0000000a 00000000 00000000 0000000a c05d5af0 c007b340 c05b3610 00000001
[  981.343902] 7ec0: c057e694 c058faf8 0000000a 00000000 c0577f44 00000003 c05b3610 00000001
[  981.344055] 7ee0: c057e694 c007b4a8 c058faf8 c007d220 c059ea14 c007ac44 0000019a c0014b54
[  981.344207] 7f00: c0029024 60000053 fa200000 c0013834 c0577f58 0001dcd6 0001dcd6 00000000
[  981.344268] 7f20: 00000001 c057e898 c05b35f4 00000003 00000003 c05b3610 00000001 c057e694
[  981.344421] 7f40: 00000000 c0577f58 c0029018 c0029024 60000053 ffffffff 00000000 0001dcd6
[  981.344573] 7f60: 51748a71 233910af 51748a71 233733d9 c05b35f4 c057e634 c057e898 00000001
[  981.344726] 7f80: 00000001 c00291b0 51748a71 c057e634 00000000 c057e898 c05e0f70 80004059
[  981.344787] 7fa0: 413fc082 00000000 00000000 c02fd55c 00000000 c0576000 c05b2bc8 c057c374
[  981.344940] 7fc0: c057c36c c0014e10 c05789a8 c056b0cc c09e5180 c0544758 c0544168 00000000
[  981.345092] 7fe0: 00000000 c056b0cc 10c5387d c0578084 c056b09c 80008040 00000000 00000000
[  981.345245] [<c002ea74>] (omap3_l3_app_irq+0x11c/0x120) from [<c007b340>] (handle_irq_event_percpu+0x54/0x194)
[  981.345336] [<c007b340>] (handle_irq_event_percpu+0x54/0x194) from [<c007b4a8>] (handle_irq_event+0x28/0x38)
[  981.345489] [<c007b4a8>] (handle_irq_event+0x28/0x38) from [<c007d220>] (handle_level_irq+0x84/0x108)
[  981.345642] [<c007d220>] (handle_level_irq+0x84/0x108) from [<c007ac44>] (generic_handle_irq+0x30/0x40)
[  981.345794] [<c007ac44>] (generic_handle_irq+0x30/0x40) from [<c0014b54>] (handle_IRQ+0x38/0x84)
[  981.345947] [<c0014b54>] (handle_IRQ+0x38/0x84) from [<c0013834>] (__irq_svc+0x34/0x78)
[  981.346038] [<c0013834>] (__irq_svc+0x34/0x78) from [<c0029024>] (omap3_enter_idle+0xbc/0x138)
[  981.346191] [<c0029024>] (omap3_enter_idle+0xbc/0x138) from [<c00291b0>] (omap3_enter_idle_bm+0x110/0x2b0)
[  981.346343] [<c00291b0>] (omap3_enter_idle_bm+0x110/0x2b0) from [<c02fd55c>] (cpuidle_idle_call+0xb4/0x12c)
[  981.346496] [<c02fd55c>] (cpuidle_idle_call+0xb4/0x12c) from [<c0014e10>] (cpu_idle+0x68/0xa8)
[  981.346649] [<c0014e10>] (cpu_idle+0x68/0xa8) from [<c0544758>] (start_kernel+0x2cc/0x2d8)
[  981.346740] Code: e591c008 e28c3e53 e1c320d0 eaffffca (e7f001f2) 
[  981.346893] ---[ end trace ee01fd3d47c1846d ]---
[  981.346954] Kernel panic - not syncing: Fatal exception in interrupt
[  981.347106] [<c001a680>] (unwind_backtrace+0x0/0xf8) from [<c03e4058>] (panic+0x64/0x1a8)
[  981.347259] [<c03e4058>] (panic+0x64/0x1a8) from [<c0017a14>] (arm_notify_die+0x0/0x50)
[  981.347351] [<c0017a14>] (arm_notify_die+0x0/0x50) from [<0000000b>] (0xb)

No errors detected
Code:
[    0.129333] _omap_mux_init_gpio: Could not set gpio192
[    0.130371] _omap_mux_init_gpio: Could not set gpio193
[    1.468841] twl4030_wdt twl4030_wdt: Failed to register misc device
[   11.606536] FAT-fs (mmcblk0): invalid media value (0x00)
[   12.836700] FAT-fs (mmcblk0): invalid media value (0x00)
[   12.969787] FAT-fs (zram0): bogus number of reserved sectors
[   13.645233] FAT-fs (zram0): bogus number of reserved sectors
[  529.744873] ------------[ cut here ]------------
[  529.744964] kernel BUG at arch/arm/mach-omap2/omap_l3_smx.c:186!
[  529.745086] Internal error: Oops - undefined instruction: 0 [#1]
[  529.745178] Modules linked in: aufs squashfs xz_dec bluetooth g_cdc omaplfb(O) pvrsrvkm(O) zram(C) snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss ipv6 fuse ads7846 hwmon
[  529.746612] CPU: 0    Tainted: G         C O  (3.2.39 #872)
[  529.746704] PC is at omap3_l3_app_irq+0x11c/0x120
[  529.746856] LR is at handle_irq_event_percpu+0x54/0x194
[  529.746917] pc : [<c002ea74>]    lr : [<c007b340>]    psr: 200001d3
[  529.746948] sp : c0577e88  ip : f8000000  fp : 00000001
[  529.747131] r10: c058faf8  r9 : c05d5af0  r8 : 0000000a
[  529.747283] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00080000
[  529.747375] r3 : 00000000  r2 : 00080000  r1 : 00000000  r0 : 00080000
[  529.747497] Flags: nzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
[  529.747589] Control: 10c5387d  Table: 989d8019  DAC: 55555555
[  529.747711] Process swapper (pid: 0, stack limit = 0xc05762f0)
[  529.747802] Stack: (0xc0577e88 to 0xc0578000)
[  529.747955] 7e80:                   c0029024 00000000 c05d5af0 00000000 00000000 de8600c0
[  529.748107] 7ea0: 0000000a 00000000 00000000 0000000a c05d5af0 c007b340 c05b3610 00000001
[  529.748168] 7ec0: c057e694 c058faf8 0000000a 00000000 c0577f44 00000003 c05b3610 00000001
[  529.748321] 7ee0: c057e694 c007b4a8 c058faf8 c007d220 c059ea14 c007ac44 0000019a c0014b54
[  529.748474] 7f00: c0029024 60000053 fa200000 c0013834 c0577f58 0001dcd6 0001dcd6 00000000
[  529.748565] 7f20: 00000001 c057e898 c05b35f4 00000003 00000003 c05b3610 00000001 c057e694
[  529.748687] 7f40: 00000000 c0577f58 c0029018 c0029024 60000053 ffffffff 00000000 0001dcd6
[  529.748840] 7f60: 51748d48 008b3b93 51748d48 00895ebd c05b35f4 c057e634 c057e898 00000001
[  529.748992] 7f80: 00000001 c00291b0 51748d48 c057e634 00000000 c057e898 c05e0f70 80004059
[  529.749084] 7fa0: 413fc082 00000000 00000000 c02fd55c 00000000 c0576000 c05b2bc8 c057c374
[  529.749206] 7fc0: c057c36c c0014e10 c05789a8 c056b0cc c09e5180 c0544758 c0544168 00000000
[  529.749359] 7fe0: 00000000 c056b0cc 10c5387d c0578084 c056b09c 80008040 00000000 00000000
[  529.749511] [<c002ea74>] (omap3_l3_app_irq+0x11c/0x120) from [<c007b340>] (handle_irq_event_percpu+0x54/0x194)
[  529.749603] [<c007b340>] (handle_irq_event_percpu+0x54/0x194) from [<c007b4a8>] (handle_irq_event+0x28/0x38)
[  529.749755] [<c007b4a8>] (handle_irq_event+0x28/0x38) from [<c007d220>] (handle_level_irq+0x84/0x108)
[  529.749908] [<c007d220>] (handle_level_irq+0x84/0x108) from [<c007ac44>] (generic_handle_irq+0x30/0x40)
[  529.750061] [<c007ac44>] (generic_handle_irq+0x30/0x40) from [<c0014b54>] (handle_IRQ+0x38/0x84)
[  529.750213] [<c0014b54>] (handle_IRQ+0x38/0x84) from [<c0013834>] (__irq_svc+0x34/0x78)
[  529.750305] [<c0013834>] (__irq_svc+0x34/0x78) from [<c0029024>] (omap3_enter_idle+0xbc/0x138)
[  529.750457] [<c0029024>] (omap3_enter_idle+0xbc/0x138) from [<c00291b0>] (omap3_enter_idle_bm+0x110/0x2b0)
[  529.750610] [<c00291b0>] (omap3_enter_idle_bm+0x110/0x2b0) from [<c02fd55c>] (cpuidle_idle_call+0xb4/0x12c)
[  529.750762] [<c02fd55c>] (cpuidle_idle_call+0xb4/0x12c) from [<c0014e10>] (cpu_idle+0x68/0xa8)
[  529.750915] [<c0014e10>] (cpu_idle+0x68/0xa8) from [<c0544758>] (start_kernel+0x2cc/0x2d8)
[  529.751007] Code: e591c008 e28c3e53 e1c320d0 eaffffca (e7f001f2) 
[  529.751159] ---[ end trace be3a78e2563fe49b ]---
[  529.751251] Kernel panic - not syncing: Fatal exception in interrupt
[  529.751403] [<c001a680>] (unwind_backtrace+0x0/0xf8) from [<c03e4058>] (panic+0x64/0x1a8)
[  529.751556] [<c03e4058>] (panic+0x64/0x1a8) from [<c0017a14>] (arm_notify_die+0x0/0x50)
[  529.751647] [<c0017a14>] (arm_notify_die+0x0/0x50) from [<0000000b>] (0xb)

No errors detected
 
Hmm, this doesn't have "DMA transaction error with device 20" that I saw when I had this, but it ends up killed by the same code in the kernel as it had for me:


int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
if (!int_type) {
        status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
        /*
         * if we have a timeout error, there's nothing we can
         * do besides rebooting the board. So let's BUG on any
         * of such errors and handle the others. timeout error
         * is severe and not expected to occur.
         */
        BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK);
}

It's bit19 set in L3_SI_FLAG_STATUS_0 register, about which the manual says "Agent: sDMA Rd IA", "Error: Functional Inband error".

I don't have much idea what this means or how to fix it.

Linux-SWAT: If you want I can build a kernel that ignores these errors, maybe the system will continue to work?
 
Last edited by a moderator:
I'd still recommend building the version which doesn't start mic needlessly, as it doesn't look like we can solve this properly. Judging on how many games enable the mic from my limited testing, it should solve the problem in something like 80% cases and improve battery time for all them. If you have lots of pending work it's easy to go back with git or do a separate clone at that revision, I think it was commit b11d82b7358209.
Alright, I'll try to make available in the next couple of days a version that changes the mic stuff and adds save game writeback. However I'll also try to add some stuff to service the mic while in-menu, to hopefully try to mitigate this more. Also might have the mic turned off if it's not used for a long time.

In the mean time, everyone please keep pasting the last of the log when this happens, more confirmation that there aren't other problems leading to freezes won't hurt. Also, would like to know if this is happening on all Pandora types and clock speeds, so if you could report that as well.
 
Last edited by a moderator:
Pokemon Mystery Dungeon - Explorer of Sky plays nicely, but if I try to save the game says that it fails.
 
Last edited by a moderator:
Back
Top