This is a listing of the current commands in PCEmon. Please note that all numerical values required by commands are in Hexadecimal. Required command options are traditionally shown enclosed in angled brackets: <value>, while optional command options are in square brackets: [option]. | ||||
+-----------------------------------------------------------------+
|
|
|||
|
|
||
This simply lists the command overview that you see at the top of this page. | / .... (command overview gets printed) |
|
|||
|
|
||
These are a bunch of miscellaneous commands that would help the more technically-inclined, so I'm hiding them here:
|
!L .... (screen resolution set to 256 wide) |
|
|||
|
|
||
This will show you (and change) where the program output goes. By default, program output goes to the screen and out the RS-232 port to your computer. "Echo" means each letter that you type also gets echoed back to your computer's terminal program. When dumping binaries from the PCE, you'll want to turn Echo and RS-232 off beforehand, so that your typing, etc, doesn't get saved alongside the binary file. When examining screen contents or VRAM, you might want to turn Screen output off. *IMPORTANT* If you use a terminal program that isn't interactive, ie: it has a text entry line that doesn't get sent over the serial port until you hit Enter, you should turn OFF echo. Otherwise, incoming characters to PCEmon will get lost or corrupted. (This is not a bug; echo means it sends back whatever came in over the serial line as soon as it receives it (which, obviously takes an equal amount of time to send back.) |
O Output Device(s): SCREEN RS-232 [ECHO ON] O S Output Device(s): RS-232 [ECHO ON] ORE Output Device(s): SCREEN [ECHO OFF] |
|
|||
|
|
||
PCEmon will start out at some default baud rate, but you can kick it into a higher or lower speed. Of course, you won't be able to read the message through your terminal right after the baud rate has changed, so the message will be output to the screen only. Obviously, after you have changed to a new baud setting here, change your PC's serial port / terminal to the same speed. | B 0 Baud Rate: 9600 bps |
|
|||
|
|
||
The hexdump will print by default 24 lines onscreen before it pauses and waits for a button press to either continue or cancel the hexdump. With this command you can set the pause to be more or less frequent. Or, if you set the pause to 0, it won't stop at all during a hexdump. | P 10 Hexdump Pause now $10 |
|
|||
|
|
||
This will change the on-screen palette for text and the background to one of several themes. Use the one you like. |
|
|||
|
|
||
Version 1.27 of PCEmon adds a form of cheating that I'm sure you're familiar with: Action Replay-style cheat codes! You can activate between 1 to 3 cheat codes (in slots 0, 1, or 2) that a CD System Card, hacked with version 1.27 of PCEmon, will keep active during CD games. First, of course, you start up your hacked System Card, and press Select (or Select+Run, whatever) to start up PCEmon, hopefully anywhere you want: in the Syscard menu, on the game's title screen, or in-game even. Then after connecting the serial adaptor to your PCE, invoke the Trainer command in PCEmon. Finally type 'G' to Go back to the game, and swap the PCE joypad back in. If the border around the screen is a dark blue, the Trainer is working! Note that you can also optionally enable cheats through a hacked CD System Card that I recently made. Where do you get cheats from? Well, look for PCE RAM hacks online, or use the G R option several times in a CD game, then search for them using the new # T Trainer Search. |
T 2 3CF5 09 Trainer (Cheats): x x $3CF5:09 T Trainer (Cheats): x x $3CF5:09 T 2 Trainer (Cheats): x x x |
|
|||
|
|
||
Although the standard commands are built-in to PCEmon's startup bank, you might want to load in larger one-time functions -- for example, things like a disassembly or screen dump. So, this command will search through the buffer and all the banks (either ROM or CD-RAM) to find the signature of these optional helpers. The ROM-based PCEmon probably has the helpers already there, but you'll have to upload them into CD RAM yourself when using PCEmon that's embedded in a CD System Card. |
># |
|
|||
|
|
||
This shows a HEX and ASCII representation of any address in the CPU's memory map. Note that RAM usually is between $2000-$3FFF, ROM is usually $4000-$FFFF, and I/O is $0000-$1FFF (not really useful to read a whole range of this.) You can examine VRAM also by specifying its word address, ie: 64K of VRAM ranges from $0000-$7FFF. Any of the MPR banks (00-FF) can be dumped (all 8192 bytes in one shot) by specifying the starting bank and optional finishing bank. CD-RAM for example is in banks $68-$87. I've made the hexdump round up to the next 16 bytes, so that by typing H 2000 4000 you can view all the RAM (you could type H 2000 3FFF if you really wanted to, though.) Every 24 lines, the hexdump will pause and wait for you to press <SPACE> to continue the dump. Or you can press any other key to stop the hexdump. You can change this pause setting with the P <dd> command. |
H 2000 2200 ... (RAM from $2000-$21FF is shown) H V 1000 1080 ... (256 bytes of VRAM from $1000 to $107F is shown) H 80:81 ... (CD-RAM banks $80 and $81 are shown) H 01: ... (ROM bank $01 is shown) |
||
|
|
|||
|
|
||
This dumps any address in the CPU's memory map directly as a binary through your PC's serial port. Note that if you set the dump range to a large value, it could take a long time. It's best to turn off RS-232 messages and Echo through the O <R/E> command prior to dumping the binary (as you would be logging it using a terminal program on your PC.) Any of the MPR banks (00-FF) can be dumped (all 8192 bytes in one shot) by specifying the starting bank and optional finishing bank. |
D 4000 FFFF ... (dumps the current ROM/CD-RAM space) D V 0 8000 ... (dumps all VRAM) D 68:87 ... (dumps all (Super)CD-RAM banks) D 00: ... (dumps ROM bank $00) |
||
|
|
|||
|
|
||
You can write one or more hex values into a specified address with this command. | M 2200 A9 80 53 80 4C 00 E0 ...(writes some code to the buffer at $2200) M 0402 00 01 M 0404 FF FF ...(writes to the VCE and sets the border colour to white) |
|
|||
|
|
||
This blanket-fills a region of memory with a single value. | F 4000 DFFF 00 ...(zeroes-out all RAM(?) in the above memory range) |
|
|||
|
|
||
This command allows you to upload large binary files from your PC over to the PC-Engine. PCEmon will wait for the first byte to come over, and then will write it and successive bytes directly to the specified address or memory range until it detects a gap in the upload (ie: the file has finished.) If you don't specify a destination address, the binary file will be put into PCEmon's buffer at $2200-$3FFF, and the buffer size will be set to the amount of bytes received. The buffer size is limited to $1E00 bytes, however. |
U Okay, send your binary! |
|
|||
|
|
||
This command will send the CPU to the subroutine that you specify the address to. Be careful, though, because if there is no code there or the routine never exits with an RTS ($60) instruction, control might never return to PCEmon. PCEmon keeps stored variables for the A, X, and Y registers, as well as for MPR7, and it will load up these registers and the MPR right before jumping through RAM to your address. This is how you can set entry conditions (and a different "Jump MPR7" for mapping in ROM/CD-RAM) when you have your own code you want to take over the system with. If the code you jump to hits a BRK ($00) instruction, then PCEmon should restart, letting you know of this. The "PC" register in the register list should show where the PC was when the BRK occurred. |
J 2200 PC A X Y NVTBDIZC SP MPR 0 1 2 3 4 5 6 7 (J7) EA25 00 02 01 10010100 F6 FF F8 03 04 0C 0A 04 00 00 ...(jumps to some code you have at 2200, and the program returns) 8 68 J E000 ...(sets MPR7 to $68 right before a jump to, effectively, $68:E000 ...but never returns) |
|
|||
|
|
||
PCEmon saves the CPU's state in RAM on startup, which allows you to freeze a game, view memory, etc., and then resume the game (hopefully) exactly where you left off, like an emulator's save state function. (The "R" option for this command tries to save the full 8K RAM region as it appeared right when the state was frozen, so that you can compare successive Raw RAM dumps on your computer (ie: for finding cheats), or even in PCEmon using the # T Cheat Finder command.) If you alter the memory buffer after starting up PCEmon, the save state will be lost, so it's best to Save it to your computer first. Later, you can re-upLoad it into PCEmon and then Go back to the saved game. Read about the full save state procedure for more details. |
G S .... (save state is dumped to your computer) G L Okay, send your binary! |
|
|||
|
|
||
This is similar to the Upload command above, but you can define a preset size for the upload beforehand. The destination is always the $1E00-byte buffer in RAM at $2200 | L 800 |
|
|||
|
|
||
This saves the contents of the buffer as a binary back to the PC over the serial port. It won't do anything if there's nothing in the buffer. |
|
|||
|
|
||
This will simply do a hexdump of the current buffer contents. | C 2200: 4855424D 0088F284 00000000 00000000 |HUBM............ 2210: 3000CFF9 00004E45 55544F50 49413120 |0.....NEUTOPIA1 |
|
|||
|
|
||
This will write the current buffer contents to an address in RAM or VRAM. | W V 0 ...(buffer copied to the start of VRAM) W C000 ...(buffer copied to $C000, naturally.) |
|
|||
|
|
||
This will copy the current palette RAM in the VCE to the buffer ($400 bytes in size). |
|
|||
|
|
||
This will copy whatever's in the buffer back to the VCE palette, at the specified index. | ) ...(palette copied to index 0) ) 100 ...(palette copied starting at the sprite palette) |
|
|||
|
|
||
This will copy the contents of the BRAM save file (in bank $F7) to the buffer. Its size will be $800 bytes. This routine doesn't do any checking to see if there's a CD unit or Backup booster, etc. present; it'll simply copy the bytes assuming BRAM. You should next use the S command to backup the buffer to your PC. |
|
|||
|
|
||
This copies the buffer back to the BRAM, overwriting what was there, so be careful! It'll only write to BRAM if the buffer is exactly $800 bytes. |
|
|||
|
|
||
This will set a stored copy of the main registers to a certain value. These values will be used when the CPU jumps to a routine using the J <aaaa> command, and they will be updated with new values when that routine returns. | Y 44 |
|
|||
|
|
||
This will copy whatever value you give it to the specified MPR register. Be careful, because usually touching the MPR0, MPR1, and MPR7 registers will cause a CPU crash or freeze! | 2 68 |
|
|||
|
|
||
If you change MPR7 willy-nilly, PCEmon will definitely crash, because $E000- is where it runs from. So if you want to delay an MPR7 write until the point that you jump to your own code (wherever it is), you should store the MPR7 value of your code location in this "Jump MPR7" variable. See the J <aaaa> command for more. | 8 80 |
|
|||
|
|
||
This will write a word value to a specific VDC register. Check out the PCE documentation for what each register does. | V 7 0080 ...(sets horizontal scroll to $0080) V 5 CC ...(turns on Sprites, BG, and interrupts) V 9 30 ...(changes the BAT width & height to 128x32) |
|
|||
|
|
||
This will show the CPU registers on startup, as well as the current MPR values. | R |
|
|
||
I've hacked the code of the Super System Card 3.0 (Japanese ROM patch for now; no guarantee about the US version) so that cheat codes are usable without starting up PCEmon. Once you have the hacked system card ROM working on your PCE/Turbo (through an Everdrive or flash cart), press Select from the System Card screen, and you'll be able to move the cursor down to the cheat codes. Controls are:
Like the T command, the border of the screen should be a dark blue as long as the codes are active. |
|
|
|
||
PCEmon can save most of the PCE's memory space so that you can resume a game mid-way through it. This is especially useful for the 8K version of PCEmon that can be hacked into a System Card, so we'll use that. For Saving a savestate:
And you're done. It should be safe to turn off your PCE or do whatever you like. |
1. 2. 3. O RE 4. G S 5. D 68:87 6. !< D 80:87 7. ( S 8. D V 0 8000 |
||
Loading a savestate is the reverse of this process. Start up PCEmon and make sure it's working, then:
|
1. U V 0 2. U ) 3. U 80: !> 4. U 68: 5. G L 6. !L or !H , V 9 10 or V 9 40 etc. 7. G 8. |
|
|||
|
|
||
This will show the HuC6280 opcodes starting at the specified disassembly address. If the disassembly starts to look strange, then you may have not aligned the disassembly correctly with the start of the instruction. The disassembly will pause after a full screen's worth, using the same setting as defined in the Pause command. The disassembler gets loaded into $4000-$5FFF, so if you want to disassemble code in that region, I'd recommend uploading and running the version that goes into the buffer from $2200. |
# D E6A6 E800 |
|
||||||||||||||||||||||
|
|
|||||||||||||||||||||
This command will send a pixel-perfect binary dump of the current contents of the background map, or VRAM (arranged as BG or Sprite tiles), over the serial port as a .PCX file. A few options can alter the width of the BG tile dump, arrangement of the sprite tiles, and which palette to use for the VRAM dump. | # X |
|||||||||||||||||||||
|
|
|||
|
|
||
After dumping 8K of RAM using the G R command, you can search through this RAM to find certain byte values, or compare successive RAM dumps for differences. It works exactly like the Action Replay / Game Shark series of cheat devices, so hopefully you're familiar with them. This command can be loaded anywhere (to the buffer or to a (S)CD-RAM bank), but it uses CD RAM from banks 80-86 while searching. This is an interactive cheat finder, so you need only press a key to issue a command. The commands available to you will change depending on how many 8K RAM dumps you have uploaded in the cheat finder. |
# T |
||
|