Skip to content

Commit

Permalink
casio/ct8000.cpp: Emulated Casiotone 8000 keyboard and related system…
Browse files Browse the repository at this point in the history
…s. (#13237)

* sound/flt_biquad.cpp: Added Sallen-Key high-pass filters.
* sound/bbd.cpp: Added MN3207P variant.
* sound/upd931.cpp: Emulated µPD931 synthesis chip.

New working systems
--------------------
Casio Casiotone 8000 [=CO=Windler, Devin Acker]
Casio Casiotone FK-1 [BCM, Devin Acker]

New systems marked not working
------------------------
Casio Casiotone MB-1 [=CO=Windler, Devin Acker]
  • Loading branch information
devinacker authored Jan 25, 2025
1 parent 7cc6ac9 commit efee42e
Show file tree
Hide file tree
Showing 14 changed files with 2,978 additions and 103 deletions.
12 changes: 12 additions & 0 deletions scripts/src/sound.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,18 @@ if (SOUNDS["LC82310"]~=null) then
}
end

---------------------------------------------------
-- NEC uPD931
--@src/devices/sound/upd931.h,SOUNDS["UPD931"] = true
---------------------------------------------------

if (SOUNDS["UPD931"]~=null) then
files {
MAME_DIR .. "src/devices/sound/upd931.cpp",
MAME_DIR .. "src/devices/sound/upd931.h",
}
end

---------------------------------------------------
-- NEC uPD933
--@src/devices/sound/upd933.h,SOUNDS["UPD933"] = true
Expand Down
16 changes: 15 additions & 1 deletion src/devices/sound/bbd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ void bbd_device_base<Entries, Outputs>::device_start()
template<int Entries, int Outputs>
void bbd_device_base<Entries, Outputs>::device_clock_changed()
{
m_stream->set_sample_rate(sample_rate());
if (m_cv_handler.isnull())
m_stream->set_sample_rate(sample_rate());
}


Expand Down Expand Up @@ -163,3 +164,16 @@ mn3204p_device::mn3204p_device(const machine_config &mconfig, const char *tag, d
bbd_device_base(mconfig, tag, owner, clock, MN3204P)
{
}


//**************************************************************************
// MN3207P
//**************************************************************************

// device type definition
DEFINE_DEVICE_TYPE(MN3207, mn3207_device, "mn3207", "MN3207 BBD")

mn3207_device::mn3207_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
bbd_device_base(mconfig, tag, owner, clock, MN3207)
{
}
11 changes: 11 additions & 0 deletions src/devices/sound/bbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,15 @@ class mn3204p_device : public bbd_device_base<512, 2>

DECLARE_DEVICE_TYPE(MN3204P, mn3204p_device)


// ======================> mn3207_device

class mn3207_device : public bbd_device_base<1024, 2>
{
public:
mn3207_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
};

DECLARE_DEVICE_TYPE(MN3207, mn3207_device)

#endif // MAME_SOUND_BBD_H
253 changes: 156 additions & 97 deletions src/devices/sound/flt_biquad.cpp

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/devices/sound/flt_biquad.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ class filter_biquad_device : public device_t, public device_sound_interface
// Helper setup functions to create common filters representable by biquad filters:
// (and, as needed, modify/update/recalc helpers)

// universal calculator for both Sallen-Key low-pass and high-pass
biquad_params opamp_sk_lphp_calc(biquad_type type, double r1, double r2, double r3, double r4, double c1, double c2);

// Sallen-Key low-pass
filter_biquad_device& opamp_sk_lowpass_setup(double r1, double r2, double r3, double r4, double c1, double c2);
void opamp_sk_lowpass_modify(double r1, double r2, double r3, double r4, double c1, double c2);
biquad_params opamp_sk_lowpass_calc(double r1, double r2, double r3, double r4, double c1, double c2);

// TODO when needed: Sallen-Key band-pass

// TODO when needed: Sallen-Key band-reject
// Sallen-Key high-pass
filter_biquad_device& opamp_sk_highpass_setup(double r1, double r2, double r3, double r4, double c1, double c2);
void opamp_sk_highpass_modify(double r1, double r2, double r3, double r4, double c1, double c2);

// TODO when needed: Sallen-Key high-pass
// TODO when needed: Sallen-Key band-pass (there are several versions of this in the 1955 Sallen-Key paper)

// Multiple-Feedback low-pass
filter_biquad_device& opamp_mfb_lowpass_setup(double r1, double r2, double r3, double c1, double c2);
Expand Down
Loading

0 comments on commit efee42e

Please sign in to comment.