mirror of
https://github.com/holub/mame
synced 2025-04-17 22:13:04 +03:00
machine/psion_asic9.cpp: Improved ASIC9MX RAM configuration to detect 2MB.
psion/psion3a.cpp: Improved LCD palette contrast. - Series 3mx now uses ASIC9MX to correctly detect 2MB RAM. psion/siena.cpp: Improved LCD palette contrast. psion/workabout.cpp: Improved LCD palette contrast. - Workabout mx now uses ASIC9MX to correctly detect 2MB RAM.
This commit is contained in:
parent
e3997fb6b2
commit
38d2cbaedf
@ -123,24 +123,7 @@ void psion_asic9_device::device_start()
|
||||
m_ram_space = &space(AS_A9_RAM);
|
||||
m_rom_space = &space(AS_A9_ROM);
|
||||
|
||||
switch (m_ram->size())
|
||||
{
|
||||
case 0x010000: case 0x020000:
|
||||
m_ram_type = 0;
|
||||
break;
|
||||
|
||||
case 0x040000: case 0x080000:
|
||||
m_ram_type = 1;
|
||||
break;
|
||||
|
||||
case 0x100000: case 0x200000:
|
||||
m_ram_type = 2;
|
||||
break;
|
||||
|
||||
case 0x400000: case 0x800000:
|
||||
m_ram_type = 3;
|
||||
break;
|
||||
}
|
||||
m_ram_type = get_ram_type(m_ram->size());
|
||||
|
||||
configure_ram(m_ram_type);
|
||||
configure_rom();
|
||||
@ -179,6 +162,44 @@ void psion_asic9_device::device_start()
|
||||
save_item(NAME(m_rtc));
|
||||
}
|
||||
|
||||
uint8_t psion_asic9_device::get_ram_type(uint32_t ram_size)
|
||||
{
|
||||
switch (ram_size)
|
||||
{
|
||||
case 0x010000: case 0x020000:
|
||||
return 0;
|
||||
|
||||
case 0x040000: case 0x080000:
|
||||
return 1;
|
||||
|
||||
case 0x100000: case 0x200000:
|
||||
return 2;
|
||||
|
||||
case 0x400000: case 0x800000:
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t psion_asic9mx_device::get_ram_type(uint32_t ram_size)
|
||||
{
|
||||
switch (ram_size)
|
||||
{
|
||||
case 0x0080000: case 0x0100000:
|
||||
return 0;
|
||||
|
||||
case 0x0200000: case 0x0400000:
|
||||
return 1;
|
||||
|
||||
case 0x0800000: case 0x1000000:
|
||||
return 2;
|
||||
|
||||
case 0x2000000: case 0x4000000:
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
@ -407,6 +428,7 @@ uint32_t psion_asic9_device::ram_device_size(uint8_t device_type)
|
||||
{
|
||||
uint32_t size = 0;
|
||||
|
||||
// RAM is installed in pairs, ie. 256KBits = 2 x 32K
|
||||
switch (device_type & 3)
|
||||
{
|
||||
case 0: size = 0x010000; break; // 256KBits
|
||||
@ -417,6 +439,21 @@ uint32_t psion_asic9_device::ram_device_size(uint8_t device_type)
|
||||
return size;
|
||||
}
|
||||
|
||||
uint32_t psion_asic9mx_device::ram_device_size(uint8_t device_type)
|
||||
{
|
||||
uint32_t size = 0;
|
||||
|
||||
// TODO: unknown for A9MX but allow EPOC16 to correctly identify 2MB fitted to all MX machines.
|
||||
switch (device_type & 3)
|
||||
{
|
||||
case 0: size = 0x0040000; break;
|
||||
case 1: size = 0x0100000; break;
|
||||
case 2: size = 0x0400000; break;
|
||||
case 3: size = 0x1000000; break;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
void psion_asic9_device::configure_ram(uint8_t device_type)
|
||||
{
|
||||
uint32_t device_size_actual = ram_device_size(m_ram_type);
|
||||
|
@ -68,6 +68,9 @@ protected:
|
||||
|
||||
virtual space_config_vector memory_space_config() const override;
|
||||
|
||||
virtual uint32_t ram_device_size(uint8_t device_type);
|
||||
virtual uint8_t get_ram_type(uint32_t ram_size);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_v30;
|
||||
required_device<ram_device> m_ram;
|
||||
@ -104,7 +107,6 @@ private:
|
||||
offs_t translate_address(offs_t offset);
|
||||
|
||||
uint8_t m_ram_type;
|
||||
uint32_t ram_device_size(uint8_t device_type);
|
||||
void configure_ram(uint8_t device_type = 0);
|
||||
void configure_rom();
|
||||
|
||||
@ -169,6 +171,10 @@ class psion_asic9mx_device : public psion_asic9_device
|
||||
public:
|
||||
// construction/destruction
|
||||
psion_asic9mx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
virtual uint32_t ram_device_size(uint8_t device_type) override;
|
||||
virtual uint8_t get_ram_type(uint32_t ram_size) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -119,7 +119,6 @@ protected:
|
||||
required_device<psion3a_codec_device> m_codec;
|
||||
required_device_array<psion_ssd_device, 2> m_ssd;
|
||||
|
||||
private:
|
||||
void palette_init(palette_device &palette);
|
||||
|
||||
uint16_t kbd_r();
|
||||
@ -368,7 +367,10 @@ static INPUT_PORTS_START( psion3a_fr )
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('"') PORT_CHAR('3') PORT_CHAR('\\')
|
||||
|
||||
PORT_MODIFY("COL6")
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('y') PORT_CHAR('Y')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('a') PORT_CHAR('A')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('q') PORT_CHAR('Q')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('w') PORT_CHAR('W')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('z') PORT_CHAR('Z')
|
||||
|
||||
PORT_MODIFY("COL7")
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('&') PORT_CHAR('1') PORT_NAME("& 1 Off")
|
||||
@ -481,8 +483,14 @@ uint16_t psion3a_base_state::kbd_r()
|
||||
void psion3a_base_state::palette_init(palette_device &palette)
|
||||
{
|
||||
palette.set_pen_color(0, rgb_t(190, 220, 190));
|
||||
palette.set_pen_color(1, rgb_t(130, 130, 110));
|
||||
palette.set_pen_color(2, rgb_t(190, 210, 180));
|
||||
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
const int r = (0x99 * i) / 2;
|
||||
const int g = (0xaa * i) / 2;
|
||||
const int b = (0x88 * i) / 2;
|
||||
m_palette->set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -520,6 +528,7 @@ void psion3a_base_state::psion_asic9(machine_config &config)
|
||||
m_ssd[1]->door_cb().set(m_asic9, FUNC(psion_asic9_device::medchng_w));
|
||||
|
||||
SOFTWARE_LIST(config, "ssd_list").set_original("psion_ssd").set_filter("S3,S3A");
|
||||
//SOFTWARE_LIST(config, "flop_list").set_original("psion_flop").set_filter("S3A");
|
||||
}
|
||||
|
||||
void psion3a_state::psion3a(machine_config &config)
|
||||
@ -554,7 +563,7 @@ void psion3c_state::psion3c(machine_config &config)
|
||||
PSION_S3A_CODEC(config, m_codec).add_route(ALL_OUTPUTS, "mono", 1.00); // TODO: M7702-03
|
||||
m_asic9->pcm_out().set(m_codec, FUNC(psion3a_codec_device::pcm_in));
|
||||
|
||||
PSION_CONDOR(config, m_condor);
|
||||
PSION_CONDOR(config, m_condor, 3'686'400); // FIXME: unknown clock source
|
||||
m_condor->txd_handler().set(m_honda, FUNC(psion_honda_slot_device::write_txd));
|
||||
m_condor->rts_handler().set(m_honda, FUNC(psion_honda_slot_device::write_rts));
|
||||
m_condor->dtr_handler().set(m_honda, FUNC(psion_honda_slot_device::write_dtr));
|
||||
@ -575,7 +584,17 @@ void psion3mx_state::psion3mx(machine_config &config)
|
||||
{
|
||||
psion_asic9(config);
|
||||
|
||||
m_asic9->set_clock(3.6864_MHz_XTAL * 15 / 2); // V30MX
|
||||
PSION_ASIC9MX(config.replace(), m_asic9, 3.6864_MHz_XTAL * 15 / 2); // V30MX
|
||||
m_asic9->set_screen("screen");
|
||||
m_asic9->set_ram_rom("ram", "rom");
|
||||
m_asic9->port_ab_r().set(FUNC(psion3mx_state::kbd_r));
|
||||
m_asic9->buz_cb().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
//m_asic9->buzvol_cb().set([this](int state) { m_speaker->set_output_gain(ALL_OUTPUTS, state ? 1.0 : 0.25); });
|
||||
m_asic9->col_cb().set([this](uint8_t data) { m_key_col = data; });
|
||||
m_asic9->data_r<0>().set(m_ssd[1], FUNC(psion_ssd_device::data_r)); // SSD Pack 2
|
||||
m_asic9->data_w<0>().set(m_ssd[1], FUNC(psion_ssd_device::data_w));
|
||||
m_asic9->data_r<1>().set(m_ssd[0], FUNC(psion_ssd_device::data_r)); // SSD Pack 1
|
||||
m_asic9->data_w<1>().set(m_ssd[0], FUNC(psion_ssd_device::data_w));
|
||||
|
||||
m_ram->set_default_size("2M").set_extra_options("");
|
||||
|
||||
|
@ -197,8 +197,14 @@ uint16_t siena_state::kbd_r()
|
||||
void siena_state::palette_init(palette_device &palette)
|
||||
{
|
||||
palette.set_pen_color(0, rgb_t(190, 220, 190));
|
||||
palette.set_pen_color(1, rgb_t(130, 130, 110));
|
||||
palette.set_pen_color(2, rgb_t(190, 210, 180));
|
||||
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
const int r = (0x99 * i) / 2;
|
||||
const int g = (0xaa * i) / 2;
|
||||
const int b = (0x88 * i) / 2;
|
||||
m_palette->set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -225,7 +231,7 @@ void siena_state::siena(machine_config &config)
|
||||
RAM(config, m_ram).set_default_size("512K").set_extra_options("1M");
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_NONE);
|
||||
|
||||
PSION_CONDOR(config, m_condor);
|
||||
PSION_CONDOR(config, m_condor, 3'686'400); // FIXME: unknown clock source
|
||||
m_condor->txd_handler().set(m_honda, FUNC(psion_honda_slot_device::write_txd));
|
||||
m_condor->rts_handler().set(m_honda, FUNC(psion_honda_slot_device::write_rts));
|
||||
m_condor->dtr_handler().set(m_honda, FUNC(psion_honda_slot_device::write_dtr));
|
||||
@ -242,6 +248,7 @@ void siena_state::siena(machine_config &config)
|
||||
m_asic9->data_w<4>().set(m_honda, FUNC(psion_honda_slot_device::data_w));
|
||||
|
||||
SOFTWARE_LIST(config, "ssd_list").set_original("psion_ssd").set_filter("SIENA");
|
||||
//SOFTWARE_LIST(config, "flop_list").set_original("psion_flop").set_filter("SIENA");
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,8 +186,14 @@ uint16_t workabout_state::kbd_r()
|
||||
void workabout_state::palette_init(palette_device &palette)
|
||||
{
|
||||
palette.set_pen_color(0, rgb_t(190, 220, 190));
|
||||
palette.set_pen_color(1, rgb_t(130, 130, 110));
|
||||
palette.set_pen_color(2, rgb_t(190, 210, 180));
|
||||
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
const int r = (0x99 * i) / 2;
|
||||
const int g = (0xaa * i) / 2;
|
||||
const int b = (0x88 * i) / 2;
|
||||
m_palette->set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -232,6 +238,7 @@ void workabout_state::workabout(machine_config &config)
|
||||
//PSION_EXP_SLOT(config, m_exp, psion_exp_devices, nullptr);
|
||||
|
||||
SOFTWARE_LIST(config, "ssd_list").set_original("psion_ssd").set_filter("WA");
|
||||
//SOFTWARE_LIST(config, "flop_list").set_original("psion_flop").set_filter("WA");
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +253,22 @@ void workabout_state::psionwamx(machine_config &config)
|
||||
{
|
||||
workabout(config);
|
||||
|
||||
m_asic9->set_clock(3.6864_MHz_XTAL * 15 / 2); // V30MX
|
||||
PSION_ASIC9MX(config.replace(), m_asic9, 3.6864_MHz_XTAL * 15 / 2); // V30MX
|
||||
m_asic9->set_screen("screen");
|
||||
m_asic9->set_ram_rom("ram", "rom");
|
||||
m_asic9->port_ab_r().set(FUNC(workabout_state::kbd_r));
|
||||
m_asic9->buz_cb().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
m_asic9->col_cb().set([this](uint8_t data) { m_key_col = data; });
|
||||
m_asic9->data_r<0>().set(m_ssd[1], FUNC(psion_ssd_device::data_r)); // SSD Pack 1
|
||||
m_asic9->data_w<0>().set(m_ssd[1], FUNC(psion_ssd_device::data_w));
|
||||
m_asic9->data_r<1>().set(m_ssd[0], FUNC(psion_ssd_device::data_r)); // SSD Pack 2
|
||||
m_asic9->data_w<1>().set(m_ssd[0], FUNC(psion_ssd_device::data_w));
|
||||
//m_asic9->data_r<2>().set(m_exp[0], FUNC(psion_exp_slot_device::data_r)); // Expansion port A
|
||||
//m_asic9->data_w<2>().set(m_exp[0], FUNC(psion_exp_slot_device::data_w));
|
||||
//m_asic9->data_r<3>().set(m_exp[1], FUNC(psion_exp_slot_device::data_r)); // Expansion port B
|
||||
//m_asic9->data_w<3>().set(m_exp[1], FUNC(psion_exp_slot_device::data_w));
|
||||
//m_asic9->data_r<4>().set(m_exp[2], FUNC(psion_exp_slot_device::data_r)); // Expansion port C
|
||||
//m_asic9->data_w<4>().set(m_exp[2], FUNC(psion_exp_slot_device::data_w));
|
||||
|
||||
m_ram->set_default_size("2M");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user