12/23/2024: Localization News - Team Innocent

PC-FX Localization for Team Innocent is released, a pre-Christmas gift!! In a twist, it feels like the NEC PC-FX got more attention in 2024 than any other time I can remember! Caveat: The localizers consider the "v0.9" patch a BETA as it still faces technical hurdles to eventually subtitle the FMV scenes, but they consider it very much playable.
github.com/TeamInnocent-EnglishPatchPCFX
x.com/DerekPascarella/PCFXNews
Main Menu

PCEmon - an RS-232 monitor / debugger on the PCE

Started by ccovell, 08/30/2015, 11:18 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

ccovell

Hi, folks.  I had a bit of fun developing a serial monitor that I call PCEmon.  This is a tool for hackers/developers, but it also has some useful features for non-technical people as well.  Some features:
  • Back up BRAM (save-files) to your PC, edit them, save them back to the PC-Engine (finally!)
  • Upload your own code to RAM and run it.  Upload larger files to CD-RAM and run them.
  • Freeze a game in progress and view its screen data or RAM.
  • Resume a frozen game as-is, or resume from an uploaded savestate.
  • Search for and Activate RAM-freezing trainers for cheating in games.
  • Upload image data to VRAM for viewing on the actual hardware.
  • Hex dump or Binary dump any part of the PCE's address space.
  • Upload data to any part of the PCE's address space.
  • PCEmon can run as a stand-alone ROM or be embedded in games (eg: CD System Card.)

More information is here: chrismcovell.com/PCEmon/

Updated version 10/25/2015

And now, some pics!

IMG
IMG
IMG

dshadoff

Wow !  Cool stuff Chris !
This is exactly the kind of stuff I was using to debug my machine language stuff in the 80's.

A couple of questions:

1) Did you build a converter for your RS-232 ?  Or, "how does one know whether their RS-232 is 12V or not ?"  This was originally one of the things that the Develo Box did - provide a compliant conversion layer.  Is it perhaps mainly the difference between 9-pin and 25-pin variants ?

2) What's the default baud rate for the session startup ?  I see that it's configurable, but the old-fashioned standard rate of 9600 baud sounds a bit high to be stable for long transfers.

-Dave

Gredler

#2
This looks awesome,  thanks so much for sharing this!

esteban

You had me at "back up BRAM to PC"...

 IMG
IMGIMG IMG  |  IMG  |  IMG IMG

elmer

Very cool stuff!  :D

I'm a bit concerned with the advice about being careful to not hook up you PC Engine to a PC that uses 12V serial ports.

RS232 is basically a 12V standard ... AFAIK nearly all PC serial ports will be 12V!

I seem to remember that some manufacturers did run them at 5V (right at the edge of the specification), but I don't remember it being all that many.

It might be a good idea to recommend that people use a nice, cheap FTDI USB-to-5V-serial adapter to help avoid people frying their PC Engines.

Here a decent one ... https://www.sparkfun.com/products/9718

Psycho Punch

My hero.

 now to learn how to use it in projects to debug stuff.
This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" at Neo-Geo.com
For a good time reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He too ran scripts to steal/clone this forum which blew up the error logs! I deleted THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp

TailChao

Very nice work, however I would really recommend using a MAX232 or similar level shifter so you don't have to worry about the RS232 connection being one of the out-of-spec 5V ones, and to protect the PCE.

ccovell

Quote from: dshadoff on 08/30/2015, 12:08 PM1) Did you build a converter for your RS-232 ?  Or, "how does one know whether their RS-232 is 12V or not ?"  This was originally one of the things that the Develo Box did - provide a compliant conversion layer.  Is it perhaps mainly the difference between 9-pin and 25-pin variants ?

2) What's the default baud rate for the session startup ?  I see that it's configurable, but the old-fashioned standard rate of 9600 baud sounds a bit high to be stable for long transfers.
Yes, the official RS-232 spec is dangerously high for the PCE, so users will have to either test their port's output with a multimeter (oscilloscope would be better), use a USB-to-5V-serial adaptor, build in a MAX232, or grit their teeth and ride the voltage rails like a cowboy.  ;-D

I've included 3 assembled versions with different baud rates at startup.  9600 is the slowest speed, in fact the PCE's CPU is so fast, 115200 bps or higher can be achieved but that's a little bit of overkill.  I've dumped 128K of ROM at 57600 just fine, but I've noticed that VRAM uploading at that speed produces a few errors, so that's the timing limit for banging bytes to the VDC reliably.

ccovell

Well, it's almost that easy, but that is an FTDI TTL interface... so instead of 2, 3, 5 on the 9-pin D-SUB, it looks like 5, 4, 1 on that 6-pin Molex connector, according to the PDF on that page.  Be sure to locate the correct pins by colour or numbering!

Arkhan Asylum

This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

ccovell

OK, I've updated my page with a test version of PCEmon that should/may run for people who buy FTDI TTL cables.  Someone with such a cable please let me know if PCEmon works for you.  The TTL version is under "TTL_TEST" in the archive.

Quote from: guest on 09/02/2015, 03:58 AMlol, will this work with my MSX.
As a matter of fact, yes, it should.  One of the computers supported by the original Develo hardware/software was actually the MSX.

Arkhan Asylum

Quote from: ccovell on 09/02/2015, 11:26 AMAs a matter of fact, yes, it should.  One of the computers supported by the original Develo hardware/software was actually the MSX.
Yeah, I know.  I set the MSX + Develo stuff up here a few times to dick around.   This might be a funny thing to try at some point.   My HX-34 has RS-232 on it, because it's awesome.
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

ccovell

Quote from: guest on 09/02/2015, 08:09 PMMy HX-34 has RS-232 on it, because it's awesome.
No, it has RS-232 as standard because it's old.  ;-D

Arkhan Asylum

Quote from: ccovell on 09/02/2015, 08:14 PM
Quote from: Psycho Arkhan on 09/02/2015, 08:09 PMMy HX-34 has RS-232 on it, because it's awesome.
No, it has RS-232 as standard because it's old.  ;-D
I meant that because not all MSX have the RS-232 on it lol. 
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

ccovell

#14
Another update of PCEmon -- RS-232 and TTL versions are in the archive for all baud rates and syscard/CD versions, etc.  If anybody actually has used PCEmon by now, let me know!

I've added one feature - helpers - that let you upload or add (in the ROM) larger external commands.

The one helper I made so far is a .PCX saver -- it saves the current screen BAT in VRAM over the serial port as a .PCX file -- a pixel-perfect screendump.

The dimensions of the PCX file will depend on the BAT size setting in VDC register 9.  use commands v9 00, v9 10,... v9 70 to adjust the BAT to the correct size.  Usage for the helper command can be seen in the instructions on my page (# <-- helper command).

https://www.chrismcovell.com/PCEmon/

https://www.chrismcovell.com/PCEmon/PCEmon.zip

examples of the PCX dump:
IMG IMG IMG IMG
--
IMG IMG
IMG IMG

esteban

That's awesome. I know that a person could stitch separate screens together, but these images are gorgeous.

Request to folks:  We need examples from VALIS II :(

Thank you! :)

GUY KAZAMA = badass
IMGIMG IMG  |  IMG  |  IMG IMG

shubibiman

Self proclamed Aldynes World Champion

esteban

IMGIMG IMG  |  IMG  |  IMG IMG

elmer


ccovell

A new helper function:

 #D <AAAA>[BBBB] - Disassemble from address.

IMG

The disassembler gets loaded into $4000- so unfortunately game code mapped in there can't be disassembled (unless you remap it to a higher MPR).

https://www.chrismcovell.com/PCEmon/PCEmon.zip

TurboXray

So how does this work for CD games? Do you hook an interrupt vector to monitor the game pad port? If you're stalling/pausing the game for disassembly, you could always map a code bank into page $0000 (no commercial games put code banks there) to read from page $4000.

 The turbo express uses the gamepad port both for serial communication as well as gamepad controls simultaneously. It first looks to see if there is a single on the port, much-much faster than the gamepad and if detected it reads/writes to it - else just read the data as gamepad input. I don't remember all the details, but it looked like it was replicable on the base systems. Anyway, this is awesome Chris!

ccovell

OK, here's a quick release (19200 baud at start) that allows you to upload a helper command (PCX save, Disassembler) into the PCE's RAM buffer ($2200-) through the "U" command (simple.)

So now PCEmon searches the buffer, ROM, and CD-RAM for a helper signature and reports where it is.

https://www.chrismcovell.com/PCEmon/PCEmonBufHlprs.zip

Bonknuts:
As for CD games, check out the readme inside of the SysCard folder.  Most CD games keep Syscard bank 0 into MPR7 as a BIOS, including reading the joypads.  I just patch the RUN+Select reset code to look for one or both button presses, which then jumps to PCEmon hidden in Bank $15.

As for now, PCEmon can't resume a CD game.  The ROM version also traps IRQ/BRK and restarts in case the user jumps to bad code.

NightWolve

Wow, amazing work as usual, Chris! That you say it took you only "a week" from some vacation time is also amazing... :/ Pretty sure it wouldn't take me a week to do something like that, if ever...

Psycho Punch

Damn the only thing between me and PCEMon on my duo is finding a Mini DIN cable to do the adapter. Wish I didn't have to order it over the internet, I'll probably pay more for shipping than the cable/plug itself.
This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" at Neo-Geo.com
For a good time reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He too ran scripts to steal/clone this forum which blew up the error logs! I deleted THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp

elmer

Quote from: guest on 09/16/2015, 12:24 AMDamn the only thing between me and PCEMon on my duo is finding a Mini DIN cable to do the adapter. Wish I didn't have to order it over the internet, I'll probably pay more for shipping than the cable/plug itself.
As in ...

ebay.com/itm/Apple-Mac-Macintosh-8-Pin-6-Foot-Printer-Cable/181833244900

You used to be able to get them cheaper, but at least this one is an old quality-made cable.

ccovell

Quote from: guest on 09/16/2015, 12:24 AMDamn the only thing between me and PCEMon on my duo is finding a Mini DIN cable to do the adapter. Wish I didn't have to order it over the internet, I'll probably pay more for shipping than the cable/plug itself.
You can always test it this way first:

IMG

ccovell

I've put up an updated version 1.25.3 of PCEmon.  at: chrismcovell.com/PCEmon/

What's new is that the .PCX helper now dumps the whole of VRAM, either as BG tiles or Sprite tiles:

IMG IMG
IMG IMG IMG IMG

As you can see, there are a few options for tilemap width, sprite arrangement, and palette selection.  Check out the command list / instructions page for a full description of the helpers.

Have fun!

ccovell


Gredler


NightWolve

#29
IMG

Psycho Punch

This Toxic Turbo Turd/Troll & Clone Warrior calls himself "Burning Fight!!" at Neo-Geo.com
For a good time reach out to: aleffrenan94@gmail.com or punchballmariobros@gmail.com
Like DildoKobold, dildos are provided free of charge, no need to bring your own! :lol:
He too ran scripts to steal/clone this forum which blew up the error logs! I deleted THOUSANDS of errors cause of this nutcase!
how_to_spell_ys_sign_origin_ver.webp

NightWolve

Cool how everybody applauds/praises in their own unique way. :)

ccovell

<Jimmy_Swaggart_Mode>

The holiest way to give praise is to give generously, my friends.

Our Paypal link is below.

</Jimmy_Swaggart_Mode>

ParanoiaDragon

Quote from: ccovell on 09/29/2015, 12:25 AM<Jimmy_Swaggart_Mode>

The holiest way to give praise is to give generously, my friends.

Our Paypal link is below.

</Jimmy_Swaggart_Mode>
What's funny is, when I read Jimmy Swaggart Mode, for some reason I was thinking of Jimmy Stewart, so, I read it with Jimmy Stewarts voice!
IMG

esteban

#34
Quote from: ParanoiaDragon on 09/29/2015, 01:24 AM
Quote from: ccovell on 09/29/2015, 12:25 AM<Jimmy_Swaggart_Mode>

The holiest way to give praise is to give generously, my friends.

Our Paypal link is below.

</Jimmy_Swaggart_Mode>
What's funny is, when I read Jimmy Swaggart Mode, for some reason I was thinking of Jimmy Stewart, so, I read it with Jimmy Stewarts voice!
Hahhjahjahajajahahajjaja.




Quote from: ccovell on 09/28/2015, 09:23 PMWorking on a new feature.  Here's a short video:
(X) More videos.

(Y) AWESOME MONSTER LAIR, by the way. :)

(Z) Le speakers moderne
IMGIMG IMG  |  IMG  |  IMG IMG

ParanoiaDragon

Yikes Steve, it wasn't THAT funny, but, whatever floats yer' boat! :D
IMG

ccovell

Another video is up... I'll have version 1.27 up soon.
https://youtu.be/UQWTwh-eXm8

In this one I show ADPCM stuff, savestates, and a cheat/Trainer.

TurboXray

This just keeps getting better and better! I need to make an analog switch and a cable, so I wouldn't have to swap in/out the gamepad.

ccovell

OK, the new version of PCEmon (1.27.2) is up on my page.  New commands:

!L / !M / !H : change the horizontal screen resolution
!<  /  !> : copy CDRAM <-> ADPCM RAM
!P n : Play ADPCM sample
T [0/1/2 aaaa dd] : set a Trainer that freezes a RAM address to a value (in-game cheating!)
G [L/S] : load savestate / save savestate / go to savestate.  (It's a save state function.)
Also, "G R" tries to save RAM in raw format at the moment the game was frozen (this is for comparing successive RAM saves to search for cheats.)

chrismcovell.com/PCEmon/index.html
direct link: chrismcovell.com/PCEmon/PCEmon.zip

ccovell

Okay!  A new version of PCEmon is on my page:
chrismcovell.com/PCEmon/

This adds a more elaborate hack to the CD System Card that allows you to activate cheats without needing to use a serial port adaptor or running PCEmon.  Press Select from the CD System Card screen:

IMG
chrismcovell.com/PCEmon/PCEmon_Commands.html#cdmenu


Also, another new helper function allows you to search for RAM cheats Action Replay-style from within PCEmon.  Now no ISO-ripping or PC-based emulator is needed just to search for cheats!  (Well, that makes it quicker for me, anyway.)

An example:
+---------------------------------------------------------+
 | RAM Cheat Search Tool  --  Step 2  --  Press a key:     |
 |   X - exit to PCEmon                                    |
 |   U - upload RAM image                                  |
 |   R - restart search                                    |
 |                                                         |
 | -- Comparison Options --                                |
 |  V - equal to numerical value                           |
 |  E - equal to previous                                  |
 |  N - not equal to previous                              |
 |  L - less than previous                                 |
 |  G - greater than previous                              |
 |                                                         |
 |  S - show search results                                |
 +---------------------------------------------------------+

  L
  78 matches found.

  U
  Okay, send your binary!
  ...(3rd 8K binary uploaded)

  L
  15 matches found.

  S

  2045:  A4  94  8C 
  205C:  3F  1F  0F 
  205E:  3F  1F  0F 
  2086:  FD  F7  F1   
  ... 
  3B90:  AC  A5  73 
  -- end -- PRESS A KEY --

  (And $205C:3F happens to be the code for infinite energy in Spriggan 2. :-)
chrismcovell.com/PCEmon/PCEmon_Commands.html#hlprsrch

ccovell

Since I played through NEXZR last night (not so hard, once you get past levels 3 & 4...) I'll post some real hardware savestates (uploadable through PCEMon in a hacked system card) for the penultimate boss and ending.

chrismcovell.com/data/nexzr_savestates.zip

General instructions for savestates are HERE