GP2X Clever Idea For 6502 Emulators


I'm working (slowly) on an NES emulator... I've actually gotten the 6502 emulation all written out (and quite possibly still buggy), but it's all in C++ (no virtuals or other such to slow it down so hopefully about the same speed as C) right now... it looks like you are very good at ARM ASM and I would like to have an ASM 6502 core at some point, would you be willing to work on it with me?

I have basically none of the PPU done, that's my next big project... :p

EDIT: looking at your older entries, looks like you already have a pretty good multiple 6502/Z80-based system emulator out for PPC... I would also be interested in porting that (or if you wanted to port it yourself, or whatever, I'm confused), since there's a good 50/50 chance that my code will never actually work :lol:
 
Nice trick. It should carry over to any pointer addition with fixed offsets, unfortunately pointer subtraction wouldn't work the same way.
 
I looked at PocketNES... the source code was reasonably scary. I might try it again sometime because it would be blazing fast on the GP2X.
 
bitbank said:
Today I released one of my many cpu emulator optmization ideas. Have a look:
Larry's Personal & Tech Ramblings



A while ago I realized you could do a similar trick for the paired registers in z80 and x86 (don't recall exactly which processor I was thinking of...): store the low register in the upper bits and the high register in the lower bits. When you need to treat it as a paired register, rotate it around to do the math. If you need them separate, just mask it off. I don't think I bothered to look to see if anyone was already doing that.
 
Last edited by a moderator:
Hi bitbank. Enjoyed your ramblings :)

I know exactly where you are coming from .... It's like us programmers are kindred spirits littered across the planet ! I still remember that buzz I got as a teenager getting split screen scrolling working in assembler for the C64 for the first time at about 3.00am, and realising it was what I wanted to do with my life :D
 
Back
Top