load/save ok

This commit is contained in:
Antoine Vignau 2024-01-12 18:18:47 +01:00
parent eed49a232d
commit 669d425a3e
14 changed files with 23704 additions and 23905 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -10745,9 +10745,9 @@
| | | | | | 70 61 62 6C | | | | | | | 70 61 62 6C |
| | | | | | 65 20 64 65 | | | | | | | 65 20 64 65 |
| | | | | | 0D | | | | | | | 0D |
2740 | 3 introdata.s 50 | Data | 11 | | 37 | 00/A689 : 72 61 73 65 | asc 'raser la terre, ce que je ferai dans'0d 2740 | 3 introdata.s 50 | Data | 11 | | 37 | 00/A689 : 72 61 73 65 | asc 'raser la Terre, ce que je ferai dans'0d
| | | | | | 72 20 6C 61 | | | | | | | 72 20 6C 61 |
| | | | | | 20 74 65 72 | | | | | | | 20 54 65 72 |
| | | | | | 72 65 2C 20 | | | | | | | 72 65 2C 20 |
| | | | | | 63 65 20 71 | | | | | | | 63 65 20 71 |
| | | | | | 75 65 20 6A | | | | | | | 75 65 20 6A |
@ -10942,8 +10942,8 @@
| | | | | | 20 61 75 20 | | | | | | | 20 61 75 20 |
| | | | | | 76 61 69 73 | | | | | | | 76 61 69 73 |
| | | | | | 2D 0D | | | | | | | 2D 0D |
2791 | 3 introdata.s 101 | Data | 11 | | 37 | 00/A90F : 73 65 61 75 | asc 'seau o'9e' vous allez maintenant tenter'0d 2791 | 3 introdata.s 101 | Data | 11 | | 37 | 00/A90F : 73 65 61 75 | asc 'seau o'9d' vous allez maintenant tenter'0d
| | | | | | 20 6F 9E 20 | | | | | | | 20 6F 9D 20 |
| | | | | | 76 6F 75 73 | | | | | | | 76 6F 75 73 |
| | | | | | 20 61 6C 6C | | | | | | | 20 61 6C 6C |
| | | | | | 65 7A 20 6D | | | | | | | 65 7A 20 6D |

View File

@ -163,6 +163,8 @@ RDKEY jsr CURSOR ; shows the cursor
jsr checkREPLAY jsr checkREPLAY
jsr printTEMPS jsr printTEMPS
jsr testENERGIE
bcs RDKEY99
jsr testTEMPS jsr testTEMPS
bcs RDKEY99 bcs RDKEY99

View File

@ -559,7 +559,7 @@ V$137 str 'TOUT'
V$138 str 'TOTA' V$138 str 'TOTA'
V$139 str 'RANG' ; RANGER (TUBE DANS GLACE => RANG TUBE) V$139 str 'RANG' ; RANGER (TUBE DANS GLACE => RANG TUBE)
V$200 str 'TIME' V$200 str 'STOP'
V$201 str 'MUSI' V$201 str 'MUSI'
* *
@ -689,7 +689,8 @@ str4618_2 asc 0d'Vous venez de r'8e'aliser que Genius'0d
asc 'pleurait de JOIE...!'00 asc 'pleurait de JOIE...!'00
str4620 asc 'La soucoupe a explos'8e' au d'8e'collage.'00 str4620 asc 'La soucoupe a explos'8e' au d'8e'collage.'00
str4630 asc 'Energie restante :'00 str4630 asc 'Energie restante : '00
strFORCE asc '20000'00
str4640 asc 'Petit dr'99'le... Le chronom'8f'tre est'0d str4640 asc 'Petit dr'99'le... Le chronom'8f'tre est'0d
asc 'affich'8e' en permanence'00 asc 'affich'8e' en permanence'00
str4650 asc 0d'Le temps que vous aviez pour votre'0d str4650 asc 0d'Le temps que vous aviez pour votre'0d

View File

@ -32,6 +32,7 @@
use 4/Event.Macs use 4/Event.Macs
use 4/Font.Macs use 4/Font.Macs
use 4/Int.Macs
use 4/Locator.Macs use 4/Locator.Macs
use 4/Mem.Macs use 4/Mem.Macs
use 4/Menu.Macs use 4/Menu.Macs
@ -247,6 +248,7 @@ okTOOL _HideMenuBar
sta ptrSCREEN+2 sta ptrSCREEN+2
okSHADOW okSHADOW
*----------------------------------- *-----------------------------------
* C'EST L'HEURE DE L'INTRODUCTION * C'EST L'HEURE DE L'INTRODUCTION
*----------------------------------- *-----------------------------------
@ -257,10 +259,13 @@ okSHADOW
* IL FAUT JOUER MAINTENANT * IL FAUT JOUER MAINTENANT
*----------------------------------- *-----------------------------------
* jsr initMIDI lda fgINTRO
* jsr doSOUNDON bne okZIKMU
sei jsr initMIDI
jsr doSOUNDON
okZIKMU sei
PushLong #intTIME PushLong #intTIME
_SetHeartBeat _SetHeartBeat
cli cli
@ -356,93 +361,12 @@ loadBACK _HideCursor
*----------------------------------- Open *----------------------------------- Open
mx %11 mx %00
doLOAD sta pGAME+10 doLOAD sta pGAME+10
rep #$30 rep #$30
jsr loadALL
sep #$30
rts
mx %00 jsl GSOS
jsr doSOUNDOFF
jsr saveBACK
PushWord #30
PushWord #43
PushLong #strLOADFILE
PushLong #0
PushLong #typeLIST
PushLong #replyPTR
_SFGetFile
jsr loadBACK
jsr doSOUNDON
lda replyPTR
bne doLOAD1
rts
doLOAD1 jsr copyPATH
jsr loadALL
rts
*----------------------------------- Save
mx %11
doSAVE sta pGAME+10
rep #$30
jsr saveALL
sep #$30
rts
mx %00
jsr doSOUNDOFF
jsr saveBACK
PushWord #25
PushWord #36
PushLong #strSAVEFILE
PushLong #namePATH
PushWord #15
PushLong #replyPTR
_SFPutFile
jsr loadBACK
jsr doSOUNDON
lda replyPTR
bne doSAVE1
rts
doSAVE1 jsr copyPATH
jsr saveALL
rts
*--- Recopie le filename du fichier de sauvegarde
mx %00
copyPATH sep #$20
ldx #16-1
]lp lda namePATH1,x
sta pGAME+4,x
dex
bpl ]lp
lda namePATH
inc
inc
sta pGAME
rep #$20
rts
*--- Charge le fichier de sauvegarde en mŽmoire
loadALL jsl GSOS
dw $2010 dw $2010
adrl proOPENGAME adrl proOPENGAME
bcs loadKO99 bcs loadKO99
@ -451,29 +375,25 @@ loadALL jsl GSOS
sta proREADGAME+2 sta proREADGAME+2
sta proCLOSE+2 sta proCLOSE+2
jsr loadPART jsl GSOS
dw $2012
adrl proREADGAME
jsl GSOS jsl GSOS
dw $2014 dw $2014
adrl proCLOSE adrl proCLOSE
loadKO99 rts loadKO99 sep #$30
*---
loadPART ldx #FIN_DATA-DEBUT_DATA
ldy #A1
loadIT stx proREADGAME+8
sty proREADGAME+4
jsl GSOS
dw $2012
adrl proREADGAME
rts rts
*--- Enregistre le fichier de sauvegarde *----------------------------------- Save
saveALL jsl GSOS mx %00
doSAVE sta pGAME+10
rep #$30
jsl GSOS
dw $2002 dw $2002
adrl proDESTROYGAME adrl proDESTROYGAME
@ -491,24 +411,15 @@ saveALL jsl GSOS
sta proWRITEGAME+2 sta proWRITEGAME+2
sta proCLOSE+2 sta proCLOSE+2
jsr savePART jsl GSOS
dw $2013
adrl proWRITEGAME
jsl GSOS jsl GSOS
dw $2014 dw $2014
adrl proCLOSE adrl proCLOSE
saveKO99 rts saveKO99 sep #$30
*---
savePART ldx #FIN_DATA-DEBUT_DATA
ldy #A1
saveIT stx proWRITEGAME+8
sty proWRITEGAME+4
jsl GSOS
dw $2013
adrl proWRITEGAME
rts rts
*--- For the game party *--- For the game party
@ -535,15 +446,15 @@ proOPENGAME
proREADGAME proREADGAME
dw 4 ; 0 - pcount dw 4 ; 0 - pcount
ds 2 ; 2 - ref_num ds 2 ; 2 - ref_num
adrl pGAME ; 4 - data_buffer adrl A1 ; 4 - data_buffer
ds 4 ; 8 - request_count adrl FIN_DATA-DEBUT_DATA ; 8 - request_count
ds 4 ; C - transfer_count ds 4 ; C - transfer_count
proWRITEGAME proWRITEGAME
dw 5 ; 0 - pcount dw 5 ; 0 - pcount
ds 2 ; 2 - ref_num ds 2 ; 2 - ref_num
adrl pGAME ; 4 - data_buffer (we are in same bank) adrl A1 ; 4 - data_buffer (we are in same bank)
ds 4 ; 8 - request_count adrl FIN_DATA-DEBUT_DATA ; 8 - request_count
ds 4 ; C - transfer_count ds 4 ; C - transfer_count
dw 1 ; cache_priority dw 1 ; cache_priority
@ -617,46 +528,6 @@ errSTR2 str ''
ssREC ds 4 ssREC ds 4
*toolTBL dw $0000 ; flags
* dw $C000 ; videoMode (shadowing + fast port)
* dw $0000 ; resFileID
* ADRL $00000000 ; dPageHandle
* dw $0011
* dw $0003 ; Miscellaneous Tool
* dw $0300
* dw $0004 ; QuickDraw II
* dw $0301
* dw $0005 ; Desk Manager
* dw $0302
* dw $0006 ; Event Manager
* dw $0300
* dw $0008 ; Sound Tool Set
* dw $0100
* dw $000B ; Integer Math Tool Set
* dw $0200
* dw $000E ; Window Manager
* dw $0301
* dw $000F ; Menu Manager
* dw $0301
* dw $0010 ; Control Manager
* dw $0301
* dw $0012 ; QuickDraw II Auxiliary
* dw $0301
* dw $0014 ; LineEdit Tool Set
* dw $0301
* dw $0015 ; Dialog Manager
* dw $0301
* dw $0016 ; Scrap Manager
* dw $0300
* dw $0017 ; Standard File Tool Set
* dw $0301
* dw $001B ; Font Manager
* dw $0301
* dw $001C ; List Manager
* dw $0301
* dw $001E ; Resource Manager
* dw $0100
*----------------------------------- GS/OS *----------------------------------- GS/OS
proERR ds 2 ; GS/OS error code proERR ds 2 ; GS/OS error code
@ -679,24 +550,6 @@ taskWHERE ds 4 ; wmWhere +10
taskMODIFIERS ds 2 ; wmModifiers +14 taskMODIFIERS ds 2 ; wmModifiers +14
taskDATA ds 4 ; wmTaskData +16 taskDATA ds 4 ; wmTaskData +16
*----------------------------------- Standard File Tool Set
strLOADFILE str 'Charger quelle partie ?'
strSAVEFILE str 'Enregistrer sous...'
typeLIST hex 01
hex 5d ; Game/Edu files
replyPTR ds 2 ; 0 good
ds 2 ; 2 fileType
ds 2 ; 4 auxFileType
namePATH hex 06 ; 6 fileName
namePATH1 asc 'Partie' ; 7 fileName (16 normally)
ds 9
loadPATH ds 1 ; 22 fullPathname (string length)
loadPATH1 ds 129 ; 23 fullPathname (128 normally)
*----------------------------------- *-----------------------------------
* CODE BASIC EN ASM :-) * CODE BASIC EN ASM :-)
*----------------------------------- *-----------------------------------

View File

@ -74,7 +74,14 @@ intro
jsr intro_explications ; ok jsr intro_explications ; ok
bcs intro_end bcs intro_end
jsr intro_genius_image ; ok jsr intro_genius_image ; ok
intro_end rts
intro_end PushWord #0
_ClearScreen
PushWord #0
PushLong #palette320
_SetColorTable
rts
*----------------------------------- *-----------------------------------
* INTRO * INTRO
@ -88,11 +95,6 @@ intro_intro
PushWord #0 PushWord #0
_ClearScreen _ClearScreen
ldy #198
lda #txtINTRO4
jsr centerME
bcs ii_end
ldy #iiY ldy #iiY
lda #txtINTRO1 lda #txtINTRO1
jsr centerME jsr centerME
@ -110,6 +112,7 @@ intro_intro
ldy #60*1 ldy #60*1
jsr waitMS16 jsr waitMS16
bcs ii_end
*----------- La suite du copyright *----------- La suite du copyright
@ -129,6 +132,20 @@ intro_intro
ldy #iiY+40 ldy #iiY+40
lda #txtINTRO7 lda #txtINTRO7
jsr centerME jsr centerME
bcs ii_end
ldy #60*1
jsr waitMS16
bcs ii_end
*----------- Le merci du copyright
PushWord #0
_ClearScreen
ldy #iiY+20
lda #txtINTRO4
jsr centerME
ldy #60*1 ldy #60*1
jsr waitMS16 jsr waitMS16
@ -292,8 +309,11 @@ intro_genius_texte
jsr waitMSBIS ; keypress? jsr waitMSBIS ; keypress?
bcc igt_ok bcc igt_ok
igt_end rts rts
igt_end ldy #2
jmp waitMS16
igt_ok lda [dpFROM] ; get char igt_ok lda [dpFROM] ; get char
and #$ff and #$ff
beq igt_end beq igt_end
@ -339,6 +359,10 @@ intro_serpent
jsr snake_1 jsr snake_1
bcs is_end bcs is_end
jsr snake_2 jsr snake_2
bcs is_end
ldy #2
jsr waitMS16
is_end PushLong #curPATTERN is_end PushLong #curPATTERN
_SetPenPat _SetPenPat
@ -597,11 +621,8 @@ snake_2 PushWord #0
lda #txtSERPENT1 lda #txtSERPENT1
jsr centerME jsr centerME
php
_SetForeColor _SetForeColor
jsr fontSHASTON8 jsr fontSHASTON8
plp
bcs s2_end
ldy #105 ldy #105
lda #txtSERPENT2 lda #txtSERPENT2
@ -833,8 +854,10 @@ ovalY2 = 180
jsr initMIDI jsr initMIDI
jsr doSOUNDON jsr doSOUNDON
inc fgINTRO ; m<>me si KO, on aura dŽmarrŽ la musique
ldy #60*60*2 ldy #60*10
jsr waitMS16 jsr waitMS16
*----------- Boucle sur les couleurs (ou pas) *----------- Boucle sur les couleurs (ou pas)
@ -1253,9 +1276,7 @@ intro_explications
ldx #7 ldx #7
jsr showTEXTE jsr showTEXTE
ie_end php ie_end _SetForeColor
_SetForeColor
plp
rts rts
*----------------------------------- *-----------------------------------
@ -1464,6 +1485,9 @@ fontSHASTON
* DATA INTRO * DATA INTRO
*----------------------------------- *-----------------------------------
fgINTRO ds 2 ; 0 : on n'a pas dŽmarrŽ la musique dans l'intro
; 1 : on a dŽmarrŽ la musique dans l'intro
o2gsCOLP hex 00,70,A0,90,40,C0,B0,F0 ; index pour les pixels pairs o2gsCOLP hex 00,70,A0,90,40,C0,B0,F0 ; index pour les pixels pairs
o2gsCOLI hex 00,07,0A,09,04,0C,0B,0F ; index pour les pixels impairs o2gsCOLI hex 00,07,0A,09,04,0C,0B,0F ; index pour les pixels impairs
o2gsBK hex 00,77,AA,99,44,CC,BB,FF ; index pour le background o2gsBK hex 00,77,AA,99,44,CC,BB,FF ; index pour le background

View File

@ -47,7 +47,7 @@ txtTELEX5 ENT
txtGENIUSTEXTE ENT txtGENIUSTEXTE ENT
asc ' Moi, GENIUS, je d'8e'fie le monde. J'27'ai'0d asc ' Moi, GENIUS, je d'8e'fie le monde. J'27'ai'0d
asc 'invent'8e' une nouvelle arme capable de'0d asc 'invent'8e' une nouvelle arme capable de'0d
asc 'raser la terre, ce que je ferai dans'0d asc 'raser la Terre, ce que je ferai dans'0d
asc 'deux semaines... Mais, comme je ne suis'0d asc 'deux semaines... Mais, comme je ne suis'0d
asc 'pas un monstre, je vous laisse une'0d asc 'pas un monstre, je vous laisse une'0d
asc 'chance. J'27'accepte que des hommes de'0d asc 'chance. J'27'accepte que des hommes de'0d
@ -98,7 +98,7 @@ txtMONDE ENT
asc 'vous rendre aux autorit'8e's pour combat-'0d asc 'vous rendre aux autorit'8e's pour combat-'0d
asc 'tre de nouveau le Dr Genius.'0d asc 'tre de nouveau le Dr Genius.'0d
asc 'Le lendemain, on vous emm'8f'ne au vais-'0d asc 'Le lendemain, on vous emm'8f'ne au vais-'0d
asc 'seau o'9e' vous allez maintenant tenter'0d asc 'seau o'9d' vous allez maintenant tenter'0d
asc 'de vaincre le Dr Genius afin de sauver'0d asc 'de vaincre le Dr Genius afin de sauver'0d
asc 'la Terre.'0d0d0d asc 'la Terre.'0d0d0d
asc ' BON COURAGE...'0d0d0d asc ' BON COURAGE...'0d0d0d

View File

@ -18,10 +18,11 @@ textY = textX+2 ; caracteres QuickDraw II
LINNUM = $50 ; result from GETADR LINNUM = $50 ; result from GETADR
chrLA = $08 chrLA = $08
chrRA = $15
chrDEL = $7f
chrRET = $0d chrRET = $0d
chrRA = $15
chrESC = $1b
chrSPC = $20 chrSPC = $20
chrDEL = $7f
maxLEN = 40 maxLEN = 40
chrOUI = 'O' chrOUI = 'O'
@ -79,7 +80,7 @@ PLAY sep #$30
jsr initALL jsr initALL
REPLAY sep #$30 REPLAY sep #$30
jsr FULLHGR jsr FULLHGR
rep #$30 ; init 16-bits, c'est mieux rep #$30 ; init 16-bits, c'est mieux
stz textX stz textX
lda #row16 lda #row16
@ -294,7 +295,7 @@ REPLAY sep #$30
:900 cmp #idxTIMER :900 cmp #idxTIMER
bne :905 bne :905
jsr switchTEMPS jsr switchTEMPS ; temps et Žnergie
jmp :100 jmp :100
:905 cmp #idxMUSIC :905 cmp #idxMUSIC
@ -309,6 +310,8 @@ REPLAY sep #$30
:915 ldy #0 :915 ldy #0
jsr gereFORCE ; FORCE--
:920 lda SALLE ; T$=MID(M$(SALLE),Z,2) :920 lda SALLE ; T$=MID(M$(SALLE),Z,2)
asl asl
tax tax
@ -1024,7 +1027,6 @@ tbl4000 da $bdbd,:4010,:4020,:4030,:4040,:4050,:4060,:4070,:4080,:4090
@gotoxy #43;#45 ; entrer le mot de passe @gotoxy #43;#45 ; entrer le mot de passe
jsr :4556_input ; saisie 2 jsr :4556_input ; saisie 2
bcc :4554 ; ok bcc :4554 ; ok
* @gotoxy #43;#53 ; entrer le mot de passe
rep #$30 ; init 16-bits, c'est mieux rep #$30 ; init 16-bits, c'est mieux
stz textX stz textX
lda #row16 lda #row16
@ -1034,7 +1036,6 @@ tbl4000 da $bdbd,:4010,:4020,:4030,:4040,:4050,:4060,:4070,:4080,:4090
jmp :perdu ; ciao jmp :perdu ; ciao
:4554 :4554
* @gotoxy #43;#62 ; 42
rep #$30 ; init 16-bits, c'est mieux rep #$30 ; init 16-bits, c'est mieux
stz textX stz textX
lda #row16 lda #row16
@ -1057,16 +1058,8 @@ tbl4000 da $bdbd,:4010,:4020,:4030,:4040,:4050,:4060,:4070,:4080,:4090
lda #row18 lda #row18
sta textY sta textY
sep #$30 sep #$30
* @gotoxy #43;#86
* @print #str4559_3 ; xy
* @gotoxy #43;#94
* ldx #>MP$
* ldy #<MP$
* jsr printCSTRING ; COUTXY
rts rts
*--- saisie du mot de passe *--- saisie du mot de passe
:4556_input @print #str4556 :4556_input @print #str4556
@ -1106,40 +1099,34 @@ MDP$ asc 'MANOIR'
:4590 stz fgTIME :4590 stz fgTIME
jsr :4595 jsr :4595
bcs :4591 bcs :4591
* rep #$30
jsr doSAVE jsr doSAVE
* sep #$30
:4591 inc fgTIME :4591 inc fgTIME
rts jmp :100
*----------- LOAD - LOGO *----------- LOAD - LOGO
:4600 stz fgTIME :4600 stz fgTIME
jsr :4595 jsr :4595
bcs :4601 bcs :4601
* rep #$30
jsr doLOAD jsr doLOAD
* sep #$30 bcs :4601
inc fgTIME inc fgTIME
jmp REPLAY jmp REPLAY
:4601 inc fgTIME :4601 inc fgTIME
rts jmp :100
*----------- Slot for load/save *----------- Slot for load/save
:4595 @print #str4595 :4595 @print #str4595
jsr GETLN1 jsr translateKEY
cpx #1
bne :4595
lda TEXTBUFFER
cmp #'0' cmp #'0'
beq :4599
bcc :4595 bcc :4595
beq :4597
cmp #'9'+1 cmp #'9'+1
bcs :4595 bcs :4595
clc clc
rts rts
:4597 sec :4599 sec
rts rts
*----------- LE MOT DE PASSE FINAL *----------- LE MOT DE PASSE FINAL
@ -1176,11 +1163,21 @@ MDP$ asc 'MANOIR'
@print #str4620 @print #str4620
rts rts
:4630 @print #str4630 :4630 @print #str4630 ; affiche la force restante
rep #$30 ; convertit la force
PushWord FORCE
PushLong #strFORCE
PushWord #5
PushWord #FALSE
_Int2Dec
sep #$30
@print #strFORCE ; et l'affiche
rts rts
:4640 @print #str4640 :4640 @print #str4640 ; le TEMPs est ici
rts jmp switchTEMPS
:4650 @print #str4650 :4650 @print #str4650
jmp :perdu jmp :perdu
@ -1319,12 +1316,12 @@ MDP$ asc 'MANOIR'
rts rts
:4920 @print #str4920 :4920 @print #str4920
@wait #200
rts rts
*----------- *-----------
:5500 stz fgTIME :5500 lda #0
sta fgTIME
@print #str5500 @print #str5500
jsr GETLN1 jsr GETLN1
cpx #1 cpx #1
@ -1566,11 +1563,19 @@ initALL ldx #FIN_DATA-DEBUT_DATA
lda #11 lda #11
sta SALLE sta SALLE
lda #<4000 lda #<20000 ; ici, on multiplie par 5
sta FORCE sta FORCE ; et toc
lda #>4000 lda #>20000
sta FORCE+1 sta FORCE+1
lda #'2'
sta strFORCE
lda #'0'
sta strFORCE+1
sta strFORCE+2
sta strFORCE+3
sta strFORCE+4
lda #$20 lda #$20
sta MINUTES sta MINUTES
lda #$00 lda #$00
@ -1594,8 +1599,8 @@ initALL ldx #FIN_DATA-DEBUT_DATA
* 30000 - LES MOTS DE PASSE * 30000 - LES MOTS DE PASSE
*----------------------------------- *-----------------------------------
:30000 rts :30000 rts ; on n'affiche rien
; parce que c'est visible !
rep #$30 rep #$30
PushWord #12 PushWord #12
PushWord #190 PushWord #190
@ -1610,7 +1615,8 @@ initALL ldx #FIN_DATA-DEBUT_DATA
* 20000 - PERDU * 20000 - PERDU
*----------------------------------- *-----------------------------------
:perdu stz fgTIME :perdu lda #0
sta fgTIME
@wait #200 @wait #200
@explode @explode
jsr setTEXTFULL jsr setTEXTFULL
@ -1634,7 +1640,8 @@ initALL ldx #FIN_DATA-DEBUT_DATA
* 32000 - GAGNE * 32000 - GAGNE
*----------------------------------- *-----------------------------------
:gagne stz fgTIME :gagne lda #0
sta fgTIME
@wait #200 @wait #200
@explode @explode
jsr setTEXTFULL jsr setTEXTFULL
@ -1752,19 +1759,47 @@ smoff rep #$30
rts rts
*---------------------- *----------------------
* ENERGIE * TEMPS & ENERGIE
*---------------------- *----------------------
mx %11 mx %11
switchTEMPS switchTEMPS
lda #0 lda #0
eor #1 eor #1
sta switchTEMPS+1 sta switchTEMPS+1
rts rts
testTEMPS sep #$30 *-----------
lda switchTEMPS+1 ; switch is off
mx %11
gereFORCE lda FORCE ; on n'a plus de force
ora FORCE+1
bne gf_1
rts
gf_1 rep #$30
lda FORCE
sec
sbc S
bpl gf_2
lda #0
gf_2 sta FORCE
sep #$30
rts
*-----------
testENERGIE sep #$30 ; switch is off
lda switchTEMPS+1
bne te_ok
rep #$30
lda FORCE ; reste-t-il de la force ?
beq te_ko
bne te_ok
testTEMPS sep #$30 ; switch is off
lda switchTEMPS+1
bne te_ok bne te_ok
lda fgTIME lda fgTIME
@ -1777,14 +1812,14 @@ testTEMPS sep #$30
ora SECONDES ; ou des secondes ? ora SECONDES ; ou des secondes ?
bne te_ok bne te_ok
lda #1 te_ko lda #1 ; non, on a perdu
sta fgPERDU sta fgPERDU
rep #$30 rep #$30
sec ; non, on a perdu sec
rts rts
te_ok rep #$30 te_ok rep #$30 ; oui, pas de probl<62>me
clc clc
rts rts
@ -1927,7 +1962,7 @@ A1 ds 1
A2 ds 1 ; $400 A2 ds 1 ; $400
BREAK ds 1 BREAK ds 1
E ds 1 E ds 1
FORCE ds 2 ; 400 unitŽs en entrŽe FORCE ds 2 ; 20000 unitŽs en entrŽe
G ds 1 G ds 1
H ds 1 H ds 1
HH ds 1 HH ds 1
@ -1937,7 +1972,7 @@ N ds 1
NL ds 1 NL ds 1
OK ds 1 OK ds 1
PP ds 1 PP ds 1
S ds 1 S ds 2 ; parce qu'on l'utilise en 16-bits aussi
SALLE ds 1 SALLE ds 1
T ds 1 T ds 1
lenSTRING ds 1 lenSTRING ds 1

View File

@ -198,29 +198,35 @@ loadSEQUENCE
initMUSIC initMUSIC
lda ptrSEQ lda ptrSEQ
sta playMUSIC5+1 ; save pointers sta dpSEQ
sta playMUSIC55+1
lda ptrSEQ+2 lda ptrSEQ+2
sta playMUSIC6+1 sta dpSEQ+2
sta playMUSIC66+1
* sta playMUSIC5+1 ; save pointers
* sta playMUSIC55+1
* lda ptrSEQ+2
* sta playMUSIC6+1
* sta playMUSIC66+1
_KillAllNotes _KillAllNotes
lda myDP * lda myDP
tcd * tcd
playMUSIC5 lda #$bdbd ; patched *playMUSIC5 lda #$bdbd ; patched
sta dpSEQ * sta dpSEQ
playMUSIC6 lda #$bdbd ; patched *playMUSIC6 lda #$bdbd ; patched
sta dpSEQ+2 * sta dpSEQ+2
ldy #seqOFFSET ldy #seqOFFSET
lda [dpSEQ],y lda [dpSEQ],y
clc clc
playMUSIC55 adc #$bdbd ; patched *playMUSIC55 adc #$bdbd ; patched
adc dpSEQ
sta seqPlayRec sta seqPlayRec
lda #0 lda #0
playMUSIC66 adc #$bdbd ; patched *playMUSIC66 adc #$bdbd ; patched
adc dpSEQ+2
sta seqPlayRec+2 sta seqPlayRec+2
ldy #seqTEMPO ldy #seqTEMPO
@ -320,6 +326,8 @@ fgMIDIPLAY ds 2
doSOUNDON lda fgMIDI ; can we play? doSOUNDON lda fgMIDI ; can we play?
bne playMUSIC99 bne playMUSIC99
jsr initMUSIC
lda #$0100 ; no, let's start playing! lda #$0100 ; no, let's start playing!
sta seqPlay sta seqPlay
PushLong #seqPlayRec PushLong #seqPlayRec

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB