home *** CD-ROM | disk | FTP | other *** search
- Section Skel1,Code
-
- Opt C-,O+,w-
-
- ; Writtem by Shagratt/LSD
-
- ; this system takeover is 680x0 compatable
- ; and gives you lots of processor time
-
- Start: lea $dff000,a5 ; hardware base address
-
- Move.w $1c(a5),OldInt ; Save Old Interupts
- Move.w $02(a5),OldDma ; Save Old DMA
-
- Move.w #$7fff,$9a(a5) ; Clear DMA
- Move.w #$7fff,$96(a5) ; Clear Interupts
- Move.w #$7fff,$9c(a5) ; Clear Interupt Requests
-
- bsr GetVBR ; needed on 680x0
-
- Move.b #$7f,$bfed01 ; kill timers
- Move.l $6c(a4),OldV3 ; save level 3 int
-
- Move.l #my_level3,$6c(a4) ; put new copper interupt
- Move.l #my_copper,$80(a5) ; Address of copper 1
- Move.w #$c010,$9a(a5) ; Start interupts
-
- Move.w #$83ef,$96(a5) ; Start DMA
- Move.w #1,$88(a5) ; Strobe for copper start
-
- move.l #scr,d0
- move.w d0,bitplane0_lo
- swap d0
- move.w d0,bitplane0_hi
-
- move.l #sprite,d0 ; clear all sprites
- lea spr0_ptrs,a0
- move.w #7,d1
- .loop move.w d0,6(a0)
- swap d0
- move.w d0,2(a0)
- swap d0
- lea 8(a0),a0
- dbf d1,.loop
-
- wait: move.w $dff006,$dff180
- btst #6,$bfe001
- bne.s wait ; wait for lmb
-
- ; this bit from here on wouldn't normaly get executed
-
- bsr GetVBR ; needed on 680x0
- Move.l OldV3,$6c(a4) ; restore old l3
-
- lea $dff000,a5 ; hardware base address
-
- move.l 4,a6
- Lea GfxLib,a1 ; Pointer to Library Text
- jsr -132(a6) ; forbid
- Move.l 4.w,a6 ; Exec
- Moveq.l #0,d0 ; Clear D0
- Jsr -$228(a6) ; Open Library
-
- Move.l d0,a1
- Move.l $26(a1),$80(a5) ; restore copper 1
- Move.l $32(a1),$84(a5) ; restore copper 2
-
- Move.w OldInt,d0 ; start old interupts
- Or.w #$8000,d0
- Move.w d0,$9a(a5)
- Move.w OldDma,d0 ; start old DMA
- Or.w #$8000,d0
- Move.w d0,$96(a5)
- Move.b #$9b,$bfed01 ; Start Timers
- Move.l 4.w,a6 ; Close Gfx lib
- Jsr -$19e(a6)
- move.l 4.w,a6
- jsr -138(a6) ; permit
-
- move.w #0,$bfec00 ; clear kbd
-
- Moveq.l #0,d0 ; No errors
- Rts ; Exit
-
- *--------------------------------------------------*
-
- GetVBR Move.l 4.w,A6
- Moveq #15,D7
- And 296(A6),D7 ;check processor
- Beq .68000
- Lea .Find(Pc),A5
- Jsr -30(A6) ; supervisor
- .68000 Move.l D7,a4
- Rts
-
- .Find dc.l $4e7a7801 ;Movec.l VBR,D7
- Rte
-
- *--------------------------------------------------*
-
- my_level3: Movem.l d0-d7/a0-a6,-(a7)
- Move.w #$10,$dff09c ; Serviced Interupt
-
- Exit: Movem.l (a7)+,d0-d7/a0-a6
- Rte ; Return from Interupt
-
- *--------------------------------------------------*
-
- oldint: dc.l 0
- olddma: dc.l 0
- oldv3: dc.l 0
- gfxlib: dc.b "graphics.library",0
- even
-
- Section Skel2,data_C
-
- my_copper: dc.w $100,$1200 ; 4 bp - lo res
- dc.w $104,$a ; bp control reg
- dc.w $108,0 ; bp modulo - odd
- dc.w $10a,0 ; bp modulo - even
- dc.w $180,0 ; colour 0 to black
- dc.w $102,0
-
- dc.w $08e,$2c81 ; bp window start left
- dc.w $090,$2cc1 ; bp window bot right
- dc.w $094,$d0 ; bp stop horz
- dc.w $92,$38
-
- spr0_ptrs: dc.w $120,0,$122,0
- dc.w $124,0,$126,0
- dc.w $128,0,$12a,0
- dc.w $12c,0,$12e,0
- dc.w $130,0,$132,0
- dc.w $134,0,$136,0
- dc.w $138,0,$13a,0
- dc.w $13c,0,$13e,0
-
- dc.w $e0
- bitplane0_hi: dc.w 0,$e2
- bitplane0_lo: dc.w 0
-
- cmap: dc.w $180,$000
- dc.w $182,$fff
-
- dc.w $1a0,$000
- dc.w $1a2,$eee
- dc.w $1a4,$aaa
- dc.w $1a6,$666
-
- dc.w $ffe1,$fffe ; end of ntsc screen
- dc.w $3001,$ff00 ; end of pal screen
- dc.w $9c,$8010 ; irq set bits - restart copper
- dc.w $ffff,$fffe ; end of copper list
-
- sprite: dc.l 0,0
-
- scr: ds.l 10*256
-
- end
-
-
-