So I've gotten myself all set up with PSP dev. I have the libraries, SDK and Eclipse for the IDE. Everything was written for Linux so I'm running on my Ubuntu partition. I've managed to compile programs and I've gotten past the Hello, world! stuffs.
Now I'm looking at implementing my first CPU core using MIPS assembler. Seeing as you've written one or two cores of your own I just wanted to bounce some ideas off of you.
So here's my first idea. Upon initialization of the program I allocate memory to mirror the memory available to the CPU I'm emulating (5A22 aka custom 65c816). I also allocate memory to store the registers. Once execution begins I load up the initial state of the registers from memory and put them resident to the many available registers of the Allegrex (PSP's custom MIPS32 processor). I then interpret incoming opcodes and manipulate the registers almost as if it's the emulated CPU performing the activities itself (and taking advantage of the speed). When it comes time to perform other duties (give up the CPU, run another emulated processor, etc.) I just save the contents of the registers to memory to perform a pseudo context switch.
I'm sure things will change once I get into the nitty gritty. These are just my initial thoughts. I'm far from effective in MIPS32 ISA. I'm going to spend my time writing functions to emulate the opcodes of the SNES's main processor. I think the PPU needs the help more but I'm more comfortable with the 5A22 documentation.