mirror of
https://github.com/holub/mame
synced 2025-05-13 17:38:21 +03:00
Added skeleton device for Acorn Archimedes KART device
This commit is contained in:
parent
18880ee7fe
commit
32a13bebc8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1059,6 +1059,8 @@ src/emu/machine/8237dma.c svneol=native#text/plain
|
||||
src/emu/machine/8237dma.h svneol=native#text/plain
|
||||
src/emu/machine/8257dma.c svneol=native#text/plain
|
||||
src/emu/machine/8257dma.h svneol=native#text/plain
|
||||
src/emu/machine/aakart.c svneol=native#text/plain
|
||||
src/emu/machine/aakart.h svneol=native#text/plain
|
||||
src/emu/machine/adc0808.c svneol=native#text/plain
|
||||
src/emu/machine/adc0808.h svneol=native#text/plain
|
||||
src/emu/machine/adc083x.c svneol=native#text/plain
|
||||
|
@ -159,6 +159,7 @@ EMUMACHINEOBJS = \
|
||||
$(EMUMACHINE)/8042kbdc.o \
|
||||
$(EMUMACHINE)/8237dma.o \
|
||||
$(EMUMACHINE)/8257dma.o \
|
||||
$(EMUMACHINE)/aakart.o \
|
||||
$(EMUMACHINE)/adc0808.o \
|
||||
$(EMUMACHINE)/adc083x.o \
|
||||
$(EMUMACHINE)/adc1038.o \
|
||||
|
75
src/emu/machine/aakart.c
Normal file
75
src/emu/machine/aakart.c
Normal file
@ -0,0 +1,75 @@
|
||||
/***************************************************************************
|
||||
|
||||
Acorn Archimedes KART interface
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/aakart.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
// device type definition
|
||||
const device_type AAKART = &device_creator<aakart_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// aakart_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
aakart_device::aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, AAKART, "aakart", tag, owner, clock)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_validity_check - perform validity checks
|
||||
// on this device
|
||||
//-------------------------------------------------
|
||||
|
||||
void aakart_device::device_validity_check(validity_checker &valid) const
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void aakart_device::device_start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void aakart_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// READ/WRITE HANDLERS
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER( aakart_device::read )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( aakart_device::write )
|
||||
{
|
||||
}
|
57
src/emu/machine/aakart.h
Normal file
57
src/emu/machine/aakart.h
Normal file
@ -0,0 +1,57 @@
|
||||
/***************************************************************************
|
||||
|
||||
Acorn Archimedes KART interface
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AAKARTDEV_H__
|
||||
#define __AAKARTDEV_H__
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_AAKART_ADD(_tag,_freq) \
|
||||
MCFG_DEVICE_ADD(_tag, AAKART, _freq) \
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> aakart_device
|
||||
|
||||
class aakart_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
aakart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// I/O operations
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_validity_check(validity_checker &valid) const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type AAKART;
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -426,6 +426,7 @@ static MACHINE_CONFIG_START( aristmk5, aristmk5_state )
|
||||
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */
|
||||
|
||||
// MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
|
||||
// MCFG_AAKART_ADD("kart", 12000000) // TODO: frequency
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -26,6 +26,7 @@ PCB has a single OSC at 24MHz
|
||||
#include "sound/dac.h"
|
||||
#include "includes/archimds.h"
|
||||
#include "machine/i2cmem.h"
|
||||
#include "machine/aakart.h"
|
||||
|
||||
|
||||
class ertictac_state : public archimedes_state
|
||||
@ -229,8 +230,8 @@ static MACHINE_CONFIG_START( ertictac, ertictac_state )
|
||||
MCFG_CPU_PROGRAM_MAP(ertictac_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(ertictac_state, ertictac_podule_irq, 60) // FIXME: timing of this
|
||||
|
||||
|
||||
MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
|
||||
// MCFG_AAKART_ADD("kart", XTAL_24MHz/3) // TODO: frequency
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -6,8 +6,8 @@ Template for skeleton device
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __xxxDEV_H__
|
||||
#define __xxxDEV_H__
|
||||
#ifndef __XXXDEV_H__
|
||||
#define __XXXDEV_H__
|
||||
|
||||
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
#ifndef _ARCHIMEDES_H_
|
||||
#define _ARCHIMEDES_H_
|
||||
|
||||
#include "machine/aakart.h"
|
||||
|
||||
// interrupt definitions. these are for the real Archimedes computer - arcade
|
||||
// and gambling knockoffs likely are a bit different.
|
||||
|
||||
@ -38,8 +40,11 @@ class archimedes_state : public driver_device
|
||||
{
|
||||
public:
|
||||
archimedes_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) { }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_kart(*this, "kart")
|
||||
{ }
|
||||
|
||||
optional_device<aakart_device> m_kart;
|
||||
void archimedes_init();
|
||||
void archimedes_reset();
|
||||
void archimedes_driver_init();
|
||||
|
@ -39,6 +39,7 @@ static const UINT32 pixel_rate[4] = { 8000000, 12000000, 16000000, 24000000};
|
||||
|
||||
#define IOC_LOG 0
|
||||
|
||||
/* TODO: fix pending irqs */
|
||||
void archimedes_state::archimedes_request_irq_a(int mask)
|
||||
{
|
||||
m_ioc_regs[IRQ_STATUS_A] |= mask;
|
||||
@ -460,8 +461,8 @@ READ32_MEMBER( archimedes_state::ioc_ctrl_r )
|
||||
}
|
||||
|
||||
case KART: // keyboard read
|
||||
archimedes_request_irq_b(ARCHIMEDES_IRQB_KBD_XMIT_EMPTY);
|
||||
break;
|
||||
//archimedes_request_irq_b(ARCHIMEDES_IRQB_KBD_XMIT_EMPTY);
|
||||
return m_kart->read(space,0);
|
||||
|
||||
case IRQ_STATUS_A:
|
||||
return (m_ioc_regs[IRQ_STATUS_A] & 0x7f) | 0x80; // Force IRQ is always '1'
|
||||
@ -526,12 +527,7 @@ WRITE32_MEMBER( archimedes_state::ioc_ctrl_w )
|
||||
break;
|
||||
|
||||
case KART:
|
||||
#if 0
|
||||
if(data == 0x0d)
|
||||
printf("\n");
|
||||
else
|
||||
printf("%c",data);
|
||||
#endif
|
||||
m_kart->write(space,0,data);
|
||||
break;
|
||||
|
||||
case IRQ_MASK_A:
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "sound/dac.h"
|
||||
#include "includes/archimds.h"
|
||||
#include "machine/i2cmem.h"
|
||||
#include "machine/aakart.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
|
||||
@ -272,7 +273,7 @@ static MACHINE_CONFIG_START( a310, a310_state )
|
||||
MCFG_CPU_ADD("maincpu", ARM, 8000000) /* 8 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(a310_mem)
|
||||
|
||||
|
||||
MCFG_AAKART_ADD("kart", 8000000) // TODO: frequency
|
||||
MCFG_I2CMEM_ADD("i2cmem",i2cmem_interface)
|
||||
|
||||
/* video hardware */
|
||||
|
@ -1391,7 +1391,9 @@ WRITE8_MEMBER(pc9801_state::pc9801rs_bank_w)
|
||||
if((data & 0xf0) == 0x20)
|
||||
m_vram_bank = (data & 2) >> 1;
|
||||
else
|
||||
{
|
||||
printf("Unknown EMS RAM setting %02x\n",data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1445,7 +1447,7 @@ READ8_MEMBER(pc9801_state::pc9801rs_memory_r)
|
||||
else if(offset >= 0x000a4000 && offset <= 0x000a4fff) { return pc9801rs_knjram_r(space,offset & 0xfff); }
|
||||
else if(offset >= 0x000a8000 && offset <= 0x000bffff) { return pc9801_gvram_r(space,offset-0xa8000); }
|
||||
else if(offset >= 0x000e0000 && offset <= 0x000fffff) { return pc9801rs_ipl_r(space,offset & 0x1ffff); }
|
||||
else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1) { return pc9801rs_ex_wram_r(space,offset-0x00100000); }
|
||||
else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1) { return pc9801rs_ex_wram_r(space,offset-0x00100000); }
|
||||
else if(offset >= 0xfffe0000 && offset <= 0xffffffff) { return pc9801rs_ipl_r(space,offset & 0x1ffff); }
|
||||
|
||||
//printf("%08x\n",offset);
|
||||
|
Loading…
Reference in New Issue
Block a user