Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SECTION DEMO,CODE ; Code section - fast ram
- init:
- move.l $4.w,a6 ; execbase in a6
- jsr -$78(a6) ; disable multitasking
- lea gfxname,a1 ; we store the adress of the name in a1
- jsr -$198(a6) ; open library
- move.l d0,gfxbase
- move.l d0,a6
- move.l $26(a6),oldcop ; save old coper
- initpicture:
- move.l #PIC,d0
- lea BPLPOINTERS,a1
- moveq #5,d1 ; bit planes
- pointbp:
- move.w d0,6(a1)
- swap d0
- move.w d0,2(a1)
- swap d0
- add.l #40*256,d0
- addq.w #8,a1
- dbra d1,pointbp
- initcopper:
- move.l #COPPERLIST,$dff080 ; COP1LC set new copper
- move.w d0,$dff088
- default:
- move.w #0,$dff1fc ; FMODE - Disattiva l'AGA
- move.w #$c00,$dff106 ; BPLCON3 - Disattiva l'AGA
- loop:
- btst #6,$bfe001 ; check mouse click
- bne.s loop
- restore:
- move.l oldcop(PC),$dff080 ; COP1LC
- move.w d0,$dff088 ; COPJMP1
- move.l $4.w,a6
- jsr -$7e(a6) ; enable multitasking
- move.l gfxbase(PC),a1 ; clode library
- jsr -$19e(a6) ; close library
- rts
- gfxname:
- dc.b "graphics.library",0,0
- gfxbase:
- dc.l 0
- direction:
- dc.b 0,0
- oldcop:
- dc.l 0 ; old copper
- SECTION GRAPHIC,DATA_C
- COPPERLIST:
- dc.w $120,$0000,$122,$0000,$124,$0000,$126,$0000,$128,$0000
- dc.w $12a,$0000,$12c,$0000,$12e,$0000,$130,$0000,$132,$0000
- dc.w $134,$0000,$136,$0000,$138,$0000,$13a,$0000,$13c,$0000
- dc.w $13e,$0000
- dc.w $8e,$2c81 ; DiwStrt (registri con valori normali)
- dc.w $90,$2cc1 ; DiwStop
- dc.w $92,$0038 ; DdfStart
- dc.w $94,$00d0 ; DdfStop
- dc.w $102,0 ; BplCon1
- dc.w $104,0 ; BplCon2
- dc.w $108,0 ; Bpl1Mod
- dc.w $10a,0 ; Bpl2Mod
- ; 5432109876543210
- dc.w $100,%0110101000000000 ; bits 13 e 12 accesi!! (6 = %110)
- BPLPOINTERS:
- dc.w $e0,$0000,$e2,$0000
- dc.w $e4,$0000,$e6,$0000
- dc.w $e8,$0000,$ea,$0000
- dc.w $ec,$0000,$ee,$0000
- dc.w $f0,$0000,$f2,$0000
- dc.w $f4,$0000,$f6,$0000
- dc.w $FFFF,$FFFE
- PIC:
- incbin "NewTut_320x200x6.raw"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement