mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-14 09:30:49 +00:00
Adding Canal Meurtre
Antoine's source code of Canal Meurtre
This commit is contained in:
parent
33f00570f0
commit
256a862d79
1559
canalmeurtre/canalmeurtre.s
Normal file
1559
canalmeurtre/canalmeurtre.s
Normal file
File diff suppressed because it is too large
Load Diff
821
canalmeurtre/fiche.s
Normal file
821
canalmeurtre/fiche.s
Normal file
@ -0,0 +1,821 @@
|
||||
*
|
||||
* Canal Meurtre (éditeur)
|
||||
*
|
||||
* (c) 1986, Froggy Software
|
||||
* (c) 2022, Antoine Vignau & Olivier Zardini
|
||||
*
|
||||
|
||||
lst off
|
||||
rel
|
||||
dsk Fiche.l
|
||||
|
||||
mx %00
|
||||
xc
|
||||
xc
|
||||
|
||||
*----------------------------------- Macros
|
||||
|
||||
use 4/Ctl.Macs
|
||||
use 4/Desk.Macs
|
||||
use 4/Event.Macs
|
||||
use 4/Font.Macs
|
||||
use 4/Int.Macs
|
||||
use 4/Line.Macs
|
||||
use 4/Locator.Macs
|
||||
use 4/Mem.Macs
|
||||
use 4/Menu.Macs
|
||||
use 4/MIDISyn.Macs
|
||||
use 4/Misc.Macs
|
||||
use 4/Print.Macs
|
||||
use 4/Qd.Macs
|
||||
use 4/QdAux.Macs
|
||||
use 4/Resource.Macs
|
||||
use 4/Scrap.Macs
|
||||
use 4/Sound.Macs
|
||||
use 4/Std.Macs
|
||||
use 4/TextEdit.Macs
|
||||
use 4/Util.Macs
|
||||
use 4/Window.Macs
|
||||
|
||||
*----------------------------------- Constantes
|
||||
|
||||
*-------------- Softswitches
|
||||
|
||||
KBD = $e0c000
|
||||
KBDSTROBE = $e0c010
|
||||
RDVBLBAR = $e0c019
|
||||
GSOS = $e100a8
|
||||
|
||||
*-------------- GUI
|
||||
|
||||
wMAIN = 1
|
||||
|
||||
refIsPointer = $0
|
||||
refIsHandle = $1
|
||||
refIsResource = $2
|
||||
|
||||
appleKey = $0100
|
||||
mouseUpEvt = $0002
|
||||
keyDownEvt = $0003
|
||||
|
||||
*--------------
|
||||
|
||||
dpFROM = $80
|
||||
dpTO = dpFROM+4
|
||||
|
||||
dpFICHES = $90 ; pointeur vers NEWTV.BASE
|
||||
dpENTREE = dpFICHES+4 ; pointeur vers une fiche
|
||||
|
||||
Debut = $a0
|
||||
Arrivee = Debut+4
|
||||
Second = Arrivee+4
|
||||
|
||||
*---
|
||||
|
||||
TRUE = 1
|
||||
FALSE = 0
|
||||
|
||||
*--- Programme
|
||||
|
||||
NB_FICHES = 200 ; nombre de fiches du jeu
|
||||
TAILLE_FICHE = 255 ; taille d'une fiche en octets
|
||||
|
||||
*----------------------------------- Entry point
|
||||
|
||||
phk
|
||||
plb
|
||||
|
||||
_TLStartUp
|
||||
pha
|
||||
_MMStartUp
|
||||
pla
|
||||
sta myID
|
||||
|
||||
tdc
|
||||
sta myDP
|
||||
|
||||
*--- 64K pour les NEWTV.BASE
|
||||
|
||||
jsr make64KB
|
||||
|
||||
sty ptrFICHES
|
||||
sty proREAD+4
|
||||
sty proWRITE+4
|
||||
stx ptrFICHES+2
|
||||
stx proREAD+6
|
||||
stx proWRITE+6
|
||||
|
||||
jsr loadFILE
|
||||
jsr init_fiche
|
||||
|
||||
*--- Chargement des outils
|
||||
|
||||
pha
|
||||
pha
|
||||
PushWord myID
|
||||
PushWord #refIsResource
|
||||
PushLong #1
|
||||
_StartUpTools
|
||||
PullLong SStopREC
|
||||
|
||||
_InitCursor
|
||||
|
||||
*--- Nettoie le cache de l'Event Manager
|
||||
|
||||
PushWord #0
|
||||
PushWord #%11111111_11111111
|
||||
PushWord #0
|
||||
_FlushEvents
|
||||
pla
|
||||
|
||||
*----------------------------------------
|
||||
* INITIALISATIONS
|
||||
*----------------------------------------
|
||||
|
||||
pha
|
||||
pha
|
||||
PushLong #0
|
||||
PushLong #wMAIN
|
||||
PushLong #PAINTMAIN
|
||||
PushLong #0
|
||||
PushWord #refIsResource
|
||||
PushLong #wMAIN
|
||||
PushWord #$800e
|
||||
_NewWindow2
|
||||
PullLong wiMAIN
|
||||
|
||||
jsr getFICHE
|
||||
|
||||
*----------------------------------------
|
||||
* TASK MASTER
|
||||
*----------------------------------------
|
||||
|
||||
taskLOOP
|
||||
PushWord #0
|
||||
PushWord #0
|
||||
PushWord #$c000
|
||||
PushWord #0
|
||||
_HandleDiskInsert
|
||||
pla
|
||||
pla
|
||||
|
||||
PushWord #0
|
||||
PushWord #%11111111_11111111
|
||||
PushLong #taskREC
|
||||
_TaskMaster
|
||||
pla
|
||||
beq taskLOOP
|
||||
|
||||
asl
|
||||
tax
|
||||
jsr (taskTBL,x)
|
||||
bra taskLOOP
|
||||
|
||||
*----------------------------------- Gestion des contrôles (ça veut dire boutons ou lineedit)
|
||||
|
||||
doCONTROL
|
||||
lda taskREC+38
|
||||
dec
|
||||
asl
|
||||
tax
|
||||
jsr (taskCTL,x)
|
||||
rts
|
||||
|
||||
taskCTL da doLINE
|
||||
da doLINE
|
||||
da doLINE
|
||||
da doLINE
|
||||
da doLINE
|
||||
da doQUIT
|
||||
da doPREVIOUS
|
||||
da doNEXT
|
||||
da doSAVE
|
||||
|
||||
*----------------------------------------
|
||||
* CODE DU JEU
|
||||
*----------------------------------------
|
||||
|
||||
doNOT
|
||||
|
||||
*--- Les Line Edit
|
||||
|
||||
doLINE
|
||||
rts
|
||||
|
||||
*--- Bouton Enregistrer
|
||||
|
||||
doSAVE
|
||||
jsr putFICHE
|
||||
jmp saveFILE
|
||||
|
||||
*--- Bouton Quitter
|
||||
|
||||
doQUIT
|
||||
jsr doSAVE
|
||||
|
||||
meQUIT
|
||||
PushWord #refIsHandle
|
||||
PushLong SStopREC
|
||||
_ShutDownTools
|
||||
|
||||
meQUIT1
|
||||
PushWord myID
|
||||
_DisposeAll
|
||||
|
||||
PushWord myID
|
||||
_MMShutDown
|
||||
|
||||
_TLShutDown
|
||||
|
||||
jsl GSOS
|
||||
dw $2029
|
||||
adrl proQUIT
|
||||
|
||||
brk $bd
|
||||
|
||||
*--- Bouton Fiche précédente
|
||||
|
||||
doPREVIOUS
|
||||
jsr putFICHE
|
||||
|
||||
lda P
|
||||
cmp #1
|
||||
bne okPREV
|
||||
rts
|
||||
okPREV sec
|
||||
sbc #1
|
||||
sta P
|
||||
jmp getFICHE
|
||||
|
||||
*--- Bouton Fiche suivante
|
||||
|
||||
doNEXT
|
||||
jsr putFICHE
|
||||
|
||||
lda P
|
||||
cmp nbFICHES
|
||||
bcc okNEXT
|
||||
beq okNEXT
|
||||
rts
|
||||
okNEXT clc
|
||||
adc #1
|
||||
sta P
|
||||
jmp getFICHE
|
||||
|
||||
*----------------------------------------
|
||||
* GESTION DES FICHES
|
||||
*----------------------------------------
|
||||
|
||||
*-----------------------
|
||||
* printP - affiche le numéro de la fiche
|
||||
*-----------------------
|
||||
|
||||
printP
|
||||
lda #' '
|
||||
sta strP
|
||||
sta strP+2
|
||||
|
||||
PushWord P
|
||||
PushLong #strP
|
||||
PushWord #3
|
||||
PushWord #FALSE
|
||||
_Int2Dec
|
||||
|
||||
pha
|
||||
pha
|
||||
_GetPort
|
||||
|
||||
PushLong wiMAIN
|
||||
_SetPort
|
||||
|
||||
PushWord #210
|
||||
PushWord #130
|
||||
_MoveTo
|
||||
|
||||
PushLong #strP
|
||||
_DrawCString
|
||||
|
||||
_SetPort
|
||||
rts
|
||||
|
||||
strP asc ' '00
|
||||
|
||||
*-----------------------
|
||||
* getFICHE - De F à la fenêtre
|
||||
*-----------------------
|
||||
|
||||
getFICHE
|
||||
jsr get_fiche
|
||||
|
||||
sep #$30
|
||||
|
||||
lda #40 ; Tell length is 40 chars
|
||||
sta B1_6
|
||||
sta B1_8
|
||||
sta B1_10
|
||||
sta B1_12
|
||||
sta B1_14
|
||||
|
||||
ldx #0 ; Move strings to the buffer
|
||||
]lp lda C2_6,x
|
||||
sta B2_6,x
|
||||
lda C2_8,x
|
||||
sta B2_8,x
|
||||
lda C2_10,x
|
||||
sta B2_10,x
|
||||
lda C2_12,x
|
||||
sta B2_12,x
|
||||
lda C2_14,x
|
||||
sta B2_14,x
|
||||
inx
|
||||
cpx #40
|
||||
bcc ]lp
|
||||
|
||||
rep #$30
|
||||
|
||||
PushLong wiMAIN ; Set LE
|
||||
PushLong #1
|
||||
PushLong #B1_6
|
||||
_SetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #2
|
||||
PushLong #B1_8
|
||||
_SetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #3
|
||||
PushLong #B1_10
|
||||
_SetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #4
|
||||
PushLong #B1_12
|
||||
_SetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #5
|
||||
PushLong #B1_14
|
||||
_SetLETextByID
|
||||
|
||||
jmp printP
|
||||
|
||||
*-----------------------
|
||||
* putFICHE - De la fenêtre à F
|
||||
*-----------------------
|
||||
|
||||
putFICHE
|
||||
PushLong wiMAIN ; Get LE
|
||||
PushLong #1
|
||||
PushLong #B1_6
|
||||
_GetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #2
|
||||
PushLong #B1_8
|
||||
_GetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #3
|
||||
PushLong #B1_10
|
||||
_GetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #4
|
||||
PushLong #B1_12
|
||||
_GetLETextByID
|
||||
|
||||
PushLong wiMAIN
|
||||
PushLong #5
|
||||
PushLong #B1_14
|
||||
_GetLETextByID
|
||||
|
||||
sep #$30
|
||||
|
||||
ldx #0 ; Clear destination strings
|
||||
lda #' '
|
||||
]lp sta C2_6,x
|
||||
sta C2_8,x
|
||||
sta C2_10,x
|
||||
sta C2_12,x
|
||||
sta C2_14,x
|
||||
inx
|
||||
cpx #40
|
||||
bcc ]lp
|
||||
|
||||
ldx B1_6 ; Move strings to buffer
|
||||
beq pf_2
|
||||
ldx #0
|
||||
]lp lda B2_6,x
|
||||
sta C2_6,x
|
||||
inx
|
||||
cpx B1_6
|
||||
bcc ]lp
|
||||
pf_2
|
||||
ldx B1_8
|
||||
beq pf_3
|
||||
ldx #0
|
||||
]lp lda B2_8,x
|
||||
sta C2_8,x
|
||||
inx
|
||||
cpx B1_8
|
||||
bcc ]lp
|
||||
pf_3
|
||||
ldx B1_10
|
||||
beq pf_4
|
||||
ldx #0
|
||||
]lp lda B2_10,x
|
||||
sta C2_10,x
|
||||
inx
|
||||
cpx B1_10
|
||||
bcc ]lp
|
||||
pf_4
|
||||
ldx B1_12
|
||||
beq pf_5
|
||||
ldx #0
|
||||
]lp lda B2_12,x
|
||||
sta C2_12,x
|
||||
inx
|
||||
cpx B1_12
|
||||
bcc ]lp
|
||||
pf_5
|
||||
ldx B1_14
|
||||
beq pf_6
|
||||
ldx #0
|
||||
]lp lda B2_14,x
|
||||
sta C2_14,x
|
||||
inx
|
||||
cpx B1_14
|
||||
bcc ]lp
|
||||
pf_6
|
||||
|
||||
rep #$30
|
||||
jmp set_fiche ; and save the data at ptrFICHES
|
||||
|
||||
*-----------------------
|
||||
* init_fiche
|
||||
*-----------------------
|
||||
|
||||
init_fiche
|
||||
stz nbFICHES ; 0 texts on entry
|
||||
|
||||
lda proEOF ; is file empty?
|
||||
ora proEOF+2
|
||||
bne if1
|
||||
rts
|
||||
|
||||
if1
|
||||
lda ptrFICHES
|
||||
sta dpFROM
|
||||
clc
|
||||
adc proEOF
|
||||
sta dpTO
|
||||
lda ptrFICHES+2
|
||||
sta dpFROM+2
|
||||
adc proEOF+2
|
||||
sta dpTO+2
|
||||
|
||||
if2
|
||||
lda dpFROM+2 ; did we reach the end of the file?
|
||||
cmp dpTO+2
|
||||
bcc if3
|
||||
lda dpFROM
|
||||
cmp dpTO
|
||||
bcc if3
|
||||
rts ; we are done!
|
||||
|
||||
if3
|
||||
lda nbFICHES ; save the address of the string
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
lda dpFROM
|
||||
sta tblFICHES,x
|
||||
lda dpFROM+2
|
||||
sta tblFICHES+2,x
|
||||
|
||||
lda dpFROM
|
||||
clc
|
||||
adc #TAILLE_FICHE
|
||||
sta dpFROM
|
||||
lda dpFROM+2
|
||||
adc #0
|
||||
sta dpFROM+2
|
||||
|
||||
inc nbFICHES ; increment the number of strings
|
||||
lda nbFICHES ; into our limit
|
||||
cmp #NB_FICHES
|
||||
bcc if2
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
* get_fiche(fiche%) - From ptrFICHES to F
|
||||
*-----------------------
|
||||
|
||||
get_fiche
|
||||
lda P
|
||||
bne get_fiche1
|
||||
rts
|
||||
|
||||
get_fiche1
|
||||
cmp nbFICHES
|
||||
bcc get_fiche2
|
||||
beq get_fiche2
|
||||
rts
|
||||
|
||||
get_fiche2
|
||||
dec
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
lda tblFICHES,x
|
||||
sta dpFICHES
|
||||
lda tblFICHES+2,x
|
||||
sta dpFICHES+2
|
||||
|
||||
ldy #TAILLE_FICHE-1
|
||||
sep #$20
|
||||
]lp lda [dpFICHES],y
|
||||
sta F,y
|
||||
dey
|
||||
bpl ]lp
|
||||
rep #$20
|
||||
rts
|
||||
|
||||
*-----------------------
|
||||
* set_fiche(fiche%) - From F to ptrFICHES
|
||||
*-----------------------
|
||||
|
||||
set_fiche
|
||||
lda P
|
||||
bne set_fiche1
|
||||
rts
|
||||
|
||||
set_fiche1
|
||||
cmp nbFICHES
|
||||
bcc set_fiche2
|
||||
beq set_fiche2
|
||||
rts
|
||||
|
||||
set_fiche2
|
||||
dec
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
lda tblFICHES,x
|
||||
sta dpFICHES
|
||||
lda tblFICHES+2,x
|
||||
sta dpFICHES+2
|
||||
|
||||
ldy #TAILLE_FICHE-1
|
||||
sep #$20
|
||||
]lp lda F,y
|
||||
sta [dpFICHES],y
|
||||
dey
|
||||
bpl ]lp
|
||||
rep #$20
|
||||
rts
|
||||
|
||||
*---------------------------------------- Les données d'une fiche
|
||||
|
||||
P dw 1 ; 1ère fiche
|
||||
nbFICHES ds 2
|
||||
|
||||
tblFICHES ds 4*NB_FICHES
|
||||
|
||||
F ds 1 ; fiche OK (non zero) ou KO (zero)
|
||||
C2_1 ds 2
|
||||
C2_2 ds 25
|
||||
C2_3 ds 2
|
||||
C2_4 ds 2
|
||||
C2_5 ds 4
|
||||
C2_6 ds 40
|
||||
C2_7 ds 4
|
||||
C2_8 ds 40
|
||||
C2_9 ds 4
|
||||
C2_10 ds 40
|
||||
C2_11 ds 4
|
||||
C2_12 ds 40
|
||||
C2_13 ds 4
|
||||
C2_14 ds 40
|
||||
ds 3 ; garbage
|
||||
|
||||
*---------------------------------------- Les données des LineEdit
|
||||
|
||||
B1_6 ds 1
|
||||
B2_6 ds 40
|
||||
|
||||
B1_8 ds 1
|
||||
B2_8 ds 40
|
||||
|
||||
B1_10 ds 1
|
||||
B2_10 ds 40
|
||||
|
||||
B1_12 ds 1
|
||||
B2_12 ds 40
|
||||
|
||||
B1_14 ds 1
|
||||
B2_14 ds 40
|
||||
|
||||
ds 117 ; bad coder...
|
||||
|
||||
*----------------------------------------
|
||||
* FENETRES
|
||||
*----------------------------------------
|
||||
|
||||
PAINTMAIN
|
||||
PushLong wiMAIN
|
||||
_DrawControls
|
||||
rtl
|
||||
|
||||
*----------------------------------------
|
||||
* MEMOIRE
|
||||
*----------------------------------------
|
||||
|
||||
make64KB
|
||||
pha
|
||||
pha
|
||||
PushLong #$010000
|
||||
PushWord myID
|
||||
PushWord #%11000000_00011100
|
||||
PushLong #0
|
||||
_NewHandle
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
lda [3]
|
||||
tax ; low in X
|
||||
ldy #2
|
||||
lda [3],y
|
||||
txy ; low in Y
|
||||
tax ; high in X
|
||||
pld
|
||||
pla ; we do not keep track of the handle
|
||||
pla
|
||||
rts
|
||||
|
||||
*----------------------------------------
|
||||
* DATA
|
||||
*----------------------------------------
|
||||
|
||||
*----------------------- Fenetres
|
||||
|
||||
wiMAIN ds 4
|
||||
|
||||
*----------------------- Memory manager
|
||||
|
||||
myID ds 2
|
||||
myDP ds 2
|
||||
|
||||
SStopREC ds 4
|
||||
|
||||
ptrFICHES ds 4
|
||||
|
||||
*----------------------- Window manager
|
||||
|
||||
taskREC ds 2 ; wmWhat +0
|
||||
taskMESSAGE ds 4 ; wmMessage +2
|
||||
taskWHEN ds 4 ; wmWhen +6
|
||||
taskWHERE ds 4 ; wmWhere +10
|
||||
taskMODIFIERS ds 2 ; wmModifiers +14
|
||||
taskDATA ds 4 ; wmTaskData +16
|
||||
adrl $001fffff ; wmTaskMask +20
|
||||
ds 4 ; wmLastClickTick +24
|
||||
ds 2 ; wmClickCount +28
|
||||
ds 4 ; wmTaskData2 +30
|
||||
ds 4 ; wmTaskData3 +34
|
||||
ds 4 ; wmTaskData4 +38
|
||||
ds 4 ; wmLastClickPt +42
|
||||
|
||||
taskTBL da doNOT ; Null
|
||||
da doNOT ; mouseDownEvt
|
||||
da doNOT ; mouseUpEvt
|
||||
da doNOT ; keyDownEvt
|
||||
da doNOT
|
||||
da doNOT ; autoKeyEvt
|
||||
da doNOT ; updateEvt
|
||||
da doNOT
|
||||
da doNOT ; activateEvt
|
||||
da doNOT ; switchEvt
|
||||
da doNOT ; deskAccEvt
|
||||
da doNOT ; driverEvt
|
||||
da doNOT ; app1Evt
|
||||
da doNOT ; app2Evt
|
||||
da doNOT ; app3Evt
|
||||
da doNOT ; app4Evt
|
||||
da doNOT ; wInDesk
|
||||
da doNOT ; wInMenuBar
|
||||
da doNOT ; wCLickCalled
|
||||
da doNOT ; wInContent - was doCONTENT
|
||||
da doNOT ; wInDrag
|
||||
da doNOT ; wInGrow
|
||||
da doNOT ; wInGoAway
|
||||
da doNOT ; wInZoom
|
||||
da doNOT ; wInInfo
|
||||
da doNOT ; wInSpecial
|
||||
da doNOT ; wInDeskItem
|
||||
da doNOT ; wInFrame
|
||||
da doNOT ; wInactMenu
|
||||
da doNOT ; wInClosedNDA
|
||||
da doNOT ; wInCalledSysEdit
|
||||
da doNOT ; wInTrackZoom
|
||||
da doNOT ; wInHitFrame
|
||||
da doCONTROL ; wInControl
|
||||
da doNOT ; wInControlMenu
|
||||
|
||||
*----------------------------------------
|
||||
* GS/OS
|
||||
*----------------------------------------
|
||||
|
||||
loadFILE
|
||||
jsl GSOS
|
||||
dw $2010
|
||||
adrl proOPEN
|
||||
|
||||
lda proOPEN+2
|
||||
sta proREAD+2
|
||||
sta proCLOSE+2
|
||||
|
||||
lda proEOF
|
||||
sta proREAD+8
|
||||
lda proEOF+2
|
||||
sta proREAD+10
|
||||
|
||||
jsl GSOS
|
||||
dw $2012
|
||||
adrl proREAD
|
||||
|
||||
jsl GSOS
|
||||
dw $2014
|
||||
adrl proCLOSE
|
||||
rts
|
||||
|
||||
*---
|
||||
|
||||
saveFILE
|
||||
jsl GSOS
|
||||
dw $2010
|
||||
adrl proOPEN
|
||||
|
||||
lda proOPEN+2
|
||||
sta proWRITE+2
|
||||
sta proCLOSE+2
|
||||
|
||||
lda proEOF
|
||||
sta proWRITE+8
|
||||
lda proEOF+2
|
||||
sta proWRITE+10
|
||||
|
||||
jsl GSOS
|
||||
dw $2013
|
||||
adrl proWRITE
|
||||
|
||||
jsl GSOS
|
||||
dw $2014
|
||||
adrl proCLOSE
|
||||
rts
|
||||
|
||||
*--- GS/OS data
|
||||
|
||||
proOPEN
|
||||
dw 12
|
||||
ds 2
|
||||
adrl pFICHES
|
||||
ds 2
|
||||
ds 2
|
||||
ds 2
|
||||
ds 2
|
||||
ds 4
|
||||
ds 2
|
||||
ds 8
|
||||
ds 8
|
||||
ds 4
|
||||
proEOF ds 4
|
||||
|
||||
proREAD
|
||||
dw 4 ; 0 - nb parms
|
||||
ds 2 ; 2 - file id
|
||||
ds 4 ; 4 - pointer
|
||||
ds 4 ; 8 - length
|
||||
ds 4 ; C - length read
|
||||
|
||||
proWRITE
|
||||
dw 5 ; 0 - pcount
|
||||
ds 2 ; 2 - ref_num
|
||||
ds 4 ; 4 - data_buffer (we are in same bank)
|
||||
ds 4 ; 8 - request_count
|
||||
ds 4 ; C - transfer_count
|
||||
dw 1 ; cache_priority
|
||||
|
||||
proCLOSE
|
||||
dw 1
|
||||
ds 2
|
||||
|
||||
proQUIT
|
||||
dw 2 ; pcount
|
||||
ds 4 ; pathname
|
||||
ds 2 ; flags
|
||||
|
||||
*---
|
||||
|
||||
pFICHES strl '1/NEWTV.BASE'
|
1464
canalmeurtre/game.s
Normal file
1464
canalmeurtre/game.s
Normal file
File diff suppressed because it is too large
Load Diff
1
canalmeurtre/lisezmoi.txt
Normal file
1
canalmeurtre/lisezmoi.txt
Normal file
File diff suppressed because one or more lines are too long
569
canalmeurtre/midi.s
Normal file
569
canalmeurtre/midi.s
Normal file
@ -0,0 +1,569 @@
|
||||
*
|
||||
* Midi routines
|
||||
*
|
||||
* (c) 2020, Brutal Deluxe Software
|
||||
* Antoine Vignau & Olivier Zardini
|
||||
*
|
||||
|
||||
dpSEQ = $f8
|
||||
|
||||
seqOFFSET = $006
|
||||
seqTEMPO = $18A
|
||||
seqTPB = $190
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
mx %00
|
||||
|
||||
stopMIDI
|
||||
lda fgMIDI
|
||||
bne stopMIDI99
|
||||
|
||||
_KillAllNotes ; Stop MidiSynth
|
||||
_MSShutDown
|
||||
|
||||
PushWord #35 ; unload MidiSynth
|
||||
_UnloadOneTool
|
||||
|
||||
_SoundShutDown
|
||||
|
||||
stopMIDI99
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
initMIDI
|
||||
pha ; Check for AppleTalk
|
||||
_GetIRQEnable
|
||||
pla
|
||||
and #$20
|
||||
beq initMIDI1
|
||||
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
initMIDI1
|
||||
lda myDP
|
||||
clc
|
||||
adc #$100
|
||||
pha
|
||||
_SoundStartUp
|
||||
|
||||
PushWord #35 ; Load MidiSynth
|
||||
PushWord #0
|
||||
_LoadOneTool
|
||||
bcc initMIDI2
|
||||
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
initMIDI2
|
||||
_MSStartUp ; Start MidiSynth
|
||||
bcc musicMEMORY
|
||||
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
*-------------------------------------- Now, get RAM
|
||||
|
||||
musicMEMORY
|
||||
PushLong #0
|
||||
PushLong #$10000
|
||||
PushWord myID
|
||||
PushWord #%11000000_00011100
|
||||
PushLong #0
|
||||
_NewHandle
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
lda [3]
|
||||
sta ptrSEQ
|
||||
ldy #2
|
||||
lda [3],y
|
||||
sta ptrSEQ+2
|
||||
pld
|
||||
pla
|
||||
pla
|
||||
bcc musicMEMORY1
|
||||
|
||||
inc fgMIDI ; cannot assign memory for MIDI sequences
|
||||
rts
|
||||
|
||||
musicMEMORY1
|
||||
PushLong #0
|
||||
PushLong #$10000
|
||||
PushWord myID
|
||||
PushWord #%11000000_00011100
|
||||
PushLong #0
|
||||
_NewHandle
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
lda [3]
|
||||
sta ptrBNK
|
||||
ldy #2
|
||||
lda [3],y
|
||||
sta ptrBNK+2
|
||||
pld
|
||||
pla
|
||||
pla
|
||||
bcc musicMEMORY2
|
||||
|
||||
inc fgMIDI ; cannot assign memory for MIDI sequences
|
||||
rts
|
||||
|
||||
musicMEMORY2
|
||||
PushLong #0
|
||||
PushLong #$10000
|
||||
PushWord myID
|
||||
PushWord #%11000000_00011100
|
||||
PushLong #0
|
||||
_NewHandle
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
lda [3]
|
||||
sta ptrWAV
|
||||
ldy #2
|
||||
lda [3],y
|
||||
sta ptrWAV+2
|
||||
pld
|
||||
pla
|
||||
pla
|
||||
bcc loadWAV
|
||||
|
||||
inc fgMIDI ; cannot assign memory for MIDI sequences
|
||||
rts
|
||||
|
||||
*-------------------------------------- Load WAV
|
||||
|
||||
loadWAV
|
||||
lda #pWAV
|
||||
sta midiOPEN+4
|
||||
|
||||
jsl GSOS
|
||||
dw $2010
|
||||
adrl midiOPEN
|
||||
sta midiERR
|
||||
|
||||
lda midiOPEN+2
|
||||
sta midiSETMARK+2
|
||||
sta midiREAD+2
|
||||
sta midiCLOSE+2
|
||||
|
||||
jsl GSOS
|
||||
dw $2016
|
||||
adrl midiSETMARK
|
||||
|
||||
lda ptrWAV
|
||||
sta midiREAD+4
|
||||
lda ptrWAV+2
|
||||
sta midiREAD+6
|
||||
|
||||
stz midiREAD+8
|
||||
lda #1
|
||||
sta midiREAD+10
|
||||
|
||||
jsl GSOS
|
||||
dw $2012
|
||||
adrl midiREAD
|
||||
sta midiERR
|
||||
|
||||
jsl GSOS
|
||||
dw $2014
|
||||
adrl midiCLOSE
|
||||
|
||||
lda midiERR ; check err
|
||||
beq loadBNK
|
||||
|
||||
inc fgMIDI ; exit
|
||||
rts
|
||||
|
||||
*-------------------------------------- Load BNK
|
||||
|
||||
loadBNK
|
||||
lda #pBNK ; load the MIDI bank
|
||||
ldx ptrBNK+2
|
||||
ldy ptrBNK
|
||||
jsr loadGSOS
|
||||
|
||||
lda midiERR ; check err
|
||||
beq loadSEQUENCE
|
||||
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
*-------------------------------------- Load Sequence
|
||||
|
||||
loadSEQUENCE
|
||||
lda #pSEQ
|
||||
ldx ptrSEQ+2
|
||||
ldy ptrSEQ
|
||||
jsr loadGSOS
|
||||
|
||||
lda midiERR ; check err
|
||||
beq initMUSIC
|
||||
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
*-------------------------------------- Play sequence
|
||||
|
||||
initMUSIC
|
||||
lda ptrSEQ
|
||||
sta playMUSIC5+1 ; save pointers
|
||||
sta playMUSIC55+1
|
||||
lda ptrSEQ+2
|
||||
sta playMUSIC6+1
|
||||
sta playMUSIC66+1
|
||||
|
||||
_KillAllNotes
|
||||
|
||||
lda myDP
|
||||
tcd
|
||||
|
||||
playMUSIC5
|
||||
lda #$bdbd ; patched
|
||||
sta dpSEQ
|
||||
playMUSIC6
|
||||
lda #$bdbd ; patched
|
||||
sta dpSEQ+2
|
||||
|
||||
ldy #seqOFFSET
|
||||
lda [dpSEQ],y
|
||||
clc
|
||||
playMUSIC55
|
||||
adc #$bdbd ; patched
|
||||
sta seqPlayRec
|
||||
lda #0
|
||||
playMUSIC66
|
||||
adc #$bdbd ; patched
|
||||
sta seqPlayRec+2
|
||||
|
||||
ldy #seqTEMPO
|
||||
lda [dpSEQ],y
|
||||
asl
|
||||
sec
|
||||
sbc #10
|
||||
pha
|
||||
_SetTempo
|
||||
|
||||
ldy #seqTPB
|
||||
lda [dpSEQ],y
|
||||
pha
|
||||
_SetBeat
|
||||
|
||||
*--- Toutes les pistes sont actives
|
||||
|
||||
lda ptrBNK
|
||||
clc
|
||||
adc #$400
|
||||
sta ptrINST
|
||||
lda ptrBNK+2
|
||||
adc #0
|
||||
sta ptrINST+2
|
||||
|
||||
stz myINDEX
|
||||
|
||||
]lp PushWord myINDEX
|
||||
PushWord #$8000
|
||||
_SetPlayTrack
|
||||
|
||||
PushWord myINDEX
|
||||
PushWord #-1
|
||||
_TrackToChannel
|
||||
|
||||
PushWord myINDEX
|
||||
PushWord #2
|
||||
_SetTrackOut
|
||||
|
||||
PushLong ptrINST
|
||||
PushWord myINDEX
|
||||
_SetInstrument
|
||||
|
||||
lda ptrINST
|
||||
clc
|
||||
adc #$120
|
||||
sta ptrINST
|
||||
lda ptrINST+2
|
||||
adc #0
|
||||
sta ptrINST+2
|
||||
|
||||
inc myINDEX
|
||||
lda myINDEX
|
||||
cmp #16
|
||||
bne ]lp
|
||||
|
||||
*---
|
||||
|
||||
sei
|
||||
|
||||
PushLong ptrWAV
|
||||
PushWord #0 ; docStart
|
||||
PushWord #0 ; byteCount (=64ko)
|
||||
_WriteRamBlock
|
||||
|
||||
PushLong #callBackRec
|
||||
_SetCallBack
|
||||
|
||||
PushWord #0
|
||||
PushWord #0
|
||||
PushLong seqClock
|
||||
PushLong seqPlayRec
|
||||
_Locate
|
||||
PullLong seqPlayRec
|
||||
|
||||
cli ; end of the long init!
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
doMUSIK
|
||||
lda fgMIDI ; can we play?
|
||||
bne nozik99
|
||||
|
||||
lda fgMIDIPLAY
|
||||
eor #1
|
||||
sta fgMIDIPLAY
|
||||
beq doSOUNDON
|
||||
bne doSOUNDOFF
|
||||
|
||||
nozik99
|
||||
rts
|
||||
|
||||
fgMIDIPLAY ds 2
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
doSOUNDON
|
||||
lda fgMIDI ; can we play?
|
||||
bne playMUSIC99
|
||||
|
||||
lda #$0100 ; no, let's start playing!
|
||||
sta seqPlay
|
||||
PushLong #seqPlayRec
|
||||
_SeqPlayer
|
||||
stz fgLOOP
|
||||
|
||||
playMUSIC99
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
doSOUNDOFF
|
||||
lda fgMIDI
|
||||
bne stopMUSIC99
|
||||
|
||||
stz seqPlay
|
||||
PushLong #seqPlayRec
|
||||
_SeqPlayer
|
||||
_KillAllNotes
|
||||
|
||||
stopMUSIC99
|
||||
rts
|
||||
|
||||
*-------------------------------------- Suspend music
|
||||
|
||||
suspendMUSIC
|
||||
lda fgMIDI
|
||||
ora fgMIDIPLAY
|
||||
bne suspendMUSIC9
|
||||
|
||||
_MSSuspend
|
||||
|
||||
suspendMUSIC9
|
||||
rts
|
||||
|
||||
*-------------------------------------- Resume music
|
||||
|
||||
resumeMUSIC
|
||||
lda fgMIDI
|
||||
ora fgMIDIPLAY
|
||||
bne resumeMUSIC9
|
||||
|
||||
_MSResume
|
||||
|
||||
resumeMUSIC9
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
checkREPLAY
|
||||
lda fgMIDI
|
||||
bne checkREPLAY99
|
||||
|
||||
lda fgLOOP
|
||||
beq checkREPLAY99
|
||||
jsr doSOUNDON
|
||||
|
||||
checkREPLAY99
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
|
||||
replayMUSIC
|
||||
lda #-1
|
||||
stal fgLOOP
|
||||
rtl
|
||||
|
||||
fgLOOP dw -1
|
||||
|
||||
*-------------------------------------- Select random sequence
|
||||
|
||||
randomMIDI
|
||||
jsr Random ; get random 0-7
|
||||
and #7
|
||||
bcc randomMIDI
|
||||
jsr midi_setit ; check file exists
|
||||
bcc mr_ok ; it is ok, it is the sequence
|
||||
|
||||
lda #0 ; force sequence 1
|
||||
jsr midi_setit
|
||||
|
||||
mr_ok rts
|
||||
|
||||
*-------------------------------------- Check a sequence
|
||||
|
||||
midi_setit
|
||||
clc
|
||||
adc #'1'
|
||||
sep #$20
|
||||
sta pSEQ+26
|
||||
rep #$20
|
||||
|
||||
lda #pSEQ ; check file exists
|
||||
sta midiOPEN+4
|
||||
|
||||
jsl GSOS
|
||||
dw $2010
|
||||
adrl midiOPEN
|
||||
bcs midi_setit99
|
||||
|
||||
lda midiOPEN+2
|
||||
sta midiCLOSE+2
|
||||
|
||||
jsl GSOS
|
||||
dw $2014
|
||||
adrl midiCLOSE
|
||||
|
||||
midi_setit99
|
||||
rts
|
||||
|
||||
*-------------------------------------- Load a file
|
||||
|
||||
loadGSOS
|
||||
sta midiOPEN+4
|
||||
sty midiREAD+4
|
||||
stx midiREAD+6
|
||||
stz midiERR
|
||||
|
||||
jsl GSOS
|
||||
dw $2010
|
||||
adrl midiOPEN
|
||||
bcs loadGSOSERR
|
||||
|
||||
lda midiOPEN+2
|
||||
sta midiREAD+2
|
||||
sta midiCLOSE+2
|
||||
|
||||
lda midiEOF
|
||||
sta midiREAD+8
|
||||
lda midiEOF+2
|
||||
sta midiREAD+10
|
||||
|
||||
jsl GSOS
|
||||
dw $2012
|
||||
adrl midiREAD
|
||||
bcs loadGSOSERR
|
||||
|
||||
loadGSOS2
|
||||
jsl GSOS
|
||||
dw $2014
|
||||
adrl midiCLOSE
|
||||
rts
|
||||
|
||||
loadGSOSERR
|
||||
jsr loadGSOS2
|
||||
inc fgMIDI
|
||||
rts
|
||||
|
||||
*-------------------------------------- DATA
|
||||
|
||||
myINDEX ds 2
|
||||
|
||||
*--- GS/OS
|
||||
|
||||
midiERR ds 2
|
||||
|
||||
midiOPEN dw 12
|
||||
ds 2
|
||||
adrl pSEQ
|
||||
ds 2
|
||||
ds 2
|
||||
ds 2
|
||||
ds 2
|
||||
ds 4
|
||||
ds 2
|
||||
ds 8
|
||||
ds 8
|
||||
ds 4
|
||||
midiEOF ds 4
|
||||
|
||||
midiREAD dw 4
|
||||
ds 2
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
|
||||
midiCLOSE dw 1
|
||||
ds 2
|
||||
|
||||
midiSETMARK dw 3
|
||||
ds 2
|
||||
ds 2
|
||||
adrl $900 ; +$900 pour WAV
|
||||
|
||||
*--- GS/OS Strings (+26 pour le random de la musique)
|
||||
|
||||
pSEQ strl '1/data/musiques/sequence1'
|
||||
pWAV strl '1/data/musiques/piano.wav'
|
||||
pBNK strl '1/data/musiques/piano.bnk'
|
||||
|
||||
*--- Memory
|
||||
|
||||
ptrSEQ ds 4
|
||||
ptrWAV ds 4
|
||||
ptrBNK ds 4
|
||||
|
||||
*--- Flags
|
||||
|
||||
fgMIDI ds 2 ; can play MIDI if 0
|
||||
|
||||
*--- Instruments
|
||||
|
||||
ptrINST ds 4
|
||||
|
||||
*--- MidiSynth
|
||||
|
||||
seqPlayRec
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
seqPlay ds 2 ; Play
|
||||
seqClock ds 4
|
||||
|
||||
callBackRec adrl replayMUSIC ; When sequence ends !
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
||||
ds 4
|
1
canalmeurtre/readme.txt
Normal file
1
canalmeurtre/readme.txt
Normal file
@ -0,0 +1 @@
|
||||
MURDER CHANNEL
by FrŽdŽric Copet and Jean SolŽ
(c) Froggy Software
Apple IIgs Version
by Antoine Vignau & Olivier Zardini
(c) 2022, Brutal Deluxe Software
More than a traditional computer game, Canal Meurtre is above all an interactive comic strip. Leaf through it at your own pace and try to solve the enigma it offers you!
The theme
Attached to your TV like an infant to its pacifier, you enjoy cozy evenings in the calm of your apartment.
However, tonight, the incredible has just happened: your favorite journalist has been murdered!
Your investigative skills overcoming your acute flemmingitis, you decide to take action.
But not too much is needed, and so as not to tire your viewer's heart, it is from your home that you will conduct your investigations.
Switch off your bedside lamp, switch on your receiver and enter the very closed world of a television channel.
All shots are allowed to discover the culprit(s). It's up to you to make the best use of: your sagacity, your Apple IIgs mouse, your intuitions and chance!
How to play ?
Double-click on the Murder Channel icon to launch the game. If you have installed the Midi Synth tool then background music will accompany you.
To start
Turn on the TV (the bedside lamp turns off automatically to better let you follow the show). You then find yourself in the radio house where the journalist was murdered. It's up to you to find out under what circumstances.
For each table, choices are offered below the chest of drawers. Click in the buttons to move, to validate an action or the reading of a text.
The game will sometimes ask you for information or clues. Type them directly on the keyboard and click to validate them.
Displacements
Some parts are not always accessible depending on the circumstances. The studios may be filming for example.
Save and resume
At any time you can save or resume a game in progress. The game will then take into account what you have done and discovered so far.
Map
By clicking on the second button of the television, you can consult the map of this one. A silhouette symbolizes where you are.
Ad
The third button on the TV is an advertisement page. This is normal since it is a private TV.
Panic
You've been going around in circles for weeks without finding the solution and you wanted to see the latest drawings. Do not panic. You need Doctor Froggy's prescription.
Write to Brutal Deluxe from brutaldeluxe.fr, it will return the complete solution to you. Phew. Thank you Doctor.
The keys
- open-apple-O: load a game from the diskette
- open-apple-Q: quit the game
- open-apple-R: start a new game
- open-apple-S: save a game on diskette
- open-apple-Z: play/stop the music
The authors
FrŽdŽric Copet lives in a large house near Reims. He shares his occupations between computers, telematics, leather work, motocross, mechanics, carpentry, gardening, shoemaking and blacksmithing.
FrŽdŽric Copet is therefore an extra-terrestrial.
Jean SolŽ lives in a large house near Reims. He shares his occupations between comics, computers, posters, magazine covers, book covers, software covers, exhibitions, record covers, illustrations for children, for adults, for those who do politics. He also takes care of the Beatles, and his collection of Whiskey bottle models. Jean SolŽ is therefore an extra-terrestrial.
The house of FrŽdŽric Copet and that of Jean SolŽ are about ten kilometers apart. Sometimes one of them takes his flying saucer to visit the other.
Protection
This game is not protected, therefore cheaper. Do not sell your copies, thank you.
Anecdote
The Mac version dates from 1986. The French version was published in 1987.
The authors had produced the German and Spanish versions which were never published.
We took the opportunity to create the English version.
The Apple IIgs version is thus available in German, English, Spanish, and French.
Can you translate, please?
In case you're lost with the different languages and the associated rooms:
- Canal Meurtre / Channel Murder / Fernsehkrimi / Canal Misterio
- RŽception / Lobby / Empfang / Recepci—n
- Cantine / Canteen / Kantine / Cantina
- Archives / Archive room / Archiv / Archivo
- Costumes / Costume room / KostŸme / Vestuario
- DŽcors / Scenery room / BŸhnendekoration / Escenograf’a
- RŽdaction / Newsroom / Redaktion / Redacci—n
- Studio A / Studio A / Studio A / Estudio A
- Studio B / Studio B / Studio B / Estudio B
- Maquillage / Makeup room / Maske / Maquillaje
- RŽgie / Control room / Regie / Direcci—n
- Montage / Editing room / Schnitt / Edici—n
- Speak-Room / Speak-Room / Tontechnik / Cabina de sonido
Thanks
- Jean-Louis Le Breton who gave his agreement for the Apple IIgs version,
- Mario Patino for his few translations into German and Spanish.
|
Loading…
x
Reference in New Issue
Block a user