poum tchack

This commit is contained in:
Antoine Vignau 2023-09-07 09:03:07 +02:00
parent 76670261b2
commit 5e4feb76e3
6 changed files with 850 additions and 811 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -456,6 +456,7 @@ tblSTR1 ds 10*2 ; pointeur sur la premi
tblSTR2 ds 10*2 ; pointeur sur la seconde phrase tblSTR2 ds 10*2 ; pointeur sur la seconde phrase
tblSIZE ds 10*2 ; taille de chaque son tblSIZE ds 10*2 ; taille de chaque son
tblFREQ ds 10*2 ; frŽquence de chaque son tblFREQ ds 10*2 ; frŽquence de chaque son
sndKEY ds 10 ; FALSE: not pressed, TRUE: key pressed
fgSND ds 2 ; 0 means no sound fgSND ds 2 ; 0 means no sound
zikPLAY ds 2 zikPLAY ds 2

View File

@ -674,7 +674,7 @@ init_texte
lda index ; charge la rŽfŽrence lda index ; charge la rŽfŽrence
jsr load_reference jsr load_reference
lda #4 lda #2
jsr nowWAIT jsr nowWAIT
lda index lda index
@ -1283,15 +1283,15 @@ ensoniq_beat
lda #$ff lda #$ff
sta sounddata sta sounddata
tya ; address pointer tya ; address pointer (at $4000)
ora #$80 ora #$80
sta soundadrl sta soundadrl
lda #0 lda #$40
sta sounddata sta sounddata
tya tya
ora #$81 ora #$81
sta soundadrl sta soundadrl
lda #0 lda #$40
sta sounddata sta sounddata
tya ; waveform table size (32K) tya ; waveform table size (32K)
@ -1453,7 +1453,15 @@ clavier_sonore
_SetForeColor _SetForeColor
PushWord #15 PushWord #15
_SetBackColor _SetBackColor
ldx #0 ; init keyboard
lda #FALSE
]lp sta sndKEY,x
inx
inx
cpx #10*2
bcc ]lp
cl_loop pha cl_loop pha
PushWord #%00000000_00001010 PushWord #%00000000_00001010
PushLong #taskREC PushLong #taskREC
@ -1490,7 +1498,7 @@ cl_1 cmp #'1'
sbc #'1' sbc #'1'
cmp j ; dans la limite du nombre de sons cmp j ; dans la limite du nombre de sons
bcs cl_loop bcs cl_loop
asl ; affiche les cha”nes asl ; affiche les cha”nes
tax tax
phx phx
@ -1506,6 +1514,12 @@ cl_1 cmp #'1'
sta waveSTART sta waveSTART
lda ptrSND1+2,y lda ptrSND1+2,y
sta waveSTART+2 sta waveSTART+2
lda sndKEY,x ; did we press the key?
cmp #TRUE
beq cl_2
lda #TRUE
sta sndKEY,x
lda tblSTR1,x lda tblSTR1,x
ldy #22 ldy #22
@ -1517,7 +1531,10 @@ cl_1 cmp #'1'
jsr t jsr t
brl cl_loop ; LOGO brl cl_loop ; LOGO
cl_2 plx
brl cl_loop
PushWord #%0000_0000_1000_0000 ; play the sound PushWord #%0000_0000_1000_0000 ; play the sound
_FFStopSound _FFStopSound
@ -1685,11 +1702,22 @@ sndINTERRUPT
lda sounddata lda sounddata
and #%0011_1110 and #%0011_1110
lsr lsr
cmp #1 ; oscillo 1 cmp #1 ; oscillo 1 (liŽ <20> 0)
beq sndINTERRUPT1
cmp #5 ; oscillo 5 (liŽ <20> 4)
beq sndINTERRUPT2
bne sndINTERRUPT99 bne sndINTERRUPT99
jsr ensoniq_beat sndINTERRUPT1
lda #$a0 ; oscillos 0 & 1
sta soundadrl
lda #%0000_0000
sta sounddata
lda #$a1
sta soundadrl
lda #%0001_1000 ; with interrupt
sta sounddata
sndINTERRUPT99 sndINTERRUPT99
sep #$30 sep #$30
pld pld
@ -1702,30 +1730,26 @@ sndINTERRUPT99
mx %10 mx %10
sndINTERRUPT2 sndINTERRUPT2
sep #$20
ldal $e100ca ldal $e100ca
and #%0000_1111 and #%0000_1111
ora #%0110_0000 ora #%0110_0000
sta $3c sta soundctl
stz $3e stz soundadrl
lda #$3e lda soundadrl
ora fgPAGE ora fgPAGE
eor #1 eor #1
sta $3f sta soundadrh
ldy zikMUSIC ldy zikMUSIC
lda zikMUSIC+2 lda zikMUSIC+2
pha pha
plb plb
* jsr sndINTERRUPT10
]move = $00 ]move = $00
lup 256 lup 256
lda ]move,y lda ]move,y
sta $3d sta sounddata
]move = ]move+1 ]move = ]move+1
--^ --^
@ -1738,40 +1762,40 @@ sndINTERRUPT2
dec zikPAGE dec zikPAGE
bne sndINTERRUPT3 bne sndINTERRUPT3
lda whichSND * lda whichSND
beq sndINTERRUPT21 * beq sndINTERRUPT21
*
sep #$20 * sep #$20
*
ldal $e100ca * ldal $e100ca
and #$0f * and #$0f
sta $3c * sta soundctl
*
lda #$a4 * lda #$a4
sta $3e * sta soundadrl
lda #%0000_0011 * lda #%0000_0011
sta $3d * sta sounddata
inc $3e * inc soundadrh
lda #%0001_0011 * lda #%0001_0011
sta $3d * sta sounddata
bra sndINTERRUPT5 * bra sndINTERRUPT5
*
mx %00 * mx %00
sndINTERRUPT21 sndINTERRUPT21
lda #$373 lda waveSIZE
sta zikPAGE sta zikPAGE
lda ptrMUSIC lda waveSTART
sta zikMUSIC sta zikMUSIC
lda ptrMUSIC+2 lda waveSTART+2
sta zikMUSIC+2 sta zikMUSIC+2
sndINTERRUPT3 sndINTERRUPT3
sep #$20 sep #$20
ldal $e100ca ldal $e100ca
and #$0f and #%0000_1111
sta $3c sta soundctl
ldy #$04 ldy #$04
@ -1780,29 +1804,34 @@ sndINTERRUPT3
tya tya
ora #$a0 ora #$a0
sta $3e sta soundadrl
lda #%0000_1110 lda #%0000_1110
sta $3d sta sounddata
inc $3e inc soundadrl
lda #%0001_1111 lda #%0001_1111
sta $3d sta sounddata
bra sndINTERRUPT5 bra sndINTERRUPT5
sndINTERRUPT4 sndINTERRUPT4
tya tya
ora #$a0 ora #$a0
sta $3e sta soundadrl
lda #%0000_1111 lda #%0000_1111
sta $3d sta sounddata
inc $3e inc soundadrl
lda #%0001_1110 lda #%0001_1110
sta $3d sta sounddata
sndINTERRUPT5 sndINTERRUPT5
lda fgPAGE lda fgPAGE
eor #1 eor #1
sta fgPAGE sta fgPAGE
rts
sep #$30
pld
plb
clc
rtl
mx %00 mx %00

View File

@ -254,11 +254,11 @@ noSOUND _HideMenuBar
*---------------------------------------- *----------------------------------------
entryPOINT entryPOINT
jsr TWILIGHToff
jsr set_language jsr set_language
jsr init jsr init
jsr musique jsr musique
jsr init2 jsr init2
jsr TWILIGHToff
*----------------------- *-----------------------
* MAIN * MAIN