So, I thought I'd test out hacking a PCE game (some simple puzzle game).
The only trouble I'm having at the moment is with HuGo Tracer.
Can't quite remember how to get g8z tracers to log a raw, unfiltered trace.
Also, is there anywhere a document describing the PCE-specific opcodes?
BBR/Si (branch if bit i is/not set?), CLA/CLX/CLY (clear A/X/Y. I'm guessing this is to zero A/X/Y?), TAI/TDD/TIA/TII/TIN (I know they're block transfer instructions, but what do they do?).
I realize TAM to TMA are used to write/read (respectively) bankswap registers, and if I'm reading stuff right CSL/CSH change the clock speed.
OK, first... I'd recommend that you use Mednafen instead of HuGo - Mednafen has superceded it by a lot.
For documentation... start with this:
http://www.emu-docs.org/PC%20Engine/pce_doc/The CPU doc explains all of the opcodes (I think) - you can just gloss over the ones you already recognize (the cycle timings might be a bit different than on other machines though).
And your guesses on what they do (in general terms anyway) are correct.
BBR/BBS - check the nth bit of a ZP location and branch
CLA/X/Y - clear A/X/Y (without upsetting the flags)
TAI, etc. - transfer ('D' = with decrement, 'I' = with increment, and 'A' = alternating - for 16-bit mem-mapped ports. So TIA copies from an area of memory through a 16-bit port like the video processor).
TAM = transfer from Acc to MMR. The operand is a bitmap indicating which of the 8 MMRs to set. Same idea for TMA.
CSH = set clock to 7.16 MHz ; CSL = set it to 1.78MHz
You'll probably want doc's on the video processor and other hardware next... you'll find it in the same place above.
Actually you can download the whole doc's as an archive:
http://www.emu-docs.org/PC%20Engine/pce_doc.zipAny more questions, I got answers.