?login_element?

Subversion Repositories NedoOS

Rev

Rev 20 | Blame | Compare with Previous | Last modification | View Log | Download

;_TIMER=23672
tilemap=0xf300 ;0x0c00
scrbuf=0xd800 ;0x1b00, divisible by 0x800
scraddr=0x4000;0xc000
scrtop=scraddr+(scry*32)+scrx

        org 0x6000
        jr startup
        dw $ dw $
startup
        ld hl,0x5800
        ld de,0x5801
        ld bc,767
        ld (hl),0
        ldir
        ;ld hl,_logo
        ;ld de,0x4000
        ;ld bc,0x1800
        ;ldir
        halt
        ld a,1
        out (0xfe),a
        ;ld bc,0x300
        ;ldir

        ld hl,0
        ld (_TIMER),hl
        ld hl,song
        call INIT
        ld hl,sounds
        call afxINIT
        ;ld a,0x18 ;jr
        ;ld (0xffff),a
        ;ld a,0xc3 ;jp
        ;ld (0xfff4),a
        ;ld hl,on_int
        ;ld (0xfff5),hl
        ;ld a,59
        ;ld i,a
        ;im 2
        ;call setimffff
        ld hl,0xbe00
        ld (setim.A.),hl
        call setim
        
waitstart0
        ld hl,(_TIMER)
        ld de,192-8
        or a
        sbc hl,de
        ;jr c,waitstart0
        
        xor a
        out (0xfe),a
        ;ld hl,0x5800
        ;ld de,0x5801
        ;ld bc,767
        ;ld (hl),0
        ;ldir
        ld hl,0;scraddr
        ld de,scraddr+1
        ld bc,0x1800
        ld (hl),l;0
        ldir
        ld bc,767
        ld (hl),7
        ldir ;раньше нельзя
waitstart1
        ld hl,(_TIMER)
        ld de,192-1
        or a
        sbc hl,de
        ;jr c,waitstart1
        jp demo ;там halt

_USERINT1
_USERINT2
        ret

;PROC readkeys(PBYTE pkeys);
;0x00 - key pressed
;0xff - key not pressed
readkeys
readkeys.A.=$+1
        ld hl,0
        ld bc,0xfefe
readkeys0.
        in d,(c)
        ld e,5
readkeys1.
        rr d
        sbc a,a
        ld (hl),a
        inc hl
        dec e
        jr nz,readkeys1.
        rlc b
        jr c,readkeys0.
        ret
        
testscr
        ld hl,scraddr
        ld de,0x4000
        ld bc,0x1b00
        ldir
        ret

random
seed=$+1
        ld hl,0x0564;0x0562
        ld bc,0x0305
        add hl,bc
        ld a,(hl)
        inc h
        rrca
        rrca
        rrca
        rrca
        xor (hl)
        inc h
        rrca
        xor (hl)
        res 5,h
        ld (seed),hl
        ret

        include "../_sdk/pt3play.i"
song
        incbin "testmusic.pt3"
        include "../_sdk/ayfxplay.i"
sounds
        incbin "bqiwo.afb"

;8x16 sprite (antimask, antipixels)
arrspr
        db 1 ;wid8
        db 16 ;hgt
        db 0b10000000,0b00000000
        db 0b11000000,0b00000000
        db 0b11100000,0b01000000
        db 0b11110000,0b01100000
        db 0b11111000,0b01110000
        db 0b11111100,0b01111000
        db 0b11111110,0b01111100
        db 0b11111111,0b01111110
        db 0b11111111,0b01110000
        db 0b11111100,0b01001000
        db 0b11011100,0b00001000
        db 0b00001110,0b00000100
        db 0b00001110,0b00000100
        db 0b00000111,0b00000010
        db 0b00000111,0b00000010
        db 0b00000010,0b00000000

;16x16 sprite (antimask, antipixels)
ballspr
        db 2 ;wid8
        db 16 ;hgt
        db 0b00000111,0b00000111,0b11100000,0b11100000
        db 0b00011111,0b00010101,0b11111000,0b01111000
        db 0b00111111,0b00101000,0b11111100,0b10111100
        db 0b01111111,0b01010000,0b11111110,0b01101110
        db 0b01111111,0b00100000,0b11111110,0b10111110
        db 0b11111111,0b11000000,0b11111111,0b01010111
        db 0b11111111,0b10000000,0b11111111,0b10111111
        db 0b11111111,0b11000001,0b11111111,0b01010111
        db 0b11111111,0b10101010,0b11111111,0b11111111
        db 0b11111111,0b11010101,0b11111111,0b01011111
        db 0b11111111,0b11111111,0b11111111,0b11111101
        db 0b01111111,0b01110101,0b11111110,0b01111110
        db 0b01111111,0b01111111,0b11111110,0b11111010
        db 0b00111111,0b00111111,0b11111100,0b11110100
        db 0b00011111,0b00011111,0b11111000,0b11011000
        db 0b00000111,0b00000111,0b11100000,0b11100000

;24x24 sprite (antimask, antipixels)
bigspr
        db 3 ;wid8
        db 24 ;hgt
        db 0b00000111,0b00000111,0b11100000,0b11100000,0b11100000,0b10100000
        db 0b00011111,0b00010101,0b11111000,0b01111000,0b11111000,0b01101000
        db 0b00111111,0b00101000,0b11111100,0b10111100,0b11111100,0b10110100
        db 0b01111111,0b01010000,0b11111110,0b01101110,0b11111110,0b01101010
        db 0b01111111,0b00100000,0b11111110,0b10111110,0b11111110,0b10111010
        db 0b11111111,0b11000000,0b11111111,0b01010111,0b11111111,0b01010101
        db 0b11111111,0b10000000,0b11111111,0b10111111,0b11111111,0b10111101
        db 0b11111111,0b11000001,0b11111111,0b01010111,0b11111111,0b01010101
        db 0b11111111,0b10101010,0b11111111,0b11111111,0b11111111,0b11111101
        db 0b11111111,0b11010101,0b11111111,0b01011111,0b11111111,0b01011101
        db 0b11111111,0b11111111,0b11111111,0b11111101,0b11111111,0b11111101
        db 0b01111111,0b01110101,0b11111110,0b01111110,0b11111110,0b01111010
        db 0b01111111,0b01111111,0b11111110,0b11111010,0b11111110,0b11111010
        db 0b00111111,0b00111111,0b11111100,0b11110100,0b11111100,0b11110100
        db 0b00011111,0b00011111,0b11111000,0b11011000,0b11111000,0b11011000
        db 0b00000111,0b00000111,0b11100000,0b11100000,0b11100000,0b10100000
        db 0b11111111,0b10101010,0b11111111,0b11111111,0b11111111,0b11111101
        db 0b11111111,0b11010101,0b11111111,0b01011111,0b11111111,0b01011101
        db 0b11111111,0b11111111,0b11111111,0b11111101,0b11111111,0b11111101
        db 0b01111111,0b01110101,0b11111110,0b01111110,0b11111110,0b01111010
        db 0b01111111,0b01111111,0b11111110,0b11111010,0b11111110,0b11111010
        db 0b00111111,0b00111111,0b11111100,0b11110100,0b11111100,0b11110100
        db 0b00011111,0b00011111,0b11111000,0b11011000,0b11111000,0b11011000
        db 0b00000111,0b00000111,0b11100000,0b11100000,0b11100000,0b10100000

;32x16 sprite (antimask, antipixels)
bigspr32
        db 4 ;wid8
        db 16 ;hgt
        db 0b00000111,0b00000111,0b11100000,0b11100000,0b10000000,0b00000000,0b11100000,0b10100000
        db 0b00011111,0b00010101,0b11111000,0b01111000,0b11000000,0b00000000,0b11111000,0b01101000
        db 0b00111111,0b00101000,0b11111100,0b10111100,0b11100000,0b01000000,0b11111100,0b10110100
        db 0b01111111,0b01010000,0b11111110,0b01101110,0b11110000,0b01100000,0b11111110,0b01101010
        db 0b01111111,0b00100000,0b11111110,0b10111110,0b11111000,0b01110000,0b11111110,0b10111010
        db 0b11111111,0b11000000,0b11111111,0b01010111,0b11111100,0b01111000,0b11111111,0b01010101
        db 0b11111111,0b10000000,0b11111111,0b10111111,0b11111110,0b01111100,0b11111111,0b10111101
        db 0b11111111,0b11000001,0b11111111,0b01010111,0b11111111,0b01111110,0b11111111,0b01010101
        db 0b11111111,0b10101010,0b11111111,0b11111111,0b11111111,0b01110000,0b11111111,0b11111101
        db 0b11111111,0b11010101,0b11111111,0b01011111,0b11111100,0b01001000,0b11111111,0b01011101
        db 0b11111111,0b11111111,0b11111111,0b11111101,0b11011100,0b00001000,0b11111111,0b11111101
        db 0b01111111,0b01110101,0b11111110,0b01111110,0b00001110,0b00000100,0b11111110,0b01111010
        db 0b01111111,0b01111111,0b11111110,0b11111010,0b00001110,0b00000100,0b11111110,0b11111010
        db 0b00111111,0b00111111,0b11111100,0b11110100,0b00000111,0b00000010,0b11111100,0b11110100
        db 0b00011111,0b00011111,0b11111000,0b11011000,0b00000111,0b00000010,0b11111000,0b11011000
        db 0b00000111,0b00000111,0b11100000,0b11100000,0b00000010,0b00000000,0b11100000,0b10100000

emptytile
        db 0,0,0,0,0,0,0,0
        db 7 ;attr

        include "testpic.ast"

        include "spr.ast"
        include "spr.var"
        include "../_sdk/sprite.i"
        include "../_sdk/lib.i"
        include "../_sdk/runtime.i"
;_logo
        ;incbin "logo" ;must be last