Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
mg_notes:iie_card:weird_stuff [2017/08/07 12:46]
M.G. [Other Weird Instructions]
mg_notes:iie_card:weird_stuff [2018/12/21 17:53]
M.G. [Slot Scan Scam]
Line 19: Line 19:
 </​code>​ </​code>​
  
-$02 is a two-byte NOP on the 65C02. ​ Interestingly enough, when the processor on the Card executes the sequence $02 $01, it produces the configured beep sound.+$02 is a two-byte NOP on the 65C02 (if it was an '802 or '816 it'd be a COP).  Interestingly enough, when the processor on the Card executes the sequence $02 $01, it produces the configured beep sound.
  
 Try this in the monitor: Try this in the monitor:
Line 39: Line 39:
  
 ^ In Routine ^ Address ^ Code    ^ Function ^ ^ In Routine ^ Address ^ Code    ^ Function ^
-| PWRUP   | $FAB4   | $02 $02 | ? (appears ​where standard %%//%%e has LDA #$C8 at beginning of boot slot search) ​+| PWRUP   | $FAB4   | $02 $02 | Loads A reg with $Cn+1 where n = startup slot or $C8 if scan. 
-| PWRUP   | $FAC0   | $02 $03 | ? (appears where standard %%//%%e has CMP #$C0 at end of boot slot search) ​|+| PWRUP   | $FAC0   | $02 $03 | Displays "​UNABLE TO BOOT FROM STARTUP SLOT" if A reg = $Cn-1 where n = startup ​slot or $c0 if scan.  Disappears if screen scrolls. ​|
 | APPLEII | $FB63   | $02 $04 | Display copyright message on screen, disappears if screen scrolls. | | APPLEII | $FB63   | $02 $04 | Display copyright message on screen, disappears if screen scrolls. |
 | BELL1   | $FBDD   | $02 $01 | Play system bell sound. | | BELL1   | $FBDD   | $02 $01 | Play system bell sound. |
Line 93: Line 93:
  
 Hit the left arrow a bunch of times until the display scrolls. **POOF!** Hit the left arrow a bunch of times until the display scrolls. **POOF!**
- + 
 +==== Slot Scan Scam ==== 
 + 
 +The %%//%%e Card lets the user pick the startup slot in the control panel or "​Scan"​ which is the behavior of a standard %%//%%e. 
 + 
 +This is implemented by the sequences $02 $02 which replaces the LDA #$C8 at the start of the slot scan loop, and $02 $03 which replaces the CMP #$C0 instruction that decides loop termination. 
 + 
 +The $02 $02 sequence loads the accumulator with $C8 if scan is selected, or $Cn+1 if a specific slot is selected. 
 + 
 +<​code>​ 
 +*300:02 02 4C DA FD 
 +*300G 
 +C8   (if scan or slot 7 selected, "​Cx"​ if another slot is selected) 
 +
 +</​code>​ 
 + 
 +The $02 $03 sequence behaves as if CMP #$C0 or CMP #$Cn-1 has been executed and if it has, displays "​UNABLE TO BOOT FROM STARTUP SLOT" in the center of the screen in a similar manner to the copyright message. ​ The message is not in Apple II memory. ​ It returns with the flags set as executing the CMP instruction would have. 
 + 
 +My ''​iie.card''​ [[https://​github.com/​mgcaret/​davex-mg-utils/​blob/​master/​iie.card.s|utility]] for Davex can exploit this to determine which slot is configured for startup via the [[https://​github.com/​mgcaret/​davex-mg-utils/​blob/​master/​iie.card.s#​L118|dispslot routine]].