[Tuxnes-devel] CPU core graft
Brought to you by:
tmmm
From: Jim U. <ji...@3e...> - 2001-02-23 16:05:41
|
Hello, I'm looking at porting tuxnes to the Sega Dreamcast. The first stumbling block is of course the heavy dependence on the x86 instruction set, due to the dynamic recompiler. For this reason, I have grafted a portable cpu core (currently Marat's M6502) into tuxnes. Since I just got it running yesterday, I haven't completely genericized the interface to allow plugging in any cpu core. However, any core with the equivalent of read, write, and loop (irq check) operations should now be really easy to port. The changes to get Marat's core to work were: implement Read6502, Write6502, and Loop6502 operations; create C functions to perform certain calculations previously done (in assembly language) in INPUT:, OUTPUT:, NMI:, and the MMC asm linkage functions; and a one-line change to M6502.c for convenience. There might be other minor stuff. I'm pretty sure Marat's license is incompatible with the GPL, but the glue between tuxnes and the new cpu core, being written by me, is. ;) I've seen slight graphical glitches (the last line of the status bar in Zelda sometimes gets corrupted, and the map in Wizards and Warriors is slightly corrupted). These may be my fault, or the tuxnes code may have been dependent on peculiarities in the old asm code [tuxnes has really WEIRD timing code, so I wouldn't rule this out]. Let me know if anybody is interested in looking at the code, even in its kind of haphazard state. Jim -- ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |