intro + 1 again

This commit is contained in:
Antoine Vignau 2024-01-11 09:30:28 +01:00
parent d7eafc2922
commit bf9a53f9c1
7 changed files with 19677 additions and 19343 deletions

Binary file not shown.

View File

@ -575,9 +575,9 @@ blackPATTERN ds 32,$00
ds 32,$66
redPATTERN ds 32,$77
ds 32,$88
ds 32,$99
yellowPATTERN ds 32,$99
ds 32,$aa
ds 32,$bb
cyanPATTERN ds 32,$bb
ds 32,$cc
ds 32,$dd
ds 32,$ee

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -27,12 +27,14 @@
ext txtSERPENT2
ext txtSERPENT3
ext txtSERPENT4
ext ecritparRECT
ext txtECRITPAR1
ext txtECRITPAR2
ext txtECRITPAR3
ext txtECRITPAR4
ext txtECRITPAR5
ext txtECRITPAR6
ext txtECRITPAR7
ext txtMONDE
ext txtEXPLICATIONS1
ext txtEXPLICATIONS2
@ -43,19 +45,20 @@
* CODE
*-----------------------------------
intro jsr intro_telex
bcs intro_end
jsr intro_genius_texte
bcs intro_end
jsr intro_serpent
bcs intro_end
intro
* jsr intro_telex
* bcs intro_end
* jsr intro_genius_texte
* bcs intro_end
* jsr intro_serpent
* bcs intro_end
jsr intro_ecritpar
bcs intro_end
jsr intro_genius_image
bcs intro_end
jsr intro_monde
bcs intro_end
jsr intro_explications
* jsr intro_monde
* bcs intro_end
* jsr intro_explications
* bcs intro_end
* jsr intro_genius_image
intro_end rts
*-----------------------------------
@ -264,7 +267,7 @@ intro_serpent
*-----------
ldy #60*30
ldy #60*10
jmp waitMS16
*-----------------------------------
@ -277,9 +280,6 @@ intro_ecritpar
PushWord #$9999
_ClearScreen
jsr petit_genius
rts
*----------- Affiche le petit Genius
petit_genius
@ -318,9 +318,55 @@ pgLOOP ldy #0
cpx #84*160 ; 84 lignes
bcc pgLOOP
*-----------
*----------- Affiche les noms
ldy #60*5
* TO DO
*----------- Affiche le cadre
PushLong #ecritparRECT
PushWord #$4444
PushWord #$4444
_SpecialRect
PushWord #$1000
PushWord #$fffe ; Shaston 16
PushWord #0
_InstallFont
PushWord #0
_GetForeColor
PushWord #0
_GetTextMode
PushWord #modeForeCopy
_SetTextMode
PushWord #11
_SetForeColor
PushWord #40
PushWord #179
_MoveTo
PushLong #txtECRITPAR6
_DrawCString
PushWord #34
PushWord #199
_MoveTo
PushLong #txtECRITPAR7
_DrawCString
_SetTextMode
_SetForeColor
PushWord #$0800
PushWord #$fffe ; Shaston 8
PushWord #0
_InstallFont
ldy #60*3
jmp waitMS16
*-----------
@ -396,6 +442,296 @@ outputPG6 lda dpPX
ply
rts
*-----------------------------------
* LA UNE DU MONDE
*-----------------------------------
mx %00
intro_monde
PushWord #$ffff
_ClearScreen
lda #picMONDE
sta dpFROM
lda #^picMONDE
sta dpFROM+2
lda ptrSCREEN
clc
adc #20 ; pour center
sta dpTO
lda ptrSCREEN+2
sta dpTO+2
*-----------
ldx #0
imLOOP lda #0
tay
sep #$20
lda #$F0 ; valeurs par dŽfaut
sta dpCOL1
lda #$0F
sta dpCOL2
stz dpBK
]lp lda [dpFROM],y ; l'attribute
jsr outputIM
iny
cpy #40
bcc ]lp
rep #$20
lda dpFROM
clc
adc #40
sta dpFROM
txa
clc
adc #40 ; 160-(40*3)
tax
cpx #160*200
bcc imLOOP
*-----------
ldy #60*10
jsr waitMS16
*----------- 2<EFBFBD>me partie : le texte
PushWord #0
_GetForeColor
lda #txtMONDE
ldx #9
jsr showTEXTE
_SetForeColor
rts
*--- Attribut d'un pixel
*
* ibbaaxxx
* i: bit 7 - inverted bit (eor #$ff on the byte colors itself)
* bb: bits 6-5 - both 0 mean attribute byte
* aa: bits 4-3
* 00 : foreground color
* 01 : text attributes
* 10 : background color
* 11 : video mode
* xxx: bits 2-0
* 000 : black, red, green, yellow, blue magenta, cyan, white
* mŽthode simple : si le bit 6 est ˆ 0, c'est un attribut et on sort 0
* 1, c'est un pixel
* 0x : foreground color
* 1x : background color
*----------- Output le pixel
mx %10
outputIM phy
pha
lda 1,s ; bit 6 ˆ 1, c'est un pixel
and #%0100_0000
bne gotPIXEL
lda 1,s
and #%0001_0000 ; est-ce que c'est le mode foreground color (00)?
bne attribute1 ; non
lda 1,s ; oui
and #%00000111
tay
lda o2gsCOLP,y
sta dpCOL1
lda o2gsCOLI,y
sta dpCOL2
bra attribute2
attribute1 cmp #%0001_0000 ; est-ce que c'est le mode background color (10)?
bne attribute2 ; non
lda 1,s
and #%00000111
tay
lda o2gsBK,y
sta dpBK
attribute2 lda #0 ; on force un pixel vide
sta 1,s
*--- c'est un pixel en fait
gotPIXEL txy
lda dpBK
sta dpPX
lda 1,s
and #%0010_0000
beq output1
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output1 lda 1,s
and #%0001_0000
beq output2
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output2 lda 1,s
bpl output2n
lda dpPX
eor #$ff
sta dpPX
output2n lda dpPX
sta [dpTO],y
iny
lda dpBK
sta dpPX
lda 1,s
and #%0000_1000
beq output3
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output3 lda 1,s
and #%0000_0100
beq output4
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output4 lda 1,s
bpl output4n
lda dpPX
eor #$ff
sta dpPX
output4n lda dpPX
sta [dpTO],y
iny
lda dpBK
sta dpPX
lda 1,s
and #%0000_0010
beq output5
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output5 lda 1,s
and #%0000_0001
beq output6
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output6 lda 1,s
bpl output6n
lda dpPX
eor #$ff
sta dpPX
output6n lda dpPX
sta [dpTO],y
iny
tyx
pla
ply
rts
mx %00
*-----------
* A: pointer to texte
* X: fore color index
* Clears screen, sets fore color, draws text, wait
showTEXTE sta dpFROM
lda #^txtGENIUSTEXTE
sta dpFROM+2
phx
_SetForeColor
PushWord #0
_ClearScreen
stz textX
lda #charHEIGHT
sta textY
]lp PushWord textX
PushWord textY
_MoveTo
jsr waitMSBIS ; keypress?
bcc st_ok
st_end ldy #60*10 ; wait before exiting
jmp waitMS16
st_ok lda [dpFROM] ; get char
and #$ff
beq st_end
cmp #chrRET
beq st_ret
pha
_DrawChar
lda textX ; next x
clc
adc #charWIDTH
sta textX
cmp #maxX
bcc st_next
st_ret stz textX ; next line
lda textY
clc
adc #charHEIGHT
sta textY
st_next inc dpFROM
bra ]lp
*-----------------------------------
* EXPLICATIONS
*-----------------------------------
mx %00
intro_explications
PushWord #0
_GetForeColor
lda #txtEXPLICATIONS1 ; Texte 1
ldx #9
jsr showTEXTE
* lda #txtEXPLICATIONS2 ; Texte 2 non affichŽ
* ldx #11
* jsr showTEXTE
lda #txtEXPLICATIONS3 ; Texte 3
ldx #7
jsr showTEXTE
_SetForeColor
rts
*-----------------------------------
* GENIUS
*-----------------------------------
@ -581,214 +917,8 @@ outputIG6B phy
ply
rts
*-----------------------------------
* LA UNE DU MONDE
*-----------------------------------
mx %00
intro_monde
PushWord #$ffff
_ClearScreen
lda #picMONDE
sta dpFROM
lda #^picMONDE
sta dpFROM+2
lda ptrSCREEN
clc
adc #20 ; pour center
sta dpTO
lda ptrSCREEN+2
sta dpTO+2
*-----------
ldx #0
imLOOP lda #0
tay
sep #$20
lda #$F0 ; valeurs par dŽfaut
sta dpCOL1
lda #$0F
sta dpCOL2
stz dpBK
]lp lda [dpFROM],y ; l'attribute
jsr outputIM
iny
cpy #40
bcc ]lp
rep #$20
lda dpFROM
clc
adc #40
sta dpFROM
txa
clc
adc #40 ; 160-(40*3)
tax
cpx #160*200
bcc imLOOP
*-----------
ldy #60*5
jmp waitMS16
*--- Attribut d'un pixel
*
* ibbaaxxx
* i: bit 7 - inverted bit (eor #$ff on the byte colors itself)
* bb: bits 6-5 - both 0 mean attribute byte
* aa: bits 4-3
* 00 : foreground color
* 01 : text attributes
* 10 : background color
* 11 : video mode
* xxx: bits 2-0
* 000 : black, red, green, yellow, blue magenta, cyan, white
* mŽthode simple : si le bit 6 est ˆ 0, c'est un attribut et on sort 0
* 1, c'est un pixel
* 0x : foreground color
* 1x : background color
*----------- Output le pixel
mx %10
outputIM phy
pha
lda 1,s ; bit 6 ˆ 1, c'est un pixel
and #%0100_0000
bne gotPIXEL
lda 1,s
and #%0001_0000 ; est-ce que c'est le mode foreground color (00)?
bne attribute1 ; non
lda 1,s ; oui
and #%00000111
tay
lda o2gsCOLP,y
sta dpCOL1
lda o2gsCOLI,y
sta dpCOL2
bra attribute2
attribute1 cmp #%0001_0000 ; est-ce que c'est le mode background color (10)?
bne attribute2 ; non
lda 1,s
and #%00000111
tay
lda o2gsBK,y
sta dpBK
attribute2 lda #0 ; on force un pixel vide
sta 1,s
*--- c'est un pixel en fait
gotPIXEL txy
lda dpBK
sta dpPX
lda 1,s
and #%0010_0000
beq output1
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output1 lda 1,s
and #%0001_0000
beq output2
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output2 lda 1,s
bpl output2n
lda dpPX
eor #$ff
sta dpPX
output2n lda dpPX
sta [dpTO],y
iny
lda dpBK
sta dpPX
lda 1,s
and #%0000_1000
beq output3
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output3 lda 1,s
and #%0000_0100
beq output4
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output4 lda 1,s
bpl output4n
lda dpPX
eor #$ff
sta dpPX
output4n lda dpPX
sta [dpTO],y
iny
lda dpBK
sta dpPX
lda 1,s
and #%0000_0010
beq output5
lda dpPX
and #$0f
ora dpCOL1
sta dpPX
output5 lda 1,s
and #%0000_0001
beq output6
lda dpPX
and #$f0
ora dpCOL2
sta dpPX
output6 lda 1,s
bpl output6n
lda dpPX
eor #$ff
sta dpPX
output6n lda dpPX
sta [dpTO],y
iny
tyx
pla
ply
rts
*-----------------------------------
* EXPLICATIONS
*-----------------------------------
mx %00
intro_explications
rts
mx %00
*-----------------------------------
* DATA INTRO
*-----------------------------------
@ -806,5 +936,3 @@ o2gsBK hex 00,77,AA,99,44,CC,BB,FF ; index pour le background
* 5: magenta
* 6: cyan
* 7: white

View File

@ -28,7 +28,6 @@ txtTELEX5 ENT
*-----------------------------------
txtGENIUSTEXTE ENT
* asc '1234567890123456789012345678901234567890'
asc ' Moi, GENIUS, je defie le monde. J'27'ai'0d
asc 'invente une nouvelle arme capable de'0d
asc 'raser la terre, ce que je ferai dans'0d
@ -64,7 +63,12 @@ txtECRITPAR4 ENT
txtECRITPAR5 ENT
asc 'Merci XavSnap'00
txtECRITPAR6 ENT
asc '3 jours plus tard dans les journaux'00
asc '3 jours plus tard'00
txtECRITPAR7 ENT
asc 'dans les journaux'00
ecritparRECT ENT
dw 160,0,200,320
*-----------------------------------
@ -82,7 +86,7 @@ txtMONDE ENT
*-----------------------------------
txtEXPLICATIONS1 ENT
asc 0d'Voici quelques explications'0d0d
asc 'Voici quelques explications'0d0d
asc 'Le jeu est en temps reel, un chronome-'0d
asc 'tre sera affiche en permanence.'0d
asc 'D'27'autre part, vous devrez prendre'0d
@ -101,7 +105,7 @@ txtEXPLICATIONS1 ENT
asc 'sera compris comme : PREN CART'00
txtEXPLICATIONS2 ENT
asc 0d'L'27'ordinateur ne prend en compte en'0d
asc 'L'27'ordinateur ne prend en compte en'0d
asc 'general que deux mots, exemple :'0d
asc '- ALLUME SALLE'0d
asc '- EST ou E ou AVANCE EST'0d0d
@ -120,14 +124,15 @@ txtEXPLICATIONS2 ENT
asc 'et boite, evidemment.'00
txtEXPLICATIONS3 ENT
asc 0d'Une derniere chose, il est possible de'0d
asc 'Une derniere chose, il est possible de'0d
asc 'sauver une partie en cours, et de la'0d
asc 'recharger, mais a vous de trouver le'0d
asc 'vocabulaire adequat...'0d0d0d0d
asc 'Et maintenant, tres bonne aventure...'0d0d
asc 'et prenez garde a vous !'0d0d0d
asc 'Tapez une touche pour charger le'0d
asc 'programme de jeu.'00 ; Fond rouge, encre
* asc 'Tapez une touche pour charger le'0d
* asc 'programme de jeu.'00 ; Fond rouge, encre
asc 'Tapez une touche pour jouer.'00
txtEXPLICATIONS4 ENT
asc 'Voulez-vous revoir la presentation (O/N) '00

Binary file not shown.