Post by vetea on Mar 7, 2016 9:59:11 GMT -5
Hey thanks Andrew,
For now, it's juste a little prototype, but yes here is the code :
Keep in mind that the graphics ressources are mine so I remove them !
For now, it's juste a little prototype, but yes here is the code :
' ///////////////////////////
' /// Bomb On Basic City ///
' /// (c) 2016 Vetea ///
' ///////////////////////////
'=================================
'===== Declaration Variables =====
'=================================
global t(500) as integer
global AA as integer
global AB as integer
global AC as integer
global AD as integer
global MapxMax as integer
global MapyMax as integer
global Tot as integer
global Map(20,20) as integer
global AdresseMap as integer
global AdresseTile as integer
global AdresseTile1 as integer
global AdresseTile2 as integer
global AdresseTile3 as integer
global AdresseTile4 as integer
global version as integer
global decalversion as integer
global Joy as integer
global Joy1 as integer
global Quotient as integer
global Playsound as integer
global Result as integer
global SMenu(12) as integer
global SNuage(10) as integer
global VitesseNuage(10) as integer
global SBombardier(8) as integer
global SFlag(3) as integer
global XBombardier as integer
global YBombardier as integer
global Vnuage(10) as integer
global Xnuage(10) as integer
global Ynuage(10) as integer
'###############################
'##### Programme Principal #####
'###############################
'///// Init Z80 & autres Init /////
Z80Init
Jsinit
'///// Init Sons & Driver Z80 /////
pcmid&=64
z80_loadDriver
'///// Test Version MD /////
if tvtype() then version=1 else version=0
if version=0 then DecalVersion=1
'Version = 1 : PAL - EUR; Version = 0 : NTSC - USA
'///// Init globale /////
option NoLoadFont
palettes PaletteBase,0,0,16
loadtiles FontTile,60,33
AdresseMap=96
'///// Main & Programme principal /////
'///// Ecran Logo Sega ! /////
gosub segalogo
segalogo
'///// Ecran du Logo Studio Vetea /////
gosub logovetea
gosub Logo
'///// Chargement Map Menu principal /////
cls
freeallsprites
Gestionmap 1
gosub mapmenu
'//// Appel boucle pricipal
On Vblank gosub main
enable interrupt Vblank
end
'######################################
'##### Sous Programmes Principaux #####
'######################################
'///// Main /////
Main:
'Scrolling Map Menu
SetScrollplane Scroll_b
if g=1 then scroll left,1
'Affichage nuage
for i=1 to 4
VNuage(i)=VNuage(i)+Vitessenuage(i)
movesprite Snuage(i),Xnuage(i)+Vnuage(i),Ynuage(i)
next
'Affichage Bombardier
if g=1 then
if XBombardier>10 [and] xgm_isPlayingPCM(1)=0 then gosub retro1
XBombardier+=2
gosub truck
movesprite SBombardier(1),60+418-XBombardier,200-54
movesprite SBombardier(2),60+450-XBombardier,200-54
movesprite SBombardier(4),60+418-XBombardier,232-54
movesprite SBombardier(5),60+450-XBombardier,232-54
timer++
if timer>40 then timer=0
'1
if timer<=20 then
for i=1 to 5
propsprite SBombardier(i),Adressetile2+((i-1)*16),3
next
movesprite Sflag(1),55+450+32-XBombardier,224-59
movesprite Sflag(2),55+450+64-XBombardier,224-59
movesprite Sflag(3),55+450+96-XBombardier,224-59
else
'2
movesprite Sflag(1),55+450+32-XBombardier,224-57
movesprite Sflag(2),55+450+64-XBombardier,224-57
movesprite Sflag(3),55+450+96-XBombardier,224-57
propsprite SBombardier(1),Adressetile2+(2*16),3
propsprite SBombardier(2),Adressetile2+(6*16),3
propsprite SBombardier(4),Adressetile2+(5*16),3
propsprite SBombardier(5),Adressetile2+(7*16),3
end if
end if
'Affichage & Animation Titre Menu
if g!=1 then
'Bombe
A+=2
if AA!=1 then gosub magnum:AA=1:stopplay 0
if a>85 then a=85
if a>40 then b=1
movesprite Smenu(1),200+32,50+a
movesprite Smenu(2),232+32,50+a
movesprite Smenu(3),264+32,50+a
'On
if b=1 then d+=2
if Ab!=1 [and] b=1 then gosub magnum:Ab=1:stopplay 0
if d>115 then d=115
movesprite Smenu(4),224+32,50+d
movesprite Smenu(5),256+32,50+d
'Basic City
if d>85 then e=1
if e=1 then f+=2
if Ac!=1 [and] e=1 then gosub magnum:Ac=1:stopplay 0
if f>150 then f=150:g=1
for i=6 to 12
c++
movesprite Smenu(i),140+(c*32),50+f
next
c=0
end if
if g=1 then
h++
locate 14,10:print "APPUYEZ SUR START !"
if h>20 then locate 14,10:print " "
if h>45 then h=0
end if
return
'///// Logo Studio Vetea /////
Logo:
loadtiles logotiledata,181,160
palettes PaletteBlack,1,0,16
Reload logotilemap
For Y = 1 To 28
For X = 1 To 40
ReadInt AuxInt
DrawTile 160+AuxInt+palette(1), X-1, Y-1
Next
Next
fadein lblptr&(PaletteLogo),1,4
xgm_stopPlayMusic
locate 20,15:print "PRESENTE"
sleep 175
fadeout lblptr&(PaletteLogo),1,4
return
'///// Affihage Map Menu principal /////
MapMenu:
setgfxplane scroll_b
'Scan et gestion du FogWar
disable screen
palettes PaletteBlack,1,0,16
for x=0 to MapXMax
for y=0 to (MapYMax-version)
drawtilesinc2 ((map(x,y)-1)*16)+adressemap+palette(1),x*4,y*4,4,4
next
next
'Fadein Ecran
enable screen
fadein lblptr&(PaletteTileMenu),1,6
return
'///// Procédure de Timing Programme /////
Declare Sub Timer(x as integer)
for i=1 to x
next
end sub
'///// Code Source ASM /////
' Init Game Port Routine
declare asm sub Jsinit
moveq #$40,d0
move.b d0,$a10009
move.b d0,$a1000b
move.b d0,$a1000d
rts
end sub
'Port A Read routine
Declare asm sub JoyA
move.b #$40,$a10003
nop
nop
move.b $a10003,d1
andi.b #$3f,d1
move.b #$00,$a10003
nop
nop
move.b $a10003,d0
andi.b #$30,d0
lsl.b #2,d0
or.b d1,d0
not.b d0
move.w d0,(__INTEGER_joy)
rts
end sub
'Port B game routine
Declare asm sub JoyB
move.b #$40,$a10005
nop
nop
move.b $a10005,d1
andi.b #$3f,d1
move.b #$00,$a10005
nop
nop
move.b $a10005,d0
andi.b #$30,d0
lsl.b #2,d0
or.b d1,d0
not.b d0
move.w d0,(__INTEGER_joy1)
rts
end sub
Declare Asm Sub Z80Init
move.w #0x0100, 0x00A11100 ; Request access to the Z80 bus, by writing 0x0100 into the BUSREQ port
move.w #0x0100, 0x00A11200 ; Hold the Z80 in a reset state, by writing 0x0100 into the RESET port
@Wait:
btst #0x0, 0x00A11100 ; Test bit 0 of A11100 to see if the 68k has access to the Z80 bus yet
bne @Wait ; If we don't yet have control, branch back up to Wait
end sub
declare asm sub z80_loadDriver()
move.w #$100,($A11100) ; Send the Z80 a bus request.
move.w #$100,($A11200)
MOVE.L #(Z80drv_end-Z80drv),D0
LEA Z80drv,A0
MOVE.L #$A00000,A1
@loop:
MOVE.B (A0)+, (A1)+
DBRA D0, @loop ; load driver
move.l #$A01C00,a0 ; point to Z80 sample id table (first entry = silent sample)
move.l #NULLpcm,d0 ; d0 = silent sample
lsr.l #8,d0
move.b d0,(a0)+ ; sample address
lsr.l #8,d0
move.b d0,(a0)+
move.b #$01,(a0)+ ; sample length
move.b #$00,(a0)
move.w #$000,($A11200) ; Start Z80 Reset
move.w #$000,($A11100) ; release the Z80 bus
move.l #$A00102,a0 ; point to status
@test_ready:
move.w #100,d0 ;
@wait:
DBRA D0, @wait ; wait a bit
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200) ; End Z80 Reset
NOP
NOP
NOP
NOP
NOP
move.b (a0),d0
move.w #$000,($A11100) ; release the Z80 bus
btst #7,d0 ; not yet ready
beq @test_ready
end sub
'///// Fonctions ASM de Son /////
declare asm sub xgm_isPlayingPCM(d0.w as integer)
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
NOP
NOP
NOP
NOP
NOP
and.b ($A00102),d0 ; get channel playing status
move.w #$000,($A11100) ; release the Z80 bus
move.w d0,(__INTEGER_Playsound)
end sub
Declare asm Sub Divide(d0.l as long,d1.l as long)
move.w sr,-(a7) ; Save SR.
movem.l d2-d5,-(a7) ; Save Registers.
tst.l d1 ; If the denominator is 0...
beq.b @Div_ERROR ; ...exit with an error.
moveq #0,d2 ; This is the Quotient Accumulator.
moveq #0,d3 ; This is the Remainder Accumulator.
moveq #31,d4 ; This is the Loop Counter.
@Div_LOOP:
add.l d2,d2 ; Shift Quotient left one bit.
add.l d0,d0 ; Shift Dividend left one bit.
addx.l d3,d3 ; Shift Remainder left one bit.
cmp.l d1,d3 ; If the Remainder is too large...
bcs.b @Div_SKIP1 ; ...
sub.l d1,d3 ; ...subtract Divisor...
addq.w #1,d2 ; ...and increment Quotient.
@Div_SKIP1:
dbra d4,@Div_LOOP ; Loop for 32 bits.
move.l d3,d0 ; Store Remainder.
move.l d2,d1 ; Store Quotient.
move.w d1,(__INTEGER_RESULT)
move.w d0,(__INTEGER_QUOTIENT)
@Div_ERROR:
movem.l (a7)+,d2-d5 ; Restore Registers.
move.w (a7)+,sr ; Update SR.
rts
end sub
declare asm sub xgm_startPlayMusic()
; a1 should point on XGM music
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
move.l a3,a0 ; a0 = reserved $FC array for sample id table
moveq #0,d0
@loop: ; prepare sample id table
move.w d0,d1
add.w d1,d1
add.w d1,d1
moveq #0,d2
move.w 0(a1,d1.w),d2 ; get sample addr in song bank table
rol.w #8,d2 ; revert endianess
cmp.w #$FFFF,d2 ; is null sample ?
bne @not_null
move.l #NULLpcm,d2
jmp @addr_done
@not_null:
addq.w #1,d2 ; add offset
lsl.l #8,d2 ; pass to 24 bits
add.l a1,d2 ; transform to absolute address
@addr_done
lsr.l #8,d2 ; get high byte
move.b d2,0(a0,d1.w)
lsr.w #8,d2 ; get low byte
move.b d2,1(a0,d1.w)
move.w 2(a1,d1.w),2(a0,d1.w) ; copy sample length
addq.w #1,d0
cmp.w #$3F,d0
bne @loop
move.l #$A01C04,a2 ; destination of sample id table
lsl.w #2,d0 ; set size in bytes
subq.w #1,d0
@sampleIdLoop:
move.b (a0)+,(a2)+
dbra d0,@sampleIdLoop ; load sample id table
move.l a1,d0 ; d0 = song address
add.l #$100,d0 ; bypass sample id table
moveq #0,d2
move.w $FC(a1),d2 ; get sample data size
rol.w #8,d2 ; revert endianess
lsl.l #8,d2 ; pass to 24 bits
add.l d2,d0 ; bypass samples data
addq.l #4,d0 ; bypass music data size field
move.l #$A00104,a2 ; XGM base parameters address
move.b d0,0(a2) ; low byte
lsr.l #8,d0
move.b d0,1(a2) ; med low byte
lsr.l #8,d0
move.b d0,2(a2) ; med high byte
lsr.l #8,d0
move.b d0,3(a2) ; high byte
or.b #$40,($A00100) ; send play XGM command
move.w #$000,($A11100) ; release the Z80 bus
end sub
declare asm sub xgm_resumePlayMusic()
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
NOP
NOP
NOP
NOP
NOP
or.b #$20,($A00100) ; send resume play command
move.w #$000,($A11100) ; release the Z80 bus
end sub
declare asm sub xgm_stopPlayMusic()
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
NOP
NOP
NOP
NOP
NOP
or.b #$10,($A00100) ; send stop play command
move.w #$000,($A11100) ; release the Z80 bus
end sub
declare asm sub xgm_playPCM()
; a1 should point on PCM sample
; d1 should contains PCM length
; d2 should contains channel and priority informations: (prio << 4) | channel
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
move.l (__LONG_pcmid),d0
lsl.l #2,d0
lea $A01C00,a0
adda.l d0,a0 ; a0 point on id table entry
move.l a1,d0 ; d0 = sample address
lsr.l #8,d0 ; get sample address (high byte)
move.b d0,(a0)+
lsr.w #8,d0 ; get sample address (low byte)
move.b d0,(a0)+
lsr.l #8,d1 ; get sample length (high byte)
move.b d1,(a0)+
lsr.w #8,d1 ; get sample length (low byte)
move.b d1,(a0)+
move.l d2,d0
and.l #3,d0 ; d0 = channel number
lea $A00100,a0
moveq #1,d1
lsl.l d0,d1 ; d1 = channel shift command
or.b d1,(a0) ; set PCM play command
lea $A00108,a0
add.l d0,d0
adda.l d0,a0 ; a0 point on channel info
move.l d2,d0
lsr.l #4,d0
and.l #$F,d0 ; d0 = priority
move.b d0,(a0)+ ; set priority
move.l (__LONG_pcmid),d0 ; d0 = PCM id
move.b d0,(a0) ; set PCM id
addq.l #1,d0
and.l #$FF,d0
or.l #$40,d0 ; id < 0x40 are reserved for music
move.l d0,(__LONG_pcmid) ; pass to next id
move.w #$000,($A11100) ; release the Z80 bus
end sub
declare asm sub xgm_stopPCM()
; d2 should contains channel number
move.w #$100,($A11100) ; Send the Z80 a bus request
move.w #$100,($A11200)
move.l d2,d0
and.l #3,d0 ; d0 = channel number
lea $A00100,a0
moveq #1,d1
lsl.l d0,d1 ; d1 = channel shift command
or.b d1,(a0) ; set PCM play command
lea $A00108,a0
add.l d0,d0
adda.l d0,a0 ; a0 point on channel info
moveq #0,d0
move.b d0,(a0)+ ; set priority
move.b d0,(a0) ; set PCM id
move.w #$000,($A11100) ; release the Z80 bus
end sub
declare sub StopPlay(x as integer)
regmove.l x,d2
xgm_stopPCM
end sub
'//// Procédure de Fade In & Out Palette /////
declare sub fadein(palloc& as long, palline as integer, fadespeed as integer)
for y=7 to 0 step -1
for x=0 to 15
paltemp=PEEKINT(palloc&+(x+x))
pal_edit_blue=paltemp>>8
pal_edit_red=paltemp and &hF
pal_edit_green=paltemp>>4-(pal_edit_blue<<4)
if pal_edit_blue >= (y+y) then
pal_edit_blue=pal_edit_blue-(y+y)
else
pal_edit_blue=0
endif
if pal_edit_green >= (y+y) then
pal_edit_green=pal_edit_green-(y+y)
else
pal_edit_green=0
endif
if pal_edit_red >= (y+y) then
pal_edit_red=pal_edit_red-(y+y)
else
pal_edit_red=0
endif
paltemp=pal_edit_red+(pal_edit_green<<4)+(pal_edit_blue<<8)
palette paltemp,palline,x
next x
sleep fadespeed
next y
for x=0 to 15
paltemp=PEEKINT(palloc&+(x+x))
Palette paltemp, palline, x
next
end sub
declare sub fadeout(palloc& as long, palline as integer, fadespeed as integer)
for x=0 to 15
paltemp=PEEKINT(palloc&+(x+x))
Palette paltemp, palline, x
next
for y=0 to 7 step
for x=0 to 15
paltemp=PEEKINT(palloc&+(x+x))
pal_edit_blue=paltemp>>8
pal_edit_red=paltemp and &hF
pal_edit_green=paltemp>>4-(pal_edit_blue<<4)
if pal_edit_blue >= (y+y) then
pal_edit_blue=pal_edit_blue-(y+y)
else
pal_edit_blue=0
endif
if pal_edit_green >= (y+y) then
pal_edit_green=pal_edit_green-(y+y)
else
pal_edit_green=0
endif
if pal_edit_red >= (y+y) then
pal_edit_red=pal_edit_red-(y+y)
else
pal_edit_red=0
endif
paltemp=pal_edit_red+(pal_edit_green<<4)+(pal_edit_blue<<8)
palette paltemp,palline,x
next x
sleep fadespeed
next y
end sub
'///// Logo Sega /////
declare sub segalogo()
'disable screen
ink 3
cls
loadtiles sega_logo,52,256
drawtilesinc 256, 13, 11, 13, 4
palettes sega_logo_f6,3,1,10
'enable screen
sleep 3
palettes sega_logo_f5,3,1,10
sleep 3
palettes sega_logo_f4,3,1,10
sleep 3
palettes sega_logo_f3,3,1,10
sleep 3
palettes sega_logo_f2,3,1,10
sleep 3
palettes sega_logo_f1,3,1,10
sleep 3
palette &h0EEE, 3, 1
for a=0 to 1' Change the '1' to the number of "rolls" you want.
palettes sega_logo_r1,3,2,9
sleep 3
palettes sega_logo_r2,3,2,9
sleep 3
palettes sega_logo_r3,3,2,9
sleep 3
palettes sega_logo_r4,3,2,9
sleep 3
palettes sega_logo_r5,3,2,9
sleep 3
palettes sega_logo_r6,3,2,9
sleep 3
palettes sega_logo_r7,3,2,9
sleep 3
palettes sega_logo_r8,3,2,9
sleep 3
palettes sega_logo_r9,3,2,9
sleep 3
palettes sega_logo_r10,3,2,9
sleep 3
palettes sega_logo_r11,3,2,9
sleep 3
palettes sega_logo_r12,3,2,9
sleep 3
palettes sega_logo_r13,3,2,9
sleep 3
palettes sega_logo_r14,3,2,9
sleep 3
palettes sega_logo_r15,3,2,9
sleep 3
palettes sega_logo_r16,3,2,9
sleep 3
next
palettes sega_logo_r1,3,2,9
sleep 50
palettes sega_logo_f1,3,1,10
sleep 3
palettes sega_logo_f2,3,1,10
sleep 3
palettes sega_logo_f3,3,1,10
sleep 3
palettes sega_logo_f4,3,1,10
sleep 3
palettes sega_logo_f5,3,1,10
sleep 3
palettes sega_logo_f6,3,1,10
sleep 3
'disable screen
cls
ink 0
'enable screen
exit sub
end sub
'///// Gestion MAP /////
Declare sub GestionMap( N as integer)
'Selection Map
'1 Menu principal
Select case N
case 1
'Taille Carte 512 x 224
MapXMax=16
MapYMax=7
Tot=(MapxMax)*(MapYMax+1)
'Init tableau
for i=1 to 500
t(i)=0
next
'Init Map
for i=0 to 20
for j=0 to 20
Map(i,j)=0
next
next
'Chargement DATA Map
reload Map1
for i=1 to Tot
readint t(i)
t(i)++
next
'Attribution DATA MAP
c=0
for i=0 to MapYMax 'Y
for j=1 to MapXMax 'X
c++
Map(j,i)=t(c)
next j
next i
'chargement Textures
palettes PaletteTileMenu,1,0,16
palettes PaletteTitreMenu,2,0,16
palettes PaletteBombardier,3,0,16
loadtiles City1,240,adressemap
AdresseTile=AdresseMap+240
AdresseTile1=AdresseTile+192
AdresseTile2=AdresseTile1+192
AdresseTile3=AdresseTile2+144
AdresseTile4=AdresseTile3+48
loadtiles TileNuage,16,AdresseTile1
loadtiles TitreMenu1,192,AdresseTile
loadtiles Bombardier1,144,AdresseTile2
loadtiles Flag1,48,AdresseTile3
loadtiles TileBlank,1,AdresseTile4
c=0
'Titre
for i=1 to 12
Smenu(i)=addsprite(4,4)
propsprite Smenu(i),AdresseTile+(c*16),2
c++
next
c=0
'Flag
for i=1 to 3
SFlag(i)=addsprite(4,4)
propsprite SFlag(i),AdresseTile3+(c*16),0
c++
next
c=0
'Bombardier
for i=1 to 5
Sbombardier(i)=addsprite(4,4)
propsprite Sbombardier(i),Adressetile2+(c*16),3
c++
next
c=0
'Nuage
for i=1 to 10
aa:
j=joypad()
if j then randomize
VitesseNuage(i)=rnd(4)+1
Xnuage(i)=rnd(512)+1
Ynuage(i)=rnd(220)+1
if Ynuage(i)>215 then goto aa:
if Ynuage(i)<100 then goto aa:
if ynuage(i)>(200-44) [and] ynuage(i)<(232-44) then goto aa:
Snuage(i)=addsprite(4,4)
propsprite Snuage(i),adressetile1,0
next
end select
End sub
'######################################
'##### Palettes Principales #####
'######################################
PaletteLogo:
DATAINT $0000,$0000,$0284,$0022,$0042,$00CC,$0288,$02AA
DATAINT $0044,$02A4,$0C86,$0A84,$0642,$00C4,$0000,$0000
PaletteBombardier:
DATAINT $0C0E,$0000,$0AAC,$04EE,$0064,$0222,$048C,$0AEC
DATAINT $06C8,$0286,$08CE,$0EEE,$0284,$0444,$0424,$0022
PaletteBlack:
DATAINT $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
DATAINT $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
PaletteTileMenu:
DATAINT $020A,$020A,$062C,$0024,$0644,$0000,$0ECC,$066C
DATAINT $0866,$048C,$0AAA,$0246,$00C8,$0084,$0E22,$0E88
PaletteBase:
DATAINT $0000,$00EE,$0224,$004E,$000E,$00E0,$0E00,$008E ' Pallette: 0
DATAINT $0EEE,$0088,$0642,$0CCA,$0242,$0020,$0464,$0000
PaletteTitreMenu:
DATAINT $0C0E,$0000,$0046,$0022,$00CE,$02AE,$0002,$0048
DATAINT $026E,$024E,$024C,$0028,$002A,$0004,$022E,$0000
'///// Sega logo palette /////
' Fade in/out
sega_logo_f1:
DATAINT $0CCC,$0CA0,$0C80,$0C60,$0C40,$0C20,$0C00,$0C00,$0A00,$0800
sega_logo_f2:
DATAINT $0AAA,$0A80,$0A60,$0A40,$0A20,$0A00,$0A00,$0A00,$0800,$0600
sega_logo_f3:
DATAINT $0888,$0860,$0840,$0820,$0800,$0800,$0800,$0800,$0600,$0400
sega_logo_f4:
DATAINT $0666,$0640,$0620,$0600,$0600,$0600,$0600,$0600,$0400,$0200
sega_logo_f5:
DATAINT $0444,$0420,$0400,$0400,$0400,$0400,$0400,$0400,$0200,$0000
sega_logo_f6:
DATAINT $0222,$0200,$0200,$0200,$0200,$0200,$0200,$0200,$0000,$0000
' Palette rotation
sega_logo_r1:
DATAINT $0EC0,$0EA0,$0E80,$0E60,$0E40,$0E20,$0E00,$0C00,$0A00
sega_logo_r2:
DATAINT $0EA0,$0EC0,$0EA0,$0E80,$0E60,$0E40,$0E20,$0E00,$0C00
sega_logo_r3:
DATAINT $0E80,$0EA0,$0EC0,$0EA0,$0E80,$0E60,$0E40,$0E20,$0E00
sega_logo_r4:
DATAINT $0E60,$0E80,$0EA0,$0EC0,$0EA0,$0E80,$0E60,$0E40,$0E20
sega_logo_r5:
DATAINT $0E40,$0E60,$0E80,$0EA0,$0EC0,$0EA0,$0E80,$0E60,$0E40
sega_logo_r6:
DATAINT $0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0,$0EA0,$0E80,$0E60
sega_logo_r7:
DATAINT $0E00,$0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0,$0EA0,$0E80
sega_logo_r8:
DATAINT $0C00,$0E00,$0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0,$0EA0
sega_logo_r9:
DATAINT $0A00,$0C00,$0E00,$0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0
sega_logo_r10:
DATAINT $0C00,$0A00,$0C00,$0E00,$0E20,$0E40,$0E60,$0E80,$0EA0
sega_logo_r11:
DATAINT $0E00,$0C00,$0A00,$0C00,$0E00,$0E20,$0E40,$0E60,$0E80
sega_logo_r12:
DATAINT $0E20,$0E00,$0C00,$0A00,$0C00,$0E00,$0E20,$0E40,$0E60
sega_logo_r13:
DATAINT $0E40,$0E20,$0E00,$0C00,$0A00,$0C00,$0E00,$0E20,$0E40
sega_logo_r14:
DATAINT $0E60,$0E40,$0E20,$0E00,$0C00,$0A00,$0C00,$0E00,$0E20
sega_logo_r15:
DATAINT $0E80,$0E60,$0E40,$0E20,$0E00,$0C00,$0A00,$0C00,$0E00
sega_logo_r16:
DATAINT $0EA0,$0E80,$0E60,$0E40,$0E20,$0E00,$0C00,$0A00,$0C00
'######################################
'##### DATA Principales #####
'######################################
'///// Ressources sonores /////
Magnum:
asm
lea MagnumPcm,a1 ; put address of sample in a1
move.l #(MagnumPcm_end-MagnumPcm),d1 ; put length of sample in d1
move.l #((1<<4)|1),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
SegaLogo:
asm
lea SegaPcm,a1 ; put address of sample in a1
move.l #(SegaPcm_end-SegaPcm),d1 ; put length of sample in d1
move.l #((1<<4)|0),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
Retro1:
asm
lea Retro1PCM,a1 ; put address of sample in a1
move.l #(Retro1PCM_end-Retro1PCM),d1 ; put length of sample in d1
move.l #((1<<4)|0),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
Truck:
asm
lea TruckPcm,a1 ; put address of sample in a1
move.l #(TruckPcm_end-TruckPcm),d1 ; put length of sample in d1
move.l #((1<<4)|3),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
Explosion:
asm
lea ExplosionPcm,a1 ; put address of sample in a1
move.l #(ExplosionPcm_end-ExplosionPcm),d1 ; put length of sample in d1
move.l #((1<<4)|3),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
LogoVetea:
asm
lea LogoVeteaPcm,a1 ; put address of sample in a1
move.l #(LogoVeteaPcm_end-LogoVeteaPcm),d1 ; put length of sample in d1
move.l #((1<<4)|0),d2 ; put priority and channel number in d2
end asm
'xgm_startPlayMusic
xgm_playPCM
return
'Ressources sonores
asm
Z80drv: ; Z80 XGM driver
INCBIN "soundstef\z80_xgm.bin"
Z80drv_end:
align 256
NULLpcm:
INCBIN "soundstef\null.raw"
NULLpcm_end:
align 256
RireBossPCM:
INCBIN "soundstef\RireBoss.raw"
RireBossPCM_end:
align 256
PasBossPCM:
INCBIN "soundstef\PasBoss.raw"
PasBossPCM_end:
align 256
HealBossPCM:
INCBIN "soundstef\HealBoss.raw"
HealBossPCM_end:
align 256
MortBossPCM:
INCBIN "soundstef\MortBoss.raw"
MortBossPCM_end:
align 256
MorsurePCM:
INCBIN "soundstef\Morsure.raw"
MorsurePCM_end:
align 256
MortZombiPCM:
INCBIN "soundstef\MortZombi.raw"
MortZombiPCM_end:
align 256
ChocPCM:
INCBIN "soundstef\Choc.raw"
ChocPCM_end:
align 256
CouteauPCM:
INCBIN "soundstef\CoupCouteau.raw"
CouteauPCM_end:
align 256
CriCouteauPCM:
INCBIN "soundstef\CriCouteau.raw"
CriCouteauPCM_end:
align 256
Retro1PCM:
INCBIN "soundstef\Sega4.raw"
Retro1PCM_end:
align 256
MinePCM:
INCBIN "soundstef\Mine.raw"
MinePCM_end:
align 256
TirCamionPcm:
INCBIN "soundstef\TirCamion.raw"
TirCamionPcm_End:
align 256
ExplosionPcm:
INCBIN "soundstef\Explosion.raw"
ExplosionPcm_end:
align 256
ExtraLifePcm:
INCBIN "soundstef\ExtraLife.raw"
ExtraLifePcm_end:
align 256
LogoVeteaPCM:
INCBIN "soundstef\LogoVetea.raw"
LogoVeteaPCM_end
align 256
StartPCM:
INCBIN "soundstef\Start.raw"
StartPCM_end
align 256
SegaPcm:
INCBIN "soundstef\sega.raw"
SegaPcm_end
align 256
BravoPCM:
INCBIN "soundstef\Bravo.raw"
BravoPCM_end
align 256
BonusPcm:
INCBIN "soundstef\Bonus.raw"
BonusPcm_end:
align 256
Colt45Pcm:
INCBIN "soundstef\colt45.raw"
Colt45Pcm_end:
align 256
MortPcm:
INCBIN "soundstef\Mort.raw"
MortPcm_end:
align 256
Mort1Pcm:
INCBIN "soundstef\Mort1.raw"
Mort1Pcm_end:
align 256
DeadPapiPcm:
INCBIN "soundstef\DeadPapi.raw"
DeadPapiPcm_end:
align 256
Mort2Pcm:
INCBIN "soundstef\Mort2.raw"
Mort2Pcm_end:
align 256
Mort3Pcm:
INCBIN "soundstef\Mort3.raw"
Mort3Pcm_end:
align 256
MagnumPcm:
INCBIN "soundstef\Magnum357.raw"
MAgnumPcm_end:
align 256
ImpactPcm:
incbin "soundstef\Impact.raw"
ImpactPcm_end
align 256
MortPapiPcm:
incbin "soundstef\MortPapi.raw"
MortPapiPcm_end
align 256
ZombiBonusPcm:
incbin "soundstef\ZombiBonus.raw"
ZombiBonusPcm_end
align 256
TruckPcm:
incbin "soundstef\Truck.raw"
TruckPcm_end
align 256
OuhPcm:
incbin "soundstef\ouh.raw"
OuhPcm_end
align 256
StartMamiPcm:
incbin "soundstef\StartMami.raw"
StartMamiPcm_end
align 256
OuhMamiPcm:
incbin "soundstef\OuhMami.raw"
OuhMamiPcm_end
align 256
UziPcm:
incbin "soundstef\Uzi.raw"
UziPcm_end
align 256
RirePapiPcm:
incbin "soundstef\RirePapi.raw"
RirePapiPcm_end
align 256
RireMamiPcm:
incbin "soundstef\RireMami.raw"
RireMamiPcm_end
align 256
ClaquePcm:
incbin "soundstef\Claque.raw"
ClaquePcm_End
align 256
MortMamiPcm:
incbin "soundstef\Crimami.raw"
MortMamiPcm_end
align 256
StartStagePCM:
incbin "soundstef\StartStage.raw"
StartStagePCM_end
align 256
PopPcm:
incbin "soundstef\Repop.raw"
PopPcm_end
align 256
BingPcm:
incbin "soundstef\Bing.raw"
BingPcm_end
align 256
CivilPcm:
incbin "soundstef\CivilSauve.raw"
CivilPcm_end
align 256
ZombiTerrePcm:
incbin "soundstef\ZombiTerre.raw"
ZombiTerrePcm_end
align 256
ZombiTouchePcm:
incbin "soundstef\ZombiTouche.raw"
ZombiTouchePcm_end
end asm
'///// DATA Fichier /////
LogoTileData:
datafile Logotiledata.bin,BIN
LogoTileMap:
datafile Logotilemap.bin,BIN
sega_logo:
datafile segalogo.bin,BIN' 4x13
'///// Data Map /////
'Plan Map Ecran Générique
Map1:
Dataint 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
Dataint 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12
Dataint 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
Dataint 8,8,0,0,8,8,8,8,0,0,0,8,8,0,0,8
Dataint 8,0,1,14,0,8,8,0,1,1,13,0,8,1,1,8
Dataint 2,3,4,6,7,2,2,6,3,4,3,7,2,7,4,2
Dataint 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
'///// DATA Graphiques /////
Keep in mind that the graphics ressources are mine so I remove them !