So ya wanna change the Key-Repeat rate in MacsBug

The following question was asked in the comp.sys.mac.programmer.help newsgroup. I had researched this and wrote up the answer which follows. Hope it helps.

Q: Anyone know how to change MacsBug's key repeat rate? I have a 7100 with one of those PDS G3 cards and to type in MacsBug I have to type very fast to get a single char. Maybe macsbug determines the key repeat rate from a table of speeds of the computers?

A: MacsBug determines the key repeat rate when it first loads. With a PDS G3 card, the accelerator isn't active until the INIT for it has loaded, so MacsBug sets appropriate rates for the unaccelerated PPC 601. Once the accelerator kicks in, these values are pretty wrong, as you've noticed.

  1. Reboot with your accelerator disabled. Trying to set this up with the G3 active is nearly impossible.
  2. You need to determine where the values are stored. Type mbug in MacsBug and determine where the gDefStartRate and gDefRepeatRate variables are. You'll have to look at the variables around them (there are a three or four that mirror the values in these variables. I'm pretty sure I've given you the right variable names to set, but you should double-check for yourself), and determine their offset from mbgLowestGlobal (shown as gLowestGlobal in the mbug display). I ended up dumping a couple pages of memory in order to find them.
  3. You need to calculate the offsets from mbgLowestGlobal to gDefStartRate and gDefRepeatRate. Once you've determined the offsets, try typing
    sl mbgLowestGlobal+yourOffset 2000
    and then mbgDefStartRate to see if it's changed. Once you've set them by hand, you can type mbug to make sure you've got both variables set correctly.
  4. Once you've determined the offsets for sure, build yourself a "firsttime" macro. Mine is:
    sl mbgLowestGlobal+2164 2000;sl mbgLowestGlobal+2168 3000;g
    Save this in a file within your MacsBug Preferences folder. I named the file "firsttime" as a mnemonic.

These values "work" for for MacsBug 6.5.4a6 on a 7100/66AV upgraded with a Sonnet Crescendo G3/250. A different speed accelerator and a different speed motherboard will change the values you need to poke into memory. A different version of MacsBug will change the offsets you need to use. These offsets change every release, so don't even think of trying the numbers I've given you unless you're running the same configuration I am.

Final warning: Poking things into memory is pretty dangerous. This same firsttime macro causes a crash on other versions of MacsBug. The only way around it is to shift-boot and remove the firsttime macro.

This is definitely not Apple-supported or approved. I've submitted a bug report about this, but doubt that it will get fixed anytime soon, since support for third-party accelerators isn't high on Apple's priority list.

Copyright 2009, Dave Polaschek. Last updated on Mon, 15 Feb 2010 14:09:38.