Shop OBEX P1 Docs P2 Docs Learn Events
Q&D debug using VGA — Parallax Forums

Q&D debug using VGA

Peter JakackiPeter Jakacki Posts: 10,193
edited 2007-11-20 01:38 in Propeller 1
Here's a quick and dirty debug that you can use if you have a TV or VGA connected. I needed to see what was happening to a wide area of memory in real-time. The idea is to get the video display cog to display from anywhere in memory so that you can pass it an address and the screen will monitor all the bytes in that memory region constantly.

What I did was added a method to vga_Drive that is called with the memory address you wish to display on the screen. In FemtoBasic I added a command called "SCREEN" so that I could set it interactively thus "SCREEN=0" to display the memory at 0 for instance. My version of FemtoBasic includes multiple console device selection so that I can talk to it via a terminal while I use the screen for debugging.

In the picture you can see the input buffer showing "SCREEN=SDVARS" which is the last command that I typed in so that the top left of the screen is showing the FAT16 variables and buffers. You can also see how dyslexic I am as I keep typing in "SCRENN" and then backspacing to correct. Down the bottom of the screen it looks a bit blurred because those variables are rapidly changing.

It's quick, it's dirty, and it does the job.


PUB debug(basePin,mem)                  ' Default initialization
  return startX(basePin, mem, colors, cursor, sync)  




*Peter*
640 x 480 - 119K
Sign In or Register to comment.