Author Topic: PCEmon - an RS-232 monitor / debugger on the PCE  (Read 1695 times)

ccovell

  • Hero Member
  • *****
  • Posts: 2245
PCEmon - an RS-232 monitor / debugger on the PCE
« on: August 30, 2015, 04:18:59 AM »
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:
[ul][li]Back up BRAM (save-files) to your PC, edit them, save them back to the PC-Engine (finally!)[/li][li]Upload your own code to RAM and run it.  Upload larger files to CD-RAM and run them.[/li][li]Freeze a game in progress and view its screen data or RAM.[/li][li]Resume a frozen game as-is, or resume from an uploaded savestate.[/li][li]Search for and Activate RAM-freezing trainers for cheating in games.[/li][li]Upload image data to VRAM for viewing on the actual hardware.[/li][li]Hex dump or Binary dump any part of the PCE's address space.[/li][li]Upload data to any part of the PCE's address space.[/li][li]PCEmon can run as a stand-alone ROM or be embedded in games (eg: CD System Card.)[/li][/ul]
More information is here: http://www.chrismcovell.com/PCEmon/

Updated version 10/25/2015

And now, some pics!


« Last Edit: October 25, 2015, 03:18:18 AM by ccovell »

dshadoff

  • Full Member
  • ***
  • Posts: 175
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #1 on: August 30, 2015, 05:08:07 AM »
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

  • Guest
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #2 on: August 30, 2015, 06:18:26 AM »
This looks awesome,  thanks so much for sharing this!
« Last Edit: August 30, 2015, 06:23:46 AM by Gredler »

esteban

  • Hero Member
  • *****
  • Posts: 24063
PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #3 on: August 30, 2015, 06:43:13 AM »
You had me at "back up BRAM to PC"...

 
  |    | 

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #4 on: August 30, 2015, 08:20:08 AM »
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

Punch

  • Hero Member
  • *****
  • Posts: 3278
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #5 on: August 30, 2015, 09:04:53 AM »
My hero.

 now to learn how to use it in projects to debug stuff.
« Last Edit: August 30, 2015, 09:13:00 AM by Punch »

TailChao

  • Full Member
  • ***
  • Posts: 156
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #6 on: August 30, 2015, 09:12:59 AM »
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

  • Hero Member
  • *****
  • Posts: 2245
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #7 on: August 30, 2015, 12:02:17 PM »
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.

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

  • Hero Member
  • *****
  • Posts: 2245
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #8 on: August 30, 2015, 02:22:40 PM »
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

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #9 on: September 01, 2015, 08:58:28 PM »
lol, will this work with my MSX.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #10 on: September 02, 2015, 04:26:59 AM »
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.

lol, 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

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #11 on: September 02, 2015, 01:09:36 PM »
As 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.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #12 on: September 02, 2015, 01:14:49 PM »
My HX-34 has RS-232 on it, because it's awesome.

No, it has RS-232 as standard because it's old.  ;-D

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #13 on: September 02, 2015, 07:10:53 PM »
My 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. 
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: PCEmon - an RS-232 monitor / debugger on the PCE
« Reply #14 on: September 05, 2015, 03:45:50 PM »
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).

http://www.chrismcovell.com/PCEmon/

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

examples of the PCX dump:

--

« Last Edit: September 08, 2015, 04:12:27 AM by ccovell »