Skip to content

Commit

Permalink
New systems marked not working
Browse files Browse the repository at this point in the history
------------------------------
Computer Othello [hap, Dillweed, SNESNESCUBE64]
  • Loading branch information
happppp committed Feb 1, 2023
1 parent 7825a85 commit 71aaf57
Show file tree
Hide file tree
Showing 13 changed files with 245 additions and 31 deletions.
9 changes: 7 additions & 2 deletions src/devices/bus/msx/cart/easi_speech.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
******************************************************************************/

Expand Down
32 changes: 16 additions & 16 deletions src/devices/sound/sp0256.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ class sp0256_device : public device_t,
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);
Expand All @@ -95,33 +95,33 @@ class sp0256_device : public device_t,
}

required_region_ptr<uint8_t> 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<int16_t[]> 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<int16_t[]> 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;
};
Expand Down
11 changes: 6 additions & 5 deletions src/mame/appliedconcepts/ggm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 1 addition & 0 deletions src/mame/arcade.flt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mame/chess/compuchess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/mame/handheld/hh_sm510.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -113,4 +113,4 @@ class hh_sm510_state : public driver_device
};


#endif // MAME_INCLUDES_HH_SM510_H
#endif // MAME_HANDHELD_HH_SM510_H
6 changes: 3 additions & 3 deletions src/mame/handheld/hh_tms1k.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -72,4 +72,4 @@ class hh_tms1k_state : public driver_device
};


#endif // MAME_INCLUDES_HH_TMS1K_H
#endif // MAME_HANDHELD_HH_TMS1K_H
6 changes: 6 additions & 0 deletions src/mame/handheld/nl_bship.h
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions src/mame/handheld/nl_sfxphasor.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/mame/layout/blockch.lay
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license:CC0-1.0
-->
<mamelayout version="2">
<element name="overlay">
<rect><color red="0.25" green="1.0" blue="0.25" /></rect>
<rect><color red="0.0" green="1.0" blue="0.3" /></rect>
</element>

<view name="Color Overlay">
Expand Down
18 changes: 18 additions & 0 deletions src/mame/layout/cothello.lay
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<element name="overlay">
<rect><color red="0.0" green="1.0" blue="0.3" /></rect>
</element>

<view name="Color Overlay">
<screen index="0">
<bounds left="0" top="0" right="4" bottom="3" />
</screen>
<element ref="overlay" blend="multiply">
<bounds left="0" top="0" right="4" bottom="3" />
</element>
</view>
</mamelayout>
3 changes: 3 additions & 0 deletions src/mame/mame.lst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
174 changes: 174 additions & 0 deletions src/mame/nintendo/cothello.cpp
Original file line number Diff line number Diff line change
@@ -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<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_shared_ptr<u8> 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 )

0 comments on commit 71aaf57

Please sign in to comment.