From 0cae4d6d4068393b3727e665d954e0f50ae42230 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 14 Jul 2023 21:48:05 +0200 Subject: flower: remove unneeded vblank irq trampoline, vidbrain: fix regression with ext interrupt, invert joystick select pins, bus/vidbrain: unmap_r/w shouldn't lower cs2 pin Software list items promoted to working --------------------------------------- vidbrain: Money Minder [hap] New software list items marked not working ------------------------------------------ vidbrain: The Computational Language [Sean Riddle, Ianoid] --- hash/vidbrain.xml | 112 +++++++++++++++++++++++---------------- src/devices/bus/vidbrain/exp.cpp | 4 +- src/devices/bus/vidbrain/exp.h | 8 +-- src/devices/bus/vidbrain/std.cpp | 6 +-- src/mame/misc/flower.cpp | 13 +---- src/mame/shared/exidysound.cpp | 3 +- src/mame/vidbrain/uv201.cpp | 4 +- src/mame/vidbrain/vidbrain.cpp | 56 +++++++------------- src/mame/vidbrain/vidbrain.h | 3 +- 9 files changed, 101 insertions(+), 108 deletions(-) diff --git a/hash/vidbrain.xml b/hash/vidbrain.xml index 0f258dc5eed..d318db3e5ec 100644 --- a/hash/vidbrain.xml +++ b/hash/vidbrain.xml @@ -3,34 +3,31 @@ + - + Timeshare @@ -40,13 +37,14 @@ license:CC0-1.0 - + - + + Music Teacher 1 @@ -55,7 +53,7 @@ license:CC0-1.0 - + @@ -67,7 +65,7 @@ license:CC0-1.0 - + @@ -79,7 +77,7 @@ license:CC0-1.0 - + @@ -91,7 +89,7 @@ license:CC0-1.0 - + @@ -103,7 +101,7 @@ license:CC0-1.0 - + @@ -115,12 +113,13 @@ license:CC0-1.0 - + - + + Gladiator @@ -129,7 +128,7 @@ license:CC0-1.0 - + @@ -141,7 +140,7 @@ license:CC0-1.0 - + @@ -153,7 +152,7 @@ license:CC0-1.0 - + @@ -165,7 +164,7 @@ license:CC0-1.0 - + @@ -177,7 +176,7 @@ license:CC0-1.0 - + @@ -189,12 +188,33 @@ license:CC0-1.0 - + - + + + + + The Computational Language + 1978 + VideoBrain Computer Company + + + + + + + + + + + + + + + Financier @@ -203,12 +223,12 @@ license:CC0-1.0 - + - + Money Minder 1978 VideoBrain Computer Company @@ -216,29 +236,30 @@ license:CC0-1.0 - + - Information Manager (Proto) + Information Manager (prototype) 1978 VideoBrain Computer Company - - - + + + - + + Demonstration @@ -247,8 +268,9 @@ license:CC0-1.0 - + + diff --git a/src/devices/bus/vidbrain/exp.cpp b/src/devices/bus/vidbrain/exp.cpp index 067f2d6e14b..c04ebb6828a 100644 --- a/src/devices/bus/vidbrain/exp.cpp +++ b/src/devices/bus/vidbrain/exp.cpp @@ -37,7 +37,7 @@ device_videobrain_expansion_card_interface::device_videobrain_expansion_card_int //------------------------------------------------- -// videobrain_roml_pointer - get low ROM pointer +// videobrain_rom_pointer - get ROM pointer //------------------------------------------------- uint8_t* device_videobrain_expansion_card_interface::videobrain_rom_pointer(running_machine &machine, size_t size) @@ -45,7 +45,6 @@ uint8_t* device_videobrain_expansion_card_interface::videobrain_rom_pointer(runn if (m_rom.empty()) { m_rom.resize(size); - m_rom_mask = size - 1; } @@ -62,7 +61,6 @@ uint8_t* device_videobrain_expansion_card_interface::videobrain_ram_pointer(runn if (m_ram.empty()) { m_ram.resize(size); - m_ram_mask = size - 1; } diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h index d2686a04c59..e07a439a1f2 100644 --- a/src/devices/bus/vidbrain/exp.h +++ b/src/devices/bus/vidbrain/exp.h @@ -89,8 +89,8 @@ class videobrain_expansion_slot_device : public device_t, public: // construction/destruction template - videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt) - : videobrain_expansion_slot_device(mconfig, tag, owner, 0) + videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt) : + videobrain_expansion_slot_device(mconfig, tag, owner, 0) { option_reset(); opts(*this); @@ -109,8 +109,8 @@ public: void cs1_w(offs_t offset, uint8_t data) { bo_w(offset + 0x1000, data, 0, 1); } uint8_t cs2_r(offs_t offset) { return bo_r(offset + 0x1800, 1, 0); } void cs2_w(offs_t offset, uint8_t data) { bo_w(offset + 0x1800, data, 1, 0); } - uint8_t unmap_r(offs_t offset) { return bo_r(offset + 0x3000, 1, 0); } - void unmap_w(offs_t offset, uint8_t data) { bo_w(offset + 0x3000, data, 1, 0); } + uint8_t unmap_r(offs_t offset) { return bo_r(offset + 0x3000, 1, 1); } + void unmap_w(offs_t offset, uint8_t data) { bo_w(offset + 0x3000, data, 1, 1); } // cartridge interface void extres_w(int state) { m_write_extres(state); } diff --git a/src/devices/bus/vidbrain/std.cpp b/src/devices/bus/vidbrain/std.cpp index 55b5c3ce22d..f1e820eefaa 100644 --- a/src/devices/bus/vidbrain/std.cpp +++ b/src/devices/bus/vidbrain/std.cpp @@ -51,11 +51,7 @@ uint8_t videobrain_standard_cartridge_device::videobrain_bo_r(offs_t offset, int { uint8_t data = 0; - if (!cs1) - { - data = m_rom[offset & m_rom_mask]; - } - else if (!cs2) + if (!cs1 || !cs2) { data = m_rom[offset & m_rom_mask]; } diff --git a/src/mame/misc/flower.cpp b/src/mame/misc/flower.cpp index 836d16c29df..b08dc6d9955 100644 --- a/src/mame/misc/flower.cpp +++ b/src/mame/misc/flower.cpp @@ -132,7 +132,6 @@ private: void txvram_w(offs_t offset, u8 data); void master_irq_ack_w(int state); void slave_irq_ack_w(int state); - void vblank_irq_w(int state); TILE_GET_INFO_MEMBER(get_tx_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -501,15 +500,6 @@ void flower_state::slave_irq_ack_w(int state) m_slavecpu->set_input_line(0, CLEAR_LINE); } -void flower_state::vblank_irq_w(int state) -{ - if (state) - { - m_mastercpu->set_input_line(0, ASSERT_LINE); - m_slavecpu->set_input_line(0, ASSERT_LINE); - } -} - void flower_state::flower(machine_config &config) { @@ -537,7 +527,8 @@ void flower_state::flower(machine_config &config) m_screen->set_screen_update(FUNC(flower_state::screen_update)); m_screen->set_raw(MASTER_CLOCK / 3, 384, 0, 288, 264, 16, 240); // derived from Galaxian HW, 60.606060 m_screen->set_palette(m_palette); - m_screen->screen_vblank().set(FUNC(flower_state::vblank_irq_w)); + m_screen->screen_vblank().set_inputline(m_mastercpu, 0, ASSERT_LINE); + m_screen->screen_vblank().append_inputline(m_slavecpu, 0, ASSERT_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_flower); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); diff --git a/src/mame/shared/exidysound.cpp b/src/mame/shared/exidysound.cpp index 4da8429363d..35464fd5248 100644 --- a/src/mame/shared/exidysound.cpp +++ b/src/mame/shared/exidysound.cpp @@ -464,7 +464,8 @@ uint8_t exidy_sound_device::sh6840_r(offs_t offset) // offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB case 2: case 4: case 6: - m_sh6840_LSB_latch = m_sh6840_timer[((offset>>1)-1)].counter.b.l; + if (!machine().side_effects_disabled()) + m_sh6840_LSB_latch = m_sh6840_timer[((offset>>1)-1)].counter.b.l; return m_sh6840_timer[((offset>>1)-1)].counter.b.h; // offsets 3,5,7 read the LSB latch diff --git a/src/mame/vidbrain/uv201.cpp b/src/mame/vidbrain/uv201.cpp index c8e987a99a6..977faf7fcac 100644 --- a/src/mame/vidbrain/uv201.cpp +++ b/src/mame/vidbrain/uv201.cpp @@ -9,7 +9,7 @@ #include "emu.h" #include "uv201.h" -#define VERBOSE (1) +//#define VERBOSE (LOG_GENERAL) #include "logmacro.h" //************************************************************************** @@ -333,6 +333,7 @@ uint8_t uv201_device::read(offs_t offset) data = m_ram[offset]; else LOG("Unknown VLSI read from %02x!\n", offset); + break; } return data; @@ -437,6 +438,7 @@ void uv201_device::write(offs_t offset, uint8_t data) m_ram[offset] = data; else logerror("Unknown VLSI write %02x to %02x!\n", data, offset); + break; } } diff --git a/src/mame/vidbrain/vidbrain.cpp b/src/mame/vidbrain/vidbrain.cpp index 6f37a0dc29f..291e281161d 100644 --- a/src/mame/vidbrain/vidbrain.cpp +++ b/src/mame/vidbrain/vidbrain.cpp @@ -17,8 +17,7 @@ /* - TODO: - +TODO: - wait states (UV201: 2.9us, memory except RES1: 1.65us) - interlaced video? - pinball background colors @@ -28,7 +27,6 @@ - video interrupts - R-2R ladder DAC - reset on cartridge unload - - use machine/f3853.h - joystick scan timer 555 - expander 1 (F3870 CPU, cassette, RS-232) - expander 2 (modem) @@ -59,13 +57,8 @@ Using the system: #include "vidbrain.lh" - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define LOG 1 +//#define VERBOSE (LOG_GENERAL) +#include "logmacro.h" @@ -94,7 +87,7 @@ void vidbrain_state::keyboard_w(uint8_t data) */ - if (LOG) logerror("Keyboard %02x\n", data); + LOG("Keyboard %02x\n", data); m_keylatch = data; } @@ -155,7 +148,7 @@ void vidbrain_state::sound_w(uint8_t data) */ - if (LOG) logerror("Sound %02x\n", data); + LOG("Sound %02x\n", data); // sound clock int sound_clk = BIT(data, 4); @@ -168,7 +161,7 @@ void vidbrain_state::sound_w(uint8_t data) m_sound_clk = sound_clk; // joystick enable - m_joy_enable = BIT(data, 7); + m_joy_enable = !BIT(data, 7); } @@ -202,7 +195,7 @@ void vidbrain_state::vidbrain_io(address_map &map) { map(0x00, 0x00).w(FUNC(vidbrain_state::keyboard_w)); map(0x01, 0x01).rw(FUNC(vidbrain_state::keyboard_r), FUNC(vidbrain_state::sound_w)); - map(0x0c, 0x0f).rw(F3853_TAG, FUNC(f3853_device::read), FUNC(f3853_device::write)); + map(0x0c, 0x0f).rw(m_smi, FUNC(f3853_device::read), FUNC(f3853_device::write)); } @@ -217,7 +210,7 @@ void vidbrain_state::vidbrain_io(address_map &map) INPUT_CHANGED_MEMBER( vidbrain_state::trigger_reset ) { - m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); } @@ -320,28 +313,20 @@ INPUT_PORTS_END // DEVICE CONFIGURATION //************************************************************************** -void vidbrain_state::ext_int_w(int state) -{ - if (state) - { - m_smi->ext_int_w(1); - } -} - void vidbrain_state::hblank_w(int state) { if (state && m_joy_enable) { uint8_t joydata = 0; - if (!BIT(m_keylatch, 0)) joydata = m_joy1_x->read(); - if (!BIT(m_keylatch, 1)) joydata = m_joy1_y->read(); - if (!BIT(m_keylatch, 2)) joydata = m_joy2_x->read(); - if (!BIT(m_keylatch, 3)) joydata = m_joy2_y->read(); - if (!BIT(m_keylatch, 4)) joydata = m_joy3_x->read(); - if (!BIT(m_keylatch, 5)) joydata = m_joy3_y->read(); - if (!BIT(m_keylatch, 6)) joydata = m_joy4_x->read(); - if (!BIT(m_keylatch, 7)) joydata = m_joy4_y->read(); + if (BIT(m_keylatch, 0)) joydata |= m_joy1_x->read(); + if (BIT(m_keylatch, 1)) joydata |= m_joy1_y->read(); + if (BIT(m_keylatch, 2)) joydata |= m_joy2_x->read(); + if (BIT(m_keylatch, 3)) joydata |= m_joy2_y->read(); + if (BIT(m_keylatch, 4)) joydata |= m_joy3_x->read(); + if (BIT(m_keylatch, 5)) joydata |= m_joy3_y->read(); + if (BIT(m_keylatch, 6)) joydata |= m_joy4_x->read(); + if (BIT(m_keylatch, 7)) joydata |= m_joy4_y->read(); // NE555 in monostable mode // R = 3K9 + 100K linear pot @@ -372,7 +357,6 @@ uint8_t vidbrain_state::memory_read_byte(offs_t offset) TIMER_CALLBACK_MEMBER(vidbrain_state::joystick_tick) { m_uv->ext_int_w(0); - m_smi->ext_int_w(0); } @@ -411,7 +395,7 @@ void vidbrain_state::vidbrain(machine_config &config) F8(config, m_maincpu, XTAL(4'000'000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &vidbrain_state::vidbrain_mem); m_maincpu->set_addrmap(AS_IO, &vidbrain_state::vidbrain_io); - m_maincpu->set_irq_acknowledge_callback(F3853_TAG, FUNC(f3853_device::int_acknowledge)); + m_maincpu->set_irq_acknowledge_callback(m_smi, FUNC(f3853_device::int_acknowledge)); // video hardware config.set_default_layout(layout_vidbrain); @@ -421,13 +405,13 @@ void vidbrain_state::vidbrain(machine_config &config) screen.set_raw(3636363, 232, 18, 232, 262, 21, 262); UV201(config, m_uv, 3636363); m_uv->set_screen(SCREEN_TAG); - m_uv->ext_int_wr_callback().set(FUNC(vidbrain_state::ext_int_w)); + m_uv->ext_int_wr_callback().set(m_smi, FUNC(f3853_device::ext_int_w)); m_uv->hblank_wr_callback().set(FUNC(vidbrain_state::hblank_w)); m_uv->db_rd_callback().set(FUNC(vidbrain_state::memory_read_byte)); // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.167); // 74ls74.u16 + 120k + 56k + DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // 74ls74.u16 + 120k + 56k // devices F3853(config, m_smi, XTAL(4'000'000)/2); @@ -455,7 +439,7 @@ void vidbrain_state::vidbrain(machine_config &config) ROM_START( vidbrain ) ROM_REGION( 0x800, "res1", 0 ) - ROM_LOAD( "uvres 1n.d67", 0x000, 0x800, CRC(065fe7c2) SHA1(9776f9b18cd4d7142e58eff45ac5ee4bc1fa5a2a) ) + ROM_LOAD( "uvres_1n.d67", 0x000, 0x800, CRC(065fe7c2) SHA1(9776f9b18cd4d7142e58eff45ac5ee4bc1fa5a2a) ) ROM_REGION( 0x800, "res2", 0 ) ROM_LOAD( "resn2.e5", 0x000, 0x800, CRC(1d85d7be) SHA1(26c5a25d1289dedf107fa43aa8dfc14692fd9ee6) ) diff --git a/src/mame/vidbrain/vidbrain.h b/src/mame/vidbrain/vidbrain.h index 012e3053587..0fffbe9402e 100644 --- a/src/mame/vidbrain/vidbrain.h +++ b/src/mame/vidbrain/vidbrain.h @@ -59,7 +59,6 @@ private: uint8_t keyboard_r(); void sound_w(uint8_t data); - void ext_int_w(int state); void hblank_w(int state); uint8_t memory_read_byte(offs_t offset); @@ -82,7 +81,7 @@ private: // keyboard state uint8_t m_keylatch = 0; - int m_joy_enable = 0; + bool m_joy_enable = 0; // sound state int m_sound_clk = 0; -- cgit v1.2.3