"wolfdemo_wsound"
---------------
This is the first version of the demo, but the samples do not work here, and also sometimes the demo crashes. I'm sure this is because the z80 is not initialized correctly. This is the code to initialize the z80 I did:
This is the first version of the demo, but here the samples do not work well, and also sometimes the demo crashes. I'm sure this is because the z80 is not initialized correctly. This is the code to initialize the z80 I did:
move.w #$100,$a11100 ;stop the Z80
move.w #$100,$a11200 ;reset the Z80
lea z80drv,a0
move.w #544-1,d0 ;lenght driver
lea $a00000,a1
z80lp:
move.b (a0)+,(a1)+
dbra d0, z80lp
lea musicdata,a2
move.l a2,d0
move.l a2,($ffffa110) ;address_data
jsr tfc_init
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
tfc_init:
move.w #$100,$a11100 ;busreq on
move.w #$100,$a11200 ;reset on
move.w #$0,$a11100 ;busreq off
move.l d0,a2 ;TFCP.data=data;
moveq #0,d0
bsr tfc_play ;if d0=0 initialize all Ym regs.
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In the all other versions (that do work well) I add this:
move.w #$100,$a11100 ;stop the Z80
move.w #$100,$a11200 ;reset the Z80
lea z80drv,a0
move.w #544-1,d0 ;lenght driver
lea $a00000,a1
z80lp:
move.b (a0)+,(a1)+
dbra d0, z80lp
------------------------------------------------- \
move.w #$0,$A11200 add
move.w #$0,$A11100 ;start the Z80 this
move.w #$100,$A11200 ;reset the Z80
------------------------------------------------- /
jsr tfc_init
"wolfdemo_wsound_sr2700"
----------------------
This version add MOVE #$2700,sr before loading samples to z80.
"wolfdemo_wsound_busrq"
---------------------
In this version I move the "busreq off". I think that how it was before was not correct.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
tfc_init:
move.w #$100,$a11100 ;busreq on
move.w #$100,$a11200 ;reset on
move.l d0,a2 ;TFCP.data=data;
moveq #0,d0
bsr tfc_play ;if d0=0 initialize all Ym regs.
move.w #$0,$a11100 ;busreq off
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
"wolfdemo_wsound_busrq_wz80"
--------------------------
In this version, in the ymwrite loop I add this:
;d0 = reg, d1 = val, d2 = bank
ym2612wr:
;lea $a04000,a0
move.w #$100,$a11100 ;busreq on
nop
nop
nop
----------------------------------\
z80notready: add
btst #0,$a11100 this
bne.s z80notready
----------------------------------/
tst.b $a01ff0
beq.s wait1
clr.w $a11100
nop
nop
nop
nop
nop
bra.s ym2612wr
wait1:
tst.b (a0) ;waitstatus
bmi.s wait1
move.b d0,0(a0,d2)
wait2:
tst.b (a0) ;waitstatus
bmi.s wait2
move.b d1,1(a0,d2)
clr.w $a11100 ;move.w #$0,$a11100 ;busreq off
rts
"wolfdemo_wsound_busrq_wait3"
---------------------------
In this version, in the ymwrite I add this:
;d0 = reg, d1 = val, d2 = bank
ym2612wr:
;lea $a04000,a0
move.w #$100,$a11100 ;busreq on
nop
nop
nop
tst.b $a01ff0
beq.s wait1
clr.w $a11100
nop
nop
nop
nop
nop
bra.s ym2612wr
wait1:
tst.b (a0) ;waitstatus
bmi.s wait1
move.b d0,0(a0,d2)
wait2:
tst.b (a0) ;waitstatus
bmi.s wait2
move.b d1,1(a0,d2)
----------------------------------------------\
wait3: add
tst.b (a0) ;waitstatus this
bmi.s wait3
----------------------------------------------/
clr.w $a11100 ;move.w #$0,$a11100 ;busreq off
rts
"wolfdemo_wsound_brq_wz80wait3"
-----------------------------
In this I add the two previous.
"wolfdemo_wsoundb"
----------------
This is the second release I uploaded (also add the correct initialization of the z80).
"wolfdemo_wsoundb_wz80wait3"
--------------------------
From previous version, in the ymwrite I add the two loops mentioned before.
"wolfdemo_wsoundb_nomusic"
------------------------
The music is not played.
"wolfdemo_texture_color_test"
---------------------------
This is a much earlier version that I made to test the combination of colors in the textures that could be used, for example the combination of blue and red to make purple, blue and yellow to make green...