OpenCores
URL https://opencores.org/ocsvn/rf6809/rf6809/trunk

Subversion Repositories rf6809

[/] [rf6809/] [trunk/] [software/] [boot/] [demo.asm] - Blame information for rev 15

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 robfinch
 
2
OPT include "d:\cores2022\rf6809\software\boot\mon_equates.asm"
3
OPT include "d:\cores2022\rf6809\software\boot\io_equates.asm"
4
 
5
sprite_xpos     EQU             $1000
6
sprite_ypos     EQU             $1020
7
sprite_dx               EQU             $1040
8
sprite_dy               EQU             $1080
9
 
10
        org             $FF8000
11
        lbra    sprite_demo
12
        lbra    disassem
13
 
14
;==============================================================================
15
; Disassembler
16
;==============================================================================
17
 
18
OPT     include "d:\cores2022\rf6809\software\boot\disassem.asm"
19
 
20
;==============================================================================
21
; Sprite Demo
22
;==============================================================================
23
sprite_demo:
24
        ldb             #1
25
        tfr             b,dpr
26
        setdp   1
27
        ldd             #-1                                             ; show them all
28
        tfr             d,x
29
        swi
30
        fcb             MF_ShowSprites
31
        ldy             #0
32
sprite_demo1:
33
        ; Assign random positions
34
        swi
35
        fcb             MF_Random
36
        andb    #$1FF
37
        clra
38
        addd    #200
39
        std             SPRITE_CTRL+0,y         ; hpos
40
        tfr             x,d
41
        andb    #$FF
42
        clra
43
        addd    #64
44
        std             SPRITE_CTRL+1,y         ; vpos
45
        leay    8,y
46
        cmpy    #$100
47
        blo             sprite_demo1
48
        ; turn on sprite DMA
49
        ldd             #-1
50
        std             SPRITE_CTRL+$3D0
51
        std             SPRITE_CTRL+$3D2
52
        ldy             #0
53
sprite_demo2:
54
        swi
55
        fcb             MF_Random
56
        andb    #$15
57
        subb    #8
58
        stb             sprite_dx,y
59
        anda    #15
60
        suba    #8
61
        sta             sprite_dx,y
62
        iny
63
        cmpy    #32
64
        blo             sprite_demo2
65
        ldy             #300000
66
sprite_demo3:
67
        dey
68
        bne             sprite_demo3
69
        ldx             #0
70
        ldy             #0
71
sprite_demo4:
72
        lda             SPRITE_CTRL+0,x
73
        adda    sprite_dx,y
74
        sta             SPRITE_CTRL+0,x
75
        lda             SPRITE_CTRL+1,x
76
        adda    sprite_dy,y
77
        sta             SPRITE_CTRL+1,x
78
        leax    8,x
79
        iny
80
        cmpy    #32
81
        blo             sprite_demo4
82
        clra
83
        clrb
84
        swi
85
        fcb             MF_INCH
86
        cmpb    #CTRLC
87
        bne             sprite_demo3
88
        ldd             #0
89
        tfr             d,x
90
        swi
91
        fcb             MF_ShowSprites
92
sprite_demo5:
93
        swi
94
        fcb             MF_Monitor
95
        bra             sprite_demo5

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.