Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt

This commit is contained in:
cam900 2023-01-14 11:50:33 +09:00
commit c995a52835
11 changed files with 16 additions and 9 deletions

View File

@ -11,7 +11,7 @@ defaults:
shell: bash
env:
BUILD_TYPE: Release
BUILD_TYPE: Debug
jobs:
build:

BIN
demos/multichip/colab.fur Normal file

Binary file not shown.

BIN
demos/x16/dance with me.fur Normal file

Binary file not shown.

View File

@ -297,7 +297,7 @@ void DivPlatformAY8930::tick(bool sysTick) {
}
}
if (chan[i].std.ex1.had) { // duty
rWrite(0x16+i,chan[i].std.ex1.val);
immWrite(0x16+i,chan[i].std.ex1.val);
}
if (chan[i].std.ex2.had) {
chan[i].envelope.mode=chan[i].std.ex2.val;

View File

@ -148,7 +148,7 @@ void DivPlatformC64::tick(bool sysTick) {
if (chan[i].std.pitch.had) {
if (chan[i].std.pitch.mode) {
chan[i].pitch2+=chan[i].std.pitch.val;
CLAMP_VAR(chan[i].pitch2,-32768,32767);
CLAMP_VAR(chan[i].pitch2,-65535,65535);
} else {
chan[i].pitch2=chan[i].std.pitch.val;
}
@ -188,6 +188,7 @@ void DivPlatformC64::tick(bool sysTick) {
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,8,chan[i].pitch2,chipClock,CHIP_FREQBASE);
if (chan[i].freq<0) chan[i].freq=0;
if (chan[i].freq>0xffff) chan[i].freq=0xffff;
if (chan[i].keyOn) {
rWrite(i*7+5,(chan[i].attack<<4)|(chan[i].decay));

View File

@ -509,12 +509,12 @@ DivPlatformLynx::MikeyFreqDiv::MikeyFreqDiv(int frequency) {
if (top>7)
{
clockDivider=top-7;
backup=frequency>>(top-7);
backup=clamped>>(top-7);
}
else
{
clockDivider=0;
backup=frequency;
backup=clamped;
}
}

View File

@ -707,11 +707,11 @@ const void* DivPlatformQSound::getSampleMem(int index) {
}
size_t DivPlatformQSound::getSampleMemCapacity(int index) {
return (index == 0 || index == 1) ? 16777216 : 0;
return index == 0 ? 16777216 : index == 1 ? MAX(0,16777216 - sampleMemUsage) : 0;
}
size_t DivPlatformQSound::getSampleMemUsage(int index) {
return index == 0 ? sampleMemLen : index == 1 ? sampleMemLenBS : 0;
return index == 0 ? sampleMemLen : index == 1 ? MAX(0,sampleMemLenBS - sampleMemUsage) : 0;
}
bool DivPlatformQSound::isSampleLoaded(int index, int sample) {
@ -766,6 +766,7 @@ void DivPlatformQSound::renderSamples(int sysID) {
sampleMemLen=memPos+256;
memPos=(memPos+0xffff)&0xff0000;
sampleMemUsage=memPos;
for (int i=0; i<parent->song.sampleLen; i++) {
DivSample* s=parent->song.sample[i];
@ -818,6 +819,7 @@ int DivPlatformQSound::init(DivEngine* p, int channels, int sugRate, const DivCo
sampleMem=new unsigned char[getSampleMemCapacity()];
sampleMemLen=0;
sampleMemLenBS=0;
sampleMemUsage=0;
chip.rom_data=sampleMem;
chip.rom_mask=0xffffff;
reset();

View File

@ -50,6 +50,7 @@ class DivPlatformQSound: public DivDispatch {
unsigned char* sampleMem;
size_t sampleMemLen;
size_t sampleMemLenBS;
size_t sampleMemUsage;
bool sampleLoaded[256];
bool sampleLoadedBS[256];
struct qsound_chip chip;

View File

@ -362,7 +362,7 @@ void DivPlatformX1_010::tick(bool sysTick) {
if (chan[i].std.pitch.had) {
if (chan[i].std.pitch.mode) {
chan[i].pitch2+=chan[i].std.pitch.val;
CLAMP_VAR(chan[i].pitch2,-32768,32767);
CLAMP_VAR(chan[i].pitch2,-65535,65535);
} else {
chan[i].pitch2=chan[i].std.pitch.val;
}
@ -484,6 +484,7 @@ void DivPlatformX1_010::tick(bool sysTick) {
if (chan[i].freq>255) chan[i].freq=255;
chWrite(i,2,chan[i].freq&0xff);
} else {
if (chan[i].freq<0) chan[i].freq=0;
if (chan[i].freq>65535) chan[i].freq=65535;
chWrite(i,2,chan[i].freq&0xff);
chWrite(i,3,(chan[i].freq>>8)&0xff);

View File

@ -90,7 +90,7 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
if (chan[i].std.pitch.had) {
if (chan[i].std.pitch.mode) {
chan[i].pitch2+=chan[i].std.pitch.val;
CLAMP_VAR(chan[i].pitch2,-32768,32767);
CLAMP_VAR(chan[i].pitch2,-65535,65535);
} else {
chan[i].pitch2=chan[i].std.pitch.val;
}
@ -99,6 +99,7 @@ void DivPlatformZXBeeper::tick(bool sysTick) {
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
if (chan[i].active) {
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
if (chan[i].freq<0) chan[i].freq=0;
if (chan[i].freq>65535) chan[i].freq=65535;
}
if (chan[i].keyOn) {

View File

@ -63,6 +63,7 @@ const char* aboutLine[]={
"akumanatt",
"AmigaX",
"AURORA*FIELDS",
"battybeats",
"BlueElectric05",
"breakthetargets",
"brickblock369",