This commit is contained in:
Miodrag Milanovic 2015-11-01 14:34:52 +01:00
commit 7f03841c2a
19 changed files with 397 additions and 380 deletions

View File

@ -4,10 +4,10 @@
#include <stdio.h>
#include <CoreAudio/HostTime.h>
#import <mach/mach.h>
#import <mach/mach_error.h>
#import <mach/mach_time.h>
#import <mach/clock.h>
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/mach_time.h>
#include <mach/clock.h>
#include <unistd.h>
#include "porttime.h"

View File

@ -109,8 +109,6 @@ void i8251_device::device_start()
save_item(NAME(m_br_factor));
save_item(NAME(m_rx_data));
save_item(NAME(m_tx_data));
save_item(NAME(m_tx_busy));
save_item(NAME(m_disable_tx_pending));
device_serial_interface::register_save_state(machine().save(), this);
}
@ -166,7 +164,33 @@ void i8251_device::receive_clock()
}
}
/*-------------------------------------------------
is_tx_enabled
-------------------------------------------------*/
bool i8251_device::is_tx_enabled(void) const
{
return BIT(m_command , 0) != 0 && m_cts == 0;
}
/*-------------------------------------------------
check_for_tx_start
-------------------------------------------------*/
void i8251_device::check_for_tx_start(void)
{
if (is_tx_enabled() && (m_status & (I8251_STATUS_TX_EMPTY | I8251_STATUS_TX_READY)) == I8251_STATUS_TX_EMPTY) {
start_tx();
}
}
/*-------------------------------------------------
start_tx
-------------------------------------------------*/
void i8251_device::start_tx(void)
{
transmit_register_setup(m_tx_data);
m_status &= ~I8251_STATUS_TX_EMPTY;
m_status |= I8251_STATUS_TX_READY;
}
/*-------------------------------------------------
transmit_clock
@ -181,50 +205,21 @@ void i8251_device::transmit_clock()
else
return;
/* transmit enabled? */
if (m_command & (1<<0))
{
/* do we have a character to send? */
if ((m_status & I8251_STATUS_TX_READY)==0)
{
/* is diserial ready for it? */
if (is_transmit_register_empty())
{
/* set it up */
transmit_register_setup(m_tx_data);
/* i8251 transmit reg now empty */
m_status |=I8251_STATUS_TX_EMPTY;
/* ready for next transmit */
m_status |=I8251_STATUS_TX_READY;
update_tx_empty();
update_tx_ready();
}
}
/* if diserial has bits to send, make them so */
if (!is_transmit_register_empty())
{
UINT8 data = transmit_register_get_data_bit();
m_tx_busy = true;
m_txd_handler(data);
}
// is transmitter totally done?
if ((m_status & I8251_STATUS_TX_READY) && is_transmit_register_empty())
{
m_tx_busy = false;
if (m_disable_tx_pending)
{
LOG(("Applying pending disable\n"));
m_disable_tx_pending = false;
m_command &= ~(1<<0);
m_txd_handler(1);
update_tx_ready();
}
}
}
if (is_transmit_register_empty()) {
if ((m_status & I8251_STATUS_TX_READY) == 0 && (is_tx_enabled() || (m_flags & I8251_DELAYED_TX_EN) != 0)) {
start_tx();
} else {
m_status |= I8251_STATUS_TX_EMPTY;
}
update_tx_ready();
update_tx_empty();
}
/* if diserial has bits to send, make them so */
if (!is_transmit_register_empty())
{
UINT8 data = transmit_register_get_data_bit();
m_txd_handler(data);
}
#if 0
/* hunt mode? */
@ -271,21 +266,7 @@ void i8251_device::update_tx_ready()
Transmit enable is 1
*/
tx_ready = 0;
/* transmit enable? */
if ((m_command & (1<<0))!=0)
{
/* other side has rts set (comes in as CTS at this side) */
if (!m_cts)
{
if (m_status & I8251_STATUS_TX_EMPTY)
{
/* enable transfer */
tx_ready = 1;
}
}
}
tx_ready = is_tx_enabled() && (m_status & I8251_STATUS_TX_READY) != 0;
m_txrdy_handler(tx_ready);
}
@ -344,7 +325,6 @@ void i8251_device::device_reset()
m_tx_data = 0;
m_rxc_count = m_txc_count = 0;
m_br_factor = 1;
m_tx_busy = m_disable_tx_pending = false;
/* update tx empty pin output */
update_tx_empty();
@ -404,30 +384,10 @@ WRITE8_MEMBER(i8251_device::command_w)
if (data & (1<<0))
{
LOG(("transmit enable\n"));
/* if we get a tx enable with a disable pending, cancel the disable */
m_disable_tx_pending = false;
}
else
{
if (m_tx_busy)
{
if (!m_disable_tx_pending)
{
LOG(("Tx busy, set pending disable\n"));
}
m_disable_tx_pending = true;
m_command |= (1<<0);
}
else
{
LOG(("transmit disable\n"));
if ((data & (1<<0))==0)
{
/* held in high state when transmit disable */
m_txd_handler(1);
}
}
LOG(("transmit disable\n"));
}
@ -473,8 +433,10 @@ WRITE8_MEMBER(i8251_device::command_w)
m_flags |= I8251_EXPECTING_MODE;
}
check_for_tx_start();
update_rx_ready();
update_tx_ready();
update_tx_empty();
}
WRITE8_MEMBER(i8251_device::mode_w)
@ -692,12 +654,20 @@ WRITE8_MEMBER(i8251_device::data_w)
{
m_tx_data = data;
LOG(("data_w %02x\n" , data));
// printf("i8251 transmit char: %02x\n",data);
LOG(("data_w %02x\n" , data));
/* writing clears */
m_status &=~I8251_STATUS_TX_READY;
m_status &=~I8251_STATUS_TX_EMPTY;
update_tx_ready();
// Store state of tx enable when writing to DB buffer
if (is_tx_enabled()) {
m_flags |= I8251_DELAYED_TX_EN;
} else {
m_flags &= ~I8251_DELAYED_TX_EN;
}
check_for_tx_start();
/* if transmitter is active, then tx empty will be signalled */
@ -758,6 +728,10 @@ WRITE_LINE_MEMBER(i8251_device::write_rxd)
WRITE_LINE_MEMBER(i8251_device::write_cts)
{
m_cts = state;
check_for_tx_start();
update_tx_ready();
update_tx_empty();
}
WRITE_LINE_MEMBER(i8251_device::write_dsr)

View File

@ -92,11 +92,16 @@ protected:
void update_tx_empty();
void transmit_clock();
void receive_clock();
bool is_tx_enabled(void) const;
void check_for_tx_start(void);
void start_tx(void);
enum
{
I8251_EXPECTING_MODE = 0x01,
I8251_EXPECTING_SYNC_BYTE = 0x02
I8251_EXPECTING_SYNC_BYTE = 0x02,
I8251_DELAYED_TX_EN = 0x04
};
private:
@ -133,9 +138,8 @@ private:
/* data being received */
UINT8 m_rx_data;
UINT8 m_tx_data;
bool m_tx_busy;
bool m_disable_tx_pending;
/* tx buffer */
UINT8 m_tx_data;
};
class v53_scu_device : public i8251_device

View File

@ -5733,7 +5733,7 @@ initdexpo // 2002.?? Initial D Arcade Stage (Export)
// 2003.05 Initial D Arcade Stage Ver. 2 (Japan) (Rev A)
initdv2j // 2003.05.27 Initial D Arcade Stage Ver. 2 (Japan) (Rev B)
// 2003.09 World Club Champion Football Serie A 2002-2003
// 2003.?? Club Kart Cycraft Edition
clubkcyc // 2003.?? Club Kart Cycraft Edition
clubk2k3 // 2003.?? Club Kart: European Session (2003, Rev A)
clubk2kp // 2003.?? Club Kart: European Session (2003, prototype)
clubkprz // 2003.?? Club Kart Prize
@ -5760,6 +5760,7 @@ vf4tuned // 2004.12 Virtua Fighter 4 Final Tuned (Rev F)
// 2006.09 Mobile Suit Gundam 0079 Card Builder Ver.2.01
// 2006.10 World Club Champion Football European Clubs 2005-2006 bugfix
// 2006.11 Mobile Suit Gundam 0079 Card Builder Ver.2.02
inidv3ca // 2006.?? Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A)
inidv3cy // 2006.?? Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev B)
// 2007.03 Mobile Suit Gundam 0083 Card Builder
// 2007.10 Mobile Suit Gundam 0083 Card Builder Ryouyuu Gekitotsu
@ -11332,6 +11333,8 @@ pokerduc // 198?, Unknown
bchancep // 198?, Unknown
pokermon // 1987, Unknown
pokersis // 198?, Sisteme France.
super98
// Cal Omega
comg074 // (c) 1981 Cal Omega Inc.

View File

@ -9,7 +9,6 @@ Exciting Soccer - (c) 1983 Alpha Denshi Co.
Exciting Soccer II - (c) 1984 Alpha Denshi Co.
driver by Ernesto Corvi, Jarek Parchanski, Nicola Salmoria
ALPHA 8201 MCU handling by Tatsuyuki satoh
Note: the Champion Baseball II unofficial schematics show a 8302 instead of
the 8201, however the MCU is used like a plain 8201, 830x extra instructions
@ -68,7 +67,7 @@ Notes:
and crashes if the bit doesn't match bit 2 of RAM location 0x8c00.
- The Exciting Soccer bootleg runs on a modified Champion Baseball board. The
original board has vastly improved sound hardware which is thereforew missing
original board has vastly improved sound hardware which is therefore missing
from the bootleg.
TODO:
@ -92,24 +91,6 @@ TODO:
#include "includes/champbas.h"
/*************************************
*
* Watchdog
*
*************************************/
void champbas_state::screen_eof_champbas(screen_device &screen, bool state)
{
// rising edge
if (state)
{
m_watchdog_count++;
if (m_watchdog_count == 0x10)
machine().schedule_soft_reset();
}
}
/*************************************
*
@ -117,14 +98,9 @@ void champbas_state::screen_eof_champbas(screen_device &screen, bool state)
*
*************************************/
WRITE8_MEMBER(champbas_state::champbas_watchdog_reset_w)
{
m_watchdog_count = 0;
}
CUSTOM_INPUT_MEMBER(champbas_state::champbas_watchdog_bit2)
{
return BIT(m_watchdog_count, 2);
return (0x10 - machine().get_vblank_watchdog_counter()) >> 2 & 1;
}
@ -136,7 +112,7 @@ WRITE8_MEMBER(champbas_state::irq_enable_w)
m_maincpu->set_input_line(0, CLEAR_LINE);
}
TIMER_CALLBACK_MEMBER(champbas_state::exctsccr_fm_callback)
TIMER_DEVICE_CALLBACK_MEMBER(champbas_state::exctsccr_sound_irq)
{
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
}
@ -244,7 +220,7 @@ static ADDRESS_MAP_START( talbot_map, AS_PROGRAM, 8, champbas_state )
AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w)
AM_RANGE(0xa060, 0xa06f) AM_WRITEONLY AM_SHARE("spriteram_2")
AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w)
AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
@ -274,7 +250,7 @@ static ADDRESS_MAP_START( champbas_main_map, AS_PROGRAM, 8, champbas_state )
AM_RANGE(0xa060, 0xa06f) AM_RAM AM_SHARE("spriteram_2")
AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w)
/* AM_RANGE(0xa0a0, 0xa0a0) ???? */
AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w)
AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w)
/* champbja only */
AM_RANGE(0x6800, 0x68ff) AM_READ(champbja_alt_protection_r)
@ -378,20 +354,20 @@ static INPUT_PORTS_START( talbot )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
@ -409,7 +385,7 @@ static INPUT_PORTS_START( talbot )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@ -426,16 +402,16 @@ static INPUT_PORTS_START( champbas )
PORT_INCLUDE( talbot )
PORT_MODIFY("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // throw (red)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // throw (red)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) // changes (blue)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) // steal (yellow)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) // changes (blue)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) // steal (yellow)
PORT_MODIFY("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // steal (yellow)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // changes (blue)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // steal (yellow)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // changes (blue)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // throw (red)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // throw (red)
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )
@ -456,7 +432,7 @@ static INPUT_PORTS_START( champbas )
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ))
PORT_DIPUNKNOWN( 0x40, 0x00 )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
INPUT_PORTS_END
static INPUT_PORTS_START( exctsccr )
@ -482,7 +458,7 @@ static INPUT_PORTS_START( exctsccr )
PORT_DIPSETTING( 0x00, "2 Min." )
PORT_DIPSETTING( 0x60, "3 Min." )
PORT_DIPSETTING( 0x40, "4 Min." )
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter
INPUT_PORTS_END
@ -525,7 +501,6 @@ static GFXDECODE_START( champbas )
GFXDECODE_END
static const gfx_layout charlayout_3bpp =
{
8,8,
@ -572,27 +547,25 @@ GFXDECODE_END
*
*************************************/
MACHINE_START_MEMBER(champbas_state,champbas)
void champbas_state::machine_start()
{
save_item(NAME(m_watchdog_count));
// zerofill
m_irq_mask = 0;
m_palette_bank = 0;
m_gfx_bank = 0;
// register for savestates
save_item(NAME(m_irq_mask));
save_item(NAME(m_palette_bank));
save_item(NAME(m_gfx_bank));
}
MACHINE_START_MEMBER(champbas_state,exctsccr)
{
// FIXME
// I dun wanna
machine().scheduler().timer_pulse(attotime::from_hz(75), timer_expired_delegate(FUNC(champbas_state::exctsccr_fm_callback),this)); /* updates fm */
MACHINE_START_CALL_MEMBER(champbas);
}
MACHINE_RESET_MEMBER(champbas_state,champbas)
void champbas_state::machine_reset()
{
// 74LS259 is auto CLR on reset
m_irq_mask = 0;
m_palette_bank = 0;
m_gfx_bank = 0; // talbot has only 1 bank
m_gfx_bank = 0;
}
INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq)
@ -607,14 +580,12 @@ static MACHINE_CONFIG_START( talbot, champbas_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6)
MCFG_CPU_PROGRAM_MAP(talbot_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
/* MCU */
MCFG_CPU_ADD("mcu", ALPHA8201L, XTAL_18_432MHz/6/8)
MCFG_CPU_PROGRAM_MAP(mcu_map)
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
MCFG_WATCHDOG_VBLANK_INIT(0x10)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -622,7 +593,6 @@ static MACHINE_CONFIG_START( talbot, champbas_state )
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas)
MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", talbot)
@ -641,16 +611,14 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( champbas, champbas_state )
/* basic machine hardware */
/* main cpu */
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6)
MCFG_CPU_PROGRAM_MAP(champbas_main_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6)
MCFG_CPU_PROGRAM_MAP(champbas_sub_map)
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
MCFG_WATCHDOG_VBLANK_INIT(0x10)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -658,7 +626,6 @@ static MACHINE_CONFIG_START( champbas, champbas_state )
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas)
MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", champbas)
@ -696,19 +663,21 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6 )
MCFG_CPU_PROGRAM_MAP(exctsccr_main_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4 )
MCFG_CPU_PROGRAM_MAP(exctsccr_sub_map)
MCFG_CPU_IO_MAP(exctsccr_sound_io_map)
MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) /* 4 kHz, updates the dac */
MCFG_CPU_PERIODIC_INT_DRIVER(champbas_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac
MCFG_TIMER_DRIVER_ADD_PERIODIC("exc_snd_irq", champbas_state, exctsccr_sound_irq, attotime::from_hz(75)) // irq source unknown, determines music tempo
MCFG_TIMER_START_DELAY(attotime::from_hz(75))
/* MCU */
MCFG_CPU_ADD("mcu", ALPHA8301L, XTAL_18_432MHz/6/8) /* Actually 8302 */
MCFG_CPU_PROGRAM_MAP(mcu_map)
MCFG_MACHINE_START_OVERRIDE(champbas_state,exctsccr)
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
MCFG_WATCHDOG_VBLANK_INIT(0x10)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -716,7 +685,6 @@ static MACHINE_CONFIG_START( exctsccr, champbas_state )
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr)
MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", exctsccr)
@ -754,13 +722,12 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6)
MCFG_CPU_PROGRAM_MAP(exctsccrb_main_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
MCFG_CPU_ADD("sub", Z80, XTAL_18_432MHz/6)
MCFG_CPU_PROGRAM_MAP(champbas_sub_map)
MCFG_MACHINE_START_OVERRIDE(champbas_state,champbas)
MCFG_MACHINE_RESET_OVERRIDE(champbas_state,champbas)
MCFG_WATCHDOG_VBLANK_INIT(0x10)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -768,7 +735,6 @@ static MACHINE_CONFIG_START( exctsccrb, champbas_state )
MCFG_SCREEN_SIZE(32*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_exctsccr)
MCFG_SCREEN_VBLANK_DRIVER(champbas_state, screen_eof_champbas)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", exctsccr)
@ -805,7 +771,7 @@ ROM_START( talbot )
ROM_LOAD( "16.11i", 0x5000, 0x1000, CRC(1612adf5) SHA1(9adeb21d5d1692f6e31460062f03f2008076b307) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "7.6a", 0x0000, 0x1000, CRC(bde14194) SHA1(f8f569342a3094eb5450a30b8ab87901b98e6061) )
@ -852,7 +818,7 @@ ROM_START( champbasj )
ROM_LOAD( "18.2n", 0x4000, 0x2000, CRC(2dc484dd) SHA1(28bd68c787d7e6989849ca52009948dbd5cdcc79) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "14.5e", 0x0000, 0x2000, CRC(1b8202b3) SHA1(889b77fc3d0cb029baf8c47be260f513f3ed59bd) )
@ -901,7 +867,7 @@ ROM_START( champbb2 )
// the pcb has a 8302 on it, though only the 8201 instructions are used
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) )
@ -929,7 +895,7 @@ ROM_START( champbb2a )
// the pcb has a 8302 on it, though only the 8201 instructions are used
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "epr5936", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) )
@ -957,7 +923,7 @@ ROM_START( champbb2j )
// the pcb has a 8302 on it, though only the 8201 instructions are used
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302__44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4.6a", 0x0000, 0x2000, CRC(c4a4df75) SHA1(7b85dbf405697b0b8881f910c08f6db6c828b19a) )
@ -983,6 +949,9 @@ ROM_START( exctsccr ) /* Teams: ITA AUS GBR FRA FRG BRA */
ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) )
ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */
ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */
@ -1013,6 +982,9 @@ ROM_START( exctsccra ) /* Teams: ITA AUS GBR FRA FRG BRA */
ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) )
ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */
ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */
@ -1043,6 +1015,9 @@ ROM_START( exctsccru ) /* Teams: ITA USA GBR FRA FRG BRA */
ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) )
ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "vr4u.a5", 0x0000, 0x2000, CRC(103bb739) SHA1(335d89b3a374daa3fd1bd3fd66a82e7310303051) ) /* planes 0,1 */
ROM_LOAD( "vr6u.c5", 0x2000, 0x2000, CRC(a5b2b303) SHA1(0dd1912baa8236cba2baa4bc3d2955fd19617be9) ) /* plane 3 */
@ -1073,6 +1048,9 @@ ROM_START( exctsccrj ) /* Teams: JPN USA GBR FRA FRG BRA */
ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) )
ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4_5a.bin", 0x0000, 0x2000, CRC(74cc71d6) SHA1(ff3d59845bc66ec3335eadf81d799a684182c66f) ) /* planes 0,1 */
ROM_LOAD( "6_5c.bin", 0x2000, 0x2000, CRC(7c4cd1b6) SHA1(141e67fec9b6d6b4380cb941b4d79341787680e3) ) /* plane 3 */
@ -1102,6 +1080,9 @@ ROM_START( exctsccrjo ) /* Teams: JPN USA ENG FRA GFR BRA */
ROM_LOAD( "8.6d", 0x4000, 0x2000, CRC(b6b209a5) SHA1(e49a0db65b29337ac6b919237067b1990f2233ab) )
ROM_LOAD( "7.6c", 0x6000, 0x2000, CRC(8856452a) SHA1(4494c225c9df97da09c180caadb4dda49d0d5392) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8302_44801b35.bin", 0x0000, 0x2000, CRC(edabac6c) SHA1(eaf1c51b63023256df526b0d3fd53cffc919c901) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4.5a", 0x0000, 0x2000, CRC(c4259307) SHA1(7bd4e229a5e1a5136826a57aa61810fcdf9c5027) ) /* planes 0,1 */
ROM_LOAD( "6.5c", 0x2000, 0x2000, CRC(cca53367) SHA1(f06ebf2ab8f8f10cfe118af490017972990e3073) ) /* plane 3 */
@ -1147,6 +1128,9 @@ ROM_START( exctsccrb )
ROM_LOAD( "es-b.l2", 0x2000, 0x2000, CRC(8b3db794) SHA1(dbfed2357c7631bfca6bbd63a23617bc3abf6ca3) )
ROM_LOAD( "es-c.m2", 0x4000, 0x2000, CRC(7bed2f81) SHA1(cbbb0480519cc04a99e8983228b18c9e49a9985d) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
/* the national flags are wrong. This happens on the real board */
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */
@ -1179,7 +1163,7 @@ ROM_START( exctscc2 )
ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) /* vr.7k */
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "8303.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x04000, "gfx1", 0 ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars
ROM_LOAD( "vr.5a", 0x0000, 0x2000, CRC(4ff1783d) SHA1(c45074864c3a4bcbf3a87d164027ae16dca53d9c) ) /* planes 0,1 */
@ -1211,9 +1195,8 @@ DRIVER_INIT_MEMBER(champbas_state,champbas)
UINT8 *rom1 = memregion("gfx1")->base();
UINT8 *rom2 = memregion("gfx2")->base();
int len = memregion("gfx1")->bytes();
int i;
for (i = 0; i < len/2; ++i)
for (int i = 0; i < len/2; i++)
{
UINT8 t = rom1[i + len/2];
rom1[i + len/2] = rom2[i];
@ -1227,10 +1210,9 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr)
// chars and sprites are mixed in the same ROMs, so rearrange them for easier decoding
UINT8 *rom1 = memregion("gfx1")->base();
UINT8 *rom2 = memregion("gfx2")->base();
int i;
// planes 0,1
for (i = 0; i < 0x1000; ++i)
for (int i = 0; i < 0x1000; i++)
{
UINT8 t = rom1[i + 0x1000];
rom1[i + 0x1000] = rom2[i];
@ -1238,12 +1220,12 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr)
}
// plane 3
for (i = 0; i < 0x1000; ++i)
for (int i = 0; i < 0x1000; i++)
{
rom2[i + 0x3000] = rom1[i + 0x3000] >> 4;
rom2[i + 0x2000] = rom1[i + 0x3000] & 0x0f;
}
for (i = 0; i < 0x1000; ++i)
for (int i = 0; i < 0x1000; i++)
{
rom1[i + 0x3000] = rom1[i + 0x2000] >> 4;
rom1[i + 0x2000] &= 0x0f;
@ -1257,7 +1239,7 @@ DRIVER_INIT_MEMBER(champbas_state,exctsccr)
*
*************************************/
GAME( 1982, talbot, 0, talbot, talbot, driver_device, 0, ROT270, "Alpha Denshi Co. (Volt Electronics license)", "Talbot", MACHINE_SUPPORTS_SAVE )
GAME( 1982, talbot, 0, talbot, talbot, driver_device, 0, ROT270, "Alpha Denshi Co. (Volt Electronics license)", "Talbot", MACHINE_SUPPORTS_SAVE )
GAME( 1983, champbas, 0, champbas, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co. (Sega license)", "Champion Base Ball", MACHINE_SUPPORTS_SAVE )
GAME( 1983, champbasj, champbas, champmcu, champbas, champbas_state, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 1)", MACHINE_SUPPORTS_SAVE )
@ -1271,5 +1253,5 @@ GAME( 1983, exctsccru, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr,
GAME( 1983, exctsccra, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrj, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrjo, exctsccr, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (Japan, older)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrb, exctsccr, exctsccrb,exctsccr, champbas_state, exctsccr, ROT270, "bootleg", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, exctsccrb, exctsccr, exctsccrb,exctsccr, champbas_state, exctsccr, ROT270, "bootleg (Kazutomi)", "Exciting Soccer (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, exctscc2, 0, exctsccr, exctsccr, champbas_state, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", MACHINE_SUPPORTS_SAVE )

View File

@ -22,7 +22,7 @@
For version information:
Captain America - Reset with Player 1 start held
Fighter's History - Resest with Player 1 button 1 & 2 held
Fighter's History - Reset with Player 1 button 1 & 2 held
Night Slashers - Reset with Player 1 & 2 start held
Locked 'N Loaded - Reset with Player 1 & 2 start held

View File

@ -1312,7 +1312,7 @@ ROM_START( equites )
ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "ep9", 0x00000, 0x1000, CRC(0325be11) SHA1(d95667b439e3d97b08efeaf08022348546a4f385) )
@ -1376,7 +1376,7 @@ ROM_START( equitess )
ROM_LOAD( "ev4.1h", 0x06000, 0x2000, CRC(b7917264) SHA1(e58345fda088b171fd348959de15082f3cb42514) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "epr-ep0.3e", 0x00000, 0x1000, CRC(3f5a81c3) SHA1(8fd5bc621f483bfa46be7e40e6480b25243bdf70) )
@ -1434,7 +1434,7 @@ ROM_START( bullfgtr )
ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) )
@ -1516,7 +1516,7 @@ ROM_START( bullfgtrs )
ROM_LOAD( "hv4vr.bin", 0x06000, 0x2000, CRC(62c7a25b) SHA1(237d3cbdfbf45b33c2f65d30faba151380866a93) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x1000, "gfx1", 0 ) // chars
ROM_LOAD( "h.bin", 0x000000, 0x1000, CRC(c6894c9a) SHA1(0d5a55cded4fd833211bdc733a78c6c8423897de) )
@ -1714,7 +1714,7 @@ ROM_START( splndrbt )
ROM_LOAD( "4_v.1h", 0x06000, 0x2000, CRC(10f45af4) SHA1(00fa599bad8bf3ba6deee54165f381403096e8f9) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8303__44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_LOAD( "alpha-8303_44801b42.bin", 0x0000, 0x2000, CRC(66adcb37) SHA1(e1c72ecb161129dcbddc0b16dd90e716d0c79311) )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars
ROM_LOAD( "10.8c", 0x00000, 0x2000, CRC(501887d4) SHA1(3cf4401d6fddff1500066219a71ac3b30ecbdd28) )
@ -1780,7 +1780,7 @@ ROM_START( hvoltage )
ROM_LOAD( "7_v.1e", 0x08000, 0x4000, CRC(44d38554) SHA1(6765971376eafa218fda1accb1e173a7c1850cc8) )
ROM_REGION( 0x2000, "mcu", 0 )
ROM_LOAD( "alpha-8304__44801bxx.bin", 0x0000, 0x2000, NO_DUMP )
ROM_LOAD( "alpha-8304_44801bxx.bin", 0x0000, 0x2000, NO_DUMP )
ROM_REGION( 0x2000, "gfx1", 0 ) // chars
ROM_LOAD( "5.8c", 0x00000, 0x2000, CRC(656d53cd) SHA1(9971ed7e7da0e8bf46e97e8f75a2c2201b33fc2f) )

View File

@ -9746,6 +9746,35 @@ ROM_START( pokersis )
ROM_END
/*
Unknown poker entitled 'Super 98 ICP-1',
running in the ICP-1 boardset.
Program seems to fill some zeropage registers
and check for existent values and changes...
Maybe an external device is writting them.
This is NVRAM zone, so some values could be
previously harcoded.
*/
ROM_START( super98 )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "27c256.17a", 0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) )
ROM_REGION( 0x3000, "gfx1", 0 )
ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
ROM_LOAD( "2732.9a", 0x2000, 0x1000, CRC(9a478c39) SHA1(614171fa3184f6ceb663d5650d05fac4d4025c9f) ) /* char ROM */
ROM_REGION( 0x3000, "gfx2", 0 )
ROM_LOAD( "2732.4a", 0x0000, 0x1000, CRC(733b72f0) SHA1(b9255b9de24d9bd7277b18d8d1e12c7cdd3813fb) ) /* cards deck gfx, bitplane1 */
ROM_LOAD( "2732.6a", 0x1000, 0x1000, CRC(02595bcf) SHA1(5d01baed66152cca4b7a14fdfee83f31304e3be3) ) /* cards deck gfx, bitplane2 */
ROM_LOAD( "2732.7a", 0x2000, 0x1000, CRC(42072981) SHA1(1cfbbfe33afc6f147ce5828d96455f5aeb090cd3) ) /* cards deck gfx, bitplane3 */
ROM_REGION( 0x0100, "proms", 0 )
ROM_LOAD( "bipolar_prom.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
ROM_END
/*********************************************
* Driver Init *
*********************************************/
@ -10304,3 +10333,5 @@ GAME( 198?, pokerduc, 0, goldnpkr, goldnpkr, goldnpkr_state, icp1db,
GAMEL( 198?, bchancep, 0, bchancep, goldnpkr, goldnpkr_state, bchancep, ROT0, "<unknown>", "Bonne Chance! (Golden Poker prequel HW)", MACHINE_NOT_WORKING, layout_goldnpkr )
GAME( 1987, pokermon, 0, mondial, mondial, driver_device, 0, ROT0, "<unknown>", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program
GAME( 198?, pokersis, 0, bchancep, goldnpkr, driver_device, 0, ROT0, "Sisteme France", "unknown Sisteme France Poker", MACHINE_NOT_WORKING ) // fix banking (4 prgs?)...
GAMEL( 198?, super98, bsuerte, witchcrd, bsuerte, driver_device, 0, ROT0, "<unknown>", "Super 98 (ICP-1)", MACHINE_NOT_WORKING, layout_goldnpkr ) // program checks zeropage registers for changes...

View File

@ -8459,6 +8459,19 @@ ROM_START( initdv2e )
ROM_LOAD( "317-0357-exp.pic", 0x000000, 0x004000, CRC(38f84b4d) SHA1(03c12d8580da1a4b3a554e62fd8b1f3447b7ebbd) )
ROM_END
ROM_START( clubkcyc )
NAOMI2_BIOS
NAOMI_DEFAULT_EEPROM
DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gds-0029a", 0, SHA1(8354828a505a26da726a686828f8860b11b15da3) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
//PIC16C622A (317-0358-COM)
//(sticker 253-5508-0358)
ROM_LOAD( "317-0358-com.pic", 0x000000, 0x004000, CRC(dd33e50f) SHA1(c51712754022fc3adc350fa0714bf60fd0d163cf) )
ROM_END
ROM_START( initdv3j )
NAOMI2_BIOS
NAOMI_DEFAULT_EEPROM
@ -8550,6 +8563,18 @@ ROM_START( inidv3cy )
ROM_LOAD("317-0406-com.pic", 0x00, 0x4000, CRC(fe91a7af) SHA1(3562d8d454ac6e5b73a24d4dc8928ef24687cdf7) )
ROM_END
ROM_START( inidv3ca )
NAOMI2_BIOS
NAOMI_DEFAULT_EEPROM
DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gds-0039a", 0, SHA1(44aab273f836aa81728b1a00fdfdc2561d0984aa) )
ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
//PIC16C621A (317-0406-COM)
//(sticker 253-5508-0406)
ROM_LOAD("317-0406-com.pic", 0x00, 0x4000, CRC(fe91a7af) SHA1(3562d8d454ac6e5b73a24d4dc8928ef24687cdf7) )
ROM_END
/**********************************************
*
@ -9271,7 +9296,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0026B */ GAME( 2002, initdv2j, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Japan) (Rev. B) (GDS-0026B)", GAME_FLAGS )
/* 0027 */ GAME( 2002, initdv2e, initdv2j,naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 2 (Export) (GDS-0027)", GAME_FLAGS )
// 0028
// 0029 Club Kart Cycraft Edition
// 0029
/* 0029A */ GAME( 2003, clubkcyc, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Club Kart for Cycraft (GDS-0029A)", GAME_FLAGS )
// 0030
/* 0031 */ GAME( 2003, puyofev, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Puyo Puyo Fever (GDS-0031)", GAME_FLAGS )
// 0032 Initial D Arcade Stage Ver. 3 (Japan)
@ -9291,7 +9317,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
// 0037? Puyo Puyo Fever (Export)
// 0038
// 0039 Initial D Arcade Stage Ver. 3 Cycraft Edition
// 0039A Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A)
/* 0039A */ GAME( 2006, inidv3ca, inidv3cy,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev. A) (GDS-0039A)", GAME_FLAGS )
/* 0039B */ GAME( 2006, inidv3cy, naomi2, naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev. B) (GDS-0039B)", GAME_FLAGS )
// 0040
// 0041 Dragon Treasure 3

View File

@ -54,6 +54,18 @@ the correct rates). MAME's bitbanger seems to be able to accept the ACIA
output at this rate, but the ACIA screws up when consuming data from MAME's
bitbanger.
Schematics specify a WD1793 floppy controller, but we're using the Fujitsu
equivalent MB8877 here. Is it known that the original machines used one or
the other exclusively? In any case MAME emulates them identically.
TODO:
* Hook up the port direction control bits in the IEEE488 interface properly
and test it with some emulated peripheral. Also the BIOS can speak
Centronics parallel over the same physical interface, so this should be
tested, too.
***************************************************************************/
#include "includes/osborne1.h"
@ -178,6 +190,7 @@ static INPUT_PORTS_START( osborne1 )
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("CNF")
PORT_BIT(0xF8, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_CONFNAME(0x06, 0x00, "Serial Speed")
PORT_CONFSETTING(0x00, "300/1200")
PORT_CONFSETTING(0x02, "600/2400")

View File

@ -3,7 +3,6 @@
/***************************************************************************
Driver by Jarek Burczynski, started by Tomasz Slanina dox@space.pl
ALPHA 8201 MCU handling by Tatsuyuki satoh
Lots of hardware info from Guru
memory map :
@ -103,31 +102,43 @@ public:
required_shared_ptr<UINT8> m_videoram;
int m_nmi_enabled;
UINT8 m_control[8];
UINT8 m_nmi_enabled;
int m_r;
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(dummy_r);
DECLARE_READ8_MEMBER(semaphore_r);
DECLARE_PALETTE_INIT(shougi);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_nmi);
protected:
virtual void machine_start();
virtual void machine_reset();
};
void shougi_state::machine_start()
{
// zerofill
memset(m_control, 0, sizeof(m_control));
m_nmi_enabled = 0;
m_r = 0;
// register for savestates
save_item(NAME(m_control));
save_item(NAME(m_nmi_enabled));
save_item(NAME(m_r));
}
void shougi_state::machine_reset()
{
// 74LS259 is auto CLR on reset
for (int i = 0; i < 8; i++)
control_w(m_maincpu->space(), i, 0);
}
/***************************************************************************
@ -232,12 +243,6 @@ WRITE8_MEMBER(shougi_state::control_w)
switch (offset)
{
case 0:
// TODO
// 0: sharedram = sub
// 1: sharedram = main
break;
case 1:
m_nmi_enabled = data;
@ -260,9 +265,13 @@ WRITE8_MEMBER(shougi_state::control_w)
break;
default:
// 7: ?????? connected to +5v via resistor
// 0: 0: sharedram = sub, 1: sharedram = main (TODO!)
// 2: ?
// 7: nothing? connected to +5v via resistor
break;
}
m_control[offset] = data;
}
@ -275,7 +284,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, shougi_state )
AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") AM_WRITE(watchdog_reset_w) /* game won't boot if watchdog doesn't work */
AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w)
AM_RANGE(0x6800, 0x6800) AM_DEVWRITE("aysnd", ay8910_device, data_w)
AM_RANGE(0x7000, 0x73ff) AM_DEVREADWRITE("alpha_8201", alpha_8201_device, main_ram_r, main_ram_w) /* 2114 x 2 (0x400 x 4bit each) */
AM_RANGE(0x7000, 0x73ff) AM_DEVREADWRITE("alpha_8201", alpha_8201_device, ext_ram_r, ext_ram_w)
AM_RANGE(0x7800, 0x7bff) AM_RAM AM_SHARE("sharedram") /* 2114 x 2 (0x400 x 4bit each) */
AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("videoram") /* 4116 x 16 (32K) */
ADDRESS_MAP_END
@ -283,15 +292,12 @@ ADDRESS_MAP_END
// subcpu side
READ8_MEMBER(shougi_state::dummy_r)
READ8_MEMBER(shougi_state::semaphore_r)
{
// ?
// d0: waits for it to be set before handling NMI routine
// hmm it must be a signal from maincpu, but what?
m_r ^= 1;
if (m_r)
return 0xff;
else
return 0;
return m_r;
}
@ -302,7 +308,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( readport_sub, AS_IO, 8, shougi_state )
ADDRESS_MAP_GLOBAL_MASK(0x00ff)
AM_RANGE(0x00, 0x00) AM_READ(dummy_r)
AM_RANGE(0x00, 0x00) AM_READ(semaphore_r)
ADDRESS_MAP_END
@ -403,7 +409,7 @@ static MACHINE_CONFIG_START( shougi, shougi_state )
MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL_10MHz/4/8)
MCFG_QUANTUM_PERFECT_CPU("maincpu")
MCFG_WATCHDOG_VBLANK_INIT(16) // assuming it's the same as champbas
MCFG_WATCHDOG_VBLANK_INIT(0x10) // assuming it's the same as champbas
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -448,7 +454,7 @@ ROM_START( shougi )
/* shougi has one socket empty */
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_REGION( 0x0020, "proms", 0 )
ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) )
@ -471,7 +477,7 @@ ROM_START( shougi2 )
ROM_LOAD( "10-2.3l", 0x5000, 0x1000, CRC(a26385fd) SHA1(2adb21bb4f67a378014bc1edda48daca349d17e1) )
ROM_REGION( 0x2000, "alpha_8201:mcu", 0 )
ROM_LOAD( "alpha-8201__44801a75__2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_LOAD( "alpha-8201_44801a75_2f25.bin", 0x0000, 0x2000, CRC(b77931ac) SHA1(405b02585e80d95a2821455538c5c2c31ce262d1) )
ROM_REGION( 0x0020, "proms", 0 )
ROM_LOAD( "pr.2l", 0x0000, 0x0020, CRC(cd3559ff) SHA1(a1291b06a8a337943660b2ef62c94c49d58a6fb5) )

View File

@ -14,9 +14,6 @@ class champbas_state : public driver_device
public:
champbas_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_bg_videoram(*this, "bg_videoram"),
m_spriteram(*this, "spriteram"),
m_spriteram_2(*this, "spriteram_2"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_mcu(*this, "mcu"),
@ -24,29 +21,34 @@ public:
m_dac1(*this, "dac1"),
m_dac2(*this, "dac2"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
m_palette(*this, "palette"),
m_bg_videoram(*this, "bg_videoram"),
m_spriteram(*this, "spriteram"),
m_spriteram_2(*this, "spriteram_2")
{ }
/* memory pointers */
// devices, memory pointers
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_mcu;
optional_device<dac_device> m_dac;
optional_device<dac_device> m_dac1;
optional_device<dac_device> m_dac2;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_shared_ptr<UINT8> m_bg_videoram;
required_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_spriteram_2;
/* video-related */
tilemap_t *m_bg_tilemap;
UINT8 m_gfx_bank;
UINT8 m_palette_bank;
tilemap_t *m_bg_tilemap;
UINT8 m_gfx_bank;
UINT8 m_palette_bank;
/* misc */
int m_watchdog_count;
UINT8 m_irq_mask;
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_mcu;
UINT8 m_irq_mask;
DECLARE_WRITE8_MEMBER(champbas_watchdog_reset_w);
DECLARE_WRITE8_MEMBER(irq_enable_w);
DECLARE_WRITE8_MEMBER(champbas_mcu_switch_w);
DECLARE_WRITE8_MEMBER(champbas_mcu_halt_w);
@ -63,23 +65,17 @@ public:
DECLARE_DRIVER_INIT(champbas);
TILE_GET_INFO_MEMBER(champbas_get_bg_tile_info);
TILE_GET_INFO_MEMBER(exctsccr_get_bg_tile_info);
DECLARE_MACHINE_START(champbas);
DECLARE_MACHINE_RESET(champbas);
DECLARE_VIDEO_START(champbas);
DECLARE_PALETTE_INIT(champbas);
DECLARE_MACHINE_START(exctsccr);
DECLARE_VIDEO_START(exctsccr);
DECLARE_PALETTE_INIT(exctsccr);
UINT32 screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_exctsccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_eof_champbas(screen_device &screen, bool state);
INTERRUPT_GEN_MEMBER(vblank_irq);
TIMER_CALLBACK_MEMBER(exctsccr_fm_callback);
TIMER_DEVICE_CALLBACK_MEMBER(exctsccr_sound_irq);
void champbas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void exctsccr_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
optional_device<dac_device> m_dac;
optional_device<dac_device> m_dac1;
optional_device<dac_device> m_dac2;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
virtual void machine_start();
virtual void machine_reset();
};

View File

@ -62,6 +62,7 @@ pin HD44801 Alpha
TODO:
- bus conflicts?
- support larger RAM size, if any game uses it
----------------------------------------------------------------------------
@ -297,14 +298,14 @@ void alpha_8201_device::device_start()
m_shared_ram = auto_alloc_array_clear(machine(), UINT8, 0x400);
// zerofill
m_dir = 0;
m_bus = 0;
m_mcu_address = 0;
m_mcu_d = 0;
memset(m_mcu_r, 0, sizeof(m_mcu_r));
// register for savestates
save_pointer(NAME(m_shared_ram), 0x400);
save_item(NAME(m_dir));
save_item(NAME(m_bus));
save_item(NAME(m_mcu_address));
save_item(NAME(m_mcu_d));
save_item(NAME(m_mcu_r));
@ -335,7 +336,7 @@ machine_config_constructor alpha_8201_device::device_mconfig_additions() const
void alpha_8201_device::device_reset()
{
m_dir = 0;
m_bus = 0;
m_mcu->set_input_line(0, CLEAR_LINE);
}
@ -350,7 +351,7 @@ void alpha_8201_device::device_reset()
void alpha_8201_device::mcu_writeram()
{
// RAM WR is level-triggered
if (m_dir && (m_mcu_d & 0xc) == 0xc)
if (m_bus && (m_mcu_d & 0xc) == 0xc)
m_shared_ram[m_mcu_address] = m_mcu_r[0] << 4 | m_mcu_r[1];
}
@ -365,7 +366,7 @@ READ8_MEMBER(alpha_8201_device::mcu_data_r)
{
UINT8 ret = 0;
if (m_dir && ~m_mcu_d & 4)
if (m_bus && ~m_mcu_d & 4)
ret = m_shared_ram[m_mcu_address];
else
logerror("%s: MCU side invalid read\n", tag());
@ -403,7 +404,9 @@ WRITE16_MEMBER(alpha_8201_device::mcu_d_w)
WRITE_LINE_MEMBER(alpha_8201_device::bus_dir_w)
{
// set bus direction to 0: external, 1: MCU side
m_dir = (state) ? 1 : 0;
// selects one of two 74LS245 (octal bus transceiver) for databus, addressbus via
// a couple of 74LS157 (2-input multiplexer)
m_bus = (state) ? 1 : 0;
mcu_writeram();
}
@ -413,17 +416,17 @@ WRITE_LINE_MEMBER(alpha_8201_device::mcu_start_w)
m_mcu->set_input_line(0, (state) ? ASSERT_LINE : CLEAR_LINE);
}
READ8_MEMBER(alpha_8201_device::main_ram_r)
READ8_MEMBER(alpha_8201_device::ext_ram_r)
{
if (m_dir)
if (m_bus)
logerror("%s: EXT side read bus conflict\n", tag());
return m_shared_ram[offset & 0x3ff];
}
WRITE8_MEMBER(alpha_8201_device::main_ram_w)
WRITE8_MEMBER(alpha_8201_device::ext_ram_w)
{
if (!m_dir)
if (!m_bus)
m_shared_ram[offset & 0x3ff] = data;
else
logerror("%s: EXT side write bus conflict\n", tag());

View File

@ -24,8 +24,8 @@ public:
// external I/O
DECLARE_WRITE_LINE_MEMBER(bus_dir_w);
DECLARE_WRITE_LINE_MEMBER(mcu_start_w);
DECLARE_READ8_MEMBER(main_ram_r);
DECLARE_WRITE8_MEMBER(main_ram_w);
DECLARE_READ8_MEMBER(ext_ram_r);
DECLARE_WRITE8_MEMBER(ext_ram_w);
protected:
// device-level overrides
@ -38,7 +38,7 @@ private:
required_device<cpu_device> m_mcu;
// internal state
int m_dir; // shared RAM bus direction
int m_bus; // shared RAM bus direction
UINT16 m_mcu_address; // MCU side RAM address
UINT16 m_mcu_d; // MCU D output data
UINT8 m_mcu_r[4]; // MCU R0-R3 output data

View File

@ -29,39 +29,36 @@ READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r )
if (!m_rom_mode)
return m_ram->pointer()[0x2000 + offset];
// This isn't really accurate - bus fighting will occur for many values
// since each peripheral only checks two bits. We just return 0xFF for
// any undocumented address.
UINT8 data = 0xFF;
switch (offset & 0x0F00)
// Since each peripheral only checks two bits, many addresses will
// result in multiple peripherals attempting to drive the bus. This is
// simulated by ANDing all the values together.
UINT8 data = 0xFF;
if ((offset & 0x900) == 0x100) // Floppy
data &= m_fdc->read(space, offset & 0x03);
if ((offset & 0x900) == 0x900) // IEEE488 PIA
data &= m_pia0->read(space, offset & 0x03);
if ((offset & 0xA00) == 0x200) // Keyboard
{
case 0x100: // Floppy
data = m_fdc->read(space, offset & 0x03);
break;
case 0x200: // Keyboard
if (offset & 0x01) data &= m_keyb_row0->read();
if (offset & 0x02) data &= m_keyb_row1->read();
if (offset & 0x04) data &= m_keyb_row3->read();
if (offset & 0x08) data &= m_keyb_row4->read();
if (offset & 0x10) data &= m_keyb_row5->read();
if (offset & 0x20) data &= m_keyb_row2->read();
if (offset & 0x40) data &= m_keyb_row6->read();
if (offset & 0x80) data &= m_keyb_row7->read();
break;
case 0x400: // SCREEN-PAC
if (m_screen_pac) data &= 0xFB;
break;
case 0x900: // IEEE488 PIA
data = m_pia0->read(space, offset & 0x03);
break;
case 0xA00: // Serial
if (offset & 0x01) data = m_acia->data_r(space, 0);
else data = m_acia->status_r(space, 0);
break;
case 0xC00: // Video PIA
data = m_pia1->read(space, offset & 0x03);
break;
if (offset & 0x01) data &= m_keyb_row0->read();
if (offset & 0x02) data &= m_keyb_row1->read();
if (offset & 0x04) data &= m_keyb_row3->read();
if (offset & 0x08) data &= m_keyb_row4->read();
if (offset & 0x10) data &= m_keyb_row5->read();
if (offset & 0x20) data &= m_keyb_row2->read();
if (offset & 0x40) data &= m_keyb_row6->read();
if (offset & 0x80) data &= m_keyb_row7->read();
}
if ((offset & 0xA00) == 0xA00) // Serial
{
if (offset & 0x01) data &= m_acia->data_r(space, 0);
else data &= m_acia->status_r(space, 0);
}
if ((offset & 0xC00) == 0x400) // SCREEN-PAC
{
if (m_screen_pac) data &= 0xFB;
}
if ((offset & 0xC00) == 0xC00) // Video PIA
data &= m_pia1->read(space, offset & 0x03);
return data;
}
@ -181,9 +178,9 @@ WRITE8_MEMBER( osborne1_state::ieee_pia_pb_w )
/*
bit description
0
1
2
0 0 = DATAn as output, 1 = DATAn as input
1 0 = NDAC/NRFD as output, 1 = NDAC/NRFD as input; also gates SRQ
2 0 = EOI/DAV as output, 1 = EOI/DAV as input
3 EOI
4 ATN
5 DAV
@ -212,7 +209,7 @@ WRITE8_MEMBER( osborne1_state::video_pia_port_a_w )
WRITE8_MEMBER( osborne1_state::video_pia_port_b_w )
{
m_beep_state = BIT(data, 5);
m_speaker->level_w((BIT(data, 5) && m_beep_state) ? 1 : 0);
if (BIT(data, 6))
{
@ -367,11 +364,12 @@ TIMER_CALLBACK_MEMBER(osborne1_state::video_callback)
{
int const y = machine().first_screen()->vpos();
UINT8 const ra = y % 10;
UINT8 const port_b = m_pia1->b_output();
// Check for start/end of visible area and clear/set CA1 on video PIA
if (y == 0)
{
m_scroll_y = m_pia1->b_output() & 0x1F;
m_scroll_y = port_b & 0x1F;
m_pia1->ca1_w(0);
}
else if (y == 240)
@ -409,32 +407,33 @@ TIMER_CALLBACK_MEMBER(osborne1_state::video_callback)
{
UINT16 const offs = row | ((col + x) & 0x7F);
UINT8 const chr = m_ram->pointer()[0xF000 + offs];
UINT8 const dim = m_ram->pointer()[0x10000 + offs] & 0x80;
UINT8 const clr = (m_ram->pointer()[0x10000 + offs] & 0x80) ? 2 : 1;
UINT8 const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[(ra << 7) | (chr & 0x7F)];
// Display a scanline of a character
*p++ = BIT(gfx, 7) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 7) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 6) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 6) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 5) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 5) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 4) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 4) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 3) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 3) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 2) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 2) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 1) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 1) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 0) ? ( dim ? 2 : 1 ) : 0;
*p++ = BIT(gfx, 0) ? clr : 0;
if (!hires) { p[0] = p[-1]; p++; }
}
}
// The beeper is gated so it's active four out of every ten scanlines
m_speaker->level_w((m_beep_state && (ra & 0x04)) ? 1 : 0);
m_beep_state = (ra & 0x04) ? 1 : 0;
m_speaker->level_w((BIT(port_b, 5) && m_beep_state) ? 1 : 0);
// Check reset key if necessary - it affects NMI
if (!m_ub6a_q)

View File

@ -8,6 +8,7 @@
#import "debugwindowhandler.h"
#import "debugconsole.h"
#import "debugcommandhistory.h"
#import "debugview.h"

View File

@ -153,7 +153,7 @@
// set default state
[devicesView expandItem:root expandChildren:YES];
[window makeFirstResponder:devicesView];
[window setTitle:[NSString stringWithFormat:@"All Devices"]];
[window setTitle:@"All Devices"];
// calculate the optimal size for everything
NSSize const desired = [NSScrollView frameSizeForContentSize:NSMakeSize(480, 320)

View File

@ -793,13 +793,13 @@ static void UpdateChangeCountCallback(void *userData,
newEffectMenu = [[NSMenu allocWithZone:[NSMenu zone]] initWithTitle:@"New"];
[menu setSubmenu:newEffectMenu forItem:item];
[newEffectMenu release];
item = [menu addItemWithTitle:@"Open…" action:@selector(openDocument:) keyEquivalent:@"o"];
item = [menu addItemWithTitle:[NSString stringWithFormat:@"Open%C", (unichar)0x2026] action:@selector(openDocument:) keyEquivalent:@"o"];
[menu addItem:[NSMenuItem separatorItem]];
item = [menu addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"];
item = [menu addItemWithTitle:@"Save" action:@selector(saveDocument:) keyEquivalent:@"s"];
item = [menu addItemWithTitle:@"Save As…" action:@selector(saveDocumentAs:) keyEquivalent:@"S"];
item = [menu addItemWithTitle:[NSString stringWithFormat:@"Save As%C", (unichar)0x2026] action:@selector(saveDocumentAs:) keyEquivalent:@"S"];
item = [menu addItemWithTitle:@"Save All" action:@selector(saveAllDocuments:) keyEquivalent:@""];
item = [menu addItemWithTitle:@"Revert to Saved" action:@selector(revertDocumentToSaved:) keyEquivalent:@"u"];
}

View File

@ -28,95 +28,74 @@
char *osd_get_clipboard_text(void)
{
char *result = NULL; /* core expects a malloced C string of uft8 data */
OSStatus err;
PasteboardRef pasteboard_ref;
OSStatus err;
PasteboardSyncFlags sync_flags;
PasteboardItemID item_id;
CFIndex flavor_count;
CFArrayRef flavor_type_array;
CFIndex flavor_index;
ItemCount item_count;
UInt32 item_index;
Boolean success = false;
err = PasteboardCreate(kPasteboardClipboard, &pasteboard_ref);
if (err)
return NULL;
if (!err)
PasteboardSynchronize(pasteboard_ref);
ItemCount item_count;
err = PasteboardGetItemCount(pasteboard_ref, &item_count);
char *result = NULL; // core expects a malloced C string of uft8 data
for (UInt32 item_index = 1; (item_index <= item_count) && !result; item_index++)
{
sync_flags = PasteboardSynchronize( pasteboard_ref );
PasteboardItemID item_id;
err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id);
if (err)
continue;
err = PasteboardGetItemCount(pasteboard_ref, &item_count );
CFArrayRef flavor_type_array;
err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array);
if (err)
continue;
for (item_index=1; item_index<=item_count; item_index++)
CFIndex const flavor_count = CFArrayGetCount(flavor_type_array);
for (CFIndex flavor_index = 0; (flavor_index < flavor_count) && !result; flavor_index++)
{
err = PasteboardGetItemIdentifier(pasteboard_ref, item_index, &item_id);
CFStringRef const flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index);
CFStringEncoding encoding;
if (UTTypeConformsTo(flavor_type, kUTTypeUTF16PlainText))
encoding = kCFStringEncodingUTF16;
else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText))
encoding = kCFStringEncodingUTF8;
else if (UTTypeConformsTo (flavor_type, kUTTypePlainText))
encoding = kCFStringEncodingMacRoman;
else
continue;
CFDataRef flavor_data;
err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data);
if (!err)
{
err = PasteboardCopyItemFlavors(pasteboard_ref, item_id, &flavor_type_array);
CFStringRef string_ref = CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, flavor_data, encoding);
CFDataRef data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?');
CFRelease(string_ref);
CFRelease(flavor_data);
if (!err)
CFIndex const length = CFDataGetLength(data_ref);
CFRange const range = CFRangeMake(0, length);
result = reinterpret_cast<char *>(osd_malloc_array(length + 1));
if (result)
{
flavor_count = CFArrayGetCount(flavor_type_array);
for (flavor_index = 0; flavor_index < flavor_count; flavor_index++)
{
CFStringRef flavor_type;
CFDataRef flavor_data;
CFStringEncoding encoding;
CFStringRef string_ref;
CFDataRef data_ref;
CFIndex length;
CFRange range;
flavor_type = (CFStringRef)CFArrayGetValueAtIndex(flavor_type_array, flavor_index);
if (UTTypeConformsTo (flavor_type, kUTTypeUTF16PlainText))
encoding = kCFStringEncodingUTF16;
else if (UTTypeConformsTo (flavor_type, kUTTypeUTF8PlainText))
encoding = kCFStringEncodingUTF8;
else if (UTTypeConformsTo (flavor_type, kUTTypePlainText))
encoding = kCFStringEncodingMacRoman;
else
continue;
err = PasteboardCopyItemFlavorData(pasteboard_ref, item_id, flavor_type, &flavor_data);
if( !err )
{
string_ref = CFStringCreateFromExternalRepresentation (kCFAllocatorDefault, flavor_data, encoding);
data_ref = CFStringCreateExternalRepresentation (kCFAllocatorDefault, string_ref, kCFStringEncodingUTF8, '?');
length = CFDataGetLength (data_ref);
range = CFRangeMake (0,length);
result = (char *)osd_malloc_array (length+1);
if (result != NULL)
{
CFDataGetBytes (data_ref, range, (unsigned char *)result);
result[length] = 0;
success = true;
break;
}
CFRelease(data_ref);
CFRelease(string_ref);
CFRelease(flavor_data);
}
}
CFRelease(flavor_type_array);
CFDataGetBytes(data_ref, range, reinterpret_cast<unsigned char *>(result));
result[length] = 0;
}
}
if (success)
break;
CFRelease(data_ref);
}
}
CFRelease(pasteboard_ref);
CFRelease(flavor_type_array);
}
CFRelease(pasteboard_ref);
return result;
}