SNES-Interrupts.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Interrupt Processing Sequence
  2. The interrupt processing sequence is initiated as the direct result of hard-
  3. vare Abort, Interrupt Request, Non-Maskable Interrupt, or Reset inputs.
  4. The interrupt sequence can also be initiated as a result of the Break or
  5. Co-Processor instructions within the software. The following listings
  6. describe the function of each cycle in the interrupt processing sequence:
  7. Hardware Interrupt /ABORT, /IRQ, /NMI, /RES Inputs
  8. Cycle No.
  9. E = 0 E = 1 Address Data R/W SYNC VDA VPA VP Description
  10. 1 1 PC X 1 1 1 1 1 Internal Operation
  11. 2 2 PC X 1 0 0 0 1 Internal Operation
  12. 3 [1] S PB 0 0 1 0 1 Write PB to Stack, S-1�S
  13. 4 3 S PCH [2] 0[3] 0 1 0 1 Write PCH to Stack, S-1�S
  14. 5 4 S PCL 12] 0[3] 0 1 0 1 Write PCL to Stack, S-1�S
  15. 6 5 S P [4] 0[3] 0 1 0 1 Write P to Stack, S-1�S
  16. 7 6 VL (VL) 1 0 1 0 0 Read Vector Low Byte,
  17. 0->PD, 1->P1, OO->PB
  18. 8 7 VH (VH) 1 0 1 0 0 Read Vector High 8yte
  19. Software Interrupt - BRK, COP Instructions
  20. Cycle No.
  21. E = 0 E = 1 Address Data R/W SYNC VDA VPA VP Description
  22. 1 1 PC-2 X 1 1 1 1 1 Opcode
  23. 2 2 PC-1 X 1 0 0 1 1 Signature
  24. 3 111 S PB 0 0 1 0 1 Write PB to Stack, S-1�S
  25. 4 3 S PCH 0 0 1 0 1 Write PCH to Stack, S-1 - S
  26. 5 4 S PCL 0 0 1 0 1 Write PCL to Stack, S-1�S
  27. 6 5 S P 0 0 1 0 1 Write P to Stack, S-1�S
  28. 7 6 VL (VL) 1 0 1 0 0 Read Vector Low Byte,
  29. 0�Po, 1�Pl, 00�PB
  30. 8 7 VH (VH) 1 0 1 0 0 Read Vector High Byte
  31. Notes:
  32. [1] Delete this cycle in Emulation mode.
  33. [2] Abort writes address of aborted opcode.
  34. [3] R/W remains in the high state during Reset.
  35. [4] In Emulation mode, bit 4 written to stack is changed to 0.
  36. Table 3. Vector Locations
  37. Emulation Native Priority
  38. Name Source (E = 1) (E = 0) Level
  39. ABORT Hardware 00FFF8,9 00FFE8,9 2
  40. BRK Software 00FFFE,F 00FFE6,7 N/A
  41. COP Software 00FFF4,5 00FFE4,5 N/A
  42. IRQ Hardware 00FFFE,F 00FFEE,F 4
  43. NMI Hardware 00FFFA,B 00FFEA,B 3
  44. RES Hardware 00FFFC.D 00FFFC,D 1