#78753 - Mighty Max - Sun Apr 09, 2006 2:56 pm
It's me, Ma...Mighty Max :D
I have made a little Techdemo about using the Arm9 MPU to create a virtual memspace. Several ppl told me that this was impossible/ too complex todo as the MPU is no MMU and does not provide the needed hardware registers (pagetables & fault address register i.e.)
The uploaded demo will proove that this is at least for data access wrong.
The demo contains 2 .NDS files. One should be known by all, it's doublec's Tutorial 1 demo. The second, Paging.nds, implements the swapping.
This is what Paging.nds will do:
- Create a 2 MB swap file. (1MB to cascade the buffer & codespace for itself) and 1 MB virtual RAM at the GBA-Cardspace
- load the demo1.nds into the GBA-Cardspace
- extracts the arm9 binary from the cardspace again and runs it in the controlled environment (start just after MPU init of crt0)
- responds to A+B+R+L keypresses when demo1 is running, no matter if demo1 installes IRQ handler itself (unless it changes the keys IRQ yet)
Every access to a paged memory area will cause the access to be relocated. Every access to a hardware register will inform the Paging.nds to react to it.
There are several points i still need working on. About 80% of all instructions that might access the ram are handled, some thumb instructions as well as LD/STM over a page border are not yet done.
The process locks the GBAMP other FAT devices behind the protection. A emulation of the GBAMP hardware registers should not be a problem.
hrm, looks like my isp has problem with the ftp. I'll upload the archive as soon as the access is up again. For now, just take a look at the yesterday's testrelease (just bin, return from keypressed info not done) http://mightymax.org/Stage1.rar . It will work on none of the emulators, a read/write-FAT_device (supported by chishm's lib) is needed.
If any emulator coder wants to have input of what is needed get it running in emulator too, query me.
_________________
GBAMP Multiboot
I have made a little Techdemo about using the Arm9 MPU to create a virtual memspace. Several ppl told me that this was impossible/ too complex todo as the MPU is no MMU and does not provide the needed hardware registers (pagetables & fault address register i.e.)
The uploaded demo will proove that this is at least for data access wrong.
The demo contains 2 .NDS files. One should be known by all, it's doublec's Tutorial 1 demo. The second, Paging.nds, implements the swapping.
This is what Paging.nds will do:
- Create a 2 MB swap file. (1MB to cascade the buffer & codespace for itself) and 1 MB virtual RAM at the GBA-Cardspace
- load the demo1.nds into the GBA-Cardspace
- extracts the arm9 binary from the cardspace again and runs it in the controlled environment (start just after MPU init of crt0)
- responds to A+B+R+L keypresses when demo1 is running, no matter if demo1 installes IRQ handler itself (unless it changes the keys IRQ yet)
Every access to a paged memory area will cause the access to be relocated. Every access to a hardware register will inform the Paging.nds to react to it.
There are several points i still need working on. About 80% of all instructions that might access the ram are handled, some thumb instructions as well as LD/STM over a page border are not yet done.
The process locks the GBAMP other FAT devices behind the protection. A emulation of the GBAMP hardware registers should not be a problem.
hrm, looks like my isp has problem with the ftp. I'll upload the archive as soon as the access is up again. For now, just take a look at the yesterday's testrelease (just bin, return from keypressed info not done) http://mightymax.org/Stage1.rar . It will work on none of the emulators, a read/write-FAT_device (supported by chishm's lib) is needed.
If any emulator coder wants to have input of what is needed get it running in emulator too, query me.
_________________
GBAMP Multiboot