From 71aaf57ca87d68d82385a3267cc6431f1a410be0 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 1 Feb 2023 13:27:49 +0100 Subject: New systems marked not working ------------------------------ Computer Othello [hap, Dillweed, SNESNESCUBE64] --- src/devices/bus/msx/cart/easi_speech.cpp | 9 +- src/devices/sound/sp0256.h | 32 +++--- src/mame/appliedconcepts/ggm.cpp | 11 +- src/mame/arcade.flt | 1 + src/mame/chess/compuchess.cpp | 2 +- src/mame/handheld/hh_sm510.h | 6 +- src/mame/handheld/hh_tms1k.h | 6 +- src/mame/handheld/nl_bship.h | 6 ++ src/mame/handheld/nl_sfxphasor.h | 6 ++ src/mame/layout/blockch.lay | 2 +- src/mame/layout/cothello.lay | 18 ++++ src/mame/mame.lst | 3 + src/mame/nintendo/cothello.cpp | 174 +++++++++++++++++++++++++++++++ 13 files changed, 245 insertions(+), 31 deletions(-) create mode 100644 src/mame/layout/cothello.lay create mode 100644 src/mame/nintendo/cothello.cpp diff --git a/src/devices/bus/msx/cart/easi_speech.cpp b/src/devices/bus/msx/cart/easi_speech.cpp index c13d1f5950a..d89e7e68457 100644 --- a/src/devices/bus/msx/cart/easi_speech.cpp +++ b/src/devices/bus/msx/cart/easi_speech.cpp @@ -3,10 +3,15 @@ /****************************************************************************** Easi-Speech cartridge (R.Amy, 1987) +It has a GI SP0256A-AL2 (no XTAL) The program adds a hook to 0xfd29, usage appears to be something like this: -defusr0=&hfd29 -a$=usr0("hello") +n%=(number 0-511):a=usr9(n%) +or a=usr9(number) + +Or a custom string: +a$="hello world":a$=usr9(a$) +or a$=usr9("string") ******************************************************************************/ diff --git a/src/devices/sound/sp0256.h b/src/devices/sound/sp0256.h index 0047b5bb0a3..ae3c6fa501f 100644 --- a/src/devices/sound/sp0256.h +++ b/src/devices/sound/sp0256.h @@ -69,14 +69,14 @@ private: int update(int num_samp, int16_t *out, uint32_t *optr); void regdec(); - int rpt, cnt; // Repeat counter, Period down-counter. + int rpt, cnt; // Repeat counter, Period down-counter. uint32_t per, rng; // Period, Amplitude, Random Number Generator - int amp; + int amp; int16_t f_coef[6]; // F0 through F5. int16_t b_coef[6]; // B0 through B5. int16_t z_data[6][2]; // Time-delay data for the filter stages. uint8_t r[16]; // The encoded register set. - int interp; + int interp; private: static int16_t limit(int16_t s); @@ -95,33 +95,33 @@ private: } required_region_ptr m_rom; // 64K ROM. - sound_stream *m_stream; // MAME core sound stream - devcb_write_line m_drq_cb; // Data request callback - devcb_write_line m_sby_cb; // Standby callback + sound_stream *m_stream; // MAME core sound stream + devcb_write_line m_drq_cb; // Data request callback + devcb_write_line m_sby_cb; // Standby callback int m_sby_line; // Standby line state int m_cur_len; // Fullness of current sound buffer. int m_silent; // Flag: SP0256 is silent. - std::unique_ptr m_scratch; // Scratch buffer for audio. - uint32_t m_sc_head; // Head pointer into scratch circular buf - uint32_t m_sc_tail; // Tail pointer into scratch circular buf + std::unique_ptr m_scratch; // Scratch buffer for audio. + uint32_t m_sc_head; // Head pointer into scratch circular buf + uint32_t m_sc_tail; // Tail pointer into scratch circular buf - lpc12_t m_filt; // 12-pole filter + lpc12_t m_filt; // 12-pole filter int m_lrq; // Load ReQuest. == 0 if we can accept a load int m_ald; // Address LoaD. < 0 if no command pending. int m_pc; // Microcontroller's PC value. int m_stack; // Microcontroller's PC stack. int m_fifo_sel; // True when executing from FIFO. int m_halted; // True when CPU is halted. - uint32_t m_mode; // Mode register. - uint32_t m_page; // Page set by SETPAGE + uint32_t m_mode; // Mode register. + uint32_t m_page; // Page set by SETPAGE - uint32_t m_fifo_head; // FIFO head pointer (where new data goes). - uint32_t m_fifo_tail; // FIFO tail pointer (where data comes from). - uint32_t m_fifo_bitp; // FIFO bit-pointer (for partial decles). - uint16_t m_fifo[64]; // The 64-decle FIFO. + uint32_t m_fifo_head; // FIFO head pointer (where new data goes). + uint32_t m_fifo_tail; // FIFO tail pointer (where data comes from). + uint32_t m_fifo_bitp; // FIFO bit-pointer (for partial decles). + uint16_t m_fifo[64]; // The 64-decle FIFO. emu_timer *m_lrq_timer; }; diff --git a/src/mame/appliedconcepts/ggm.cpp b/src/mame/appliedconcepts/ggm.cpp index 2935ed76d19..3018839b5ee 100644 --- a/src/mame/appliedconcepts/ggm.cpp +++ b/src/mame/appliedconcepts/ggm.cpp @@ -31,16 +31,17 @@ Known chess cartridges (*denotes not dumped): - Steinitz Edition-4: Master Chess - *Monitor Edition: Master Kriegspiel -The newer revisions of Gruenfeld and Capablanca did not have any version label visible -on the module, though the German distributor Sandy Electronic sold them (and offered -an upgrade service) as Gruenfeld-S and Capablanca-S. +The newer revisions of Gruenfeld and Capablanca did not have any version label +visible on the module, though the German distributor Sandy Electronic sold them +(and offered an upgrade service) as Gruenfeld-S and Capablanca-S. Other games: - *Odin Edition: Master Reversi - Las Vegas 21: Master Blackjack - *Borchek: Championship Checkers -- *Wits End (unreleased?) -- *Lunar Lander (unreleased?) + +Advertised games, presumed they were never released: Backgammon, Lunar Lander, +Wits End (Mastermind). TODO: - confirm display AP segment, is it used anywhere? diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt index 47047b69a9d..89721c320dd 100644 --- a/src/mame/arcade.flt +++ b/src/mame/arcade.flt @@ -1015,6 +1015,7 @@ nichibutsu/tubep.cpp nichibutsu/wiping.cpp nintendo/aleck64.cpp nintendo/cham24.cpp +nintendo/cothello.cpp nintendo/dkong.cpp nintendo/famibox.cpp nintendo/mario.cpp diff --git a/src/mame/chess/compuchess.cpp b/src/mame/chess/compuchess.cpp index ea2ca1d95f0..934b93b8094 100644 --- a/src/mame/chess/compuchess.cpp +++ b/src/mame/chess/compuchess.cpp @@ -97,7 +97,7 @@ they 'borrowed' code. They also added a piezo circuit. Hardware notes: - Fairchild 3850PK CPU @ 2MHz (LC circuit), 3853PK - 2KB ROM (3216), 256 bytes RAM (2*2111A) -- 555, 4001, 4011 for display blinking and beeper +- discrete sound "bP" buttons are F, G, H (instead of A, B, C) diff --git a/src/mame/handheld/hh_sm510.h b/src/mame/handheld/hh_sm510.h index ad9041ae226..8cd7829dcc9 100644 --- a/src/mame/handheld/hh_sm510.h +++ b/src/mame/handheld/hh_sm510.h @@ -6,8 +6,8 @@ */ -#ifndef MAME_INCLUDES_HH_SM510_H -#define MAME_INCLUDES_HH_SM510_H +#ifndef MAME_HANDHELD_HH_SM510_H +#define MAME_HANDHELD_HH_SM510_H #pragma once @@ -113,4 +113,4 @@ protected: }; -#endif // MAME_INCLUDES_HH_SM510_H +#endif // MAME_HANDHELD_HH_SM510_H diff --git a/src/mame/handheld/hh_tms1k.h b/src/mame/handheld/hh_tms1k.h index dc7f79479c5..c2fa28f35e1 100644 --- a/src/mame/handheld/hh_tms1k.h +++ b/src/mame/handheld/hh_tms1k.h @@ -6,8 +6,8 @@ */ -#ifndef MAME_INCLUDES_HH_TMS1K_H -#define MAME_INCLUDES_HH_TMS1K_H +#ifndef MAME_HANDHELD_HH_TMS1K_H +#define MAME_HANDHELD_HH_TMS1K_H #pragma once @@ -72,4 +72,4 @@ protected: }; -#endif // MAME_INCLUDES_HH_TMS1K_H +#endif // MAME_HANDHELD_HH_TMS1K_H diff --git a/src/mame/handheld/nl_bship.h b/src/mame/handheld/nl_bship.h index f8e195e5e21..ef6a11d2af8 100644 --- a/src/mame/handheld/nl_bship.h +++ b/src/mame/handheld/nl_bship.h @@ -1,6 +1,12 @@ // license:CC0-1.0 // copyright-holders:hap +#ifndef MAME_HANDHELD_NL_BSHIP_H +#define MAME_HANDHELD_NL_BSHIP_H + +#pragma once #include "netlist/nl_setup.h" NETLIST_EXTERNAL(bship) + +#endif // MAME_UNIVERSAL_NL_BSHIP_H diff --git a/src/mame/handheld/nl_sfxphasor.h b/src/mame/handheld/nl_sfxphasor.h index 8e619e721c3..22113bbd326 100644 --- a/src/mame/handheld/nl_sfxphasor.h +++ b/src/mame/handheld/nl_sfxphasor.h @@ -1,6 +1,12 @@ // license:CC0-1.0 // copyright-holders:hap +#ifndef MAME_HANDHELD_NL_SFXPHASOR_H +#define MAME_HANDHELD_NL_SFXPHASOR_H + +#pragma once #include "netlist/nl_setup.h" NETLIST_EXTERNAL(sfxphasor) + +#endif // MAME_HANDHELD_NL_SFXPHASOR_H diff --git a/src/mame/layout/blockch.lay b/src/mame/layout/blockch.lay index c40e286eb23..879dd9cd951 100644 --- a/src/mame/layout/blockch.lay +++ b/src/mame/layout/blockch.lay @@ -4,7 +4,7 @@ license:CC0-1.0 --> - + diff --git a/src/mame/layout/cothello.lay b/src/mame/layout/cothello.lay new file mode 100644 index 00000000000..51ef3ea7a5b --- /dev/null +++ b/src/mame/layout/cothello.lay @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7cfb459b94d..814acc0f092 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -33511,6 +33511,9 @@ cham24 // 2002 @source:nintendo/compmahj.cpp compmahj // 1983 Nintendo Computer Mah-jong Yakuman +@source:nintendo/cothello.cpp +cothello + @source:nintendo/dkong.cpp 8ballact // (c) 1984 Seatongrove Ltd (Magic Eletronics USA license) 8ballact2 // (c) 1984 Seatongrove Ltd (Magic Eletronics USA license) diff --git a/src/mame/nintendo/cothello.cpp b/src/mame/nintendo/cothello.cpp new file mode 100644 index 00000000000..711e2ce4216 --- /dev/null +++ b/src/mame/nintendo/cothello.cpp @@ -0,0 +1,174 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/******************************************************************************* + +Nintendo Computer Othello + +x + +Hardware notes: +- x + +TODO: +- WIP + +*******************************************************************************/ + +#include "emu.h" + +#include "cpu/i8085/i8085.h" + +#include "screen.h" +#include "speaker.h" + +#include "cothello.lh" + + +namespace { + +class cothello_state : public driver_device +{ +public: + cothello_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_screen(*this, "screen"), + m_vram(*this, "vram") + { } + + void cothello(machine_config &config); + +private: + required_device m_maincpu; + required_device m_screen; + required_shared_ptr m_vram; + + void main_map(address_map &map); + + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void sound_w(u8 data); +}; + + + +/******************************************************************************* + Video +*******************************************************************************/ + +u32 cothello_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + int pixel = m_vram[(y << 8 | x) & 0x3fff] & 1; + bitmap.pix(y, x) = pixel ? rgb_t::white() : rgb_t::black(); + } + } + + return 0; +} + + + +/******************************************************************************* + I/O +*******************************************************************************/ + +void cothello_state::sound_w(u8 data) +{ + //printf("%X ",data); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void cothello_state::main_map(address_map &map) +{ + map(0x0000, 0x0bff).rom(); + map(0x4000, 0x40ff).ram(); + map(0x6000, 0x6000).portr("IN.0"); + map(0x8000, 0x8000).w(FUNC(cothello_state::sound_w)); + map(0xa000, 0xa000).portr("IN.1"); + map(0xc000, 0xffff).writeonly().share("vram"); +} + + + +/******************************************************************************* + Input Ports +*******************************************************************************/ + +static INPUT_PORTS_START( cothello ) + PORT_START("IN.0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_3) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_4) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_5) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_6) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_7) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_8) + + PORT_START("IN.1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_W) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_E) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_R) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_T) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Y) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_U) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_I) +INPUT_PORTS_END + + + +/******************************************************************************* + Machine Configs +*******************************************************************************/ + +void cothello_state::cothello(machine_config &config) +{ + // basic machine hardware + I8080A(config, m_maincpu, 750000); + m_maincpu->set_vblank_int("screen", FUNC(cothello_state::irq0_line_hold)); + m_maincpu->set_addrmap(AS_PROGRAM, &cothello_state::main_map); + + // video hardware + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(60); + m_screen->set_size(64, 64); + m_screen->set_visarea(0, 64-1, 0, 64-1); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); + m_screen->set_screen_update(FUNC(cothello_state::screen_update)); + + // sound hardware +} + + + +/******************************************************************************* + ROM Definitions +*******************************************************************************/ + +ROM_START( cothello ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "13.ic13", 0x0000, 0x0400, CRC(c4b2802b) SHA1(b7e568c3503722143815b051de2dd3b60cde635a) ) + ROM_LOAD( "12.ic12", 0x0400, 0x0400, CRC(293eee03) SHA1(d3bf755104f2fcbc99ebdc9556b3f42cdfacf94e) ) + ROM_LOAD( "11.ic11", 0x0800, 0x0400, CRC(dea6486e) SHA1(4e11699dfee0e34c67872427372ea0b33bd16d09) ) +ROM_END + +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +// YEAR NAME PARENT MACHINE INPUT CLASS INIT SCREEN COMPANY, FULLNAME, FLAGS +GAMEL(1978, cothello, 0, cothello, cothello, cothello_state, empty_init, ROT0, "Nintendo", "Computer Othello", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_cothello ) -- cgit v1.2.3