Advertisement
Guest User

Mega Drive SNASM2 header

a guest
Nov 12th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;==============================================================
  2. ;   http://www.bigevilcorporation.co.uk
  3. ;==============================================================
  4. ;   SEGA Genesis Framework (c) Matt Phillips 2014
  5. ;==============================================================
  6. ;   debugger.asm - Cross Products SNASM2 debugger setup
  7. ;==============================================================
  8.  
  9.    ; Setup traps/exceptions to allow SCSI debugger access
  10. MSCSITrap   equ 0x108008
  11. MSCSIExcept equ 0x10800C
  12.  
  13. DBG_ConnectDebugger:
  14.  
  15.    move.b d0, 0x108000 ; Allow write to SNASM RAM
  16.    move.l #0x02<<24+MSCSIExcept, 8+(4*0)
  17.    move.l #0x03<<24+MSCSIExcept, 8+(4*1)
  18.    move.l #0x04<<24+MSCSIExcept, 8+(4*2)
  19.    move.l #0x05<<24+MSCSIExcept, 8+(4*3)
  20.    move.l #0x06<<24+MSCSIExcept, 8+(4*4)
  21.    move.l #0x07<<24+MSCSIExcept, 8+(4*5)
  22.    move.l #0x08<<24+MSCSIExcept, 8+(4*6)
  23.    move.l #0x09<<24+MSCSIExcept, 8+(4*7)
  24.    move.l #MSCSITrap, 0x80
  25.    move.b d0, 0x10F001 ; Write protect SNASM RAM
  26.    ori #0x8000, sr     ; Enable TRACE exception
  27.  
  28.    rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement