In this session, I had the game Indiana Jones and the Temple of Doom running in VICE C64. My mission here was to walk around the scrolling screens and dropping my player to his death to force the game to see the new changes I modified in the code. Eventually after cascading Indy over the wall and watching him die, I was able to finally see the border color change to screen. A simple change, but proven method showing the result was received.
The Infiltrator tool gives the user the ability to instantly skip to any statements that are resident in memory. This is done by quickly searching through a mass of code and setting a match on the selected menu to the right in the Memory window area. This is divided into sections listed as CIA 1, CIA 2, Graphics, Interups, Sprites, SID, Screen RAM, Color RAM, and Clear Screen to name some of the primary ones. You can also utilized the up and down arrow keys in the Memory window to quickly find a bunch of occurrences identified by that section.
The next application I choose to focus on in order to provide more emphasis into evaluating an assembly language listing, is a tool caled Regenerator 1.7. There is a Search button that when clicked on the right allows you to Jump To Address. Essentially this is the equivalent of the Memory finder feature in Infiltrator. A window pops up requesting a hex address. As an example, I entered DC00. Next after Regenerator retrieved the location, I went on to explain how the tool utilizes comments at the register locations. This makes it easy to see what part of memory is being used. So in this example, it found the area for the joystick port with the comment of “CIA1: Data Port Register A” as the label.
Now examining the code in the Disassembler window it copied the joystick location to another register. The code for this is LDA $DC00 STA $7573. My inquisitive mind next had to see what other locations contained the memory location $7573. This would tell me those are the areas that control Indiana Jones movement when the user is moving the control. Now since I also had the code previously copied to a Microsoft Word document, I was able to quickly search using the control + F option and locate the exact areas in memory utilizing the data register $7573. This is indicated in Word by a yellow highlighting over the text. The screenshot example appended to the right pane here validates my discovery that the joystick was being used. The code shows LDA $7573 AND #$01 BNE L_BRS_($6D22)_($6D18) which confirms that the user is pressing the joystick in the down direction.
The next thing I started doing was adding comments to the Word document to mark what that routine area in memory was responsible for. I went forward and verified that since values were being saved by setting $7575 with a flag – LDA #1 STA $7575, that these are central to tracking the movements of the player instead of having to repeat a sequence of joystick routines all over the place. This not only reduces the size of the program, but it saves cycles as well. I continued through until I found all of the routines for the joystick for the movements left, right, up, and down. The chart above verifies all of the proper flags accomplished to ensure that the joystick is receiving movements (or considerably the potentiometer ports confirmed electrical signals, from a hardware perspective).