Template added
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
; Demo, cracktro startmall med beskrivning!
|
||||
; Denna mall är för exekvering i WB med återställning!
|
||||
; Musknapp för exit
|
||||
; För AsmOne OCS 68000 - dela gärna!
|
||||
;
|
||||
; Anders Holck, 1993, Förslöv
|
||||
|
||||
; --- Register ---
|
||||
CUSTOM EQU $dff000
|
||||
COLOR00 EQU $180
|
||||
BPL1PTH EQU $0e0
|
||||
BPLCON0 EQU $100
|
||||
BPLCON1 EQU $102
|
||||
BPL1MOD EQU $108
|
||||
COP1LCH EQU $080
|
||||
COPJMP1 EQU $088
|
||||
DMACON EQU $096
|
||||
|
||||
Start:
|
||||
; Behåll copper pekaren och DMA för återställning senare
|
||||
move.l $4.w,a6
|
||||
lea CUSTOM,a5
|
||||
move.l COP1LCH(a5),oldcop ; Spara system copper
|
||||
move.w DMACONR(a5),olddma ; Spara system DMA
|
||||
|
||||
; Disable system DMA och Interrupts
|
||||
move.w #$7fff,DMACON(a5) ; Clear all DMA
|
||||
move.w #$7fff,$dff09a ; Clear all INTENA
|
||||
|
||||
; Setup Bitplane pekare i Copper List
|
||||
move.l #Bitplane,d0
|
||||
move.w d0,BPLPtrLow ; Low word i copper
|
||||
swap d0
|
||||
move.w d0,BPLPtrHigh ; High word i copper
|
||||
|
||||
; Peka chip mot Copper List
|
||||
move.l #CopperList,COP1LCH(a5)
|
||||
move.w #0,COPJMP1(a5) ; Strobe start
|
||||
|
||||
; Enable DMA för Copper och Bitplanes
|
||||
move.w #$8380,DMACON(a5) ; Enable SETCLR, COPEN, BPLEN, MASTER
|
||||
|
||||
WaitMouse:
|
||||
btst #6,$bfe001 ; Vänster musknapp?
|
||||
bne.s WaitMouse
|
||||
|
||||
Exit:
|
||||
; Återställ System
|
||||
move.l oldcop(pc),COP1LCH(a5)
|
||||
move.w #$7fff,DMACON(a5) ; Kill DMA
|
||||
move.w olddma(pc),d0
|
||||
or.w #$8000,d0 ; Set SETCLR bit
|
||||
move.w d0,DMACON(a5) ; Återställ OS DMA
|
||||
move.w #$c000,$dff09a ; Återställ Master Interrupts
|
||||
rts
|
||||
|
||||
; --- Data ---
|
||||
|
||||
SECTION Data_C,DATA_C ; Måste vara i CHIP RAM
|
||||
|
||||
CopperList:
|
||||
dc.w BPLCON0,$1200 ; 1 bitplane, enable color
|
||||
dc.w BPLCON1,$0000 ; Scroll 0
|
||||
dc.w BPL1MOD,$0000 ; Modulo 0
|
||||
|
||||
; Bitplane pointers
|
||||
dc.w BPL1PTH
|
||||
BPLPtrHigh: dc.w 0
|
||||
dc.w BPL1PTH+2
|
||||
BPLPtrLow: dc.w 0
|
||||
|
||||
dc.w COLOR00,$000 ; bakgrundsfärg svart ($000)
|
||||
dc.w $ffdf,$fffe ; Vänta på rad 255 (safety)
|
||||
dc.w $ffff,$fffe ; Slut på Copper List
|
||||
|
||||
oldcop: dc.l 0
|
||||
olddma: dc.w 0
|
||||
|
||||
SECTION Bitplane_C,BSS_C ; Bitplane i CHIP RAM
|
||||
Bitplane: ds.b 40*256 ; Standard screen
|
||||
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user