mirror of
https://github.com/holub/mame
synced 2025-05-21 21:29:15 +03:00
Removed old CDP1802 CPU. (no whatsnew)
This commit is contained in:
parent
353f612831
commit
0f268291ed
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -56,9 +56,6 @@ src/emu/cpu/avr8/avr8dasm.c svneol=native#text/plain
|
||||
src/emu/cpu/ccpu/ccpu.c svneol=native#text/plain
|
||||
src/emu/cpu/ccpu/ccpu.h svneol=native#text/plain
|
||||
src/emu/cpu/ccpu/ccpudasm.c svneol=native#text/plain
|
||||
src/emu/cpu/cdp1802/1802dasm.c svneol=native#text/plain
|
||||
src/emu/cpu/cdp1802/cdp1802.c svneol=native#text/plain
|
||||
src/emu/cpu/cdp1802/cdp1802.h svneol=native#text/plain
|
||||
src/emu/cpu/cop400/cop400.c svneol=native#text/plain
|
||||
src/emu/cpu/cop400/cop400.h svneol=native#text/plain
|
||||
src/emu/cpu/cop400/cop400op.c svneol=native#text/plain
|
||||
|
@ -1,174 +0,0 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* disasm.c
|
||||
* portable cosmac cdp1802 emulator interface
|
||||
*
|
||||
* Copyright Peter Trauner, all rights reserved.
|
||||
*
|
||||
* - This source code is released as freeware for non-commercial purposes.
|
||||
* - You are free to use and redistribute this code in modified or
|
||||
* unmodified form, provided you list me in the credits.
|
||||
* - If you modify this source code, you must add a notice to each modified
|
||||
* source file that it has been changed. If you're a nice person, you
|
||||
* will clearly mark each change too. :)
|
||||
* - If you wish to use this for commercial purposes, please contact me at
|
||||
* peter.trauner@jk.uni-linz.ac.at
|
||||
* - The author of this copywritten work reserves the right to change the
|
||||
* terms of its usage and license at any time, including retroactively
|
||||
* - This entire notice must remain in the source code.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "debugger.h"
|
||||
|
||||
#include "cdp1802.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Ill,
|
||||
Imm,
|
||||
Imp,
|
||||
Imp2, // lownibble contains register number
|
||||
Imp3, // bit 0,1,2 1..7 contains n0,n1,n2 level
|
||||
Low, // only low byte of address specified
|
||||
Abs
|
||||
} Adr;
|
||||
|
||||
static const struct { const char *mnemonic; Adr adr; } table[]={
|
||||
{ "IDL", Imp }, { "LDN", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "INC", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "DEC", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
|
||||
{ "BR", Low }, { "BQ", Low }, { "BZ", Low }, { "BDF", Low },
|
||||
{ "B1", Low }, { "B2", Low }, { "B3", Low }, { "B4", Low },
|
||||
{ "SKP", Low }, { "BNQ", Low }, { "BNZ", Low }, { "BNF", Low },
|
||||
{ "BN1", Low }, { "BN2", Low }, { "BN3", Low }, { "BN4", Low },
|
||||
|
||||
{ "LDA", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "STR", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "IRX", Imp } ,{ "OUT", Imp3},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 } ,{ "INP", Imp3},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "RET", Imp }, { "DIS", Imp }, { "LDXA", Imp }, { "STXD", Imp },
|
||||
{ "ADC", Imp }, { "SDB", Imp }, { "SHRC", Imp }, { "SMB", Imp },
|
||||
{ "SAV", Imp }, { "MARK", Imp }, { "REQ", Imp }, { "SEQ", Imp },
|
||||
{ "ADCI", Imm }, { "SDBI", Imm }, { "SHLC", Imp }, { "SMBI", Imm },
|
||||
|
||||
|
||||
{ "GLO", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "GHI", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "PLO", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "PHI", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "LBR", Abs }, { "LBQ", Abs }, { "LBZ", Abs }, { "LBDF", Abs },
|
||||
{ "NOP", Imp }, { "LSNQ", Imp }, { "LSNZ", Imp }, { "LSNF", Imp },
|
||||
{ "LSKP", Imp }, { "LBNQ", Abs }, { "LBNZ", Abs }, { "LBNF", Abs },
|
||||
{ "LSIE", Imp }, { "LSQ", Imp }, { "LSZ", Imp }, { "LSDF", Imp },
|
||||
|
||||
{ "SEP", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "SEX", Imp2},{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
|
||||
|
||||
{ "LDX", Imp }, { "OR", Imp }, { "AND", Imp }, { "XOR", Imp },
|
||||
{ "ADD", Imp }, { "SD", Imp }, { "SHR", Imp }, { "SM", Imp },
|
||||
{ "LDI", Imm }, { "ORI", Imm }, { "ANI", Imm }, { "XRI", Imm },
|
||||
{ "ADI", Imm }, { "SDI", Imm }, { "SHL", Imp }, { "SMI", Imm },
|
||||
|
||||
};
|
||||
|
||||
CPU_DISASSEMBLE( cdp1802 )
|
||||
{
|
||||
UINT32 flags = 0;
|
||||
int oldpc = pc;
|
||||
int oper;
|
||||
UINT16 absolut;
|
||||
oldpc&=0xffff;
|
||||
pc=oldpc;
|
||||
oper=oprom[pc++ - oldpc];
|
||||
|
||||
switch(oper&0xf0) {
|
||||
case 0:
|
||||
if (oper==0) {
|
||||
sprintf(buffer,"%-5s",table[oper].mnemonic);
|
||||
} else {
|
||||
sprintf(buffer,"%-5sR%.1x",table[(oper&0xf0)|1].mnemonic, oper&0x0f);
|
||||
}
|
||||
break;
|
||||
case 0xd0:
|
||||
flags = DASMFLAG_STEP_OVER;
|
||||
/* fall through */
|
||||
case 0x10:
|
||||
case 0x20:
|
||||
case 0x40:
|
||||
case 0x50:
|
||||
case 0x80:
|
||||
case 0x90:
|
||||
case 0xa0:
|
||||
case 0xb0:
|
||||
case 0xe0:
|
||||
sprintf(buffer,"%-5sR%.1x",table[oper&0xf0].mnemonic, oper&0x0f);
|
||||
break;
|
||||
default:
|
||||
switch(oper&0xf8) {
|
||||
case 0x60:
|
||||
if (oper==0x60) {
|
||||
sprintf(buffer,"%-5s",table[oper].mnemonic);
|
||||
} else {
|
||||
sprintf(buffer,"%-5s%d",table[(oper&0xf8)|1].mnemonic, oper&0x7);
|
||||
}
|
||||
break;
|
||||
case 0x68:
|
||||
sprintf(buffer,"%-5s%d",table[(oper&0xf8)|1].mnemonic, oper&0x7);
|
||||
break;
|
||||
default:
|
||||
switch (table[oper].adr) {
|
||||
case Imp:
|
||||
sprintf(buffer,"%-5s",table[oper].mnemonic);
|
||||
if (oper == 0x70 || oper == 0x71)
|
||||
flags = DASMFLAG_STEP_OUT;
|
||||
break;
|
||||
case Imm:
|
||||
sprintf(buffer,"%-5s#%.2x",table[oper].mnemonic,oprom[pc++ - oldpc]);
|
||||
break;
|
||||
case Low:
|
||||
absolut=oprom[pc++ - oldpc];
|
||||
absolut|=pc&0xff00;
|
||||
sprintf(buffer,"%-5s%.4x",table[oper].mnemonic,absolut);
|
||||
break;
|
||||
case Abs:
|
||||
absolut=oprom[pc++ - oldpc]<<8;
|
||||
absolut|=oprom[pc++ - oldpc];
|
||||
sprintf(buffer,"%-5s%.4x",table[oper].mnemonic,absolut);
|
||||
break;
|
||||
default:
|
||||
sprintf(buffer,"%-5s%.2x","ill",oper);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return (pc-oldpc) | flags | DASMFLAG_SUPPORTED;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,99 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef __CDP1802_H__
|
||||
#define __CDP1802_H__
|
||||
|
||||
/*
|
||||
|
||||
RCA COSMAC Series Microprocessors
|
||||
|
||||
Type Internal ROM Internal RAM Timer
|
||||
-----------------------------------------------------
|
||||
CDP1802 none none no
|
||||
CDP1803 ? ? ?
|
||||
CDP1804 2 KB 64 bytes yes
|
||||
CDP1805 none 64 bytes yes
|
||||
CDP1806 none none yes
|
||||
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
CDP1802_INPUT_LINE_INT,
|
||||
CDP1802_INPUT_LINE_DMAIN,
|
||||
CDP1802_INPUT_LINE_DMAOUT
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
EF1 = 0x01,
|
||||
EF2 = 0x02,
|
||||
EF3 = 0x04,
|
||||
EF4 = 0x08
|
||||
};
|
||||
|
||||
enum _cdp1802_control_mode
|
||||
{
|
||||
CDP1802_MODE_LOAD,
|
||||
CDP1802_MODE_RESET,
|
||||
CDP1802_MODE_PAUSE,
|
||||
CDP1802_MODE_RUN
|
||||
};
|
||||
typedef enum _cdp1802_control_mode cdp1802_control_mode;
|
||||
|
||||
enum _cdp1802_state_code
|
||||
{
|
||||
CDP1802_STATE_CODE_S0_FETCH = 0,
|
||||
CDP1802_STATE_CODE_S1_EXECUTE,
|
||||
CDP1802_STATE_CODE_S2_DMA,
|
||||
CDP1802_STATE_CODE_S3_INTERRUPT
|
||||
};
|
||||
typedef enum _cdp1802_state_code cdp1802_state_code;
|
||||
|
||||
enum
|
||||
{
|
||||
CDP1802_P, CDP1802_X, CDP1802_D, CDP1802_B, CDP1802_T,
|
||||
CDP1802_R0, CDP1802_R1, CDP1802_R2, CDP1802_R3, CDP1802_R4, CDP1802_R5, CDP1802_R6, CDP1802_R7,
|
||||
CDP1802_R8, CDP1802_R9, CDP1802_Ra, CDP1802_Rb, CDP1802_Rc, CDP1802_Rd, CDP1802_Re, CDP1802_Rf,
|
||||
CDP1802_DF, CDP1802_IE, CDP1802_Q, CDP1802_N, CDP1802_I, CDP1802_SC,
|
||||
CDP1802_GENPC = STATE_GENPC
|
||||
};
|
||||
|
||||
typedef cdp1802_control_mode (*cdp1802_mode_read_func)(running_device *device);
|
||||
#define CDP1802_MODE_READ(name) cdp1802_control_mode name(running_device *device)
|
||||
|
||||
typedef UINT8 (*cdp1802_ef_read_func)(running_device *device);
|
||||
#define CDP1802_EF_READ(name) UINT8 name(running_device *device)
|
||||
|
||||
typedef void (*cdp1802_sc_write_func)(running_device *device, cdp1802_state_code state, int sc0, int sc1);
|
||||
#define CDP1802_SC_WRITE(name) void name(running_device *device, cdp1802_state_code state, int sc0, int sc1)
|
||||
|
||||
/* interface */
|
||||
typedef struct _cdp1802_interface cdp1802_interface;
|
||||
struct _cdp1802_interface
|
||||
{
|
||||
/* if specified, this gets called for every change of the mode pins (pins 2 and 3) */
|
||||
cdp1802_mode_read_func mode_r;
|
||||
|
||||
/* if specified, this gets called for every change read of the external flags (pins 21 thru 24) */
|
||||
cdp1802_ef_read_func ef_r;
|
||||
|
||||
/* if specified, this gets called for every change of the processor state (pins 5 and 6) */
|
||||
cdp1802_sc_write_func sc_w;
|
||||
|
||||
/* if specified, this gets called for every change of the Q pin (pin 4) */
|
||||
devcb_write_line out_q_func;
|
||||
|
||||
/* if specified, this gets called for every DMA read */
|
||||
devcb_read8 in_dma_func;
|
||||
|
||||
/* if specified, this gets called for every DMA write */
|
||||
devcb_write8 out_dma_func;
|
||||
};
|
||||
#define CDP1802_INTERFACE(name) const cdp1802_interface (name) =
|
||||
|
||||
DECLARE_LEGACY_CPU_DEVICE(CDP1802, cdp1802);
|
||||
|
||||
extern CPU_DISASSEMBLE( cdp1802 );
|
||||
|
||||
#endif /* __CDP1802_H__ */
|
@ -275,21 +275,6 @@ $(CPUOBJ)/esrip/esrip.o: $(CPUSRC)/esrip/esrip.c \
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# RCA CDP1802
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter CDP1802,$(CPUS)),)
|
||||
OBJDIRS += $(CPUOBJ)/cdp1802
|
||||
CPUOBJS += $(CPUOBJ)/cdp1802/cdp1802.o
|
||||
DASMOBJS += $(CPUOBJ)/cdp1802/1802dasm.o
|
||||
endif
|
||||
|
||||
$(CPUOBJ)/cdp1802/cdp1802.o: $(CPUSRC)/cdp1802/cdp1802.c \
|
||||
$(CPUSRC)/cdp1802/cdp1802.h
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# RCA COSMAC
|
||||
#-------------------------------------------------
|
||||
|
@ -95,7 +95,6 @@ CPUS += ADSP21062
|
||||
CPUS += DSP56156
|
||||
CPUS += RSP
|
||||
CPUS += ALPHA8201
|
||||
CPUS += CDP1802
|
||||
CPUS += COP400
|
||||
CPUS += TLCS90
|
||||
CPUS += TLCS900
|
||||
|
Loading…
Reference in New Issue
Block a user