59 lines
1.2 KiB
ArmAsm
59 lines
1.2 KiB
ArmAsm
; Minimal test - Just show a colored screen
|
|
INCDIR "c:/Users/capitano/Documents/giochino/"
|
|
INCLUDE "custom.i"
|
|
|
|
SECTION Code,CODE_C
|
|
|
|
START:
|
|
lea CUSTOM,a6
|
|
|
|
; Setup simple 1 bitplane display
|
|
move.w #$1200,BPLCON0(a6) ; 1 Bitplane
|
|
move.w #0,BPLCON1(a6)
|
|
move.w #0,BPLCON2(a6)
|
|
move.w #0,BPL1MOD(a6)
|
|
|
|
; Display window
|
|
move.w #$2c81,DIWSTRT(a6)
|
|
move.w #$2cc1,DIWSTOP(a6)
|
|
move.w #$0038,DDFSTRT(a6)
|
|
move.w #$00d0,DDFSTOP(a6)
|
|
|
|
; Set bitplane pointer to our screen
|
|
lea Screen,a0
|
|
move.l a0,d0
|
|
move.w d0,BPL1PTL(a6)
|
|
swap d0
|
|
move.w d0,BPL1PTH(a6)
|
|
|
|
; Set colors
|
|
move.w #$0F00,COLOR00(a6) ; Red background
|
|
move.w #$0FF0,COLOR01(a6) ; Yellow foreground
|
|
|
|
; Enable DMA
|
|
move.w #$8180,DMACON(a6) ; Bitplane + Copper DMA
|
|
|
|
; Fill screen with pattern
|
|
lea Screen,a0
|
|
move.w #(40*256)/4-1,d0
|
|
.fill:
|
|
move.l #$AAAAAAAA,(a0)+
|
|
dbf d0,.fill
|
|
|
|
; Wait for mouse button
|
|
.wait:
|
|
btst #6,CIAA
|
|
bne.s .wait
|
|
|
|
; Exit
|
|
move.w #$0180,DMACON(a6) ; Disable DMA
|
|
moveq #0,d0
|
|
rts
|
|
|
|
SECTION Data,DATA_C
|
|
|
|
Screen:
|
|
ds.b 40*256
|
|
|
|
END
|