![]() | ||
Views: 24,212,740 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 02-09-25 05:52 AM |
Guest: |
Main - Posts by PoroCYon |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 1/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Some that need to be confirmed:
DSP
|
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 2/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
sudo apt-get install libsdl2 (or maybe 'libsdl2-2.0-0' instead of 'libsdl2') |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 3/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Try running "ldd path/to/melonDS", melonDS switched from pcap to slirp, ldd might tell you you're missing the libslirp libraries.
Or you can try installig libslirp and see if that worked. |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 4/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
that or, if you're lucky, it's only your OS scheduler messing things up. you could try upping the priority of the melonDS process, and try switching to a less CPU-intensive encoder on the OBS side |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 5/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Posted by Generic aka RSDuck either that, or the "window idle" event firing less often for the same reason (if that's being used to run a main loop iteration, but I'm not sure about the latter) |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 6/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
I can do Dutch (and Lojban), and you know the answer to the other questions I think. |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 7/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Which Qt version do you have installed? Which distro + version are you running?
Because to me this sounds a lot like https://github.com/Arisotura/melonDS/issues/751 . |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 8/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
IR cartridgesIR cartridges seem to work as follows, but I'd like to have someone else to verify this (seems to work with HGSS, BW and B2W2 carts, idk about others):Everything automatically happens at 115200 baud, 8n1. There seem to be three main SPI commands that are sent to what normally would be the savegame SPI bus, there's a fourth command to perform actual savegame operations. All transfers happen at 1 MHz (serial AUXSPI mode) unless indicated otherwise. The cartridge needs to be powered on, but nothing more besides this. No header reading or KEY1/KEY2 init, and so on. (I rebooted the cart with SCFG_MC and started doing SPI commands immediately afterwards, seems to work fine). This seems to be relevant for pretty much all NTR-031 carts, so Pokémon HGSS, BW, B2W2, "Walk With Me" and similar games, ... The commands:
Allegedly, the chip in carts responsible for IR is another H8/38606F (or 38602F?) (connected to the SPI bus on one side, and to some IR leds or so on the other). [UPDATE: 2021-03-01: added info on cmd 0x03..0x07, and non-Pokémon games. info from nocash, not me.] |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 9/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Linux binaries distributed here are built using flatpak in order to have less hassle with dependencies etc. If you want a (much) smaller binary, you can always check if your distro has a melonDS package, or you can try compiling from source. |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 10/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Recently I've done some timing tests with the DSi's NDMA units. These are all my findings:
NOTE: all testing has been done as main RAM->main RAM (functional), or as TIMER0_DATA->main RAM (priority/timing). CPU timing comparison was done with TIMER0_DATA->DTCM. I did not yet test the interaction between the DSP's DMA capabilities, NDMA, and the ARM9. Function
Access ordering and priority
Timing stuff
|
(post in restricted forum) |
(post in restricted forum) |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 13/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
(very late reply, I know, oh well)
Posted by Digifiend Technically yes, but, trying to dump the ARM9 one has proven to be much harder than the ARM7's. It'll take A While (no ETA) even n months later. |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 14/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
In the past I once tried overlapping NWRAM and the IO space (by the request of, either profi200 or normmatt iirc), and reads always returned IO stuff. maybe a write would go to both, didn't test that, but I think it did end up at at least the IO registers, iirc. (Testing wasn't very thorough, though, we mainly wanted to know if we could exploit possible IO r/w redirection stuff, and the result is 'no'.) |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 15/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Aptina MT9V113 internal MCU stuffThe Aptina cameras have an internal 68HC11-based MCU. Parts of its address space can be accessed through the XDMA registers (0x98c, 0x990, reachable over I2C) There's a "physical" address range (0x0000..0x1fff) and a "virtual"/"logical" one (0x2000..0x3fff). The former can be used to access "system" and "user RAM" (resp. 0x0000..0x03ff and 0x0400..0x7ff), as well as "Special Function Registers" (SFRs), basically just MMIO regs of the HC11. The latter allows access to the variable spaces of several "firmwares"/"services" running on the MCU, used for autofocus, autowhitebalance, etc. Each camera has a separate HC11. The above is already kinda known, but now for the new stuff. (Keep this section of GBATEK at hand while reading this, as I guess only a handful people ever looked at the cameras to begin with.) (NOTE: as the HC11 is an 8/16-bit MCU, pointers etc. are 16-bit (its address space is 16 bits wide). Also, it's a big-endian architecture, keep that in mind.) SFRs
Address translationAs alluded to in the previous part, SFR 0x1050 is used to set the mapping. Its value is 0x0100, which means we can access and modify the "pagetable mapping" over I2C. (I'm using quotes here because it's far from anything like a real MMU.) At 0x0100, a list of 16 pointes can be found: 0x0140 (MONITOR), 0x0000 (SEQ), 0x005d (AF), 0x0165 (AWB), 0x01d4 (FD), 0, 0, 0x282 (MODE), 0, 0, 0, 0x0220 (HG), and then more zeros. This matches what you'll find when dumping the 0x2000..0x2fff area. While system RAM has space for 16 more pointers (starting at 0x0120) for addresses 0x3000..0x3fff, in practice these are mirrors of the 0x2*** range. Setting a pagetable entry to an address of 0x2000 or higher seems to return 0 values, maybe there's a carveout, or maybe there's just nothing behind those addresses. Additionally, it does seem to mirror the upper half of memory (0x8000 and up) to the lower half, which is *quite* suspicious as a datasheet says there's 32 kilobytes of firmware ROM, and the exception vectors of the HC11 are at 0xfffe etc. (6502-style) So I'm betting the firmware ROM is in the upper half of MCU memory. System RAM layoutWith the above, we can start building a map of the system RAM space. As one datasheet (links at the end of this post) alludes to the stack of the HC11 firmware also being in system RAM and being 128 bytes in size, it's not too hard to guess where it is.
User RAM (0x0400 and on) doesn't seem to be writable, sadly. Or maybe I'm missing some kind of magic switch. Running code on the HC11A datasheet alludes to using the MONITOR variables to run code: arg1 is the pointer of the code to run, arg2 an optional argument (where is this put in? the accumulators?), and then set cmd to 0x01 to start the code. Sadly, this did not work for me: it resets the MCU, while doing not much else. Maybe it needs some kind of CRC (which the datasheet also alludes to), or maybe the feature is just locked away. (EDIT: maybe the resetting thing would be added to have the XDMA thing avoid messing with internal state. But does using the virtual addressing mode bypass it? Would chaining using another peripheral (the "ring bus access" maybe?) be able to be used as a bypass? I haven't tested.) Then I tried putting some shellcode in low system RAM and filling the stack with bad addresses (that is at the same time a NOP sled). Sadly this didn't work either, as the MCU also got reset before it got to execute my code. Maybe I'm triggering some kind of (bad) crash, or maybe there's a safety mechanism that automatically resets everything. (I hope it's not the latter.) (MCU resets seem to clear/reset the pagetable, stack (0x0380 and up), and some of the "logical variable" spaces in system RAM. 0x300..0x37f seems to be preserved, as well as some other small places in low system RAM.) Maybe this is a fun challenge for someone else here? ![]() P.S. I used Pk11's dsi-camera proof-of-concept as a base to mess with the cameras. Not really publishing my code because it's mostly just a spaghetti of I2C accesses and FIFO ugliness. I used vasm as HC11 assembler, though be aware that it gets some opcodes wrong, check with A09 (which doesn't seem to be able to process "org" directives) and this and this opcode listing I found. For more info on the HC11, see this (original DIP CPU info) and this (more modern microcontroller impl, only gave it a cursory glance, idk how useful it is outside of the instruction set info). Datasheets
|
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 16/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
Hi, do you have any update on this? I just wanted to start on implementing a gdbstub myself, but if you have something working already, I could probably save myself the trouble. |
PoroCYon |
| ||
![]() Half-eaten melon Normal user Level: 11 ![]() Posts: 17/24 EXP: 5120 Next: 865 Since: 12-01-19 From: .be Last post: 545 days ago Last view: 542 days ago |
FYI, I ended up writing my own. Feedback would be nice. |
(post in restricted forum) |
(post in restricted forum) |
(post in restricted forum) |
Main - Posts by PoroCYon |
Page rendered in 0.143 seconds. (2048KB of memory used) MySQL - queries: 23, rows: 110/110, time: 0.072 seconds. ![]() © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |