Author Topic: PCE -> NES style sound mapping experiment  (Read 356 times)

ccovell

  • Hero Member
  • *****
  • Posts: 2245
PCE -> NES style sound mapping experiment
« on: November 10, 2015, 12:52:45 PM »
Hi, folks.  I've taken the rip of Dunegon Explorer from my HES Visual Player ( http://www.pcenginefx.com/forums/index.php?topic=18260.0 ) and have hacked it to simulate (accurately) what it would sound like on the NES/Famicom sound hardware.

Of course the NES has only 4 sound channels (plus 1 PCM, but it's not used here) where one is a fixed noise channel, and the PCE has 6, so the channels that overflow have to be either cut off (lost) or mixed in with an arpeggio effect.  This hack has an adjustable arpeggio setting.  Please play around with it!! Since this is a real-time channel assignment routine, it's not as perfect as a manual recomposition would be.

Anyway, the file: http://www.chrismcovell.com/data/dungeon_nes.zip

Readme:
Quote
PC-Engine -> NES Hardware remapping experiment
----------------------------------------------

This is a hack to Dungeon Explorer's music that imposes the limitations
of the NES/Famicom sound hardware on the PCE.  Which means:

 - 3 channels of melodic sound only, plus 1 noise channel
 - The first 2 channels are square/pulse, the third is triangle
 - Remaining channels are either cut off, or are "arpeggiated" to
   simulate chords.  You can control this in the "arp" setting.

I made this hack because I noticed that DE had a quite primitive sound font
(mostly square waves, with a few more complex ones too) and the composer,
Masuko Tsukasa, paired a few of the channels in several songs, making for
1 noise track, 1 bass track, and two pairs of lead tracks that phase off
each other for a cool aural effect.  If you remove the less-dominant channel
in each of those pairs, then in the best-case scenario you have something
that can sound great even on the NES.  In the worst-case scenario, you have
one bass track, and 5 remaining tracks that need combining down to only two
pulse wave tracks.  Nothing much you can do about that, either lose tracks
or have a deep arpeggio.

The extra code I added does automatic channel rearrangement and arpeggio
by prioritizing each channel and skipping the channel if it is silent,
going down the priority chain to the next channel.  You can see in my code
the table for channel priorities for each song.


Here is the table that assigns virtual PCE channels to NES channels, per song.
0x, 1x, 2x, 3x = NES channel, xA, xB, xC are channel priorities.
Code: [Select]
;==================== Song Virtual Channel Mapping Table
SongMapTbl:
.db $0A,$0B,$1b,$1a,$1c,$2a
.db $0A,$0B,$2a,$1a,$2b,$2c
.db $0a,$1a,$1b,$0b,$2b,$2a
.db $0a,$1a,$1b,$2b,$0b,$2a
;4
.db $0a,$0b,$1a,$1b,$2a,$2b
.db $0a,$0b,$1a,$2a,$0c,$1b
.db $0a,$0b,$1a,$1b,$2a,$3a
.db $0a,$0b,$1a,$2a,$1b,$3a
;8
.db $0a,$0b,$2a,$1a,$1b,$2b
.db $0a,$0b,$2a,$1a,$1b,$3a
.db $0a,$1a,$1b,$2a,$2b,$0b
.db $0a,$2a,$1a,$1b,$0b,$3a
;C
.db $0a,$0b,$1a,$2a,$1b,$3a
.db $0a,$1a,$1c,$1b,$0b,$2a
.db $0a,$2a,$2b,$1b,$0b,$2c
.db $0a,$0b,$1a,$1b,$2a,$3a
;10
.db $0a,$0b,$1a,$1b,$2a,$3a
.db $0a,$0b,$1a,$1b,$2a,$3a
.db $0a,$0b,$0c,$1a,$1b,$2a
.db $0a,$0b,$1a,$0c,$1b,$2a
.db $0a,$0b,$0c,$2a,$1b,$1a

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: PCE -> NES style sound mapping experiment
« Reply #1 on: November 10, 2015, 02:07:47 PM »
Now you just need to simulate that muddy dpcm sound of the nes :D