I thought I'd better document the functionality of various switches on the Nexys board, for easy reference:
This switch is handy when in trace mode and you're constantly getting the pc moving away from your current code due to interrupts.
This was mentioned in one of Paul's blog posts:
https://c65gs.blogspot.com.au/2018/01/fixing-various-niggly-problems.html
Fourth, the Nexys4DDR boards thought that they always had an 8KB cartridge plugged in if switch 8 was not set. This was a debug thing I put in when getting the cartridge interface to work some time ago, and of course then promptly forgot about, resulting in a few hours of lost time trying to figure out why on earth I was seeing 30719 BYTES FREE, but no actual data in the mapped cartridge.
Turn Switch 11 on at any time to turn trace-mode on (i.e., freeze the PC, so that you can step-into/over instructions manually). You can turn this on at boot-up time, if you want to step from the initial startup of the machine.
NOTE: (18/02/2018) Switch 12 is no longer used for the hypervisor debug output. It is now triggered via the Shift key on the USB keyboard attached to the hardware.
This switch decides whether Hypervisor debug output will be shown (via the remote serial monitor output) or not.
As for the debug interface, all you need is to put something like:
jsr checkpoint .byte 0,"drce_ignore_lfn_piece",0
wherever you want a checkpoint. You can find the checkpoint routine in kickstart.a65. Switch 12 controls whether the debug messages are output.
Note that the hypervisor checkpoint/debug facility is only in the newer branches (my hypervisor debug one has it). You can also make your code mutate the message string, so that it can include dynamic content.
Note that you cannot start the machine with sw12 on. You can only turn it on after it is looking for the SD card, due to some complications that I have yet to sort out (basically the watchdog has to be setup correctly, and there might be some other race conditions to satisfy). Therefore I would suggest:
0. Make sure you are connected to serial debug interface via USB 1. Remove SD card. 2. Boot with SW12 off. 3. Turn SW12 on when Kickstart message appears 4. Reinsert SD card 5. Watch the fire-hose of checkpoint/debug messages.
Paul.
If Switch 15 is turned on prior to booting up the system, the system will pause after displaying all the kickstart messages (giving you time to read and review them). Simply turn off the switch to proceed with the boot-up process.
While not a nexys switch but a press of keys on the keyboard, this tip from Paul was worth noting:
Alternatively we could make patches for the C65 ROM to achieve this, and pick between which ROM we boot with (already implemented by holding down 0 through 9 on reset).