home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quakeworld_src / client / sys_amiga68k.s < prev    next >
Encoding:
Text File  |  2000-06-17  |  2.0 KB  |  74 lines

  1. * Copyright (C) 1996-1997 Id Software, Inc. 
  2. * This program is free software; you can redistribute it and/or 
  3. * modify it under the terms of the GNU General Public License 
  4. * as published by the Free Software Foundation; either version 2 
  5. * of the License, or (at your option) any later version. 
  6. * This program is distributed in the hope that it will be useful, 
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   
  9. * See the GNU General Public License for more details. 
  10. * You should have received a copy of the GNU General Public License 
  11. * along with this program; if not, write to the Free Software 
  12. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
  13.  
  14. **
  15. **  MMU hack for Amiga 68k
  16. **  Written by Frank Wille <frank@phoenix.owl.de>
  17. **
  18.  
  19.  
  20.         XDEF    _MMUHackOn
  21.         XDEF    _MMUHackOff
  22.  
  23.         mc68040
  24.  
  25.  
  26. _MMUHackOn:
  27.         movem.l d0-a6,-(sp)
  28.         move.l  $4.w,a6
  29.         jsr     -150(a6)                ;SuperState
  30.         move.l  d0,-(sp)
  31.         jsr     -120(a6)                ;Disable
  32.         cpusha  bc
  33.         movec   DTT0,d0
  34.         move.l  d0,OldDTT0
  35.         movec   DTT1,d0
  36.         move.l  d0,OldDTT1
  37.         move.l  #$c040,d0
  38.         movec   d0,DTT0
  39.         move.l  #$0fc020,d0
  40.         movec   d0,DTT1
  41.         jsr     -126(a6)                ;Enable
  42.         move.l  (sp)+,d0
  43.         jsr     -156(a6)                ;UserState
  44.         movem.l (sp)+,d0-a6
  45.         rts
  46.  
  47. _MMUHackOff:
  48.         movem.l d0-a6,-(sp)
  49.         move.l  $4.w,a6
  50.         jsr     -150(a6)                ;SuperState
  51.         move.l  d0,-(sp)
  52.         jsr     -120(a6)                ;Disable
  53.         cpusha  bc
  54.         move.l  OldDTT0,d0
  55.         movec   d0,DTT0
  56.         move.l  OldDTT1,d0
  57.         movec   d0,DTT1
  58.         jsr     -126(a6)                ;Enable
  59.         move.l  (sp)+,d0
  60.         jsr     -156(a6)                ;UserState
  61.         movem.l (sp)+,d0-a6
  62.         rts
  63.  
  64. OldDTT0:
  65.         dc.l    0
  66. OldDTT1:
  67.         dc.l    0
  68.