Merge branch 'tildearrow:master' into master

This commit is contained in:
Eknous 2023-07-16 11:51:45 +04:00 committed by GitHub
commit 67de26fb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 235 additions and 13 deletions

View File

@ -81,6 +81,10 @@ additional guidelines:
- on a switch block, **always** put `default` last and not in any other position.
- I have fear of some C/C++ compilers ignoring the rest of cases upon hitting default.
## Do NOT Force-Push after submitting Pull Request
if you do so, your pull request will be closed.
## Demo Songs
just put your demo song in `demos/`! be noted there are some guidelines:

View File

@ -47,7 +47,7 @@ use of this mode is discouraged in favor of Sample type instruments.
due to limitations in some of those sound chips, some restrictions exist:
- Amiga: sample lengths and loop will be set to an even number, and your sample can't be longer than 131070.
- Amiga: maximum frequency is 31,469Hz, but anything over 28,867 will sound glitchy on hardware. sample lengths and loop will be set to an even number, and your sample can't be longer than 131070.
- NES: if on DPCM mode, only a limited selection of frequencies is available, and loop position isn't supported (only entire sample).
- SegaPCM: your sample can't be longer than 65535, and the maximum frequency is 31.25KHz.
- QSound: your sample can't be longer than 65535, and the loop length shall not be greater than 32767.

View File

@ -15,3 +15,9 @@ imported MOD files use this chip, and will set A-4 tuning to 436.
- does not work on the last channel.
- `13xx`: **change wave.**
- only works when "Mode" is set to "Wavetable" in the instrument.
# info
- the maximum rate for sample playback is technically 31469Hz but anything higher than 28867Hz will sound glitchy on hardware.
- sample lengths and loop will be set to an even number.
- samples can't be longer than 131070.

View File

@ -6,6 +6,8 @@ it is a 3-channel square/noise/envelope sound generator. the chip's powerful sou
the AY-3-8914 variant was used in Intellivision, which is pretty much an AY with 4 level envelope volume per channel and different register format.
as of Furnace 0.6pre7, AY-3-8910 supports software sample playback, where all 3 channels can play 4-bit PCM samples (at the cost of a very high CPU usage)
# effects
- `20xx`: **set channel mode.**
@ -44,3 +46,12 @@ the AY-3-8914 variant was used in Intellivision, which is pretty much an AY with
- this changes the port's mode to "write". make sure you have connected something to it.
- `2Fxx`: **write to I/O port B.**
- this changes the port's mode to "write". make sure you have connected something to it.
# chip config
## AY derivative modes
AY-3-810 was an absurdly popular chip that was blessed with many third-party clones, licensed or not.
- the AY-3-8914 variant was used in Intellivision, which is pretty much an 8910 with 4 level envelope volume per channel and different register format.
- Yamaha YM2149 was an AY-3-8910 clone released in 1983. it's almost identical to AY with minor differences being: higher hardware envelope step resolution (16 vs 32), half-clock mode when voltage level is low, much stronger DC offset and cleaner, but softer output.
- Sunsoft 5B is YM2149 clone with half-clock mode forced on.

View File

@ -7,6 +7,8 @@ it is best known for being used in the Covox Sound Master, which didn't sell wel
emulation of this chip in Furnace is now complete thanks to community efforts and hardware testing, which an MSX board called Darky has permitted.
as of Furnace 0.6pre7, AY8930 supports software PCM, where all 3 channels can play 5-bit PCM samples (at the cost of a very high CPU usage)
# effects
- `12xx`: **set channel duty cycle.**

View File

@ -54,7 +54,7 @@ CSM is beyond the scope of this documentation. for more information, see this [b
## DualPCM
DualPCM splits channel 6 into two individual PCM channels. using the console's Z80 processor, these are mixed together in software and streamed to channel 6 in PCM mode. because this generates a stream of data, exported VGM files will be very large.
[info here.](ym2612.md)
## Sega CD

View File

@ -1,7 +1,20 @@
# OKI MSM6258
a single-channel ADPCM sound source developed by OKI. it allows max sample rate of 15.6 KHz... with no variable pitch. most prominent use of this chip was Sharp X68000 computer, where it was paired with Yamaha YM2151.
Furnace's implementation is MSM6258V, a CPU driven variant that is unlimited by amount of sample data, being able to be fed from the system's RAM.
# effects
...
# chip config
## chip clock rates
MSM6258 is an extremely basic ADPCM sound codec. it has no variable frequency rate; it depends on clock rate of a chip itself. Furnace supports following rates:
| clock rate | sampling rate |
|--------------------|---------------|
| 4 MHz | 7812 Hz |
| 4.096 MHz | 8000 Hz |
| 8 MHz | 15625 Hz |
| 8.192 MHz | 16000 Hz |

View File

@ -1,7 +1,33 @@
# OKI MSM6295
an upgrade from 6258 - it provides 4 ADPCM channels, at max 32 KHz (still no variable pitch though). between late '80s and late '90s, it was one of the most common, if not _the_ most common soundchip used in arcade machines (Capcom, Toaplan, Kaneko, Atari, Tecmo, the list can go on and on...)
an upgrade from 6258 - it provides 4 ADPCM channels, at max 32 KHz (still no variable pitch though). between late '80s and late '90s, it was one of the most common, if not _the_ most common soundchip used in arcade machines (Capcom, Toaplan, Kaneko, Atari, Tecmo, the list can go on and on...). Without bankswitching, the chip supports 256kB of sample RAM and can hold up to 127 samples at once.
# effects
- `20xx`: **set chip output rate.**
# chip config
## chip clock rates
like MSM6258, MSM295 is an extremely basic ADPCM sound codec. it has no variable frequency rate, it depends on clock rate of a chip itself. Furnace supports following rates:
| clock rate | sampling rate |
|--------------------|---------------|
| 1 MHz | 7576 Hz |
| 1.02 MHz | 7727 Hz |
| 1.056 MHz | 8000 Hz |
| 1.193 MHz | 9038 Hz |
| 0.89 MHz | 6742 Hz |
| 0.875 MHz | 6629 Hz |
| 0.9375 MHz | 7102 Hz |
| 1.5 MHz | 11364 Hz |
| 1.79 MHz | 13561 Hz |
| 2 MHz | 15152Hz |
| 2.112 MHz | 16000 Hz |
| 3 MHz | 22728 Hz |
| 3.58 MHz | 27122 Hz |
| 4 MHz | 30304 Hz |
| 4.224 MHz | 32000 Hz |
## chip clock divisor
MSM6295 clock rate could be divided by 132 (resulting sample rates above), or by 165. To get a clock rate using divisor of 165, formula is clock rate (in Hz) / 165. Example: 1 MHz MSM6295 in 165 divisor mode results in output rate of 6060 Hz.

View File

@ -13,3 +13,19 @@ the original iteration of the SN76489 used in the TI-99/4A computer, the SN94624
- `y` controls whether to select noise or thin pulse.
- `0`: thin pulse.
- `1`: noise.
# chip config
## SN7 versions
SN7 was extremely popular due to low cost. Therefore, it was cloned and copied to no end, often with minor differences between each other. Furnace supports several of these:
- SN94624, can only produce tones as low as 100Hz, and is clocked at 447 KHz.
- SN76494, which can play notes as low as 13.670 Hz (A -1). It has a different noise feedback and invert masks.
- SN76489, identical to SN94624, just without a clock divider
- SN76489A, identical to 76494, just with a /8 clock divider
- SN76496, literally identical to former. Why is it even here?
- SN76496 with a Atari-like short noise. The chip of many legend and rumours, might be a result of inaccurate emulation.
- Sega Master System VDP version has a different, characteristic noise LFSR.
- Game Gear SN7, identical to the above, but with stereo
- NCR8496, different noise invert masks
- PSSJ3, literally identical to the former, it just swaps "high" and "low" signals in the output, which results in no audible difference
TODO: all these checkboxes

View File

@ -99,3 +99,9 @@ several variants of this chip were released as well, with more features.
- `5Dxx`: **set D2R/SR of operator 2.**
- `5Exx`: **set D2R/SR of operator 3.**
- `5Fxx`: **set D2R/SR of operator 4.**
# system modes
## extended channel 3
in ExtCh mode, channel 3 is split into one column for each of its four operators and feedback are shared. the frequency of each operator may be controlled independently with notes and effects. this can be used for more polyphony or more complex sounds.
all four operators are still combined according to the algorithm in use. for example, algorithm 7 acts as four independent sine waves. algorithm 4 acts as two independent 2op sounds. even with algorithm 0, placing a note in any operator triggers that operator alone.

View File

@ -2,7 +2,7 @@
like YM2203, but with twice the FM channels, stereo, an ADPCM channel and built-in drums ("rhythm")!
it was one of the available sound chips for the NEC PC-88VA and PC-98 series of computers.
it was one of the available sound chips for the NEC PC-88VA and later models of PC-98 series of computers.
the YM2610 (OPNB) and YM2610B chips are very similar to this one, but the built-in drums have been replaced with 6 sample channels.
@ -99,3 +99,9 @@ the YM2610 (OPNB) and YM2610B chips are very similar to this one, but the built-
- `5Dxx`: **set D2R/SR of operator 2.**
- `5Exx`: **set D2R/SR of operator 3.**
- `5Fxx`: **set D2R/SR of operator 4.**
# system modes
## extended channel 3
in ExtCh mode, channel 3 is split into one column for each of its four operators. feedback and LFO levels are shared. the frequency of each operator may be controlled independently with notes and effects. this can be used for more polyphony or more complex sounds.
all four operators are still combined according to the algorithm in use. for example, algorithm 7 acts as four independent sine waves. algorithm 4 acts as two independent 2op sounds. even with algorithm 0, placing a note in any operator triggers that operator alone.

View File

@ -2,7 +2,7 @@
originally an arcade board, but SNK shortly adapted it to a rather expensive video game console with the world's biggest cartridges because some people liked the system so much they wanted a home version of it.
its soundchip is a 4-in-1: 4ch 4-op FM, YM2149 (AY-3-8910 clone) and 2 different format ADPCM in a single package!
its soundchip is a 4-in-1: 4ch 4-op FM, YM2149 (AY-3-8910 clone) and [2 different format ADPCM](https://wiki.neogeodev.org/index.php?title=ADPCM) in a single package!
# effects
@ -97,3 +97,9 @@ its soundchip is a 4-in-1: 4ch 4-op FM, YM2149 (AY-3-8910 clone) and 2 different
- `5Dxx`: **set D2R/SR of operator 2.**
- `5Exx`: **set D2R/SR of operator 3.**
- `5Fxx`: **set D2R/SR of operator 4.**
# system modes
## extended channel 2
in ExtCh mode, channel 2 is split into one column for each of its four operators. feedback and LFO levels are shared. the frequency of each operator may be controlled independently with notes and effects. this can be used for more polyphony or more complex sounds.
all four operators are still combined according to the algorithm in use. for example, algorithm 7 acts as four independent sine waves. algorithm 4 acts as two independent 2op sounds. even with algorithm 0, placing a note in any operator triggers that operator alone.

View File

@ -96,3 +96,9 @@ it is backward compatible with the original chip.
- `5Dxx`: **set D2R/SR of operator 2.**
- `5Exx`: **set D2R/SR of operator 3.**
- `5Fxx`: **set D2R/SR of operator 4.**
# system modes
## extended channel 3
in ExtCh mode, channel 3 is split into one column for each of its four operators. feedback and LFO levels are shared. the frequency of each operator may be controlled independently with notes and effects. this can be used for more polyphony or more complex sounds.
all four operators are still combined according to the algorithm in use. for example, algorithm 7 acts as four independent sine waves. algorithm 4 acts as two independent 2op sounds. even with algorithm 0, placing a note in any operator triggers that operator alone.

View File

@ -1,6 +1,7 @@
# Yamaha YM2612
one of two chips that powered the Sega Genesis. it is a six-channel, four-operator FM synthesizer. channel #6 can be turned into 8-bit PCM player, that via software mixing, thanks to Z80 sound CPU, can play more than one channel of straight-shot samples at once. as of Furnace 0.6pre5, Furnace offers DualPCM, which allows 2 channels of software-mixed 8-bit PCM samples at 13750 Hz.
one of two chips that powered the Sega Genesis. it is a six-channel, four-operator FM synthesizer. channel #6 can be turned into 8-bit PCM player, that via software mixing, thanks to Z80 sound CPU, can play more than one channel of straight-shot samples at once.
as of Furnace 0.6pre5, Furnace offers DualPCM, a Z80 driver that splits channel 6 into two individual PCM channels with variable pitch. using the console's Z80 processor, these are mixed together in software and streamed to channel 6 in PCM mode with a mix rate of 13750 Hz. VGM export requires the "direct stream mode" option to be enabled, and resulting files will be very large.
# effects

View File

@ -2,7 +2,10 @@
rather than having a dedicated sound synthesizer, early ZX Spectrum models had one piezo beeper, controlled by Z80 CPU and ULA chip. its capabilities should be on par with an IBM PC speaker... right?
not really - very soon talented programmers found out ways to output much more than one square wave channel. a lot of ZX beeper routines do exist, but as of 0.6 Furnace supports only a Follin/SFX-like engine with 6 channels of narrow pulse wave and click drums.
not really - very soon talented programmers found out ways to output much more than one square wave channel. a lot of ZX beeper routines do exist, but as of 0.6 Furnace supports two engines:
- a Follin/SFX-like engine with 6 channels of narrow pulse wave and click drums.
- QuadTone: PWM-driven engine with 4ch of pulse wave with freely variable duty cycles and 1-bit PCM drums.
# effects

View File

@ -1,6 +1,12 @@
# advanced
advanced Furnace features, as listed in the `Window` menu.
advanced Furnace features.
as listed in the "Edit" menu:
- [find/replace](find-replace.md)
as listed in the "Window" menu:
- [mixer](mixer.md)
- [grooves](grooves.md)
@ -10,8 +16,6 @@ advanced Furnace features, as listed in the `Window` menu.
- [compatibility flags](compat-flags.md)
- [song comments](comments.md)
<hr>
- [piano](piano.md)
- [oscilloscope](osc.md)
- [oscilloscopes (per-channel)](chanosc.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

@ -1,6 +1,6 @@
# oscilloscope (per channel)
# oscilloscope (per-channel)
the "Oscilloscope (per channel)" dialog shows an individual oscilloscope for each channel during playback.
the "Oscilloscope (per-channel)" dialog shows an individual oscilloscope for each channel during playback.
![oscilloscope per-channel configuration view](chanosc.png)
@ -8,8 +8,9 @@ right-clicking within the view will change it to the configuration view shown ab
- **Columns**: arranges oscilloscopes into this many columns.
- **Size (ms)**: sets what length of audio is visible in each oscilloscope.
- **Center waveform**: does its best to latch the waveform to the channel's note frequency and centers the display.
- **Amplitude**: scales amplitude for all oscilloscopes.
- **Gradient**: see below.
- the color selector sets the waveform color. right-clicking on it pops up an option dialog:
- the color selector sets the color for all waveforms. right-clicking on it pops up an option dialog:
- select between the square selector and the color wheel selector.
- **Alpha bar**: adds a transparency selector.
- the boxes below that are for selecting colors numerically by red-green-blue-alpha, hue-saturation-value-alpha, and HTML-style RGBA in hex.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,60 @@
# find/replace
Furnace has a powerful find-and-replace function that can take the repetitive work out of mass editing.
# find
![find dialog](find-find.png)
all data that can be found within a pattern can be searched for here.
- a find term contains:
- **Note**: note.\
**Ins**: instrument.\
**Volume**: volume.\
**Effect**: effect type.\
**Value**: effect value. all of these have the following choices for what data will be found:
- **ignore**: ignore this.
- **equals**: match the given value exactly.
- **not equal**: match everything but the given value.
- **between**: match anything between and including the given values.
- **not between**: match anything outside the given range of values.
- **any**: match all values.
- **none**: match blanks only.
- **-**: remove find term. if only one find term exists, it is cleared.
- **Add effect**: adds another Effect and Value to the term, each set representing additional effects columns.
- **Remove effect**: removes last Effect and Value from the term.
- **+**: adds another find term.
- **Search range**: restricts the find to the whole **Song**, the current **Selection**, or the currently viewed **Pattern**.
- **Confine to channels**: restricts the find to the selected channels and the channels between them.
- **Match effect position**: chooses how the order of effect types and effect values will matter when finding them.
- **No**: no attention is paid to what order the effects appear in.
- **Lax**: matches effects if they appear in the same order as selected above.
- **Strict**: effects may only match in their correponding effects columns.
- **Find**: finds everything that matches the terms and displays it in a list.
- the **order**, **row**, and **channel** columns are as they say.
- the **go** column of buttons will snap the pattern cursor to the location of the find.
# replace
![replace dialog](find-replace.png)
- the replacement term contains:
- **Note**: note.\
**Ins**: instrument.\
**Volume**: volume.\
**Effect**: effect type.\
**Value**: effect value. all of these have the following choices for how they alter the found data:
- **set**: changes found data to this value.
- **add**: adds this value to the found data. it may be negative for subtraction. notes are calculated in semitones.
- **add (overflow)**: as "add" above, but values will wrap around; for example, adding 13 to `FF` will result in `0C`.
- **scale**: multiply value to this percentage; for example, scaling `1A` by `150` results in `27`. not available for "note".
- **clear**: erases data.
- **Add effect**: adds another Effect and Value to be replaced according to how they were found.
- **Remove effect**: removes last Effect and Value.
- **Effect replace mode**:
- **Replace matches only**: replaces only the effect columns that match.
- **Replace matches, then free spaces**: replaces matched effects; if there are effect columns without data, those will be filled in with the additional effect replacements.
- **Clear effects**: overwrites effect data with replacement effects.
- **Insert in free spaces**: replaces nothing; replacement effects are inserted in free effects columns when available.
- **Replace**: finds everything from the "Find" tab and replaces it as directed.

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -452,6 +452,9 @@ static int opChanOffsH[4]={
};
void DivPlatformGenesisExt::tick(bool sysTick) {
int hardResetElapsed=0;
bool mustHardReset=false;
if (extMode) {
bool writeSomething=false;
unsigned char writeMask=2;
@ -462,6 +465,12 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
writeMask&=~(1<<(4+i));
opChan[i].keyOff=false;
}
if (opChan[i].hardReset && opChan[i].keyOn) {
mustHardReset=true;
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[i];
immWrite(baseAddr+ADDR_SL_RR,0x0f);
hardResetElapsed++;
}
}
if (writeSomething) {
if (chan[csmChan].active) { // CSM
@ -630,6 +639,22 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
(writeMask&0x80)?'4':'-'
);*/
immWrite(0x28,writeMask);
// hard reset handling
if (mustHardReset) {
for (unsigned int i=hardResetElapsed; i<hardResetCycles; i++) {
immWrite(0xf0,i&0xff);
}
for (int i=0; i<4; i++) {
if (opChan[i].keyOn && opChan[i].hardReset) {
// restore SL/RR
unsigned short baseAddr=chanOffs[extChanOffs]|opOffs[i];
DivInstrumentFM::Operator& op=chan[extChanOffs].state.op[i];
immWrite(baseAddr+ADDR_SL_RR,(op.rr&15)|(op.sl<<4));
}
}
immWrite(0x28,writeMask);
}
}
if (extMode) {

View File

@ -113,7 +113,33 @@ void FurnaceGUI::drawNewSong() {
nextDescName=i.name;
accepted=true;
}
if (ImGui::IsItemHovered()) {
if (ImGui::BeginTooltip()) {
std::map<DivSystem,int> chipCounts;
std::vector<DivSystem> chips;
for (FurnaceGUISysDefChip chip: i.orig) {
if (chipCounts.find(chip.sys)==chipCounts.end()) {
chipCounts[chip.sys]=1;
chips.push_back(chip.sys);
} else {
chipCounts[chip.sys]+=1;
}
}
for (size_t chipIndex=0; chipIndex<chips.size(); chipIndex++) {
DivSystem chip=chips[chipIndex];
const DivSysDef* sysDef=e->getSystemDef(chip);
ImGui::Text("%s (x%d): ",sysDef->name,chipCounts[chip]);
ImGui::TextWrapped("%s",sysDef->description);
if (chipIndex+1<chips.size()) {
ImGui::Separator();
}
}
ImGui::EndTooltip();
}
}
}
ImGui::EndTable();
}