Permalink
Browse files

Bugfixes (especially killing FM channels), panning is restored, versi…

…on bumped up to 0.9 - going to look mainly for bugs now...
  • Loading branch information...
Javier Degirolmo
Javier Degirolmo committed Apr 7, 2012
1 parent efd1677 commit da98253489b1334f9d23f477ec8fa2a76e664aa6
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
@@ -0,0 +1 @@
+��� � � � � � � � � � � � � � � � � � � � � � � � � � � � ��
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -164,7 +164,7 @@ EntryPoint:
; 123456789012345678901234567890123456
@Str_Title1: dc.b "Echo sound engine", 0
-@Str_Title2: dc.b "Version 0.8 by Sik", 0
+@Str_Title2: dc.b "Version 0.9 by Sik", 0
@Str_Instr1: dc.b "Use D-pad to select song", 0
@Str_Instr2: dc.b "A/C: play, B: stop", 0
even
View
@@ -4,19 +4,64 @@
;****************************************************************************
SongList:
- dc.l BGM_Minion, @Str_Minion_1, @Str_Minion_2, @Str_Minion_3
- dc.l BGM_HoL, @Str_HoL_1, @Str_Null, @Str_Null
+ dc.l BGM_Midnas, @Str_Midnas_1, @Str_Midnas_2, @Str_Midnas_3
+ dc.l BGM_Nelpel, @Str_Nelpel_1, @Str_Nelpel_2, @Str_Nelpel_3
+ dc.l BGM_Megajysays, @Str_Megajysays_1, @Str_Megajysays_2, @Str_Megajysays_3
+ dc.l BGM_Doomsday, @Str_Doomsday_1, @Str_Doomsday_2, @Str_Doomsday_3
+ dc.l BGM_PianoTest, @Str_PianoTest_1, @Str_PianoTest_2, @Str_Null
+ dc.l BGM_SquSawTest2, @Str_SquSawTest_1a, @Str_SquSawTest_2, @Str_SquSawTest_3a
+ dc.l BGM_SquSawTest1, @Str_SquSawTest_1b, @Str_SquSawTest_2, @Str_SquSawTest_3b
+ dc.l BGM_PSGTest, @Str_PSGTest_1, @Str_PSGTest_2, @Str_Null
+ dc.l BGM_DrumTest, @Str_DrumTest_1, @Str_DrumTest_2, @Str_Null
+ dc.l BGM_FluteTest, @Str_FluteTest_1, @Str_FluteTest_2, @Str_FluteTest_3
; 012345678901234567890123456
-
@Str_Null: dc.b 0
@Str_Untitled: dc.b "[untitled]", 0
-@Str_Minion_1: dc.b "Evil's Minion", 0
-@Str_Minion_2: dc.b "My distortion guitar is", 0
-@Str_Minion_3: dc.b "better than Tiido's B)", 0
+ ; 012345678901234567890123456
+@Str_Midnas_1: dc.b "Midna's Desperate Hour", 0
+@Str_Midnas_2: dc.b "Composed by Koji Kondo", 0
+@Str_Midnas_3: dc.b "Transcribed by Aivi Tran", 0
-@Str_HoL_1: dc.b "Hall of Loneliness", 0
+ ; 012345678901234567890123456
+@Str_Nelpel_1: dc.b "Nelpel Four (crappy ver.)", 0
+@Str_Nelpel_2: dc.b "XM > MIDI > ESF conversion", 0
+@Str_Nelpel_3: dc.b "and really bad instruments", 0
+
+ ; 012345678901234567890123456
+@Str_Megajysays_1: dc.b "Megajysays", 0
+@Str_Megajysays_2: dc.b "That second A should have", 0
+@Str_Megajysays_3: dc.b "two dots on top of it.", 0
+
+ ; 012345678901234567890123456
+@Str_Doomsday_1: dc.b "The Doomsday Project", 0
+@Str_Doomsday_2: dc.b "Another module conversion.", 0
+@Str_Doomsday_3: dc.b "Like I give a crap :P", 0
+
+ ; 012345678901234567890123456
+@Str_PianoTest_1: dc.b "test-piano.mid", 0
+@Str_PianoTest_2: dc.b "Some generic piano...", 0
+
+ ; 012345678901234567890123456
+@Str_SquSawTest_1a: dc.b "test-squsaw-2ch.mid", 0
+@Str_SquSawTest_1b: dc.b "test-squsaw-1ch.mid", 0
+@Str_SquSawTest_2: dc.b "FM square and sawtooth", 0
+@Str_SquSawTest_3a: dc.b "2 channels version", 0
+@Str_SquSawTest_3b: dc.b "1 channel version", 0
+
+ ; 012345678901234567890123456
+@Str_PSGTest_1: dc.b "test-psg.mid", 0
+@Str_PSGTest_2: dc.b "Two square PSG channels.", 0
+
+ ; 012345678901234567890123456
+@Str_DrumTest_1: dc.b "test-drums.mid", 0
+@Str_DrumTest_2: dc.b "Snare and kicks!", 0
+
+ ; 012345678901234567890123456
+@Str_FluteTest_1: dc.b "test-flute.mid", 0
+@Str_FluteTest_2: dc.b "Flute and a seashore.", 0
+@Str_FluteTest_3: dc.b "Feels so calm...", 0
even
@@ -25,4 +70,4 @@ SongList:
; Number of songs in song list
;****************************************************************************
-NumSongs equ 2
+NumSongs equ 10
View
@@ -7,17 +7,32 @@ BGM_Test:
dc.b $FF
;****************************************************************************
-; BGM_Minion
-; "Evil's Minion"
+; Some conversions
;****************************************************************************
-BGM_Minion:
- incbin "data/music/minion.esf"
+BGM_Midnas:
+ incbin "data/music/midnas.esf"
+BGM_Nelpel:
+ incbin "data/music/nelpel.esf"
+BGM_Megajysays:
+ incbin "data/music/megajysays.esf"
+BGM_Doomsday:
+ incbin "data/music/doomsday.esf"
;****************************************************************************
-; BGM_HoL
-; "Hall of Loneliness"
+; Several tests used for midi2esf
;****************************************************************************
-BGM_HoL:
- incbin "data/music/hol.esf"
+BGM_PianoTest:
+ incbin "data/music/test-piano.esf"
+BGM_SquSawTest2:
+ incbin "data/music/test-squsaw-2ch.esf"
+BGM_SquSawTest1:
+ incbin "data/music/test-squsaw-1ch.esf"
+BGM_PSGTest:
+ incbin "data/music/test-psg.esf"
+BGM_DrumTest:
+ incbin "data/music/test-drums.esf"
+BGM_FluteTest:
+ incbin "data/music/test-flute.esf"
+
View
@@ -12,6 +12,19 @@ PointerList:
Echo_ListEntry Instr_Bass ; $05 [FM] Standard bass
Echo_ListEntry Instr_SoftPSG ; $06 [PSG] Soft PSG envelope
Echo_ListEntry Instr_PianoPSG ; $07 [PSG] Piano PSG instrument
+ Echo_ListEntry Instr_MidiPSG ; $08 [PSG] MIDI square lead
+ Echo_ListEntry Instr_MidiPiano ; $09 [FM] MIDI piano
+ Echo_ListEntry Instr_MidiLead1 ; $0A [FM] MIDI square lead
+ Echo_ListEntry Instr_MidiLead2 ; $0B [FM] MIDI sawtooth lead
+ Echo_ListEntry Instr_MidiFlute ; $0C [FM] MIDI flute
+ Echo_ListEntry Instr_NepelPSG ; $0D [PSG] Nepel Four PSG instr.
+ Echo_ListEntry Instr_MidiSynthBass ; $0E [FM] MIDI synth bass
+ Echo_ListEntry Instr_MidiLead1F ; $0F [FM] MIDI square (filtered)
+ Echo_ListEntry Instr_MidiLead2F ; $10 [FM] MIDI sawtooth (filtered)
+ Echo_ListEntry Instr_Seashore ; $11 [PSG] Seashore
+ Echo_ListEntry Instr_HitHat ; $12 [PSG] Hit-hat
+ Echo_ListEntry Instr_PSGString ; $13 [PSG] PSG string
+ Echo_ListEntry Instr_EGuitar ; $14 [FM] Electric guitar
Echo_ListEnd
;****************************************************************************
@@ -83,3 +96,135 @@ Instr_PianoPSG:
dc.b $0C,$0C,$0C,$0C,$0D,$0D,$0D,$0D
dc.b $0D,$0D,$0D,$0D,$0E,$0E,$0E,$0E
dc.b $0E,$0E,$0E,$0E,$FE,$0F,$FF
+
+;****************************************************************************
+; Instrument $08 [PSG]
+; MIDI square wave instrument (GM81)
+;****************************************************************************
+
+Instr_MidiPSG:
+ dc.b $00,$01,$02,$FE,$03,$FF
+
+;****************************************************************************
+; Instrument $09 [FM]
+; MIDI acoustic piano (GM01)
+;****************************************************************************
+
+Instr_MidiPiano:
+ incbin "data/fm/piano.eif"
+
+;****************************************************************************
+; Instrument $0A [FM]
+; MIDI square wave instrument (GM81)
+;****************************************************************************
+
+Instr_MidiLead1:
+ incbin "data/fm/square.eif"
+
+;****************************************************************************
+; Instrument $0B [FM]
+; MIDI sawtooth wave instrument (GM82)
+;****************************************************************************
+
+Instr_MidiLead2:
+ incbin "data/fm/saw.eif"
+
+;****************************************************************************
+; Instrument $0C [FM]
+; MIDI flute instrument (GM74)
+;****************************************************************************
+
+Instr_MidiFlute:
+ incbin "data/fm/flute.eif"
+
+;****************************************************************************
+; Instrument $0D [PSG]
+; Nepel Four PSG instrument
+;****************************************************************************
+
+Instr_NepelPSG:
+ dc.b $05,$06,$FE,$07,$FF
+
+;****************************************************************************
+; Instrument $0E [FM]
+; MIDI synth bass (GM39)
+;****************************************************************************
+
+Instr_MidiSynthBass:
+ incbin "data/fm/ebass.eif"
+
+;****************************************************************************
+; Instrument $0F [FM]
+; MIDI square wave instrument (GM81) (filtered)
+;****************************************************************************
+
+Instr_MidiLead1F:
+ incbin "data/fm/squaref.eif"
+
+;****************************************************************************
+; Instrument $10 [FM]
+; MIDI sawtooth wave instrument (GM82) (filtered)
+;****************************************************************************
+
+Instr_MidiLead2F:
+ incbin "data/fm/sawf.eif"
+
+;****************************************************************************
+; Instrument $11 [PSG]
+; Seashore
+;****************************************************************************
+
+Instr_Seashore:
+ dcb.b 4, $0E
+ dcb.b 4, $0D
+ dcb.b 4, $0C
+ dcb.b 4, $0B
+ dcb.b 4, $0A
+ dcb.b 4, $09
+ dcb.b 4, $08
+ dcb.b 4, $07
+ dcb.b 4, $06
+ dcb.b 60, $05
+ dcb.b 4, $06
+ dcb.b 4, $07
+ dcb.b 4, $08
+ dcb.b 4, $09
+ dcb.b 4, $0A
+ dcb.b 4, $0B
+ dcb.b 4, $0C
+ dcb.b 4, $0D
+ dcb.b 4, $0E
+ dc.b $FE, $0F, $FF
+
+;****************************************************************************
+; Instrument $12 [PSG]
+; Hit-hat
+;****************************************************************************
+
+Instr_HitHat:
+ dc.b $00, $01, $02, $04, $06, $08, $0C
+ dc.b $FE, $0F, $FF
+
+;****************************************************************************
+; Instrument $13 [PSG]
+; PSG string
+;****************************************************************************
+
+Instr_PSGString:
+ dcb.b 4, $0E
+ dcb.b 4, $0D
+ dcb.b 4, $0C
+ dcb.b 4, $0B
+ dcb.b 4, $0A
+ dcb.b 4, $09
+ dcb.b 4, $08
+ dc.b $FE, $07, $FF
+
+;****************************************************************************
+; Instrument $14 [FM]
+; Electric guitar
+;****************************************************************************
+
+Instr_EGuitar:
+ incbin "data/fm/eguitar.eif"
+
View
@@ -42,16 +42,6 @@ PlayBGM:
ld hl, ProcessBGM ; Tell Echo to process BGM
ld (DoTick_BGM+1), hl
-; ld b, 8 ; Kill all FM channels explicitly
-;.resetallfm:
-; ld a, b
-; and $04
-; rrca
-; ld iyl, a
-; ld a, b
-; call KillFM
-; djnz .resetallfm
-
jp IdleLoop ; End of subroutine
;****************************************************************************
View
@@ -299,6 +299,24 @@ ClearSFX:
ld b, (hl)
call SetFMVolLoad
pop bc
+
+ ld a, b
+ and $04
+ rrca
+ ld iyl, a
+
+ push bc ; Restore BGM FM panning
+ ld a, b
+ ld h, RAM_BGMFMPan>>8
+ add RAM_BGMFMPan&$FF
+ ld l, a
+ ld a, b
+ ld b, (hl)
+ and $03
+ add $B4
+ ld (iy+0), b
+ ld (iy+1), a
+ pop bc
PollPCM
inc b
View
@@ -15,14 +15,17 @@ RAM_PSGData: ds 4*16 ; PSG envelope data
RAM_BGMFMInstr: ds 8 ; FM instruments used by BGM
RAM_BGMFMVol: ds 8 ; FM volumes used by BGM
-;RAM_FMVolume: ds 8 ; Volume of each FM channel
+RAM_BGMFMPan: ds 8 ; FM panning used by BGM
+
RAM_FMData: ds 8*5 ; FM info (for volume handling)
; ds 8*1 ... Register $B0
; ds 8*1 ... Register $40
; ds 8*1 ... Register $44
; ds 8*1 ... Register $48
; ds 8*1 ... Register $4C
+RAM_Locked: ds 12 ; Locked channels
+
RAM_LastBank: ds 1 ; Last accessed bank
RAM_BGMData: ; Where BGM data starts
@@ -38,8 +41,6 @@ RAM_SFXDelay: ds 1 ; How many ticks to wait
RAM_SFXBank: ds 1 ; Current SFX bank
RAM_SFXAddress: ds 2 ; Current SFX address
-RAM_Locked: ds 12 ; Locked channels
-
RAM_Scratch: ds 32 ; Scratch bytes, may be useful when
; buffering to speed up to avoid bank
; switching conflicts
Oops, something went wrong.

0 comments on commit da98253

Please sign in to comment.