From 706d696106215e72bd5efa60ca7345d57276f4ca Mon Sep 17 00:00:00 2001 From: James Wallace Date: Wed, 26 Nov 2025 20:12:26 +0000 Subject: [PATCH 1/5] New systems marked not working ------------------------------ Telly Addicts (New Series) (Bellfruit) (Cobra 3) [James Wallace, blueonesarefaster] bfm_cobra3.cpp - hook up revised CD dumps and non-MPEG graphics hardware [James Wallace, blueonesarefaster] --- src/mame/bfm/bfm_cobra3.cpp | 592 ++++++++++++++++++++++++++++++++++++ src/mame/bfm/bfm_swp.cpp | 303 ------------------ src/mame/mame.lst | 3 +- 3 files changed, 594 insertions(+), 304 deletions(-) create mode 100644 src/mame/bfm/bfm_cobra3.cpp delete mode 100644 src/mame/bfm/bfm_swp.cpp diff --git a/src/mame/bfm/bfm_cobra3.cpp b/src/mame/bfm/bfm_cobra3.cpp new file mode 100644 index 0000000000000..825e3ec76eaf6 --- /dev/null +++ b/src/mame/bfm/bfm_cobra3.cpp @@ -0,0 +1,592 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/* Bellfruit SWP (Skill With Prizes) Video hardware + aka Cobra 3 + +*/ + +/* Radio Times readme #1 +--------------------------------------------- + +Music TR9C1710 (Video RAMDAC) + +Part number : STV8438CV + Manufacture : ST Microelectronics +Specification(s) + Description : 8-Bit Triple DAC with Analog Switch + Package : PQFP44 + +MC68340 : Integrated Processor with DMA + The MC68340 is a high-performance 32-bit integrated processor with direct memory access (DMA), combining an enhanced M68000-compatible processor, 32-bit DMA, and other peripheral subsystems on a single integrated circuit. The MC68340 CPU32 delivers 32-bit CISC processor performance from a lower cost 16-bit memory system. The combination of peripherals offered in the MC68340 can be found in a diverse range of microprocessor-based systems. Systems requiring very high-speed block transfers of data can benefit from the MC68340. + + Block Diagram + + +MC68340 Features +CPU32 Core +Two-Channel DMA Controller +DUART Compatible with 68681 +Two 16-Bit Timer/Counters +Four Chip Selects +System Integration +32 Address Lines, 16 Data Lines +Low Power Management +4.8 MIPS @ 25 MHz +Available in 16 and 25 MHz +Available in 3.3 and 5V + + +l5380 -scsi controller + +ymz280b - in MAME - sound chip + +audio board + +75585116 - PALCE 16V8H +75585118 - PALCE 16V8H + +TI introduce the TMS320AV110 MPEG audio decoder based on TI's 16 bits + +roms (RadioTimes) + +game 95 400 009 type swp left ver. radt 1.1 - ST 27C4001 +game 95 400 010 type swp right ver. radt 1.1 - ST 27C4001 +95 004 056 sound left - ST 27C4001 +95 004 057 sound right - AM 27C040 + +cd + +version 95-100-302 +*/ + + + +#include "emu.h" +#include "bus/nscsi/cd.h" +#include "machine/68340.h" +#include "machine/meters.h" +#include "machine/ncr5380.h" +#include "machine/nscsi_bus.h" +#include "machine/nvram.h" +#include "video/ramdac.h" +#include "machine/scc66470.h" +#include "sound/ymz280b.h" +#include "screen.h" +#include "speaker.h" + + +namespace { + +class bfm_cobra3_state : public driver_device +{ +public: + bfm_cobra3_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_cpuregion(*this, "maincpu"), + m_nvram(*this, "nvram"), + m_ymz(*this, "ymz280b"), + m_palette(*this, "palette"), + m_ramdac(*this, "ramdac"), + m_scc66470(*this, "scc66470"), + // m_strobein(*this, "STROBE%u", 0), + m_meters(*this, "meters"), + m_lamps(*this, "lamp%u", 0U), + m_scsibus(*this, "scsi"), + m_scsic(*this, "scsi:6:ncr5380") + { } + + std::unique_ptr m_mainram; + + uint16_t bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask = ~0); + void bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void bfm_cobra3(machine_config &config); + void ramdac_map(address_map &map); + void bfm_cobra3_map(address_map &map) ATTR_COLD; +protected: + + // devices + required_device m_maincpu; + required_region_ptr m_cpuregion; + required_device m_nvram; + required_device m_ymz; + required_device m_palette; + required_device m_ramdac; + required_device m_scc66470; + // required_ioport_array<4> m_strobein; + optional_device m_meters; + output_finder<256> m_lamps; + required_device m_scsibus; + required_device m_scsic; + + + virtual void machine_start() override ATTR_COLD; + static void scsi_devices(device_slot_interface &device); + void dma1_drq(int state); + void scc66470_map(address_map &map); + void scc66470_irq(int state); + +}; + +uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) +{ + int pc = m_maincpu->pc(); + int cs = m_maincpu->get_cs(offset * 2); + + switch ( cs ) + { + case 1: //ROM + return m_cpuregion[offset & 0x7ffff]; + case 2://RAM + return m_mainram[offset & 0x1fff]; + + case 3: //I/O 00ac0000-00ac07ff + { + offset &= 0x7ff; + offs_t cs_addr_8_11 = (offset * 2) & 0xf00; + + switch(cs_addr_8_11) + { + case 0x300: //ac0300 + if(ACCESSING_BITS_0_7) + { + return m_ymz->read(offset & 1); + } + break; + + case 0x400: + //input reads + break; + + case 0x500: //SCSI DMA + if(ACCESSING_BITS_8_15) + { + return m_scsic->dma_r() << 8; + } + break; + + case 0x600: //Looks like the RAMDAC hookup + if(ACCESSING_BITS_0_7) + { + if((offset & 7) == 1) + { + return m_ramdac->pal_r(); + } + } + break; + + default: + logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); + break; + } + } + break; + + case 4: //0x00b10000 SCSI controller + if(ACCESSING_BITS_8_15) + { + return(m_scsic->read(offset & 0x0f)<<8); + } + break; + + default: + logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); + } + + return 0x0000; +} + +void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + int pc = m_maincpu->pc(); + int cs = m_maincpu->get_cs(offset * 2); + + switch (cs) + { + case 1://ROM, shouldn't write here? + logerror("%08x maincpu write access(1) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + break; + + case 2://RAM + COMBINE_DATA(&m_mainram[offset & 0x1fff]); + break; + + case 3: //00ac0000-00ac07ff I/O + { + offset &= 0x7ff; + offs_t cs_addr_8_11 = (offset * 2) & 0xf00; + + switch(cs_addr_8_11) + { + case 0x000: + // lamps0_15_w(data); + break; + + case 0x100: + if(ACCESSING_BITS_8_15) + { + //coin lockout and optional vfd + } + break; + + case 0x200: + //volume, watchdog and other stuff ? + break; + + case 0x300: + if(ACCESSING_BITS_0_7) + { + m_ymz->write(offset & 1, data); + } + break; + + case 0x500://SCSI DMA + if(ACCESSING_BITS_8_15) + { + m_scsic->dma_w(data >> 8); + } + break; + + case 0x700: + if(ACCESSING_BITS_0_7) + { + offset &= 7; + if(offset == 0) + { + m_ramdac->index_w(data); + } + else if(offset == 1) + { + m_ramdac->pal_w(data); + } + else if(offset == 2) + { + m_ramdac->mask_w(data); + } + else if(offset == 3) + { + m_ramdac->index_r_w(data); + } + } + break; + + default: + // coin divert, hoppers, note validator + logerror("%08x maincpu write access(3) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + break; + } + } + break; + + case 4: //0x00b10000 SCSI controller + offset &= 0x0f; + if(ACCESSING_BITS_8_15) + { + m_scsic->write(offset, data >> 8); + } + break; + + default: + logerror("%08x maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + break; + } +} + + +void bfm_cobra3_state::bfm_cobra3_map(address_map &map) +{ + map(0x00000000, 0xffffffff).rw(FUNC(bfm_cobra3_state::bfm_cobra3_mem_r), FUNC(bfm_cobra3_state::bfm_cobra3_mem_w)); + map(0x00800000, 0x009fffff).m(m_scc66470, FUNC(scc66470_device::map)).cswidth(16); +} + +void bfm_cobra3_state::ramdac_map(address_map &map) +{ + map(0x000, 0x3ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w)); +} + +void bfm_cobra3_state::scc66470_map(address_map &map) +{ + map(0x00000, 0x7ffff).ram(); +} + +static INPUT_PORTS_START( bfm_cobra3 ) + //TODO: Fix inputs + PORT_START("STROBE0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(3) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(3) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_IMPULSE(3) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN5 ) PORT_IMPULSE(3) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Green Test") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Red Test") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START("STROBE1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START("STROBE2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) // collect? + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON6 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON7 ) + + PORT_START("STROBE3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON8 ) // service? + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON9 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON10 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON11 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON12 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON13 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON14 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON15 ) + +INPUT_PORTS_END + + +void bfm_cobra3_state::machine_start() +{ + m_mainram = make_unique_clear((1024 * 16) / 2); + m_nvram->set_base(m_mainram.get(), 1024 * 16); +} + + +static void cobra_scsi_devices(device_slot_interface &device) +{ + device.option_add("cdrom", NSCSI_CDROM); + device.option_add_internal("ncr53c80", NCR53C80); +} + +void bfm_cobra3_state::dma1_drq(int state) +{ + //? Can't see this +} + +void bfm_cobra3_state::scc66470_irq(int state) +{ + m_maincpu->set_input_line(5, !state); +} + +uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + if(m_scc66470->display_enabled()) + { + if(cliprect.min_y == cliprect.max_y) + { + uint32_t *dest; + uint8_t *src; + uint8_t buffer[768]; + + dest = &bitmap.pix(cliprect.min_y); + + m_scc66470->line(cliprect.min_y, buffer, sizeof(buffer)); + + src = buffer; + + if(*src == 254) + { + // Other implementation suggests MPEG border colour here to ease blending + src += 32; + } + else + { + dest = std::fill_n(dest, 32, m_palette->pen(*src)); + src += 32; + } + + /* mpeg video has significant overscan, 4 lines either side. + + Just crop it out to fit, presume the chip does this IRL */ + + for(int x = 0 ; x < 352 ; x++) + { + if(*src == 254) + { + *dest++ = 0; //Will allow MPEG to be drawn i.e. transparent + src++; + } + else + { + *dest++ = m_palette->pen(*src++); + } + + if(*src == 254) + { + *dest++ = 0; // this should be mpeg video pixel - 0 = transparent + src++; + } + else + { + *dest++ = m_palette->pen(*src++); + } + } + if(*src == 254) + { + // finally 32 pixels of mpeg border colour when it's mixed + } + else + { + std::fill_n(dest, 32, m_palette->pen(*src)); + } + } + } + return 0; +} + + +void bfm_cobra3_state::bfm_cobra3(machine_config &config) +{ + /* basic machine hardware */ + M68340(config, m_maincpu, 16000000); + m_maincpu->set_addrmap(AS_PROGRAM, &bfm_cobra3_state::bfm_cobra3_map); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(15000000, 960, 0, 768, 312, 32, 312); + screen.set_video_attributes(VIDEO_UPDATE_SCANLINE); + screen.set_screen_update(FUNC(bfm_cobra3_state::screen_update)); + + PALETTE(config, m_palette).set_entries(256); + + RAMDAC(config, m_ramdac, 0, m_palette); + m_ramdac->set_addrmap(0, &bfm_cobra3_state::ramdac_map); // MUSIC Semiconductor TR9C1710 RAMDAC + m_ramdac->set_split_read(1); + + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + YMZ280B(config, m_ymz, 16.9344_MHz_XTAL); + m_ymz->add_route(0, "lspeaker", 1.0); + m_ymz->add_route(1, "rspeaker", 1.0); + + SCC66470(config,m_scc66470,30000000); + m_scc66470->set_addrmap(0, &bfm_cobra3_state::scc66470_map); + m_scc66470->set_screen("screen"); + m_scc66470->irq().set(FUNC(bfm_cobra3_state::scc66470_irq)); + + NSCSI_BUS(config, m_scsibus); + + NSCSI_CONNECTOR(config, "scsi:2", cobra_scsi_devices, "cdrom"); + NSCSI_CONNECTOR(config, "scsi:6").option_set("ncr5380", NCR5380).machine_config( + [this] (device_t *device) + { + ncr53c80_device &adapter = downcast(*device); + adapter.drq_handler().set(*this, FUNC(bfm_cobra3_state::dma1_drq)); + }); +} + +ROM_START( c3_rtime ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "95400009.bin", 0x00001, 0x080000, CRC(a5e0a5ca) SHA1(e7063ddfb436152f15267fde2aa7695c8a262191) ) + ROM_LOAD16_BYTE( "95400010.bin", 0x00000, 0x080000, CRC(03fd5f72) SHA1(379cfc4ef5087f24989bc1f2246b6056e33fd472) ) + + ROM_REGION( 0x100000, "altrevs", 0 ) + ROM_LOAD16_BYTE( "95400063.lhs", 0x00001, 0x080000, CRC(eecb5f3b) SHA1(a1c6ad61a65c5361c38aaae2a064983a978c45ea) ) + ROM_LOAD16_BYTE( "95400064.rhs", 0x00000, 0x080000, CRC(251689f5) SHA1(4589a409c6b0f2869f99a08df8d76223e54d5b3c) ) + ROM_LOAD16_BYTE( "95401063.lhs", 0x00001, 0x080000, CRC(ea98c159) SHA1(6f665d80b71af57b31194fdc981707822e62053e) ) + ROM_LOAD16_BYTE( "95401064.rhs", 0x00000, 0x080000, CRC(bc125897) SHA1(a83fdb54349d3ea5d183754bf4b9fee1f0b73be3) ) + ROM_LOAD16_BYTE( "radtimes.lhs", 0x00001, 0x080000, CRC(c6574297) SHA1(bd9744c4b08f9ae35fe1523ebcd68c52a36a32e0) ) + ROM_LOAD16_BYTE( "radtimes.rhs", 0x00000, 0x080000, CRC(ed2c24f0) SHA1(5f06b2de7e2b2dccee7763ea0938849d67256ff2) ) + ROM_LOAD16_BYTE( "rt017.lhs", 0x00001, 0x080000, CRC(d2272c39) SHA1(f583fe39c153dca2e86e875ca39056a8756e0d2c) ) + ROM_LOAD16_BYTE( "rt018.rhs", 0x00000, 0x080000, CRC(52999d03) SHA1(21d1e9034a26f6f73109e9e83272dcff104993e5) ) + ROM_LOAD16_BYTE( "rtimesp1", 0x00001, 0x080000, CRC(f856d377) SHA1(a9fac7e2188bbd087f70c1c00cbf790bc52d573b) ) + ROM_LOAD16_BYTE( "rtimesp2", 0x00000, 0x080000, CRC(130d0864) SHA1(034d6c4fdec3acd4329d16315aeac43b1f1a5e91) ) + + ROM_REGION( 0x1000000, "ymz280b", 0 ) + ROM_LOAD( "95004056.bin", 0x000000, 0x080000, CRC(24e8f9fb) SHA1(0d484a8f368b0f2140f148a1dc84db85a100af38) ) + ROM_LOAD( "95004057.bin", 0x080000, 0x080000, CRC(f73c92d6) SHA1(08c7db2baccb703f99efb81f618719a7789ca564) ) + + DISK_REGION("scsi:2:cdrom") + DISK_IMAGE_READONLY( "95100302", 0, SHA1(20accfe236a0c85108cd2a205399ed8959f1a638) ) +ROM_END + +ROM_START( c3_telly ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "95400021.p1", 0x00001, 0x080000, CRC(5c969746) SHA1(7458c613d7a3e7cf6a21e55f74dcdc052404f29c) ) + ROM_LOAD16_BYTE( "95400022.p2", 0x00000, 0x080000, CRC(fa1fdb7b) SHA1(eff87c197a62dba49d95810e8669026db2edb187) ) + + ROM_REGION( 0x100000, "altrevs", 0 ) + ROM_LOAD16_BYTE( "95401021.p1", 0x00001, 0x080000, CRC(24a334d3) SHA1(672f16cbd2ddf627213de71024b6fbaa28f526a5) ) + ROM_LOAD16_BYTE( "95401022.p2", 0x00000, 0x080000, CRC(90af3767) SHA1(e529ad7eef5e6d2a6951d46e77aaad2087890445) ) + ROM_LOAD16_BYTE( "tadd13lh", 0x00001, 0x080000, CRC(2d6ed08c) SHA1(efa39b9ff5605c2e29971fb5e874c9a0c178b1f0) ) + ROM_LOAD16_BYTE( "tadd14rh", 0x00000, 0x080000, CRC(26dd6ed6) SHA1(553f29017494b6f7ecc98940d527f498316ea55e) ) + ROM_LOAD16_BYTE( "telad.tl", 0x00001, 0x080000, CRC(e6906027) SHA1(20ca64417ea3795dc26adfea717cb3d724019c34) ) + ROM_LOAD16_BYTE( "telad.tr", 0x00000, 0x080000, CRC(38dbee05) SHA1(ee33cdaa7f817beb49a3cff49a5493a50d8d4504) ) + ROM_LOAD16_BYTE( "tasndl", 0x00001, 0x080000, CRC(3f0b9d2b) SHA1(6db3451c26a3e673204c316403e0bb7127191a1f) ) + ROM_LOAD16_BYTE( "tasndr", 0x00000, 0x080000, CRC(2dd9ebcf) SHA1(4d118d37e18266f82fb2acb37f5fd106e0f25a1f) ) + + ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) + ROM_LOAD( "telsndl", 0x0000, 0x080000, CRC(74996fbd) SHA1(90e46130dccf47be1fcfaf549e548cdd4883e59d) ) + + DISK_REGION("scsi:2:cdrom") + DISK_IMAGE_READONLY( "95100300", 0, SHA1(98905cbff24c576c58210d1d003f710fa7064762) ) +ROM_END + + +ROM_START( c3_tellyns ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "95400023.lhs", 0x00001, 0x080000, CRC(b79279b8) SHA1(010edf0c299b0b01ab43f52dce540ff0847fb4c5) ) + ROM_LOAD16_BYTE( "95400024.rhs", 0x00000, 0x080000, CRC(835d25fd) SHA1(6d780332f6016d6e1404922e0ac439a499211be3) ) + + ROM_REGION( 0x100000, "altrevs", 0 ) + ROM_LOAD16_BYTE( "95401023.lhs", 0x00001, 0x080000, CRC(85b95b56) SHA1(106e617fc92f95a6b3769db1fd4e5ab47c752c08) ) + ROM_LOAD16_BYTE( "95401024.rhs", 0x00000, 0x080000, CRC(835d25fd) SHA1(6d780332f6016d6e1404922e0ac439a499211be3) ) + + ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) + ROM_LOAD( "telsndl", 0x0000, 0x080000, CRC(74996fbd) SHA1(90e46130dccf47be1fcfaf549e548cdd4883e59d) ) + + DISK_REGION("scsi:2:cdrom") + DISK_IMAGE_READONLY( "95100301", 0, SHA1(dbce040a6fb7916a240d24e2207cf6e1b3f572e7) ) +ROM_END + +ROM_START( c3_totp ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "95400101.lo", 0x00001, 0x080000, CRC(c95164c7) SHA1(7b2fada6a3208666219a53cba08f7acad015763d) ) + ROM_LOAD16_BYTE( "95400102.hi", 0x00000, 0x080000, CRC(5ebba159) SHA1(34bcf48140261cd87d81a32581e965d722f42f71) ) + + ROM_REGION( 0x100000, "altrevs", 0 ) + ROM_LOAD16_BYTE( "95401101.lo", 0x00001, 0x080000, CRC(97d2d90a) SHA1(d4a2afd3cc551986e76f107beb66e8c660a6ee1d) ) + ROM_LOAD16_BYTE( "95401102.hi", 0x00000, 0x080000, CRC(3599427f) SHA1(16d915553b2b490a047888c64ebcf952714b3168) ) + + ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) + ROM_LOAD( "totpsnd.lhs", 0x000000, 0x080000, CRC(56a73136) SHA1(10656ede18de9432a8a728cc59d000b5b1bf0150) ) + ROM_LOAD( "totpsnd.rhs", 0x080000, 0x080000, CRC(28d156ab) SHA1(ebf5c4e008015b9b56b3aa5228c05b8e298daa80) ) + + DISK_REGION("scsi:2:cdrom") + DISK_IMAGE_READONLY( "95100307", 0, SHA1(27ad1565f9a153fe71b72d9c597a6e3c3f13ded0) ) +ROM_END + +ROM_START( c3_ppays ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "95400687.hi", 0x00000, 0x080000, CRC(56080e1c) SHA1(49391059b5a758690d4972abad04d7e7aef23423) ) + ROM_LOAD16_BYTE( "95400687.lo", 0x00001, 0x080000, CRC(8b2c9c3d) SHA1(921c900447870f6ae51a4f3baeb60ce94e732291) ) + + ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) + ROM_LOAD( "phrasesn.l", 0x0000, 0x080000, CRC(a436ccf8) SHA1(18c39aa2e68c32242e0de1347b25d4af44b84548) ) + + DISK_REGION("scsi:2:cdrom") + DISK_IMAGE_READONLY( "95100315", 0, SHA1(fc76d3ab5ff38c2dc4f06399f5399a1ae3c136e9) ) +ROM_END + +} // anonymous namespace + + +GAME( 1995, c3_telly, 0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Telly Addicts (Bellfruit) (Cobra 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) +GAME( 1995, c3_tellyns,0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Telly Addicts (New Series) (Bellfruit) (Cobra 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) +GAME( 1996, c3_rtime, 0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Radio Times (Bellfruit) (Cobra 3)", MACHINE_IMPERFECT_GRAPHICS| MACHINE_NOT_WORKING ) +GAME( 1997, c3_totp, 0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Top of the Pops (Bellfruit) (Cobra 3?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) +GAME( 1998, c3_ppays, 0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "The Phrase That Pays (Bellfruit) (Cobra 3?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) diff --git a/src/mame/bfm/bfm_swp.cpp b/src/mame/bfm/bfm_swp.cpp deleted file mode 100644 index 89f7988c1c9cc..0000000000000 --- a/src/mame/bfm/bfm_swp.cpp +++ /dev/null @@ -1,303 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:David Haywood -/* Bellfruit SWP (Skill With Prizes) Video hardware - aka Cobra 3 - -*/ - -/* Radio Times readme #1 ---------------------------------------------- - -Music TR9C1710 (Video RAMDAC) - -Part number : STV8438CV - Manufacture : ST Microelectronics -Specification(s) - Description : 8-Bit Triple DAC with Analog Switch - Package : PQFP44 - -MC68340 : Integrated Processor with DMA - The MC68340 is a high-performance 32-bit integrated processor with direct memory access (DMA), combining an enhanced M68000-compatible processor, 32-bit DMA, and other peripheral subsystems on a single integrated circuit. The MC68340 CPU32 delivers 32-bit CISC processor performance from a lower cost 16-bit memory system. The combination of peripherals offered in the MC68340 can be found in a diverse range of microprocessor-based systems. Systems requiring very high-speed block transfers of data can benefit from the MC68340. - - - Block Diagram - - -MC68340 Features -CPU32 Core -Two-Channel DMA Controller -DUART Compatible with 68681 -Two 16-Bit Timer/Counters -Four Chip Selects -System Integration -32 Address Lines, 16 Data Lines -Low Power Management -4.8 MIPS @ 25 MHz -Available in 16 and 25 MHz -Available in 3.3 and 5V - - -l5380 -scsi controller - -ymz280b - in MAME - sound chip - -audio board - -75585116 - PALCE 16V8H -75585118 - PALCE 16V8H - -TI introduce the TMS320AV110 MPEG audio decoder based on TI's 16 bits -DSPs (about $14). - -roms - -game 95 400 009 type swp left ver. radt 1.1 - ST 27C4001 -game 95 400 010 type swp right ver. radt 1.1 - ST 27C4001 -95 004 056 sound left - ST 27C4001 -95 004 057 sound right - AM 27C040 - -cd - -version 95-100-302 -*/ - -/* Radio Times readme #2 ---------------------------------------------- - -Board -Difficult to make things out on this one, but the SCSI socket is clear to see - this is where the CDROM drive hooks in - -CPU -Again, a 68k processor - -DSP - Cobra 3 - -Just a board to decode the audio from the CD video. no ROM's feed it. - -GLUE - No idea - -Just some logic to sync audio with video with realtime graphics? - Clearly something is needed, as three separate boards are used to process this. - -Music - video RAMDAC - have nothing extra to add, this clearly plays the video portion. - -SCSI controller - just like in any PC - -Sound - -All related to the Yamaha YMZ280B-F, a very good music/PCM chip, probably not used to full potential here. - -CD-ROM - I'm prepared to put money on Telly Addicts and TOTP being like this, with some minor alterations. - -Ordinary ISO standard CDROM with 2048 byte sectors. Can be read on a PC to give MPEG-1 video files (.mpg) at 352x288 pixel resolution, which would probably expand to full screen - some have their own soundtracks, others subtitles. The frame rate of the video is 25fps, and the audio (where available) is 44KHz Stereo, 128Kbps MPEG Layer II (Which is not supported by Sellenoff's Capcom sound driver). Some graphics are stored encoded as .gfx files, whereas clip list data is either stored as an .stl file (listing 'number of clips' and clip name) or in .clp files (same, but larger - different round?) - -Final.lis is a list of the questions asked in the end game, where players are asked to match the programme to the channel it is broadcasted on (Very easy to decode, listed in numerical order of channel as channel (space) programme name (not alphabetical, but accessed at random - end marker is blank line, Channel '5' is radio, since there was no Five TV in those days.) (Why am I telling you this - it's practically an emptier.) - -Questions are listed by clip, in .QQQ files, encrypted. - -.SEQ files are 'sequences' instructions to the video board, in the form of renamed .MPG files, again 352x288, MPEG-1. - -TEST.TXT - suggests the content of a prototype version, which was expanded to make this. If the volume name is to be believed I may be related to the person who compiled this (though it's a big clan, highly unlikely ;)) - -*/ - - -#include "emu.h" -#include "machine/68340.h" -#include "sound/ymz280b.h" -#include "screen.h" -#include "speaker.h" - - -namespace { - -class bfm_swp_state : public driver_device -{ -public: - bfm_swp_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cpuregion(*this, "maincpu") - { } - - std::unique_ptr m_mainram; - - uint16_t bfm_swp_mem_r(offs_t offset, uint16_t mem_mask = ~0); - void bfm_swp_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - - - uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) - { - return 0; - } - - void bfm_swp(machine_config &config); - void bfm_swp_map(address_map &map) ATTR_COLD; -protected: - - // devices - required_device m_maincpu; - required_region_ptr m_cpuregion; - - virtual void machine_start() override ATTR_COLD; -}; - -uint16_t bfm_swp_state::bfm_swp_mem_r(offs_t offset, uint16_t mem_mask) -{ - int pc = m_maincpu->pc(); - int cs = m_maincpu->get_cs(offset * 2); - - switch ( cs ) - { - case 1: - return m_cpuregion[offset & 0x7ffff]; - case 2: - return m_mainram[offset & 0x1fff]; - - default: - logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); - } - - return 0x0000; -} - -void bfm_swp_state::bfm_swp_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - int pc = m_maincpu->pc(); - int cs = m_maincpu->get_cs(offset * 2); - - switch ( cs ) - { - default: - logerror("%08x maincpu write access offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); - [[fallthrough]]; - case 2: - COMBINE_DATA(&m_mainram[offset & 0x1fff]); - } - -} - - - - -void bfm_swp_state::bfm_swp_map(address_map &map) -{ - map(0x00000000, 0xffffffff).rw(FUNC(bfm_swp_state::bfm_swp_mem_r), FUNC(bfm_swp_state::bfm_swp_mem_w)); -} - - -static INPUT_PORTS_START( bfm_swp ) -INPUT_PORTS_END - - -void bfm_swp_state::machine_start() -{ - m_mainram = make_unique_clear((1024 * 16) / 2); -} - - -void bfm_swp_state::bfm_swp(machine_config &config) -{ - /* basic machine hardware */ - M68340(config, m_maincpu, 16000000); - m_maincpu->set_addrmap(AS_PROGRAM, &bfm_swp_state::bfm_swp_map); - - - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_screen_update(FUNC(bfm_swp_state::screen_update)); - screen.set_size(64*8, 64*8); - screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1); - - SPEAKER(config, "mono").front_center(); - - YMZ280B(config, "ymz", 10000000).add_route(ALL_OUTPUTS, "mono", 1.0); -} - -ROM_START( c3_rtime ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "95400009.bin", 0x00001, 0x080000, CRC(a5e0a5ca) SHA1(e7063ddfb436152f15267fde2aa7695c8a262191) ) - ROM_LOAD16_BYTE( "95400010.bin", 0x00000, 0x080000, CRC(03fd5f72) SHA1(379cfc4ef5087f24989bc1f2246b6056e33fd472) ) - - ROM_REGION( 0x100000, "altrevs", 0 ) - ROM_LOAD16_BYTE( "95400063.lhs", 0x00001, 0x080000, CRC(eecb5f3b) SHA1(a1c6ad61a65c5361c38aaae2a064983a978c45ea) ) - ROM_LOAD16_BYTE( "95400064.rhs", 0x00000, 0x080000, CRC(251689f5) SHA1(4589a409c6b0f2869f99a08df8d76223e54d5b3c) ) - ROM_LOAD16_BYTE( "95401063.lhs", 0x00001, 0x080000, CRC(ea98c159) SHA1(6f665d80b71af57b31194fdc981707822e62053e) ) - ROM_LOAD16_BYTE( "95401064.rhs", 0x00000, 0x080000, CRC(bc125897) SHA1(a83fdb54349d3ea5d183754bf4b9fee1f0b73be3) ) - ROM_LOAD16_BYTE( "radtimes.lhs", 0x00001, 0x080000, CRC(c6574297) SHA1(bd9744c4b08f9ae35fe1523ebcd68c52a36a32e0) ) - ROM_LOAD16_BYTE( "radtimes.rhs", 0x00000, 0x080000, CRC(ed2c24f0) SHA1(5f06b2de7e2b2dccee7763ea0938849d67256ff2) ) - ROM_LOAD16_BYTE( "rt017.lhs", 0x00001, 0x080000, CRC(d2272c39) SHA1(f583fe39c153dca2e86e875ca39056a8756e0d2c) ) - ROM_LOAD16_BYTE( "rt018.rhs", 0x00000, 0x080000, CRC(52999d03) SHA1(21d1e9034a26f6f73109e9e83272dcff104993e5) ) - ROM_LOAD16_BYTE( "rtimesp1", 0x00001, 0x080000, CRC(f856d377) SHA1(a9fac7e2188bbd087f70c1c00cbf790bc52d573b) ) - ROM_LOAD16_BYTE( "rtimesp2", 0x00000, 0x080000, CRC(130d0864) SHA1(034d6c4fdec3acd4329d16315aeac43b1f1a5e91) ) - - ROM_REGION( 0x1000000, "ymz280b", 0 ) - ROM_LOAD( "95004056.bin", 0x000000, 0x080000, CRC(24e8f9fb) SHA1(0d484a8f368b0f2140f148a1dc84db85a100af38) ) - ROM_LOAD( "95004057.bin", 0x080000, 0x080000, CRC(f73c92d6) SHA1(08c7db2baccb703f99efb81f618719a7789ca564) ) - - DISK_REGION( "scsi" ) // CDROM - DISK_IMAGE_READONLY( "rtimes", 0, SHA1(20accfe236a0c85108cd2a205399ed8959f1a638) ) -ROM_END - -ROM_START( c3_telly ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "95401023.lhs", 0x00001, 0x080000, CRC(85b95b56) SHA1(106e617fc92f95a6b3769db1fd4e5ab47c752c08) ) - ROM_LOAD16_BYTE( "95401024.rhs", 0x00000, 0x080000, CRC(835d25fd) SHA1(6d780332f6016d6e1404922e0ac439a499211be3) ) - - ROM_REGION( 0x100000, "altrevs", 0 ) - ROM_LOAD16_BYTE( "95400021.p1", 0x00001, 0x080000, CRC(5c969746) SHA1(7458c613d7a3e7cf6a21e55f74dcdc052404f29c) ) - ROM_LOAD16_BYTE( "95400022.p2", 0x00000, 0x080000, CRC(fa1fdb7b) SHA1(eff87c197a62dba49d95810e8669026db2edb187) ) - ROM_LOAD16_BYTE( "95400023.lhs", 0x00001, 0x080000, CRC(b79279b8) SHA1(010edf0c299b0b01ab43f52dce540ff0847fb4c5) ) - ROM_LOAD16_BYTE( "95400024.rhs", 0x00000, 0x080000, CRC(835d25fd) SHA1(6d780332f6016d6e1404922e0ac439a499211be3) ) - ROM_LOAD16_BYTE( "95401021.p1", 0x00001, 0x080000, CRC(24a334d3) SHA1(672f16cbd2ddf627213de71024b6fbaa28f526a5) ) - ROM_LOAD16_BYTE( "95401022.p2", 0x00000, 0x080000, CRC(90af3767) SHA1(e529ad7eef5e6d2a6951d46e77aaad2087890445) ) - ROM_LOAD16_BYTE( "tadd13lh", 0x00001, 0x080000, CRC(2d6ed08c) SHA1(efa39b9ff5605c2e29971fb5e874c9a0c178b1f0) ) - ROM_LOAD16_BYTE( "tadd14rh", 0x00000, 0x080000, CRC(26dd6ed6) SHA1(553f29017494b6f7ecc98940d527f498316ea55e) ) - ROM_LOAD16_BYTE( "telad.tl", 0x00001, 0x080000, CRC(e6906027) SHA1(20ca64417ea3795dc26adfea717cb3d724019c34) ) - ROM_LOAD16_BYTE( "telad.tr", 0x00000, 0x080000, CRC(38dbee05) SHA1(ee33cdaa7f817beb49a3cff49a5493a50d8d4504) ) - ROM_LOAD16_BYTE( "tasndl", 0x00001, 0x080000, CRC(3f0b9d2b) SHA1(6db3451c26a3e673204c316403e0bb7127191a1f) ) - ROM_LOAD16_BYTE( "tasndr", 0x00000, 0x080000, CRC(2dd9ebcf) SHA1(4d118d37e18266f82fb2acb37f5fd106e0f25a1f) ) - - ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) - ROM_LOAD( "telsndl", 0x0000, 0x080000, CRC(74996fbd) SHA1(90e46130dccf47be1fcfaf549e548cdd4883e59d) ) - - DISK_REGION( "scsi" ) // HDD - DISK_IMAGE_READONLY( "telly", 0, SHA1(6675b8ed6ea47bfb89fbd10a2740e1e0a3faec54) ) -ROM_END - -ROM_START( c3_totp ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "95400101.lo", 0x00001, 0x080000, CRC(c95164c7) SHA1(7b2fada6a3208666219a53cba08f7acad015763d) ) - ROM_LOAD16_BYTE( "95400102.hi", 0x00000, 0x080000, CRC(5ebba159) SHA1(34bcf48140261cd87d81a32581e965d722f42f71) ) - - ROM_REGION( 0x100000, "altrevs", 0 ) - ROM_LOAD16_BYTE( "95401101.lo", 0x00001, 0x080000, CRC(97d2d90a) SHA1(d4a2afd3cc551986e76f107beb66e8c660a6ee1d) ) - ROM_LOAD16_BYTE( "95401102.hi", 0x00000, 0x080000, CRC(3599427f) SHA1(16d915553b2b490a047888c64ebcf952714b3168) ) - - ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) - ROM_LOAD( "totpsnd.lhs", 0x000000, 0x080000, CRC(56a73136) SHA1(10656ede18de9432a8a728cc59d000b5b1bf0150) ) - ROM_LOAD( "totpsnd.rhs", 0x080000, 0x080000, CRC(28d156ab) SHA1(ebf5c4e008015b9b56b3aa5228c05b8e298daa80) ) - - DISK_REGION( "scsi" ) // uses a CD, only one we've seen has been damaged to a point where not all data could be read tho - DISK_IMAGE_READONLY( "cd", 0, NO_DUMP ) -ROM_END - -ROM_START( c3_ppays ) - ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "95400687.hi", 0x00000, 0x080000, CRC(56080e1c) SHA1(49391059b5a758690d4972abad04d7e7aef23423) ) - ROM_LOAD16_BYTE( "95400687.lo", 0x00001, 0x080000, CRC(8b2c9c3d) SHA1(921c900447870f6ae51a4f3baeb60ce94e732291) ) - - ROM_REGION( 0x1000000, "ymz280b", ROMREGION_ERASE00 ) - ROM_LOAD( "phrasesn.l", 0x0000, 0x080000, CRC(a436ccf8) SHA1(18c39aa2e68c32242e0de1347b25d4af44b84548) ) - - DISK_REGION( "scsi" ) // CD or HDD - DISK_IMAGE_READONLY( "cd or hdd", 0, NO_DUMP ) -ROM_END - -} // anonymous namespace - - -GAME( 199?, c3_rtime, 0, bfm_swp, bfm_swp, bfm_swp_state, empty_init, ROT0, "BFM", "Radio Times (Bellfruit) (Cobra 3)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 199?, c3_telly, 0, bfm_swp, bfm_swp, bfm_swp_state, empty_init, ROT0, "BFM", "Telly Addicts (Bellfruit) (Cobra 3)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 199?, c3_totp, 0, bfm_swp, bfm_swp, bfm_swp_state, empty_init, ROT0, "BFM", "Top of the Pops (Bellfruit) (Cobra 3?)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 199?, c3_ppays, 0, bfm_swp, bfm_swp, bfm_swp_state, empty_init, ROT0, "BFM", "The Phrase That Pays (Bellfruit) (Cobra 3?)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 6869e7e7e885e..d343affe44616 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15184,10 +15184,11 @@ sc6dndema sc6dndemb sc6dndemc -@source:bfm/bfm_swp.cpp +@source:bfm/bfm_cobra3.cpp c3_ppays c3_rtime c3_telly +c3_tellyns c3_totp @source:bfm/bfmsys83.cpp From 6dc7d1c4c6eadad077433e1d32c16eff915734ea Mon Sep 17 00:00:00 2001 From: James Wallace Date: Sat, 29 Nov 2025 19:10:59 +0000 Subject: [PATCH 2/5] bfm_cobra3.cpp Cleanup (nw) --- src/mame/bfm/bfm_cobra3.cpp | 141 +++++++++++------------------------- 1 file changed, 42 insertions(+), 99 deletions(-) diff --git a/src/mame/bfm/bfm_cobra3.cpp b/src/mame/bfm/bfm_cobra3.cpp index 825e3ec76eaf6..f9ff16e553d02 100644 --- a/src/mame/bfm/bfm_cobra3.cpp +++ b/src/mame/bfm/bfm_cobra3.cpp @@ -1,62 +1,11 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:David Haywood, James Wallace, blueonesarefaster + /* Bellfruit SWP (Skill With Prizes) Video hardware aka Cobra 3 -*/ - -/* Radio Times readme #1 ---------------------------------------------- - -Music TR9C1710 (Video RAMDAC) - -Part number : STV8438CV - Manufacture : ST Microelectronics -Specification(s) - Description : 8-Bit Triple DAC with Analog Switch - Package : PQFP44 - -MC68340 : Integrated Processor with DMA - The MC68340 is a high-performance 32-bit integrated processor with direct memory access (DMA), combining an enhanced M68000-compatible processor, 32-bit DMA, and other peripheral subsystems on a single integrated circuit. The MC68340 CPU32 delivers 32-bit CISC processor performance from a lower cost 16-bit memory system. The combination of peripherals offered in the MC68340 can be found in a diverse range of microprocessor-based systems. Systems requiring very high-speed block transfers of data can benefit from the MC68340. - - Block Diagram - - -MC68340 Features -CPU32 Core -Two-Channel DMA Controller -DUART Compatible with 68681 -Two 16-Bit Timer/Counters -Four Chip Selects -System Integration -32 Address Lines, 16 Data Lines -Low Power Management -4.8 MIPS @ 25 MHz -Available in 16 and 25 MHz -Available in 3.3 and 5V - - -l5380 -scsi controller - -ymz280b - in MAME - sound chip - -audio board - -75585116 - PALCE 16V8H -75585118 - PALCE 16V8H - -TI introduce the TMS320AV110 MPEG audio decoder based on TI's 16 bits - -roms (RadioTimes) - -game 95 400 009 type swp left ver. radt 1.1 - ST 27C4001 -game 95 400 010 type swp right ver. radt 1.1 - ST 27C4001 -95 004 056 sound left - ST 27C4001 -95 004 057 sound right - AM 27C040 - -cd - -version 95-100-302 + TODO: MPEG decoding currently not implemented + Checksum fails for all games, looks like a CPU bug */ @@ -138,19 +87,19 @@ uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) switch ( cs ) { - case 1: //ROM + case 1: // ROM return m_cpuregion[offset & 0x7ffff]; - case 2://RAM + case 2:// (NV)RAM return m_mainram[offset & 0x1fff]; - case 3: //I/O 00ac0000-00ac07ff + case 3: // I/O { offset &= 0x7ff; offs_t cs_addr_8_11 = (offset * 2) & 0xf00; switch(cs_addr_8_11) { - case 0x300: //ac0300 + case 0x300: //YMZ stereo sound accesses if(ACCESSING_BITS_0_7) { return m_ymz->read(offset & 1); @@ -158,7 +107,7 @@ uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) break; case 0x400: - //input reads + //input reads, haven't got far enough to trigger any break; case 0x500: //SCSI DMA @@ -177,23 +126,23 @@ uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) } } break; - + default: - logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); + logerror("%s maincpu read access offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); break; } } break; - case 4: //0x00b10000 SCSI controller + case 4: // SCSI controller if(ACCESSING_BITS_8_15) { - return(m_scsic->read(offset & 0x0f)<<8); + return(m_scsic->read(offset & 0x0f) << 8); } break; default: - logerror("%08x maincpu read access offset %08x mem_mask %08x cs %d\n", pc, offset*4, mem_mask, cs); + logerror("%s maincpu read access offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); } return 0x0000; @@ -206,34 +155,33 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m switch (cs) { - case 1://ROM, shouldn't write here? - logerror("%08x maincpu write access(1) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + case 1:// ROM, shouldn't write here? + logerror("%sx maincpu write access(1) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); break; - - case 2://RAM + + case 2:// (NV)RAM COMBINE_DATA(&m_mainram[offset & 0x1fff]); break; - - case 3: //00ac0000-00ac07ff I/O + + case 3: // I/O { offset &= 0x7ff; offs_t cs_addr_8_11 = (offset * 2) & 0xf00; - switch(cs_addr_8_11) { case 0x000: - // lamps0_15_w(data); + // lamps; break; case 0x100: if(ACCESSING_BITS_8_15) { - //coin lockout and optional vfd + // coin lockout and optional vfd (debug only?) } break; case 0x200: - //volume, watchdog and other stuff ? + // volume, watchdog and other stuff ? That's where it would be elsewhere break; case 0x300: @@ -243,14 +191,14 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m } break; - case 0x500://SCSI DMA + case 0x500: // SCSI DMA if(ACCESSING_BITS_8_15) { m_scsic->dma_w(data >> 8); } break; - case 0x700: + case 0x700: // RAMDAC for palettes if(ACCESSING_BITS_0_7) { offset &= 7; @@ -274,21 +222,21 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m break; default: - // coin divert, hoppers, note validator - logerror("%08x maincpu write access(3) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + // coin divert, hoppers, note validator must be somewhere + logerror("%s maincpu write access(3) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); break; } } break; - - case 4: //0x00b10000 SCSI controller + + case 4: // SCSI controller offset &= 0x0f; if(ACCESSING_BITS_8_15) { m_scsic->write(offset, data >> 8); } break; - + default: logerror("%08x maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); break; @@ -313,7 +261,7 @@ void bfm_cobra3_state::scc66470_map(address_map &map) } static INPUT_PORTS_START( bfm_cobra3 ) - //TODO: Fix inputs + // TODO: Fix inputs PORT_START("STROBE0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(3) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(3) @@ -372,7 +320,7 @@ static void cobra_scsi_devices(device_slot_interface &device) void bfm_cobra3_state::dma1_drq(int state) { - //? Can't see this + // Triggers, but seems not to do anything, may be CPU bug related. } void bfm_cobra3_state::scc66470_irq(int state) @@ -386,19 +334,16 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi { if(cliprect.min_y == cliprect.max_y) { - uint32_t *dest; - uint8_t *src; + uint32_t *dest = &bitmap.pix(cliprect.min_y); uint8_t buffer[768]; - - dest = &bitmap.pix(cliprect.min_y); - + uint8_t *src = buffer; m_scc66470->line(cliprect.min_y, buffer, sizeof(buffer)); src = buffer; if(*src == 254) { - // Other implementation suggests MPEG border colour here to ease blending + // Other implementations suggest leaving transparency / MPEG border colour here to ease blending src += 32; } else @@ -406,7 +351,7 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi dest = std::fill_n(dest, 32, m_palette->pen(*src)); src += 32; } - + /* mpeg video has significant overscan, 4 lines either side. Just crop it out to fit, presume the chip does this IRL */ @@ -415,7 +360,7 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi { if(*src == 254) { - *dest++ = 0; //Will allow MPEG to be drawn i.e. transparent + *dest++ = 0; // Will allow MPEG to be drawn i.e. transparent src++; } else @@ -425,7 +370,7 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi if(*src == 254) { - *dest++ = 0; // this should be mpeg video pixel - 0 = transparent + *dest++ = 0; // This should be mpeg video pixel i.e. transparent src++; } else @@ -435,7 +380,7 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi } if(*src == 254) { - // finally 32 pixels of mpeg border colour when it's mixed + // finally 32 pixels of mpeg border colour when it's mixed in } else { @@ -449,7 +394,6 @@ uint32_t bfm_cobra3_state::screen_update(screen_device &screen, bitmap_rgb32 &bi void bfm_cobra3_state::bfm_cobra3(machine_config &config) { - /* basic machine hardware */ M68340(config, m_maincpu, 16000000); m_maincpu->set_addrmap(AS_PROGRAM, &bfm_cobra3_state::bfm_cobra3_map); @@ -462,8 +406,8 @@ void bfm_cobra3_state::bfm_cobra3(machine_config &config) PALETTE(config, m_palette).set_entries(256); - RAMDAC(config, m_ramdac, 0, m_palette); - m_ramdac->set_addrmap(0, &bfm_cobra3_state::ramdac_map); // MUSIC Semiconductor TR9C1710 RAMDAC + RAMDAC(config, m_ramdac, 0, m_palette); // MUSIC Semiconductor TR9C1710 RAMDAC + m_ramdac->set_addrmap(0, &bfm_cobra3_state::ramdac_map); m_ramdac->set_split_read(1); SPEAKER(config, "lspeaker").front_left(); @@ -582,8 +526,7 @@ ROM_START( c3_ppays ) DISK_IMAGE_READONLY( "95100315", 0, SHA1(fc76d3ab5ff38c2dc4f06399f5399a1ae3c136e9) ) ROM_END -} // anonymous namespace - +} GAME( 1995, c3_telly, 0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Telly Addicts (Bellfruit) (Cobra 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) GAME( 1995, c3_tellyns,0, bfm_cobra3, bfm_cobra3, bfm_cobra3_state, empty_init, ROT0, "BFM", "Telly Addicts (New Series) (Bellfruit) (Cobra 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) From 23d045e0cc1bcb8b7bc8f30c763f4e70dc4f0f8c Mon Sep 17 00:00:00 2001 From: James Wallace Date: Sat, 29 Nov 2025 20:06:48 +0000 Subject: [PATCH 3/5] bfm_cobra3.cpp: Missed unused variable (nw) --- src/mame/bfm/bfm_cobra3.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mame/bfm/bfm_cobra3.cpp b/src/mame/bfm/bfm_cobra3.cpp index f9ff16e553d02..6970e1ea266a5 100644 --- a/src/mame/bfm/bfm_cobra3.cpp +++ b/src/mame/bfm/bfm_cobra3.cpp @@ -82,7 +82,6 @@ class bfm_cobra3_state : public driver_device uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) { - int pc = m_maincpu->pc(); int cs = m_maincpu->get_cs(offset * 2); switch ( cs ) @@ -150,7 +149,6 @@ uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - int pc = m_maincpu->pc(); int cs = m_maincpu->get_cs(offset * 2); switch (cs) @@ -238,7 +236,7 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m break; default: - logerror("%08x maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", pc, offset*4, data, mem_mask, cs); + logerror("%s maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); break; } } From 38b2b37ab2c4bb9b654f659682e96f2f16621b06 Mon Sep 17 00:00:00 2001 From: James Wallace Date: Thu, 4 Dec 2025 20:50:57 +0000 Subject: [PATCH 4/5] 68340.cpp: Added restriction to internal base read based on manual. Fixes checksum scans in bfm_cobra3.cpp --- src/devices/machine/68340.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp index 84d0d698d6a3b..9d85095cc2c76 100644 --- a/src/devices/machine/68340.cpp +++ b/src/devices/machine/68340.cpp @@ -2,6 +2,7 @@ // copyright-holders:David Haywood /* 68340 * TODO: - convert all modules to devices + - in multiple QUICC systems running slave mode, global chip select disabled, the internal base moves to start at 3ff04 */ #include "emu.h" @@ -130,8 +131,15 @@ uint8_t m68340_cpu_device::int_ack(offs_t offset) uint16_t m68340_cpu_device::m68340_internal_base_r(offs_t offset, uint16_t mem_mask) { if (!machine().side_effects_disabled()) - LOGMASKED(LOG_BASE, "%08x m68340_internal_base_r %08x, (%08x)\n", m_ppc, offset*2,mem_mask); - return ((!BIT(offset, 0) ? (m_m68340_base >> 16): m_m68340_base)) & 0xffff; + LOGMASKED(LOG_BASE, "%08x m68340_internal_base_r %08x, (%08x) [s%08x] [d%08x]\n", m_ppc, offset*2,mem_mask, m_sfc, m_dfc); + if (m_sfc==0x7) + { + return ((!BIT(offset, 0) ? (m_m68340_base >> 16): m_m68340_base)) & 0xffff; + } + else + { + return 0; + } } void m68340_cpu_device::m68340_internal_base_w(offs_t offset, uint16_t data, uint16_t mem_mask) From 6bc9cdcde25987160bbba8125c32b3ca5d4ddbda Mon Sep 17 00:00:00 2001 From: James Wallace Date: Wed, 10 Dec 2025 19:24:09 +0000 Subject: [PATCH 5/5] 68340.cpp: fix return for out of space register access bfm_cobra3.cpp : improve logging (nw) --- src/devices/machine/68340.cpp | 6 ++--- src/mame/bfm/bfm_cobra3.cpp | 48 ++++++++++++++++++----------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp index 9d85095cc2c76..dee939e54d2a4 100644 --- a/src/devices/machine/68340.cpp +++ b/src/devices/machine/68340.cpp @@ -2,7 +2,6 @@ // copyright-holders:David Haywood /* 68340 * TODO: - convert all modules to devices - - in multiple QUICC systems running slave mode, global chip select disabled, the internal base moves to start at 3ff04 */ #include "emu.h" @@ -131,14 +130,15 @@ uint8_t m68340_cpu_device::int_ack(offs_t offset) uint16_t m68340_cpu_device::m68340_internal_base_r(offs_t offset, uint16_t mem_mask) { if (!machine().side_effects_disabled()) - LOGMASKED(LOG_BASE, "%08x m68340_internal_base_r %08x, (%08x) [s%08x] [d%08x]\n", m_ppc, offset*2,mem_mask, m_sfc, m_dfc); + LOGMASKED(LOG_BASE, "%08x m68340_internal_base_r %08x, (%08x) (%08x)\n", m_ppc, offset*2,mem_mask, m_sfc); + if (m_sfc==0x7) { return ((!BIT(offset, 0) ? (m_m68340_base >> 16): m_m68340_base)) & 0xffff; } else { - return 0; + return -1; } } diff --git a/src/mame/bfm/bfm_cobra3.cpp b/src/mame/bfm/bfm_cobra3.cpp index 6970e1ea266a5..584a23c70c7c0 100644 --- a/src/mame/bfm/bfm_cobra3.cpp +++ b/src/mame/bfm/bfm_cobra3.cpp @@ -5,7 +5,6 @@ aka Cobra 3 TODO: MPEG decoding currently not implemented - Checksum fails for all games, looks like a CPU bug */ @@ -107,6 +106,7 @@ uint16_t bfm_cobra3_state::bfm_cobra3_mem_r(offs_t offset, uint16_t mem_mask) case 0x400: //input reads, haven't got far enough to trigger any + logerror("%s maincpu read access offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); break; case 0x500: //SCSI DMA @@ -154,12 +154,12 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m switch (cs) { case 1:// ROM, shouldn't write here? - logerror("%sx maincpu write access(1) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); - break; + logerror("%sx maincpu write access(1) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); + break; case 2:// (NV)RAM - COMBINE_DATA(&m_mainram[offset & 0x1fff]); - break; + COMBINE_DATA(&m_mainram[offset & 0x1fff]); + break; case 3: // I/O { @@ -168,10 +168,12 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m switch(cs_addr_8_11) { case 0x000: + logerror("%s maincpu write access lamp drive io latch offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); // lamps; break; case 0x100: + logerror("%s maincpu write access lockout latch offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); if(ACCESSING_BITS_8_15) { // coin lockout and optional vfd (debug only?) @@ -179,6 +181,7 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m break; case 0x200: + logerror("%s maincpu write access io latch offset %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, mem_mask, cs); // volume, watchdog and other stuff ? That's where it would be elsewhere break; @@ -200,21 +203,20 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m if(ACCESSING_BITS_0_7) { offset &= 7; - if(offset == 0) + switch (offset) { + case 0: m_ramdac->index_w(data); - } - else if(offset == 1) - { + break; + case 1: m_ramdac->pal_w(data); - } - else if(offset == 2) - { + break; + case 2: m_ramdac->mask_w(data); - } - else if(offset == 3) - { + break; + case 3: m_ramdac->index_r_w(data); + break; } } break; @@ -228,16 +230,16 @@ void bfm_cobra3_state::bfm_cobra3_mem_w(offs_t offset, uint16_t data, uint16_t m break; case 4: // SCSI controller - offset &= 0x0f; - if(ACCESSING_BITS_8_15) - { - m_scsic->write(offset, data >> 8); - } - break; + offset &= 0x0f; + if(ACCESSING_BITS_8_15) + { + m_scsic->write(offset, data >> 8); + } + break; default: - logerror("%s maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); - break; + logerror("%s maincpu write access(0) offset %08x data %08x mem_mask %08x cs %d\n", machine().describe_context(), offset*4, data, mem_mask, cs); + break; } }