Skip to content

Commit

Permalink
misc swx00 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
galibert committed Mar 19, 2024
1 parent 200a140 commit cdbc92d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/devices/bus/plg1x0/plg150-ap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ void plg150_ap_device::midi_rx(int state)
void plg150_ap_device::map(address_map &map)
{
map(0x000000, 0x07ffff).rom().region("cpu", 0);
map(0x200000, 0x207fff).ram();
}

void plg150_ap_device::device_add_mconfig(machine_config &config)
{
SWX00(config, m_cpu, 8.4672_MHz_XTAL, 1);
SWX00(config, m_cpu, 8.4672_MHz_XTAL*2, 1);
m_cpu->set_addrmap(AS_PROGRAM, &plg150_ap_device::map);
m_cpu->write_sci_tx<1>().set([this] (int state) { m_connector->do_midi_tx(state); });
m_cpu->sci_set_external_clock_period(0, attotime::from_hz(500000));
m_cpu->sci_set_external_clock_period(1, attotime::from_hz(500000));
}

ROM_START( plg150_ap )
Expand Down
3 changes: 3 additions & 0 deletions src/devices/cpu/h8/swx00.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DEFINE_DEVICE_TYPE(SWX00, swx00_device, "swx00", "Yamaha SWX00")

swx00_device::swx00_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u8 mode) :
h8s2000_device(mconfig, SWX00, tag, owner, clock, address_map_constructor(FUNC(swx00_device::map), this)),
device_mixer_interface(mconfig, *this, 2),
m_intc(*this, "intc"),
m_adc(*this, "adc"),
m_dma(*this, "dma"),
Expand Down Expand Up @@ -315,6 +316,8 @@ void swx00_device::device_add_mconfig(machine_config &config)

SWX00_SOUND(config, m_swx00);
m_swx00->set_space(DEVICE_SELF, AS_S);
m_swx00->add_route(0, DEVICE_SELF, 1.0, AUTO_ALLOC_INPUT, 0);
m_swx00->add_route(1, DEVICE_SELF, 1.0, AUTO_ALLOC_INPUT, 1);
}

device_memory_interface::space_config_vector swx00_device::memory_space_config() const
Expand Down
2 changes: 1 addition & 1 deletion src/devices/cpu/h8/swx00.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "h8_watchdog.h"
#include "sound/swx00.h"

class swx00_device : public h8s2000_device {
class swx00_device : public h8s2000_device, public device_mixer_interface {
public:
enum {
AS_C = AS_PROGRAM,
Expand Down
3 changes: 3 additions & 0 deletions src/mame/yamaha/ymmu15.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ void mu15_state::mu15(machine_config &config)
m_maincpu->set_addrmap(swx00_device::AS_C, &mu15_state::c_map);
m_maincpu->set_addrmap(swx00_device::AS_S, &mu15_state::s_map);

m_maincpu->add_route(0, "lspeaker", 1.0);
m_maincpu->add_route(1, "rspeaker", 1.0);

// Nothing connected to sclki, yet...
m_maincpu->sci_set_external_clock_period(0, attotime::from_hz(500000));
m_maincpu->sci_set_external_clock_period(1, attotime::from_hz(500000));
Expand Down
9 changes: 6 additions & 3 deletions src/mame/yamaha/ympsr340.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ void psr340_state::psr340(machine_config &config)
m_maincpu->read_pad().set(FUNC(psr340_state::pad_r));
m_maincpu->write_txd().set(FUNC(psr340_state::txd_w));

m_maincpu->add_route(0, "lspeaker", 1.0);
m_maincpu->add_route(1, "rspeaker", 1.0);

// mks3 is connected to sclki, sync comms on sci1
// something generates 500K for sci0, probably internal to the swx00
m_maincpu->sci_set_external_clock_period(0, attotime::from_hz(500000));
Expand All @@ -233,7 +236,7 @@ void psr340_state::psr340(machine_config &config)
m_mks3->write_da().set(m_maincpu, FUNC(swx00_device::sci_rx_w<1>));
m_mks3->write_clk().set(m_maincpu, FUNC(swx00_device::sci_clk_w<1>));

KS0066(config, m_lcdc, 270'000); // 91K resistor
KS0066(config, m_lcdc, 270000); // 91K resistor
m_lcdc->set_default_bios_tag("f05");
m_lcdc->set_lcd_size(2, 40);

Expand All @@ -260,8 +263,8 @@ ROM_START( psr340 )
ROM_REGION16_BE(0x200000, "wave", 0)
ROM_LOAD("xv89810.bin", 0x000000, 0x200000, CRC(10e68363) SHA1(5edee814bf07c49088da44474fdd5c817e7c5af0))

ROM_REGION(0x61809, "screen", 0)
ROM_LOAD("psr340-lcd.svg", 0, 0x61809, CRC(f9d11ca6) SHA1(da036d713c73d6b452a3e2d2b2234d473422d5fb))
ROM_REGION(399369, "screen", 0)
ROM_LOAD("psr340-lcd.svg", 0, 399369, CRC(f9d11ca6) SHA1(da036d713c73d6b452a3e2d2b2234d473422d5fb))
ROM_END

} // anonymous namespace
Expand Down

0 comments on commit cdbc92d

Please sign in to comment.