don't click here

Vector Table Unpeeled

Discussion in 'Engineering & Reverse Engineering' started by Quickman, Mar 12, 2004.

Thread Status:
Not open for further replies.
  1. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    Here's a complete breakdown for the vector table in a Genesis ROM (and indeed, anything else using a 680x0 processor).

    Code (Text):
    1. Vector       Address  Exception
    2. 0            000000   Initial SSP
    3. 1            000004   Initial PC
    4. 2            000008   Bus error
    5. 3            00000C   Address error
    6. 4            000010   Illegal instruction
    7. 5            000014   Division by zero
    8. 6            000018   CHK instruction
    9. 7            00001C   TRAPV instruction
    10. 8            000020   Privilege violation
    11. 9            000024   Trace
    12. 10           000028   Unimplemented instruction
    13. 11           00002C   Unimplemented instruction
    14. 12           000030   Reserved by Motorola
    15. 13           000034   Reserved by Motorola
    16. 14           000038   Reserved by Motorola
    17. 15           00003C   Uninitialised interrupt vector
    18. 16           000040   Reserved by Motorola
    19. 17           000044   Reserved by Motorola
    20. 18           000048   Reserved by Motorola
    21. 19           00004C   Reserved by Motorola
    22. 20           000050   Reserved by Motorola
    23. 21           000054   Reserved by Motorola
    24. 22           000058   Reserved by Motorola
    25. 23           00005C   Reserved by Motorola
    26. 24           000060   Spurious interrupt
    27. 25           000064   Level 1 interrupt autovector
    28. 26           000068   Level 2 interrupt autovector
    29. 27           00006C   Level 3 interrupt autovector
    30. 28           000070   Level 4 interrupt autovector
    31. 29           000074   Level 5 interrupt autovector
    32. 30           000078   Level 6 interrupt autovector
    33. 31           00007C   Level 7 interrupt autovector
    34. 32           000080   TRAP #0  instruction
    35. 33           000084   TRAP #1  instruction
    36. 34           000088   TRAP #2  instruction
    37. 35           00008C   TRAP #3  instruction
    38. 36           000090   TRAP #4  instruction
    39. 37           000094   TRAP #5  instruction
    40. 38           000098   TRAP #6  instruction
    41. 39           00009C   TRAP #7  instruction
    42. 40           0000A0   TRAP #8  instruction
    43. 41           0000A4   TRAP #9  instruction
    44. 42           0000A8   TRAP #10 instruction
    45. 43           0000AC   TRAP #11 instruction
    46. 44           0000B0   TRAP #12 instruction
    47. 45           0000B4   TRAP #13 instruction
    48. 46           0000B8   TRAP #14 instruction
    49. 47           0000BC   TRAP #15 instruction
    50. 48           0000C0   Reserved by Motorola
    51. 49           0000C4   Reserved by Motorola
    52. 50           0000C8   Reserved by Motorola
    53. 51           0000CC   Reserved by Motorola
    54. 52           0000D0   Reserved by Motorola
    55. 53           0000D4   Reserved by Motorola
    56. 54           0000D8   Reserved by Motorola
    57. 55           0000DC   Reserved by Motorola
    58. 56           0000E0   Reserved by Motorola
    59. 57           0000E4   Reserved by Motorola
    60. 58           0000E8   Reserved by Motorola
    61. 59           0000EC   Reserved by Motorola
    62. 60           0000F0   Reserved by Motorola
    63. 61           0000F4   Reserved by Motorola
    64. 62           0000F8   Reserved by Motorola
    65. 63           0000FC   Reserved by Motorola
    Tech Members will find this useful, normal hackers might have a vague clue what's going on but most probably won't. That's why I'm here now.

    Open up a ROM. Yeah, any ROM whatsoever, so long as it's for the Genesis. Look at the first $100 bytes. They probably look like gobbledegook, right? The table above helps you decode it. Each pointer points to a different section of the game code. Using Sonic 2 as an example, most point to $200 where the ubiquitous looping code is located.

    Credit for the above table goes to this website, by the way - I merely formatted it and removed the unnecessary vectors 64-255 which aren't used (technically they are, but not as far as we care).

    The vector table is somewhat limited in what it can do... but it's a curiosity nonetheless. valete.
     
  2. drx

    drx

    mfw Researcher
    2,254
    350
    63
    :rolleyes:
    Niiiiice. Very nice. This'll help me! Thanks
     
Thread Status:
Not open for further replies.