From 1fc48ce120a376c288daeeed98daccecf1b60d7b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 30 Sep 2015 17:21:14 +0200 Subject: move mess into mame (nw) --- src/mess/includes/abc1600.h | 158 --------- src/mess/includes/abc80.h | 184 ----------- src/mess/includes/abc80x.h | 356 -------------------- src/mess/includes/ac1.h | 48 --- src/mess/includes/adam.h | 118 ------- src/mess/includes/advision.h | 87 ----- src/mess/includes/aim65.h | 99 ------ src/mess/includes/alesis.h | 115 ------- src/mess/includes/amstrad.h | 325 ------------------ src/mess/includes/apollo.h | 602 --------------------------------- src/mess/includes/apple1.h | 92 ------ src/mess/includes/apple2.h | 382 --------------------- src/mess/includes/apple2gs.h | 267 --------------- src/mess/includes/apple3.h | 173 ---------- src/mess/includes/aquarius.h | 89 ----- src/mess/includes/arcadia.h | 128 -------- src/mess/includes/at.h | 200 ----------- src/mess/includes/atarist.h | 469 -------------------------- src/mess/includes/atom.h | 169 ---------- src/mess/includes/aussiebyte.h | 126 ------- src/mess/includes/avigo.h | 116 ------- src/mess/includes/b2m.h | 81 ----- src/mess/includes/banctec.h | 38 --- src/mess/includes/bbc.h | 439 ------------------------- src/mess/includes/bebox.h | 136 -------- src/mess/includes/bk.h | 50 --- src/mess/includes/bullet.h | 184 ----------- src/mess/includes/busicom.h | 45 --- src/mess/includes/bw12.h | 127 ------- src/mess/includes/bw2.h | 118 ------- src/mess/includes/c128.h | 253 -------------- src/mess/includes/c64.h | 216 ------------ src/mess/includes/c65.h | 2 - src/mess/includes/c80.h | 57 ---- src/mess/includes/cbm2.h | 329 ------------------ src/mess/includes/cgc7900.h | 104 ------ src/mess/includes/channelf.h | 54 --- src/mess/includes/coco.h | 269 --------------- src/mess/includes/coco12.h | 67 ---- src/mess/includes/coco3.h | 67 ---- src/mess/includes/coleco.h | 99 ------ src/mess/includes/compis.h | 135 -------- src/mess/includes/comquest.h | 34 -- src/mess/includes/comx35.h | 106 ------ src/mess/includes/concept.h | 71 ---- src/mess/includes/cosmicos.h | 147 --------- src/mess/includes/crvision.h | 114 ------- src/mess/includes/cxhumax.h | 281 ---------------- src/mess/includes/cybiko.h | 106 ------ src/mess/includes/dai.h | 81 ----- src/mess/includes/dccons.h | 48 --- src/mess/includes/dgn_beta.h | 226 ------------- src/mess/includes/dgnalpha.h | 97 ------ src/mess/includes/dm7000.h | 94 ------ src/mess/includes/dragon.h | 72 ---- src/mess/includes/ec184x.h | 43 --- src/mess/includes/einstein.h | 221 ------------- src/mess/includes/electron.h | 117 ------- src/mess/includes/elf.h | 70 ---- src/mess/includes/ep64.h | 98 ------ src/mess/includes/eti660.h | 75 ----- src/mess/includes/exp85.h | 48 --- src/mess/includes/fidelz80.h | 79 ----- src/mess/includes/fm7.h | 390 ---------------------- src/mess/includes/fmtowns.h | 384 ---------------------- src/mess/includes/galaxy.h | 58 ---- src/mess/includes/galeb.h | 36 -- src/mess/includes/gamate.h | 100 ------ src/mess/includes/gamecom.h | 290 ---------------- src/mess/includes/gamepock.h | 47 --- src/mess/includes/gb.h | 171 ---------- src/mess/includes/gba.h | 279 ---------------- src/mess/includes/genpc.h | 202 ------------ src/mess/includes/gp32.h | 250 -------------- src/mess/includes/hec2hrp.h | 199 ----------- src/mess/includes/hh_tms1k.h | 86 ----- src/mess/includes/hh_ucom4.h | 66 ---- src/mess/includes/hp48.h | 219 ------------ src/mess/includes/huebler.h | 104 ------ src/mess/includes/hx20.h | 139 -------- src/mess/includes/imds2.h | 145 -------- src/mess/includes/intv.h | 155 --------- src/mess/includes/jupiter.h | 59 ---- src/mess/includes/kaypro.h | 113 ------- src/mess/includes/kc.h | 189 ----------- src/mess/includes/kramermc.h | 41 --- src/mess/includes/kyocera.h | 291 ---------------- src/mess/includes/lc80.h | 68 ---- src/mess/includes/lisa.h | 237 ------------- src/mess/includes/llc.h | 64 ---- src/mess/includes/lviv.h | 70 ---- src/mess/includes/lynx.h | 295 ----------------- src/mess/includes/m5.h | 87 ----- src/mess/includes/mac.h | 562 ------------------------------- src/mess/includes/macpci.h | 169 ---------- src/mess/includes/mbc55x.h | 221 ------------- src/mess/includes/mbee.h | 171 ---------- src/mess/includes/mboard.h | 122 ------- src/mess/includes/mc1000.h | 120 ------- src/mess/includes/mc1502.h | 84 ----- src/mess/includes/mc80.h | 57 ---- src/mess/includes/md_cons.h | 49 --- src/mess/includes/micronic.h | 98 ------ src/mess/includes/microtan.h | 103 ------ src/mess/includes/mikro80.h | 80 ----- src/mess/includes/mikromik.h | 138 -------- src/mess/includes/mpf1.h | 78 ----- src/mess/includes/mpz80.h | 99 ------ src/mess/includes/msbc1.h | 28 -- src/mess/includes/msx.h | 265 --------------- src/mess/includes/mtx.h | 99 ------ src/mess/includes/mz700.h | 119 ------- src/mess/includes/mz80.h | 70 ---- src/mess/includes/nc.h | 155 --------- src/mess/includes/nes.h | 120 ------- src/mess/includes/newbrain.h | 274 --------------- src/mess/includes/next.h | 190 ----------- src/mess/includes/ob68k1a.h | 62 ---- src/mess/includes/ondra.h | 76 ----- src/mess/includes/orao.h | 46 --- src/mess/includes/orion.h | 125 ------- src/mess/includes/osborne1.h | 147 --------- src/mess/includes/osi.h | 167 ---------- src/mess/includes/p2000t.h | 57 ---- src/mess/includes/partner.h | 45 --- src/mess/includes/pasopia.h | 137 -------- src/mess/includes/pc1251.h | 62 ---- src/mess/includes/pc1350.h | 60 ---- src/mess/includes/pc1401.h | 60 ---- src/mess/includes/pc1403.h | 65 ---- src/mess/includes/pc1512.h | 258 --------------- src/mess/includes/pc4.h | 76 ----- src/mess/includes/pc8001.h | 96 ------ src/mess/includes/pc8401a.h | 115 ------- src/mess/includes/pce.h | 82 ----- src/mess/includes/pcw.h | 140 -------- src/mess/includes/pcw16.h | 160 --------- src/mess/includes/pdp1.h | 336 ------------------- src/mess/includes/pecom.h | 76 ----- src/mess/includes/pes.h | 55 ---- src/mess/includes/pet.h | 284 ---------------- src/mess/includes/phc25.h | 59 ---- src/mess/includes/pk8020.h | 108 ------ src/mess/includes/plus4.h | 176 ---------- src/mess/includes/pmd85.h | 155 --------- src/mess/includes/pocketc.h | 26 -- src/mess/includes/poisk1.h | 101 ------ src/mess/includes/poly88.h | 85 ----- src/mess/includes/poly880.h | 59 ---- src/mess/includes/portfoli.h | 123 ------- src/mess/includes/pp01.h | 66 ---- src/mess/includes/primo.h | 70 ---- src/mess/includes/prof180x.h | 48 --- src/mess/includes/prof80.h | 98 ------ src/mess/includes/psion.h | 104 ------ src/mess/includes/px8.h | 87 ----- src/mess/includes/ql.h | 143 -------- src/mess/includes/radio86.h | 129 -------- src/mess/includes/rm380z.h | 138 -------- src/mess/includes/rmnimbus.h | 222 ------------- src/mess/includes/sage2.h | 99 ------ src/mess/includes/samcoupe.h | 203 ------------ src/mess/includes/sg1000.h | 149 --------- src/mess/includes/sms.h | 250 -------------- src/mess/includes/softbox.h | 68 ---- src/mess/includes/sorcerer.h | 110 ------- src/mess/includes/special.h | 153 --------- src/mess/includes/spectrum.h | 262 --------------- src/mess/includes/ssystem3.h | 84 ----- src/mess/includes/super6.h | 89 ----- src/mess/includes/super80.h | 123 ------- src/mess/includes/superslave.h | 75 ----- src/mess/includes/svi318.h | 159 --------- src/mess/includes/svision.h | 92 ------ src/mess/includes/swtpc09.h | 150 --------- src/mess/includes/tandy2k.h | 229 ------------- src/mess/includes/tdv2324.h | 87 ----- src/mess/includes/tek405x.h | 162 --------- src/mess/includes/thomson.h | 713 ---------------------------------------- src/mess/includes/ti85.h | 229 ------------- src/mess/includes/ti89.h | 89 ----- src/mess/includes/tiki100.h | 146 -------- src/mess/includes/tmc1800.h | 209 ------------ src/mess/includes/tmc2000e.h | 87 ----- src/mess/includes/tmc600.h | 101 ------ src/mess/includes/trs80.h | 206 ------------ src/mess/includes/trs80m2.h | 168 ---------- src/mess/includes/tsispch.h | 58 ---- src/mess/includes/tx0.h | 329 ------------------ src/mess/includes/ut88.h | 100 ------ src/mess/includes/v1050.h | 235 ------------- src/mess/includes/vc4000.h | 157 --------- src/mess/includes/vcs80.h | 52 --- src/mess/includes/vector06.h | 102 ------ src/mess/includes/vic10.h | 118 ------- src/mess/includes/vic20.h | 162 --------- src/mess/includes/victor9k.h | 156 --------- src/mess/includes/vidbrain.h | 126 ------- src/mess/includes/vip.h | 129 -------- src/mess/includes/vixen.h | 133 -------- src/mess/includes/vtech2.h | 96 ------ src/mess/includes/wangpc.h | 205 ------------ src/mess/includes/wswan.h | 104 ------ src/mess/includes/x07.h | 285 ---------------- src/mess/includes/x1.h | 303 ----------------- src/mess/includes/x68k.h | 362 -------------------- src/mess/includes/xerox820.h | 166 ---------- src/mess/includes/xor100.h | 107 ------ src/mess/includes/z80ne.h | 192 ----------- src/mess/includes/z88.h | 95 ------ src/mess/includes/zapcomputer.h | 30 -- src/mess/includes/zx.h | 112 ------- 212 files changed, 30896 deletions(-) delete mode 100644 src/mess/includes/abc1600.h delete mode 100644 src/mess/includes/abc80.h delete mode 100644 src/mess/includes/abc80x.h delete mode 100644 src/mess/includes/ac1.h delete mode 100644 src/mess/includes/adam.h delete mode 100644 src/mess/includes/advision.h delete mode 100644 src/mess/includes/aim65.h delete mode 100644 src/mess/includes/alesis.h delete mode 100644 src/mess/includes/amstrad.h delete mode 100644 src/mess/includes/apollo.h delete mode 100644 src/mess/includes/apple1.h delete mode 100644 src/mess/includes/apple2.h delete mode 100644 src/mess/includes/apple2gs.h delete mode 100644 src/mess/includes/apple3.h delete mode 100644 src/mess/includes/aquarius.h delete mode 100644 src/mess/includes/arcadia.h delete mode 100644 src/mess/includes/at.h delete mode 100644 src/mess/includes/atarist.h delete mode 100644 src/mess/includes/atom.h delete mode 100644 src/mess/includes/aussiebyte.h delete mode 100644 src/mess/includes/avigo.h delete mode 100644 src/mess/includes/b2m.h delete mode 100644 src/mess/includes/banctec.h delete mode 100644 src/mess/includes/bbc.h delete mode 100644 src/mess/includes/bebox.h delete mode 100644 src/mess/includes/bk.h delete mode 100644 src/mess/includes/bullet.h delete mode 100644 src/mess/includes/busicom.h delete mode 100644 src/mess/includes/bw12.h delete mode 100644 src/mess/includes/bw2.h delete mode 100644 src/mess/includes/c128.h delete mode 100644 src/mess/includes/c64.h delete mode 100644 src/mess/includes/c65.h delete mode 100644 src/mess/includes/c80.h delete mode 100644 src/mess/includes/cbm2.h delete mode 100644 src/mess/includes/cgc7900.h delete mode 100644 src/mess/includes/channelf.h delete mode 100644 src/mess/includes/coco.h delete mode 100644 src/mess/includes/coco12.h delete mode 100644 src/mess/includes/coco3.h delete mode 100644 src/mess/includes/coleco.h delete mode 100644 src/mess/includes/compis.h delete mode 100644 src/mess/includes/comquest.h delete mode 100644 src/mess/includes/comx35.h delete mode 100644 src/mess/includes/concept.h delete mode 100644 src/mess/includes/cosmicos.h delete mode 100644 src/mess/includes/crvision.h delete mode 100644 src/mess/includes/cxhumax.h delete mode 100644 src/mess/includes/cybiko.h delete mode 100644 src/mess/includes/dai.h delete mode 100644 src/mess/includes/dccons.h delete mode 100644 src/mess/includes/dgn_beta.h delete mode 100644 src/mess/includes/dgnalpha.h delete mode 100644 src/mess/includes/dm7000.h delete mode 100644 src/mess/includes/dragon.h delete mode 100644 src/mess/includes/ec184x.h delete mode 100644 src/mess/includes/einstein.h delete mode 100644 src/mess/includes/electron.h delete mode 100644 src/mess/includes/elf.h delete mode 100644 src/mess/includes/ep64.h delete mode 100644 src/mess/includes/eti660.h delete mode 100644 src/mess/includes/exp85.h delete mode 100644 src/mess/includes/fidelz80.h delete mode 100644 src/mess/includes/fm7.h delete mode 100644 src/mess/includes/fmtowns.h delete mode 100644 src/mess/includes/galaxy.h delete mode 100644 src/mess/includes/galeb.h delete mode 100644 src/mess/includes/gamate.h delete mode 100644 src/mess/includes/gamecom.h delete mode 100644 src/mess/includes/gamepock.h delete mode 100644 src/mess/includes/gb.h delete mode 100644 src/mess/includes/gba.h delete mode 100644 src/mess/includes/genpc.h delete mode 100644 src/mess/includes/gp32.h delete mode 100644 src/mess/includes/hec2hrp.h delete mode 100644 src/mess/includes/hh_tms1k.h delete mode 100644 src/mess/includes/hh_ucom4.h delete mode 100644 src/mess/includes/hp48.h delete mode 100644 src/mess/includes/huebler.h delete mode 100644 src/mess/includes/hx20.h delete mode 100644 src/mess/includes/imds2.h delete mode 100644 src/mess/includes/intv.h delete mode 100644 src/mess/includes/jupiter.h delete mode 100644 src/mess/includes/kaypro.h delete mode 100644 src/mess/includes/kc.h delete mode 100644 src/mess/includes/kramermc.h delete mode 100644 src/mess/includes/kyocera.h delete mode 100644 src/mess/includes/lc80.h delete mode 100644 src/mess/includes/lisa.h delete mode 100644 src/mess/includes/llc.h delete mode 100644 src/mess/includes/lviv.h delete mode 100644 src/mess/includes/lynx.h delete mode 100644 src/mess/includes/m5.h delete mode 100644 src/mess/includes/mac.h delete mode 100644 src/mess/includes/macpci.h delete mode 100644 src/mess/includes/mbc55x.h delete mode 100644 src/mess/includes/mbee.h delete mode 100644 src/mess/includes/mboard.h delete mode 100644 src/mess/includes/mc1000.h delete mode 100644 src/mess/includes/mc1502.h delete mode 100644 src/mess/includes/mc80.h delete mode 100644 src/mess/includes/md_cons.h delete mode 100644 src/mess/includes/micronic.h delete mode 100644 src/mess/includes/microtan.h delete mode 100644 src/mess/includes/mikro80.h delete mode 100644 src/mess/includes/mikromik.h delete mode 100644 src/mess/includes/mpf1.h delete mode 100644 src/mess/includes/mpz80.h delete mode 100644 src/mess/includes/msbc1.h delete mode 100644 src/mess/includes/msx.h delete mode 100644 src/mess/includes/mtx.h delete mode 100644 src/mess/includes/mz700.h delete mode 100644 src/mess/includes/mz80.h delete mode 100644 src/mess/includes/nc.h delete mode 100644 src/mess/includes/nes.h delete mode 100644 src/mess/includes/newbrain.h delete mode 100644 src/mess/includes/next.h delete mode 100644 src/mess/includes/ob68k1a.h delete mode 100644 src/mess/includes/ondra.h delete mode 100644 src/mess/includes/orao.h delete mode 100644 src/mess/includes/orion.h delete mode 100644 src/mess/includes/osborne1.h delete mode 100644 src/mess/includes/osi.h delete mode 100644 src/mess/includes/p2000t.h delete mode 100644 src/mess/includes/partner.h delete mode 100644 src/mess/includes/pasopia.h delete mode 100644 src/mess/includes/pc1251.h delete mode 100644 src/mess/includes/pc1350.h delete mode 100644 src/mess/includes/pc1401.h delete mode 100644 src/mess/includes/pc1403.h delete mode 100644 src/mess/includes/pc1512.h delete mode 100644 src/mess/includes/pc4.h delete mode 100644 src/mess/includes/pc8001.h delete mode 100644 src/mess/includes/pc8401a.h delete mode 100644 src/mess/includes/pce.h delete mode 100644 src/mess/includes/pcw.h delete mode 100644 src/mess/includes/pcw16.h delete mode 100644 src/mess/includes/pdp1.h delete mode 100644 src/mess/includes/pecom.h delete mode 100644 src/mess/includes/pes.h delete mode 100644 src/mess/includes/pet.h delete mode 100644 src/mess/includes/phc25.h delete mode 100644 src/mess/includes/pk8020.h delete mode 100644 src/mess/includes/plus4.h delete mode 100644 src/mess/includes/pmd85.h delete mode 100644 src/mess/includes/pocketc.h delete mode 100644 src/mess/includes/poisk1.h delete mode 100644 src/mess/includes/poly88.h delete mode 100644 src/mess/includes/poly880.h delete mode 100644 src/mess/includes/portfoli.h delete mode 100644 src/mess/includes/pp01.h delete mode 100644 src/mess/includes/primo.h delete mode 100644 src/mess/includes/prof180x.h delete mode 100644 src/mess/includes/prof80.h delete mode 100644 src/mess/includes/psion.h delete mode 100644 src/mess/includes/px8.h delete mode 100644 src/mess/includes/ql.h delete mode 100644 src/mess/includes/radio86.h delete mode 100644 src/mess/includes/rm380z.h delete mode 100644 src/mess/includes/rmnimbus.h delete mode 100644 src/mess/includes/sage2.h delete mode 100644 src/mess/includes/samcoupe.h delete mode 100644 src/mess/includes/sg1000.h delete mode 100644 src/mess/includes/sms.h delete mode 100644 src/mess/includes/softbox.h delete mode 100644 src/mess/includes/sorcerer.h delete mode 100644 src/mess/includes/special.h delete mode 100644 src/mess/includes/spectrum.h delete mode 100644 src/mess/includes/ssystem3.h delete mode 100644 src/mess/includes/super6.h delete mode 100644 src/mess/includes/super80.h delete mode 100644 src/mess/includes/superslave.h delete mode 100644 src/mess/includes/svi318.h delete mode 100644 src/mess/includes/svision.h delete mode 100644 src/mess/includes/swtpc09.h delete mode 100644 src/mess/includes/tandy2k.h delete mode 100644 src/mess/includes/tdv2324.h delete mode 100644 src/mess/includes/tek405x.h delete mode 100644 src/mess/includes/thomson.h delete mode 100644 src/mess/includes/ti85.h delete mode 100644 src/mess/includes/ti89.h delete mode 100644 src/mess/includes/tiki100.h delete mode 100644 src/mess/includes/tmc1800.h delete mode 100644 src/mess/includes/tmc2000e.h delete mode 100644 src/mess/includes/tmc600.h delete mode 100644 src/mess/includes/trs80.h delete mode 100644 src/mess/includes/trs80m2.h delete mode 100644 src/mess/includes/tsispch.h delete mode 100644 src/mess/includes/tx0.h delete mode 100644 src/mess/includes/ut88.h delete mode 100644 src/mess/includes/v1050.h delete mode 100644 src/mess/includes/vc4000.h delete mode 100644 src/mess/includes/vcs80.h delete mode 100644 src/mess/includes/vector06.h delete mode 100644 src/mess/includes/vic10.h delete mode 100644 src/mess/includes/vic20.h delete mode 100644 src/mess/includes/victor9k.h delete mode 100644 src/mess/includes/vidbrain.h delete mode 100644 src/mess/includes/vip.h delete mode 100644 src/mess/includes/vixen.h delete mode 100644 src/mess/includes/vtech2.h delete mode 100644 src/mess/includes/wangpc.h delete mode 100644 src/mess/includes/wswan.h delete mode 100644 src/mess/includes/x07.h delete mode 100644 src/mess/includes/x1.h delete mode 100644 src/mess/includes/x68k.h delete mode 100644 src/mess/includes/xerox820.h delete mode 100644 src/mess/includes/xor100.h delete mode 100644 src/mess/includes/z80ne.h delete mode 100644 src/mess/includes/z88.h delete mode 100644 src/mess/includes/zapcomputer.h delete mode 100644 src/mess/includes/zx.h (limited to 'src/mess/includes') diff --git a/src/mess/includes/abc1600.h b/src/mess/includes/abc1600.h deleted file mode 100644 index 9e32684766f..00000000000 --- a/src/mess/includes/abc1600.h +++ /dev/null @@ -1,158 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __ABC1600__ -#define __ABC1600__ - -#include "bus/abcbus/abcbus.h" -#include "bus/rs232/rs232.h" -#include "cpu/m68000/m68000.h" -#include "machine/8530scc.h" -#include "bus/abckb/abckb.h" -#include "machine/abc1600mac.h" -#include "machine/e0516.h" -#include "machine/nmc9306.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "machine/z80dart.h" -#include "machine/z80dma.h" -#include "machine/z8536.h" -#include "video/abc1600.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define MC68008P8_TAG "3f" -#define Z8410AB1_0_TAG "5g" -#define Z8410AB1_1_TAG "7g" -#define Z8410AB1_2_TAG "9g" -#define Z8470AB1_TAG "17b" -#define Z8530B1_TAG "2a" -#define Z8536B1_TAG "15b" -#define SAB1797_02P_TAG "5a" -#define FDC9229BT_TAG "7a" -#define E050_C16PC_TAG "13b" -#define NMC9306_TAG "14c" -#define SCREEN_TAG "screen" -#define BUS0I_TAG "bus0i" -#define BUS0X_TAG "bus0x" -#define BUS1_TAG "bus1" -#define BUS2_TAG "bus2" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define ABC_KEYBOARD_PORT_TAG "kb" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> abc1600_state - -class abc1600_state : public driver_device -{ -public: - abc1600_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MC68008P8_TAG), - m_dma0(*this, Z8410AB1_0_TAG), - m_dma1(*this, Z8410AB1_1_TAG), - m_dma2(*this, Z8410AB1_2_TAG), - m_dart(*this, Z8470AB1_TAG), - m_scc(*this, Z8530B1_TAG), - m_cio(*this, Z8536B1_TAG), - m_fdc(*this, SAB1797_02P_TAG), - m_rtc(*this, E050_C16PC_TAG), - m_nvram(*this, NMC9306_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, SAB1797_02P_TAG":0"), - m_floppy1(*this, SAB1797_02P_TAG":1"), - m_floppy2(*this, SAB1797_02P_TAG":2"), - m_bus0i(*this, BUS0I_TAG), - m_bus0x(*this, BUS0X_TAG), - m_bus1(*this, BUS1_TAG), - m_bus2(*this, BUS2_TAG) - { } - - required_device m_maincpu; - required_device m_dma0; - required_device m_dma1; - required_device m_dma2; - required_device m_dart; - required_device m_scc; - required_device m_cio; - required_device m_fdc; - required_device m_rtc; - required_device m_nvram; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_bus0i; - required_device m_bus0x; - required_device m_bus1; - required_device m_bus2; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( bus_r ); - DECLARE_WRITE8_MEMBER( bus_w ); - DECLARE_READ8_MEMBER( dart_r ); - DECLARE_WRITE8_MEMBER( dart_w ); - DECLARE_READ8_MEMBER( scc_r ); - DECLARE_WRITE8_MEMBER( scc_w ); - DECLARE_READ8_MEMBER( cio_r ); - DECLARE_WRITE8_MEMBER( cio_w ); - DECLARE_WRITE8_MEMBER( fw0_w ); - DECLARE_WRITE8_MEMBER( fw1_w ); - DECLARE_WRITE8_MEMBER( spec_contr_reg_w ); - - DECLARE_WRITE_LINE_MEMBER( dbrq_w ); - - DECLARE_READ8_MEMBER( cio_pa_r ); - DECLARE_READ8_MEMBER( cio_pb_r ); - DECLARE_WRITE8_MEMBER( cio_pb_w ); - DECLARE_READ8_MEMBER( cio_pc_r ); - DECLARE_WRITE8_MEMBER( cio_pc_w ); - - DECLARE_WRITE_LINE_MEMBER( nmi_w ); - - IRQ_CALLBACK_MEMBER( abc1600_int_ack ); - - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - UINT8 read_io(offs_t offset); - void write_io(offs_t offset, UINT8 data); - UINT8 read_internal_io(offs_t offset); - void write_internal_io(offs_t offset, UINT8 data); - UINT8 read_external_io(offs_t offset); - void write_external_io(offs_t offset, UINT8 data); - - void update_drdy0(); - void update_drdy1(); - void update_drdy2(); - - // DMA - int m_dmadis; - int m_sysscc; - int m_sysfs; - UINT8 m_cause; - int m_partst; // parity test - - // peripherals - int m_cs7; // card select address bit 7 - int m_bus0; // BUS 0 selected - UINT8 m_csb; // card select - int m_atce; // V.24 channel A external clock enable - int m_btce; // V.24 channel B external clock enable -}; - - - -#endif diff --git a/src/mess/includes/abc80.h b/src/mess/includes/abc80.h deleted file mode 100644 index 253ed7e757d..00000000000 --- a/src/mess/includes/abc80.h +++ /dev/null @@ -1,184 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/***************************************************************************** - * - * includes/abc80.h - * - ****************************************************************************/ - -#ifndef __ABC80__ -#define __ABC80__ - -#include "bus/abcbus/abcbus.h" -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "imagedev/flopdrv.h" -#include "imagedev/printer.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "machine/abc80kb.h" -#include "machine/keyboard.h" -#include "machine/ram.h" -#include "machine/z80pio.h" -#include "sound/sn76477.h" -#include "sound/wave.h" - -#define ABC80_HTOTAL 384 -#define ABC80_HBEND 35 -#define ABC80_HBSTART 384 -#define ABC80_VTOTAL 312 -#define ABC80_VBEND 15 -#define ABC80_VBSTART 312 - -#define ABC80_K5_HSYNC 0x01 -#define ABC80_K5_DH 0x02 -#define ABC80_K5_LINE_END 0x04 -#define ABC80_K5_ROW_START 0x08 - -#define ABC80_K2_VSYNC 0x01 -#define ABC80_K2_DV 0x02 -#define ABC80_K2_FRAME_END 0x04 -#define ABC80_K2_FRAME_RESET 0x08 - -#define ABC80_J3_BLANK 0x01 -#define ABC80_J3_TEXT 0x02 -#define ABC80_J3_GRAPHICS 0x04 -#define ABC80_J3_VERSAL 0x08 - -#define ABC80_E7_VIDEO_RAM 0x01 -#define ABC80_E7_INT_RAM 0x02 -#define ABC80_E7_31K_EXT_RAM 0x04 -#define ABC80_E7_16K_INT_RAM 0x08 - -#define ABC80_CHAR_CURSOR 0x80 - -#define SCREEN_TAG "screen" -#define Z80_TAG "ab67" -#define Z80PIO_TAG "cd67" -#define SN76477_TAG "g8" -#define RS232_TAG "ser" -#define CASSETTE_TAG "cassette" -#define KEYBOARD_TAG "keyboard" -#define TIMER_CASSETTE_TAG "cass" - -class abc80_state : public driver_device -{ -public: - abc80_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_pio(*this, Z80PIO_TAG), - m_psg(*this, SN76477_TAG), - m_cassette(*this, "cassette"), - m_bus(*this, ABCBUS_TAG), - m_kb(*this, ABC80_KEYBOARD_TAG), - m_ram(*this, RAM_TAG), - m_rs232(*this, RS232_TAG), - m_palette(*this, "palette"), - m_rom(*this, Z80_TAG), - m_mmu_rom(*this, "mmu"), - m_char_rom(*this, "chargen"), - m_hsync_prom(*this, "hsync"), - m_vsync_prom(*this, "vsync"), - m_line_prom(*this, "line"), - m_attr_prom(*this, "attr"), - m_video_ram(*this, "video_ram"), - m_motor(false), - m_tape_in(1), - m_tape_in_latch(1) - { } - - required_device m_maincpu; - required_device m_pio; - required_device m_psg; - required_device m_cassette; - required_device m_bus; - required_device m_kb; - required_device m_ram; - required_device m_rs232; - required_device m_palette; - required_memory_region m_rom; - required_memory_region m_mmu_rom; - required_memory_region m_char_rom; - required_memory_region m_hsync_prom; - required_memory_region m_vsync_prom; - required_memory_region m_line_prom; - required_memory_region m_attr_prom; - optional_shared_ptr m_video_ram; - - enum - { - TIMER_ID_PIO, - TIMER_ID_CASSETTE, - TIMER_ID_BLINK, - TIMER_ID_VSYNC_ON, - TIMER_ID_VSYNC_OFF, - TIMER_ID_FAKE_KEYBOARD_CLEAR - }; - - enum - { - BOFA = 0xfe1c, - EOFA = 0xfe1e, - HEAD = 0xfe20 - }; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - virtual void machine_start(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void update_screen(bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE_LINE_MEMBER( vco_voltage_w ); - - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_READ8_MEMBER( pio_pb_r ); - DECLARE_WRITE8_MEMBER( pio_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( keydown_w ); - DECLARE_WRITE8_MEMBER( kbd_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( bac ); - - enum - { - MMU_XM = 0x01, - MMU_ROM = 0x02, - MMU_VRAMS = 0x04, - MMU_RAM = 0x08 - }; - - // keyboard state - int m_key_data; - int m_key_strobe; - int m_pio_astb; - - // video state - UINT8 m_latch; - int m_blink; - - // cassette state - bool m_motor; - int m_tape_in; - int m_tape_in_latch; - - // timers - emu_timer *m_pio_timer; - emu_timer *m_cassette_timer; - emu_timer *m_blink_timer; - emu_timer *m_vsync_on_timer; - emu_timer *m_vsync_off_timer; -}; - -//----------- defined in video/abc80.c ----------- - -MACHINE_CONFIG_EXTERN( abc80_video ); - -#endif diff --git a/src/mess/includes/abc80x.h b/src/mess/includes/abc80x.h deleted file mode 100644 index 86a54269778..00000000000 --- a/src/mess/includes/abc80x.h +++ /dev/null @@ -1,356 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __ABC800__ -#define __ABC800__ - -#include "bus/abcbus/abcbus.h" -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "cpu/mcs48/mcs48.h" -#include "imagedev/cassette.h" -#include "bus/abckb/abckb.h" -#include "bus/abckb/abc800kb.h" -#include "machine/e0516.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "machine/ram.h" -#include "sound/discrete.h" -#include "video/mc6845.h" -#include "video/saa5050.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define ABC800_X01 XTAL_12MHz -#define ABC806_X02 XTAL_32_768kHz - -#define ABC802_AT0 0x01 -#define ABC802_AT1 0x02 -#define ABC802_ATD 0x40 -#define ABC802_ATE 0x80 -#define ABC802_INV 0x80 - -#define ABC800C_CHAR_RAM_SIZE 0x400 -#define ABC800M_CHAR_RAM_SIZE 0x800 -#define ABC800_VIDEO_RAM_SIZE 0x4000 -#define ABC802_CHAR_RAM_SIZE 0x800 -#define ABC806_CHAR_RAM_SIZE 0x800 -#define ABC806_ATTR_RAM_SIZE 0x800 -#define ABC806_VIDEO_RAM_SIZE 0x20000 - -#define ABC800_CHAR_WIDTH 6 -#define ABC800_CCLK ABC800_X01/ABC800_CHAR_WIDTH - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define E0516_TAG "j13" -#define MC6845_TAG "b12" -#define SAA5052_TAG "5c" -#define Z80CTC_TAG "z80ctc" -#define Z80SIO_TAG "z80sio" -#define Z80DART_TAG "z80dart" -#define DISCRETE_TAG "discrete" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define ABC_KEYBOARD_PORT_TAG "kb" - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> abc800_state - -class abc800_state : public driver_device -{ -public: - abc800_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_dart(*this, Z80DART_TAG), - m_sio(*this, Z80SIO_TAG), - m_discrete(*this, "discrete"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_video_ram(*this, "video_ram"), - m_char_ram(*this, "char_ram"), - m_io_sb(*this, "SB"), - m_ctc_z0(0), - m_sio_txcb(0), - m_sio_txdb(1), - m_sio_rtsb(1), - m_dfd_out(0), - m_tape_ctr(4) - { } - - required_device m_maincpu; - required_device m_ctc; - required_device m_dart; - required_device m_sio; - optional_device m_discrete; - optional_device m_cassette; - required_device m_ram; - required_memory_region m_rom; - optional_shared_ptr m_video_ram; - optional_shared_ptr m_char_ram; - required_ioport m_io_sb; - - enum - { - TIMER_ID_CTC, - TIMER_ID_CASSETTE - }; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - - void bankswitch(); - void clock_cassette(int state); - - DECLARE_READ8_MEMBER( pling_r ); - DECLARE_READ8_MEMBER( keyboard_col_r ); - DECLARE_WRITE8_MEMBER( keyboard_row_w ); - DECLARE_WRITE8_MEMBER( keyboard_ctrl_w ); - DECLARE_READ8_MEMBER( keyboard_t1_r ); - DECLARE_WRITE8_MEMBER( hrs_w ); - DECLARE_WRITE8_MEMBER( hrc_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z0_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z1_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); - DECLARE_WRITE_LINE_MEMBER( sio_txdb_w ); - DECLARE_WRITE_LINE_MEMBER( sio_dtrb_w ); - DECLARE_WRITE_LINE_MEMBER( sio_rtsb_w ); - - // memory state - int m_fetch_charram; // opcode fetched from character RAM region (0x7800-0x7fff) - - // sound state - int m_pling; - - // serial state - UINT8 m_sb; - int m_ctc_z0; - int m_sio_txcb; - int m_sio_txdb; - int m_sio_rtsb; - int m_dfd_out; - int m_dfd_in; - int m_tape_ctr; - - // video state - UINT8 m_hrs; // HR picture start scanline - UINT8 m_fgctl; // HR foreground control - - // timers - emu_timer *m_ctc_timer; - emu_timer *m_cassette_timer; -}; - - -// ======================> abc800m_state - -class abc800m_state : public abc800_state -{ -public: - abc800m_state(const machine_config &mconfig, device_type type, const char *tag) : - abc800_state(mconfig, type, tag), - m_crtc(*this, MC6845_TAG), - m_palette(*this, "palette"), - m_fgctl_prom(*this, "hru2"), - m_char_rom(*this, MC6845_TAG) - { } - - required_device m_crtc; - required_device m_palette; - required_memory_region m_fgctl_prom; - required_memory_region m_char_rom; - - DECLARE_DRIVER_INIT(driver_init); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_DIRECT_UPDATE_MEMBER( direct_update_handler ); - MC6845_UPDATE_ROW( abc800m_update_row ); -}; - - -// ======================> abc800c_state - -class abc800c_state : public abc800_state -{ -public: - abc800c_state(const machine_config &mconfig, device_type type, const char *tag) : - abc800_state(mconfig, type, tag), - m_trom(*this, SAA5052_TAG), - m_palette(*this, "palette"), - m_fgctl_prom(*this, "hru2") - { } - - required_device m_trom; - required_device m_palette; - required_memory_region m_fgctl_prom; - - DECLARE_DRIVER_INIT(driver_init); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - offs_t translate_trom_offset(offs_t offset); - void hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( char_ram_r ); - DECLARE_DIRECT_UPDATE_MEMBER( direct_update_handler ); - DECLARE_PALETTE_INIT( abc800c ); -}; - - -// ======================> abc802_state - -class abc802_state : public abc800_state -{ -public: - abc802_state(const machine_config &mconfig, device_type type, const char *tag) : - abc800_state(mconfig, type, tag), - m_crtc(*this, MC6845_TAG), - m_palette(*this, "palette"), - m_char_rom(*this, MC6845_TAG), - m_config(*this, "CONFIG") - { } - - required_device m_crtc; - required_device m_palette; - required_memory_region m_char_rom; - required_ioport m_config; - - DECLARE_DRIVER_INIT(driver_init); - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void bankswitch(); - - DECLARE_READ8_MEMBER( pling_r ); - DECLARE_WRITE_LINE_MEMBER( lrs_w ); - DECLARE_WRITE_LINE_MEMBER( mux80_40_w ); - DECLARE_WRITE_LINE_MEMBER( vs_w ); - DECLARE_DIRECT_UPDATE_MEMBER( direct_update_handler ); - MC6845_UPDATE_ROW( abc802_update_row ); - - // cpu state - int m_lrs; // low RAM select - - // video state - int m_flshclk_ctr; // flash clock counter - int m_flshclk; // flash clock - int m_80_40_mux; // 40/80 column mode -}; - - -// ======================> abc806_state - -class abc806_state : public abc800_state -{ -public: - abc806_state(const machine_config &mconfig, device_type type, const char *tag) : - abc800_state(mconfig, type, tag), - m_crtc(*this, MC6845_TAG), - m_palette(*this, "palette"), - m_rtc(*this, E0516_TAG), - m_rad_prom(*this, "rad"), - m_hru2_prom(*this, "hru"), - m_char_rom(*this, MC6845_TAG), - m_attr_ram(*this, "attr_ram") - { } - - required_device m_crtc; - required_device m_palette; - required_device m_rtc; - required_memory_region m_rad_prom; - required_memory_region m_hru2_prom; - required_memory_region m_char_rom; - optional_shared_ptr m_attr_ram; - - DECLARE_DRIVER_INIT(driver_init); - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void bankswitch(); - void hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( mai_r ); - DECLARE_WRITE8_MEMBER( mao_w ); - DECLARE_WRITE8_MEMBER( hrs_w ); - DECLARE_WRITE8_MEMBER( hrc_w ); - DECLARE_READ8_MEMBER( charram_r ); - DECLARE_WRITE8_MEMBER( charram_w ); - DECLARE_READ8_MEMBER( ami_r ); - DECLARE_WRITE8_MEMBER( amo_w ); - DECLARE_READ8_MEMBER( cli_r ); - DECLARE_WRITE8_MEMBER( sso_w ); - DECLARE_READ8_MEMBER( sti_r ); - DECLARE_WRITE8_MEMBER( sto_w ); - DECLARE_WRITE_LINE_MEMBER( keydtr_w ); - DECLARE_WRITE_LINE_MEMBER( hs_w ); - DECLARE_WRITE_LINE_MEMBER( vs_w ); - DECLARE_DIRECT_UPDATE_MEMBER( direct_update_handler ); - DECLARE_PALETTE_INIT( abc806 ); - MC6845_UPDATE_ROW( abc806_update_row ); - - // memory state - int m_keydtr; // keyboard DTR - int m_eme; // extended memory enable - UINT8 m_map[16]; // memory page register - - // video state - int m_txoff; // text display enable - int m_40; // 40/80 column mode - int m_flshclk_ctr; // flash clock counter - int m_flshclk; // flash clock - UINT8 m_attr_data; // attribute data latch - UINT8 m_hrc[16]; // HR palette - UINT8 m_sync; // line synchronization delay - UINT8 m_v50_addr; // vertical sync PROM address - int m_hru2_a8; // HRU II PROM address line 8 - UINT32 m_vsync_shift; // vertical sync shift register - int m_vsync; // vertical sync - int m_d_vsync; // delayed vertical sync -}; - - - -//************************************************************************** -// MACHINE CONFIGURATION -//************************************************************************** - -/*----------- defined in video/abc800.c -----------*/ - -MACHINE_CONFIG_EXTERN(abc800m_video); -MACHINE_CONFIG_EXTERN(abc800c_video); - -/*----------- defined in video/abc802.c -----------*/ - -MACHINE_CONFIG_EXTERN(abc802_video); - -/*----------- defined in video/abc806.c -----------*/ - -MACHINE_CONFIG_EXTERN(abc806_video); - -#endif diff --git a/src/mess/includes/ac1.h b/src/mess/includes/ac1.h deleted file mode 100644 index b18cad87b24..00000000000 --- a/src/mess/includes/ac1.h +++ /dev/null @@ -1,48 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/ac1.h - * - ****************************************************************************/ - -#ifndef AC1_H_ -#define AC1_H_ - -#include "machine/z80pio.h" -#include "imagedev/cassette.h" - -class ac1_state : public driver_device -{ -public: - ac1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_io_line(*this, "LINE") - { } - - DECLARE_DRIVER_INIT(ac1); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_ac1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_ac1_32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(ac1_port_b_r); - DECLARE_READ8_MEMBER(ac1_port_a_r); - DECLARE_WRITE8_MEMBER(ac1_port_a_w); - DECLARE_WRITE8_MEMBER(ac1_port_b_w); - -private: - required_device m_cassette; - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - required_ioport_array<7> m_io_line; -}; - -/*----------- defined in video/ac1.c -----------*/ -extern const gfx_layout ac1_charlayout; - -#endif /* AC1_h_ */ diff --git a/src/mess/includes/adam.h b/src/mess/includes/adam.h deleted file mode 100644 index 1705011db88..00000000000 --- a/src/mess/includes/adam.h +++ /dev/null @@ -1,118 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef ADAM_H_ -#define ADAM_H_ - -#include "emu.h" -#include "bus/adam/exp.h" -#include "bus/adamnet/adamnet.h" -#include "bus/coleco/ctrl.h" -#include "bus/coleco/exp.h" -#include "cpu/z80/z80.h" -#include "cpu/m6800/m6800.h" -#include "machine/coleco.h" -#include "machine/ram.h" -#include "sound/sn76496.h" -#include "video/tms9928a.h" - -#define Z80_TAG "u1" -#define M6801_TAG "u6" -#define SN76489A_TAG "u20" -#define TMS9928A_TAG "tms9928a" -#define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" - -class adam_state : public driver_device -{ -public: - adam_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_netcpu(*this, M6801_TAG), - m_vdc(*this, TMS9928A_TAG), - m_psg(*this, SN76489A_TAG), - m_ram(*this, RAM_TAG), - m_adamnet(*this, ADAMNET_TAG), - m_slot1(*this, ADAM_LEFT_EXPANSION_SLOT_TAG), - m_slot2(*this, ADAM_CENTER_EXPANSION_SLOT_TAG), - m_slot3(*this, ADAM_RIGHT_EXPANSION_SLOT_TAG), - m_cart(*this, COLECOVISION_CARTRIDGE_SLOT_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_boot_rom(*this, "boot"), - m_os7_rom(*this, "os7"), - m_mioc(0), - m_game(0), - m_an(0), - m_dma(1), - m_bwr(1), - m_spindis(1) - { } - - required_device m_maincpu; - required_device m_netcpu; - required_device m_vdc; - required_device m_psg; - required_device m_ram; - required_device m_adamnet; - required_device m_slot1; - required_device m_slot2; - required_device m_slot3; - required_device m_cart; - required_device m_joy1; - required_device m_joy2; - required_memory_region m_boot_rom; - required_memory_region m_os7_rom; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( mreq_r ); - DECLARE_WRITE8_MEMBER( mreq_w ); - DECLARE_READ8_MEMBER( iorq_r ); - DECLARE_WRITE8_MEMBER( iorq_w ); - - DECLARE_READ8_MEMBER( adamnet_r ); - DECLARE_WRITE8_MEMBER( adamnet_w ); - DECLARE_READ8_MEMBER( mioc_r ); - DECLARE_WRITE8_MEMBER( mioc_w ); - - DECLARE_WRITE8_MEMBER( m6801_p1_w ); - DECLARE_READ8_MEMBER( m6801_p2_r ); - DECLARE_WRITE8_MEMBER( m6801_p2_w ); - DECLARE_READ8_MEMBER( m6801_p3_r ); - DECLARE_WRITE8_MEMBER( m6801_p3_w ); - DECLARE_WRITE8_MEMBER( m6801_p4_w ); - - DECLARE_WRITE_LINE_MEMBER( vdc_int_w ); - - DECLARE_WRITE_LINE_MEMBER( os3_w ); - - DECLARE_WRITE_LINE_MEMBER( joy1_irq_w ); - DECLARE_WRITE_LINE_MEMBER( joy2_irq_w ); - - // memory state - UINT8 m_mioc; - int m_game; - - // ADAMnet state - UINT8 m_an; - - // DMA state - UINT16 m_ba; - int m_dma; - int m_bwr; - UINT8 m_data_in; - UINT8 m_data_out; - - // paddle state - int m_spindis; - - // video state - int m_vdp_nmi; -}; - -#endif diff --git a/src/mess/includes/advision.h b/src/mess/includes/advision.h deleted file mode 100644 index 3aa523c56df..00000000000 --- a/src/mess/includes/advision.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/***************************************************************************** - * - * includes/advision.h - * - ****************************************************************************/ - -#ifndef __ADVISION__ -#define __ADVISION__ - -#include "sound/dac.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define SCREEN_TAG "screen" -#define I8048_TAG "i8048" -#define COP411_TAG "cop411" - -class advision_state : public driver_device -{ -public: - advision_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8048_TAG), - m_soundcpu(*this, COP411_TAG), - m_dac(*this, "dac"), - m_cart(*this, "cartslot"), - m_bank1(*this, "bank1"), - m_joy(*this, "joystick"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_soundcpu; - required_device m_dac; - required_device m_cart; - required_memory_bank m_bank1; - required_ioport m_joy; - required_device m_palette; - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void update_dac(); - void vh_write(int data); - void vh_update(int x); - - DECLARE_READ8_MEMBER( rom_r ); - DECLARE_READ8_MEMBER( ext_ram_r ); - DECLARE_WRITE8_MEMBER( ext_ram_w ); - DECLARE_READ8_MEMBER( controller_r ); - DECLARE_WRITE8_MEMBER( bankswitch_w ); - DECLARE_WRITE8_MEMBER( av_control_w ); - DECLARE_READ8_MEMBER( vsync_r ); - DECLARE_READ8_MEMBER( sound_cmd_r ); - DECLARE_WRITE8_MEMBER( sound_g_w ); - DECLARE_WRITE8_MEMBER( sound_d_w ); - - memory_region *m_cart_rom; - - int m_ea_bank; - - /* external RAM state */ - dynamic_buffer m_ext_ram; - int m_rambank; - - /* video state */ - int m_frame_count; - int m_frame_start; - int m_video_enable; - int m_video_bank; - int m_video_hpos; - UINT8 m_led_latch[8]; - dynamic_buffer m_display; - - /* sound state */ - int m_sound_cmd; - int m_sound_d; - int m_sound_g; - DECLARE_PALETTE_INIT(advision); -}; - -#endif diff --git a/src/mess/includes/aim65.h b/src/mess/includes/aim65.h deleted file mode 100644 index 724fe61cb4c..00000000000 --- a/src/mess/includes/aim65.h +++ /dev/null @@ -1,99 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner, Dan Boris, Dirk Best, Robbbert -/***************************************************************************** - * - * includes/aim65.h - * - * Rockwell AIM-65 - * - ****************************************************************************/ - -#ifndef AIM65_H_ -#define AIM65_H_ - -#include "emu.h" -#include "cpu/m6502/m6502.h" -#include "video/dl1416.h" -#include "machine/6522via.h" -#include "machine/mos6530n.h" -#include "machine/6821pia.h" -#include "machine/ram.h" -#include "imagedev/cassette.h" -#include "sound/wave.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -/** R6502 Clock. - * - * The R6502 on AIM65 operates at 1 MHz. The frequency reference is a 4 MHz - * crystal controlled oscillator. Dual D-type flip-flop Z10 divides the 4 MHz - * signal by four to drive the R6502 phase 0 (O0) input with a 1 MHz clock. - */ -#define AIM65_CLOCK XTAL_4MHz/4 - - -class aim65_state : public driver_device -{ -public: - aim65_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette1(*this, "cassette"), - m_cassette2(*this, "cassette2"), - m_z24(*this, "z24"), - m_z25(*this, "z25"), - m_z26(*this, "z26"), - m_ram(*this, RAM_TAG), - m_ds1(*this, "ds1"), - m_ds2(*this, "ds2"), - m_ds3(*this, "ds3"), - m_ds4(*this, "ds4"), - m_ds5(*this, "ds5") - { } - - DECLARE_WRITE8_MEMBER(aim65_pia_a_w); - DECLARE_WRITE8_MEMBER(aim65_pia_b_w); - DECLARE_READ8_MEMBER(aim65_riot_b_r); - DECLARE_WRITE8_MEMBER(aim65_riot_a_w); - DECLARE_WRITE8_MEMBER(aim65_pa_w); - DECLARE_WRITE8_MEMBER(aim65_pb_w); - DECLARE_WRITE8_MEMBER(aim65_printer_on); - DECLARE_READ8_MEMBER(aim65_pb_r); - UINT8 m_pia_a; - UINT8 m_pia_b; - UINT8 m_riot_port_a; - UINT8 m_pb_save; - - required_device m_maincpu; - required_device m_cassette1; - required_device m_cassette2; - required_device m_z24; - required_device m_z25; - required_device m_z26; - required_device m_ram; - required_device m_ds1; - required_device m_ds2; - required_device m_ds3; - required_device m_ds4; - required_device m_ds5; - virtual void machine_start(); - TIMER_CALLBACK_MEMBER(aim65_printer_timer); - void aim65_pia(); - - DECLARE_WRITE16_MEMBER(aim65_update_ds1); - DECLARE_WRITE16_MEMBER(aim65_update_ds2); - DECLARE_WRITE16_MEMBER(aim65_update_ds3); - DECLARE_WRITE16_MEMBER(aim65_update_ds4); - DECLARE_WRITE16_MEMBER(aim65_update_ds5); - - void dl1416_update(dl1416_device *device, int index); - - int load_cart(device_image_interface &image, generic_slot_device *slot, const char *slot_tag); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z24_load) { return load_cart(image, m_z24, "z24"); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z25_load) { return load_cart(image, m_z25, "z25"); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(z26_load) { return load_cart(image, m_z26, "z26"); } -}; - - -#endif /* AIM65_H_ */ diff --git a/src/mess/includes/alesis.h b/src/mess/includes/alesis.h deleted file mode 100644 index a0acc3db8f4..00000000000 --- a/src/mess/includes/alesis.h +++ /dev/null @@ -1,115 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/*************************************************************************** - - Alesis HR-16 and SR-16 drum machines - -****************************************************************************/ - -#pragma once - -#ifndef _ALESIS_H_ -#define _ALESIS_H_ - -#include "cpu/mcs51/mcs51.h" -#include "machine/nvram.h" -#include "sound/dac.h" -#include "video/hd44780.h" -#include "imagedev/cassette.h" -#include "rendlay.h" - -#define MCFG_ALESIS_DM3AG_ADD(_tag,_clock) \ - MCFG_DEVICE_ADD( _tag, ALESIS_DM3AG, _clock ) - - -// ======================> alesis_dm3ag_device - -class alesis_dm3ag_device : public device_t -{ -public: - // construction/destruction - alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - - // device interface - DECLARE_WRITE8_MEMBER(write); - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - -private: - static const device_timer_id TIMER_DAC_UPDATE = 1; - required_device m_dac; - required_region_ptr m_samples; - - emu_timer * m_dac_update_timer; - bool m_output_active; - int m_count; - int m_shift; - UINT32 m_cur_sample; - UINT8 m_cmd[5]; -}; - - -// ======================> alesis_state - -class alesis_state : public driver_device -{ -public: - alesis_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_lcdc(*this, "hd44780"), - m_cassette(*this, "cassette"), - m_maincpu(*this, "maincpu"), - m_col1(*this, "COL1"), - m_col2(*this, "COL2"), - m_col3(*this, "COL3"), - m_col4(*this, "COL4"), - m_col5(*this, "COL5"), - m_col6(*this, "COL6"), - m_select(*this, "SELECT") - { } - - required_device m_lcdc; - optional_device m_cassette; - - DECLARE_PALETTE_INIT(alesis); - virtual void machine_reset(); - - void update_lcd_symbols(bitmap_ind16 &bitmap, UINT8 pos, UINT8 y, UINT8 x, int state); - DECLARE_DRIVER_INIT(hr16); - DECLARE_WRITE8_MEMBER( led_w ); - DECLARE_WRITE8_MEMBER( mmt8_led_w ); - DECLARE_READ8_MEMBER( mmt8_led_r ); - DECLARE_WRITE8_MEMBER( track_led_w ); - DECLARE_WRITE8_MEMBER( kb_matrix_w ); - DECLARE_READ8_MEMBER( kb_r ); - DECLARE_READ8_MEMBER( p3_r ); - DECLARE_WRITE8_MEMBER( p3_w ); - DECLARE_READ8_MEMBER( mmt8_p3_r ); - DECLARE_WRITE8_MEMBER( mmt8_p3_w ); - DECLARE_WRITE8_MEMBER( sr16_lcd_w ); - -private: - UINT8 m_kb_matrix; - UINT8 m_leds; - UINT8 m_lcd_digits[5]; - required_device m_maincpu; - required_ioport m_col1; - required_ioport m_col2; - required_ioport m_col3; - required_ioport m_col4; - required_ioport m_col5; - required_ioport m_col6; - optional_ioport m_select; -}; - -// device type definition -extern const device_type ALESIS_DM3AG; - -#endif // _ALESIS_H_ diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h deleted file mode 100644 index 40c798ccbdb..00000000000 --- a/src/mess/includes/amstrad.h +++ /dev/null @@ -1,325 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker, Barry Rodewald -/***************************************************************************** - * - * includes/amstrad.h - * - ****************************************************************************/ - -#ifndef AMSTRAD_H_ -#define AMSTRAD_H_ - -#include "cpu/z80/z80.h" -#include "sound/ay8910.h" -#include "machine/upd765.h" -#include "video/mc6845.h" -#include "machine/i8255.h" -#include "machine/mc146818.h" -#include "imagedev/snapquik.h" -#include "bus/cpc/cpcexp.h" -#include "bus/cpc/ddi1.h" -#include "bus/cpc/cpc_ssa1.h" -#include "bus/cpc/cpc_rom.h" -#include "bus/cpc/mface2.h" -#include "bus/cpc/cpc_pds.h" -#include "bus/cpc/cpc_rs232.h" -#include "bus/cpc/symbfac2.h" -#include "bus/cpc/amdrum.h" -#include "bus/cpc/playcity.h" -#include "bus/cpc/smartwatch.h" -#include "bus/cpc/brunword4.h" -#include "bus/cpc/hd20.h" -#include "bus/cpc/magicsound.h" -#include "machine/ram.h" -#include "imagedev/cassette.h" -#include "bus/centronics/ctronics.h" -#include "bus/centronics/comxpl80.h" -#include "bus/centronics/epson_ex800.h" -#include "bus/centronics/epson_lx800.h" -#include "bus/centronics/epson_lx810l.h" -#include "bus/centronics/printer.h" -#include "bus/centronics/digiblst.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -/**************************** - * Gate Array data (CPC) - - ****************************/ -struct gate_array_t -{ - bitmap_ind16 *bitmap; /* The bitmap we work on */ - UINT8 pen_selected; /* Pen selection */ - UINT8 mrer; /* Mode and ROM Enable Register */ - UINT8 upper_bank; - UINT8 romdis; // ROMDIS signal from the expansion port - - /* input signals from CRTC */ - int vsync; - int hsync; - int de; - int ma; - int ra; - - /* used for timing */ - int hsync_after_vsync_counter; - int hsync_counter; /* The gate array counts CRTC HSYNC pulses using an internal 6-bit counter. */ - - /* used for drawing the screen */ - attotime last_draw_time; - int y; - UINT16 *draw_p; /* Position in the bitmap where we are currently drawing */ - UINT16 colour; - UINT16 address; - UINT8 *mode_lookup; - UINT8 data; - UINT8 ticks; - UINT8 ticks_increment; - UINT16 line_ticks; - UINT8 colour_ticks; - UINT8 max_colour_ticks; -}; - -/**************************** - * ASIC data (CPC plus) - ****************************/ -struct asic_t -{ - UINT8 *ram; /* pointer to RAM used for the CPC+ ASIC memory-mapped registers */ - UINT8 enabled; /* Are CPC plus features enabled/unlocked */ - UINT8 pri; /* Programmable raster interrupt */ - UINT8 seqptr; /* Current position in the ASIC unlocking sequence */ - UINT8 rmr2; /* ROM mapping register 2 */ - UINT16 split_ma_base; /* Used to handle split screen support */ - UINT16 split_ma_started; /* Used to handle split screen support */ - UINT16 vpos; /* Current logical scanline */ - UINT16 h_start; /* Position where DE became active */ - UINT16 h_end; /* Position where DE became inactive */ - UINT8 addr_6845; /* We need these to store a shadow copy of R1 of the mc6845 */ - UINT8 horiz_disp; - UINT8 hscroll; - UINT8 de_start; /* flag to check if DE is been enabled this frame yet */ - - /* DMA */ - UINT8 dma_status; - UINT8 dma_clear; /* Set if DMA interrupts are to be cleared automatically */ - UINT8 dma_prescaler[3]; /* DMA channel prescaler */ - UINT16 dma_repeat[3]; /* Location of the DMA channel's last repeat */ - UINT16 dma_addr[3]; /* DMA channel address */ - UINT16 dma_loopcount[3]; /* Count loops taken on this channel */ - UINT16 dma_pause[3]; /* DMA pause count */ -}; - - -class amstrad_state : public driver_device -{ -public: - enum - { - TIMER_PC2_LOW, - TIMER_VIDEO_UPDATE, - TIMER_SET_RESOLUTION - }; - - amstrad_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ay(*this, "ay"), - m_fdc(*this, "upd765"), - m_crtc(*this, "mc6845"), - m_ppi(*this, "ppi8255"), - m_centronics(*this, "centronics"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_ram(*this, RAM_TAG), - m_exp(*this, "exp"), - m_rtc(*this, "rtc"), - m_region_maincpu(*this, "maincpu"), - m_region_user1(*this, "user1"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_bank7(*this, "bank7"), - m_bank8(*this, "bank8"), - m_bank9(*this, "bank9"), - m_bank10(*this, "bank10"), - m_bank11(*this, "bank11"), - m_bank12(*this, "bank12"), - m_bank13(*this, "bank13"), - m_bank14(*this, "bank14"), - m_bank15(*this, "bank15"), - m_bank16(*this, "bank16"), - m_io_kbrow(*this, "kbrow"), - m_io_analog(*this, "analog"), - m_io_mouse1(*this,"mouse_input1"), - m_io_mouse2(*this,"mouse_input2"), - m_io_mouse3(*this,"mouse_input3"), - m_io_solder_links(*this, "solder_links"), - m_io_green_display(*this, "green_display"), - m_io_ctrltype(*this,"controller_type"), - m_screen(*this, "screen"), - m_palette(*this, "palette") { } - - required_device m_maincpu; - required_device m_ay; - optional_device m_fdc; // not on a GX4000 - required_device m_crtc; - required_device m_ppi; - optional_device m_centronics; // not on a GX4000 - optional_device m_cassette; // not on a GX4000, (or technically, the 6128+) - optional_device m_cart; // only on 664+, 6128+ and GX4000 - required_device m_ram; - optional_device m_exp; // not on a GX4000 - optional_device m_rtc; // Aleste 520EX only - - int m_system_type; - UINT8 m_aleste_mode; - int m_plus_irq_cause; - gate_array_t m_gate_array; - asic_t m_asic; - int m_GateArray_RamConfiguration; - unsigned char *m_AmstradCPC_RamBanks[4]; - unsigned char *m_Aleste_RamBanks[4]; - int m_aleste_active_page[4]; - unsigned char *m_Amstrad_ROM_Table[256]; - UINT8 m_ppi_port_inputs[3]; - UINT8 m_ppi_port_outputs[3]; - int m_aleste_rtc_function; - int m_prev_reg; - UINT16 m_GateArray_render_colours[17]; - UINT8 m_mode0_lookup[256]; - UINT8 m_mode1_lookup[256]; - UINT8 m_mode2_lookup[256]; - int m_prev_data; - int m_printer_bit8_selected; - unsigned char m_Psg_FunctionSelected; - int m_previous_ppi_portc_w; - UINT8 m_amx_mouse_data; - DECLARE_WRITE8_MEMBER(amstrad_plus_asic_4000_w); - DECLARE_WRITE8_MEMBER(amstrad_plus_asic_6000_w); - DECLARE_READ8_MEMBER(amstrad_plus_asic_4000_r); - DECLARE_READ8_MEMBER(amstrad_plus_asic_6000_r); - DECLARE_WRITE8_MEMBER(aleste_msx_mapper); - DECLARE_READ8_MEMBER(amstrad_cpc_io_r); - DECLARE_WRITE8_MEMBER(amstrad_cpc_io_w); - DECLARE_READ8_MEMBER(amstrad_psg_porta_read); - void amstrad_plus_seqcheck(int data); - DECLARE_MACHINE_START(amstrad); - DECLARE_MACHINE_RESET(amstrad); - DECLARE_VIDEO_START(amstrad); - DECLARE_PALETTE_INIT(amstrad_cpc); - DECLARE_PALETTE_INIT(amstrad_cpc_green); - DECLARE_MACHINE_START(plus); - DECLARE_MACHINE_RESET(plus); - DECLARE_PALETTE_INIT(amstrad_plus); - DECLARE_MACHINE_START(gx4000); - DECLARE_MACHINE_RESET(gx4000); - DECLARE_MACHINE_START(kccomp); - DECLARE_MACHINE_RESET(kccomp); - DECLARE_PALETTE_INIT(kccomp); - DECLARE_MACHINE_START(aleste); - DECLARE_MACHINE_RESET(aleste); - DECLARE_PALETTE_INIT(aleste); - UINT32 screen_update_amstrad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_amstrad(screen_device &screen, bool state); - DECLARE_INPUT_CHANGED_MEMBER(cpc_monitor_changed); - TIMER_CALLBACK_MEMBER(amstrad_pc2_low); - TIMER_CALLBACK_MEMBER(amstrad_video_update_timer); - TIMER_CALLBACK_MEMBER(cb_set_resolution); - DECLARE_WRITE_LINE_MEMBER(amstrad_hsync_changed); - DECLARE_WRITE_LINE_MEMBER(amstrad_plus_hsync_changed); - DECLARE_WRITE_LINE_MEMBER(amstrad_vsync_changed); - DECLARE_WRITE_LINE_MEMBER(amstrad_plus_vsync_changed); - DECLARE_WRITE_LINE_MEMBER(amstrad_de_changed); - DECLARE_WRITE_LINE_MEMBER(amstrad_plus_de_changed); - DECLARE_READ8_MEMBER(amstrad_ppi_porta_r); - DECLARE_WRITE8_MEMBER(amstrad_ppi_porta_w); - DECLARE_READ8_MEMBER(amstrad_ppi_portb_r); - DECLARE_WRITE8_MEMBER(amstrad_ppi_portc_w); - - DECLARE_WRITE_LINE_MEMBER( cpc_romdis ); - DECLARE_WRITE_LINE_MEMBER( cpc_romen ); - DECLARE_WRITE8_MEMBER(rom_select); - - DECLARE_FLOPPY_FORMATS( aleste_floppy_formats ); - - IRQ_CALLBACK_MEMBER(amstrad_cpu_acknowledge_int); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( amstrad_plus_cartridge ); - - void amstrad_handle_snapshot(unsigned char *pSnapshot); - void amstrad_rethinkMemory(); - DECLARE_SNAPSHOT_LOAD_MEMBER( amstrad ); - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - -protected: - required_memory_region m_region_maincpu; - optional_memory_region m_region_user1; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_bank m_bank5; - required_memory_bank m_bank6; - required_memory_bank m_bank7; - required_memory_bank m_bank8; - required_memory_bank m_bank9; - required_memory_bank m_bank10; - required_memory_bank m_bank11; - required_memory_bank m_bank12; - required_memory_bank m_bank13; - required_memory_bank m_bank14; - required_memory_bank m_bank15; - required_memory_bank m_bank16; - optional_ioport_array<11> m_io_kbrow; - optional_ioport_array<4> m_io_analog; - optional_ioport m_io_mouse1; - optional_ioport m_io_mouse2; - optional_ioport m_io_mouse3; - required_ioport m_io_solder_links; - required_ioport m_io_green_display; - optional_ioport m_io_ctrltype; - required_device m_screen; - required_device m_palette; - - memory_region *m_region_cart; - - void amstrad_init_lookups(); - void amstrad_vh_update_mode(); - void amstrad_plus_dma_parse(int channel); - void amstrad_plus_handle_dma(); - void amstrad_vh_update_colour(int PenIndex, UINT16 hw_colour_index); - void aleste_vh_update_colour(int PenIndex, UINT16 hw_colour_index); - void amstrad_gate_array_get_video_data(); - void amstrad_update_video(); - void amstrad_plus_gate_array_get_video_data(); - void amstrad_plus_update_video(); - void amstrad_plus_update_video_sprites(); - void amstrad_setLowerRom(); - void amstrad_setUpperRom(); - void AmstradCPC_GA_SetRamConfiguration(); - void AmstradCPC_PALWrite(int data); - void amstrad_GateArray_write(UINT8 dataToGateArray); - void amstrad_reset_machine(); - void kccomp_reset_machine(); - void update_psg(); - void amstrad_common_init(); - void enumerate_roms(); - unsigned char kccomp_get_colour_element(int colour_value); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - int m_centronics_busy; -}; - - -/*----------- defined in machine/amstrad.c -----------*/ - - -SLOT_INTERFACE_EXTERN(cpc_exp_cards); -SLOT_INTERFACE_EXTERN(cpcplus_exp_cards); - -#endif /* AMSTRAD_H_ */ diff --git a/src/mess/includes/apollo.h b/src/mess/includes/apollo.h deleted file mode 100644 index 41b0f04e6ff..00000000000 --- a/src/mess/includes/apollo.h +++ /dev/null @@ -1,602 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Hans Ostermeyer, R. Belmont -/* - * apollo.h - APOLLO DN3500/DN3000 driver includes - * - * Created on: May 12, 2010 - * Author: Hans Ostermeyer - * - */ - -#pragma once - -#ifndef APOLLO_H_ -#define APOLLO_H_ - -#include "emu.h" - -#include "cpu/m68000/m68000.h" -#include "bus/rs232/rs232.h" -#include "machine/terminal.h" -#include "machine/ram.h" -#include "machine/6840ptm.h" -#include "machine/mc68681.h" -#include "machine/am9517a.h" -#include "machine/pic8259.h" -#include "machine/mc146818.h" -#include "machine/apollo_kbd.h" -#include "machine/clock.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" -#include "bus/isa/3c505.h" - -#ifndef VERBOSE -#define VERBOSE 0 -#endif - -#define LOG(x) { logerror x; logerror ("\n"); apollo_check_log(); } -#define LOG1(x) { if (VERBOSE > 0) LOG(x) } -#define LOG2(x) { if (VERBOSE > 1) LOG(x) } -#define CLOG(x) { logerror ("%s - %s: ", apollo_cpu_context(machine().device(MAINCPU)), tag()); LOG(x) } -#define CLOG1(x) { if (VERBOSE > 0) CLOG(x) } -#define CLOG2(x) { if (VERBOSE > 1) CLOG(x) } -#define DLOG(x) { logerror ("%s - %s: ", apollo_cpu_context(device->machine().device(MAINCPU)), device->tag()); LOG(x) } -#define DLOG1(x) { if (VERBOSE > 0) DLOG(x) } -#define DLOG2(x) { if (VERBOSE > 1) DLOG(x) } -#define MLOG(x) { logerror ("%s: ", apollo_cpu_context(machine().device(MAINCPU))); LOG(x) } -#define MLOG1(x) { if (VERBOSE > 0) MLOG(x) } -#define MLOG2(x) { if (VERBOSE > 1) MLOG(x) } -#define SLOG(x) { logerror ("%s: ", apollo_cpu_context(&space.device())); LOG(x) } -#define SLOG1(x) { if (VERBOSE > 0) SLOG(x) } -#define SLOG2(x) { if (VERBOSE > 1) SLOG(x) } - -#define MAINCPU "maincpu" - -/*----------- machine/apollo_dbg.c -----------*/ - -int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc); - -/*----------- drivers/apollo.c -----------*/ - -// return the current CPU context for log file entries -const char *apollo_cpu_context(device_t *cpu); - -// enable/disable the FPU -void apollo_set_cpu_has_fpu(m68000_base_device *device, int onoff); - -// check for excessive logging -void apollo_check_log(); - -// return 1 if node is DN3000 or DSP3000, 0 otherwise -int apollo_is_dn3000(void); - -// return 1 if node is DSP3000 or DSP3500, 0 otherwise -int apollo_is_dsp3x00(void); - -// get the ram configuration byte -UINT8 apollo_get_ram_config_byte(void); - -//apollo_get_node_id - get the node id -UINT32 apollo_get_node_id(void); - - // should be called by the CPU core before executing each instruction -int apollo_instruction_hook(m68000_base_device *device, offs_t curpc); - -void apollo_set_cache_status_register(UINT8 mask, UINT8 data); - -/*----------- machine/apollo.c -----------*/ - -#define APOLLO_CONF_TAG "conf" -#define APOLLO_DMA1_TAG "dma8237_1" -#define APOLLO_DMA2_TAG "dma8237_2" -#define APOLLO_KBD_TAG "kbd" -#define APOLLO_STDIO_TAG "stdio" -#define APOLLO_PIC1_TAG "pic8259_master" -#define APOLLO_PIC2_TAG "pic8259_slave" -#define APOLLO_PTM_TAG "ptm" -#define APOLLO_RTC_TAG "rtc" -#define APOLLO_SIO_TAG "sio" -#define APOLLO_SIO2_TAG "sio2" -#define APOLLO_ETH_TAG "3c505" -#define APOLLO_ISA_TAG "isabus" - -// forward declaration -class apollo_sio; - -class apollo_state : public driver_device -{ -public: - apollo_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MAINCPU), - m_messram_ptr(*this, "messram"), - m_dma8237_1(*this, APOLLO_DMA1_TAG), - m_dma8237_2(*this, APOLLO_DMA2_TAG), - m_pic8259_master(*this, APOLLO_PIC1_TAG), - m_pic8259_slave(*this, APOLLO_PIC2_TAG), - m_ptm(*this, APOLLO_PTM_TAG), - m_sio(*this, APOLLO_SIO_TAG), - m_sio2(*this, APOLLO_SIO2_TAG), - m_rtc(*this, APOLLO_RTC_TAG), - m_isa(*this, APOLLO_ISA_TAG) - { } - - required_device m_maincpu; - required_shared_ptr m_messram_ptr; - - required_device m_dma8237_1; - required_device m_dma8237_2; - required_device m_pic8259_master; - required_device m_pic8259_slave; - required_device m_ptm; - required_device m_sio; - optional_device m_sio2; - required_device m_rtc; - required_device m_isa; - - DECLARE_WRITE16_MEMBER(apollo_csr_status_register_w); - DECLARE_READ16_MEMBER(apollo_csr_status_register_r); - DECLARE_WRITE16_MEMBER(apollo_csr_control_register_w); - DECLARE_READ16_MEMBER(apollo_csr_control_register_r); - DECLARE_WRITE8_MEMBER(apollo_dma_1_w); - DECLARE_READ8_MEMBER(apollo_dma_1_r); - DECLARE_WRITE8_MEMBER(apollo_dma_2_w); - DECLARE_READ8_MEMBER(apollo_dma_2_r); - DECLARE_WRITE8_MEMBER(apollo_dma_page_register_w); - DECLARE_READ8_MEMBER(apollo_dma_page_register_r); - DECLARE_WRITE16_MEMBER(apollo_address_translation_map_w); - DECLARE_READ16_MEMBER(apollo_address_translation_map_r); - DECLARE_READ8_MEMBER(apollo_dma_read_byte); - DECLARE_WRITE8_MEMBER(apollo_dma_write_byte); - DECLARE_READ8_MEMBER(apollo_dma_read_word); - DECLARE_WRITE8_MEMBER(apollo_dma_write_word); - DECLARE_WRITE8_MEMBER(apollo_rtc_w); - DECLARE_READ8_MEMBER(apollo_rtc_r); - DECLARE_WRITE8_MEMBER(cache_control_register_w); - DECLARE_READ8_MEMBER(cache_status_register_r); - DECLARE_WRITE8_MEMBER(task_alias_register_w); - DECLARE_READ8_MEMBER(task_alias_register_r); - DECLARE_WRITE16_MEMBER(apollo_node_id_w); - DECLARE_READ16_MEMBER(apollo_node_id_r); - DECLARE_WRITE16_MEMBER(latch_page_on_parity_error_register_w); - DECLARE_READ16_MEMBER(latch_page_on_parity_error_register_r); - DECLARE_WRITE8_MEMBER(master_req_register_w); - DECLARE_READ8_MEMBER(master_req_register_r); - DECLARE_WRITE16_MEMBER(selective_clear_locations_w); - DECLARE_READ16_MEMBER(selective_clear_locations_r); - DECLARE_READ32_MEMBER(ram_with_parity_r); - DECLARE_WRITE32_MEMBER(ram_with_parity_w); - DECLARE_READ32_MEMBER(apollo_unmapped_r); - DECLARE_WRITE32_MEMBER(apollo_unmapped_w); - DECLARE_WRITE32_MEMBER(apollo_rom_w); - DECLARE_READ16_MEMBER(apollo_atbus_io_r); - DECLARE_WRITE16_MEMBER(apollo_atbus_io_w); - DECLARE_READ16_MEMBER(apollo_atbus_memory_r); - DECLARE_WRITE16_MEMBER(apollo_atbus_memory_w); - DECLARE_WRITE8_MEMBER(dn5500_memory_present_register_w); - DECLARE_READ8_MEMBER(dn5500_memory_present_register_r); - DECLARE_WRITE8_MEMBER(dn5500_11500_w); - DECLARE_READ8_MEMBER(dn5500_11500_r); - DECLARE_WRITE8_MEMBER(dn5500_io_protection_map_w); - DECLARE_READ8_MEMBER(dn5500_io_protection_map_r); - DECLARE_READ32_MEMBER(apollo_f8_r); - DECLARE_WRITE32_MEMBER(apollo_f8_w); - DECLARE_DRIVER_INIT(dsp3000); - DECLARE_DRIVER_INIT(dsp5500); - DECLARE_DRIVER_INIT(dn3500); - DECLARE_DRIVER_INIT(dn3000); - DECLARE_DRIVER_INIT(dsp3500); - DECLARE_DRIVER_INIT(dn5500); - DECLARE_DRIVER_INIT(apollo); - - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_MACHINE_RESET(apollo); - DECLARE_MACHINE_START(apollo); - - IRQ_CALLBACK_MEMBER(apollo_irq_acknowledge); - IRQ_CALLBACK_MEMBER(apollo_pic_acknowledge); - void apollo_bus_error(); - DECLARE_WRITE8_MEMBER( apollo_kbd_putchar ); - DECLARE_READ_LINE_MEMBER( apollo_kbd_is_german ); - DECLARE_WRITE_LINE_MEMBER( apollo_dma8237_out_eop ); - DECLARE_WRITE_LINE_MEMBER( apollo_dma_1_hrq_changed ); - DECLARE_WRITE_LINE_MEMBER( apollo_dma_2_hrq_changed ); - DECLARE_WRITE_LINE_MEMBER( apollo_pic8259_master_set_int_line ); - DECLARE_WRITE_LINE_MEMBER( apollo_pic8259_slave_set_int_line ); - DECLARE_WRITE_LINE_MEMBER( sio_irq_handler ); - DECLARE_WRITE8_MEMBER( sio_output ); - DECLARE_WRITE_LINE_MEMBER( sio2_irq_handler ); - DECLARE_WRITE_LINE_MEMBER( apollo_ptm_irq_function ); - DECLARE_WRITE_LINE_MEMBER( apollo_ptm_timer_tick ); - DECLARE_READ8_MEMBER( apollo_pic8259_get_slave_ack ); - - DECLARE_READ8_MEMBER(pc_dma8237_0_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_1_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_2_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_3_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_5_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_6_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_7_dack_r); - DECLARE_WRITE8_MEMBER(pc_dma8237_0_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_1_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_2_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_3_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_5_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_6_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_7_dack_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack2_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack3_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack4_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack5_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack6_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack7_w); - TIMER_CALLBACK_MEMBER( apollo_rtc_timer ); - - void apollo_pic_set_irq_line(int irq, int state); - void select_dma_channel(int channel, bool state); - - DECLARE_WRITE_LINE_MEMBER(apollo_reset_instr_callback); - DECLARE_READ32_MEMBER(apollo_instruction_hook); - -private: - UINT32 ptm_counter; - UINT8 sio_output_data; - int m_dma_channel; - bool m_cur_eop; - emu_timer *m_dn3000_timer; -}; - -MACHINE_CONFIG_EXTERN( apollo ); -MACHINE_CONFIG_EXTERN( apollo_terminal ); - -/*----------- machine/apollo_config.c -----------*/ - -// configuration bit definitions - -#define APOLLO_CONF_SERVICE_MODE 0x0001 -#define APOLLO_CONF_DISPLAY 0x001e -#define APOLLO_CONF_8_PLANES 0x0002 -#define APOLLO_CONF_4_PLANES 0x0004 -#define APOLLO_CONF_MONO_15I 0x0008 -#define APOLLO_CONF_MONO_19I 0x0010 -#define APOLLO_CONF_GERMAN_KBD 0x0020 -#define APOLLO_CONF_20_YEARS_AGO 0x0040 -#define APOLLO_CONF_25_YEARS_AGO 0x0080 -#define APOLLO_CONF_NODE_ID 0x0100 -#define APOLLO_CONF_IDLE_SLEEP 0x0200 -#define APOLLO_CONF_TRAP_TRACE 0x0400 -#define APOLLO_CONF_FPU_TRACE 0x0800 -#define APOLLO_CONF_DISK_TRACE 0x1000 -#define APOLLO_CONF_NET_TRACE 0x2000 - -// check configuration setting -int apollo_config(int mask); - -INPUT_PORTS_EXTERN(apollo_config); - -/*----------- machine/apollo_csr.c -----------*/ - -#define APOLLO_CSR_SR_SERVICE 0x0001 -#define APOLLO_CSR_SR_ATBUS_IO_TIMEOUT 0x0002 -#define APOLLO_CSR_SR_FP_TRAP 0x0004 -#define APOLLO_CSR_SR_INTERRUPT_PENDING 0x0008 // DN3000 only -#define APOLLO_CSR_SR_PARITY_BYTE_MASK 0x00f0 -#define APOLLO_CSR_SR_CPU_TIMEOUT 0x0100 -#define APOLLO_CSR_SR_ATBUS_MEM_TIMEOUT 0x2000 -#define APOLLO_CSR_SR_BIT15 0x8000 -#define APOLLO_CSR_SR_CLEAR_ALL 0x3ffe - -#define APOLLO_CSR_CR_INTERRUPT_ENABLE 0x0001 -#define APOLLO_CSR_CR_RESET_DEVICES 0x0002 -#define APOLLO_CSR_CR_FPU_TRAP_ENABLE 0x0004 -#define APOLLO_CSR_CR_FORCE_BAD_PARITY 0x0008 -#define APOLLO_CSR_CR_PARITY_BYTE_MASK 0x00f0 - -UINT16 apollo_csr_get_control_register(void); -UINT16 apollo_csr_get_status_register(void); -void apollo_csr_set_status_register(UINT16 mask, UINT16 data); - -/*----------- machine/apollo_sio.c -----------*/ - -#define MCFG_APOLLO_SIO_ADD(_tag, _clock) \ - MCFG_DEVICE_ADD(_tag, APOLLO_SIO, _clock) - -#define MCFG_APOLLO_SIO_IRQ_CALLBACK(_cb) \ - devcb = &apollo_sio::set_irq_cb(*device, DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_A_TX_CALLBACK(_cb) \ - devcb = &apollo_sio::set_a_tx_cb(*device, DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_B_TX_CALLBACK(_cb) \ - devcb = &apollo_sio::set_b_tx_cb(*device, DEVCB_##_cb); - -#define MCFG_APOLLO_SIO_OUTPORT_CALLBACK(_cb) \ - devcb = &apollo_sio::set_outport_cb(*device, DEVCB_##_cb); - -class apollo_sio: public mc68681_device -{ -public: - apollo_sio(const machine_config &mconfig, const char *tag, - device_t *owner, UINT32 clock); - - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); - -protected: - virtual void device_reset(); - -private: - UINT8 m_csrb; - UINT8 m_ip6; -}; - -extern const device_type APOLLO_SIO; - -/*----------- video/apollo.c -----------*/ - -#define APOLLO_SCREEN_TAG "apollo_screen" - -class apollo_graphics_15i : public device_t -{ -public: - apollo_graphics_15i(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - apollo_graphics_15i(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock, device_type type, const char *name, const char *shortname, const char *source); - ~apollo_graphics_15i(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - // monochrome control - DECLARE_READ8_MEMBER( apollo_mcr_r ); - DECLARE_WRITE8_MEMBER( apollo_mcr_w ); - - // monochrome and color memory - DECLARE_READ16_MEMBER( apollo_mem_r ); - DECLARE_WRITE16_MEMBER( apollo_mem_w ); - - // color control - DECLARE_READ8_MEMBER( apollo_ccr_r ); - DECLARE_WRITE8_MEMBER( apollo_ccr_w ); - - DECLARE_READ16_MEMBER( apollo_mgm_r ); - DECLARE_WRITE16_MEMBER( apollo_mgm_w ); - - DECLARE_READ16_MEMBER( apollo_cgm_r ); - DECLARE_WRITE16_MEMBER( apollo_cgm_w ); - - void vblank_state_changed(screen_device &screen, bool vblank_state); - - int is_mono() { return m_n_planes == 1; } - -protected: - // device-level overrides - virtual void device_config_complete(); - virtual void device_start(); - virtual void device_reset(); -protected: - class lut_fifo; - class bt458; - - const char *cr_text(offs_t offset, UINT8 data, UINT8 rw); - - void increment_h_clock(); - void increment_v_clock(); - void increment_p_clock(); - - void log_cr1(const char * text); - void set_cr1(UINT8 data); - void set_cr3a(UINT8 data); - void set_cr3b(UINT8 data); - void set_lut_cr(UINT8 data); - - void register_vblank_callback(); - - UINT32 set_msb0(UINT32 value, UINT8 data) - { - return (value & 0xffffff00) | data; - } - UINT32 set_lsb0(UINT32 value, UINT8 data) - { - return (value & 0xffff00ff) | (data << 8); - } - UINT32 set_msb1(UINT32 value, UINT8 data) - { - return (value & 0xff00ffff) | (data << 16); - } - UINT32 set_lsb1(UINT32 value, UINT8 data) - { - return (value & 0x00ffffff) | (data << 24); - } - UINT8 get_msb1(UINT32 value) - { - return (value >> 16) & 0xff; - } - UINT8 get_lsb1(UINT32 value) - { - return (value >> 24) & 0xff; - } - - void set_status_rmw(); - UINT16 rop(UINT16 dest_data, UINT16 src_data, UINT8 plane); - void set_source_data(UINT32 offset); - UINT32 get_source_data(UINT8 plane); - void blt(UINT32 dest_addr, UINT16 mem_mask); - - UINT8 get_pixel(UINT32 offset, UINT16 mask); - UINT8 c4p_read_adc(UINT8 data); - UINT8 c8p_read_adc(UINT8 data); - - void screen_update1(bitmap_rgb32 &bitmap, const rectangle &cliprect); -protected: - UINT16 m_n_planes; - UINT16 m_width; - UINT16 m_height; - UINT16 m_buffer_width; - UINT16 m_buffer_height; - - UINT8 m_sr; - UINT8 m_device_id; - UINT16 m_write_enable_register; - UINT32 m_rop_register; - UINT16 m_diag_mem_request; - UINT8 m_cr0; - UINT8 m_cr1; - UINT8 m_cr2; - UINT8 m_cr2b; - UINT8 m_cr2_s_data; - UINT8 m_cr2_s_plane; - UINT8 m_cr2_d_plane; - UINT8 m_cr3a; - UINT8 m_cr3b; - UINT8 m_ad_result; - UINT8 m_ad_pending; - - UINT8 m_lut_control; - UINT8 m_lut_data; - - UINT8 m_update_flag; - UINT8 m_update_pending; - - UINT8 m_blt_cycle_count; - UINT32 m_image_offset; - UINT32 m_guard_latch[8]; - - int m_h_clock; - int m_v_clock; - int m_p_clock; - int m_data_clock; - - UINT16 *m_image_memory; - int m_image_plane_size; - int m_image_memory_size; - - UINT32 m_color_lookup_table[16]; - - lut_fifo *m_lut_fifo; - bt458 *m_bt458; -}; - - -#define LUT_FIFO_SIZE 1024 - - -//************************************************************************** -// class LUT Fifo -//************************************************************************** - -class apollo_graphics_15i::lut_fifo -{ -public: - lut_fifo() - { - reset(); - } - - void reset() - { - m_size = LUT_FIFO_SIZE; - m_get_index = 0; - m_put_index = 0; - } - - void put(const UINT8 data) - { - if (!is_full()) - { - m_data[m_put_index] = data; - m_put_index = (m_put_index + 1) % m_size; - } - } - - UINT8 get() - { - UINT8 data = is_empty() ? 0xff : m_data[m_get_index]; - m_get_index = (m_get_index + 1) % m_size; - return data; - } - - int is_empty() - { - return m_get_index == m_put_index; - } - - int is_full() - { - return ((m_put_index + 1) % m_size) == m_get_index; - } - -private: - UINT16 m_size; - UINT16 m_get_index; - UINT16 m_put_index; - UINT8 m_data[LUT_FIFO_SIZE]; -}; - -//************************************************************************** -// class Brooktree Bt458 -//************************************************************************** - -class apollo_graphics_15i::bt458 -{ -public: - bt458(running_machine &running_machine); - void start(); - void reset(); - UINT8 read(UINT8 c10); - void write(UINT8 data, UINT8 c10); - UINT32 get_rgb(UINT8 index); - -private: - running_machine &machine() const - { - assert(m_machine != NULL); - return *m_machine; - } - - UINT8 m_color_counter; - UINT8 m_red; - UINT8 m_green; - - UINT8 m_address_register; - UINT32 m_color_palette_RAM[256]; - UINT32 m_overlay_color[4]; - UINT8 m_read_mask_register; - UINT8 m_blink_mask_register; - UINT8 m_command_register; - UINT8 m_control_test_register; - - running_machine *m_machine; -}; - -extern const device_type APOLLO_GRAPHICS; - -#define MCFG_APOLLO_GRAPHICS_ADD( _tag) \ - MCFG_FRAGMENT_ADD(apollo_graphics) \ - MCFG_DEVICE_ADD(_tag, APOLLO_GRAPHICS, 0) - -MACHINE_CONFIG_EXTERN( apollo_graphics ); - -class apollo_graphics_19i : public apollo_graphics_15i -{ -public: - apollo_graphics_19i(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); -protected: - // device-level overrides - virtual void device_config_complete(); - virtual void device_start(); - virtual void device_reset(); -private: - // internal state -}; - -extern const device_type APOLLO_MONO19I; - -#define MCFG_APOLLO_MONO19I_ADD(_tag) \ - MCFG_FRAGMENT_ADD(apollo_mono19i) \ - MCFG_DEVICE_ADD(_tag, APOLLO_MONO19I, 0) - -MACHINE_CONFIG_EXTERN( apollo_mono19i ); - -#endif /* APOLLO_H_ */ diff --git a/src/mess/includes/apple1.h b/src/mess/includes/apple1.h deleted file mode 100644 index 220200ade56..00000000000 --- a/src/mess/includes/apple1.h +++ /dev/null @@ -1,92 +0,0 @@ -// license:??? -// copyright-holders:Paul Daniels, Colin Howell, R. Belmont -/***************************************************************************** - * - * includes/apple1.h - * - ****************************************************************************/ - -#ifndef APPLE1_H_ -#define APPLE1_H_ - -#include "imagedev/snapquik.h" -#include "machine/ram.h" - -typedef short termchar_t; - -struct terminal_t -{ - tilemap_t *tm; - int gfx; - int blank_char; - int char_bits; - int num_cols; - int num_rows; - int (*getcursorcode)(int original_code); - int cur_offset; - int cur_hidden; - termchar_t mem[1]; -}; - - -class apple1_state : public driver_device -{ -public: - apple1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen") { } - - int m_vh_clrscrn_pressed; - int m_kbd_data; - UINT32 m_kbd_last_scan[4]; - int m_reset_flag; - terminal_t *m_current_terminal; - terminal_t *m_terminal; - int m_blink_on; - DECLARE_DRIVER_INIT(apple1); - TILE_GET_INFO_MEMBER(terminal_gettileinfo); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(apple1_kbd_poll); - TIMER_CALLBACK_MEMBER(apple1_kbd_strobe_end); - TIMER_CALLBACK_MEMBER(apple1_dsp_ready_start); - TIMER_CALLBACK_MEMBER(apple1_dsp_ready_end); - DECLARE_READ8_MEMBER(apple1_pia0_kbdin); - DECLARE_WRITE8_MEMBER(apple1_pia0_dspout); - DECLARE_WRITE_LINE_MEMBER(apple1_pia0_dsp_write_signal); - required_device m_maincpu; - void terminal_draw(screen_device &screen, bitmap_ind16 &dest, const rectangle &cliprect, terminal_t *terminal); - void verify_coords(terminal_t *terminal, int x, int y); - void terminal_putchar(terminal_t *terminal, int x, int y, int ch); - int terminal_getchar(terminal_t *terminal, int x, int y); - void terminal_putblank(terminal_t *terminal, int x, int y); - void terminal_dirtycursor(terminal_t *terminal); - void terminal_setcursor(terminal_t *terminal, int x, int y); - void terminal_hidecursor(terminal_t *terminal); - void terminal_showcursor(terminal_t *terminal); - void terminal_getcursor(terminal_t *terminal, int *x, int *y); - void terminal_fill(terminal_t *terminal, int val); - void terminal_clear(terminal_t *terminal); - void apple1_vh_dsp_w (int data); - void apple1_vh_dsp_clr (); - void apple1_vh_cursor_blink (); - int apple1_verify_header (UINT8 *data); - terminal_t *terminal_create(int gfx, int blank_char, int char_bits,int (*getcursorcode)(int original_code),int num_cols, int num_rows); - attotime apple1_vh_dsp_time_to_ready(); - DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 ); - required_device m_ram; - required_device m_gfxdecode; - required_device m_screen; -}; - - -/*----------- defined in drivers/apple1.c -----------*/ - -extern const gfx_layout apple1_charlayout; - - -#endif /* APPLE1_H_ */ diff --git a/src/mess/includes/apple2.h b/src/mess/includes/apple2.h deleted file mode 100644 index ec8b9963db5..00000000000 --- a/src/mess/includes/apple2.h +++ /dev/null @@ -1,382 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:R. Belmont -/*************************************************************************** - - includes/apple2.h - - Include file to handle emulation of the Apple II series. - -***************************************************************************/ - -#ifndef APPLE2_H_ -#define APPLE2_H_ - -#include "cpu/m6502/m6502.h" -#include "cpu/m6502/m65c02.h" -#include "bus/a2bus/a2bus.h" -#include "bus/a2bus/a2eauxslot.h" -#include "machine/applefdc.h" -#include "machine/ram.h" -#include "imagedev/cassette.h" -#include "machine/kb3600.h" -#include "sound/speaker.h" -#include "machine/ram.h" -#include "bus/rs232/rs232.h" -#include "machine/mos6551.h" - -#define AUXSLOT_TAG "auxbus" - -#define IIC_ACIA1_TAG "acia1" -#define IIC_ACIA2_TAG "acia2" -#define IICP_IWM_TAG "iwm" - -#define LASER128_UDC_TAG "l128udc" - -#define PRINTER_PORT_TAG "printer" -#define MODEM_PORT_TAG "modem" - -/*************************************************************************** - SOFTSWITCH VALUES -***************************************************************************/ - -#define VAR_80STORE 0x000001 -#define VAR_RAMRD 0x000002 -#define VAR_RAMWRT 0x000004 -#define VAR_INTCXROM 0x000008 -#define VAR_ALTZP 0x000010 -#define VAR_SLOTC3ROM 0x000020 -#define VAR_80COL 0x000040 -#define VAR_ALTCHARSET 0x000080 -#define VAR_TEXT 0x000100 -#define VAR_MIXED 0x000200 -#define VAR_PAGE2 0x000400 -#define VAR_HIRES 0x000800 -#define VAR_AN0 0x001000 -#define VAR_AN1 0x002000 -#define VAR_AN2 0x004000 -#define VAR_AN3 0x008000 -#define VAR_LCRAM 0x010000 -#define VAR_LCRAM2 0x020000 -#define VAR_LCWRITE 0x040000 -#define VAR_ROMSWITCH 0x080000 -#define VAR_TK2000RAM 0x100000 // ROM/RAM switch for TK2000 - -#define VAR_DHIRES VAR_AN3 - -/*************************************************************************** - OTHER -***************************************************************************/ - -/* ----------------------------------------------------------------------- - * New Apple II memory manager - * ----------------------------------------------------------------------- */ - -#define APPLE2_MEM_AUX 0x40000000 -#define APPLE2_MEM_SLOT 0x80000000 -#define APPLE2_MEM_ROM 0xC0000000 -#define APPLE2_MEM_FLOATING 0xFFFFFFFF -#define APPLE2_MEM_MASK 0x00FFFFFF - -enum machine_type_t -{ - APPLE_II, // Apple II/II+ - APPLE_IIE, // Apple IIe with aux slots - APPLE_IIGS, // Apple IIgs - APPLE_IIC, // Apple IIc - APPLE_IICPLUS, // Apple IIc+ - TK2000, // Microdigital TK2000 - TK3000, // Microdigital TK3000 - LASER128, // Laser 128/128EX/128EX2 - SPACE84, // "Space 84" with flipped text mode - LABA2P // lab equipment (?) II Plus with flipped text mode -}; - -enum bank_disposition_t -{ - A2MEM_IO = 0, /* this is always handlers; never banked memory */ - A2MEM_MONO = 1, /* this is a bank where read and write are always in unison */ - A2MEM_DUAL = 2 /* this is a bank where read and write can go different places */ -}; - -struct apple2_meminfo -{ - UINT32 read_mem; - read8_delegate *read_handler; - UINT32 write_mem; - write8_delegate *write_handler; -}; - -struct apple2_memmap_entry -{ - offs_t begin; - offs_t end; - void (*get_meminfo)(running_machine &machine, offs_t begin, offs_t end, apple2_meminfo *meminfo); - bank_disposition_t bank_disposition; -}; - -struct apple2_memmap_config -{ - int first_bank; - UINT8 *auxmem; - UINT32 auxmem_length; - const apple2_memmap_entry *memmap; -}; - -class apple2_state : public driver_device -{ -public: - apple2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_ay3600(*this, "ay3600"), - m_a2bus(*this, "a2bus"), - m_a2eauxslot(*this, AUXSLOT_TAG), - m_joy1x(*this, "joystick_1_x"), - m_joy1y(*this, "joystick_1_y"), - m_joy2x(*this, "joystick_2_x"), - m_joy2y(*this, "joystick_2_y"), - m_joybuttons(*this, "joystick_buttons"), - m_kbdrom(*this, "keyboard"), - m_kbspecial(*this, "keyb_special"), - m_kbrepeat(*this, "keyb_repeat"), - m_resetdip(*this, "reset_dip"), - m_sysconfig(*this, "a2_config"), - m_cassette(*this, "cassette"), - m_acia1(*this, IIC_ACIA1_TAG), - m_acia2(*this, IIC_ACIA2_TAG), - m_laserudc(*this, LASER128_UDC_TAG), - m_iicpiwm(*this, IICP_IWM_TAG) - { } - - required_device m_maincpu; - required_device m_ram; - required_device m_ay3600; - required_device m_a2bus; - optional_device m_a2eauxslot; - - optional_ioport m_joy1x, m_joy1y, m_joy2x, m_joy2y, m_joybuttons; - optional_memory_region m_kbdrom; - required_ioport m_kbspecial; - optional_ioport m_kbrepeat; - optional_ioport m_resetdip; - optional_ioport m_sysconfig; - optional_device m_cassette; - - optional_device m_acia1, m_acia2; - optional_device m_laserudc; - optional_device m_iicpiwm; - - UINT32 m_flags, m_flags_mask; - INT32 m_a2_cnxx_slot; - UINT32 m_a2_mask; - UINT32 m_a2_set; - int m_a2_speaker_state; - double m_joystick_x1_time; - double m_joystick_y1_time; - double m_joystick_x2_time; - double m_joystick_y2_time; - apple2_memmap_config m_mem_config; - apple2_meminfo *m_current_meminfo; - int m_fdc_diskreg; - const UINT8 *m_a2_videoram, *m_a2_videoaux, *m_textgfx_data; - UINT32 m_a2_videomask, m_textgfx_datalen; - UINT32 m_old_a2; - int m_fgcolor; - int m_bgcolor; - int m_flash; - int m_alt_charset_value; - UINT16 *m_hires_artifact_map; - UINT16 *m_dhires_artifact_map; - bool m_monochrome_dhr; - int m_inh_slot; - int m_reset_flag; - - UINT8 *m_rambase; - - UINT8 *m_rom, *m_slot_ram; - UINT32 m_rom_length, m_slot_length; - - machine_type_t m_machinetype; - - device_a2eauxslot_card_interface *m_auxslotdevice; - - UINT16 m_lastchar, m_strobe; - UINT8 m_transchar; - - READ8_MEMBER(apple2_c0xx_r); - WRITE8_MEMBER(apple2_c0xx_w); - READ8_MEMBER(apple2_c080_r); - WRITE8_MEMBER(apple2_c080_w); - - READ8_MEMBER ( apple2_c00x_r ); - READ8_MEMBER ( apple2_c01x_r ); - READ8_MEMBER ( apple2_c02x_r ); - READ8_MEMBER ( apple2_c03x_r ); - READ8_MEMBER ( apple2_c05x_r ); - READ8_MEMBER ( apple2_c06x_r ); - READ8_MEMBER ( apple2_c07x_r ); - WRITE8_MEMBER ( apple2_c00x_w ); - WRITE8_MEMBER ( apple2_c01x_w ); - WRITE8_MEMBER ( apple2_c02x_w ); - WRITE8_MEMBER ( apple2_c03x_w ); - WRITE8_MEMBER ( apple2_c05x_w ); - WRITE8_MEMBER ( apple2_c07x_w ); - - READ8_MEMBER ( apple2_mainram0000_r ); - READ8_MEMBER ( apple2_mainram0200_r ); - READ8_MEMBER ( apple2_mainram0400_r ); - READ8_MEMBER ( apple2_mainram0800_r ); - READ8_MEMBER ( apple2_mainram2000_r ); - READ8_MEMBER ( apple2_mainram4000_r ); - READ8_MEMBER ( apple2_mainramc000_r ); - READ8_MEMBER ( apple2_mainramd000_r ); - READ8_MEMBER ( apple2_mainrame000_r ); - READ8_MEMBER ( apple2_auxram0000_r ); - READ8_MEMBER ( apple2_auxram0200_r ); - READ8_MEMBER ( apple2_auxram0400_r ); - READ8_MEMBER ( apple2_auxram0800_r ); - READ8_MEMBER ( apple2_auxram2000_r ); - READ8_MEMBER ( apple2_auxram4000_r ); - READ8_MEMBER ( apple2_auxramc000_r ); - READ8_MEMBER ( apple2_auxramd000_r ); - READ8_MEMBER ( apple2_auxrame000_r ); - - WRITE8_MEMBER ( apple2_mainram0000_w ); - WRITE8_MEMBER ( apple2_mainram0200_w ); - WRITE8_MEMBER ( apple2_mainram0400_w ); - WRITE8_MEMBER ( apple2_mainram0800_w ); - WRITE8_MEMBER ( apple2_mainram2000_w ); - WRITE8_MEMBER ( apple2_mainram4000_w ); - WRITE8_MEMBER ( apple2_mainramc000_w ); - WRITE8_MEMBER ( apple2_mainramd000_w ); - WRITE8_MEMBER ( apple2_mainrame000_w ); - WRITE8_MEMBER ( apple2_auxram0000_w ); - WRITE8_MEMBER ( apple2_auxram0200_w ); - WRITE8_MEMBER ( apple2_auxram0400_w ); - WRITE8_MEMBER ( apple2_auxram0800_w ); - WRITE8_MEMBER ( apple2_auxram2000_w ); - WRITE8_MEMBER ( apple2_auxram4000_w ); - WRITE8_MEMBER ( apple2_auxramc000_w ); - WRITE8_MEMBER ( apple2_auxramd000_w ); - WRITE8_MEMBER ( apple2_auxrame000_w ); - - READ8_MEMBER ( apple2_c1xx_r ); - WRITE8_MEMBER ( apple2_c1xx_w ); - READ8_MEMBER ( apple2_c3xx_r ); - WRITE8_MEMBER ( apple2_c3xx_w ); - READ8_MEMBER ( apple2_c4xx_r ); - WRITE8_MEMBER ( apple2_c4xx_w ); - - READ8_MEMBER ( apple2_c800_r ); - WRITE8_MEMBER ( apple2_c800_w ); - READ8_MEMBER ( apple2_ce00_r ); - WRITE8_MEMBER ( apple2_ce00_w ); - - READ8_MEMBER ( apple2_inh_d000_r ); - WRITE8_MEMBER ( apple2_inh_d000_w ); - READ8_MEMBER ( apple2_inh_e000_r ); - WRITE8_MEMBER ( apple2_inh_e000_w ); - - READ8_MEMBER(read_floatingbus); - - READ8_MEMBER(apple2_cfff_r); - WRITE8_MEMBER(apple2_cfff_w); - - void apple2_refresh_delegates(); - int apple2_pressed_specialkey(UINT8 key); - - read8_delegate read_delegates_master[4]; - write8_delegate write_delegates_master[3]; - write8_delegate write_delegates_0000[2]; - write8_delegate write_delegates_0200[2]; - write8_delegate write_delegates_0400[2]; - write8_delegate write_delegates_0800[2]; - write8_delegate write_delegates_2000[2]; - write8_delegate write_delegates_4000[2]; - write8_delegate write_delegates_c000[2]; - write8_delegate write_delegates_d000[2]; - write8_delegate write_delegates_e000[2]; - read8_delegate read_delegates_0000[2]; - read8_delegate read_delegates_0200[2]; - read8_delegate read_delegates_0400[2]; - read8_delegate read_delegates_0800[2]; - read8_delegate read_delegates_2000[2]; - read8_delegate read_delegates_4000[2]; - read8_delegate read_delegates_c000[2]; - read8_delegate read_delegates_d000[2]; - read8_delegate read_delegates_e000[2]; - read8_delegate rd_c000; - write8_delegate wd_c000; - read8_delegate rd_c080; - write8_delegate wd_c080; - read8_delegate rd_cfff; - write8_delegate wd_cfff; - read8_delegate rd_c800; - write8_delegate wd_c800; - read8_delegate rd_ce00; - write8_delegate wd_ce00; - read8_delegate rd_inh_d000; - write8_delegate wd_inh_d000; - read8_delegate rd_inh_e000; - write8_delegate wd_inh_e000; - DECLARE_MACHINE_START(apple2orig); - DECLARE_MACHINE_START(apple2e); - DECLARE_MACHINE_START(apple2c); - DECLARE_MACHINE_START(apple2cp); - DECLARE_MACHINE_START(tk2000); - DECLARE_MACHINE_START(tk3000); - DECLARE_MACHINE_START(laser128); - DECLARE_MACHINE_START(space84); - DECLARE_MACHINE_START(laba2p); - DECLARE_VIDEO_START(apple2); - DECLARE_PALETTE_INIT(apple2); - DECLARE_VIDEO_START(apple2p); - DECLARE_VIDEO_START(apple2e); - DECLARE_VIDEO_START(apple2c); - UINT32 screen_update_apple2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(apple2_interrupt); - DECLARE_WRITE_LINE_MEMBER(a2bus_irq_w); - DECLARE_WRITE_LINE_MEMBER(a2bus_nmi_w); - DECLARE_WRITE_LINE_MEMBER(a2bus_inh_w); - DECLARE_READ_LINE_MEMBER(ay3600_shift_r); - DECLARE_READ_LINE_MEMBER(ay3600_control_r); - DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w); - DECLARE_WRITE_LINE_MEMBER(ay3600_iie_data_ready_w); - void apple2_update_memory_postload(); - virtual void machine_reset(); - void apple2_setup_memory(const apple2_memmap_config *config); - void apple2_update_memory(); - inline UINT32 effective_a2(); - UINT32 compute_video_address(int col, int row); - void adjust_begin_and_end_row(const rectangle &cliprect, int *beginrow, int *endrow); - inline void apple2_plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code, - const UINT8 *textgfx_data, UINT32 textgfx_datalen, UINT32 my_a2); - void apple2_text_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int page, int beginrow, int endrow); - void apple2_lores_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int page, int beginrow, int endrow); - void apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int page, int beginrow, int endrow); - void apple2_video_start(const UINT8 *vram, const UINT8 *aux_vram, UINT32 ignored_softswitches, int hires_modulo); - void apple2_setvar(UINT32 val, UINT32 mask); - UINT8 apple2_getfloatingbusvalue(); - int apple2_fdc_has_35(); - int apple2_fdc_has_525(); - void apple2_iwm_setdiskreg(UINT8 data); - void apple2_init_common(); - void apple2eplus_init_common(void *apple2cp_ce00_ram); - INT8 apple2_slotram_r(address_space &space, int slotnum, int offset); - int a2_no_ctrl_reset(); - -private: - // Laser 128EX2 slot 5 Apple Memory Expansion emulation vars - UINT8 m_exp_bankhior; - int m_exp_addrmask; - UINT8 m_exp_regs[0x10]; - UINT8 *m_exp_ram; - int m_exp_wptr, m_exp_liveptr; -}; -/*----------- defined in drivers/apple2.c -----------*/ -INPUT_PORTS_EXTERN( apple2ep ); -/*----------- defined in machine/apple2.c -----------*/ -extern const applefdc_interface apple2_fdc_interface; - -#endif /* APPLE2_H_ */ diff --git a/src/mess/includes/apple2gs.h b/src/mess/includes/apple2gs.h deleted file mode 100644 index eddd8445cd5..00000000000 --- a/src/mess/includes/apple2gs.h +++ /dev/null @@ -1,267 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods,R. Belmont -/***************************************************************************** - * - * includes/apple2gs.h - * - * Apple IIgs - * - ****************************************************************************/ - -#ifndef APPLE2GS_H_ -#define APPLE2GS_H_ - -#define RUN_ADB_MICRO (0) - -#include "includes/apple2.h" -#include "sound/es5503.h" -#include "machine/nvram.h" -#include "cpu/g65816/g65816.h" -#include "cpu/m6502/m5074x.h" - -#define ADBMICRO_TAG "adbmicro" - -// IIgs clocks as marked on the schematics -#define APPLE2GS_28M (XTAL_28_63636MHz) // IIGS master clock -#define APPLE2GS_14M (APPLE2GS_28M/2) -#define APPLE2GS_7M (APPLE2GS_28M/4) - -// screen dimensions -#define BORDER_LEFT (32) -#define BORDER_RIGHT (32) -#define BORDER_TOP (16) // (plus bottom) - -// these are numbered as seen from the MCU -enum glu_reg_names -{ - GLU_KEY_DATA = 0, // MCU W - GLU_COMMAND, // MCU R - GLU_MOUSEX, // MCU W - GLU_MOUSEY, // MCU W - GLU_KG_STATUS, // MCU R - GLU_ANY_KEY_DOWN, // MCU W - GLU_KEYMOD, // MCU W - GLU_DATA, // MCU W - - GLU_C000, // 816 R - GLU_C010, // 816 RW - GLU_SYSSTAT // 816 R/(limited) W -}; - -enum glu_kg_status -{ - KGS_ANY_KEY_DOWN = 0x01, - KGS_KEYSTROBE = 0x10, - KGS_DATA_FULL = 0x20, - KGS_COMMAND_FULL = 0x40, - KGS_MOUSEX_FULL = 0x80 -}; - -enum apple2gs_clock_mode -{ - CLOCKMODE_IDLE, - CLOCKMODE_TIME, - CLOCKMODE_INTERNALREGS, - CLOCKMODE_BRAM1, - CLOCKMODE_BRAM2 -}; - - -enum adbstate_t -{ - ADBSTATE_IDLE, - ADBSTATE_INCOMMAND, - ADBSTATE_INRESPONSE -}; - -#define IRQ_KBD_SRQ 0x01 -#define IRQ_ADB_DATA 0x02 -#define IRQ_ADB_MOUSE 0x04 -#define IRQ_VGC_SCANLINE 0x08 -#define IRQ_VGC_SECOND 0x10 -#define IRQ_INTEN_QSECOND 0x20 -#define IRQ_INTEN_VBL 0x40 -#define IRQ_DOC 0x80 -#define IRQ_SLOT 0x100 - -void apple2gs_add_irq(running_machine &machine, UINT16 irq_mask); -void apple2gs_remove_irq(running_machine &machine, UINT16 irq_mask); - -class apple2gs_state : public apple2_state -{ -public: - apple2gs_state(const machine_config &mconfig, device_type type, const char *tag) - : apple2_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_es5503(*this, "es5503"), - m_fdc(*this, "fdc"), - #if RUN_ADB_MICRO - m_adbmicro(*this, ADBMICRO_TAG), - #endif - m_adb_mousex(*this, "adb_mouse_x"), - m_adb_mousey(*this, "adb_mouse_y"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_es5503; - required_device m_fdc; - #if RUN_ADB_MICRO - optional_device m_adbmicro; - #endif - - required_ioport m_adb_mousex, m_adb_mousey; - required_device m_palette; - - UINT8 *m_slowmem; - UINT8 m_newvideo; - UINT16 m_bordercolor; - UINT8 m_vgcint; - UINT8 m_langsel; - UINT8 m_sltromsel; - UINT8 m_cyareg; - UINT8 m_inten; - UINT8 m_intflag; - UINT8 m_shadow; - UINT16 m_pending_irqs; - UINT8 m_mouse_x; - UINT8 m_mouse_y; - INT8 m_mouse_dx; - INT8 m_mouse_dy; - device_t *m_cur_slot6_image; - emu_timer *m_scanline_timer; - emu_timer *m_clock_timer; - emu_timer *m_qsecond_timer; - UINT8 m_clock_data; - UINT8 m_clock_control; - UINT8 m_clock_read; - UINT8 m_clock_reg1; - apple2gs_clock_mode m_clock_mode; - UINT32 m_clock_curtime; - seconds_t m_clock_curtime_interval; - UINT8 m_clock_bram[256]; - #if !RUN_ADB_MICRO - adbstate_t m_adb_state; - UINT8 m_adb_command; - UINT8 m_adb_mode; - UINT8 m_adb_kmstatus; - UINT8 m_adb_latent_result; - INT32 m_adb_command_length; - INT32 m_adb_command_pos; - UINT8 m_adb_command_bytes[8]; - UINT8 m_adb_response_bytes[8]; - UINT8 m_adb_response_length; - INT32 m_adb_response_pos; - UINT8 m_adb_memory[0x100]; - int m_adb_address_keyboard; - int m_adb_address_mouse; - #endif - UINT8 m_sndglu_ctrl; - int m_sndglu_addr; - int m_sndglu_dummy_read; - bitmap_ind16 *m_legacy_gfx; - bool m_is_rom3; - UINT8 m_echo_bank; - UINT64 m_last_adb_time; - int m_adb_dtime; - UINT32 m_a2_palette[16]; - UINT32 m_shr_palette[256]; - - READ8_MEMBER( apple2gs_c0xx_r ); - WRITE8_MEMBER( apple2gs_c0xx_w ); - WRITE8_MEMBER( apple2gs_main0400_w ); - WRITE8_MEMBER( apple2gs_aux0400_w ); - WRITE8_MEMBER( apple2gs_main2000_w ); - WRITE8_MEMBER( apple2gs_aux2000_w ); - WRITE8_MEMBER( apple2gs_main4000_w ); - WRITE8_MEMBER( apple2gs_aux4000_w ); - - UINT8 adb_read_datareg(); - UINT8 adb_read_kmstatus(); - - void apple2gs_refresh_delegates(); - - write8_delegate write_delegates_2gs0400[2]; - write8_delegate write_delegates_2gs2000[2]; - write8_delegate write_delegates_2gs4000[2]; - DECLARE_MACHINE_START(apple2gs); - DECLARE_MACHINE_RESET(apple2gs); - DECLARE_VIDEO_START(apple2gs); - DECLARE_PALETTE_INIT(apple2gs); - DECLARE_MACHINE_START(apple2gsr1); - DECLARE_MACHINE_START(apple2gscommon); - UINT32 screen_update_apple2gs(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(apple2gs_clock_tick); - TIMER_CALLBACK_MEMBER(apple2gs_qsecond_tick); - TIMER_CALLBACK_MEMBER(apple2gs_scanline_tick); - DECLARE_WRITE_LINE_MEMBER(a2bus_irq_w); - DECLARE_WRITE_LINE_MEMBER(a2bus_nmi_w); - DECLARE_WRITE_LINE_MEMBER(a2bus_inh_w); - DECLARE_READ8_MEMBER(apple2gs_read_vector); - - // ADB MCU and ADB GLU stuff - #if RUN_ADB_MICRO - UINT8 m_glu_regs[8], m_glu_bus, m_glu_sysstat; - bool m_glu_mcu_read_kgs, m_glu_816_read_dstat, m_glu_mouse_read_stat, m_adb_line; - - UINT8 keyglu_mcu_read(UINT8 offset); - void keyglu_mcu_write(UINT8 offset, UINT8 data); - UINT8 keyglu_816_read(UINT8 offset); - void keyglu_816_write(UINT8 offset, UINT8 data); - - DECLARE_READ8_MEMBER(adbmicro_p0_in); - DECLARE_READ8_MEMBER(adbmicro_p1_in); - DECLARE_READ8_MEMBER(adbmicro_p2_in); - DECLARE_READ8_MEMBER(adbmicro_p3_in); - DECLARE_WRITE8_MEMBER(adbmicro_p0_out); - DECLARE_WRITE8_MEMBER(adbmicro_p1_out); - DECLARE_WRITE8_MEMBER(adbmicro_p2_out); - DECLARE_WRITE8_MEMBER(adbmicro_p3_out); - #endif - void process_clock(); - const char *apple2gs_irq_name(UINT16 irq_mask); - void apple2gs_add_irq(UINT16 irq_mask); - void apple2gs_remove_irq(UINT16 irq_mask); - UINT8 adb_read_memory(UINT32 address); - void adb_write_memory(UINT32 address, UINT8 data); - void adb_set_mode(UINT8 mode); - void adb_set_config(UINT8 b1, UINT8 b2, UINT8 b3); - void adb_post_response(const UINT8 *bytes, size_t length); - void adb_post_response_1(UINT8 b); - void adb_post_response_2(UINT8 b1, UINT8 b2); - void adb_do_command(); - void adb_write_datareg(UINT8 data); - void adb_write_kmstatus(UINT8 data); - UINT8 adb_read_mousedata(); - INT8 seven_bit_diff(UINT8 v1, UINT8 v2); - void adb_check_mouse(); - void apple2gs_set_scanint(UINT8 data); - int apple2gs_get_vpos(); - UINT8 *apple2gs_getslotmem(offs_t address); - UINT8 apple2gs_xxCxxx_r(address_space &space, offs_t address); - void apple2gs_xxCxxx_w(address_space &space, offs_t address, UINT8 data); - void apple2gs_setup_memory(); - - DECLARE_READ8_MEMBER( gssnd_r ); - DECLARE_WRITE8_MEMBER( gssnd_w ); - DECLARE_READ8_MEMBER( apple2gs_00Cxxx_r ); - DECLARE_READ8_MEMBER( apple2gs_01Cxxx_r ); - DECLARE_READ8_MEMBER( apple2gs_E0Cxxx_r ); - DECLARE_READ8_MEMBER( apple2gs_E1Cxxx_r ); - DECLARE_WRITE8_MEMBER( apple2gs_00Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_01Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E0Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E1Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_Exxxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E004xx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E02xxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E104xx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E12xxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_slowmem_w ); - DECLARE_READ8_MEMBER(apple2gs_bank_echo_r); - DECLARE_WRITE_LINE_MEMBER( apple2gs_doc_irq); - DECLARE_READ8_MEMBER(apple2gs_adc_read); - -}; - -#endif /* APPLE2GS_H_ */ diff --git a/src/mess/includes/apple3.h b/src/mess/includes/apple3.h deleted file mode 100644 index 1d389c0b435..00000000000 --- a/src/mess/includes/apple3.h +++ /dev/null @@ -1,173 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods,R. Belmont -/***************************************************************************** - * - * includes/apple3.h - * - * Apple /// - * - ****************************************************************************/ - -#ifndef APPLE3_H_ -#define APPLE3_H_ - -#include "cpu/m6502/m6502.h" -#include "includes/apple2.h" -#include "machine/ram.h" -#include "bus/a2bus/a2bus.h" -#include "machine/mos6551.h" -#include "machine/6522via.h" -#include "machine/kb3600.h" -#include "machine/mm58167.h" -#include "sound/speaker.h" -#include "sound/dac.h" -#include "machine/wozfdc.h" -#include "imagedev/floppy.h" -#include "formats/flopimg.h" - -#define VAR_VM0 0x0001 -#define VAR_VM1 0x0002 -#define VAR_VM2 0x0004 -#define VAR_VM3 0x0008 -#define VAR_EXTA0 0x0010 -#define VAR_EXTA1 0x0020 -#define VAR_EXTPOWER 0x0040 -#define VAR_EXTSIDE 0x0080 - -#define SPEAKER_TAG "a3spkr" -#define DAC_TAG "a3dac" - -class apple3_state : public driver_device -{ -public: - apple3_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_via_0(*this, "via6522_0"), - m_via_1(*this, "via6522_1"), - m_acia(*this, "acia"), - m_fdc(*this, "fdc"), - m_ay3600(*this, "ay3600"), - m_a2bus(*this, "a2bus"), - m_rtc(*this, "rtc"), - m_speaker(*this, SPEAKER_TAG), - m_dac(*this, DAC_TAG), - m_kbspecial(*this, "keyb_special"), - m_palette(*this, "palette"), - m_joy1x(*this, "joy_1_x"), - m_joy1y(*this, "joy_1_y"), - m_joy2x(*this, "joy_2_x"), - m_joy2y(*this, "joy_2_y"), - m_joybuttons(*this, "joy_buttons"), - m_pdltimer(*this, "pdltimer"), - floppy0(*this, "0"), - floppy1(*this, "1"), - floppy2(*this, "2"), - floppy3(*this, "3") - { - } - - required_device m_maincpu; - required_device m_ram; - required_device m_via_0; - required_device m_via_1; - required_device m_acia; - required_device m_fdc; - required_device m_ay3600; - required_device m_a2bus; - required_device m_rtc; - required_device m_speaker; - required_device m_dac; - required_ioport m_kbspecial; - required_device m_palette; - required_ioport m_joy1x, m_joy1y, m_joy2x, m_joy2y, m_joybuttons; - required_device m_pdltimer; - required_device floppy0; - required_device floppy1; - required_device floppy2; - required_device floppy3; - - DECLARE_READ8_MEMBER(apple3_memory_r); - DECLARE_WRITE8_MEMBER(apple3_memory_w); - DECLARE_WRITE_LINE_MEMBER(apple3_sync_w); - DECLARE_READ8_MEMBER(apple3_c0xx_r); - DECLARE_WRITE8_MEMBER(apple3_c0xx_w); - DECLARE_READ8_MEMBER(apple3_00xx_r); - DECLARE_WRITE8_MEMBER(apple3_00xx_w); - DECLARE_DRIVER_INIT(apple3); - DECLARE_MACHINE_RESET(apple3); - DECLARE_VIDEO_START(apple3); - UINT32 screen_update_apple3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(apple3_interrupt); - DECLARE_WRITE_LINE_MEMBER(apple3_acia_irq_func); - DECLARE_WRITE8_MEMBER(apple3_via_0_out_a); - DECLARE_WRITE8_MEMBER(apple3_via_0_out_b); - DECLARE_WRITE8_MEMBER(apple3_via_1_out_a); - DECLARE_WRITE8_MEMBER(apple3_via_1_out_b); - DECLARE_WRITE_LINE_MEMBER(apple3_via_0_irq_func); - DECLARE_WRITE_LINE_MEMBER(apple3_via_1_irq_func); - void apple3_write_charmem(); - void apple3_video_text40(bitmap_ind16 &bitmap); - void apple3_video_text80(bitmap_ind16 &bitmap); - void apple3_video_graphics_hgr(bitmap_ind16 &bitmap); - UINT8 swap_bits(UINT8 b); - void apple3_video_graphics_chgr(bitmap_ind16 &bitmap); - void apple3_video_graphics_shgr(bitmap_ind16 &bitmap); - void apple3_video_graphics_chires(bitmap_ind16 &bitmap); - UINT8 *apple3_bankaddr(UINT16 bank, offs_t offset); - UINT8 *apple3_get_zpa_addr(offs_t offset); - void apple3_update_memory(); - void apple3_via_out(UINT8 *var, UINT8 data); - UINT8 *apple3_get_indexed_addr(offs_t offset); - TIMER_DEVICE_CALLBACK_MEMBER(apple3_c040_tick); - DECLARE_PALETTE_INIT(apple3); - void apple3_irq_update(); - DECLARE_READ_LINE_MEMBER(ay3600_shift_r); - DECLARE_READ_LINE_MEMBER(ay3600_control_r); - DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w); - void apple3_postload(); - TIMER_DEVICE_CALLBACK_MEMBER(paddle_timer); - void pdl_handler(int offset); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - DECLARE_WRITE_LINE_MEMBER(a2bus_irq_w); - DECLARE_WRITE_LINE_MEMBER(a2bus_nmi_w); - - // these need to be public for now - UINT32 m_flags; - int m_enable_mask; - -private: - int m_acia_irq; - UINT8 m_via_0_a; - UINT8 m_via_0_b; - UINT8 m_via_1_a; - UINT8 m_via_1_b; - int m_via_0_irq; - int m_via_1_irq; - offs_t m_zpa; - UINT8 m_last_n; - UINT8 m_char_mem[0x800]; - UINT32 *m_hgr_map; - - bool m_sync; - bool m_rom_has_been_disabled; - int m_cnxx_slot; - UINT8 m_indir_bank; - - UINT8 *m_bank2, *m_bank3, *m_bank4, *m_bank5, *m_bank8, *m_bank9; - UINT8 *m_bank10, *m_bank11; - UINT8 *m_bank6, *m_bank7rd, *m_bank7wr; - int m_speaker_state; - int m_c040_time; - UINT16 m_lastchar, m_strobe; - UINT8 m_transchar; - - int m_analog_sel; - bool m_ramp_active; - int m_pdl_charge; - int m_va, m_vb, m_vc; - int m_smoothscr; -}; - -#endif /* APPLE3_H_ */ diff --git a/src/mess/includes/aquarius.h b/src/mess/includes/aquarius.h deleted file mode 100644 index 1375aa6015c..00000000000 --- a/src/mess/includes/aquarius.h +++ /dev/null @@ -1,89 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/***************************************************************************** - * - * includes/aquarius.h - * - ****************************************************************************/ - -#ifndef __AQUARIUS__ -#define __AQUARIUS__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "video/tea1002.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "sound/ay8910.h" -#include "sound/speaker.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -class aquarius_state : public driver_device -{ -public: - aquarius_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_cart(*this, "cartslot"), - m_ram(*this, RAM_TAG), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_tea1002(*this, "encoder"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_cassette; - required_device m_speaker; - required_device m_cart; - required_device m_ram; - required_shared_ptr m_videoram; - required_shared_ptr m_colorram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_device m_gfxdecode; - required_device m_screen; - required_device m_tea1002; - required_device m_palette; - - UINT8 m_scrambler; - tilemap_t *m_tilemap; - - DECLARE_WRITE8_MEMBER(aquarius_videoram_w); - DECLARE_WRITE8_MEMBER(aquarius_colorram_w); - DECLARE_READ8_MEMBER(cassette_r); - DECLARE_WRITE8_MEMBER(cassette_w); - DECLARE_READ8_MEMBER(vsync_r); - DECLARE_WRITE8_MEMBER(mapper_w); - DECLARE_READ8_MEMBER(printer_r); - DECLARE_WRITE8_MEMBER(printer_w); - DECLARE_READ8_MEMBER(keyboard_r); - DECLARE_WRITE8_MEMBER(scrambler_w); - DECLARE_READ8_MEMBER(cartridge_r); - DECLARE_DRIVER_INIT(aquarius); - TILE_GET_INFO_MEMBER(aquarius_gettileinfo); - virtual void video_start(); - DECLARE_PALETTE_INIT(aquarius); - UINT32 screen_update_aquarius(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_INPUT_CHANGED_MEMBER(aquarius_reset); -}; -#endif /* AQUARIUS_H_ */ diff --git a/src/mess/includes/arcadia.h b/src/mess/includes/arcadia.h deleted file mode 100644 index f7bf608bb42..00000000000 --- a/src/mess/includes/arcadia.h +++ /dev/null @@ -1,128 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/arcadia.h - * - ****************************************************************************/ - -#ifndef ARCADIA_H_ -#define ARCADIA_H_ - -#include "emu.h" -#include "cpu/s2650/s2650.h" -#include "audio/arcadia.h" - -#include "bus/arcadia/slot.h" -#include "bus/arcadia/rom.h" - -// space vultures sprites above -// combat below and invisible -#define YPOS 0 -//#define YBOTTOM_SIZE 24 -// grand slam sprites left and right -// space vultures left -// space attack left -#define XPOS 32 - - -class arcadia_state : public driver_device -{ -public: - arcadia_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_custom(*this, "custom"), - m_panel(*this, "panel"), - m_controller1_col1(*this, "controller1_col1"), - m_controller1_col2(*this, "controller1_col2"), - m_controller1_col3(*this, "controller1_col3"), - m_controller1_extra(*this, "controller1_extra"), - m_controller2_col1(*this, "controller2_col1"), - m_controller2_col2(*this, "controller2_col2"), - m_controller2_col3(*this, "controller2_col3"), - m_controller2_extra(*this, "controller2_extra"), - m_joysticks(*this, "joysticks") , - m_maincpu(*this, "maincpu"), - m_cart(*this, "cartslot"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_screen(*this, "screen") { } - - DECLARE_READ8_MEMBER(vsync_r); - DECLARE_READ8_MEMBER(video_r); - DECLARE_WRITE8_MEMBER(video_w); - int m_line; - int m_charline; - int m_shift; - int m_ad_delay; - int m_ad_select; - int m_ypos; - int m_graphics; - int m_doublescan; - int m_lines26; - int m_multicolor; - struct { int x, y; } m_pos[4]; - UINT8 m_bg[262][16+2*XPOS/8]; - UINT8 m_rectangle[0x40][8]; - UINT8 m_chars[0x40][8]; - int m_breaker; - union - { - UINT8 data[0x400]; - struct - { - // 0x1800 - UINT8 chars1[13][16]; - UINT8 ram1[2][16]; - struct { UINT8 y,x; } pos[4]; - UINT8 ram2[4]; - UINT8 vpos; - UINT8 sound1, sound2; - UINT8 char_line; - // 0x1900 - UINT8 pad1a, pad1b, pad1c, pad1d; - UINT8 pad2a, pad2b, pad2c, pad2d; - UINT8 keys, unmapped3[0x80-9]; - UINT8 chars[8][8]; - UINT8 unknown[0x38]; - UINT8 pal[4]; - UINT8 collision_bg, - collision_sprite; - UINT8 ad[2]; - // 0x1a00 - UINT8 chars2[13][16]; - UINT8 ram3[3][16]; - } d; - } m_reg; - bitmap_ind16 *m_bitmap; - DECLARE_DRIVER_INIT(arcadia); - virtual void machine_start(); - virtual void video_start(); - DECLARE_PALETTE_INIT(arcadia); - UINT32 screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(video_line); - -protected: - required_device m_custom; - required_ioport m_panel; - required_ioport m_controller1_col1; - required_ioport m_controller1_col2; - required_ioport m_controller1_col3; - required_ioport m_controller1_extra; - required_ioport m_controller2_col1; - required_ioport m_controller2_col2; - required_ioport m_controller2_col3; - required_ioport m_controller2_extra; - required_ioport m_joysticks; - - void draw_char(UINT8 *ch, int charcode, int y, int x); - void vh_draw_line(int y, UINT8 chars1[16]); - int sprite_collision(int n1, int n2); - void draw_sprites(); - required_device m_maincpu; - required_device m_cart; - required_device m_gfxdecode; - required_device m_palette; - required_device m_screen; -}; -#endif /* ARCADIA_H_ */ diff --git a/src/mess/includes/at.h b/src/mess/includes/at.h deleted file mode 100644 index 63391195f90..00000000000 --- a/src/mess/includes/at.h +++ /dev/null @@ -1,200 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Miodrag Milanovic -/***************************************************************************** - * - * includes/at.h - * - * IBM AT Compatibles - * - ****************************************************************************/ - -#ifndef AT_H_ -#define AT_H_ - -#include "emu.h" -#include "cpu/i86/i86.h" -#include "cpu/i86/i286.h" -#include "cpu/i386/i386.h" - -#include "machine/ins8250.h" -#include "machine/mc146818.h" -#include "machine/ds128x.h" -#include "machine/pic8259.h" -#include "bus/lpci/i82371ab.h" -#include "bus/lpci/i82371sb.h" -#include "bus/lpci/i82439tx.h" -#include "bus/lpci/vt82c505.h" -#include "machine/vt82c496.h" -#include "machine/cs8221.h" -#include "machine/pit8253.h" -#include "machine/wd7600.h" - -#include "machine/idectrl.h" -#include "machine/at_keybc.h" - -#include "imagedev/harddriv.h" -#include "machine/am9517a.h" -#include "bus/lpci/pci.h" - -#include "sound/dac.h" -#include "sound/speaker.h" -#include "machine/ram.h" -#include "machine/nvram.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" - -#include "machine/pc_lpt.h" -#include "bus/pc_kbd/pc_kbdc.h" - - -class at586_state : public driver_device -{ -public: - at586_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") { } - required_device m_maincpu; - - DECLARE_DRIVER_INIT(at586); -}; - -class at_state : public driver_device -{ -public: - at_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pic8259_master(*this, "pic8259_master"), - m_pic8259_slave(*this, "pic8259_slave"), - m_dma8237_1(*this, "dma8237_1"), - m_dma8237_2(*this, "dma8237_2"), - m_pit8254(*this, "pit8254"), - m_cs8221(*this, "cs8221"), - m_ide(*this, "ide"), - m_keybc(*this, "keybc"), - m_isabus(*this, "isabus"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_mc146818(*this, "rtc"), - m_pc_kbdc(*this, "pc_kbdc") - { } - - required_device m_maincpu; - optional_device m_pic8259_master; - optional_device m_pic8259_slave; - optional_device m_dma8237_1; - optional_device m_dma8237_2; - optional_device m_pit8254; - optional_device m_cs8221; - optional_device m_ide; - optional_device m_keybc; - optional_device m_isabus; - required_device m_speaker; - optional_device m_ram; - optional_device m_mc146818; - optional_device m_pc_kbdc; - DECLARE_READ8_MEMBER(at_page8_r); - DECLARE_WRITE8_MEMBER(at_page8_w); - DECLARE_READ8_MEMBER(at_portb_r); - DECLARE_WRITE8_MEMBER(at_portb_w); - DECLARE_READ8_MEMBER(ps2_portb_r); - DECLARE_READ8_MEMBER(get_slave_ack); - DECLARE_WRITE_LINE_MEMBER(at_pit8254_out0_changed); - DECLARE_WRITE_LINE_MEMBER(at_pit8254_out2_changed); - DECLARE_WRITE_LINE_MEMBER(pc_dma_hrq_changed); - DECLARE_READ8_MEMBER(pc_dma8237_0_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_1_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_2_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_3_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_5_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_6_dack_r); - DECLARE_READ8_MEMBER(pc_dma8237_7_dack_r); - DECLARE_WRITE8_MEMBER(pc_dma8237_0_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_1_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_2_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_3_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_5_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_6_dack_w); - DECLARE_WRITE8_MEMBER(pc_dma8237_7_dack_w); - DECLARE_WRITE_LINE_MEMBER(at_dma8237_out_eop); - DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack2_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack3_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack4_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack5_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack6_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack7_w); - DECLARE_READ32_MEMBER(ide_r); - DECLARE_WRITE32_MEMBER(ide_w); - DECLARE_READ8_MEMBER(at_dma8237_2_r); - DECLARE_WRITE8_MEMBER(at_dma8237_2_w); - DECLARE_READ8_MEMBER(at_keybc_r); - DECLARE_WRITE8_MEMBER(at_keybc_w); - DECLARE_READ16_MEMBER(neat_chipset_r); - DECLARE_WRITE16_MEMBER(neat_chipset_w); - DECLARE_WRITE_LINE_MEMBER(at_mc146818_irq); - DECLARE_WRITE8_MEMBER(write_rtc); - UINT8 m_at_spkrdata; - UINT8 m_pit_out2; - int m_dma_channel; - bool m_cur_eop; - UINT8 m_dma_offset[2][4]; - UINT8 m_at_pages[0x10]; - UINT16 m_dma_high_byte; - UINT8 m_at_speaker; - UINT16 m_ps1_reg[2]; - DECLARE_READ16_MEMBER(ps1_unk_r); - DECLARE_WRITE16_MEMBER(ps1_unk_w); - DECLARE_READ8_MEMBER(ps1_kbdc_r); - - void at_speaker_set_spkrdata(UINT8 data); - DECLARE_WRITE_LINE_MEMBER(at_shutdown); - - UINT8 m_channel_check; - UINT8 m_nmi_enabled; - DECLARE_READ8_MEMBER(pc_dma_read_byte); - DECLARE_WRITE8_MEMBER(pc_dma_write_byte); - DECLARE_READ8_MEMBER(pc_dma_read_word); - DECLARE_WRITE8_MEMBER(pc_dma_write_word); - - DECLARE_DRIVER_INIT(atcga); - DECLARE_DRIVER_INIT(atvga); - DECLARE_DRIVER_INIT(megapcpla); - DECLARE_DRIVER_INIT(atpci); - DECLARE_MACHINE_START(at); - DECLARE_MACHINE_RESET(at); - void pc_set_dma_channel(int channel, int state); - void init_at_common(int xmsbase); - UINT32 at_286_a20(bool state); -}; - -class megapc_state : public driver_device -{ -public: - megapc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_wd7600(*this, "wd7600"), - m_isabus(*this, "isabus"), - m_speaker(*this, "speaker") - { } - -public: - required_device m_maincpu; - required_device m_wd7600; - required_device m_isabus; - required_device m_speaker; - - DECLARE_DRIVER_INIT(megapc); - DECLARE_DRIVER_INIT(megapcpl); - - DECLARE_READ16_MEMBER( wd7600_ior ); - DECLARE_WRITE16_MEMBER( wd7600_iow ); - DECLARE_WRITE_LINE_MEMBER( wd7600_hold ); - DECLARE_WRITE8_MEMBER( wd7600_tc ) { m_isabus->eop_w(offset, data); } - DECLARE_WRITE_LINE_MEMBER( wd7600_spkr ) { m_speaker->level_w(state); } -}; - - -#endif /* AT_H_ */ diff --git a/src/mess/includes/atarist.h b/src/mess/includes/atarist.h deleted file mode 100644 index 2e153b4a59a..00000000000 --- a/src/mess/includes/atarist.h +++ /dev/null @@ -1,469 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder, Olivier Galibert -#pragma once - -#ifndef __ATARI_ST__ -#define __ATARI_ST__ - -#include "bus/rs232/rs232.h" -#include "cpu/m68000/m68000.h" -#include "cpu/m6800/m6800.h" -#include "machine/6850acia.h" -#include "machine/8530scc.h" -#include "bus/centronics/ctronics.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "machine/mc68901.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "machine/rp5c15.h" -#include "machine/wd_fdc.h" -#include "sound/ay8910.h" -#include "sound/lmc1992.h" - -#define M68000_TAG "m68000" -#define HD6301V1_TAG "hd6301" -#define YM2149_TAG "ym2149" -#define MC6850_0_TAG "mc6850_0" -#define MC6850_1_TAG "mc6850_1" -#define Z8530_TAG "z8530" -#define COP888_TAG "u703" -#define RP5C15_TAG "rp5c15" -#define YM3439_TAG "ym3439" -#define MC68901_TAG "mc68901" -#define LMC1992_TAG "lmc1992" -#define WD1772_TAG "wd1772" -#define SCREEN_TAG "screen" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" - -// Atari ST - -#define Y1 XTAL_2_4576MHz - -// STBook - -#define U517 XTAL_16MHz -#define Y200 XTAL_2_4576MHz -#define Y700 XTAL_10MHz - -#define DMA_STATUS_DRQ 0x04 -#define DMA_STATUS_SECTOR_COUNT 0x02 -#define DMA_STATUS_ERROR 0x01 - -#define DMA_MODE_READ_WRITE 0x100 -#define DMA_MODE_FDC_HDC_ACK 0x080 -#define DMA_MODE_ENABLED 0x040 -#define DMA_MODE_SECTOR_COUNT 0x010 -#define DMA_MODE_FDC_HDC_CS 0x008 -#define DMA_MODE_A1 0x004 -#define DMA_MODE_A0 0x002 -#define DMA_MODE_ADDRESS_MASK 0x006 - -#define DMA_SECTOR_SIZE 512 - -enum -{ - IKBD_MOUSE_PHASE_STATIC = 0, - IKBD_MOUSE_PHASE_POSITIVE, - IKBD_MOUSE_PHASE_NEGATIVE -}; - -class st_state : public driver_device -{ -public: - enum - { - TIMER_MOUSE_TICK, - TIMER_SHIFTER_TICK, - TIMER_GLUE_TICK, - TIMER_BLITTER_TICK - }; - - st_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M68000_TAG), - m_fdc(*this, WD1772_TAG), - m_mfp(*this, MC68901_TAG), - m_acia0(*this, MC6850_0_TAG), - m_acia1(*this, MC6850_1_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_cart(*this, "cartslot"), - m_ram(*this, RAM_TAG), - m_rs232(*this, RS232_TAG), - m_p31(*this, "P31"), - m_p32(*this, "P32"), - m_p33(*this, "P33"), - m_p34(*this, "P34"), - m_p35(*this, "P35"), - m_p36(*this, "P36"), - m_p37(*this, "P37"), - m_p40(*this, "P40"), - m_p41(*this, "P41"), - m_p42(*this, "P42"), - m_p43(*this, "P43"), - m_p44(*this, "P44"), - m_p45(*this, "P45"), - m_p46(*this, "P46"), - m_p47(*this, "P47"), - m_joy0(*this, "IKBD_JOY0"), - m_joy1(*this, "IKBD_JOY1"), - m_mousex(*this, "IKBD_MOUSEX"), - m_mousey(*this, "IKBD_MOUSEY"), - m_config(*this, "config"), - m_acia_ikbd_irq(1), - m_acia_midi_irq(1), - m_ikbd_mouse_x(0), - m_ikbd_mouse_y(0), - m_ikbd_mouse_px(IKBD_MOUSE_PHASE_STATIC), - m_ikbd_mouse_py(IKBD_MOUSE_PHASE_STATIC), - m_ikbd_mouse_pc(0), - m_ikbd_joy(1), - m_monochrome(1), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_fdc; - required_device m_mfp; - required_device m_acia0; - required_device m_acia1; - required_device m_centronics; - required_device m_cart; - required_device m_ram; - required_device m_rs232; - required_ioport m_p31; - required_ioport m_p32; - required_ioport m_p33; - required_ioport m_p34; - required_ioport m_p35; - required_ioport m_p36; - required_ioport m_p37; - required_ioport m_p40; - required_ioport m_p41; - required_ioport m_p42; - required_ioport m_p43; - required_ioport m_p44; - required_ioport m_p45; - required_ioport m_p46; - required_ioport m_p47; - optional_ioport m_joy0; - optional_ioport m_joy1; - optional_ioport m_mousex; - optional_ioport m_mousey; - optional_ioport m_config; - - void machine_start(); - - void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - // video - DECLARE_READ8_MEMBER( shifter_base_r ); - DECLARE_READ8_MEMBER( shifter_counter_r ); - DECLARE_READ8_MEMBER( shifter_sync_r ); - DECLARE_READ16_MEMBER( shifter_palette_r ); - DECLARE_READ8_MEMBER( shifter_mode_r ); - - DECLARE_WRITE8_MEMBER( shifter_base_w ); - DECLARE_WRITE8_MEMBER( shifter_sync_w ); - DECLARE_WRITE16_MEMBER( shifter_palette_w ); - DECLARE_WRITE8_MEMBER( shifter_mode_w ); - - DECLARE_READ16_MEMBER( blitter_halftone_r ); - DECLARE_READ16_MEMBER( blitter_src_inc_x_r ); - DECLARE_READ16_MEMBER( blitter_src_inc_y_r ); - DECLARE_READ16_MEMBER( blitter_src_r ); - DECLARE_READ16_MEMBER( blitter_end_mask_r ); - DECLARE_READ16_MEMBER( blitter_dst_inc_x_r ); - DECLARE_READ16_MEMBER( blitter_dst_inc_y_r ); - DECLARE_READ16_MEMBER( blitter_dst_r ); - DECLARE_READ16_MEMBER( blitter_count_x_r ); - DECLARE_READ16_MEMBER( blitter_count_y_r ); - DECLARE_READ16_MEMBER( blitter_op_r ); - DECLARE_READ16_MEMBER( blitter_ctrl_r ); - - DECLARE_WRITE16_MEMBER( blitter_halftone_w ); - DECLARE_WRITE16_MEMBER( blitter_src_inc_x_w ); - DECLARE_WRITE16_MEMBER( blitter_src_inc_y_w ); - DECLARE_WRITE16_MEMBER( blitter_src_w ); - DECLARE_WRITE16_MEMBER( blitter_end_mask_w ); - DECLARE_WRITE16_MEMBER( blitter_dst_inc_x_w ); - DECLARE_WRITE16_MEMBER( blitter_dst_inc_y_w ); - DECLARE_WRITE16_MEMBER( blitter_dst_w ); - DECLARE_WRITE16_MEMBER( blitter_count_x_w ); - DECLARE_WRITE16_MEMBER( blitter_count_y_w ); - DECLARE_WRITE16_MEMBER( blitter_op_w ); - DECLARE_WRITE16_MEMBER( blitter_ctrl_w ); - - void mouse_tick(); - inline pen_t shift_mode_0(); - inline pen_t shift_mode_1(); - inline pen_t shift_mode_2(); - void shifter_tick(); - inline void shifter_load(); - void glue_tick(); - void set_screen_parameters(); - void blitter_source(); - UINT16 blitter_hop(); - void blitter_op(UINT16 s, UINT32 dstaddr, UINT16 mask); - void blitter_tick(); - - // driver - DECLARE_READ16_MEMBER( fdc_data_r ); - DECLARE_WRITE16_MEMBER( fdc_data_w ); - DECLARE_READ16_MEMBER( dma_status_r ); - DECLARE_WRITE16_MEMBER( dma_mode_w ); - DECLARE_READ8_MEMBER( dma_counter_r ); - DECLARE_WRITE8_MEMBER( dma_base_w ); - DECLARE_READ8_MEMBER( mmu_r ); - DECLARE_WRITE8_MEMBER( mmu_w ); - DECLARE_READ16_MEMBER( berr_r ); - DECLARE_WRITE16_MEMBER( berr_w ); - DECLARE_READ8_MEMBER( ikbd_port1_r ); - DECLARE_READ8_MEMBER( ikbd_port2_r ); - DECLARE_WRITE8_MEMBER( ikbd_port2_w ); - DECLARE_WRITE8_MEMBER( ikbd_port3_w ); - DECLARE_READ8_MEMBER( ikbd_port4_r ); - DECLARE_WRITE8_MEMBER( ikbd_port4_w ); - - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - DECLARE_WRITE8_MEMBER( psg_pa_w ); - - DECLARE_WRITE_LINE_MEMBER( ikbd_tx_w ); - DECLARE_WRITE_LINE_MEMBER( acia_ikbd_irq_w ); - DECLARE_WRITE_LINE_MEMBER( acia_midi_irq_w ); - - DECLARE_READ8_MEMBER( mfp_gpio_r ); - DECLARE_WRITE_LINE_MEMBER( mfp_tdo_w ); - - DECLARE_WRITE_LINE_MEMBER( write_acia_clock ); - - void toggle_dma_fifo(); - void flush_dma_fifo(); - void fill_dma_fifo(); - void fdc_dma_transfer(); - - void configure_memory(); - void state_save(); - - /* memory state */ - UINT8 m_mmu; - - /* keyboard state */ - int m_acia_ikbd_irq; - int m_acia_midi_irq; - UINT16 m_ikbd_keylatch; - UINT8 m_ikbd_mouse; - UINT8 m_ikbd_mouse_x; - UINT8 m_ikbd_mouse_y; - UINT8 m_ikbd_mouse_px; - UINT8 m_ikbd_mouse_py; - UINT8 m_ikbd_mouse_pc; - int m_ikbd_tx; - int m_ikbd_joy; - int m_midi_tx; - - /* floppy state */ - UINT32 m_dma_base; - UINT16 m_dma_error; - UINT16 m_fdc_mode; - UINT8 m_fdc_sectors; - UINT16 m_fdc_fifo[2][8]; - int m_fdc_fifo_sel; - int m_fdc_fifo_index; - int m_fdc_fifo_msb; - int m_fdc_fifo_empty[2]; - int m_fdc_dmabytes; - - /* shifter state */ - UINT32 m_shifter_base; - UINT32 m_shifter_ofs; - UINT8 m_shifter_sync; - UINT8 m_shifter_mode; - UINT16 m_shifter_palette[16]; - UINT16 m_shifter_rr[4]; - UINT16 m_shifter_ir[4]; - int m_shifter_bitplane; - int m_shifter_shift; - int m_shifter_h; - int m_shifter_v; - int m_shifter_de; - int m_shifter_x_start; - int m_shifter_x_end; - int m_shifter_y_start; - int m_shifter_y_end; - int m_shifter_hblank_start; - int m_shifter_vblank_start; - - /* blitter state */ - UINT16 m_blitter_halftone[16]; - INT16 m_blitter_src_inc_x; - INT16 m_blitter_src_inc_y; - INT16 m_blitter_dst_inc_x; - INT16 m_blitter_dst_inc_y; - UINT32 m_blitter_src; - UINT32 m_blitter_dst; - UINT16 m_blitter_endmask1; - UINT16 m_blitter_endmask2; - UINT16 m_blitter_endmask3; - UINT16 m_blitter_xcount; - UINT16 m_blitter_ycount; - UINT16 m_blitter_xcountl; - UINT8 m_blitter_hop; - UINT8 m_blitter_op; - UINT8 m_blitter_ctrl; - UINT8 m_blitter_skew; - UINT32 m_blitter_srcbuf; - - /* timers */ - emu_timer *m_mouse_timer; - emu_timer *m_glue_timer; - emu_timer *m_shifter_timer; - - bitmap_rgb32 m_bitmap; - - floppy_image_device *floppy_devices[2]; - - DECLARE_FLOPPY_FORMATS(floppy_formats); - IRQ_CALLBACK_MEMBER(atarist_int_ack); - - int m_monochrome; - required_device m_palette; - DECLARE_WRITE_LINE_MEMBER( write_monochrome ); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -class megast_state : public st_state -{ -public: - megast_state(const machine_config &mconfig, device_type type, const char *tag) - : st_state(mconfig, type, tag) - { } - - DECLARE_READ16_MEMBER( fpu_r ); - DECLARE_WRITE16_MEMBER( fpu_w ); -}; - -class ste_state : public st_state -{ -public: - enum - { - TIMER_DMASOUND_TICK, - TIMER_MICROWIRE_TICK - }; - - ste_state(const machine_config &mconfig, device_type type, const char *tag) - : st_state(mconfig, type, tag), - m_lmc1992(*this, LMC1992_TAG) - { } - - optional_device m_lmc1992; - - void machine_start(); - - void video_start(); - - DECLARE_READ8_MEMBER( shifter_base_low_r ); - DECLARE_WRITE8_MEMBER( shifter_base_low_w ); - DECLARE_READ8_MEMBER( shifter_counter_r ); - DECLARE_WRITE8_MEMBER( shifter_counter_w ); - DECLARE_WRITE16_MEMBER( shifter_palette_w ); - DECLARE_READ8_MEMBER( shifter_lineofs_r ); - DECLARE_WRITE8_MEMBER( shifter_lineofs_w ); - DECLARE_READ8_MEMBER( shifter_pixelofs_r ); - DECLARE_WRITE8_MEMBER( shifter_pixelofs_w ); - - DECLARE_READ8_MEMBER( sound_dma_control_r ); - DECLARE_READ8_MEMBER( sound_dma_base_r ); - DECLARE_READ8_MEMBER( sound_dma_counter_r ); - DECLARE_READ8_MEMBER( sound_dma_end_r ); - DECLARE_READ8_MEMBER( sound_mode_r ); - DECLARE_WRITE8_MEMBER( sound_dma_control_w ); - DECLARE_WRITE8_MEMBER( sound_dma_base_w ); - DECLARE_WRITE8_MEMBER( sound_dma_end_w ); - DECLARE_WRITE8_MEMBER( sound_mode_w ); - DECLARE_READ16_MEMBER( microwire_data_r ); - DECLARE_WRITE16_MEMBER( microwire_data_w ); - DECLARE_READ16_MEMBER( microwire_mask_r ); - DECLARE_WRITE16_MEMBER( microwire_mask_w ); - - DECLARE_READ8_MEMBER( mfp_gpio_r ); - DECLARE_WRITE_LINE_MEMBER( write_monochrome ); - - void dmasound_set_state(int level); - void dmasound_tick(); - void microwire_shift(); - void microwire_tick(); - void state_save(); - - // shifter state - UINT8 m_shifter_lineofs; - UINT8 m_shifter_pixelofs; - - /* microwire state */ - UINT16 m_mw_data; - UINT16 m_mw_mask; - int m_mw_shift; - - /* DMA sound state */ - UINT32 m_dmasnd_base; - UINT32 m_dmasnd_end; - UINT32 m_dmasnd_cntr; - UINT32 m_dmasnd_baselatch; - UINT32 m_dmasnd_endlatch; - UINT8 m_dmasnd_ctrl; - UINT8 m_dmasnd_mode; - UINT8 m_dmasnd_fifo[8]; - UINT8 m_dmasnd_samples; - int m_dmasnd_active; - - // timers - emu_timer *m_microwire_timer; - emu_timer *m_dmasound_timer; - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -class megaste_state : public ste_state -{ -public: - megaste_state(const machine_config &mconfig, device_type type, const char *tag) - : ste_state(mconfig, type, tag) - { } - - void machine_start(); - - DECLARE_READ16_MEMBER( cache_r ); - DECLARE_WRITE16_MEMBER( cache_w ); - - UINT16 m_cache; -}; - -class stbook_state : public ste_state -{ -public: - stbook_state(const machine_config &mconfig, device_type type, const char *tag) - : ste_state(mconfig, type, tag), - m_sw400(*this, "SW400") - { } - - required_ioport m_sw400; - - void machine_start(); - void video_start(); - - DECLARE_READ16_MEMBER( config_r ); - DECLARE_WRITE16_MEMBER( lcd_control_w ); - - DECLARE_WRITE8_MEMBER( psg_pa_w ); - DECLARE_READ8_MEMBER( mfp_gpio_r ); -}; - -#endif diff --git a/src/mess/includes/atom.h b/src/mess/includes/atom.h deleted file mode 100644 index bd7b2427897..00000000000 --- a/src/mess/includes/atom.h +++ /dev/null @@ -1,169 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -#pragma once - -#ifndef __ATOM__ -#define __ATOM__ - - -#include "emu.h" -#include "cpu/m6502/m6502.h" -#include "imagedev/cassette.h" -#include "imagedev/flopdrv.h" -#include "machine/ram.h" -#include "imagedev/snapquik.h" -#include "formats/atom_tap.h" -#include "formats/atom_dsk.h" -#include "formats/uef_cas.h" -#include "bus/centronics/ctronics.h" -#include "machine/6522via.h" -#include "machine/i8255.h" -#include "machine/i8271.h" -#include "sound/speaker.h" -#include "video/mc6847.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define SY6502_TAG "ic22" -#define INS8255_TAG "ic25" -#define MC6847_TAG "ic31" -#define R6522_TAG "ic1" -#define I8271_TAG "ic13" -#define MC6854_TAG "econet_ic1" -#define SCREEN_TAG "screen" -#define CENTRONICS_TAG "centronics" -#define BASERAM_TAG "baseram" - - -#define X1 XTAL_3_579545MHz // MC6847 Clock -#define X2 XTAL_4MHz // CPU Clock - a divider reduces it to 1MHz - -class atom_state : public driver_device -{ -public: - atom_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, SY6502_TAG), - m_vdg(*this, MC6847_TAG), - m_cassette(*this, "cassette"), - m_fdc(*this, I8271_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_speaker(*this, "speaker"), - m_cart(*this, "cartslot"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_y10(*this, "Y10"), - m_rpt(*this, "RPT"), - m_video_ram(*this, "video_ram") - { } - - required_device m_maincpu; - required_device m_vdg; - required_device m_cassette; - optional_device m_fdc; - required_device m_centronics; - required_device m_speaker; - optional_device m_cart; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - required_ioport m_y10; - required_ioport m_rpt; - - virtual void machine_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void bankswitch(); - - DECLARE_WRITE8_MEMBER( ppi_pa_w ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_READ8_MEMBER( vdg_videoram_r ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_WRITE_LINE_MEMBER( atom_8271_interrupt_callback ); - DECLARE_WRITE_LINE_MEMBER( motor_w ); - - /* video state */ - required_shared_ptr m_video_ram; - - /* keyboard state */ - int m_keylatch; - - /* cassette state */ - int m_hz2400; - int m_pc0; - int m_pc1; - - /* devices */ - int m_previous_i8271_int_state; - DECLARE_FLOPPY_FORMATS(floppy_formats); - TIMER_DEVICE_CALLBACK_MEMBER(cassette_output_tick); - - int load_cart(device_image_interface &image, generic_slot_device *slot); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load) { return load_cart(image, m_cart); } - DECLARE_QUICKLOAD_LOAD_MEMBER(atom_atm); -}; - -class atomeb_state : public atom_state -{ -public: - atomeb_state(const machine_config &mconfig, device_type type, const char *tag) - : atom_state(mconfig, type, tag), - m_e0(*this, "rom_e0"), - m_e1(*this, "rom_e1") - { - } - - virtual void machine_start(); - - DECLARE_READ8_MEMBER(eprom_r); - DECLARE_WRITE8_MEMBER(eprom_w); - DECLARE_READ8_MEMBER(ext_r); - DECLARE_READ8_MEMBER(dos_r); - - DECLARE_DRIVER_INIT(atomeb); - - /* eprom state */ - int m_eprom; - - generic_slot_device *m_ext[16]; - required_device m_e0; - required_device m_e1; - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a0_load) { return load_cart(image, m_ext[0x0]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a1_load) { return load_cart(image, m_ext[0x1]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a2_load) { return load_cart(image, m_ext[0x2]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a3_load) { return load_cart(image, m_ext[0x3]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a4_load) { return load_cart(image, m_ext[0x4]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a5_load) { return load_cart(image, m_ext[0x5]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a6_load) { return load_cart(image, m_ext[0x6]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a7_load) { return load_cart(image, m_ext[0x7]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a8_load) { return load_cart(image, m_ext[0x8]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(a9_load) { return load_cart(image, m_ext[0x9]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(aa_load) { return load_cart(image, m_ext[0xa]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ab_load) { return load_cart(image, m_ext[0xb]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ac_load) { return load_cart(image, m_ext[0xc]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ad_load) { return load_cart(image, m_ext[0xd]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ae_load) { return load_cart(image, m_ext[0xe]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(af_load) { return load_cart(image, m_ext[0xf]); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(e0_load) { return load_cart(image, m_e0); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(e1_load) { return load_cart(image, m_e1); } -}; - -#endif diff --git a/src/mess/includes/aussiebyte.h b/src/mess/includes/aussiebyte.h deleted file mode 100644 index 0f798e1a99f..00000000000 --- a/src/mess/includes/aussiebyte.h +++ /dev/null @@ -1,126 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robbbert - -/*********************************************************** - - Includes - -************************************************************/ -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80ctc.h" -#include "machine/z80pio.h" -#include "machine/z80dart.h" -#include "machine/z80dma.h" -#include "bus/centronics/ctronics.h" -#include "sound/speaker.h" -#include "sound/votrax.h" -#include "video/mc6845.h" -#include "bus/rs232/rs232.h" -#include "machine/wd_fdc.h" -#include "machine/msm5832.h" - - -/*********************************************************** - - Class - -************************************************************/ -class aussiebyte_state : public driver_device -{ -public: - aussiebyte_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_palette(*this, "palette") - , m_maincpu(*this, "maincpu") - , m_ctc(*this, "ctc") - , m_dma(*this, "dma") - , m_pio1(*this, "pio1") - , m_pio2(*this, "pio2") - , m_sio1(*this, "sio1") - , m_sio2(*this, "sio2") - , m_centronics(*this, "centronics") - , m_rs232(*this, "rs232") - , m_fdc(*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") - , m_crtc(*this, "crtc") - , m_speaker(*this, "speaker") - , m_votrax(*this, "votrax") - {} - - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE8_MEMBER(port15_w); - DECLARE_WRITE8_MEMBER(port16_w); - DECLARE_WRITE8_MEMBER(port17_w); - DECLARE_WRITE8_MEMBER(port18_w); - DECLARE_READ8_MEMBER(port19_r); - DECLARE_WRITE8_MEMBER(port1a_w); - DECLARE_WRITE8_MEMBER(port1b_w); - DECLARE_WRITE8_MEMBER(port1c_w); - DECLARE_WRITE8_MEMBER(port20_w); - DECLARE_READ8_MEMBER(port28_r); - DECLARE_READ8_MEMBER(port33_r); - DECLARE_WRITE8_MEMBER(port34_w); - DECLARE_WRITE8_MEMBER(port35_w); - DECLARE_READ8_MEMBER(port36_r); - DECLARE_READ8_MEMBER(port37_r); - DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - DECLARE_WRITE_LINE_MEMBER(busreq_w); - DECLARE_WRITE_LINE_MEMBER(votrax_w); - DECLARE_WRITE_LINE_MEMBER(sio1_rdya_w); - DECLARE_WRITE_LINE_MEMBER(sio1_rdyb_w); - DECLARE_WRITE_LINE_MEMBER(sio2_rdya_w); - DECLARE_WRITE_LINE_MEMBER(sio2_rdyb_w); - DECLARE_MACHINE_RESET(aussiebyte); - DECLARE_DRIVER_INIT(aussiebyte); - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - DECLARE_WRITE_LINE_MEMBER(ctc_z0_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z1_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); - DECLARE_WRITE8_MEMBER(address_w); - DECLARE_WRITE8_MEMBER(register_w); - MC6845_UPDATE_ROW(crtc_update_row); - MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr); - int m_centronics_busy; - required_device m_palette; - -private: - UINT8 crt8002(UINT8 ac_ra, UINT8 ac_chr, UINT8 ac_attr, UINT16 ac_cnt, bool ac_curs); - bool m_port15; // rom switched in (0), out (1) - UINT8 m_port17; - UINT8 m_port17_rdy; - UINT8 m_port19; - UINT8 m_port1a; // bank to switch to when write to port 15 happens - UINT8 m_port28; - UINT8 m_port34; - UINT8 m_port35; // byte to be written to vram or aram - UINT8 m_video_index; - UINT16 m_cnt; - UINT8 *m_p_videoram; - UINT8 *m_p_attribram; - const UINT8 *m_p_chargen; - UINT16 m_alpha_address; - UINT16 m_graph_address; - required_device m_maincpu; - required_device m_ctc; - required_device m_dma; - required_device m_pio1; - required_device m_pio2; - required_device m_sio1; - required_device m_sio2; - required_device m_centronics; - required_device m_rs232; - required_device m_fdc; - required_device m_floppy0; - optional_device m_floppy1; - required_device m_crtc; - required_device m_speaker; - required_device m_votrax; -}; diff --git a/src/mess/includes/avigo.h b/src/mess/includes/avigo.h deleted file mode 100644 index b06dab92c65..00000000000 --- a/src/mess/includes/avigo.h +++ /dev/null @@ -1,116 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker,Sandro Ronco -/***************************************************************************** - * - * includes/avigo.h - * - ****************************************************************************/ - -#ifndef AVIGO_H_ -#define AVIGO_H_ - -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "machine/rp5c01.h" -#include "machine/ins8250.h" -#include "machine/intelfsh.h" -#include "machine/nvram.h" -#include "sound/speaker.h" -#include "machine/ram.h" -#include "imagedev/snapquik.h" - -#define AVIGO_NUM_COLOURS 2 - -#define AVIGO_SCREEN_WIDTH 160 -#define AVIGO_SCREEN_HEIGHT 240 -#define AVIGO_PANEL_HEIGHT 26 - - -class avigo_state : public driver_device -{ -public: - avigo_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_speaker(*this, "speaker"), - m_uart(*this, "ns16550"), - m_serport(*this, "serport"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_ram; - required_device m_speaker; - required_device m_uart; - required_device m_serport; - required_device m_palette; - - // defined in drivers/avigo.c - virtual void machine_start(); - virtual void machine_reset(); - void postload(); - void refresh_memory(UINT8 bank, UINT8 chip_select); - void refresh_ints(); - void nvram_init(nvram_device &nvram, void *base, size_t size); - - DECLARE_WRITE_LINE_MEMBER( tc8521_alarm_int ); - DECLARE_WRITE_LINE_MEMBER( com_interrupt ); - - DECLARE_READ8_MEMBER(flash_0x0000_read_handler); - DECLARE_WRITE8_MEMBER(flash_0x0000_write_handler); - DECLARE_READ8_MEMBER(flash_0x4000_read_handler); - DECLARE_WRITE8_MEMBER(flash_0x4000_write_handler); - DECLARE_READ8_MEMBER(flash_0x8000_read_handler); - DECLARE_WRITE8_MEMBER(flash_0x8000_write_handler); - - DECLARE_READ8_MEMBER(key_data_read_r); - DECLARE_WRITE8_MEMBER(set_key_line_w); - DECLARE_WRITE8_MEMBER(port2_w); - DECLARE_READ8_MEMBER(irq_r); - DECLARE_WRITE8_MEMBER(irq_w); - DECLARE_READ8_MEMBER(bank1_r); - DECLARE_READ8_MEMBER(bank2_r); - DECLARE_WRITE8_MEMBER(bank1_w); - DECLARE_WRITE8_MEMBER(bank2_w); - DECLARE_READ8_MEMBER(ad_control_status_r); - DECLARE_WRITE8_MEMBER(ad_control_status_w); - DECLARE_READ8_MEMBER(ad_data_r); - DECLARE_WRITE8_MEMBER(speaker_w); - DECLARE_READ8_MEMBER(port_04_r); - - DECLARE_INPUT_CHANGED_MEMBER(pen_irq); - DECLARE_INPUT_CHANGED_MEMBER(pen_move_irq); - DECLARE_INPUT_CHANGED_MEMBER(kb_irq); - DECLARE_INPUT_CHANGED_MEMBER(power_down_irq); - - // defined in video/avigo.c - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(vid_memory_r); - DECLARE_WRITE8_MEMBER(vid_memory_w); - - // driver state - UINT8 m_key_line; - UINT8 m_irq; - UINT8 m_port2; - UINT8 m_bank2_l; - UINT8 m_bank2_h; - UINT8 m_bank1_l; - UINT8 m_bank1_h; - UINT8 m_ad_control_status; - intelfsh8_device * m_flashes[3]; - int m_flash_at_0x4000; - int m_flash_at_0x8000; - UINT16 m_ad_value; - UINT8 * m_video_memory; - UINT8 m_screen_column; - UINT8 m_warm_start; - UINT8 * m_ram_base; - DECLARE_PALETTE_INIT(avigo); - TIMER_DEVICE_CALLBACK_MEMBER(avigo_scan_timer); - TIMER_DEVICE_CALLBACK_MEMBER(avigo_1hz_timer); - - DECLARE_QUICKLOAD_LOAD_MEMBER( avigo); -}; -#endif /* AVIGO_H_ */ diff --git a/src/mess/includes/b2m.h b/src/mess/includes/b2m.h deleted file mode 100644 index 86bd3162114..00000000000 --- a/src/mess/includes/b2m.h +++ /dev/null @@ -1,81 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/b2m.h - * - ****************************************************************************/ - -#ifndef B2M_H_ -#define B2M_H_ - -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/wd_fdc.h" -#include "sound/speaker.h" -#include "sound/wave.h" -#include "machine/ram.h" - -class b2m_state : public driver_device -{ -public: - b2m_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_pit(*this, "pit8253"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") { } - - UINT8 m_b2m_8255_porta; - UINT8 m_b2m_video_scroll; - UINT8 m_b2m_8255_portc; - - UINT8 m_b2m_video_page; - UINT8 m_b2m_drive; - UINT8 m_b2m_side; - - UINT8 m_b2m_romdisk_lsb; - UINT8 m_b2m_romdisk_msb; - - UINT8 m_b2m_color[4]; - UINT8 m_b2m_localmachine; - UINT8 m_vblank_state; - required_device m_maincpu; - required_device m_speaker; - required_device m_pit; - required_device m_ram; - required_device m_palette; - - /* devices */ - fd1793_t *m_fdc; - pic8259_device *m_pic; - DECLARE_READ8_MEMBER(b2m_keyboard_r); - DECLARE_WRITE8_MEMBER(b2m_palette_w); - DECLARE_READ8_MEMBER(b2m_palette_r); - DECLARE_WRITE8_MEMBER(b2m_localmachine_w); - DECLARE_READ8_MEMBER(b2m_localmachine_r); - DECLARE_DRIVER_INIT(b2m); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(b2m); - UINT32 screen_update_b2m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(b2m_vblank_interrupt); - DECLARE_WRITE_LINE_MEMBER(bm2_pit_out1); - DECLARE_WRITE8_MEMBER(b2m_8255_porta_w); - DECLARE_WRITE8_MEMBER(b2m_8255_portb_w); - DECLARE_WRITE8_MEMBER(b2m_8255_portc_w); - DECLARE_READ8_MEMBER(b2m_8255_portb_r); - DECLARE_WRITE8_MEMBER(b2m_ext_8255_portc_w); - DECLARE_READ8_MEMBER(b2m_romdisk_porta_r); - DECLARE_WRITE8_MEMBER(b2m_romdisk_portb_w); - DECLARE_WRITE8_MEMBER(b2m_romdisk_portc_w); - DECLARE_WRITE_LINE_MEMBER(b2m_fdc_drq); - DECLARE_FLOPPY_FORMATS( b2m_floppy_formats ); - void b2m_postload(); - void b2m_set_bank(int bank); -}; - -#endif diff --git a/src/mess/includes/banctec.h b/src/mess/includes/banctec.h deleted file mode 100644 index 5a048ee6680..00000000000 --- a/src/mess/includes/banctec.h +++ /dev/null @@ -1,38 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Felipe Sanches -/***************************************************************************** - * - * includes/banctec.h - * - ****************************************************************************/ - -#ifndef BANCTEC_H_ -#define BANCTEC_H_ - -#include "video/mc6845.h" - -class banctec_state : public driver_device -{ -public: - banctec_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_videoram(*this, "videoram") { } - - DECLARE_READ8_MEMBER(banctec_read); - DECLARE_WRITE8_MEMBER(banctec_write); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - required_device m_maincpu; - required_device m_gfxdecode; - required_shared_ptr m_videoram; - - tilemap_t *m_bg_tilemap; -}; - -#endif /* BANCTEC_H_ */ diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h deleted file mode 100644 index 5b8e56d25e5..00000000000 --- a/src/mess/includes/bbc.h +++ /dev/null @@ -1,439 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Gordon Jefferyes, Nigel Barnes -/***************************************************************************** - * - * includes/bbc.h - * - * BBC Model B - * - * Driver by Gordon Jefferyes - * - ****************************************************************************/ - -#ifndef BBC_H_ -#define BBC_H_ - -#include "bus/rs232/rs232.h" -#include "machine/6522via.h" -#include "machine/6850acia.h" -#include "machine/clock.h" -#include "machine/mc6854.h" -#include "machine/ram.h" -#include "machine/i8271.h" -#include "machine/wd_fdc.h" -#include "machine/upd7002.h" -#include "machine/mc146818.h" -#include "video/mc6845.h" -#include "video/saa5050.h" -#include "sound/sn76496.h" -#include "sound/tms5220.h" -#include "imagedev/cassette.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define RS232_TAG "rs232" - -class bbc_state : public driver_device -{ -public: - bbc_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_mc6845(*this, "mc6845"), - m_adlc(*this, "mc6854"), - m_sn(*this, "sn76489"), - m_trom(*this, "saa5050"), - m_tms(*this, "tms5220"), - m_cassette(*this, "cassette"), - m_acia(*this, "acia6850"), - m_acia_clock(*this, "acia_clock"), - m_rs232(*this, RS232_TAG), - m_via6522_0(*this, "via6522_0"), - m_via6522_1(*this, "via6522_1"), - m_upd7002(*this, "upd7002"), - m_rtc(*this, "rtc"), - m_i8271(*this, "i8271"), - m_wd1770(*this, "wd1770"), - m_wd1772(*this, "wd1772"), - m_exp1(*this, "exp_rom1"), - m_exp2(*this, "exp_rom2"), - m_exp3(*this, "exp_rom3"), - m_exp4(*this, "exp_rom4"), - m_joy0(*this, "JOY0"), - m_joy1(*this, "JOY1"), - m_joy2(*this, "JOY2"), - m_joy3(*this, "JOY3"), - m_region_maincpu(*this, "maincpu"), - m_region_os(*this, "os"), - m_region_opt(*this, "option"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_bank7(*this, "bank7"), - m_bank8(*this, "bank8"), - m_ACCCON_IRR(CLEAR_LINE), - m_via_system_irq(CLEAR_LINE), - m_via_user_irq(CLEAR_LINE), - m_acia_irq(CLEAR_LINE), - m_palette(*this, "palette") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats_525sd); - DECLARE_FLOPPY_FORMATS(floppy_formats_525dd); - DECLARE_FLOPPY_FORMATS(floppy_formats_35dd); - - DECLARE_WRITE8_MEMBER(bbc_page_selecta_w); - DECLARE_WRITE8_MEMBER(bbc_memorya1_w); - DECLARE_WRITE8_MEMBER(bbc_page_selectb_w); - DECLARE_WRITE8_MEMBER(bbc_memoryb3_w); - DECLARE_WRITE8_MEMBER(bbc_memoryb4_w); - DECLARE_WRITE8_MEMBER(bbc_page_selectbp_w); - DECLARE_WRITE8_MEMBER(bbc_memorybp1_w); - DECLARE_WRITE8_MEMBER(bbc_memorybp2_w); - DECLARE_WRITE8_MEMBER(bbc_memorybp4_w); - DECLARE_WRITE8_MEMBER(bbc_memorybp4_128_w); - DECLARE_WRITE8_MEMBER(bbc_memorybp6_128_w); - DECLARE_READ8_MEMBER(bbcm_ACCCON_read); - DECLARE_WRITE8_MEMBER(bbcm_ACCCON_write); - DECLARE_WRITE8_MEMBER(page_selectbm_w); - DECLARE_WRITE8_MEMBER(bbc_memorybm1_w); - DECLARE_WRITE8_MEMBER(bbc_memorybm2_w); - DECLARE_WRITE8_MEMBER(bbc_memorybm4_w); - DECLARE_WRITE8_MEMBER(bbc_memorybm5_w); - DECLARE_WRITE8_MEMBER(bbc_memorybm7_w); - DECLARE_READ8_MEMBER(bbcm_r); - DECLARE_WRITE8_MEMBER(bbcm_w); - DECLARE_WRITE8_MEMBER(bbc_SerialULA_w); - - DECLARE_WRITE8_MEMBER(bbc_wd1770_status_w); - DECLARE_READ8_MEMBER(bbcm_wd177xl_read); - DECLARE_WRITE8_MEMBER(bbcm_wd1770l_write); - DECLARE_WRITE8_MEMBER(bbcm_wd1772l_write); - DECLARE_WRITE8_MEMBER(bbc_videoULA_w); - DECLARE_READ8_MEMBER(bbc_fe_r); - DECLARE_DIRECT_UPDATE_MEMBER(bbcbp_direct_handler); - DECLARE_DIRECT_UPDATE_MEMBER(bbcm_direct_handler); - - DECLARE_DRIVER_INIT(bbc); - - DECLARE_MACHINE_START(bbca); - DECLARE_MACHINE_RESET(bbca); - DECLARE_VIDEO_START(bbca); - - DECLARE_MACHINE_START(bbcb); - DECLARE_MACHINE_RESET(bbcb); - DECLARE_VIDEO_START(bbcb); - - DECLARE_MACHINE_START(bbcbp); - DECLARE_MACHINE_RESET(bbcbp); - DECLARE_VIDEO_START(bbcbp); - - DECLARE_MACHINE_START(bbcm); - DECLARE_MACHINE_RESET(bbcm); - DECLARE_VIDEO_START(bbcm); - - DECLARE_PALETTE_INIT(bbc); - UINT32 screen_update_bbc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(bbcb_vsync); - INTERRUPT_GEN_MEMBER(bbcb_keyscan); - INTERRUPT_GEN_MEMBER(bbcm_keyscan); - TIMER_CALLBACK_MEMBER(bbc_tape_timer_cb); - DECLARE_WRITE_LINE_MEMBER(write_acia_clock); - DECLARE_WRITE_LINE_MEMBER(bbcb_acia6850_irq_w); - DECLARE_WRITE_LINE_MEMBER(econet_clk_w); - DECLARE_WRITE8_MEMBER(bbcb_via_system_write_porta); - DECLARE_WRITE8_MEMBER(bbcb_via_system_write_portb); - DECLARE_READ8_MEMBER(bbcb_via_system_read_porta); - DECLARE_READ8_MEMBER(bbcb_via_system_read_portb); - DECLARE_WRITE_LINE_MEMBER(bbcb_via_system_irq_w); - DECLARE_READ8_MEMBER(bbcb_via_user_read_portb); - DECLARE_WRITE8_MEMBER(bbcb_via_user_write_portb); - DECLARE_WRITE_LINE_MEMBER(bbcb_via_user_irq_w); - DECLARE_WRITE_LINE_MEMBER(bbc_wd177x_intrq_w); - DECLARE_WRITE_LINE_MEMBER(bbc_wd177x_drq_w); - DECLARE_WRITE_LINE_MEMBER(bbc_vsync); - void update_acia_rxd(); - void update_acia_dcd(); - void update_acia_cts(); - DECLARE_WRITE_LINE_MEMBER(bbc_rts_w); - DECLARE_WRITE_LINE_MEMBER(bbc_txd_w); - DECLARE_WRITE_LINE_MEMBER(write_rxd_serial); - DECLARE_WRITE_LINE_MEMBER(write_dcd_serial); - DECLARE_WRITE_LINE_MEMBER(write_cts_serial); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_WRITE_LINE_MEMBER(bbc_i8271_interrupt); - DECLARE_WRITE_LINE_MEMBER(motor_w); - - UPD7002_GET_ANALOGUE(BBC_get_analogue_input); - UPD7002_EOC(BBC_uPD7002_EOC); - - void bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size); - void bbcm_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size); - - int bbc_load_cart(device_image_interface &image, generic_slot_device *slot); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp1_load) { return bbc_load_cart(image, m_exp1); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp2_load) { return bbc_load_cart(image, m_exp2); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp3_load) { return bbc_load_cart(image, m_exp3); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp4_load) { return bbc_load_cart(image, m_exp4); } - - int bbcm_load_cart(device_image_interface &image, generic_slot_device *slot); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(bbcm_exp1_load) { return bbcm_load_cart(image, m_exp1); } - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(bbcm_exp2_load) { return bbcm_load_cart(image, m_exp2); } - - MC6845_UPDATE_ROW(crtc_update_row); - -private: - required_device m_maincpu; - required_device m_ram; - required_device m_mc6845; - optional_device m_adlc; - optional_device m_sn; -public: // HACK FOR MC6845 - optional_device m_trom; - optional_device m_tms; - optional_device m_cassette; - optional_device m_acia; - optional_device m_acia_clock; - optional_device m_rs232; - required_device m_via6522_0; - optional_device m_via6522_1; - optional_device m_upd7002; - optional_device m_rtc; - optional_device m_i8271; - optional_device m_wd1770; - optional_device m_wd1772; - required_device m_exp1; - required_device m_exp2; - optional_device m_exp3; - optional_device m_exp4; - optional_ioport m_joy0, m_joy1, m_joy2, m_joy3; - - required_memory_region m_region_maincpu; - required_memory_region m_region_os; - required_memory_region m_region_opt; - required_memory_bank m_bank1; // bbca bbcb bbcbp bbcbp128 bbcm - optional_memory_bank m_bank2; // bbcbp bbcbp128 bbcm - optional_memory_bank m_bank3; // bbca bbcb - required_memory_bank m_bank4; // bbca bbcb bbcbp bbcbp128 bbcm - optional_memory_bank m_bank5; // bbcm - optional_memory_bank m_bank6; // bbcbp bbcbp128 - required_memory_bank m_bank7; // bbca bbcb bbcbp bbcbp128 bbcm - optional_memory_bank m_bank8; // bbcm - - void check_interrupts(); - - int m_SWRAMtype; // this stores the DIP switch setting for the SWRAM type being used - int m_Speech; // this stores the CONF setting for Speech enabled/disabled - - int m_ACCCON_IRR; // IRQ inputs - - int m_rombank; // This is the latch that holds the sideways ROM bank to read - - int m_userport; // This stores the sideways RAM latch type. - // Acorn and others use the bbc_rombank latch to select the write bank to be used.(type 0) - // Solidisc use the BBC's userport to select the write bank to be used (type 1) - - int m_pagedRAM; // BBC B+ memory handling - int m_vdusel; // BBC B+ memory handling - - /* - ACCCON - - b7 IRR 1=Causes an IRQ to the processor - b6 TST 1=Selects &FC00-&FEFF read from OS-ROM - b5 IFJ 1=Internal 1 MHz bus - 0=External 1MHz bus - b4 ITU 1=Internal Tube - 0=External Tube - b3 Y 1=Read/Write HAZEL &C000-&DFFF RAM - 0=Read/Write ROM &C000-&DFFF OS-ROM - b2 X 1=Read/Write LYNNE - 0=Read/WRITE main memory &3000-&8000 - b1 E 1=Causes shadow if VDU code - 0=Main all the time - b0 D 1=Display LYNNE as screen - 0=Display main RAM screen - - ACCCON is a read/write register - */ - - int m_ACCCON; - int m_ACCCON_TST; - int m_ACCCON_IFJ; - int m_ACCCON_ITU; - int m_ACCCON_Y; - int m_ACCCON_X; - int m_ACCCON_E; - int m_ACCCON_D; - - - /* - The addressable latch - This 8 bit addressable latch is operated from port B lines 0-3. - PB0-PB2 are set to the required address of the output bit to be set. - PB3 is set to the value which should be programmed at that bit. - The function of the 8 output bits from this latch are:- - - B0 - Write Enable to the sound generator IC - B1 - READ select on the speech processor - B2 - WRITE select on the speech processor - B3 - Keyboard write enable - B4,B5 - these two outputs define the number to be added to the - start of screen address in hardware to control hardware scrolling:- - Mode Size Start of screen Number to add B5 B4 - 0,1,2 20K &3000 12K 1 1 - 3 16K &4000 16K 0 0 - 4,5 10K &5800 (or &1800) 22K 1 0 - 6 8K &6000 (or &2000) 24K 0 1 - B6 - Operates the CAPS lock LED (Pin 17 keyboard connector) - B7 - Operates the SHIFT lock LED (Pin 16 keyboard connector) - */ - - int m_b0_sound; - int m_b1_speech_read; - int m_b2_speech_write; - int m_b3_keyboard; - int m_b4_video0; - int m_b5_video1; - int m_b6_caps_lock_led; - int m_b7_shift_lock_led; - - int m_MC146818_WR; // FE30 bit 1 replaces b1_speech_read - int m_MC146818_DS; // FE30 bit 2 replaces b2_speech_write - int m_MC146818_AS; // 6522 port b bit 7 - int m_MC146818_CE; // 6522 port b bit 6 - - int m_via_system_porta; - int m_via_system_irq; - int m_via_user_irq; - int m_acia_irq; - - int m_column; // this is a counter in the keyboard circuit - - - /*************************************** - BBC 2C199 Serial Interface Cassette - ****************************************/ - - double m_last_dev_val; - int m_wav_len; - int m_len0; - int m_len1; - int m_len2; - int m_len3; - int m_mc6850_clock; - UINT8 m_serproc_data; - int m_rxd_serial; - int m_dcd_serial; - int m_cts_serial; - int m_dcd_cass; - int m_rxd_cass; - int m_cass_out_enabled; - int m_txd; - UINT32 m_nr_high_tones; - int m_cass_out_samples_to_go; - int m_cass_out_bit; - int m_cass_out_phase; - emu_timer *m_tape_timer; - - - /************************************** - i8271 disc control - ***************************************/ - - int m_previous_i8271_int_state; // 8271 interrupt status - - /************************************** - WD1770 disc control - ***************************************/ - - int m_drive_control; - int m_wd177x_irq_state; - int m_wd177x_drq_state; - int m_previous_wd177x_int_state; - int m_177x_IntEnabled; - - /************************************** - Video Code - ***************************************/ - - int m_memorySize; - - -// this is the real location of the start of the BBC's ram in the emulation -// it can be changed if shadow ram is being used to point at the upper 32K of RAM - -// this is the screen memory location of the next pixels to be drawn - -// this is a more global variable to store the bitmap variable passed in in the bbc_vh_screenrefresh function - -// this is the X and Y screen location in emulation pixels of the next pixels to be drawn - - - unsigned char *m_BBC_Video_RAM; - UINT16 *m_BBC_display; - UINT16 *m_BBC_display_left; - UINT16 *m_BBC_display_right; - bitmap_ind16 *m_BBC_bitmap; - int m_y_screen_pos; - unsigned char m_pixel_bits[256]; - int m_BBC_HSync; - int m_BBC_VSync; - - - int m_Teletext_Latch; - int m_VideoULA_CR; - int m_VideoULA_CR_counter; - int m_videoULA_Reg; - int m_videoULA_master_cursor_size; - int m_videoULA_width_of_cursor; - int m_videoULA_6845_clock_rate; - int m_videoULA_characters_per_line; - int m_videoULA_teletext_normal_select; - int m_videoULA_flash_colour_select; - - - int m_pixels_per_byte; - int m_emulation_pixels_per_real_pixel; - int m_emulation_pixels_per_byte; - - int m_emulation_cursor_size; - int m_cursor_state; - - int m_videoULA_pallet0[16]; - int m_videoULA_pallet1[16]; - int *m_videoULA_pallet_lookup; - - void (*m_draw_function)(running_machine &machine); - - void bbcbp_setvideoshadow(int vdusel); - void common_init(int memorySize); - void set_pixel_lookup(); - void set_cursor(bbc_state *state); - void BBC_Clock_CR(bbc_state *state); - void BBC_draw_teletext(); - void BBC_ula_drawpixel(bbc_state *state, int col, int number_of_pixels); - void BBC_draw_hi_res(); - void BBC_Set_HSync(int offset, int data); - void BBC_Set_VSync(int offset, int data); - void BBC_Set_CRE(int offset, int data); - void bbc_frameclock(); - int vdudriverset(); - int bbcm_vdudriverset(); - int bbc_keyboard(address_space &space, int data); - void bbcb_IC32_initialise(bbc_state *state); - void MC146818_set(address_space &space); - void bbc_TMSint(int status); - void MC6850_Receive_Clock(int new_clock); - void BBC_Cassette_motor(unsigned char status); - void bbc_update_fdq_int(int state); - unsigned int calculate_video_address(int ma,int ra); - required_device m_palette; -}; - -#endif /* BBC_H_ */ diff --git a/src/mess/includes/bebox.h b/src/mess/includes/bebox.h deleted file mode 100644 index d9909a67b44..00000000000 --- a/src/mess/includes/bebox.h +++ /dev/null @@ -1,136 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods, R. Belmont -/***************************************************************************** - * - * includes/bebox.h - * - * BeBox - * - ****************************************************************************/ - -#ifndef BEBOX_H_ -#define BEBOX_H_ - -#include "emu.h" -#include "machine/53c810.h" -#include "machine/am9517a.h" -#include "machine/idectrl.h" -#include "machine/ins8250.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/upd765.h" -#include "machine/intelfsh.h" -#include "bus/lpci/pci.h" - - -class bebox_state : public driver_device -{ -public: - enum - { - TIMER_GET_DEVICES - }; - - bebox_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_ppc1(*this, "ppc1"), - m_ppc2(*this, "ppc2"), - m_lsi53c810(*this, "lsi53c810"), - m_dma8237_1(*this, "dma8237_1"), - m_dma8237_2(*this, "dma8237_2"), - m_pic8259_1(*this, "pic8259_1"), - m_pic8259_2(*this, "pic8259_2"), - m_pit8254(*this, "pit8254"), - m_ram(*this, RAM_TAG), - m_smc37c78(*this, "smc37c78"), - m_flash(*this, "flash"), - m_pcibus(*this, "pcibus") - { - } - - required_device m_ppc1; - required_device m_ppc2; - required_device m_lsi53c810; - required_device m_dma8237_1; - required_device m_dma8237_2; - required_device m_pic8259_1; - required_device m_pic8259_2; - required_device m_pit8254; - required_device m_ram; - required_device m_smc37c78; - required_device m_flash; - required_device m_pcibus; - UINT32 m_cpu_imask[2]; - UINT32 m_interrupts; - UINT32 m_crossproc_interrupts; - int m_dma_channel; - UINT16 m_dma_offset[2][4]; - UINT8 m_at_pages[0x10]; - UINT32 m_scsi53c810_data[0x100 / 4]; - DECLARE_DRIVER_INIT(bebox); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_WRITE_LINE_MEMBER(bebox_pic8259_master_set_int_line); - DECLARE_WRITE_LINE_MEMBER(bebox_pic8259_slave_set_int_line); - DECLARE_READ8_MEMBER(get_slave_ack); - DECLARE_WRITE_LINE_MEMBER(bebox_dma_hrq_changed); - DECLARE_READ8_MEMBER(bebox_dma8237_fdc_dack_r); - DECLARE_WRITE8_MEMBER(bebox_dma8237_fdc_dack_w); - DECLARE_WRITE_LINE_MEMBER(bebox_dma8237_out_eop); - DECLARE_WRITE_LINE_MEMBER(pc_dack0_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack1_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack2_w); - DECLARE_WRITE_LINE_MEMBER(pc_dack3_w); - DECLARE_WRITE_LINE_MEMBER(bebox_timer0_w); - DECLARE_READ64_MEMBER(bebox_cpu0_imask_r); - DECLARE_READ64_MEMBER(bebox_cpu1_imask_r); - DECLARE_READ64_MEMBER(bebox_interrupt_sources_r); - DECLARE_READ64_MEMBER(bebox_crossproc_interrupts_r); - DECLARE_READ64_MEMBER(bebox_interrupt_ack_r); - DECLARE_READ8_MEMBER(bebox_page_r); - DECLARE_READ8_MEMBER(bebox_80000480_r); - DECLARE_READ8_MEMBER(bebox_flash_r); - - DECLARE_WRITE64_MEMBER(bebox_cpu0_imask_w); - DECLARE_WRITE64_MEMBER(bebox_cpu1_imask_w); - DECLARE_WRITE64_MEMBER(bebox_crossproc_interrupts_w); - DECLARE_WRITE64_MEMBER(bebox_processor_resets_w); - DECLARE_WRITE8_MEMBER(bebox_800001F0_w); - DECLARE_WRITE64_MEMBER(bebox_800003F0_w); - DECLARE_WRITE8_MEMBER(bebox_page_w); - DECLARE_WRITE8_MEMBER(bebox_80000480_w); - DECLARE_WRITE8_MEMBER(bebox_flash_w); - DECLARE_READ8_MEMBER(at_dma8237_1_r); - DECLARE_WRITE8_MEMBER(at_dma8237_1_w); - DECLARE_READ8_MEMBER(bebox_dma_read_byte); - DECLARE_WRITE8_MEMBER(bebox_dma_write_byte); - DECLARE_READ64_MEMBER(scsi53c810_r); - DECLARE_WRITE64_MEMBER(scsi53c810_w); - DECLARE_READ64_MEMBER(bb_slave_64be_r); - - DECLARE_WRITE_LINE_MEMBER(bebox_ide_interrupt); - - DECLARE_WRITE_LINE_MEMBER(bebox_keyboard_interrupt); - - DECLARE_WRITE_LINE_MEMBER( fdc_interrupt ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - LSI53C810_FETCH_CB(scsi_fetch); - LSI53C810_IRQ_CB(scsi_irq_callback); - LSI53C810_DMA_CB(scsi_dma_callback); - - void bebox_set_irq_bit(unsigned int interrupt_bit, int val); - void bebox_update_interrupts(); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -/*----------- defined in machine/bebox.c -----------*/ - -UINT32 scsi53c810_pci_read(device_t *busdevice, device_t *device, int function, int offset, UINT32 mem_mask); -void scsi53c810_pci_write(device_t *busdevice, device_t *device, int function, int offset, UINT32 data, UINT32 mem_mask); - -#endif /* BEBOX_H_ */ diff --git a/src/mess/includes/bk.h b/src/mess/includes/bk.h deleted file mode 100644 index c40b6078e56..00000000000 --- a/src/mess/includes/bk.h +++ /dev/null @@ -1,50 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/bk.h - * - ****************************************************************************/ - -#ifndef BK_H_ -#define BK_H_ -#include "imagedev/cassette.h" - -class bk_state : public driver_device -{ -public: - bk_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_bk0010_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette") { } - - UINT16 m_scrool; - required_shared_ptr m_bk0010_video_ram; - UINT16 m_kbd_state; - UINT16 m_key_code; - UINT16 m_key_pressed; - UINT16 m_key_irq_vector; - UINT16 m_drive; - DECLARE_READ16_MEMBER(bk_key_state_r); - DECLARE_READ16_MEMBER(bk_key_code_r); - DECLARE_READ16_MEMBER(bk_vid_scrool_r); - DECLARE_READ16_MEMBER(bk_key_press_r); - DECLARE_WRITE16_MEMBER(bk_key_state_w); - DECLARE_WRITE16_MEMBER(bk_vid_scrool_w); - DECLARE_WRITE16_MEMBER(bk_key_press_w); - DECLARE_READ16_MEMBER(bk_floppy_cmd_r); - DECLARE_WRITE16_MEMBER(bk_floppy_cmd_w); - DECLARE_READ16_MEMBER(bk_floppy_data_r); - DECLARE_WRITE16_MEMBER(bk_floppy_data_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_bk0010(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(keyboard_callback); - IRQ_CALLBACK_MEMBER(bk0010_irq_callback); - required_device m_maincpu; - required_device m_cassette; -}; - -#endif /* BK_H_ */ diff --git a/src/mess/includes/bullet.h b/src/mess/includes/bullet.h deleted file mode 100644 index 390aac07ad8..00000000000 --- a/src/mess/includes/bullet.h +++ /dev/null @@ -1,184 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __BULLET__ -#define __BULLET__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "bus/centronics/ctronics.h" -#include "machine/ram.h" -#include "bus/scsi/scsi.h" -#include "machine/wd_fdc.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "machine/z80dma.h" -#include "machine/z80pio.h" - -#define Z80_TAG "u20" -#define Z80CTC_TAG "u1" -#define Z80DMA_TAG "u50" -#define Z80DART_TAG "u45" -#define Z80PIO_TAG "z80pio" -#define MB8877_TAG "u55" -#define CENTRONICS_TAG "centronics" -#define SCSIBUS_TAG "scsi" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -class bullet_state : public driver_device -{ -public: - bullet_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_dart(*this, Z80DART_TAG), - m_dmac(*this, Z80DMA_TAG), - m_fdc(*this, MB8877_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, MB8877_TAG":0"), - m_floppy1(*this, MB8877_TAG":1"), - m_floppy2(*this, MB8877_TAG":2"), - m_floppy3(*this, MB8877_TAG":3"), - m_floppy4(*this, MB8877_TAG":4"), - m_floppy5(*this, MB8877_TAG":5"), - m_floppy6(*this, MB8877_TAG":6"), - m_floppy7(*this, MB8877_TAG":7"), - m_floppy(NULL), - m_centronics(*this, CENTRONICS_TAG), - m_rom(*this, Z80_TAG), - m_sw1(*this, "SW1"), - m_fdrdy(0), - m_exdsk_sw(false), - m_hdcon_sw(false) - { - } - - required_device m_maincpu; - required_device m_ctc; - required_device m_dart; - required_device m_dmac; - required_device m_fdc; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_floppy4; - required_device m_floppy5; - required_device m_floppy6; - required_device m_floppy7; - floppy_image_device *m_floppy; - required_device m_centronics; - required_memory_region m_rom; - required_ioport m_sw1; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( mreq_r ); - DECLARE_WRITE8_MEMBER( mreq_w ); - DECLARE_READ8_MEMBER( info_r ); - DECLARE_READ8_MEMBER( brom_r ); - DECLARE_WRITE8_MEMBER( brom_w ); - DECLARE_READ8_MEMBER( win_r ); - DECLARE_WRITE8_MEMBER( wstrobe_w ); - DECLARE_WRITE8_MEMBER( exdsk_w ); - DECLARE_WRITE8_MEMBER( exdma_w ); - DECLARE_WRITE8_MEMBER( hdcon_w ); - DECLARE_WRITE8_MEMBER( segst_w ); - DECLARE_WRITE8_MEMBER( dart_w ); - DECLARE_READ8_MEMBER( dma_mreq_r ); - DECLARE_WRITE8_MEMBER( dma_mreq_w ); - DECLARE_READ8_MEMBER( pio_pb_r ); - DECLARE_WRITE_LINE_MEMBER( dartardy_w ); - DECLARE_WRITE_LINE_MEMBER( dartbrdy_w ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_perror ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_fault ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - void bankswitch(); - void update_dma_rdy(); - - // memory state - int m_segst; - int m_brom; - - // DMA state - UINT8 m_exdma; - int m_buf; - bool m_fdrdy; - int m_dartardy; - int m_dartbrdy; - int m_winrdy; - int m_exrdy1; - int m_exrdy2; - bool m_exdsk_sw; - bool m_hdcon_sw; - - int m_centronics_busy; - int m_centronics_perror; - int m_centronics_select; - int m_centronics_fault; - - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - DECLARE_WRITE_LINE_MEMBER(dart_rxtxca_w); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); -}; - -class bulletf_state : public bullet_state -{ -public: - bulletf_state(const machine_config &mconfig, device_type type, const char *tag) : - bullet_state(mconfig, type, tag), - m_floppy8(*this, MB8877_TAG":8"), - m_floppy9(*this, MB8877_TAG":9"), - m_scsibus(*this, SCSIBUS_TAG), - m_scsi_data_in(*this, "scsi_data_in"), - m_scsi_data_out(*this, "scsi_data_out"), - m_scsi_ctrl_in(*this, "scsi_ctrl_in") - { - } - - required_device m_floppy8; - required_device m_floppy9; - required_device m_scsibus; - required_device m_scsi_data_in; - required_device m_scsi_data_out; - required_device m_scsi_ctrl_in; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( mreq_r ); - DECLARE_WRITE8_MEMBER( mreq_w ); - DECLARE_WRITE8_MEMBER( xdma0_w ); - DECLARE_WRITE8_MEMBER( xfdc_w ); - DECLARE_WRITE8_MEMBER( mbank_w ); - DECLARE_READ8_MEMBER( hwsts_r ); - DECLARE_READ8_MEMBER( scsi_r ); - DECLARE_WRITE8_MEMBER( scsi_w ); - - DECLARE_READ8_MEMBER( dma_mreq_r ); - DECLARE_WRITE8_MEMBER( dma_mreq_w ); - DECLARE_WRITE8_MEMBER( pio_pa_w ); - DECLARE_WRITE_LINE_MEMBER( cstrb_w ); - DECLARE_WRITE_LINE_MEMBER( req_w ); - - void fdc_intrq_w(bool state); - - void update_dma_rdy(); - - int m_rome; - UINT8 m_xdma0; - UINT8 m_mbank; - int m_wack; - int m_wrdy; -}; - -#endif diff --git a/src/mess/includes/busicom.h b/src/mess/includes/busicom.h deleted file mode 100644 index 5a589036db9..00000000000 --- a/src/mess/includes/busicom.h +++ /dev/null @@ -1,45 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/busicom.h - * - ****************************************************************************/ - -#ifndef BUSICOM_H_ -#define BUSICOM_H_ - -#include "cpu/i4004/i4004.h" - -class busicom_state : public driver_device -{ -public: - busicom_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_palette(*this, "palette") { } - - UINT8 m_drum_index; - UINT16 m_keyboard_shifter; - UINT32 m_printer_shifter; - UINT8 m_timer; - UINT8 m_printer_line[11][17]; - UINT8 m_printer_line_color[11]; - DECLARE_READ8_MEMBER(keyboard_r); - DECLARE_READ8_MEMBER(printer_r); - DECLARE_WRITE8_MEMBER(shifter_w); - DECLARE_WRITE8_MEMBER(printer_w); - DECLARE_WRITE8_MEMBER(status_w); - DECLARE_WRITE8_MEMBER(printer_ctrl_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(busicom); - UINT32 screen_update_busicom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(timer_callback); - required_device m_maincpu; - required_device m_palette; - UINT8 get_bit_selected(UINT32 val,int num); -}; - -#endif /* BUSICOM_H_ */ diff --git a/src/mess/includes/bw12.h b/src/mess/includes/bw12.h deleted file mode 100644 index 474d4b2ad70..00000000000 --- a/src/mess/includes/bw12.h +++ /dev/null @@ -1,127 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __BW12__ -#define __BW12__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/ram.h" -#include "formats/bw12_dsk.h" -#include "machine/6821pia.h" -#include "bus/centronics/ctronics.h" -#include "machine/kb3600.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "machine/upd765.h" -#include "machine/z80dart.h" -#include "video/mc6845.h" -#include "sound/dac.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "ic35" -#define MC6845_TAG "ic14" -#define UPD765_TAG "ic45" -#define Z80SIO_TAG "ic15" -#define PIT8253_TAG "ic34" -#define PIA6821_TAG "ic16" -#define MC1408_TAG "ic4" -#define AY3600PRO002_TAG "ic74" -#define CENTRONICS_TAG "centronics" -#define FLOPPY_TIMER_TAG "motor_off" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -#define BW12_VIDEORAM_MASK 0x7ff -#define BW12_CHARROM_MASK 0xfff - -class bw12_state : public driver_device -{ -public: - bw12_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_pia(*this, PIA6821_TAG), - m_sio(*this, Z80SIO_TAG), - m_fdc(*this, UPD765_TAG), - m_kbc(*this, AY3600PRO002_TAG), - m_crtc(*this, MC6845_TAG), - m_pit(*this, PIT8253_TAG), - m_palette(*this, "palette"), - m_centronics(*this, CENTRONICS_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG ":1:525dd"), - m_floppy1(*this, UPD765_TAG ":2:525dd"), - m_floppy_timer(*this, FLOPPY_TIMER_TAG), - m_rom(*this, Z80_TAG), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_modifiers(*this, "MODIFIERS") - { } - - required_device m_maincpu; - required_device m_pia; - required_device m_sio; - required_device m_fdc; - required_device m_kbc; - required_device m_crtc; - required_device m_pit; - required_device m_palette; - required_device m_centronics; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy_timer; - required_memory_region m_rom; - required_memory_region m_char_rom; - required_shared_ptr m_video_ram; - required_ioport m_modifiers; - - virtual void machine_start(); - virtual void machine_reset(); - - void bankswitch(); - void floppy_motor_off(); - void set_floppy_motor_off_timer(); - void ls259_w(int address, int data); - - DECLARE_READ8_MEMBER( ls259_r ); - DECLARE_WRITE8_MEMBER( ls259_w ); - DECLARE_READ8_MEMBER( pia_pa_r ); - DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); - DECLARE_WRITE_LINE_MEMBER( pit_out2_w ); - DECLARE_READ_LINE_MEMBER( ay3600_shift_r ); - DECLARE_READ_LINE_MEMBER( ay3600_control_r ); - DECLARE_WRITE_LINE_MEMBER( ay3600_data_ready_w ); - MC6845_UPDATE_ROW( crtc_update_row ); - - /* memory state */ - int m_bank; - - /* PIT state */ - int m_pit_out2; - - /* keyboard state */ - int m_key_data[9]; - int m_key_sin; - int m_key_stb; - int m_key_shift; - - /* floppy state */ - int m_motor_on; - int m_motor0; - int m_motor1; - TIMER_DEVICE_CALLBACK_MEMBER(floppy_motor_off_tick); - DECLARE_WRITE_LINE_MEMBER(pit_out0_w); - DECLARE_FLOPPY_FORMATS( bw12_floppy_formats ); - DECLARE_FLOPPY_FORMATS( bw14_floppy_formats ); - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - int m_centronics_busy; - int m_centronics_fault; - int m_centronics_perror; -}; - -#endif diff --git a/src/mess/includes/bw2.h b/src/mess/includes/bw2.h deleted file mode 100644 index 563ce4b4acd..00000000000 --- a/src/mess/includes/bw2.h +++ /dev/null @@ -1,118 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __BW2__ -#define __BW2__ - -#include "emu.h" -#include "bus/bw2/exp.h" -#include "cpu/z80/z80.h" -#include "formats/bw2_dsk.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8251.h" -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "video/msm6255.h" -#include "rendlay.h" - -#define Z80_TAG "ic1" -#define I8255A_TAG "ic4" -#define WD2797_TAG "ic5" -#define I8253_TAG "ic6" -#define I8251_TAG "ic7" -#define MSM6255_TAG "ic49" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" -#define SCREEN_TAG "screen" - -class bw2_state : public driver_device -{ -public: - bw2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_uart(*this, I8251_TAG), - m_fdc(*this, WD2797_TAG), - m_lcdc(*this, MSM6255_TAG), - m_pit(*this, I8253_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_exp(*this, BW2_EXPANSION_SLOT_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, WD2797_TAG":0"), - m_floppy1(*this, WD2797_TAG":1"), - m_floppy(NULL), - m_rom(*this, Z80_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_video_ram(*this, "videoram") - { } - - required_device m_maincpu; - required_device m_uart; - required_device m_fdc; - required_device m_lcdc; - required_device m_pit; - required_device m_centronics; - required_device m_exp; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - floppy_image_device *m_floppy; - required_memory_region m_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE8_MEMBER( ppi_pa_w ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - - DECLARE_WRITE_LINE_MEMBER( pit_out0_w ); - DECLARE_WRITE_LINE_MEMBER( mtron_w ); - - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - // keyboard state - UINT8 m_kb; - - // memory state - UINT8 m_bank; - - // floppy state - int m_mtron; - int m_mfdbk; - - // video state - optional_shared_ptr m_video_ram; - DECLARE_PALETTE_INIT(bw2); - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - int m_centronics_busy; -}; - -#endif diff --git a/src/mess/includes/c128.h b/src/mess/includes/c128.h deleted file mode 100644 index c32b2afd726..00000000000 --- a/src/mess/includes/c128.h +++ /dev/null @@ -1,253 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __C128__ -#define __C128__ - -#include "emu.h" -#include "bus/cbmiec/cbmiec.h" -#include "bus/c64/exp.h" -#include "bus/vic20/user.h" -#include "bus/pet/cass.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "imagedev/snapquik.h" -#include "cpu/m6502/m8502.h" -#include "machine/mos6526.h" -#include "machine/mos8722.h" -#include "machine/pla.h" -#include "machine/ram.h" -#include "sound/mos6581.h" -#include "video/mc6845.h" -#include "video/mos6566.h" - -#define Z80A_TAG "u10" -#define M8502_TAG "u6" -#define MOS8563_TAG "u22" -#define MOS8564_TAG "u21" -#define MOS8566_TAG "u21" -#define MOS6581_TAG "u5" -#define MOS6526_1_TAG "u1" -#define MOS6526_2_TAG "u4" -#define MOS8721_TAG "u11" -#define MOS8722_TAG "u7" -#define SCREEN_VIC_TAG "screen" -#define SCREEN_VDC_TAG "screen80" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" -#define PET_USER_PORT_TAG "user" - -class c128_state : public driver_device -{ -public: - c128_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80A_TAG), - m_subcpu(*this, M8502_TAG), - m_mmu(*this, MOS8722_TAG), - m_pla(*this, MOS8721_TAG), - m_vdc(*this, MOS8563_TAG), - m_vic(*this, MOS8564_TAG), - m_sid(*this, MOS6581_TAG), - m_cia1(*this, MOS6526_1_TAG), - m_cia2(*this, MOS6526_2_TAG), - m_iec(*this, CBM_IEC_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_exp(*this, C64_EXPANSION_SLOT_TAG), - m_user(*this, PET_USER_PORT_TAG), - m_ram(*this, RAM_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_from(*this, "from"), - m_rom(*this, M8502_TAG), - m_charom(*this, "charom"), - m_color_ram(*this, "color_ram"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_k0(*this, "K0"), - m_k1(*this, "K1"), - m_k2(*this, "K2"), - m_lock(*this, "LOCK"), - m_caps(*this, "CAPS"), - m_40_80(*this, "40_80"), - m_z80en(0), - m_loram(1), - m_hiram(1), - m_charen(1), - m_game(1), - m_exrom(1), - m_va14(1), - m_va15(1), - m_clrbank(0), - m_cnt1(1), - m_sp1(1), - m_iec_data_out(1), - m_restore(1), - m_cia1_irq(CLEAR_LINE), - m_cia2_irq(CLEAR_LINE), - m_vic_irq(CLEAR_LINE), - m_exp_irq(CLEAR_LINE), - m_exp_nmi(CLEAR_LINE), - m_cass_rd(1), - m_iec_srq(1), - m_vic_k(0x07), - m_caps_lock(1) - { } - - required_device m_maincpu; - required_device m_subcpu; - required_device m_mmu; - required_device m_pla; - required_device m_vdc; - required_device m_vic; - required_device m_sid; - required_device m_cia1; - required_device m_cia2; - required_device m_iec; - required_device m_joy1; - required_device m_joy2; - required_device m_exp; - required_device m_user; - required_device m_ram; - required_device m_cassette; - required_device m_from; - required_memory_region m_rom; - required_memory_region m_charom; - optional_shared_ptr m_color_ram; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_ioport m_k0; - required_ioport m_k1; - required_ioport m_k2; - required_ioport m_lock; - required_ioport m_caps; - required_ioport m_40_80; - - virtual void machine_start(); - virtual void machine_reset(); - - inline void check_interrupts(); - int read_pla(offs_t offset, offs_t ca, offs_t vma, int ba, int rw, int aec, int z80io, int ms3, int ms2, int ms1, int ms0); - UINT8 read_memory(address_space &space, offs_t offset, offs_t vma, int ba, int aec, int z80io); - void write_memory(address_space &space, offs_t offset, offs_t vma, UINT8 data, int ba, int aec, int z80io); - inline void update_iec(); - - DECLARE_READ8_MEMBER( z80_r ); - DECLARE_WRITE8_MEMBER( z80_w ); - DECLARE_READ8_MEMBER( z80_io_r ); - DECLARE_WRITE8_MEMBER( z80_io_w ); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( vic_videoram_r ); - DECLARE_READ8_MEMBER( vic_colorram_r ); - - DECLARE_WRITE_LINE_MEMBER( mmu_z80en_w ); - DECLARE_WRITE_LINE_MEMBER( mmu_fsdir_w ); - DECLARE_READ_LINE_MEMBER( mmu_game_r ); - DECLARE_READ_LINE_MEMBER( mmu_exrom_r ); - DECLARE_READ_LINE_MEMBER( mmu_sense40_r ); - - DECLARE_WRITE_LINE_MEMBER( vic_irq_w ); - DECLARE_WRITE8_MEMBER( vic_k_w ); - - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); - - DECLARE_WRITE_LINE_MEMBER( cia1_irq_w ); - DECLARE_WRITE_LINE_MEMBER( cia1_cnt_w ); - DECLARE_WRITE_LINE_MEMBER( cia1_sp_w ); - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_WRITE8_MEMBER( cia1_pa_w ); - DECLARE_READ8_MEMBER( cia1_pb_r ); - DECLARE_WRITE8_MEMBER( cia1_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( cia2_irq_w ); - DECLARE_READ8_MEMBER( cia2_pa_r ); - DECLARE_WRITE8_MEMBER( cia2_pa_w ); - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); - - DECLARE_WRITE_LINE_MEMBER( iec_srq_w ); - DECLARE_WRITE_LINE_MEMBER( iec_data_w ); - - DECLARE_READ8_MEMBER( exp_dma_cd_r ); - DECLARE_WRITE8_MEMBER( exp_dma_cd_w ); - DECLARE_WRITE_LINE_MEMBER( exp_irq_w ); - DECLARE_WRITE_LINE_MEMBER( exp_nmi_w ); - DECLARE_WRITE_LINE_MEMBER( exp_dma_w ); - DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); - - DECLARE_WRITE_LINE_MEMBER( write_restore ); - DECLARE_INPUT_CHANGED_MEMBER( caps_lock ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c64 ); - - DECLARE_READ8_MEMBER( cia2_pb_r ); - DECLARE_WRITE8_MEMBER( cia2_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( write_user_pa2 ) { m_user_pa2 = state; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb0 ) { if (state) m_user_pb |= 1; else m_user_pb &= ~1; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb1 ) { if (state) m_user_pb |= 2; else m_user_pb &= ~2; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb2 ) { if (state) m_user_pb |= 4; else m_user_pb &= ~4; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb3 ) { if (state) m_user_pb |= 8; else m_user_pb &= ~8; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb4 ) { if (state) m_user_pb |= 16; else m_user_pb &= ~16; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb5 ) { if (state) m_user_pb |= 32; else m_user_pb &= ~32; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb6 ) { if (state) m_user_pb |= 64; else m_user_pb &= ~64; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb7 ) { if (state) m_user_pb |= 128; else m_user_pb &= ~128; } - - // memory state - int m_z80en; - int m_loram; - int m_hiram; - int m_charen; - int m_game; - int m_exrom; - int m_reset; - - // video state - int m_va14; - int m_va15; - int m_clrbank; - - // fast serial state - int m_cnt1; - int m_sp1; - int m_iec_data_out; - - // interrupt state - int m_restore; - int m_cia1_irq; - int m_cia2_irq; - int m_vic_irq; - int m_exp_irq; - int m_exp_nmi; - int m_exp_dma; - int m_cass_rd; - int m_iec_srq; - - // keyboard state - UINT8 m_vic_k; - int m_caps_lock; - - int m_user_pa2; - int m_user_pb; -}; - - - -#endif diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h deleted file mode 100644 index 787fe5a6f60..00000000000 --- a/src/mess/includes/c64.h +++ /dev/null @@ -1,216 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __C64__ -#define __C64__ - -#include "emu.h" -#include "bus/cbmiec/cbmiec.h" -#include "bus/c64/exp.h" -#include "bus/vic20/user.h" -#include "bus/pet/cass.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "cpu/m6502/m6510.h" -#include "imagedev/snapquik.h" -#include "machine/mos6526.h" -#include "machine/pla.h" -#include "machine/ram.h" -#include "sound/mos6581.h" -#include "video/mos6566.h" - -#define M6510_TAG "u7" -#define MOS6567_TAG "u19" -#define MOS6569_TAG "u19" -#define MOS6581_TAG "u18" -#define MOS6526_1_TAG "u1" -#define MOS6526_2_TAG "u2" -#define PLA_TAG "u17" -#define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" -#define PET_USER_PORT_TAG "user" - -class c64_state : public driver_device -{ -public: - c64_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, M6510_TAG), - m_pla(*this, PLA_TAG), - m_vic(*this, MOS6569_TAG), - m_sid(*this, MOS6581_TAG), - m_cia1(*this, MOS6526_1_TAG), - m_cia2(*this, MOS6526_2_TAG), - m_iec(*this, CBM_IEC_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_exp(*this, C64_EXPANSION_SLOT_TAG), - m_user(*this, PET_USER_PORT_TAG), - m_ram(*this, RAM_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_color_ram(*this, "color_ram"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_lock(*this, "LOCK"), - m_loram(1), - m_hiram(1), - m_charen(1), - m_va14(1), - m_va15(1), - m_restore(1), - m_cia1_irq(CLEAR_LINE), - m_cia2_irq(CLEAR_LINE), - m_vic_irq(CLEAR_LINE), - m_exp_irq(CLEAR_LINE), - m_exp_nmi(CLEAR_LINE) - { } - - // ROM - UINT8 *m_basic; - UINT8 *m_kernal; - UINT8 *m_charom; - - required_device m_maincpu; - required_device m_pla; - required_device m_vic; - required_device m_sid; - required_device m_cia1; - required_device m_cia2; - optional_device m_iec; - required_device m_joy1; - required_device m_joy2; - required_device m_exp; - required_device m_user; - required_device m_ram; - optional_device m_cassette; - optional_shared_ptr m_color_ram; - optional_ioport m_row0; - optional_ioport m_row1; - optional_ioport m_row2; - optional_ioport m_row3; - optional_ioport m_row4; - optional_ioport m_row5; - optional_ioport m_row6; - optional_ioport m_row7; - optional_ioport m_lock; - - virtual void machine_start(); - virtual void machine_reset(); - - void check_interrupts(); - int read_pla(offs_t offset, offs_t va, int rw, int aec, int ba); - UINT8 read_memory(address_space &space, offs_t offset, offs_t va, int aec, int ba); - void write_memory(address_space &space, offs_t offset, UINT8 data, int aec, int ba); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_READ8_MEMBER( vic_videoram_r ); - DECLARE_READ8_MEMBER( vic_colorram_r ); - DECLARE_WRITE_LINE_MEMBER( vic_irq_w ); - - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); - - DECLARE_WRITE_LINE_MEMBER( cia1_irq_w ); - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_WRITE8_MEMBER( cia1_pa_w ); - DECLARE_READ8_MEMBER( cia1_pb_r ); - DECLARE_WRITE8_MEMBER( cia1_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( cia2_irq_w ); - DECLARE_READ8_MEMBER( cia2_pa_r ); - DECLARE_WRITE8_MEMBER( cia2_pa_w ); - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); - - DECLARE_WRITE_LINE_MEMBER( write_restore ); - DECLARE_WRITE_LINE_MEMBER( exp_irq_w ); - DECLARE_WRITE_LINE_MEMBER( exp_nmi_w ); - DECLARE_WRITE_LINE_MEMBER( exp_dma_w ); - DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c64 ); - - DECLARE_READ8_MEMBER( cia2_pb_r ); - DECLARE_WRITE8_MEMBER( cia2_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( write_user_pa2 ) { m_user_pa2 = state; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb0 ) { if (state) m_user_pb |= 1; else m_user_pb &= ~1; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb1 ) { if (state) m_user_pb |= 2; else m_user_pb &= ~2; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb2 ) { if (state) m_user_pb |= 4; else m_user_pb &= ~4; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb3 ) { if (state) m_user_pb |= 8; else m_user_pb &= ~8; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb4 ) { if (state) m_user_pb |= 16; else m_user_pb &= ~16; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb5 ) { if (state) m_user_pb |= 32; else m_user_pb &= ~32; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb6 ) { if (state) m_user_pb |= 64; else m_user_pb &= ~64; } - DECLARE_WRITE_LINE_MEMBER( write_user_pb7 ) { if (state) m_user_pb |= 128; else m_user_pb &= ~128; } - - // memory state - int m_loram; - int m_hiram; - int m_charen; - - // video state - int m_va14; - int m_va15; - - // interrupt state - int m_restore; - int m_cia1_irq; - int m_cia2_irq; - int m_vic_irq; - int m_exp_irq; - int m_exp_nmi; - int m_exp_dma; - - int m_user_pa2; - int m_user_pb; -}; - - -class sx64_state : public c64_state -{ -public: - sx64_state(const machine_config &mconfig, device_type type, const char *tag) - : c64_state(mconfig, type, tag) - { } - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); -}; - - -class c64c_state : public c64_state -{ -public: - c64c_state(const machine_config &mconfig, device_type type, const char *tag) - : c64_state(mconfig, type, tag) - { } -}; - - -class c64gs_state : public c64c_state -{ -public: - c64gs_state(const machine_config &mconfig, device_type type, const char *tag) - : c64c_state(mconfig, type, tag) - { } - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); - - DECLARE_READ8_MEMBER( cia1_pa_r ); - DECLARE_READ8_MEMBER( cia1_pb_r ); -}; - - - -#endif diff --git a/src/mess/includes/c65.h b/src/mess/includes/c65.h deleted file mode 100644 index e8771e83fc1..00000000000 --- a/src/mess/includes/c65.h +++ /dev/null @@ -1,2 +0,0 @@ -// license:LGPL-2.1+ -// copyright-holders: Angelo Salese diff --git a/src/mess/includes/c80.h b/src/mess/includes/c80.h deleted file mode 100644 index d2b461fb0a3..00000000000 --- a/src/mess/includes/c80.h +++ /dev/null @@ -1,57 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __C80__ -#define __C80__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80pio.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "d2" -#define Z80PIO1_TAG "d11" -#define Z80PIO2_TAG "d12" - -class c80_state : public driver_device -{ -public: - c80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_pio1(*this, Z80PIO1_TAG), - m_cassette(*this, "cassette"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2") - { } - - required_device m_maincpu; - required_device m_pio1; - required_device m_cassette; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( pio1_pa_r ); - DECLARE_WRITE8_MEMBER( pio1_pa_w ); - DECLARE_WRITE8_MEMBER( pio1_pb_w ); - DECLARE_WRITE_LINE_MEMBER( pio1_brdy_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - - /* keyboard state */ - int m_keylatch; - - /* display state */ - int m_digit; - int m_pio1_a5; - int m_pio1_brdy; -}; - -#endif diff --git a/src/mess/includes/cbm2.h b/src/mess/includes/cbm2.h deleted file mode 100644 index 41ba6707dc8..00000000000 --- a/src/mess/includes/cbm2.h +++ /dev/null @@ -1,329 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __P500__ -#define __P500__ - -#include "emu.h" -#include "bus/cbm2/exp.h" -#include "bus/cbm2/user.h" -#include "bus/ieee488/ieee488.h" -#include "bus/pet/cass.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "cpu/m6502/m6509.h" -#include "cpu/i86/i86.h" -#include "machine/cbm_snqk.h" -#include "machine/6525tpi.h" -#include "machine/ds75160a.h" -#include "machine/ds75161a.h" -#include "machine/mos6526.h" -#include "machine/mos6551.h" -#include "machine/pic8259.h" -#include "machine/pla.h" -#include "machine/ram.h" -#include "sound/dac.h" -#include "sound/mos6581.h" -#include "video/mc6845.h" -#include "video/mos6566.h" - -#define M6509_TAG "u13" -#define PLA1_TAG "u78" -#define PLA2_TAG "u88" -#define MOS6567_TAG "u23" -#define MOS6569_TAG "u23" -#define MC68B45_TAG "u10" -#define MOS6581_TAG "u4" -#define MOS6525_1_TAG "u20" -#define MOS6525_2_TAG "u102" -#define MOS6551A_TAG "u19" -#define MOS6526_TAG "u2" -#define DS75160A_TAG "u3" -#define DS75161A_TAG "u7" -#define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" -#define RS232_TAG "rs232" - -#define EXT_I8088_TAG "ext_u1" -#define EXT_I8087_TAG "ext_u4" -#define EXT_I8259A_TAG "ext_u3" -#define EXT_MOS6526_TAG "ext_u15" -#define EXT_MOS6525_TAG "ext_u16" - -class cbm2_state : public driver_device -{ -public: - cbm2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M6509_TAG), - m_pla1(*this, PLA1_TAG), - m_crtc(*this, MC68B45_TAG), - m_palette(*this, "palette"), - m_sid(*this, MOS6581_TAG), - m_tpi1(*this, MOS6525_1_TAG), - m_tpi2(*this, MOS6525_2_TAG), - m_acia(*this, MOS6551A_TAG), - m_cia(*this, MOS6526_TAG), - m_ieee1(*this, DS75160A_TAG), - m_ieee2(*this, DS75161A_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_exp(*this, CBM2_EXPANSION_SLOT_TAG), - m_user(*this, CBM2_USER_PORT_TAG), - m_ram(*this, RAM_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_ieee(*this, IEEE488_TAG), - m_ext_cpu(*this, EXT_I8088_TAG), - m_ext_pic(*this, EXT_I8259A_TAG), - m_ext_cia(*this, EXT_MOS6526_TAG), - m_ext_tpi(*this, EXT_MOS6525_TAG), - m_basic(*this, "basic"), - m_kernal(*this, "kernal"), - m_charom(*this, "charom"), - m_buffer_ram(*this, "buffer_ram"), - m_extbuf_ram(*this, "extbuf_ram"), - m_video_ram(*this, "video_ram"), - m_pa0(*this, "PA0"), - m_pa1(*this, "PA1"), - m_pa2(*this, "PA2"), - m_pa3(*this, "PA3"), - m_pa4(*this, "PA4"), - m_pa5(*this, "PA5"), - m_pa6(*this, "PA6"), - m_pa7(*this, "PA7"), - m_pb0(*this, "PB0"), - m_pb1(*this, "PB1"), - m_pb2(*this, "PB2"), - m_pb3(*this, "PB3"), - m_pb4(*this, "PB4"), - m_pb5(*this, "PB5"), - m_pb6(*this, "PB6"), - m_pb7(*this, "PB7"), - m_lock(*this, "LOCK"), - m_dramon(1), - m_video_ram_size(0x800), - m_graphics(1), - m_todclk(0), - m_tpi1_irq(CLEAR_LINE), - m_acia_irq(CLEAR_LINE), - m_user_irq(CLEAR_LINE), - m_tpi2_pa(0), - m_tpi2_pb(0) - { } - - required_device m_maincpu; - required_device m_pla1; - optional_device m_crtc; - optional_device m_palette; - required_device m_sid; - required_device m_tpi1; - required_device m_tpi2; - required_device m_acia; - required_device m_cia; - required_device m_ieee1; - required_device m_ieee2; - required_device m_joy1; - required_device m_joy2; - required_device m_exp; - required_device m_user; - required_device m_ram; - required_device m_cassette; - required_device m_ieee; - optional_device m_ext_cpu; - optional_device m_ext_pic; - optional_device m_ext_cia; - optional_device m_ext_tpi; - required_memory_region m_basic; - required_memory_region m_kernal; - required_memory_region m_charom; - optional_shared_ptr m_buffer_ram; - optional_shared_ptr m_extbuf_ram; - optional_shared_ptr m_video_ram; - required_ioport m_pa0; - required_ioport m_pa1; - required_ioport m_pa2; - required_ioport m_pa3; - required_ioport m_pa4; - required_ioport m_pa5; - required_ioport m_pa6; - required_ioport m_pa7; - required_ioport m_pb0; - required_ioport m_pb1; - required_ioport m_pb2; - required_ioport m_pb3; - required_ioport m_pb4; - required_ioport m_pb5; - required_ioport m_pb6; - required_ioport m_pb7; - required_ioport m_lock; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - DECLARE_MACHINE_START( cbm2 ); - DECLARE_MACHINE_START( cbm2_ntsc ); - DECLARE_MACHINE_START( cbm2_pal ); - DECLARE_MACHINE_START( cbm2x_ntsc ); - DECLARE_MACHINE_START( cbm2x_pal ); - DECLARE_MACHINE_RESET( cbm2 ); - - virtual void read_pla(offs_t offset, int ras, int cas, int refen, int eras, int ecas, - int *casseg1, int *casseg2, int *casseg3, int *casseg4, int *rasseg1, int *rasseg2, int *rasseg3, int *rasseg4); - - void bankswitch(offs_t offset, int eras, int ecas, int refen, int cas, int ras, int *sysioen, int *dramen, - int *casseg1, int *casseg2, int *casseg3, int *casseg4, int *buframcs, int *extbufcs, int *vidramcs, - int *diskromcs, int *csbank1, int *csbank2, int *csbank3, int *basiccs, int *knbcs, int *kernalcs, - int *crtccs, int *cs1, int *sidcs, int *extprtcs, int *ciacs, int *aciacs, int *tript1cs, int *tript2cs); - - UINT8 read_keyboard(); - void set_busy2(int state); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( ext_read ); - DECLARE_WRITE8_MEMBER( ext_write ); - - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); - - DECLARE_WRITE_LINE_MEMBER( tpi1_irq_w ); - DECLARE_READ8_MEMBER( tpi1_pa_r ); - DECLARE_WRITE8_MEMBER( tpi1_pa_w ); - DECLARE_READ8_MEMBER( tpi1_pb_r ); - DECLARE_WRITE8_MEMBER( tpi1_pb_w ); - DECLARE_WRITE_LINE_MEMBER( tpi1_ca_w ); - DECLARE_WRITE_LINE_MEMBER( tpi1_cb_w ); - - DECLARE_WRITE8_MEMBER( tpi2_pa_w ); - DECLARE_WRITE8_MEMBER( tpi2_pb_w ); - DECLARE_READ8_MEMBER( tpi2_pc_r ); - - DECLARE_READ8_MEMBER( cia_pa_r ); - DECLARE_WRITE8_MEMBER( cia_pa_w ); - DECLARE_READ8_MEMBER( cia_pb_r ); - - DECLARE_WRITE_LINE_MEMBER( tape_read_w ); - - DECLARE_READ8_MEMBER( ext_tpi_pb_r ); - DECLARE_WRITE8_MEMBER( ext_tpi_pb_w ); - DECLARE_WRITE8_MEMBER( ext_tpi_pc_w ); - - DECLARE_WRITE_LINE_MEMBER( ext_cia_irq_w ); - DECLARE_READ8_MEMBER( ext_cia_pb_r ); - DECLARE_WRITE8_MEMBER( ext_cia_pb_w ); - - DECLARE_WRITE_LINE_MEMBER( user_irq_w ); - - MC6845_UPDATE_ROW( crtc_update_row ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbmb ); - // memory state - int m_dramon; - int m_busen1; - int m_busy2; - - // video state - size_t m_video_ram_size; - int m_graphics; - int m_ntsc; - - // interrupt state - int m_todclk; - int m_tpi1_irq; - int m_acia_irq; - int m_user_irq; - - // keyboard state; - UINT8 m_tpi2_pa; - UINT8 m_tpi2_pb; - UINT8 m_cia_pa; - - UINT8 m_ext_cia_pb; - UINT8 m_ext_tpi_pb; - - // timers - emu_timer *m_todclk_timer; -}; - - -class cbm2hp_state : public cbm2_state -{ -public: - cbm2hp_state(const machine_config &mconfig, device_type type, const char *tag) - : cbm2_state(mconfig, type, tag) - { } - - virtual void read_pla(offs_t offset, int ras, int cas, int refen, int eras, int ecas, - int *casseg1, int *casseg2, int *casseg3, int *casseg4, int *rasseg1, int *rasseg2, int *rasseg3, int *rasseg4); - - DECLARE_READ8_MEMBER( tpi2_pc_r ); -}; - - -class p500_state : public cbm2_state -{ -public: - p500_state(const machine_config &mconfig, device_type type, const char *tag) - : cbm2_state(mconfig, type, tag), - m_pla2(*this, PLA2_TAG), - m_vic(*this, MOS6569_TAG), - m_color_ram(*this, "color_ram"), - m_statvid(1), - m_vicdotsel(1), - m_vicbnksel(0x03), - m_vic_irq(CLEAR_LINE) - { } - - required_device m_pla2; - required_device m_vic; - optional_shared_ptr m_color_ram; - - DECLARE_MACHINE_START( p500 ); - DECLARE_MACHINE_START( p500_ntsc ); - DECLARE_MACHINE_START( p500_pal ); - DECLARE_MACHINE_RESET( p500 ); - - void read_pla1(offs_t offset, int busy2, int clrnibcsb, int procvid, int refen, int ba, int aec, int srw, - int *datxen, int *dramxen, int *clrniben, int *segf, int *_64kcasen, int *casenb, int *viddaten, int *viddat_tr); - - void read_pla2(offs_t offset, offs_t va, int ba, int vicen, int ae, int segf, int bank0, - int *clrnibcsb, int *extbufcs, int *discromcs, int *buframcs, int *charomcs, int *procvid, int *viccs, int *vidmatcs); - - void bankswitch(offs_t offset, offs_t va, int srw, int ba, int ae, int busy2, int refen, - int *datxen, int *dramxen, int *clrniben, int *_64kcasen, int *casenb, int *viddaten, int *viddat_tr, - int *clrnibcs, int *extbufcs, int *discromcs, int *buframcs, int *charomcs, int *viccs, int *vidmatcs, - int *csbank1, int *csbank2, int *csbank3, int *basiclocs, int *basichics, int *kernalcs, - int *cs1, int *sidcs, int *extprtcs, int *ciacs, int *aciacs, int *tript1cs, int *tript2cs, int *aec, int *vsysaden); - - UINT8 read_memory(address_space &space, offs_t offset, offs_t va, int ba, int ae); - void write_memory(address_space &space, offs_t offset, UINT8 data, int ba, int ae); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_READ8_MEMBER( vic_videoram_r ); - DECLARE_READ8_MEMBER( vic_colorram_r ); - DECLARE_WRITE_LINE_MEMBER( vic_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( tpi1_irq_w ); - DECLARE_WRITE_LINE_MEMBER( tpi1_ca_w ); - DECLARE_WRITE_LINE_MEMBER( tpi1_cb_w ); - - DECLARE_READ8_MEMBER( tpi2_pc_r ); - DECLARE_WRITE8_MEMBER( tpi2_pc_w ); - - DECLARE_WRITE_LINE_MEMBER( user_irq_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( p500 ); - // video state - int m_statvid; - int m_vicdotsel; - int m_vicbnksel; - - // interrupt state - int m_vic_irq; -}; - - - -#endif diff --git a/src/mess/includes/cgc7900.h b/src/mess/includes/cgc7900.h deleted file mode 100644 index d5b6dc86548..00000000000 --- a/src/mess/includes/cgc7900.h +++ /dev/null @@ -1,104 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __CGC7900__ -#define __CGC7900__ - - -#include "emu.h" -#include "cpu/m68000/m68000.h" -#include "cpu/mcs48/mcs48.h" -#include "machine/ram.h" -#include "machine/i8251.h" -#include "sound/ay8910.h" - -#define M68000_TAG "uh8" -#define INS8251_0_TAG "uc10" -#define INS8251_1_TAG "uc8" -#define MM58167_TAG "uc6" -#define AY8910_TAG "uc4" -#define K1135A_TAG "uc11" -#define I8035_TAG "i8035" -#define AM2910_TAG "11d" -#define SCREEN_TAG "screen" - -class cgc7900_state : public driver_device -{ -public: - cgc7900_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M68000_TAG), - m_palette(*this, "palette"), - m_char_rom(*this, "gfx1"), - m_chrom_ram(*this, "chrom_ram"), - m_plane_ram(*this, "plane_ram"), - m_clut_ram(*this, "clut_ram"), - m_overlay_ram(*this, "overlay_ram"), - m_roll_bitmap(*this, "roll_bitmap"), - m_pan_x(*this, "pan_x"), - m_pan_y(*this, "pan_y"), - m_zoom(*this, "zoom"), - m_blink_select(*this, "blink_select"), - m_plane_select(*this, "plane_select"), - m_plane_switch(*this, "plane_switch"), - m_color_status_fg(*this, "color_status_fg"), - m_color_status_bg(*this, "color_status_bg"), - m_roll_overlay(*this, "roll_overlay") - { } - - required_device m_maincpu; - required_device m_palette; - required_memory_region m_char_rom; - required_shared_ptr m_chrom_ram; - required_shared_ptr m_plane_ram; - required_shared_ptr m_clut_ram; - required_shared_ptr m_overlay_ram; - required_shared_ptr m_roll_bitmap; - required_shared_ptr m_pan_x; - required_shared_ptr m_pan_y; - required_shared_ptr m_zoom; - required_shared_ptr m_blink_select; - required_shared_ptr m_plane_select; - required_shared_ptr m_plane_switch; - required_shared_ptr m_color_status_fg; - required_shared_ptr m_color_status_bg; - required_shared_ptr m_roll_overlay; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_PALETTE_INIT(cgc7900); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ16_MEMBER( keyboard_r ); - DECLARE_WRITE16_MEMBER( keyboard_w ); - DECLARE_WRITE16_MEMBER( interrupt_mask_w ); - DECLARE_READ16_MEMBER( disk_data_r ); - DECLARE_WRITE16_MEMBER( disk_data_w ); - DECLARE_READ16_MEMBER( disk_status_r ); - DECLARE_WRITE16_MEMBER( disk_command_w ); - DECLARE_READ16_MEMBER( z_mode_r ); - DECLARE_WRITE16_MEMBER( z_mode_w ); - DECLARE_WRITE16_MEMBER( color_status_w ); - DECLARE_READ16_MEMBER( sync_r ); - - void update_clut(); - void draw_bitmap(screen_device *screen, bitmap_rgb32 &bitmap); - void draw_overlay(screen_device *screen, bitmap_rgb32 &bitmap); - - /* interrupt state */ - UINT16 m_int_mask; - - /* video state */ - rgb_t m_clut[256]; - int m_blink; - - TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); -}; - -/*----------- defined in video/cgc7900.c -----------*/ - -MACHINE_CONFIG_EXTERN( cgc7900_video ); - -#endif diff --git a/src/mess/includes/channelf.h b/src/mess/includes/channelf.h deleted file mode 100644 index 606e0a6abfb..00000000000 --- a/src/mess/includes/channelf.h +++ /dev/null @@ -1,54 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Frank Palazzolo, Sean Riddle -/***************************************************************************** - * - * includes/channelf.h - * - ****************************************************************************/ - -#ifndef CHANNELF_H_ -#define CHANNELF_H_ - -#include "emu.h" -#include "cpu/f8/f8.h" -#include "audio/channelf.h" - -#include "bus/chanf/slot.h" -#include "bus/chanf/rom.h" - - -class channelf_state : public driver_device -{ -public: - channelf_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_custom(*this,"custom"), - m_cart(*this, "cartslot") - { } - - DECLARE_READ8_MEMBER(port_0_r); - DECLARE_READ8_MEMBER(port_1_r); - DECLARE_READ8_MEMBER(port_4_r); - DECLARE_READ8_MEMBER(port_5_r); - DECLARE_WRITE8_MEMBER(port_0_w); - DECLARE_WRITE8_MEMBER(port_1_w); - DECLARE_WRITE8_MEMBER(port_4_w); - DECLARE_WRITE8_MEMBER(port_5_w); - UINT8 *m_p_videoram; - UINT8 m_latch[6]; - UINT8 m_val_reg; - UINT8 m_row_reg; - UINT8 m_col_reg; - UINT8 port_read_with_latch(UINT8 ext, UINT8 latch_state); - virtual void video_start(); - virtual void machine_start(); - DECLARE_PALETTE_INIT(channelf); - UINT32 screen_update_channelf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_custom; - required_device m_cart; - int recalc_palette_offset(int reg1, int reg2); -}; - -#endif /* CHANNELF_H_ */ diff --git a/src/mess/includes/coco.h b/src/mess/includes/coco.h deleted file mode 100644 index 363fcff5d2a..00000000000 --- a/src/mess/includes/coco.h +++ /dev/null @@ -1,269 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - coco.h - - TRS-80 Radio Shack Color Computer Family - -***************************************************************************/ - -#pragma once - -#ifndef __COCO__ -#define __COCO__ - - -#include "emu.h" -#include "imagedev/cassette.h" -#include "bus/rs232/rs232.h" -#include "machine/6821pia.h" -#include "bus/coco/cococart.h" -#include "machine/coco_vhd.h" -#include "bus/coco/coco_dwsock.h" -#include "machine/ram.h" -#include "sound/dac.h" -#include "sound/wave.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -INPUT_PORTS_EXTERN( coco_analog_control ); -INPUT_PORTS_EXTERN( coco_cart_autostart ); -INPUT_PORTS_EXTERN( coco_rtc ); -INPUT_PORTS_EXTERN( coco_beckerport ); - -SLOT_INTERFACE_EXTERN( coco_cart ); - -// constants -#define JOYSTICK_DELTA 10 -#define JOYSTICK_SENSITIVITY 100 - -// devices -#define MAINCPU_TAG "maincpu" -#define PIA0_TAG "pia0" -#define PIA1_TAG "pia1" -#define SAM_TAG "sam" -#define VDG_TAG "vdg" -#define SCREEN_TAG "screen" -#define DAC_TAG "dac" -#define CARTRIDGE_TAG "ext" -#define RS232_TAG "rs232" -#define DWSOCK_TAG "dwsock" -#define VHD0_TAG "vhd0" -#define VHD1_TAG "vhd1" - -// inputs -#define CTRL_SEL_TAG "ctrl_sel" -#define HIRES_INTF_TAG "hires_intf" -#define CART_AUTOSTART_TAG "cart_autostart" -#define BECKERPORT_TAG "beckerport" -#define JOYSTICK_RX_TAG "joystick_rx" -#define JOYSTICK_RY_TAG "joystick_ry" -#define JOYSTICK_LX_TAG "joystick_lx" -#define JOYSTICK_LY_TAG "joystick_ly" -#define JOYSTICK_BUTTONS_TAG "joystick_buttons" -#define RAT_MOUSE_RX_TAG "rat_mouse_rx" -#define RAT_MOUSE_RY_TAG "rat_mouse_ry" -#define RAT_MOUSE_LX_TAG "rat_mouse_lx" -#define RAT_MOUSE_LY_TAG "rat_mouse_ly" -#define RAT_MOUSE_BUTTONS_TAG "rat_mouse_buttons" -#define DIECOM_LIGHTGUN_RX_TAG "dclg_rx" -#define DIECOM_LIGHTGUN_RY_TAG "dclg_ry" -#define DIECOM_LIGHTGUN_LX_TAG "dclg_lx" -#define DIECOM_LIGHTGUN_LY_TAG "dclg_ly" -#define DIECOM_LIGHTGUN_BUTTONS_TAG "dclg_triggers" - -MACHINE_CONFIG_EXTERN( coco_sound ); - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class coco_state : public driver_device -{ -public: - coco_state(const machine_config &mconfig, device_type type, const char *tag); - - required_device m_maincpu; - required_device m_pia_0; - required_device m_pia_1; - required_device m_dac; - required_device m_wave; - required_device m_cococart; - required_device m_ram; - required_device m_cassette; - optional_device m_rs232; - optional_device m_vhd_0; - optional_device m_vhd_1; - optional_device m_beckerport; - optional_ioport m_beckerportconfig; - - // driver update handlers - DECLARE_INPUT_CHANGED_MEMBER(keyboard_changed); - DECLARE_INPUT_CHANGED_MEMBER(joystick_mode_changed); - - // IO - virtual DECLARE_READ8_MEMBER( ff00_read ); - virtual DECLARE_WRITE8_MEMBER( ff00_write ); - virtual DECLARE_READ8_MEMBER( ff20_read ); - virtual DECLARE_WRITE8_MEMBER( ff20_write ); - virtual DECLARE_READ8_MEMBER( ff40_read ); - virtual DECLARE_WRITE8_MEMBER( ff40_write ); - DECLARE_READ8_MEMBER( ff60_read ); - DECLARE_WRITE8_MEMBER( ff60_write ); - - // PIA0 - DECLARE_WRITE8_MEMBER( pia0_pa_w ); - DECLARE_WRITE8_MEMBER( pia0_pb_w ); - DECLARE_WRITE_LINE_MEMBER( pia0_ca2_w ); - DECLARE_WRITE_LINE_MEMBER( pia0_cb2_w ); - DECLARE_WRITE_LINE_MEMBER( pia0_irq_a ); - DECLARE_WRITE_LINE_MEMBER( pia0_irq_b ); - - // PIA1 - DECLARE_READ8_MEMBER( pia1_pa_r ); - DECLARE_READ8_MEMBER( pia1_pb_r ); - DECLARE_WRITE8_MEMBER( pia1_pa_w ); - DECLARE_WRITE8_MEMBER( pia1_pb_w ); - DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w ); - DECLARE_WRITE_LINE_MEMBER( pia1_cb2_w ); - DECLARE_WRITE_LINE_MEMBER( pia1_firq_a ); - DECLARE_WRITE_LINE_MEMBER( pia1_firq_b ); - - // floating bus - DECLARE_READ8_MEMBER( floating_bus_read ) { return floating_bus_read(); } - - DECLARE_WRITE_LINE_MEMBER( cart_w ) { cart_w((bool) state); } -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - // interrupts - virtual bool firq_get_line(void); - virtual bool irq_get_line(void); - void recalculate_irq(void); - void recalculate_firq(void); - - // changed handlers - virtual void pia1_pa_changed(UINT8 data); - virtual void pia1_pb_changed(UINT8 data); - - // miscellaneous - virtual void update_keyboard_input(UINT8 value, UINT8 z); - virtual void cart_w(bool state); - virtual void update_cart_base(UINT8 *cart_base) = 0; - -private: - // timer constants - static const device_timer_id TIMER_HIRES_JOYSTICK_X = 0; - static const device_timer_id TIMER_HIRES_JOYSTICK_Y = 1; - static const device_timer_id TIMER_DIECOM_LIGHTGUN = 2; - - enum soundmux_status_t - { - SOUNDMUX_SEL1 = 1, - SOUNDMUX_SEL2 = 2, - SOUNDMUX_ENABLE = 4 - }; - - enum joystick_type_t - { - JOYSTICK_NONE = 0x00, - JOYSTICK_NORMAL = 0x01, - JOYSTICK_RAT_MOUSE = 0x02, - JOYSTICK_DIECOM_LIGHT_GUN = 0x03 - }; - - enum hires_type_t - { - HIRES_NONE = 0x00, - HIRES_RIGHT = 0x01, - HIRES_RIGHT_COCOMAX3 = 0x02, - HIRES_LEFT = 0x03, - HIRES_LEFT_COCOMAX3 = 0x04 - }; - - struct analog_input_t - { - ioport_port *m_input[2][2]; - ioport_port *m_buttons; - - UINT8 input(int joystick, int axis) const { return m_input[joystick][axis] ? m_input[joystick][axis]->read() : 0x00; } - UINT8 buttons(void) const { return m_buttons ? m_buttons->read() : 0x00; } - }; - - void analog_port_start(analog_input_t *analog, const char *rx_tag, const char *ry_tag, const char *lx_tag, const char *ly_tag, const char *buttons_tag); - - // wrappers for configuration - joystick_type_t joystick_type(int index); - hires_type_t hires_interface_type(void); - bool is_joystick_hires(int joystick_index); - - soundmux_status_t soundmux_status(void); - void update_sound(void); - bool joyin(void); - void poll_joystick(bool *joyin, UINT8 *buttons); - void poll_keyboard(void); - void poll_hires_joystick(void); - void update_cassout(int cassout); - void update_prinout(bool prinout); - void diecom_lightgun_clock(void); - - // thin wrappers for PIA output - UINT8 dac_output(void) { return m_dac_output; } // PA drives the DAC - bool sel1(void) { return m_pia_0->ca2_output() ? true : false; } - bool sel2(void) { return m_pia_0->cb2_output() ? true : false; } - bool snden(void) { return m_pia_1->cb2_output() ? true : false; } - - // VHD selection - coco_vhd_image_device *current_vhd(void); - - // floating bus - UINT8 floating_bus_read(void); - - // disassembly override - static offs_t dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options); - - // input ports - ioport_port *m_keyboard[7]; - ioport_port *m_joystick_type_control; - ioport_port *m_joystick_hires_control; - analog_input_t m_joystick; - analog_input_t m_rat_mouse; - analog_input_t m_diecom_lightgun; - - // DAC output - UINT8 m_dac_output; - - // remember the last audio sample level from the analog sources (DAC, cart, cassette) so that we don't - // introduce step changes when the audio output is enabled/disabled via PIA1 CB2 - UINT8 m_analog_audio_level; - - // hires interface - emu_timer *m_hiresjoy_transition_timer[2]; - bool m_hiresjoy_ca; - - // diecom lightgun - emu_timer *m_diecom_lightgun_timer; - bool m_dclg_previous_bit; - UINT8 m_dclg_output_h; - UINT8 m_dclg_output_v; - UINT8 m_dclg_state; - UINT16 m_dclg_timer; - - // VHD selection - UINT8 m_vhd_select; - - // safety to prevent stack overflow when reading floating bus - bool m_in_floating_bus_read; -}; - -#endif // __COCO__ diff --git a/src/mess/includes/coco12.h b/src/mess/includes/coco12.h deleted file mode 100644 index 030adc35b25..00000000000 --- a/src/mess/includes/coco12.h +++ /dev/null @@ -1,67 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - coco12.h - - TRS-80 Radio Shack Color Computer 1/2 Family - -***************************************************************************/ - -#pragma once - -#ifndef __COCO12__ -#define __COCO12__ - - -#include "includes/coco.h" -#include "machine/6883sam.h" -#include "video/mc6847.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define SAM_TAG "sam" -#define VDG_TAG "vdg" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class coco12_state : public coco_state -{ -public: - coco12_state(const machine_config &mconfig, device_type type, const char *tag) - : coco_state(mconfig, type, tag), - m_sam(*this, SAM_TAG), - m_vdg(*this, VDG_TAG) - { - } - - - required_device m_sam; - required_device m_vdg; - - DECLARE_READ8_MEMBER( sam_read ); - - DECLARE_WRITE_LINE_MEMBER( horizontal_sync ); - DECLARE_WRITE_LINE_MEMBER( field_sync ); -protected: - virtual void device_start(); - virtual void update_cart_base(UINT8 *cart_base); - - /* PIA1 */ - virtual void pia1_pb_changed(UINT8 data); - -private: - - void configure_sam(void); -}; - - -#endif /* __COCO12__ */ diff --git a/src/mess/includes/coco3.h b/src/mess/includes/coco3.h deleted file mode 100644 index 8ac863fa6b3..00000000000 --- a/src/mess/includes/coco3.h +++ /dev/null @@ -1,67 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - coco3.h - - TRS-80 Radio Shack Color Computer 1/2 Family - -***************************************************************************/ - -#pragma once - -#ifndef __COCO3__ -#define __COCO3__ - - -#include "includes/coco.h" -#include "video/gime.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define GIME_TAG "gime" -#define VDG_TAG "vdg" -#define COMPOSITE_SCREEN_TAG "composite" -#define RGB_SCREEN_TAG "rgb" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class coco3_state : public coco_state -{ -public: - coco3_state(const machine_config &mconfig, device_type type, const char *tag) - : coco_state(mconfig, type, tag), - m_gime(*this, GIME_TAG) { } - - required_device m_gime; - - virtual DECLARE_WRITE8_MEMBER( ff20_write ); - virtual DECLARE_READ8_MEMBER( ff40_read ); - virtual DECLARE_WRITE8_MEMBER( ff40_write ); - - DECLARE_WRITE_LINE_MEMBER(gime_firq_w) { recalculate_firq(); } - DECLARE_WRITE_LINE_MEMBER(gime_irq_w) { recalculate_irq(); } - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - -protected: - virtual void update_cart_base(UINT8 *cart_base); - - /* interrupts */ - virtual bool firq_get_line(void); - virtual bool irq_get_line(void); - - /* miscellaneous */ - virtual void update_keyboard_input(UINT8 value, UINT8 z); - virtual void cart_w(bool line); -}; - -#endif // __COCO3__ diff --git a/src/mess/includes/coleco.h b/src/mess/includes/coleco.h deleted file mode 100644 index ab6e1379663..00000000000 --- a/src/mess/includes/coleco.h +++ /dev/null @@ -1,99 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Mike Balfour, Ben Bruscella, Sean Young -#pragma once - -#ifndef __COLECO__ -#define __COLECO__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/sn76496.h" -#include "video/tms9928a.h" -#include "machine/coleco.h" -#include "bus/coleco/exp.h" - -class coleco_state : public driver_device -{ -public: - coleco_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cart(*this, COLECOVISION_CARTRIDGE_SLOT_TAG), - m_ram(*this, "ram"), - m_ctrlsel(*this, "CTRLSEL"), - m_std_keypad1(*this, "STD_KEYPAD1"), - m_std_joy1(*this, "STD_JOY1"), - m_std_keypad2(*this, "STD_KEYPAD2"), - m_std_joy2(*this, "STD_JOY2"), - m_sac_keypad1(*this, "SAC_KEYPAD1"), - m_sac_joy1(*this, "SAC_JOY1"), - m_sac_slide1(*this, "SAC_SLIDE1"), - m_sac_keypad2(*this, "SAC_KEYPAD2"), - m_sac_joy2(*this, "SAC_JOY2"), - m_sac_slide2(*this, "SAC_SLIDE2"), - m_driv_wheel1(*this, "DRIV_WHEEL1"), - m_driv_pedal1(*this, "DRIV_PEDAL1"), - m_driv_wheel2(*this, "DRIV_WHEEL2"), - m_driv_pedal2(*this, "DRIV_PEDAL2"), - m_roller_x(*this, "ROLLER_X"), - m_roller_y(*this, "ROLLER_Y") - { } - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( cart_r ); - DECLARE_READ8_MEMBER( paddle_1_r ); - DECLARE_READ8_MEMBER( paddle_2_r ); - DECLARE_WRITE8_MEMBER( paddle_off_w ); - DECLARE_WRITE8_MEMBER( paddle_on_w ); - - TIMER_CALLBACK_MEMBER(paddle_d7reset_callback); - TIMER_CALLBACK_MEMBER(paddle_irqreset_callback); - TIMER_CALLBACK_MEMBER(paddle_pulse_callback); - TIMER_DEVICE_CALLBACK_MEMBER(paddle_update_callback); - DECLARE_WRITE_LINE_MEMBER(coleco_vdp_interrupt); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(czz50_cart); - - UINT8 coleco_paddle_read(int port, int joy_mode, UINT8 joy_status); - UINT8 coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1); - -private: - required_device m_maincpu; - required_device m_cart; - required_shared_ptr m_ram; - - int m_joy_mode; - int m_last_nmi_state; - - // analog controls - attotime m_joy_pulse_reload[2]; - emu_timer *m_joy_pulse_timer[2]; - emu_timer *m_joy_irq_timer[2]; - emu_timer *m_joy_d7_timer[2]; - int m_joy_irq_state[2]; - int m_joy_d7_state[2]; - UINT8 m_joy_analog_state[2]; - UINT8 m_joy_analog_reload[2]; - - optional_ioport m_ctrlsel; - required_ioport m_std_keypad1; - required_ioport m_std_joy1; - required_ioport m_std_keypad2; - required_ioport m_std_joy2; - optional_ioport m_sac_keypad1; - optional_ioport m_sac_joy1; - optional_ioport m_sac_slide1; - optional_ioport m_sac_keypad2; - optional_ioport m_sac_joy2; - optional_ioport m_sac_slide2; - optional_ioport m_driv_wheel1; - optional_ioport m_driv_pedal1; - optional_ioport m_driv_wheel2; - optional_ioport m_driv_pedal2; - optional_ioport m_roller_x; - optional_ioport m_roller_y; -}; - -#endif diff --git a/src/mess/includes/compis.h b/src/mess/includes/compis.h deleted file mode 100644 index fbb562b4b90..00000000000 --- a/src/mess/includes/compis.h +++ /dev/null @@ -1,135 +0,0 @@ -// license:??? -// copyright-holders:Per Ola Ingvarsson, Tomas Karlsson -/***************************************************************************** - * - * includes/compis.h - * - * machine driver header - * - * Per Ola Ingvarsson - * Tomas Karlsson - * - ****************************************************************************/ - -#pragma once - -#ifndef __COMPIS__ -#define __COMPIS__ - -#include "emu.h" -#include "bus/isbx/isbx.h" -#include "cpu/i86/i186.h" -#include "cpu/mcs48/mcs48.h" -#include "imagedev/cassette.h" -#include "machine/compiskb.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8251.h" -#include "machine/i8255.h" -#include "machine/i80130.h" -#include "machine/mm58274c.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/z80dart.h" -#include "video/upd7220.h" - -#define I80186_TAG "ic1" -#define I80130_TAG "ic15" -#define I8251A_TAG "ic59" -#define I8253_TAG "ic60" -#define I8274_TAG "ic65" -#define MM58174A_TAG "ic66" -#define I8255_TAG "ic69" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define CASSETTE_TAG "cassette" -#define CENTRONICS_TAG "centronics" -#define ISBX_0_TAG "isbx0" -#define ISBX_1_TAG "isbx1" -#define SCREEN_TAG "screen" -#define COMPIS_KEYBOARD_TAG "compiskb" - -class compis_state : public driver_device -{ -public: - compis_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I80186_TAG), - m_osp(*this, I80130_TAG), - m_pit(*this, I8253_TAG), - m_ppi(*this, I8255_TAG), - m_mpsc(*this, I8274_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_uart(*this, I8251A_TAG), - m_rtc(*this, MM58174A_TAG), - m_crtc(*this, "upd7220"), - m_palette(*this, "palette"), - m_cassette(*this, CASSETTE_TAG), - m_isbx0(*this, ISBX_0_TAG), - m_isbx1(*this, ISBX_1_TAG), - m_ram(*this, RAM_TAG), - m_video_ram(*this, "video_ram"), - m_s8(*this, "S8") - { } - - required_device m_maincpu; - required_device m_osp; - required_device m_pit; - required_device m_ppi; - required_device m_mpsc; - required_device m_centronics; - required_device m_uart; - required_device m_rtc; - required_device m_crtc; - required_device m_palette; - required_device m_cassette; - required_device m_isbx0; - required_device m_isbx1; - required_device m_ram; - required_shared_ptr m_video_ram; - required_ioport m_s8; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( tape_mon_w ); - DECLARE_READ16_MEMBER( isbx0_tdma_r ); - DECLARE_WRITE16_MEMBER( isbx0_tdma_w ); - DECLARE_READ16_MEMBER( isbx1_tdma_r ); - DECLARE_WRITE16_MEMBER( isbx1_tdma_w ); - DECLARE_READ16_MEMBER( isbx0_cs_r ); - DECLARE_WRITE16_MEMBER( isbx0_cs_w ); - DECLARE_READ16_MEMBER( isbx0_dack_r ); - DECLARE_WRITE16_MEMBER( isbx0_dack_w ); - DECLARE_READ16_MEMBER( isbx1_cs_r ); - DECLARE_WRITE16_MEMBER( isbx1_cs_w ); - DECLARE_READ16_MEMBER( isbx1_dack_r ); - DECLARE_WRITE16_MEMBER( isbx1_dack_w ); - - DECLARE_READ8_MEMBER( compis_irq_callback ); - - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - - DECLARE_WRITE_LINE_MEMBER( tmr0_w ); - DECLARE_WRITE_LINE_MEMBER( tmr1_w ); - DECLARE_WRITE_LINE_MEMBER( tmr2_w ); - DECLARE_WRITE_LINE_MEMBER( tmr5_w ); - - TIMER_DEVICE_CALLBACK_MEMBER( tape_tick ); - - int m_centronics_busy; - int m_centronics_select; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - - int m_tmr0; - int m_unk_video; - - UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); -}; - - - -#endif diff --git a/src/mess/includes/comquest.h b/src/mess/includes/comquest.h deleted file mode 100644 index 5b36a3efefe..00000000000 --- a/src/mess/includes/comquest.h +++ /dev/null @@ -1,34 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/comquest.h - * - ****************************************************************************/ - -#ifndef COMQUEST_H_ -#define COMQUEST_H_ - - -class comquest_state : public driver_device -{ -public: - comquest_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") { } - - UINT8 m_data[128][8]; - void *m_timer; - int m_line; - int m_dma_activ; - int m_state; - int m_count; - DECLARE_READ8_MEMBER(comquest_read); - DECLARE_WRITE8_MEMBER(comquest_write); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_comquest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; -}; - -#endif /* COMQUEST_H_ */ diff --git a/src/mess/includes/comx35.h b/src/mess/includes/comx35.h deleted file mode 100644 index 93bc60a84e8..00000000000 --- a/src/mess/includes/comx35.h +++ /dev/null @@ -1,106 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __COMX35__ -#define __COMX35__ - -#include "emu.h" -#include "bus/comx35/exp.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "imagedev/printer.h" -#include "imagedev/snapquik.h" -#include "machine/cdp1871.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "sound/cdp1869.h" -#include "sound/wave.h" - -#define SCREEN_TAG "screen" - -#define CDP1870_TAG "u1" -#define CDP1869_TAG "u2" -#define CDP1802_TAG "u3" -#define CDP1871_TAG "u4" -#define EXPANSION_TAG "exp" - -#define COMX35_CHARRAM_SIZE 0x800 -#define COMX35_CHARRAM_MASK 0x7ff - -class comx35_state : public driver_device -{ -public: - comx35_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_vis(*this, CDP1869_TAG), - m_kbe(*this, CDP1871_TAG), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_exp(*this, EXPANSION_TAG), - m_rom(*this, CDP1802_TAG), - m_char_ram(*this, "char_ram"), - m_d6(*this, "D6"), - m_modifiers(*this, "MODIFIERS") - { } - - required_device m_maincpu; - required_device m_vis; - required_device m_kbe; - required_device m_cassette; - required_device m_ram; - required_device m_exp; - required_memory_region m_rom; - optional_shared_ptr m_char_ram; - required_ioport m_d6; - required_ioport m_modifiers; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - - enum - { - TIMER_ID_RESET - }; - - void check_interrupt(); - - DECLARE_READ8_MEMBER( mem_r ); - DECLARE_WRITE8_MEMBER( mem_w ); - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); - DECLARE_WRITE8_MEMBER( cdp1869_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef4_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( sc_w ); - DECLARE_WRITE_LINE_MEMBER( irq_w ); - DECLARE_WRITE_LINE_MEMBER( prd_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_QUICKLOAD_LOAD_MEMBER( comx35_comx ); - void image_fread_memory(device_image_interface &image, UINT16 addr, UINT32 count); - CDP1869_CHAR_RAM_READ_MEMBER(comx35_charram_r); - CDP1869_CHAR_RAM_WRITE_MEMBER(comx35_charram_w); - CDP1869_PCB_READ_MEMBER(comx35_pcb_r); - - // processor state - int m_clear; // CPU mode - int m_q; // Q flag - int m_iden; // interrupt/DMA enable - int m_dma; // memory refresh DMA - int m_int; // interrupt request - int m_prd; // predisplay - int m_cr1; // interrupt enable -}; - -// ---------- defined in video/comx35.c ---------- - -MACHINE_CONFIG_EXTERN( comx35_pal_video ); -MACHINE_CONFIG_EXTERN( comx35_ntsc_video ); - -#endif diff --git a/src/mess/includes/concept.h b/src/mess/includes/concept.h deleted file mode 100644 index c9759c893a8..00000000000 --- a/src/mess/includes/concept.h +++ /dev/null @@ -1,71 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Raphael Nabet, Brett Wyer -/***************************************************************************** - * - * includes/concept.h - * - * Corvus Concept driver - * - * Raphael Nabet, 2003 - * - ****************************************************************************/ - -#ifndef CONCEPT_H_ -#define CONCEPT_H_ - -#include "cpu/m68000/m68000.h" -#include "machine/6522via.h" -#include "machine/mos6551.h" -#include "machine/mm58274c.h" /* mm58274 seems to be compatible with mm58174 */ -#include "sound/speaker.h" -#include "bus/a2bus/a2bus.h" - -#define ACIA_0_TAG "acia0" -#define ACIA_1_TAG "acia1" -#define KBD_ACIA_TAG "kbacia" -#define SPEAKER_TAG "spkr" -#define A2BUS_TAG "a2bus" - -class concept_state : public driver_device -{ -public: - concept_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_acia0(*this, ACIA_0_TAG), - m_acia1(*this, ACIA_1_TAG), - m_kbdacia(*this, KBD_ACIA_TAG), - m_speaker(*this, SPEAKER_TAG), - m_mm58274(*this,"mm58274c"), - m_a2bus(*this, A2BUS_TAG), - m_videoram(*this,"videoram") { } - - required_device m_maincpu; - required_device m_acia0; - required_device m_acia1; - required_device m_kbdacia; - required_device m_speaker; - required_device m_mm58274; - required_device m_a2bus; - required_shared_ptr m_videoram; - - UINT8 m_pending_interrupts; - bool m_clock_enable; - UINT8 m_clock_address; - DECLARE_READ16_MEMBER(concept_io_r); - DECLARE_WRITE16_MEMBER(concept_io_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_concept(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER(via_in_a); - DECLARE_WRITE8_MEMBER(via_out_a); - DECLARE_READ8_MEMBER(via_in_b); - DECLARE_WRITE8_MEMBER(via_out_b); - DECLARE_WRITE_LINE_MEMBER(via_out_cb2); - DECLARE_WRITE_LINE_MEMBER(via_irq_func); - void concept_set_interrupt(int level, int state); -}; - -#endif /* CONCEPT_H_ */ diff --git a/src/mess/includes/cosmicos.h b/src/mess/includes/cosmicos.h deleted file mode 100644 index 9941d4b732f..00000000000 --- a/src/mess/includes/cosmicos.h +++ /dev/null @@ -1,147 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __COSMICOS__ -#define __COSMICOS__ - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "imagedev/snapquik.h" -#include "machine/rescap.h" -#include "sound/cdp1864.h" -#include "sound/speaker.h" -#include "video/dm9368.h" - -#define CDP1802_TAG "ic19" -#define CDP1864_TAG "ic3" -#define DM9368_TAG "ic10" -#define SCREEN_TAG "screen" - -enum -{ - LED_RUN = 0, - LED_LOAD, - LED_PAUSE, - LED_RESET, - LED_D7, - LED_D6, - LED_D5, - LED_D4, - LED_D3, - LED_D2, - LED_D1, - LED_D0, - LED_Q, - LED_CASSETTE -}; - -class cosmicos_state : public driver_device -{ -public: - cosmicos_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_cti(*this, CDP1864_TAG), - m_led(*this, DM9368_TAG), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_rom(*this, CDP1802_TAG), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_io_data(*this, "DATA"), - m_special(*this, "SPECIAL"), - m_buttons(*this, "BUTTONS") - { } - - required_device m_maincpu; - required_device m_cti; - required_device m_led; - required_device m_cassette; - required_device m_speaker; - required_device m_ram; - required_memory_region m_rom; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_io_data; - required_ioport m_special; - required_ioport m_buttons; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( video_off_r ); - DECLARE_READ8_MEMBER( video_on_r ); - DECLARE_WRITE8_MEMBER( audio_latch_w ); - DECLARE_READ8_MEMBER( hex_keyboard_r ); - DECLARE_WRITE8_MEMBER( hex_keylatch_w ); - DECLARE_READ8_MEMBER( reset_counter_r ); - DECLARE_WRITE8_MEMBER( segment_w ); - DECLARE_READ8_MEMBER( data_r ); - DECLARE_WRITE8_MEMBER( display_w ); - DECLARE_WRITE_LINE_MEMBER( dmaout_w ); - DECLARE_WRITE_LINE_MEMBER( efx_w ); - DECLARE_READ_LINE_MEMBER( wait_r ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef1_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_READ_LINE_MEMBER( ef4_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_READ8_MEMBER( dma_r ); - DECLARE_WRITE8_MEMBER( sc_w ); - DECLARE_INPUT_CHANGED_MEMBER( data ); - DECLARE_INPUT_CHANGED_MEMBER( enter ); - DECLARE_INPUT_CHANGED_MEMBER( single_step ); - DECLARE_INPUT_CHANGED_MEMBER( run ); - DECLARE_INPUT_CHANGED_MEMBER( load ); - DECLARE_INPUT_CHANGED_MEMBER( cosmicos_pause ); - DECLARE_INPUT_CHANGED_MEMBER( reset ); - DECLARE_INPUT_CHANGED_MEMBER( clear_data ); - DECLARE_INPUT_CHANGED_MEMBER( memory_protect ); - DECLARE_INPUT_CHANGED_MEMBER( memory_disable ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cosmicos ); - - void set_cdp1802_mode(int mode); - void clear_input_data(); - - /* CPU state */ - int m_wait; - int m_clear; - int m_sc1; - - /* memory state */ - UINT8 m_data; - int m_boot; - int m_ram_protect; - int m_ram_disable; - - /* keyboard state */ - ioport_port* m_key_row[4]; - UINT8 m_keylatch; - - /* display state */ - UINT8 m_segment; - int m_digit; - int m_counter; - int m_q; - int m_dmaout; - int m_efx; - int m_video_on; - - DECLARE_DRIVER_INIT(cosmicos); - TIMER_DEVICE_CALLBACK_MEMBER(digit_tick); - TIMER_DEVICE_CALLBACK_MEMBER(int_tick); -}; - -#endif diff --git a/src/mess/includes/crvision.h b/src/mess/includes/crvision.h deleted file mode 100644 index 0956119c4c7..00000000000 --- a/src/mess/includes/crvision.h +++ /dev/null @@ -1,114 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Curt Coder - -#ifndef __CRVISION__ -#define __CRVISION__ - - -#include "emu.h" -#include "cpu/m6502/m6502.h" -#include "imagedev/cassette.h" -#include "machine/6821pia.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "bus/crvision/slot.h" -#include "bus/crvision/rom.h" -#include "machine/ram.h" -#include "sound/sn76496.h" -#include "sound/wave.h" -#include "video/tms9928a.h" - -#define SCREEN_TAG "screen" -#define M6502_TAG "u2" -#define TMS9929_TAG "u3" -#define PIA6821_TAG "u21" -#define SN76489_TAG "u22" -#define CENTRONICS_TAG "centronics" - -#define BANK_ROM1 "bank1" -#define BANK_ROM2 "bank2" - -class crvision_state : public driver_device -{ -public: - crvision_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_pia(*this, PIA6821_TAG), - m_psg(*this, SN76489_TAG), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_cent_data_out(*this, "cent_data_out"), - m_ram(*this, RAM_TAG), - m_inp_pa0(*this, "PA0"), - m_inp_pa1(*this, "PA1"), - m_inp_pa2(*this, "PA2"), - m_inp_pa3(*this, "PA3") - { } - - required_device m_maincpu; - required_device m_pia; - required_device m_psg; - required_device m_cassette; - required_device m_cart; - required_device m_cent_data_out; - required_device m_ram; - optional_ioport_array<8> m_inp_pa0; - optional_ioport_array<8> m_inp_pa1; - optional_ioport_array<8> m_inp_pa2; - optional_ioport_array<8> m_inp_pa3; - - UINT8 m_keylatch; - UINT8 read_keyboard(int pa); - - DECLARE_WRITE8_MEMBER( pia_pa_w ); - DECLARE_READ8_MEMBER( pia_pa_r ); - DECLARE_READ8_MEMBER( pia_pb_r ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - -protected: - virtual void machine_start(); -}; - -class crvision_pal_state : public crvision_state -{ -public: - crvision_pal_state(const machine_config &mconfig, device_type type, const char *tag) - : crvision_state(mconfig, type, tag) - { } -}; - -class laser2001_state : public crvision_state -{ -public: - laser2001_state(const machine_config &mconfig, device_type type, const char *tag) - : crvision_state(mconfig, type, tag), - m_centronics(*this, CENTRONICS_TAG), - m_inp_y(*this, "Y"), - m_inp_joy(*this, "JOY") - { } - - required_device m_centronics; - required_ioport_array<8> m_inp_y; - required_ioport_array<4> m_inp_joy; - - UINT8 m_joylatch; - int m_centronics_busy; - int m_psg_ready; - - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_psg_ready ); - DECLARE_READ8_MEMBER( pia_pa_r ); - DECLARE_WRITE8_MEMBER( pia_pa_w ); - DECLARE_READ8_MEMBER( pia_pb_r ); - DECLARE_WRITE8_MEMBER( pia_pb_w ); - DECLARE_READ_LINE_MEMBER( pia_ca1_r ); - DECLARE_WRITE_LINE_MEMBER( pia_ca2_w ); - DECLARE_READ_LINE_MEMBER( pia_cb1_r ); - DECLARE_WRITE_LINE_MEMBER( pia_cb2_w ); - -protected: - virtual void machine_start(); -}; - -#endif // __CRVISION__ diff --git a/src/mess/includes/cxhumax.h b/src/mess/includes/cxhumax.h deleted file mode 100644 index 1fd1e4d7568..00000000000 --- a/src/mess/includes/cxhumax.h +++ /dev/null @@ -1,281 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Lukasz Markowski -#ifndef CXHUMAX_H_ -#define CXHUMAX_H_ - -#include "cpu/arm7/arm7.h" -#include "cpu/arm7/arm7core.h" -#include "machine/intelfsh.h" -#include "machine/i2cmem.h" -#include "machine/terminal.h" - -#define MAX_CX_TIMERS 16 - -struct cx_timer_t -{ - UINT32 value; - UINT32 limit; - UINT32 mode; - UINT32 timebase; - emu_timer *timer; -}; - -struct cx_timer_regs_t -{ - cx_timer_t timer[MAX_CX_TIMERS]; - UINT32 timer_irq; -}; - -#define TERMINAL_TAG "terminal" - -class cxhumax_state : public driver_device -{ -public: - cxhumax_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_flash(*this, "flash"), - m_ram(*this, "ram"), - m_terminal(*this, TERMINAL_TAG), - m_i2cmem(*this, "eeprom") - { - } - - required_device m_maincpu; - required_device m_flash; - required_shared_ptr m_ram; - required_device m_terminal; - - DECLARE_WRITE32_MEMBER ( flash_w ); - DECLARE_READ32_MEMBER ( flash_r ); - - DECLARE_WRITE32_MEMBER ( cx_hsx_w ); - DECLARE_READ32_MEMBER ( cx_hsx_r ); - - DECLARE_WRITE32_MEMBER ( cx_romdescr_w ); - DECLARE_READ32_MEMBER ( cx_romdescr_r ); - DECLARE_WRITE32_MEMBER ( cx_isaromdescr_w ); - DECLARE_READ32_MEMBER ( cx_isaromdescr_r ); - DECLARE_WRITE32_MEMBER ( cx_isadescr_w ); - DECLARE_READ32_MEMBER ( cx_isadescr_r ); - DECLARE_WRITE32_MEMBER ( cx_rommap_w ); - DECLARE_READ32_MEMBER ( cx_rommap_r ); - DECLARE_WRITE32_MEMBER ( cx_rommode_w ); - DECLARE_READ32_MEMBER ( cx_rommode_r ); - DECLARE_WRITE32_MEMBER ( cx_xoemask_w ); - DECLARE_READ32_MEMBER ( cx_xoemask_r ); - DECLARE_WRITE32_MEMBER ( cx_pci_w ); - DECLARE_READ32_MEMBER ( cx_pci_r ); - DECLARE_WRITE32_MEMBER ( cx_extdesc_w ); - DECLARE_READ32_MEMBER ( cx_extdesc_r ); - - DECLARE_WRITE32_MEMBER ( cx_remap_w ); - DECLARE_WRITE32_MEMBER ( cx_scratch_w ); - DECLARE_READ32_MEMBER ( cx_scratch_r ); - - DECLARE_WRITE32_MEMBER ( cx_timers_w ); - DECLARE_READ32_MEMBER ( cx_timers_r ); - - DECLARE_WRITE32_MEMBER ( cx_uart2_w ); - DECLARE_READ32_MEMBER ( cx_uart2_r ); - - DECLARE_WRITE32_MEMBER ( cx_pll_w ); - DECLARE_READ32_MEMBER ( cx_pll_r ); - DECLARE_WRITE32_MEMBER ( cx_clkdiv_w ); - DECLARE_READ32_MEMBER ( cx_clkdiv_r ); - DECLARE_WRITE32_MEMBER ( cx_pllprescale_w ); - DECLARE_READ32_MEMBER ( cx_pllprescale_r ); - - DECLARE_WRITE32_MEMBER ( cx_chipcontrol_w ); - DECLARE_READ32_MEMBER ( cx_chipcontrol_r ); - - DECLARE_WRITE32_MEMBER ( cx_intctrl_w ); - DECLARE_READ32_MEMBER ( cx_intctrl_r ); - - DECLARE_WRITE32_MEMBER ( cx_ss_w ); - DECLARE_READ32_MEMBER ( cx_ss_r ); - - DECLARE_WRITE32_MEMBER ( cx_i2c0_w ); - DECLARE_READ32_MEMBER ( cx_i2c0_r ); - DECLARE_WRITE32_MEMBER ( cx_i2c1_w ); - DECLARE_READ32_MEMBER ( cx_i2c1_r ); - DECLARE_WRITE32_MEMBER ( cx_i2c2_w ); - DECLARE_READ32_MEMBER ( cx_i2c2_r ); - - DECLARE_WRITE32_MEMBER ( cx_mc_cfg_w ); - DECLARE_READ32_MEMBER ( cx_mc_cfg_r ); - - DECLARE_WRITE32_MEMBER ( cx_drm0_w ); - DECLARE_READ32_MEMBER ( cx_drm0_r ); - DECLARE_WRITE32_MEMBER ( cx_drm1_w ); - DECLARE_READ32_MEMBER ( cx_drm1_r ); - - DECLARE_WRITE32_MEMBER ( cx_hdmi_w ); - DECLARE_READ32_MEMBER ( cx_hdmi_r ); - - DECLARE_WRITE32_MEMBER ( cx_gxa_w ); - DECLARE_READ32_MEMBER ( cx_gxa_r ); - - DECLARE_READ32_MEMBER ( dummy_flash_r ); - - UINT32 m_romdescr_reg; - UINT32 m_isaromdescr_regs[0x0C/4]; - UINT32 m_isadescr_regs[0x10/4]; - UINT32 m_rommode_reg; - UINT32 m_xoemask_reg; - UINT32 m_pci_regs[0x08/4]; - UINT32 m_extdesc_regs[0x80/4]; - - UINT32 m_scratch_reg; - cx_timer_regs_t m_timer_regs; - - UINT32 m_uart2_regs[0x30/4]; - - UINT32 m_pll_regs[0x14/4]; - UINT32 m_clkdiv_regs[0x18/4]; - UINT32 m_pllprescale_reg; - - UINT32 m_intctrl_regs[0x38/4]; - - UINT32 m_ss_regs[0x18/4]; - UINT8 m_ss_tx_fifo[8]; // 8 entries (size hardcoded to 8 bits per entry - TODO) - - UINT32 m_i2c0_regs[0x20/4]; - UINT32 m_i2c1_regs[0x20/4]; - required_device m_i2cmem; - UINT32 m_i2c2_regs[0x20/4]; - - void i2cmem_start(); - void i2cmem_stop(); - UINT8 i2cmem_read_byte(int last); - void i2cmem_write_byte(UINT8 data); - - UINT32 m_mccfg_regs[0x0C/4]; - - UINT32 m_chipcontrol_regs[0x74/4]; - - UINT32 m_drm0_regs[0xfc/4]; - UINT32 m_drm1_regs[0xfc/4]; - - UINT32 m_hdmi_regs[0x400/4]; - - UINT32 m_gxa_cmd_regs[0x130/4]; - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_cxhumax(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(timer_tick); -}; - -#define INTDEST 0 // Interrupt destination (1=IRQ, 0=FIQ) -#define INTENABLE 1 // Enables the interrupt generation -#define INTIRQ 2 // Normal interrupt -#define INTFIQ 3 // Fast interrupt -#define INTSTATCLR 4 // Read: interrupt status, Write: clear pending interrupt -#define INTSTATSET 5 // Read: interrupt status, Write: sets a pending interrupt -#define INTGROUP1 0 -#define INTGROUP2 1 - -#define INTREG(group, index) (((group) << 3) | (index)) - -#define GXA_CMD_RW_REGISTER 0x00 -#define GXA_CMD_QMARK 0x02 -#define GXA_CMD_PALETTE_FETCH 0x03 -#define GXA_CMD_VFILTER_COEFF_FETCH 0x04 -#define GXA_CMD_HFILTER_COEFF_FETCH 0x05 -#define GXA_CMD_BLT_21 0x21 -#define GXA_CMD_BLT_23 0x23 -#define GXA_CMD_BLT_25 0x25 -#define GXA_CMD_BLT_27 0x27 -#define GXA_CMD_BLT_2B 0x2b -#define GXA_CMD_BLT_2F 0x2f -#define GXA_CMD_LINE_30 0x30 -#define GXA_CMD_LINE_32 0x32 -#define GXA_CMD_BLT_31 0x31 -#define GXA_CMD_BLT 0x33 -#define GXA_CMD_LINE_34 0x34 -#define GXA_CMD_LINE_36 0x36 -#define GXA_CMD_BLT_35 0x35 -#define GXA_CMD_BLT_37 0x37 -#define GXA_CMD_LINE_3A 0x3a -#define GXA_CMD_BLT_3B 0x3b -#define GXA_CMD_LINE_3E 0x3e -#define GXA_CMD_BLT_3F 0x3f -#define GXA_CMD_SBLT_ABLEND 0x71 -#define GXA_CMD_SBLT_ROP 0x7b - -#define GXA_CMD_REG 0x07 - -#define GXA_CFG2_REG 0x3f -#define IRQ_STAT_QMARK 21 -#define IRQ_EN_QMARK 17 - -#define INT_UART2_BIT (1<<1) -#define INT_TIMER_BIT (1<<7) -#define INT_PWM_BIT (1 << 14) -#define INT_PIO103_BIT (1 << 15) - -#define PCI_CFG_ADDR_REG 0 -#define PCI_CFG_DATA_REG 1 - -#define TIMER_VALUE 0 -#define TIMER_LIMIT 1 -#define TIMER_MODE 2 -#define TIMER_TIMEBASE 3 - -#define UART_FIFO_REG 0 -#define UART_IRQE_REG 1 -#define UART_IRQE_TIDE_BIT (1<<6) -#define UART_BRDL_REG 0 -#define UART_BRDU_REG 1 -#define UART_FIFC_REG 2 -#define UART_FRMC_REG 3 -#define UART_FRMC_BDS_BIT (1<<7) -#define UART_STAT_REG 5 -#define UART_STAT_TSR_BIT (1<<5) -#define UART_STAT_TID_BIT (1<<6) - -#define SREG_MPG_0_INTFRAC_REG 0 -#define SREG_MPG_1_INTFRAC_REG 1 -#define SREG_ARM_INTFRAC_REG 2 -#define SREG_MEM_INTFRAC_REG 3 -#define SREG_USB_INTFRAC_REG 4 - -#define SREG_DIV_0_REG 0 -#define SREG_DIV_1_REG 1 -#define SREG_DIV_2_REG 2 -#define SREG_DIV_3_REG 3 -#define SREG_DIV_4_REG 4 -#define SREG_DIV_5_REG 5 - -#define PIN_CONFIG_0_REG 0 // Pin Configuration 0 Register -#define SREG_MODE_REG 3 // SREG Mode Register -#define PIN_ALT_FUNC_REG 4 // Alternate Pin Function Select Register -#define PLL_LOCK_STAT_0_REG 9 // Resource Lock Register -#define PLL_IO_CTL_REG 20 // IO Control Register -#define SREG_TEST_REG 28 // Test Register - -#define I2C_MODE_REG 0 -#define I2C_CTRL_REG 1 -#define I2C_STAT_REG 2 -#define I2C_RDATA_REG 3 - -#define I2C_WACK_BIT (1<<1) -#define I2C_INT_BIT (1<<0) - -#define SS_CNTL_REG 0 -#define SS_FIFC_REG 1 -#define SS_BAUD_REG 2 -#define SS_FIFO_REG 4 -#define SS_STAT_REG 5 - -#define MC_CFG0 0 -#define MC_CFG1 1 -#define MC_CFG2 2 - -#define DRM_ACTIVE_X_REG 1 -#define DRM_ACTIVE_Y_REG 2 -#define DRM_BCKGND_REG 3 -#define DRM_OSD_PTR_REG 32 - -#endif /* CXHUMAX_H_ */ diff --git a/src/mess/includes/cybiko.h b/src/mess/includes/cybiko.h deleted file mode 100644 index 7bf4e0834de..00000000000 --- a/src/mess/includes/cybiko.h +++ /dev/null @@ -1,106 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Tim Schuerewegen -/***************************************************************************** - * - * includes/cybiko.h - * - * Cybiko Wireless Inter-tainment System - * - * (c) 2001-2007 Tim Schuerewegen - * - * Cybiko Classic (V1) - * Cybiko Classic (V2) - * Cybiko Xtreme - * - ****************************************************************************/ - -#ifndef CYBIKO_H_ -#define CYBIKO_H_ - -/* Core includes */ -#include "emu.h" -#include "emuopts.h" -#include "sound/speaker.h" - -/* Components */ -#include "cpu/h8/h8s2320.h" -#include "cpu/h8/h8s2245.h" -#include "video/hd66421.h" -#include "machine/pcf8593.h" -#include "machine/at45dbxx.h" -#include "machine/intelfsh.h" -#include "machine/ram.h" -#include "imagedev/snapquik.h" -#include "machine/nvram.h" - -struct CYBIKO_RS232_PINS -{ - int sck; // serial clock - int txd; // transmit data - int rxd; // receive data -}; - -struct CYBIKO_RS232 -{ - CYBIKO_RS232_PINS pin; - UINT8 rx_bits, rx_byte, tx_byte, tx_bits; -}; - -class cybiko_state : public driver_device -{ -public: - cybiko_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_crtc(*this, "hd66421"), - m_speaker(*this, "speaker"), - m_rtc(*this, "rtc"), - m_ram(*this, RAM_TAG), - m_flash1(*this, "flash1"), - m_nvram(*this, "nvram"), - m_input(*this, "A") - { } - - DECLARE_READ16_MEMBER(serflash_r); - DECLARE_WRITE16_MEMBER(serflash_w); - DECLARE_READ16_MEMBER(clock_r); - DECLARE_WRITE16_MEMBER(clock_w); - DECLARE_READ16_MEMBER(xtclock_r); - DECLARE_WRITE16_MEMBER(xtclock_w); - DECLARE_READ16_MEMBER(xtpower_r); - - CYBIKO_RS232 m_rs232; - DECLARE_READ16_MEMBER(cybiko_lcd_r); - DECLARE_WRITE16_MEMBER(cybiko_lcd_w); - DECLARE_READ16_MEMBER(cybikov1_key_r); - DECLARE_READ16_MEMBER(cybikov2_key_r); - DECLARE_READ16_MEMBER(cybikoxt_key_r); - DECLARE_WRITE16_MEMBER(cybiko_usb_w); - int cybiko_key_r( offs_t offset, int mem_mask); - void cybiko_rs232_write_byte(int data); - void cybiko_rs232_pin_sck(int data); - void cybiko_rs232_pin_txd(int data); - int cybiko_rs232_pin_rxd(); - int cybiko_rs232_rx_queue(); - void cybiko_rs232_init(); - void cybiko_rs232_exit(); - void cybiko_rs232_reset(); - - required_device m_maincpu; - required_device m_crtc; - required_device m_speaker; - required_device m_rtc; - required_device m_ram; - optional_device m_flash1; - required_device m_nvram; - optional_ioport_array<15> m_input; - DECLARE_DRIVER_INIT(cybikoxt); - DECLARE_DRIVER_INIT(cybiko); - virtual void machine_start(); - virtual void machine_reset(); - void machine_stop_cybiko(); - DECLARE_QUICKLOAD_LOAD_MEMBER( cybiko ); - DECLARE_QUICKLOAD_LOAD_MEMBER( cybikoxt ); -}; - -#endif /* CYBIKO_H_ */ diff --git a/src/mess/includes/dai.h b/src/mess/includes/dai.h deleted file mode 100644 index 2eb2d403979..00000000000 --- a/src/mess/includes/dai.h +++ /dev/null @@ -1,81 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha, Nathan Woods -/***************************************************************************** - * - * includes/dai.h - * - ****************************************************************************/ - -#ifndef DAI_H_ -#define DAI_H_ - -#include "cpu/i8085/i8085.h" -#include "audio/dai_snd.h" -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/tms5501.h" -#include "imagedev/cassette.h" -#include "sound/wave.h" - - -class dai_state : public driver_device -{ -public: - enum - { - TIMER_BOOTSTRAP, - TIMER_TMS5501 - }; - - dai_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pit(*this, "pit8253"), - m_tms5501(*this, "tms5501"), - m_sound(*this, "custom"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") { } - - required_device m_maincpu; - required_device m_pit; - required_device m_tms5501; - required_device m_sound; - required_device m_cassette; - required_device m_ram; - required_device m_palette; - - UINT8 m_paddle_select; - UINT8 m_paddle_enable; - UINT8 m_cassette_motor[2]; - UINT8 m_keyboard_scan_mask; - unsigned short m_4_colours_palette[4]; - DECLARE_WRITE8_MEMBER(dai_stack_interrupt_circuit_w); - DECLARE_READ8_MEMBER(dai_io_discrete_devices_r); - DECLARE_WRITE8_MEMBER(dai_io_discrete_devices_w); - DECLARE_READ8_MEMBER(dai_amd9511_r); - DECLARE_WRITE8_MEMBER(dai_amd9511_w); - DECLARE_READ8_MEMBER(dai_pit_r); - DECLARE_WRITE8_MEMBER(dai_pit_w); - DECLARE_READ8_MEMBER(dai_keyboard_r); - DECLARE_WRITE8_MEMBER(dai_keyboard_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(dai); - UINT32 screen_update_dai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void dai_update_memory(int dai_rom_bank); - IRQ_CALLBACK_MEMBER(int_ack); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -/*----------- defined in video/dai.c -----------*/ - -extern const unsigned char dai_palette[16*3]; - - -#endif /* DAI_H_ */ diff --git a/src/mess/includes/dccons.h b/src/mess/includes/dccons.h deleted file mode 100644 index 47b47d72f6c..00000000000 --- a/src/mess/includes/dccons.h +++ /dev/null @@ -1,48 +0,0 @@ -// license:LGPL-2.1+ -// copyright-holders:Angelo Salese, R. Belmont -#include "imagedev/chd_cd.h" -#include "machine/gdrom.h" -#include "machine/ataintf.h" -#include "machine/intelfsh.h" - -class dc_cons_state : public dc_state -{ -public: - dc_cons_state(const machine_config &mconfig, device_type type, const char *tag) - : dc_state(mconfig, type, tag), - m_ata(*this, "ata") -// m_dcflash(*this, "dcflash") - { } - - required_device m_ata; -// required_device m_dcflash; - - DECLARE_DRIVER_INIT(dc); - DECLARE_DRIVER_INIT(dcus); - DECLARE_DRIVER_INIT(dcjp); - - DECLARE_READ64_MEMBER(dcus_idle_skip_r); - DECLARE_READ64_MEMBER(dcjp_idle_skip_r); - - DECLARE_MACHINE_RESET(dc_console); - DECLARE_READ64_MEMBER(dc_pdtra_r); - DECLARE_WRITE64_MEMBER(dc_pdtra_w); - DECLARE_READ64_MEMBER(dc_arm_r); - DECLARE_WRITE64_MEMBER(dc_arm_w); - DECLARE_WRITE_LINE_MEMBER(aica_irq); - DECLARE_WRITE_LINE_MEMBER(sh4_aica_irq); - DECLARE_WRITE_LINE_MEMBER(ata_interrupt); - - TIMER_CALLBACK_MEMBER( atapi_xfer_end ); - - void dreamcast_atapi_init(); - DECLARE_READ32_MEMBER( dc_mess_g1_ctrl_r ); - DECLARE_WRITE32_MEMBER( dc_mess_g1_ctrl_w ); -// DECLARE_READ8_MEMBER( dc_flash_r ); -// DECLARE_WRITE8_MEMBER( dc_flash_w ); - -private: - UINT64 PDTRA, PCTRA; - emu_timer *atapi_timer; - int atapi_xferlen, atapi_xferbase; -}; diff --git a/src/mess/includes/dgn_beta.h b/src/mess/includes/dgn_beta.h deleted file mode 100644 index 3869f71fffc..00000000000 --- a/src/mess/includes/dgn_beta.h +++ /dev/null @@ -1,226 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/***************************************************************************** - * - * includes/dgn_beta.h - * - ****************************************************************************/ - -#ifndef DGN_BETA_H_ -#define DGN_BETA_H_ - -#include "video/mc6845.h" -#include "machine/wd_fdc.h" -#include "machine/6821pia.h" -#include "machine/ram.h" - -/* Tags */ - -#define MAINCPU_TAG "maincpu" -#define DMACPU_TAG "dmacpu" -#define PIA_0_TAG "pia_0" -#define PIA_1_TAG "pia_1" -#define PIA_2_TAG "pia_2" -#define FDC_TAG "wd2797" - - -#define DGNBETA_CPU_SPEED_HZ 2000000 /* 2MHz */ -#define DGNBETA_FRAMES_PER_SECOND 50 - -#define RamSize 256 /* 256K by default */ -#define RamPageSize 4096 /* ram pages are 4096 bytes */ - -#define MaxTasks 16 /* Tasks 0..15 */ -#define MaxPage 16 /* 16 4K pages */ -#define NoPagingTask MaxTasks /* Task registers to use when paging disabled 16 */ - -#define RAMPage 0 /* Page with RAM in at power on */ -#define VideoPage 6 /* Page where video ram mapped */ -#define IOPage MaxPage-1 /* Page for I/O */ -#define ROMPage MaxPage-2 /* Page for ROM */ -#define LastPage MaxPage-1 - -#define RAMPageValue 0x00 /* page with RAM at power on */ -#define VideoPageValue 0x1F /* Default page for video ram */ -#define NoMemPageValue 0xC0 /* Page guaranteed not to have memory in */ -#define ROMPageValue 0xFE /* Page with boot ROM */ -#define IOPageValue 0xFF /* Page with I/O & Boot ROM */ - -#define TextVidBasePage 0x18 /* Base page of text video ram */ - -/***** Keyboard stuff *****/ -#define NoKeyrows 0x0a /* Number of rows in keyboard */ - -/* From Dragon Beta OS9 keyboard driver */ -#define KAny 0x04 /* Any key pressed mask PB2 */ -#define KOutClk 0x08 /* Ouput shift register clock */ -#define KInClk 0x10 /* Input shift register clock */ -#define KOutDat KInClk /* Also used for data into output shifter */ -#define KInDat 0x20 /* Keyboard data in from keyboard (serial stream) */ - -/***** Video Modes *****/ - -enum BETA_VID_MODES -{ - TEXT_40x25, /* Text mode 40x25 */ - TEXT_80x25, /* Text mode 80x25 */ - GRAPH_320x256x4, /* Graphics 320x256x4 */ - GRAPH_320x256x16, /* Graphics 320x256x16 */ - GRAPH_640x512x2 /* Graphics 640X512X2 */ -}; - -#define iosize (0xfEFF-0xfc00) - -struct PageReg -{ - int value; /* Value of the page register */ - UINT8 *memory; /* The memory it actually points to */ -}; - - -class dgn_beta_state : public driver_device -{ -public: - dgn_beta_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_mc6845(*this, "crtc"), - m_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_fdc(*this, FDC_TAG), - m_floppy0(*this, FDC_TAG ":0"), - m_floppy1(*this, FDC_TAG ":1"), - m_floppy2(*this, FDC_TAG ":2"), - m_floppy3(*this, FDC_TAG ":3"), - m_palette(*this, "palette") { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device m_mc6845; - required_shared_ptr m_videoram; - - UINT8 *m_system_rom; - int m_LogDatWrites; - int m_Keyboard[NoKeyrows]; - int m_RowShifter; - int m_Keyrow; - int m_d_pia0_pb_last; - int m_d_pia0_cb2_last; - int m_KInDat_next; - int m_KAny_next; - int m_d_pia1_pa_last; - int m_d_pia1_pb_last; - int m_DMA_NMI_LAST; - int m_wd2797_written; - int m_TaskReg; - int m_PIATaskReg; - int m_EnableMapRegs; - PageReg m_PageRegs[MaxTasks+1][MaxPage+1]; - int m_beta_6845_RA; - int m_beta_scr_x; - int m_beta_scr_y; - int m_beta_HSync; - int m_beta_VSync; - int m_beta_DE; - int m_LogRegWrites; - int m_BoxColour; - int m_BoxMinX; - int m_BoxMinY; - int m_BoxMaxX; - int m_BoxMaxY; - int m_HSyncMin; - int m_VSyncMin; - int m_DEPos; - int m_NoScreen; - bitmap_ind16 *m_bit; - int m_MinAddr; - int m_MaxAddr; - int m_MinX; - int m_MaxX; - int m_MinY; - int m_MaxY; - int m_VidAddr; - int m_ClkMax; - int m_GCtrl; - int m_FlashCount; - int m_FlashBit; - int m_s_DoubleY; - int m_DoubleHL; - int m_ColourRAM[4]; - int m_Field; - int m_DrawInterlace; - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(dgn); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b0_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b1_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b2_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b3_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b4_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b5_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b6_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b7_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b8_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_b9_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bA_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bB_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bC_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bD_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bE_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bF_w); - DECLARE_WRITE8_MEMBER(dgnbeta_ram_bG_w); - DECLARE_READ8_MEMBER(d_pia0_pa_r); - DECLARE_WRITE8_MEMBER(d_pia0_pa_w); - DECLARE_READ8_MEMBER(d_pia0_pb_r); - DECLARE_WRITE8_MEMBER(d_pia0_pb_w); - DECLARE_WRITE_LINE_MEMBER(d_pia0_cb2_w); - DECLARE_WRITE_LINE_MEMBER(d_pia0_irq_a); - DECLARE_WRITE_LINE_MEMBER(d_pia0_irq_b); - DECLARE_READ8_MEMBER(d_pia1_pa_r); - DECLARE_WRITE8_MEMBER(d_pia1_pa_w); - DECLARE_READ8_MEMBER(d_pia1_pb_r); - DECLARE_WRITE8_MEMBER(d_pia1_pb_w); - DECLARE_WRITE_LINE_MEMBER(d_pia1_irq_a); - DECLARE_WRITE_LINE_MEMBER(d_pia1_irq_b); - DECLARE_READ8_MEMBER(d_pia2_pa_r); - DECLARE_WRITE8_MEMBER(d_pia2_pa_w); - DECLARE_READ8_MEMBER(d_pia2_pb_r); - DECLARE_WRITE8_MEMBER(d_pia2_pb_w); - DECLARE_WRITE_LINE_MEMBER(d_pia2_irq_a); - DECLARE_WRITE_LINE_MEMBER(d_pia2_irq_b); - DECLARE_WRITE_LINE_MEMBER(dgnbeta_fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(dgnbeta_fdc_drq_w); - DECLARE_WRITE_LINE_MEMBER(dgnbeta_vsync_changed); - /* 74HC670 4x4bit colour ram */ - DECLARE_WRITE8_MEMBER(dgnbeta_colour_ram_w); - // Page IO at FE00 - DECLARE_READ8_MEMBER(dgn_beta_page_r); - DECLARE_WRITE8_MEMBER(dgn_beta_page_w); - MC6845_UPDATE_ROW(crtc_update_row); - - /* WD2797 FDC */ - DECLARE_READ8_MEMBER(dgnbeta_wd2797_r); - DECLARE_WRITE8_MEMBER(dgnbeta_wd2797_w); - required_device m_maincpu; - void dgnbeta_vid_set_gctrl(int data); - void UpdateBanks(int first, int last); - void SetDefaultTask(); - void dgn_beta_bank_memory(int offset, int data, int bank); - int SelectedKeyrow(dgn_beta_state *state, int Rows); - int GetKeyRow(dgn_beta_state *state, int RowNo); - void cpu0_recalc_irq(int state); - void cpu0_recalc_firq(int state); - void cpu1_recalc_firq(int state); - void ScanInKeyboard(void); - void dgn_beta_frame_interrupt (int data); - void dgn_beta_line_interrupt (int data); - required_device m_ram; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_palette; -}; - -#endif /* DGN_BETA_H_ */ diff --git a/src/mess/includes/dgnalpha.h b/src/mess/includes/dgnalpha.h deleted file mode 100644 index 402de4f846f..00000000000 --- a/src/mess/includes/dgnalpha.h +++ /dev/null @@ -1,97 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - dgnalpha.h - - Dragon Alpha - -***************************************************************************/ - -#pragma once - -#ifndef __DGNALPHA__ -#define __DGNALPHA__ - - -#include "includes/dragon.h" -#include "sound/ay8910.h" -#include "machine/wd_fdc.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -/* devices */ -#define PIA2_TAG "pia2" -#define AY8912_TAG "ay8912" -#define WD2797_TAG "wd2797" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class dragon_alpha_state : public dragon64_state -{ -public: - dragon_alpha_state(const machine_config &mconfig, device_type type, const char *tag) - : dragon64_state(mconfig, type, tag), - m_pia_2(*this, PIA2_TAG), - m_ay8912(*this, AY8912_TAG), - m_fdc(*this, WD2797_TAG), - m_floppy0(*this, WD2797_TAG ":0"), - m_floppy1(*this, WD2797_TAG ":1"), - m_floppy2(*this, WD2797_TAG ":2"), - m_floppy3(*this, WD2797_TAG ":3") - { - } - - DECLARE_FLOPPY_FORMATS(dragon_formats); - - required_device m_pia_2; - required_device m_ay8912; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - - - /* pia2 */ - DECLARE_WRITE8_MEMBER( pia2_pa_w ); - DECLARE_WRITE_LINE_MEMBER( pia2_firq_a ); - DECLARE_WRITE_LINE_MEMBER( pia2_firq_b ); - - /* psg */ - DECLARE_READ8_MEMBER( psg_porta_read ); - DECLARE_WRITE8_MEMBER( psg_porta_write ); - - /* fdc */ - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - -protected: - /* driver overrides */ - virtual void device_start(void); - virtual void device_reset(void); - - /* interrupts */ - virtual bool firq_get_line(void); - - /* PIA1 */ - virtual DECLARE_READ8_MEMBER( ff20_read ); - virtual DECLARE_WRITE8_MEMBER( ff20_write ); - -private: - UINT8 m_just_reset; - - /* modem */ - UINT8 modem_r(offs_t offset); - void modem_w(offs_t offset, UINT8 data); -}; - -#endif /* __DGNALPHA__ */ diff --git a/src/mess/includes/dm7000.h b/src/mess/includes/dm7000.h deleted file mode 100644 index 241ba0d31b6..00000000000 --- a/src/mess/includes/dm7000.h +++ /dev/null @@ -1,94 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Lukasz Markowski -#ifndef DM7000_H_ -#define DM7000_H_ - -#include "emu.h" -#include "cpu/powerpc/ppc.h" -#include "machine/terminal.h" - -#define TERMINAL_TAG "terminal" - -class dm7000_state : public driver_device -{ -public: - dm7000_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_terminal(*this, TERMINAL_TAG) - { - } - - required_device m_maincpu; - required_device m_terminal; - - DECLARE_WRITE8_MEMBER ( dm7000_iic0_w ); - DECLARE_READ8_MEMBER ( dm7000_iic0_r ); - DECLARE_WRITE8_MEMBER ( dm7000_iic1_w ); - DECLARE_READ8_MEMBER ( dm7000_iic1_r ); - - DECLARE_WRITE8_MEMBER ( dm7000_scc0_w ); - DECLARE_READ8_MEMBER ( dm7000_scc0_r ); - DECLARE_WRITE8_MEMBER(kbd_put); - UINT8 m_scc0_lcr; - UINT8 m_scc0_lsr; - UINT8 m_term_data; - - - DECLARE_WRITE8_MEMBER ( dm7000_gpio0_w ); - DECLARE_READ8_MEMBER ( dm7000_gpio0_r ); - - DECLARE_WRITE8_MEMBER ( dm7000_scp0_w ); - DECLARE_READ8_MEMBER ( dm7000_scp0_r ); - - DECLARE_WRITE16_MEMBER ( dm7000_enet_w ); - DECLARE_READ16_MEMBER ( dm7000_enet_r ); - - DECLARE_READ32_MEMBER( dcr_r ); - DECLARE_WRITE32_MEMBER( dcr_w ); - - - UINT16 m_enet_regs[32]; - - UINT32 dcr[1024]; - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_dm7000(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); -}; - -/* */ -#define UART_DLL 0 -#define UART_RBR 0 -#define UART_THR 0 -#define UART_DLH 1 -#define UART_IER 1 -#define UART_IIR 2 -#define UART_FCR 2 -#define UART_LCR 3 -#define UART_LCR_DLAB 0x80 -#define UART_MCR 4 -#define UART_LSR 5 -#define UART_LSR_TEMT 0x20 -#define UART_LSR_THRE 0x40 -#define UART_MSR 6 -#define UART_SCR 7 - -/* */ -#define SCP_SPMODE 0 -#define SCP_RXDATA 1 -#define SCP_TXDATA 2 -#define SCP_SPCOM 3 -#define SCP_STATUS 4 -#define SCP_STATUS_RXRDY 1 -#define SCP_CDM 6 - -/* STB045xxx DCRs */ - -#define DCRSTB045_CICVCR 0x033 /* CIC Video Control Register */ -#define DCRSTB045_SCCR 0x120 /* Serial Clock Control Register */ -#define DCRSTB045_VIDEO_CNTL 0x140 /* Video Control Register */ -#define DCRSTB045_CMD_STAT 0x14a /* Command status */ -#define DCRSTB045_DISP_MODE 0x154 /* Display Mode Register */ -#define DCRSTB045_FRAME_BUFR_BASE 0x179 /* Frame Buffers Base Address Register */ - -#endif /* DM7000_H_ */ diff --git a/src/mess/includes/dragon.h b/src/mess/includes/dragon.h deleted file mode 100644 index 7006d37e68d..00000000000 --- a/src/mess/includes/dragon.h +++ /dev/null @@ -1,72 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods -/*************************************************************************** - - dragon.h - - Dragon Family - -***************************************************************************/ - -#pragma once - -#ifndef __DRAGON__ -#define __DRAGON__ - - -#include "includes/coco12.h" -#include "imagedev/printer.h" -#include "machine/mos6551.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define PRINTER_TAG "printer" -#define ACIA_TAG "acia" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class dragon_state : public coco12_state -{ -public: - dragon_state(const machine_config &mconfig, device_type type, const char *tag) - : coco12_state(mconfig, type, tag), - m_printer(*this, PRINTER_TAG) - { - } - - required_device m_printer; - -protected: - virtual void pia1_pa_changed(UINT8 data); -}; - - -/* dragon64 has an ACIA chip */ -class dragon64_state : public dragon_state -{ -public: - dragon64_state(const machine_config &mconfig, device_type type, const char *tag) - : dragon_state(mconfig, type, tag), - m_acia(*this, ACIA_TAG) - { - } - - required_device m_acia; - -protected: - virtual DECLARE_READ8_MEMBER( ff00_read ); - virtual DECLARE_WRITE8_MEMBER( ff00_write ); - - virtual void pia1_pb_changed(UINT8 data); - void page_rom(bool romswitch); -}; - -#endif /* __DRAGON__ */ diff --git a/src/mess/includes/ec184x.h b/src/mess/includes/ec184x.h deleted file mode 100644 index 7921bf5b97e..00000000000 --- a/src/mess/includes/ec184x.h +++ /dev/null @@ -1,43 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -/***************************************************************************** - * - * includes/ec184x.h - * - ****************************************************************************/ - -#ifndef EC184X_H_ -#define EC184X_H_ - -#include "includes/genpc.h" - -#define MCFG_EC1841_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, EC1841_MOTHERBOARD, 0) \ - ec1841_mb_device::static_set_cputag(*device, _cputag); - -// ======================> ibm5150_mb_device -class ec1841_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - -public: - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); -}; - - -// device type definition -extern const device_type EC1841_MOTHERBOARD; - -#endif /* EC184X_H_ */ diff --git a/src/mess/includes/einstein.h b/src/mess/includes/einstein.h deleted file mode 100644 index c027a36701e..00000000000 --- a/src/mess/includes/einstein.h +++ /dev/null @@ -1,221 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker, Dirk Best, Phill Harvey-Smith -/*************************************************************************** - - Tatung Einstein - -***************************************************************************/ - -#ifndef EINSTEIN_H_ -#define EINSTEIN_H_ - -#include "emu.h" -#include "video/mc6845.h" -#include "cpu/z80/z80daisy.h" -#include "machine/wd_fdc.h" -#include "machine/z80ctc.h" -#include "video/tms9928a.h" -#include "machine/ram.h" -#include "machine/i8251.h" -#include "bus/centronics/ctronics.h" - -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -/* xtals */ -#define XTAL_X001 XTAL_10_738635MHz -#define XTAL_X002 XTAL_8MHz - -/* integrated circuits */ -#define IC_I001 "i001" /* Z8400A */ -#define IC_I030 "i030" /* AY-3-8910 */ -#define IC_I038 "i038" /* TMM9129 */ -#define IC_I042 "i042" /* WD1770-PH */ -#define IC_I050 "i050" /* ADC0844CCN */ -#define IC_I058 "i058" /* Z8430A */ -#define IC_I060 "i060" /* uPD8251A */ -#define IC_I063 "i063" /* Z8420A */ - -/* interrupt sources */ -#define EINSTEIN_KEY_INT (1<<0) -#define EINSTEIN_ADC_INT (1<<1) -#define EINSTEIN_FIRE_INT (1<<2) - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -class einstein_state : public driver_device -{ -public: - einstein_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_fdc(*this, IC_I042), - m_color_screen(*this, "screen"), - m_ctc(*this, IC_I058), - m_tms9929a(*this, "tms9929a"), - m_region_gfx1(*this, "gfx1"), - m_mc6845(*this, "crtc"), - m_crtc_screen(*this, "80column"), - m_uart(*this, IC_I060), - m_ram(*this, RAM_TAG), - m_centronics(*this, "centronics"), - m_region_bios(*this, "bios"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_line0(*this, "LINE0"), - m_line1(*this, "LINE1"), - m_line2(*this, "LINE2"), - m_line3(*this, "LINE3"), - m_line4(*this, "LINE4"), - m_line5(*this, "LINE5"), - m_line6(*this, "LINE6"), - m_line7(*this, "LINE7"), - m_extra(*this, "EXTRA"), - m_buttons(*this, "BUTTONS"), - m_config(*this, "config"), - m_80column_dips(*this, "80column_dips"), - m_palette(*this, "palette") { } - - required_device m_fdc; - required_device m_color_screen; - required_device m_ctc; - required_device m_tms9929a; - optional_memory_region m_region_gfx1; - - int m_rom_enabled; - int m_interrupt; - int m_interrupt_mask; - int m_ctc_trigger; - - /* keyboard */ - UINT8 m_keyboard_line; - UINT8 m_keyboard_data; - - /* 80 column device */ - optional_device m_mc6845; - optional_device m_crtc_screen; - UINT8 *m_crtc_ram; - UINT8 m_de; - - int m_centronics_busy; - int m_centronics_perror; - int m_centronics_fault; - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - DECLARE_WRITE8_MEMBER(einstein_80col_ram_w); - DECLARE_READ8_MEMBER(einstein_80col_ram_r); - DECLARE_READ8_MEMBER(einstein_80col_state_r); - DECLARE_WRITE8_MEMBER(einstein_keyboard_line_write); - DECLARE_READ8_MEMBER(einstein_keyboard_data_read); - DECLARE_WRITE8_MEMBER(einstein_rom_w); - DECLARE_READ8_MEMBER(einstein_kybintmsk_r); - DECLARE_WRITE8_MEMBER(einstein_kybintmsk_w); - DECLARE_WRITE8_MEMBER(einstein_adcintmsk_w); - DECLARE_WRITE8_MEMBER(einstein_fire_int_w); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_MACHINE_START(einstein2); - DECLARE_MACHINE_RESET(einstein2); - UINT32 screen_update_einstein2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(einstein_keyboard_timer_callback); - TIMER_DEVICE_CALLBACK_MEMBER(einstein_ctc_trigger_callback); - DECLARE_WRITE_LINE_MEMBER(einstein_6845_de_changed); - DECLARE_WRITE8_MEMBER(einstein_drsel_w); - DECLARE_WRITE_LINE_MEMBER(einstein_serial_transmit_clock); - DECLARE_WRITE_LINE_MEMBER(einstein_serial_receive_clock); - MC6845_UPDATE_ROW(crtc_update_row); - -protected: - required_device m_uart; - required_device m_ram; - required_device m_centronics; - required_memory_region m_region_bios; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_ioport m_line0; - required_ioport m_line1; - required_ioport m_line2; - required_ioport m_line3; - required_ioport m_line4; - required_ioport m_line5; - required_ioport m_line6; - required_ioport m_line7; - required_ioport m_extra; - required_ioport m_buttons; - required_ioport m_config; - optional_ioport m_80column_dips; -public: - optional_device m_palette; - - void einstein_scan_keyboard(); - void einstein_page_rom(); -}; - - -// ======================> einstein_keyboard_daisy_device - -class einstein_keyboard_daisy_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - einstein_keyboard_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); -}; - -extern const device_type EINSTEIN_KEYBOARD_DAISY; - - -// ======================> einstein_adc_daisy_device - -class einstein_adc_daisy_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - einstein_adc_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); - -}; - -extern const device_type EINSTEIN_ADC_DAISY; - -// ======================> einstein_fire_daisy_device - -class einstein_fire_daisy_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - einstein_fire_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); -}; - -extern const device_type EINSTEIN_FIRE_DAISY; - -#endif /* EINSTEIN_H_ */ diff --git a/src/mess/includes/electron.h b/src/mess/includes/electron.h deleted file mode 100644 index d9623923f17..00000000000 --- a/src/mess/includes/electron.h +++ /dev/null @@ -1,117 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/electron.h - * - * Acorn Electron - * - * Driver by Wilbert Pol - * - ****************************************************************************/ - -#ifndef ELECTRON_H_ -#define ELECTRON_H_ - -#include "imagedev/cassette.h" -#include "sound/beep.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -/* Interrupts */ -#define INT_HIGH_TONE 0x40 -#define INT_TRANSMIT_EMPTY 0x20 -#define INT_RECEIVE_FULL 0x10 -#define INT_RTC 0x08 -#define INT_DISPLAY_END 0x04 -#define INT_SET 0x100 -#define INT_CLEAR 0x200 - -/* ULA context */ - -struct ULA -{ - UINT8 interrupt_status; - UINT8 interrupt_control; - UINT8 rompage; - UINT16 screen_start; - UINT16 screen_base; - int screen_size; - UINT16 screen_addr; - UINT8 *vram; - int current_pal[16]; - int communication_mode; - int screen_mode; - int cassette_motor_mode; - int capslock_mode; -// int scanline; - /* tape reading related */ - UINT32 tape_value; - int tape_steps; - int bit_count; - int high_tone_set; - int start_bit; - int stop_bit; - int tape_running; - UINT8 tape_byte; -}; - - -class electron_state : public driver_device -{ -public: - enum - { - TIMER_TAPE_HANDLER, - TIMER_SETUP_BEEP, - TIMER_SCANLINE_INTERRUPT - }; - - electron_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_beeper(*this, "beeper"), - m_cart(*this, "cartslot"), - m_keybd(*this, "LINE") - { } - - ULA m_ula; - emu_timer *m_tape_timer; - int m_map4[256]; - int m_map16[256]; - emu_timer *m_scanline_timer; - DECLARE_READ8_MEMBER(electron_read_keyboard); - DECLARE_READ8_MEMBER(electron_jim_r); - DECLARE_WRITE8_MEMBER(electron_jim_w); - DECLARE_READ8_MEMBER(electron_1mhz_r); - DECLARE_WRITE8_MEMBER(electron_1mhz_w); - DECLARE_READ8_MEMBER(electron_ula_r); - DECLARE_WRITE8_MEMBER(electron_ula_w); - void electron_tape_start(); - void electron_tape_stop(); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(electron); - UINT32 screen_update_electron(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(electron_tape_timer_handler); - TIMER_CALLBACK_MEMBER(setup_beep); - TIMER_CALLBACK_MEMBER(electron_scanline_interrupt); - required_device m_maincpu; - required_device m_cassette; - required_device m_beeper; - required_device m_cart; - required_ioport_array<14> m_keybd; - inline UINT8 read_vram( UINT16 addr ); - inline void electron_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void electron_interrupt_handler(int mode, int interrupt); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( electron_cart ); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -#endif /* ELECTRON_H_ */ diff --git a/src/mess/includes/elf.h b/src/mess/includes/elf.h deleted file mode 100644 index d3dbc3d685e..00000000000 --- a/src/mess/includes/elf.h +++ /dev/null @@ -1,70 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __INCLUDES_ELF__ -#define __INCLUDES_ELF__ - - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "machine/mm74c922.h" -#include "video/cdp1861.h" -#include "video/dm9368.h" -#include "machine/rescap.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "a6" -#define CDP1861_TAG "a14" -#define MM74C923_TAG "a10" -#define DM9368_L_TAG "a12" -#define DM9368_H_TAG "a8" - -class elf2_state : public driver_device -{ -public: - elf2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_vdc(*this, CDP1861_TAG), - m_kb(*this, MM74C923_TAG), - m_led_l(*this, DM9368_L_TAG), - m_led_h(*this, DM9368_H_TAG), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_special(*this, "SPECIAL") - { } - - required_device m_maincpu; - required_device m_vdc; - required_device m_kb; - required_device m_led_l; - required_device m_led_h; - required_device m_cassette; - required_device m_ram; - required_ioport m_special; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( dispon_r ); - DECLARE_READ8_MEMBER( data_r ); - DECLARE_WRITE8_MEMBER( data_w ); - DECLARE_WRITE8_MEMBER( memory_w ); - DECLARE_READ_LINE_MEMBER( wait_r ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef4_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_READ8_MEMBER( dma_r ); - DECLARE_WRITE8_MEMBER( sc_w ); - DECLARE_WRITE_LINE_MEMBER( da_w ); - DECLARE_INPUT_CHANGED_MEMBER( input_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( elf ); - // display state - UINT8 m_data; -}; - -#endif diff --git a/src/mess/includes/ep64.h b/src/mess/includes/ep64.h deleted file mode 100644 index 42dd9115e35..00000000000 --- a/src/mess/includes/ep64.h +++ /dev/null @@ -1,98 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Enterprise Sixty Four / One Two Eight emulation - -**********************************************************************/ - -#pragma once - -#ifndef __EP64__ -#define __EP64__ - -#include "audio/dave.h" -#include "bus/rs232/rs232.h" -#include "bus/ep64/exp.h" -#include "cpu/z80/z80.h" -#include "imagedev/cassette.h" -#include "bus/centronics/ctronics.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "machine/ram.h" -#include "video/nick.h" - -#define Z80_TAG "u1" -#define DAVE_TAG "u3" -#define NICK_TAG "u4" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" -#define CASSETTE1_TAG "cassette1" -#define CASSETTE2_TAG "cassette2" -#define SCREEN_TAG "screen" - -class ep64_state : public driver_device -{ -public: - ep64_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_dave(*this, DAVE_TAG), - m_nick(*this, NICK_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_rs232(*this, RS232_TAG), - m_cassette1(*this, CASSETTE1_TAG), - m_cassette2(*this, CASSETTE2_TAG), - m_cart(*this, "cartslot"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9") - { } - - required_device m_maincpu; - required_device m_dave; - required_device m_nick; - required_device m_centronics; - required_device m_rs232; - required_device m_cassette1; - required_device m_cassette2; - required_device m_cart; - required_device m_ram; - required_memory_region m_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( rd0_r ); - DECLARE_WRITE8_MEMBER( wr0_w ); - DECLARE_READ8_MEMBER( rd1_r ); - DECLARE_WRITE8_MEMBER( wr1_w ); - DECLARE_READ8_MEMBER( rd2_r ); - DECLARE_WRITE8_MEMBER( wr2_w ); - - UINT8 m_key; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - int m_centronics_busy; -}; - -#endif diff --git a/src/mess/includes/eti660.h b/src/mess/includes/eti660.h deleted file mode 100644 index 6298475d66a..00000000000 --- a/src/mess/includes/eti660.h +++ /dev/null @@ -1,75 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __ETI660__ -#define __ETI660__ - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/6821pia.h" -#include "machine/rescap.h" -#include "sound/cdp1864.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "ic3" -#define CDP1864_TAG "ic4" -#define MC6821_TAG "ic5" - -enum -{ - LED_POWER = 0, - LED_PULSE -}; - -class eti660_state : public driver_device -{ -public: - eti660_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_cti(*this, CDP1864_TAG), - m_pia(*this, MC6821_TAG), - m_cassette(*this, "cassette"), - m_pa0(*this, "PA0"), - m_pa1(*this, "PA1"), - m_pa2(*this, "PA2"), - m_pa3(*this, "PA3"), - m_special(*this, "SPECIAL") - { } - - required_device m_maincpu; - required_device m_cti; - required_device m_pia; - required_device m_cassette; - required_ioport m_pa0; - required_ioport m_pa1; - required_ioport m_pa2; - required_ioport m_pa3; - required_ioport m_special; - - DECLARE_READ8_MEMBER( pia_r ); - DECLARE_WRITE8_MEMBER( pia_w ); - DECLARE_WRITE8_MEMBER( colorram_w ); - DECLARE_READ_LINE_MEMBER( rdata_r ); - DECLARE_READ_LINE_MEMBER( bdata_r ); - DECLARE_READ_LINE_MEMBER( gdata_r ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef4_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( dma_w ); - DECLARE_READ8_MEMBER( pia_pa_r ); - DECLARE_WRITE8_MEMBER( pia_pa_w ); - - /* keyboard state */ - UINT8 m_keylatch; - - /* video state */ - UINT8 m_color_ram[0x100]; - UINT8 m_color; -}; - -#endif diff --git a/src/mess/includes/exp85.h b/src/mess/includes/exp85.h deleted file mode 100644 index b5a57422d2e..00000000000 --- a/src/mess/includes/exp85.h +++ /dev/null @@ -1,48 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __EXP85__ -#define __EXP85__ - -#include "bus/rs232/rs232.h" -#include "imagedev/cassette.h" -#include "sound/speaker.h" - -#define SCREEN_TAG "screen" -#define I8085A_TAG "u100" -#define I8155_TAG "u106" -#define I8355_TAG "u105" - -class exp85_state : public driver_device -{ -public: - exp85_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8085A_TAG), - m_rs232(*this, "rs232"), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_rom(*this, I8085A_TAG), - m_tape_control(0) - { } - - required_device m_maincpu; - required_device m_rs232; - required_device m_cassette; - required_device m_speaker; - required_memory_region m_rom; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( i8355_a_r ); - DECLARE_WRITE8_MEMBER( i8355_a_w ); - DECLARE_READ_LINE_MEMBER( sid_r ); - DECLARE_WRITE_LINE_MEMBER( sod_w ); - DECLARE_WRITE_LINE_MEMBER( terminal_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 ); - - /* cassette state */ - int m_tape_control; -}; - -#endif diff --git a/src/mess/includes/fidelz80.h b/src/mess/includes/fidelz80.h deleted file mode 100644 index 64f47809e4c..00000000000 --- a/src/mess/includes/fidelz80.h +++ /dev/null @@ -1,79 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco -/*************************************************************************** - - fidelz80.h - -****************************************************************************/ - -#pragma once - -#ifndef _FIDELZ80_H_ -#define _FIDELZ80_H_ - -#include "sound/beep.h" -#include "sound/s14001a.h" - -class fidelz80_state : public driver_device -{ -public: - fidelz80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speech(*this, "speech"), - m_beep(*this, "beeper"), - m_i8041(*this, "mcu"), - m_i8243(*this, "i8243") - { } - - required_device m_maincpu; - optional_device m_speech; - optional_device m_beep; - optional_device m_i8041; - optional_device m_i8243; - - UINT16 m_kp_matrix; // keypad/leds matrix - UINT8 m_led_data; // data for the two individual leds, in 0bxxxx12xx format - UINT8 m_led_selected; // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc - UINT16 m_digit_data; // data for seg leds - UINT8 m_digit_line_status[4]; // prevent overwrite of m_digit_data - - virtual void machine_reset(); - - //model VCC/UVC - void update_display(); - DECLARE_READ8_MEMBER( fidelz80_portc_r ); - DECLARE_WRITE8_MEMBER( fidelz80_portb_w ); - DECLARE_WRITE8_MEMBER( fidelz80_portc_w ); - DECLARE_WRITE8_MEMBER( cc10_porta_w ); - DECLARE_READ8_MEMBER( vcc_portb_r ); - DECLARE_WRITE8_MEMBER( vcc_porta_w ); - - //model 7014 and VBC - DECLARE_WRITE8_MEMBER(bridgec_speech_w ); - DECLARE_WRITE8_MEMBER(kp_matrix_w); - DECLARE_READ8_MEMBER(unknown_r); - DECLARE_READ8_MEMBER(unknown2_r); - DECLARE_READ8_MEMBER(exp_i8243_p2_r); - DECLARE_WRITE8_MEMBER(exp_i8243_p2_w); - DECLARE_WRITE8_MEMBER(mcu_data_w); - DECLARE_WRITE8_MEMBER(mcu_command_w); - DECLARE_READ8_MEMBER(mcu_data_r); - DECLARE_READ8_MEMBER(mcu_status_r); - DECLARE_INPUT_CHANGED_MEMBER(bridgec_trigger_reset); - - //model VSC - DECLARE_WRITE8_MEMBER(vsc_porta_w); - DECLARE_WRITE8_MEMBER(vsc_portb_w); - DECLARE_WRITE8_MEMBER(vsc_portc_w); - DECLARE_READ8_MEMBER(vsc_pio_porta_r); - DECLARE_READ8_MEMBER(vsc_pio_portb_r); - DECLARE_WRITE8_MEMBER(vsc_pio_portb_w); - DECLARE_INPUT_CHANGED_MEMBER(fidelz80_trigger_reset); - TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); - - DECLARE_WRITE8_MEMBER(digit_w); -}; - - -#endif // _FIDELZ80_H_ diff --git a/src/mess/includes/fm7.h b/src/mess/includes/fm7.h deleted file mode 100644 index 797d19657f0..00000000000 --- a/src/mess/includes/fm7.h +++ /dev/null @@ -1,390 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Barry Rodewald -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "imagedev/cassette.h" -#include "sound/beep.h" -#include "sound/2203intf.h" -#include "machine/wd_fdc.h" -#include "machine/bankdev.h" - -/* - * - * FM-7 header file - * - */ - -#ifndef FM7_H_ -#define FM7_H_ - -// Interrupt flags -#define IRQ_FLAG_KEY 0x01 -#define IRQ_FLAG_PRINTER 0x02 -#define IRQ_FLAG_TIMER 0x04 -#define IRQ_FLAG_OTHER 0x08 -// the following are not read in port 0xfd03 -#define IRQ_FLAG_MFD 0x10 -#define IRQ_FLAG_TXRDY 0x20 -#define IRQ_FLAG_RXRDY 0x40 -#define IRQ_FLAG_SYNDET 0x80 - -// system types -#define SYS_FM7 1 -#define SYS_FM77AV 2 -#define SYS_FM77AV40EX 3 -#define SYS_FM11 4 -#define SYS_FM16 5 - -// keyboard scancode formats -#define KEY_MODE_FM7 0 // FM-7 ASCII type code -#define KEY_MODE_FM16B 1 // FM-16B (FM-77AV and later only) -#define KEY_MODE_SCAN 2 // Scancode Make/Break (PC-like) - -struct fm7_encoder_t -{ - UINT8 buffer[12]; - UINT8 tx_count; - UINT8 rx_count; - UINT8 command_length; - UINT8 answer_length; - UINT8 latch; // 0=ready to receive - UINT8 ack; - UINT8 position; -}; - -struct fm7_mmr_t -{ - UINT8 bank_addr[8][16]; - UINT8 segment; - UINT8 window_offset; - UINT8 enabled; - UINT8 mode; -}; - -struct fm7_video_t -{ - UINT8 sub_busy; - UINT8 sub_halt; - UINT8 sub_reset; // high if reset caused by subrom change - UINT8 attn_irq; - UINT8 vram_access; // VRAM access flag - UINT8 crt_enable; - UINT16 vram_offset; - UINT16 vram_offset2; - UINT8 fm7_pal[8]; - UINT16 fm77av_pal_selected; - UINT8 subrom; // currently active sub CPU ROM (AV only) - UINT8 cgrom; // currently active CGROM (AV only) - UINT8 modestatus; - UINT8 multi_page; - UINT8 fine_offset; - UINT8 nmi_mask; - UINT8 active_video_page; - UINT8 display_video_page; - UINT8 vsync_flag; -}; - -struct fm7_alu_t -{ - UINT8 command; - UINT8 lcolour; - UINT8 mask; - UINT8 compare_data; - UINT8 compare[8]; - UINT8 bank_disable; - UINT8 tilepaint_b; - UINT8 tilepaint_r; - UINT8 tilepaint_g; - UINT16 addr_offset; - UINT16 line_style; - UINT16 x0; - UINT16 x1; - UINT16 y0; - UINT16 y1; - UINT8 busy; -}; - - -class fm7_state : public driver_device -{ -public: - enum - { - TIMER_FM7_BEEPER_OFF, - TIMER_FM77AV_ENCODER_ACK, - TIMER_FM7_IRQ, - TIMER_FM7_SUBTIMER_IRQ, - TIMER_FM7_KEYBOARD_POLL, - TIMER_FM77AV_ALU_TASK_END, - TIMER_FM77AV_VSYNC - }; - - fm7_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_shared_ram(*this, "shared_ram"), - m_boot_ram(*this, "boot_ram"), - m_maincpu(*this, "maincpu"), - m_sub(*this, "sub"), - m_x86(*this, "x86"), - m_cassette(*this, "cassette"), - m_beeper(*this, "beeper"), - m_ym(*this, "ym"), - m_psg(*this, "psg"), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy(NULL), - m_kanji(*this, "kanji1"), - m_key1(*this, "key1"), - m_key2(*this, "key2"), - m_key3(*this, "key3"), - m_keymod(*this, "key_modifiers"), - m_joy1(*this, "joy1"), - m_joy2(*this, "joy2"), - m_dsw(*this, "DSW"), - m_palette(*this, "palette"), - m_av_palette(*this, "av_palette"), - m_avbank1(*this, "av_bank1"), - m_avbank2(*this, "av_bank2"), - m_avbank3(*this, "av_bank3"), - m_avbank4(*this, "av_bank4"), - m_avbank5(*this, "av_bank5"), - m_avbank6(*this, "av_bank6"), - m_avbank7(*this, "av_bank7"), - m_avbank8(*this, "av_bank8"), - m_avbank9(*this, "av_bank9"), - m_avbank10(*this, "av_bank10"), - m_avbank11(*this, "av_bank11"), - m_avbank12(*this, "av_bank12"), - m_avbank13(*this, "av_bank13"), - m_avbank14(*this, "av_bank14"), - m_avbank15(*this, "av_bank15"), - m_avbank16(*this, "av_bank16") - { - } - - optional_shared_ptr m_shared_ram; - optional_shared_ptr m_boot_ram; - - UINT8 m_irq_flags; - UINT8 m_irq_mask; - emu_timer* m_timer; - emu_timer* m_subtimer; - emu_timer* m_keyboard_timer; - UINT8 m_basic_rom_en; - UINT8 m_init_rom_en; - unsigned int m_key_delay; - unsigned int m_key_repeat; - UINT16 m_current_scancode; - UINT32 m_key_data[4]; - UINT32 m_mod_data; - UINT8 m_key_scan_mode; - UINT8 m_break_flag; - UINT8 m_psg_regsel; - UINT8 m_psg_data; - UINT8 m_fdc_side; - UINT8 m_fdc_drive; - UINT8 m_fdc_irq_flag; - UINT8 m_fdc_drq_flag; - UINT8 m_fm77av_ym_irq; - UINT8 m_speaker_active; - UINT16 m_kanji_address; - fm7_encoder_t m_encoder; - fm7_mmr_t m_mmr; - UINT8 m_cp_prev; - UINT8* m_video_ram; - emu_timer* m_fm77av_vsync_timer; - UINT8 m_type; - fm7_video_t m_video; - fm7_alu_t m_alu; - int m_sb_prev; - DECLARE_READ8_MEMBER(fm7_subintf_r); - DECLARE_WRITE8_MEMBER(fm7_subintf_w); - DECLARE_READ8_MEMBER(fm7_sub_busyflag_r); - DECLARE_WRITE8_MEMBER(fm7_sub_busyflag_w); - DECLARE_READ8_MEMBER(fm7_cancel_ack); - DECLARE_READ8_MEMBER(fm7_attn_irq_r); - DECLARE_READ8_MEMBER(fm7_vram_access_r); - DECLARE_WRITE8_MEMBER(fm7_vram_access_w); - DECLARE_READ8_MEMBER(fm7_vram_r); - DECLARE_WRITE8_MEMBER(fm7_vram_w); - DECLARE_WRITE8_MEMBER(fm7_vram_banked_w); - DECLARE_READ8_MEMBER(fm7_vram0_r); - DECLARE_READ8_MEMBER(fm7_vram1_r); - DECLARE_READ8_MEMBER(fm7_vram2_r); - DECLARE_READ8_MEMBER(fm7_vram3_r); - DECLARE_READ8_MEMBER(fm7_vram4_r); - DECLARE_READ8_MEMBER(fm7_vram5_r); - DECLARE_READ8_MEMBER(fm7_vram6_r); - DECLARE_READ8_MEMBER(fm7_vram7_r); - DECLARE_READ8_MEMBER(fm7_vram8_r); - DECLARE_READ8_MEMBER(fm7_vram9_r); - DECLARE_READ8_MEMBER(fm7_vramA_r); - DECLARE_READ8_MEMBER(fm7_vramB_r); - DECLARE_WRITE8_MEMBER(fm7_vram0_w); - DECLARE_WRITE8_MEMBER(fm7_vram1_w); - DECLARE_WRITE8_MEMBER(fm7_vram2_w); - DECLARE_WRITE8_MEMBER(fm7_vram3_w); - DECLARE_WRITE8_MEMBER(fm7_vram4_w); - DECLARE_WRITE8_MEMBER(fm7_vram5_w); - DECLARE_WRITE8_MEMBER(fm7_vram6_w); - DECLARE_WRITE8_MEMBER(fm7_vram7_w); - DECLARE_WRITE8_MEMBER(fm7_vram8_w); - DECLARE_WRITE8_MEMBER(fm7_vram9_w); - DECLARE_WRITE8_MEMBER(fm7_vramA_w); - DECLARE_WRITE8_MEMBER(fm7_vramB_w); - DECLARE_READ8_MEMBER(fm7_crt_r); - DECLARE_WRITE8_MEMBER(fm7_crt_w); - DECLARE_WRITE8_MEMBER(fm7_vram_offset_w); - DECLARE_WRITE8_MEMBER(fm7_multipage_w); - DECLARE_READ8_MEMBER(fm7_palette_r); - DECLARE_WRITE8_MEMBER(fm7_palette_w); - DECLARE_WRITE8_MEMBER(fm77av_analog_palette_w); - DECLARE_READ8_MEMBER(fm77av_video_flags_r); - DECLARE_WRITE8_MEMBER(fm77av_video_flags_w); - DECLARE_READ8_MEMBER(fm77av_sub_modestatus_r); - DECLARE_WRITE8_MEMBER(fm77av_sub_modestatus_w); - DECLARE_WRITE8_MEMBER(fm77av_sub_bank_w); - DECLARE_READ8_MEMBER(fm77av_alu_r); - DECLARE_WRITE8_MEMBER(fm77av_alu_w); - DECLARE_READ8_MEMBER(fm7_sub_ram_ports_banked_r); - DECLARE_WRITE8_MEMBER(fm7_sub_ram_ports_banked_w); - DECLARE_READ8_MEMBER(fm7_console_ram_banked_r); - DECLARE_WRITE8_MEMBER(fm7_console_ram_banked_w); - DECLARE_WRITE8_MEMBER(fm7_irq_mask_w); - DECLARE_READ8_MEMBER(fm7_irq_cause_r); - DECLARE_WRITE8_MEMBER(fm7_beeper_w); - DECLARE_READ8_MEMBER(fm7_sub_beeper_r); - DECLARE_READ8_MEMBER(vector_r); - DECLARE_WRITE8_MEMBER(vector_w); - DECLARE_READ8_MEMBER(fm7_fd04_r); - DECLARE_READ8_MEMBER(fm7_rom_en_r); - DECLARE_WRITE8_MEMBER(fm7_rom_en_w); - DECLARE_WRITE8_MEMBER(fm7_init_en_w); - DECLARE_READ8_MEMBER(fm7_fdc_r); - DECLARE_WRITE8_MEMBER(fm7_fdc_w); - DECLARE_READ8_MEMBER(fm7_keyboard_r); - DECLARE_READ8_MEMBER(fm7_sub_keyboard_r); - DECLARE_READ8_MEMBER(fm77av_key_encoder_r); - DECLARE_WRITE8_MEMBER(fm77av_key_encoder_w); - DECLARE_READ8_MEMBER(fm7_cassette_printer_r); - DECLARE_WRITE8_MEMBER(fm7_cassette_printer_w); - DECLARE_READ8_MEMBER(fm77av_boot_mode_r); - DECLARE_READ8_MEMBER(fm7_psg_select_r); - DECLARE_WRITE8_MEMBER(fm7_psg_select_w); - DECLARE_WRITE8_MEMBER(fm77av_ym_select_w); - DECLARE_READ8_MEMBER(fm7_psg_data_r); - DECLARE_WRITE8_MEMBER(fm7_psg_data_w); - DECLARE_WRITE8_MEMBER(fm77av_bootram_w); - DECLARE_READ8_MEMBER(fm7_main_shared_r); - DECLARE_WRITE8_MEMBER(fm7_main_shared_w); - DECLARE_READ8_MEMBER(fm7_fmirq_r); - DECLARE_READ8_MEMBER(fm7_unknown_r); - DECLARE_READ8_MEMBER(fm7_mmr_r); - DECLARE_WRITE8_MEMBER(fm7_mmr_w); - DECLARE_READ8_MEMBER(fm7_kanji_r); - DECLARE_WRITE8_MEMBER(fm7_kanji_w); - void fm77av_encoder_setup_command(); - void fm77av_encoder_handle_command(); - DECLARE_DRIVER_INIT(fm7); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_MACHINE_START(fm7); - DECLARE_MACHINE_START(fm77av); - DECLARE_MACHINE_START(fm11); - DECLARE_MACHINE_START(fm16); - UINT32 screen_update_fm7(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(fm7_beeper_off); - TIMER_CALLBACK_MEMBER(fm77av_encoder_ack); - TIMER_CALLBACK_MEMBER(fm7_timer_irq); - TIMER_CALLBACK_MEMBER(fm7_subtimer_irq); - TIMER_CALLBACK_MEMBER(fm7_keyboard_poll); - TIMER_CALLBACK_MEMBER(fm77av_alu_task_end); - TIMER_CALLBACK_MEMBER(fm77av_vsync); - DECLARE_WRITE_LINE_MEMBER(fm7_fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(fm7_fdc_drq_w); - DECLARE_READ8_MEMBER(fm77av_joy_1_r); - DECLARE_READ8_MEMBER(fm77av_joy_2_r); - IRQ_CALLBACK_MEMBER(fm7_irq_ack); - IRQ_CALLBACK_MEMBER(fm7_sub_irq_ack); - DECLARE_WRITE_LINE_MEMBER(fm77av_fmirq); - required_device m_maincpu; - required_device m_sub; - optional_device m_x86; - required_device m_cassette; - required_device m_beeper; - optional_device m_ym; - optional_device m_psg; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - - floppy_image_device *m_floppy; - - void fm7_alu_mask_write(UINT32 offset, int bank, UINT8 dat); - void fm7_alu_function_compare(UINT32 offset); - void fm7_alu_function_pset(UINT32 offset); - void fm7_alu_function_or(UINT32 offset); - void fm7_alu_function_and(UINT32 offset); - void fm7_alu_function_xor(UINT32 offset); - void fm7_alu_function_not(UINT32 offset); - void fm7_alu_function_invalid(UINT32 offset); - void fm7_alu_function_tilepaint(UINT32 offset); - void fm7_alu_function(UINT32 offset); - UINT32 fm7_line_set_pixel(int x, int y); - void fm77av_line_draw(); - void main_irq_set_flag(UINT8 flag); - void main_irq_clear_flag(UINT8 flag); - void fm7_update_psg(); - void fm7_update_bank(address_space & space, int bank, UINT8 physical); - void fm7_mmr_refresh(address_space& space); - void key_press(UINT16 scancode); - void fm7_keyboard_poll_scan(); - - int m_centronics_busy; - int m_centronics_fault; - int m_centronics_ack; - int m_centronics_perror; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - - optional_memory_region m_kanji; - required_ioport m_key1; - required_ioport m_key2; - required_ioport m_key3; - required_ioport m_keymod; - required_ioport m_joy1; - required_ioport m_joy2; - required_ioport m_dsw; - required_device m_palette; - optional_device m_av_palette; - - optional_device m_avbank1; - optional_device m_avbank2; - optional_device m_avbank3; - optional_device m_avbank4; - optional_device m_avbank5; - optional_device m_avbank6; - optional_device m_avbank7; - optional_device m_avbank8; - optional_device m_avbank9; - optional_device m_avbank10; - optional_device m_avbank11; - optional_device m_avbank12; - optional_device m_avbank13; - optional_device m_avbank14; - optional_device m_avbank15; - optional_device m_avbank16; - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /*FM7_H_*/ diff --git a/src/mess/includes/fmtowns.h b/src/mess/includes/fmtowns.h deleted file mode 100644 index fb521304d8d..00000000000 --- a/src/mess/includes/fmtowns.h +++ /dev/null @@ -1,384 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Barry Rodewald -#ifndef FMTOWNS_H_ -#define FMTOWNS_H_ - - -#include "emu.h" -#include "cpu/i386/i386.h" -#include "sound/2612intf.h" -#include "sound/rf5c68.h" -#include "sound/cdda.h" -#include "sound/speaker.h" -#include "imagedev/chd_cd.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/wd_fdc.h" -#include "imagedev/floppy.h" -#include "formats/fmtowns_dsk.h" -#include "machine/upd71071.h" -#include "machine/ram.h" -#include "machine/nvram.h" -#include "machine/fm_scsi.h" - -#define IRQ_LOG 0 // set to 1 to log IRQ line activity - -struct towns_cdrom_controller -{ - UINT8 command; - UINT8 status; - UINT8 cmd_status[4]; - UINT8 cmd_status_ptr; - UINT8 extra_status; - UINT8 parameter[8]; - UINT8 mpu_irq_enable; - UINT8 dma_irq_enable; - UINT8 buffer[2048]; - INT32 buffer_ptr; - UINT32 lba_current; - UINT32 lba_last; - UINT32 cdda_current; - UINT32 cdda_length; - bool software_tx; - emu_timer* read_timer; -}; - -struct towns_video_controller -{ - UINT8 towns_vram_wplane; - UINT8 towns_vram_rplane; - UINT8 towns_vram_page_sel; - UINT8 towns_palette_select; - UINT8 towns_palette_r[256]; - UINT8 towns_palette_g[256]; - UINT8 towns_palette_b[256]; - UINT8 towns_degipal[8]; - UINT8 towns_dpmd_flag; - UINT8 towns_crtc_mix; - UINT8 towns_crtc_sel; // selected CRTC register - UINT16 towns_crtc_reg[32]; - UINT8 towns_video_sel; // selected video register - UINT8 towns_video_reg[2]; - UINT8 towns_sprite_sel; // selected sprite register - UINT8 towns_sprite_reg[8]; - UINT8 towns_sprite_flag; // sprite drawing flag - UINT8 towns_sprite_page; // VRAM page (not layer) sprites are drawn to - UINT8 towns_tvram_enable; - UINT16 towns_kanji_offset; - UINT8 towns_kanji_code_h; - UINT8 towns_kanji_code_l; - rectangle towns_crtc_layerscr[2]; // each layer has independent sizes - UINT8 towns_display_plane; - UINT8 towns_display_page_sel; - UINT8 towns_vblank_flag; - UINT8 towns_layer_ctrl; - emu_timer* sprite_timer; -}; - -class towns_state : public driver_device -{ - public: - towns_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_pic_master(*this, "pic8259_master"), - m_pic_slave(*this, "pic8259_slave"), - m_pit(*this, "pit"), - m_dma_1(*this, "dma_1"), - m_dma_2(*this, "dma_2"), - m_palette(*this, "palette"), - m_ram(*this, RAM_TAG), - m_fdc(*this, "fdc"), - m_flop0(*this, "fdc:0"), - m_flop1(*this, "fdc:1"), - m_nvram(*this, "nvram"), - m_nvram16(*this, "nvram16"), - m_ctrltype(*this, "ctrltype"), - m_key1(*this, "key1"), - m_key2(*this, "key2"), - m_key3(*this, "key3"), - m_key4(*this, "key4"), - m_joy1(*this, "joy1"), - m_joy2(*this, "joy2"), - m_joy1_ex(*this, "joy1_ex"), - m_joy2_ex(*this, "joy2_ex"), - m_6b_joy1(*this, "6b_joy1"), - m_6b_joy2(*this, "6b_joy2"), - m_6b_joy1_ex(*this, "6b_joy1_ex"), - m_6b_joy2_ex(*this, "6b_joy2_ex"), - m_mouse1(*this, "mouse1"), - m_mouse2(*this, "mouse2"), - m_mouse3(*this, "mouse3"), - m_user(*this,"user"), - m_serial(*this,"serial") - { } - - /* devices */ - required_device m_maincpu; - required_device m_speaker; - required_device m_pic_master; - required_device m_pic_slave; - required_device m_pit; - required_device m_dma_1; - required_device m_dma_2; - required_device m_palette; - required_device m_ram; - required_device m_fdc; - required_device m_flop0; - required_device m_flop1; - ram_device* m_messram; - cdrom_image_device* m_cdrom; - cdda_device* m_cdda; - class fmscsi_device* m_scsi; - - UINT16 m_ftimer; - UINT16 m_freerun_timer; - emu_timer* m_towns_freerun_counter; - UINT16 m_intervaltimer2_period; - UINT8 m_intervaltimer2_irqmask; - UINT8 m_intervaltimer2_timeout_flag; - UINT8 m_intervaltimer2_timeout_flag2; - emu_timer* m_towns_intervaltimer2; - UINT8 m_nmi_mask; - UINT8 m_compat_mode; - UINT8 m_towns_system_port; - UINT32 m_towns_ankcg_enable; - UINT32 m_towns_mainmem_enable; - UINT32 m_towns_ram_enable; - UINT32* m_towns_vram; - UINT8* m_towns_gfxvram; - UINT8* m_towns_txtvram; - int m_towns_selected_drive; - UINT8 m_towns_fdc_irq6mask; - UINT8* m_towns_serial_rom; - int m_towns_srom_position; - UINT8 m_towns_srom_clk; - UINT8 m_towns_srom_reset; - UINT8 m_towns_rtc_select; - UINT8 m_towns_rtc_data; - UINT8 m_towns_rtc_reg[16]; - emu_timer* m_towns_rtc_timer; - UINT8 m_towns_timer_mask; - UINT16 m_towns_machine_id; // default is 0x0101 - UINT8 m_towns_kb_status; - UINT8 m_towns_kb_irq1_enable; - UINT8 m_towns_kb_output; // key output - UINT8 m_towns_kb_extend; // extended key output - emu_timer* m_towns_kb_timer; - emu_timer* m_towns_mouse_timer; - UINT8 m_towns_fm_irq_flag; - UINT8 m_towns_pcm_irq_flag; - UINT8 m_towns_pcm_channel_flag; - UINT8 m_towns_pcm_channel_mask; - UINT8 m_towns_pad_mask; - UINT8 m_towns_mouse_output; - UINT8 m_towns_mouse_x; - UINT8 m_towns_mouse_y; - UINT8 m_towns_volume[8]; // volume ports - UINT8 m_towns_volume_select; - UINT8 m_towns_scsi_control; - UINT8 m_towns_scsi_status; - UINT8 m_towns_spkrdata; - UINT8 m_pit_out0; - UINT8 m_pit_out1; - UINT8 m_pit_out2; - UINT8 m_timer0; - UINT8 m_timer1; - - emu_timer* m_towns_wait_timer; - emu_timer* m_towns_status_timer; - emu_timer* m_towns_cdda_timer; - struct towns_cdrom_controller m_towns_cd; - struct towns_video_controller m_video; - - UINT32 m_kb_prev[4]; - UINT8 m_prev_pad_mask; - UINT8 m_prev_x; - UINT8 m_prev_y; - - optional_shared_ptr m_nvram; - optional_shared_ptr m_nvram16; - - virtual void driver_start(); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - DECLARE_READ8_MEMBER(towns_system_r); - DECLARE_WRITE8_MEMBER(towns_system_w); - DECLARE_READ8_MEMBER(towns_intervaltimer2_r); - DECLARE_WRITE8_MEMBER(towns_intervaltimer2_w); - DECLARE_READ8_MEMBER(towns_sys6c_r); - DECLARE_WRITE8_MEMBER(towns_sys6c_w); - DECLARE_READ8_MEMBER(towns_dma1_r); - DECLARE_WRITE8_MEMBER(towns_dma1_w); - DECLARE_READ8_MEMBER(towns_dma2_r); - DECLARE_WRITE8_MEMBER(towns_dma2_w); - DECLARE_READ8_MEMBER(towns_floppy_r); - DECLARE_WRITE8_MEMBER(towns_floppy_w); - DECLARE_READ8_MEMBER(towns_keyboard_r); - DECLARE_WRITE8_MEMBER(towns_keyboard_w); - DECLARE_READ8_MEMBER(towns_port60_r); - DECLARE_WRITE8_MEMBER(towns_port60_w); - DECLARE_READ8_MEMBER(towns_sys5e8_r); - DECLARE_WRITE8_MEMBER(towns_sys5e8_w); - DECLARE_READ8_MEMBER(towns_sound_ctrl_r); - DECLARE_WRITE8_MEMBER(towns_sound_ctrl_w); - DECLARE_READ8_MEMBER(towns_padport_r); - DECLARE_WRITE8_MEMBER(towns_pad_mask_w); - DECLARE_READ8_MEMBER(towns_cmos8_r); - DECLARE_WRITE8_MEMBER(towns_cmos8_w); - DECLARE_READ8_MEMBER(towns_cmos_low_r); - DECLARE_WRITE8_MEMBER(towns_cmos_low_w); - DECLARE_READ8_MEMBER(towns_cmos_r); - DECLARE_WRITE8_MEMBER(towns_cmos_w); - DECLARE_READ8_MEMBER(towns_sys480_r); - DECLARE_WRITE8_MEMBER(towns_sys480_w); - DECLARE_READ8_MEMBER(towns_video_404_r); - DECLARE_WRITE8_MEMBER(towns_video_404_w); - DECLARE_READ8_MEMBER(towns_cdrom_r); - DECLARE_WRITE8_MEMBER(towns_cdrom_w); - DECLARE_READ8_MEMBER(towns_rtc_r); - DECLARE_WRITE8_MEMBER(towns_rtc_w); - DECLARE_WRITE8_MEMBER(towns_rtc_select_w); - DECLARE_READ8_MEMBER(towns_volume_r); - DECLARE_WRITE8_MEMBER(towns_volume_w); - DECLARE_READ8_MEMBER(towns_41ff_r); - - DECLARE_READ8_MEMBER(towns_gfx_high_r); - DECLARE_WRITE8_MEMBER(towns_gfx_high_w); - DECLARE_READ8_MEMBER(towns_gfx_r); - DECLARE_WRITE8_MEMBER(towns_gfx_w); - DECLARE_READ8_MEMBER(towns_video_cff80_r); - DECLARE_WRITE8_MEMBER(towns_video_cff80_w); - DECLARE_READ8_MEMBER(towns_video_cff80_mem_r); - DECLARE_WRITE8_MEMBER(towns_video_cff80_mem_w); - DECLARE_READ8_MEMBER(towns_video_440_r); - DECLARE_WRITE8_MEMBER(towns_video_440_w); - DECLARE_READ8_MEMBER(towns_video_5c8_r); - DECLARE_WRITE8_MEMBER(towns_video_5c8_w); - DECLARE_READ8_MEMBER(towns_video_fd90_r); - DECLARE_WRITE8_MEMBER(towns_video_fd90_w); - DECLARE_READ8_MEMBER(towns_video_ff81_r); - DECLARE_READ8_MEMBER(towns_video_unknown_r); - DECLARE_WRITE8_MEMBER(towns_video_ff81_w); - DECLARE_READ8_MEMBER(towns_spriteram_low_r); - DECLARE_WRITE8_MEMBER(towns_spriteram_low_w); - DECLARE_READ8_MEMBER(towns_spriteram_r); - DECLARE_WRITE8_MEMBER(towns_spriteram_w); - - DECLARE_WRITE_LINE_MEMBER(mb8877a_irq_w); - DECLARE_WRITE_LINE_MEMBER(mb8877a_drq_w); - DECLARE_WRITE_LINE_MEMBER(pit_out2_changed); - - RF5C68_SAMPLE_END_CB_MEMBER(towns_pcm_irq); - - void towns_update_video_banks(address_space&); - void init_serial_rom(); - void init_rtc(); - void kb_sendcode(UINT8 scancode, int release); - UINT8 speaker_get_spk(); - void speaker_set_spkrdata(UINT8 data); - void speaker_set_input(UINT8 data); - UINT8 towns_cdrom_read_byte_software(); - - required_ioport m_ctrltype; - required_ioport m_key1; - required_ioport m_key2; - required_ioport m_key3; - required_ioport m_key4; - required_ioport m_joy1; - required_ioport m_joy2; - required_ioport m_joy1_ex; - required_ioport m_joy2_ex; - required_ioport m_6b_joy1; - required_ioport m_6b_joy2; - required_ioport m_6b_joy1_ex; - required_ioport m_6b_joy2_ex; - required_ioport m_mouse1; - required_ioport m_mouse2; - required_ioport m_mouse3; - required_memory_region m_user; - optional_memory_region m_serial; - -private: - static const device_timer_id TIMER_RTC = 0; - static const device_timer_id TIMER_FREERUN = 1; - static const device_timer_id TIMER_INTERVAL2 = 2; - static const device_timer_id TIMER_KEYBOARD = 3; - static const device_timer_id TIMER_MOUSE = 4; - static const device_timer_id TIMER_WAIT = 5; - static const device_timer_id TIMER_CDSTATUS = 6; - static const device_timer_id TIMER_CDDA = 7; - void rtc_second(); - void freerun_inc(); - void intervaltimer2_timeout(); - void poll_keyboard(); - void mouse_timeout(); - void wait_end(); - void towns_cd_set_status(UINT8 st0, UINT8 st1, UINT8 st2, UINT8 st3); - void towns_cdrom_execute_command(cdrom_image_device* device); - void towns_cdrom_play_cdda(cdrom_image_device* device); - void towns_cdrom_read(cdrom_image_device* device); - void towns_cd_status_ready(); - void towns_delay_cdda(cdrom_image_device* dev); -public: - INTERRUPT_GEN_MEMBER(towns_vsync_irq); - TIMER_CALLBACK_MEMBER(towns_cdrom_read_byte); - TIMER_CALLBACK_MEMBER(towns_sprite_done); - TIMER_CALLBACK_MEMBER(towns_vblank_end); - DECLARE_WRITE_LINE_MEMBER(towns_scsi_irq); - DECLARE_WRITE_LINE_MEMBER(towns_scsi_drq); - DECLARE_WRITE_LINE_MEMBER(towns_pit_out0_changed); - DECLARE_WRITE_LINE_MEMBER(towns_pit_out1_changed); - DECLARE_READ8_MEMBER(get_slave_ack); - DECLARE_WRITE_LINE_MEMBER(towns_fm_irq); - DECLARE_FLOPPY_FORMATS(floppy_formats); - void towns_crtc_refresh_mode(); - void towns_update_kanji_offset(); - void towns_update_palette(); - void render_sprite_4(UINT32 poffset, UINT32 coffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect); - void render_sprite_16(UINT32 poffset, UINT16 x, UINT16 y, UINT16 xflip, UINT16 yflip, const rectangle* rect); - void draw_sprites(const rectangle* rect); - void towns_crtc_draw_scan_layer_hicolour(bitmap_rgb32 &bitmap,const rectangle* rect,int layer,int line,int scanline); - void towns_crtc_draw_scan_layer_256(bitmap_rgb32 &bitmap,const rectangle* rect,int layer,int line,int scanline); - void towns_crtc_draw_scan_layer_16(bitmap_rgb32 &bitmap,const rectangle* rect,int layer,int line,int scanline); - void towns_crtc_draw_layer(bitmap_rgb32 &bitmap,const rectangle* rect,int layer); - void render_text_char(UINT8 x, UINT8 y, UINT8 ascii, UINT16 jis, UINT8 attr); - void draw_text_layer(); - inline UINT8 byte_to_bcd(UINT8 val); - inline UINT8 bcd_to_byte(UINT8 val); - inline UINT32 msf_to_lbafm(UINT32 val); // because the CDROM core doesn't provide this; - DECLARE_READ16_MEMBER(towns_fdc_dma_r); - DECLARE_WRITE16_MEMBER(towns_fdc_dma_w); - void towns_cdrom_set_irq(int line,int state); - UINT8 towns_cd_get_track(); - DECLARE_READ16_MEMBER(towns_cdrom_dma_r); - void rtc_hour(); - void rtc_minute(); - DECLARE_READ16_MEMBER(towns_scsi_dma_r); - DECLARE_WRITE16_MEMBER(towns_scsi_dma_w); -}; - -class towns16_state : public towns_state -{ - public: - towns16_state(const machine_config &mconfig, device_type type, const char *tag) - : towns_state(mconfig, type, tag) - { } -}; - -class marty_state : public towns_state -{ - public: - marty_state(const machine_config &mconfig, device_type type, const char *tag) - : towns_state(mconfig, type, tag) - { } - - virtual void driver_start(); -}; - -#endif /*FMTOWNS_H_*/ diff --git a/src/mess/includes/galaxy.h b/src/mess/includes/galaxy.h deleted file mode 100644 index a115eb146f1..00000000000 --- a/src/mess/includes/galaxy.h +++ /dev/null @@ -1,58 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha, Miodrag Milanovic -/***************************************************************************** - * - * includes/galaxy.h - * - ****************************************************************************/ - -#ifndef GALAXY_H_ -#define GALAXY_H_ - -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - - -class galaxy_state : public driver_device -{ -public: - galaxy_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_region_gfx1(*this, "gfx1") { } - - int m_interrupts_enabled; - UINT8 m_latch_value; - UINT32 m_gal_cnt; - UINT8 m_code; - UINT8 m_first; - UINT32 m_start_addr; - emu_timer *m_gal_video_timer; - bitmap_ind16 m_bitmap; - DECLARE_READ8_MEMBER(galaxy_keyboard_r); - DECLARE_WRITE8_MEMBER(galaxy_latch_w); - DECLARE_DRIVER_INIT(galaxy); - DECLARE_DRIVER_INIT(galaxyp); - virtual void video_start(); - DECLARE_MACHINE_RESET(galaxy); - DECLARE_MACHINE_RESET(galaxyp); - UINT32 screen_update_galaxy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(galaxy_interrupt); - TIMER_CALLBACK_MEMBER(gal_video); - IRQ_CALLBACK_MEMBER(galaxy_irq_callback); - void galaxy_set_timer(); - void galaxy_setup_snapshot (const UINT8 * data, UINT32 size); - required_device m_maincpu; - DECLARE_SNAPSHOT_LOAD_MEMBER( galaxy ); -protected: - required_device m_cassette; - required_device m_ram; - required_memory_region m_region_gfx1; - ioport_port *m_io_ports[8]; -}; - - -#endif /* GALAXY_H_ */ diff --git a/src/mess/includes/galeb.h b/src/mess/includes/galeb.h deleted file mode 100644 index a510622818d..00000000000 --- a/src/mess/includes/galeb.h +++ /dev/null @@ -1,36 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/galeb.h - * - ****************************************************************************/ - -#ifndef GALEB_H_ -#define GALEB_H_ - - -class galeb_state : public driver_device -{ -public: - galeb_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - required_shared_ptr m_video_ram; - DECLARE_READ8_MEMBER(galeb_keyboard_r); - virtual void video_start(); - UINT32 screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; -}; - -/*----------- defined in video/galeb.c -----------*/ - -extern const gfx_layout galeb_charlayout; - -#endif /* GALEB_H_ */ diff --git a/src/mess/includes/gamate.h b/src/mess/includes/gamate.h deleted file mode 100644 index 0a662e60436..00000000000 --- a/src/mess/includes/gamate.h +++ /dev/null @@ -1,100 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/gamate.h - * - ****************************************************************************/ - -#ifndef GAMATE_H_ -#define GAMATE_H_ - -#include "cpu/m6502/m6502.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -// ======================> gamate_sound_device - -class gamate_sound_device : public device_t, public device_sound_interface -{ -public: - gamate_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ~gamate_sound_device() { } - - DECLARE_WRITE8_MEMBER( device_w ); - DECLARE_READ8_MEMBER( device_r ); - -protected: - // device-level overrides - virtual void device_start(); - - // sound stream update overrides - virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); - -private: - - static const int DAConverter[]; - static int Value2Volume(int volume) { return DAConverter[volume]*1; } - - sound_stream *m_mixer_channel; - struct Tone - { - Tone() : - envelope_on(false), - level(false), - tone(false), full_cycle(false), - volume(0), - pos(0), - size(0) - {} - - bool envelope_on, level; - bool tone/*else noise*/, full_cycle/* else square signal/pulse */; - int volume; - int pos, size; - }; - - enum - { - Right, - Left, - Both - }; - - Tone m_channels[3]; - - struct Noise - { - Noise(): - state(1), - level(false), - step(0.0), - pos(0.0) - {} - - int state; - bool level; - double step, pos; - } noise; - - struct Envelope - { - Envelope(): - control(0), - index(0), - first(false) - {} - - int control; - int index; - bool first; - double step, pos; - } envelope; - - UINT8 reg[14]; -}; - -extern const device_type GAMATE_SND; - -#endif /* GAMATE_H_ */ diff --git a/src/mess/includes/gamecom.h b/src/mess/includes/gamecom.h deleted file mode 100644 index cbac6041120..00000000000 --- a/src/mess/includes/gamecom.h +++ /dev/null @@ -1,290 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Robbbert -/***************************************************************************** - * - * includes/gamecom.h - * - * Tiger Game.com - * - * Driver by Wilbert Pol - * - ****************************************************************************/ - -#ifndef GAMECOM_H_ -#define GAMECOM_H_ - -#include "emu.h" -#include "cpu/sm8500/sm8500.h" -#include "sound/dac.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "machine/nvram.h" - -/* SM8521 register addresses */ -enum -{ - SM8521_R0 = 0x00, - SM8521_R1 = 0x01, - SM8521_R2 = 0x02, - SM8521_R3 = 0x03, - SM8521_R4 = 0x04, - SM8521_R5 = 0x05, - SM8521_R6 = 0x06, - SM8521_R7 = 0x07, - SM8521_R8 = 0x08, - SM8521_R9 = 0x09, - SM8521_R10 = 0x0A, - SM8521_R11 = 0x0B, - SM8521_R12 = 0x0C, - SM8521_R13 = 0x0D, - SM8521_R14 = 0x0E, - SM8521_R15 = 0x0F, - SM8521_IE0 = 0x10, - SM8521_IE1 = 0x11, - SM8521_IR0 = 0x12, - SM8521_IR1 = 0x13, - SM8521_P0 = 0x14, - SM8521_P1 = 0x15, - SM8521_P2 = 0x16, - SM8521_P3 = 0x17, - SM8521_18 = 0x18, /* reserved */ - SM8521_SYS = 0x19, - SM8521_CKC = 0x1A, - SM8521_1B = 0x1B, /* reserved */ - SM8521_SPH = 0x1C, - SM8521_SPL = 0x1D, - SM8521_PS0 = 0x1E, - SM8521_PS1 = 0x1F, - SM8521_P0C = 0x20, - SM8521_P1C = 0x21, - SM8521_P2C = 0x22, - SM8521_P3C = 0x23, - SM8521_MMU0 = 0x24, - SM8521_MMU1 = 0x25, - SM8521_MMU2 = 0x26, - SM8521_MMU3 = 0x27, - SM8521_MMU4 = 0x28, - SM8521_29 = 0x29, /* reserved */ - SM8521_2A = 0x2A, /* reserved */ - SM8521_URTT = 0x2B, - SM8521_URTR = 0x2C, - SM8521_URTS = 0x2D, - SM8521_URTC = 0x2E, - SM8521_2F = 0x2F, /* reserved */ - SM8521_LCDC = 0x30, - SM8521_LCH = 0x31, - SM8521_LCV = 0x32, - SM8521_33 = 0x33, /* reserved */ - SM8521_DMC = 0x34, - SM8521_DMX1 = 0x35, - SM8521_DMY1 = 0x36, - SM8521_DMDX = 0x37, - SM8521_DMDY = 0x38, - SM8521_DMX2 = 0x39, - SM8521_DMY2 = 0x3A, - SM8521_DMPL = 0x3B, - SM8521_DMBR = 0x3C, - SM8521_DMVP = 0x3D, - SM8521_3E = 0x3E, /* reserved */ - SM8521_3F = 0x3F, /* reserved */ - SM8521_SGC = 0x40, - SM8521_41 = 0x41, /* reserved */ - SM8521_SG0L = 0x42, - SM8521_43 = 0x43, /* reserved */ - SM8521_SG1L = 0x44, - SM8521_45 = 0x45, /* reserved */ - SM8521_SG0TH = 0x46, - SM8521_SG0TL = 0x47, - SM8521_SG1TH = 0x48, - SM8521_SG1TL = 0x49, - SM8521_SG2L = 0x4A, - SM8521_4B = 0x4B, /* reserved */ - SM8521_SG2TH = 0x4C, - SM8521_SG2TL = 0x4D, - SM8521_SGDA = 0x4E, - SM8521_4F = 0x4F, /* reserved */ - SM8521_TM0C = 0x50, - SM8521_TM0D = 0x51, - SM8521_TM1C = 0x52, - SM8521_TM1D = 0x53, - SM8521_CLKT = 0x54, - SM8521_55 = 0x55, /* reserved */ - SM8521_56 = 0x56, /* reserved */ - SM8521_57 = 0x57, /* reserved */ - SM8521_58 = 0x58, /* reserved */ - SM8521_59 = 0x59, /* reserved */ - SM8521_5A = 0x5A, /* reserved */ - SM8521_5B = 0x5B, /* reserved */ - SM8521_5C = 0x5C, /* reserved */ - SM8521_5D = 0x5D, /* reserved */ - SM8521_WDT = 0x5E, - SM8521_WDTC = 0x5F, - SM8521_SG0W0 = 0x60, - SM8521_SG0W1 = 0x61, - SM8521_SG0W2 = 0x62, - SM8521_SG0W3 = 0x63, - SM8521_SG0W4 = 0x64, - SM8521_SG0W5 = 0x65, - SM8521_SG0W6 = 0x66, - SM8521_SG0W7 = 0x67, - SM8521_SG0W8 = 0x68, - SM8521_SG0W9 = 0x69, - SM8521_SG0W10 = 0x6A, - SM8521_SG0W11 = 0x6B, - SM8521_SG0W12 = 0x6C, - SM8521_SG0W13 = 0x6D, - SM8521_SG0W14 = 0x6E, - SM8521_SG0W15 = 0x6F, - SM8521_SG1W0 = 0x70, - SM8521_SG1W1 = 0x71, - SM8521_SG1W2 = 0x72, - SM8521_SG1W3 = 0x73, - SM8521_SG1W4 = 0x74, - SM8521_SG1W5 = 0x75, - SM8521_SG1W6 = 0x76, - SM8521_SG1W7 = 0x77, - SM8521_SG1W8 = 0x78, - SM8521_SG1W9 = 0x79, - SM8521_SG1W10 = 0x7A, - SM8521_SG1W11 = 0x7B, - SM8521_SG1W12 = 0x7C, - SM8521_SG1W13 = 0x7D, - SM8521_SG1W14 = 0x7E, - SM8521_SG1W15 = 0x7F -}; - -struct GAMECOM_DMA -{ - int enabled; - int transfer_mode; - int decrement_y; - int decrement_x; - int overwrite_mode; - int width_x; - int width_y; - int width_x_count; - int width_y_count; - int source_x; - int source_x_current; - int source_y; - int source_width; - int dest_x; - int dest_x_current; - int dest_y; - int dest_width; - int state_count; - int state_pixel; - int state_limit; - UINT8 palette[4]; - UINT8 *source_bank; - unsigned int source_current; - unsigned int source_line; - unsigned int source_mask; - UINT8 *dest_bank; - unsigned int dest_current; - unsigned int dest_line; - unsigned int dest_mask; -}; - -struct GAMECOM_TIMER -{ - int enabled; - int state_count; - int state_limit; - int check_value; -}; - -struct gamecom_sound_t -{ - UINT8 sgc; - UINT8 sg0l; - UINT8 sg1l; - UINT8 sg2l; - UINT16 sg0t; - UINT16 sg1t; - UINT16 sg2t; - UINT8 sgda; - UINT8 sg0w[16]; - UINT8 sg1w[16]; -}; - - -class gamecom_state : public driver_device -{ -public: - gamecom_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_p_videoram(*this,"videoram") - , m_p_nvram(*this,"nvram") - , m_maincpu(*this, "maincpu") - , m_dac(*this, "dac") - , m_cart1(*this, "cartslot1") - , m_cart2(*this, "cartslot2") - , m_bank1(*this, "bank1") - , m_bank2(*this, "bank2") - , m_bank3(*this, "bank3") - , m_bank4(*this, "bank4") - , m_region_maincpu(*this, "maincpu") - , m_region_kernel(*this, "kernel") - , m_io_in0(*this, "IN0") - , m_io_in1(*this, "IN1") - , m_io_in2(*this, "IN2") - , m_io_grid(*this, "GRID") - { } - - DECLARE_READ8_MEMBER( gamecom_internal_r ); - DECLARE_READ8_MEMBER( gamecom_pio_r ); - DECLARE_WRITE8_MEMBER( gamecom_internal_w ); - DECLARE_WRITE8_MEMBER( gamecom_pio_w ); - DECLARE_DRIVER_INIT(gamecom); - DECLARE_PALETTE_INIT(gamecom); - INTERRUPT_GEN_MEMBER(gamecom_interrupt); - TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback); - TIMER_CALLBACK_MEMBER(gamecom_scanline); - DECLARE_WRITE8_MEMBER( gamecom_handle_dma ); - DECLARE_WRITE8_MEMBER( gamecom_update_timers ); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 ); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 ); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -private: - UINT8 *m_p_ram; - UINT8 *m_cart_ptr; - UINT8 m_lcdc_reg; - UINT8 m_lch_reg; - UINT8 m_lcv_reg; - UINT16 m_scanline; - UINT16 m_base_address; - memory_region *m_cart1_rom; - memory_region *m_cart2_rom; - emu_timer *m_clock_timer; - emu_timer *m_scanline_timer; - GAMECOM_DMA m_dma; - GAMECOM_TIMER m_timer[2]; - gamecom_sound_t m_sound; - bitmap_ind16 m_bitmap; - void gamecom_set_mmu(UINT8 mmu, UINT8 data); - void handle_stylus_press(int column); - void recompute_lcd_params(); - void handle_input_press(UINT16 mux_data); - int common_load(device_image_interface &image, generic_slot_device *slot); - virtual void machine_reset(); - virtual void video_start(); - required_shared_ptr m_p_videoram; - required_shared_ptr m_p_nvram; - required_device m_maincpu; - required_device m_dac; - required_device m_cart1; - required_device m_cart2; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_region m_region_maincpu; - required_memory_region m_region_kernel; - required_ioport m_io_in0; - required_ioport m_io_in1; - required_ioport m_io_in2; - required_ioport_array<13> m_io_grid; -}; - -#endif /* GAMECOM_H_ */ diff --git a/src/mess/includes/gamepock.h b/src/mess/includes/gamepock.h deleted file mode 100644 index 678db1dc9f4..00000000000 --- a/src/mess/includes/gamepock.h +++ /dev/null @@ -1,47 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -#ifndef _GAMEPOCK_H_ -#define _GAMEPOCK_H_ -#include "sound/speaker.h" -#include "bus/generic/slot.h" - -struct HD44102CH { - UINT8 enabled; - UINT8 start_page; - UINT8 address; - UINT8 y_inc; - UINT8 ram[256]; /* There are actually 50 x 4 x 8 bits. This just makes addressing easier. */ -}; - -class gamepock_state : public driver_device -{ -public: - gamepock_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_cart(*this, "cartslot") - { } - - virtual void machine_reset(); - - UINT8 m_port_a; - UINT8 m_port_b; - HD44102CH m_hd44102ch[3]; - - void hd44102ch_w( int which, int c_d, UINT8 data ); - void hd44102ch_init( int which ); - void lcd_update(); - - DECLARE_WRITE8_MEMBER( port_a_w ); - DECLARE_READ8_MEMBER( port_b_r ); - DECLARE_WRITE8_MEMBER( port_b_w ); - DECLARE_READ8_MEMBER( port_c_r ); - UINT32 screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - required_device m_speaker; - required_device m_cart; - DECLARE_WRITE_LINE_MEMBER(gamepock_to_w); -}; - -#endif diff --git a/src/mess/includes/gb.h b/src/mess/includes/gb.h deleted file mode 100644 index 714daafa832..00000000000 --- a/src/mess/includes/gb.h +++ /dev/null @@ -1,171 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/gb.h - * - ****************************************************************************/ - -#ifndef GB_H_ -#define GB_H_ - -#include "audio/gb.h" -#include "cpu/lr35902/lr35902.h" -#include "bus/gameboy/gb_slot.h" -#include "machine/ram.h" -#include "video/gb_lcd.h" - -/* Interrupts */ -#define VBL_INT 0 /* V-Blank */ -#define LCD_INT 1 /* LCD Status */ -#define TIM_INT 2 /* Timer */ -#define SIO_INT 3 /* Serial I/O */ -#define EXT_INT 4 /* Joypad */ - -#ifdef TIMER -#undef TIMER -#endif - -/* Cartridge types */ -#define CART_RAM 0x01 /* Cartridge has RAM */ -#define BATTERY 0x02 /* Cartridge has a battery to save RAM */ -#define TIMER 0x04 /* Cartridge has a real-time-clock (MBC3 only) */ -#define RUMBLE 0x08 /* Cartridge has a rumble motor (MBC5 only) */ -#define SRAM 0x10 /* Cartridge has SRAM */ -#define UNKNOWN 0x80 /* Cartridge is of an unknown type */ - -#define DMG_FRAMES_PER_SECOND 59.732155 -#define SGB_FRAMES_PER_SECOND 61.17 - - -#define MAX_ROMBANK 512 -#define MAX_RAMBANK 256 - - - -class gb_state : public driver_device -{ -public: - gb_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cartslot(*this, "gbslot"), - m_maincpu(*this, "maincpu"), - m_custom(*this, "custom"), - m_region_maincpu(*this, "maincpu"), - m_rambank(*this, "cgb_ram"), - m_inputs(*this, "INPUTS"), - m_bios_hack(*this, "SKIP_CHECK"), - m_ram(*this, RAM_TAG), - m_lcd(*this, "lcd") { } - - //gb_state driver_data; - UINT8 m_gb_io[0x10]; - - /* Timer related */ - UINT16 m_divcount; - UINT8 m_shift; - UINT16 m_shift_cycles; - UINT8 m_triggering_irq; - UINT8 m_reloading; - - /* Serial I/O related */ - UINT32 m_sio_count; /* Serial I/O counter */ - emu_timer *m_gb_serial_timer; - - /* SGB variables */ - INT8 m_sgb_packets; - UINT8 m_sgb_bitcount; - UINT8 m_sgb_bytecount; - UINT8 m_sgb_start; - UINT8 m_sgb_rest; - UINT8 m_sgb_controller_no; - UINT8 m_sgb_controller_mode; - UINT8 m_sgb_data[0x100]; - - /* CGB variables */ - UINT8 *m_gbc_rammap[8]; /* (CGB) Addresses of internal RAM banks */ - UINT8 m_gbc_rambank; /* (CGB) Current CGB RAM bank */ - - int m_bios_disable; - - DECLARE_WRITE8_MEMBER(gb_io_w); - DECLARE_WRITE8_MEMBER(gb_io2_w); - DECLARE_WRITE8_MEMBER(sgb_io_w); - DECLARE_READ8_MEMBER(gb_ie_r); - DECLARE_WRITE8_MEMBER(gb_ie_w); - DECLARE_READ8_MEMBER(gb_io_r); - DECLARE_WRITE8_MEMBER(gbc_io2_w); - DECLARE_READ8_MEMBER(gbc_io2_r); - DECLARE_PALETTE_INIT(gb); - DECLARE_MACHINE_START(sgb); - DECLARE_MACHINE_RESET(sgb); - DECLARE_PALETTE_INIT(sgb); - DECLARE_PALETTE_INIT(gbp); - DECLARE_MACHINE_START(gbc); - DECLARE_MACHINE_RESET(gbc); - DECLARE_PALETTE_INIT(gbc); - TIMER_CALLBACK_MEMBER(gb_serial_timer_proc); - DECLARE_WRITE8_MEMBER(gb_timer_callback); - - DECLARE_READ8_MEMBER(gb_cart_r); - DECLARE_READ8_MEMBER(gbc_cart_r); - DECLARE_WRITE8_MEMBER(gb_bank_w); - DECLARE_READ8_MEMBER(gb_ram_r); - DECLARE_WRITE8_MEMBER(gb_ram_w); - DECLARE_READ8_MEMBER(gb_echo_r); - DECLARE_WRITE8_MEMBER(gb_echo_w); - optional_device m_cartslot; - -protected: - required_device m_maincpu; - required_device m_custom; - required_memory_region m_region_maincpu; - optional_memory_bank m_rambank; // cgb - required_ioport m_inputs; - required_ioport m_bios_hack; - optional_device m_ram; - required_device m_lcd; - - void gb_timer_increment(); - void gb_timer_check_irq(); - void gb_init(); - void gb_init_regs(); - void gb_video_reset(int mode); - void gb_video_start(int mode); - - void save_gb_base(); - void save_gbc_only(); - void save_sgb_only(); - - virtual void machine_start(); - virtual void machine_reset(); -}; - - -class megaduck_state : public gb_state -{ -public: - megaduck_state(const machine_config &mconfig, device_type type, const char *tag) - : gb_state(mconfig, type, tag) - , m_cartslot(*this, "duckslot") - { } - - DECLARE_READ8_MEMBER(megaduck_video_r); - DECLARE_WRITE8_MEMBER(megaduck_video_w); - DECLARE_WRITE8_MEMBER(megaduck_sound_w1); - DECLARE_READ8_MEMBER(megaduck_sound_r1); - DECLARE_WRITE8_MEMBER(megaduck_sound_w2); - DECLARE_READ8_MEMBER(megaduck_sound_r2); - DECLARE_MACHINE_START(megaduck); - DECLARE_MACHINE_RESET(megaduck); - DECLARE_PALETTE_INIT(megaduck); - - DECLARE_READ8_MEMBER(cart_r); - DECLARE_WRITE8_MEMBER(bank1_w); - DECLARE_WRITE8_MEMBER(bank2_w); - optional_device m_cartslot; -}; - - - -#endif /* GB_H_ */ diff --git a/src/mess/includes/gba.h b/src/mess/includes/gba.h deleted file mode 100644 index 58637b0275f..00000000000 --- a/src/mess/includes/gba.h +++ /dev/null @@ -1,279 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:R. Belmont,Ryan Holtz -#ifndef _GBA_H_ -#define _GBA_H_ - -#include "audio/gb.h" -#include "machine/intelfsh.h" -#include "bus/gba/gba_slot.h" -#include "sound/dac.h" - -#define DISPSTAT_VBL 0x0001 -#define DISPSTAT_HBL 0x0002 -#define DISPSTAT_VCNT 0x0004 -#define DISPSTAT_VBL_IRQ_EN 0x0008 -#define DISPSTAT_HBL_IRQ_EN 0x0010 -#define DISPSTAT_VCNT_IRQ_EN 0x0020 -#define DISPSTAT_VCNT_VALUE 0xff00 - -#define INT_VBL 0x0001 -#define INT_HBL 0x0002 -#define INT_VCNT 0x0004 -#define INT_TM0_OVERFLOW 0x0008 -#define INT_TM1_OVERFLOW 0x0010 -#define INT_TM2_OVERFLOW 0x0020 -#define INT_TM3_OVERFLOW 0x0040 -#define INT_SIO 0x0080 -#define INT_DMA0 0x0100 -#define INT_DMA1 0x0200 -#define INT_DMA2 0x0400 -#define INT_DMA3 0x0800 -#define INT_KEYPAD 0x1000 -#define INT_GAMEPAK 0x2000 - -#define DISPCNT_MODE 0x0007 -#define DISPCNT_FRAMESEL 0x0010 -#define DISPCNT_HBL_FREE 0x0020 - -#define DISPCNT_VRAM_MAP 0x0040 -#define DISPCNT_VRAM_MAP_2D 0x0000 -#define DISPCNT_VRAM_MAP_1D 0x0040 - -#define DISPCNT_BLANK 0x0080 -#define DISPCNT_BG0_EN 0x0100 -#define DISPCNT_BG1_EN 0x0200 -#define DISPCNT_BG2_EN 0x0400 -#define DISPCNT_BG3_EN 0x0800 -#define DISPCNT_OBJ_EN 0x1000 -#define DISPCNT_WIN0_EN 0x2000 -#define DISPCNT_WIN1_EN 0x4000 -#define DISPCNT_OBJWIN_EN 0x8000 - -#define OBJ_Y_COORD 0x00ff -#define OBJ_ROZMODE 0x0300 -#define OBJ_ROZMODE_NONE 0x0000 -#define OBJ_ROZMODE_ROZ 0x0100 -#define OBJ_ROZMODE_DISABLE 0x0200 -#define OBJ_ROZMODE_DBLROZ 0x0300 - -#define OBJ_MODE 0x0c00 -#define OBJ_MODE_NORMAL 0x0000 -#define OBJ_MODE_ALPHA 0x0400 -#define OBJ_MODE_WINDOW 0x0800 -#define OBJ_MODE_UNDEFINED 0x0c00 - -#define OBJ_MOSAIC 0x1000 - -#define OBJ_PALMODE 0x2000 -#define OBJ_PALMODE_16 0x0000 -#define OBJ_PALMODE_256 0x2000 - -#define OBJ_SHAPE 0xc000 -#define OBJ_SHAPE_SQR 0x0000 -#define OBJ_SHAPE_HORIZ 0x4000 -#define OBJ_SHAPE_VERT 0x8000 - -#define OBJ_X_COORD 0x01ff -#define OBJ_SCALE_PARAM 0x3e00 -#define OBJ_SCALE_PARAM_SHIFT 9 -#define OBJ_HFLIP 0x1000 -#define OBJ_VFLIP 0x2000 -#define OBJ_SIZE 0xc000 -#define OBJ_SIZE_8 0x0000 -#define OBJ_SIZE_16 0x4000 -#define OBJ_SIZE_32 0x8000 -#define OBJ_SIZE_64 0xc000 - -#define OBJ_TILENUM 0x03ff -#define OBJ_PRIORITY 0x0c00 -#define OBJ_PRIORITY_SHIFT 10 -#define OBJ_PALNUM 0xf000 -#define OBJ_PALNUM_SHIFT 12 - -#define BGCNT_SCREENSIZE 0xc000 -#define BGCNT_SCREENSIZE_SHIFT 14 -#define BGCNT_PALETTESET_WRAP 0x2000 -#define BGCNT_SCREENBASE 0x1f00 -#define BGCNT_SCREENBASE_SHIFT 8 -#define BGCNT_PALETTE256 0x0080 -#define BGCNT_MOSAIC 0x0040 -#define BGCNT_CHARBASE 0x003c -#define BGCNT_CHARBASE_SHIFT 2 -#define BGCNT_PRIORITY 0x0003 - -#define BLDCNT_BG0TP1 0x0001 -#define BLDCNT_BG1TP1 0x0002 -#define BLDCNT_BG2TP1 0x0004 -#define BLDCNT_BG3TP1 0x0008 -#define BLDCNT_OBJTP1 0x0010 -#define BLDCNT_BDTP1 0x0020 -#define BLDCNT_SFX 0x00c0 -#define BLDCNT_SFX_NONE 0x0000 -#define BLDCNT_SFX_ALPHA 0x0040 -#define BLDCNT_SFX_LIGHTEN 0x0080 -#define BLDCNT_SFX_DARKEN 0x00c0 -#define BLDCNT_BG0TP2 0x0100 -#define BLDCNT_BG1TP2 0x0200 -#define BLDCNT_BG2TP2 0x0400 -#define BLDCNT_BG3TP2 0x0800 -#define BLDCNT_OBJTP2 0x1000 -#define BLDCNT_BDTP2 0x2000 -#define BLDCNT_TP2_SHIFT 8 - -#define TILEOBJ_TILE 0x03ff -#define TILEOBJ_HFLIP 0x0400 -#define TILEOBJ_VFLIP 0x0800 -#define TILEOBJ_PALETTE 0xf000 - -/* driver state */ -class gba_state : public driver_device -{ -public: - gba_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gba_pram(*this, "gba_pram"), - m_gba_vram(*this, "gba_vram"), - m_gba_oam(*this, "gba_oam"), - m_ladac(*this, "direct_a_left"), - m_radac(*this, "direct_a_right"), - m_lbdac(*this, "direct_b_left"), - m_rbdac(*this, "direct_b_right"), - m_gbsound(*this, "custom"), - m_cart(*this, "cartslot"), - m_region_maincpu(*this, "maincpu"), - m_io_inputs(*this, "INPUTS"), - m_bios_hack(*this, "SKIP_CHECK") - { } - - required_device m_maincpu; - required_shared_ptr m_gba_pram; - required_shared_ptr m_gba_vram; - required_shared_ptr m_gba_oam; - required_device m_ladac; - required_device m_radac; - required_device m_lbdac; - required_device m_rbdac; - required_device m_gbsound; - required_device m_cart; - - void request_irq(UINT32 int_type); - void dma_exec(FPTR ch); - void audio_tick(int ref); - - // video-related - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - bitmap_ind16 m_bitmap; - - UINT32 m_DISPSTAT; - UINT32 m_BG2X, m_BG2Y, m_BG3X, m_BG3Y; - UINT16 m_DISPCNT, m_GRNSWAP; - UINT16 m_BG0CNT, m_BG1CNT, m_BG2CNT, m_BG3CNT; - UINT16 m_BG0HOFS, m_BG0VOFS, m_BG1HOFS, m_BG1VOFS, m_BG2HOFS, m_BG2VOFS, m_BG3HOFS, m_BG3VOFS; - UINT16 m_BG2PA, m_BG2PB, m_BG2PC, m_BG2PD, m_BG3PA, m_BG3PB, m_BG3PC, m_BG3PD; - UINT16 m_WIN0H, m_WIN1H, m_WIN0V, m_WIN1V, m_WININ, m_WINOUT; - UINT16 m_MOSAIC; - UINT16 m_BLDCNT; - UINT16 m_BLDALPHA; - UINT16 m_BLDY; - UINT8 m_SOUNDCNT_X; - UINT16 m_SOUNDCNT_H; - UINT16 m_SOUNDBIAS; - UINT16 m_SIOMULTI0, m_SIOMULTI1, m_SIOMULTI2, m_SIOMULTI3; - UINT16 m_SIOCNT, m_SIODATA8; - UINT16 m_KEYCNT; - UINT16 m_RCNT; - UINT16 m_JOYCNT; - UINT32 m_JOY_RECV, m_JOY_TRANS; - UINT16 m_JOYSTAT; - UINT16 m_IR, m_IE, m_IF, m_IME; - UINT16 m_WAITCNT; - UINT8 m_POSTFLG; - UINT8 m_HALTCNT; - - UINT8 m_windowOn; - UINT8 m_fxOn; - UINT8 m_gfxBG2Changed; - UINT8 m_gfxBG3Changed; - INT32 m_gfxBG2X; - INT32 m_gfxBG2Y; - INT32 m_gfxBG3X; - INT32 m_gfxBG3Y; - - // DMA - emu_timer *m_dma_timer[4]; - UINT32 m_dma_regs[16]; - UINT32 m_dma_src[4]; - UINT32 m_dma_dst[4]; - UINT32 m_dma_cnt[4]; - UINT32 m_dma_srcadd[4]; - UINT32 m_dma_dstadd[4]; - - // Timers - UINT32 m_timer_regs[4]; - UINT16 m_timer_reload[4]; - int m_timer_recalc[4]; - - emu_timer *m_tmr_timer[4], *m_irq_timer; - emu_timer *m_scan_timer, *m_hbl_timer; - - double m_timer_hz[4]; - - int m_fifo_a_ptr; - int m_fifo_b_ptr; - int m_fifo_a_in; - int m_fifo_b_in; - UINT8 m_fifo_a[20]; - UINT8 m_fifo_b[20]; - UINT32 m_xferscan[7][240+2048]; - - UINT32 m_bios_last_address; - int m_bios_protected; - - DIRECT_UPDATE_MEMBER(gba_direct); - DECLARE_READ32_MEMBER(gba_io_r); - DECLARE_WRITE32_MEMBER(gba_io_w); - DECLARE_WRITE32_MEMBER(gba_pram_w); - DECLARE_WRITE32_MEMBER(gba_vram_w); - DECLARE_WRITE32_MEMBER(gba_oam_w); - DECLARE_READ32_MEMBER(gba_bios_r); - DECLARE_READ32_MEMBER(gba_10000000_r); - DECLARE_READ32_MEMBER(sram_r); - DECLARE_WRITE32_MEMBER(sram_w); - DECLARE_READ32_MEMBER(flash_r); - DECLARE_WRITE32_MEMBER(flash_w); - DECLARE_READ32_MEMBER(eeprom_r); - DECLARE_WRITE32_MEMBER(eeprom_w); - DECLARE_DRIVER_INIT(gbadv); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(gba); - TIMER_CALLBACK_MEMBER(dma_complete); - TIMER_CALLBACK_MEMBER(timer_expire); - TIMER_CALLBACK_MEMBER(handle_irq); - TIMER_CALLBACK_MEMBER(perform_hbl); - TIMER_CALLBACK_MEMBER(perform_scan); - - // video related - void draw_scanline(int y); - - void draw_roz_bitmap_scanline(UINT32 *scanline, int ypos, UINT32 enablemask, UINT32 ctrl, INT32 X, INT32 Y, INT32 PA, INT32 PB, INT32 PC, INT32 PD, INT32 *currentx, INT32 *currenty, int changed, int depth); - void draw_roz_scanline(UINT32 *scanline, int ypos, UINT32 enablemask, UINT32 ctrl, INT32 X, INT32 Y, INT32 PA, INT32 PB, INT32 PC, INT32 PD, INT32 *currentx, INT32 *currenty, int changed); - void draw_bg_scanline(UINT32 *scanline, int ypos, UINT32 enablemask, UINT32 ctrl, UINT32 hofs, UINT32 vofs); - void draw_gba_oam_window(UINT32 *scanline, int y); - void draw_gba_oam(UINT32 *scanline, int y); - - inline int is_in_window(int x, int window); - - inline void update_mask(UINT8* mask, int mode, int submode, UINT32* obj_win, UINT8 inwin0, UINT8 inwin1, UINT8 in0_mask, UINT8 in1_mask, UINT8 out_mask); - void draw_modes(int mode, int submode, int y, UINT32* line0, UINT32* line1, UINT32* line2, UINT32* line3, UINT32* lineOBJ, UINT32* lineOBJWin, UINT32* lineMix, int bpp); - -protected: - required_region_ptr m_region_maincpu; - required_ioport m_io_inputs; - required_ioport m_bios_hack; -}; - - -#endif diff --git a/src/mess/includes/genpc.h b/src/mess/includes/genpc.h deleted file mode 100644 index 08cc742aa7f..00000000000 --- a/src/mess/includes/genpc.h +++ /dev/null @@ -1,202 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Miodrag Milanovic -/***************************************************************************** - * - * includes/pc.h - * - ****************************************************************************/ - -#ifndef GENPC_H_ -#define GENPC_H_ - -#include "machine/ins8250.h" -#include "machine/i8255.h" -#include "machine/am9517a.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" -#include "bus/pc_kbd/pc_kbdc.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -#define MCFG_IBM5160_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, IBM5160_MOTHERBOARD, 0) \ - ibm5160_mb_device::static_set_cputag(*device, _cputag); -// ======================> ibm5160_mb_device -class ibm5160_mb_device : public device_t -{ -public: - // construction/destruction - ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - // inline configuration - static void static_set_cputag(device_t &device, const char *tag); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler); -public: - required_device m_maincpu; - required_device m_pic8259; - required_device m_dma8237; - required_device m_pit8253; - optional_device m_ppi8255; - required_device m_speaker; - required_device m_isabus; - optional_device m_pc_kbdc; - required_device m_ram; - - /* U73 is an LS74 - dual flip flop */ - /* Q2 is set by OUT1 from the 8253 and goes to DRQ1 on the 8237 */ - UINT8 m_u73_q2; - UINT8 m_out1; - int m_dma_channel; - UINT8 m_dma_offset[4]; - UINT8 m_pc_spkrdata; - UINT8 m_pit_out2; - bool m_cur_eop; - - UINT8 m_nmi_enabled; - - int m_ppi_portc_switch_high; - int m_ppi_speaker; - int m_ppi_keyboard_clear; - UINT8 m_ppi_keyb_clock; - UINT8 m_ppi_portb; - UINT8 m_ppi_clock_signal; - UINT8 m_ppi_data_signal; - UINT8 m_ppi_shift_register; - UINT8 m_ppi_shift_enable; - - // interface to the keyboard - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); - DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); - - virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); - - DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out1_changed ); - DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ); - - DECLARE_WRITE_LINE_MEMBER( pc_dma_hrq_changed ); - DECLARE_WRITE_LINE_MEMBER( pc_dma8237_out_eop ); - DECLARE_READ8_MEMBER( pc_dma_read_byte ); - DECLARE_WRITE8_MEMBER( pc_dma_write_byte ); - DECLARE_READ8_MEMBER( pc_dma8237_1_dack_r ); - DECLARE_READ8_MEMBER( pc_dma8237_2_dack_r ); - DECLARE_READ8_MEMBER( pc_dma8237_3_dack_r ); - DECLARE_WRITE8_MEMBER( pc_dma8237_1_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_2_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_3_dack_w ); - DECLARE_WRITE8_MEMBER( pc_dma8237_0_dack_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack0_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack1_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack2_w ); - DECLARE_WRITE_LINE_MEMBER( pc_dack3_w ); - - DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata ); - - DECLARE_READ8_MEMBER(pc_page_r); - DECLARE_WRITE8_MEMBER(pc_page_w); - DECLARE_WRITE8_MEMBER(nmi_enable_w); - - const char *m_cputag; - -private: - void pc_select_dma_channel(int channel, bool state); -}; - - -// device type definition -extern const device_type IBM5160_MOTHERBOARD; - - -#define MCFG_IBM5150_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, IBM5150_MOTHERBOARD, 0) \ - ibm5150_mb_device::static_set_cputag(*device, _cputag); - -// ======================> ibm5150_mb_device -class ibm5150_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - - required_device m_cassette; -public: - virtual DECLARE_READ8_MEMBER ( pc_ppi_porta_r ); - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); -}; - - -// device type definition -extern const device_type IBM5150_MOTHERBOARD; - - -#define MCFG_EC1841_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, EC1841_MOTHERBOARD, 0) \ - ec1841_mb_device::static_set_cputag(*device, _cputag); - -class ec1841_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; - -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - -public: - virtual DECLARE_READ8_MEMBER ( pc_ppi_portc_r ); - virtual DECLARE_WRITE8_MEMBER( pc_ppi_portb_w ); - - virtual DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); -}; - -extern const device_type EC1841_MOTHERBOARD; - -#define MCFG_PCNOPPI_MOTHERBOARD_ADD(_tag, _cputag) \ - MCFG_DEVICE_ADD(_tag, PCNOPPI_MOTHERBOARD, 0) \ - pc_noppi_mb_device::static_set_cputag(*device, _cputag); - -class pc_noppi_mb_device : public ibm5160_mb_device -{ -public: - // construction/destruction - pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - virtual machine_config_constructor device_mconfig_additions() const; - virtual ioport_constructor device_input_ports() const; -protected: - // device-level overrides - void device_start(); -}; - -extern const device_type PCNOPPI_MOTHERBOARD; - -#endif /* GENPC_H_ */ diff --git a/src/mess/includes/gp32.h b/src/mess/includes/gp32.h deleted file mode 100644 index a3754f5b9aa..00000000000 --- a/src/mess/includes/gp32.h +++ /dev/null @@ -1,250 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Tim Schuerewegen -#ifndef _GP32_H_ -#define _GP32_H_ - -#include "machine/smartmed.h" -#include "sound/dac.h" -#include "machine/nvram.h" - - -#define INT_ADC 31 -#define INT_RTC 30 -#define INT_UTXD1 29 -#define INT_UTXD0 28 -#define INT_IIC 27 -#define INT_USBH 26 -#define INT_USBD 25 -#define INT_URXD1 24 -#define INT_URXD0 23 -#define INT_SPI 22 -#define INT_MMC 21 -#define INT_DMA3 20 -#define INT_DMA2 19 -#define INT_DMA1 18 -#define INT_DMA0 17 -#define INT_RESERVED 16 -#define INT_UERR 15 -#define INT_TIMER4 14 -#define INT_TIMER3 13 -#define INT_TIMER2 12 -#define INT_TIMER1 11 -#define INT_TIMER0 10 -#define INT_WDT 9 -#define INT_TICK 8 -#define INT_EINT7 7 -#define INT_EINT6 6 -#define INT_EINT5 5 -#define INT_EINT4 4 -#define INT_EINT3 3 -#define INT_EINT2 2 -#define INT_EINT1 1 -#define INT_EINT0 0 - -struct s3c240x_lcd_t -{ - UINT32 vramaddr_cur; - UINT32 vramaddr_max; - UINT32 offsize; - UINT32 pagewidth_cur; - UINT32 pagewidth_max; - UINT32 bppmode; - UINT32 bswp, hwswp; - UINT32 hozval, lineval; - int vpos, hpos; -}; - -struct smc_t -{ - int add_latch; - int chip; - int cmd_latch; - int do_read; - int do_write; - int read; - int wp; - int busy; - UINT8 datarx; - UINT8 datatx; -}; - -struct i2s_t -{ - int l3d; - int l3m; - int l3c; -}; - -struct s3c240x_iic_t -{ - UINT8 data[4]; - int data_index; - UINT16 address; -}; - -struct s3c240x_iis_t -{ - UINT16 fifo[16/2]; - int fifo_index; -}; - - -class gp32_state : public driver_device -{ -public: - gp32_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_s3c240x_ram(*this, "s3c240x_ram"), - m_maincpu(*this, "maincpu"), - m_smartmedia(*this, "smartmedia"), - m_dac1(*this, "dac1"), - m_dac2(*this, "dac2"), - m_nvram(*this, "nvram"), - m_io_in0(*this, "IN0"), - m_io_in1(*this, "IN1"), - m_palette(*this, "palette") { } - - virtual void video_start(); - - required_shared_ptr m_s3c240x_ram; - UINT8 *m_eeprom_data; - UINT32 m_s3c240x_lcd_regs[0x400/4]; - emu_timer *m_s3c240x_lcd_timer; - s3c240x_lcd_t m_s3c240x_lcd; - UINT32 m_s3c240x_lcd_palette[0x400/4]; - UINT32 m_s3c240x_clkpow_regs[0x18/4]; - UINT32 m_s3c240x_irq_regs[0x18/4]; - emu_timer *m_s3c240x_pwm_timer[5]; - UINT32 m_s3c240x_pwm_regs[0x44/4]; - emu_timer *m_s3c240x_dma_timer[4]; - UINT32 m_s3c240x_dma_regs[0x7c/4]; - smc_t m_smc; - i2s_t m_i2s; - UINT32 m_s3c240x_gpio[0x60/4]; - UINT32 m_s3c240x_memcon_regs[0x34/4]; - UINT32 m_s3c240x_usb_host_regs[0x5C/4]; - UINT32 m_s3c240x_uart_0_regs[0x2C/4]; - UINT32 m_s3c240x_uart_1_regs[0x2C/4]; - UINT32 m_s3c240x_usb_device_regs[0xBC/4]; - UINT32 m_s3c240x_watchdog_regs[0x0C/4]; - s3c240x_iic_t m_s3c240x_iic; - emu_timer *m_s3c240x_iic_timer; - UINT32 m_s3c240x_iic_regs[0x10/4]; - s3c240x_iis_t m_s3c240x_iis; - emu_timer *m_s3c240x_iis_timer; - UINT32 m_s3c240x_iis_regs[0x14/4]; - UINT32 m_s3c240x_rtc_regs[0x4C/4]; - UINT32 m_s3c240x_adc_regs[0x08/4]; - UINT32 m_s3c240x_spi_regs[0x18/4]; - UINT32 m_s3c240x_mmc_regs[0x40/4]; - bitmap_rgb32 m_bitmap; - DECLARE_READ32_MEMBER(s3c240x_lcd_r); - DECLARE_WRITE32_MEMBER(s3c240x_lcd_w); - DECLARE_READ32_MEMBER(s3c240x_lcd_palette_r); - DECLARE_WRITE32_MEMBER(s3c240x_lcd_palette_w); - DECLARE_READ32_MEMBER(s3c240x_clkpow_r); - DECLARE_WRITE32_MEMBER(s3c240x_clkpow_w); - DECLARE_READ32_MEMBER(s3c240x_irq_r); - DECLARE_WRITE32_MEMBER(s3c240x_irq_w); - DECLARE_READ32_MEMBER(s3c240x_pwm_r); - DECLARE_WRITE32_MEMBER(s3c240x_pwm_w); - DECLARE_READ32_MEMBER(s3c240x_dma_r); - DECLARE_WRITE32_MEMBER(s3c240x_dma_w); - DECLARE_READ32_MEMBER(s3c240x_gpio_r); - DECLARE_WRITE32_MEMBER(s3c240x_gpio_w); - DECLARE_READ32_MEMBER(s3c240x_memcon_r); - DECLARE_WRITE32_MEMBER(s3c240x_memcon_w); - DECLARE_READ32_MEMBER(s3c240x_usb_host_r); - DECLARE_WRITE32_MEMBER(s3c240x_usb_host_w); - DECLARE_READ32_MEMBER(s3c240x_uart_0_r); - DECLARE_WRITE32_MEMBER(s3c240x_uart_0_w); - DECLARE_READ32_MEMBER(s3c240x_uart_1_r); - DECLARE_WRITE32_MEMBER(s3c240x_uart_1_w); - DECLARE_READ32_MEMBER(s3c240x_usb_device_r); - DECLARE_WRITE32_MEMBER(s3c240x_usb_device_w); - DECLARE_READ32_MEMBER(s3c240x_watchdog_r); - DECLARE_WRITE32_MEMBER(s3c240x_watchdog_w); - DECLARE_READ32_MEMBER(s3c240x_iic_r); - DECLARE_WRITE32_MEMBER(s3c240x_iic_w); - DECLARE_READ32_MEMBER(s3c240x_iis_r); - DECLARE_WRITE32_MEMBER(s3c240x_iis_w); - DECLARE_READ32_MEMBER(s3c240x_rtc_r); - DECLARE_WRITE32_MEMBER(s3c240x_rtc_w); - DECLARE_READ32_MEMBER(s3c240x_adc_r); - DECLARE_WRITE32_MEMBER(s3c240x_adc_w); - DECLARE_READ32_MEMBER(s3c240x_spi_r); - DECLARE_WRITE32_MEMBER(s3c240x_spi_w); - DECLARE_READ32_MEMBER(s3c240x_mmc_r); - DECLARE_WRITE32_MEMBER(s3c240x_mmc_w); - virtual void machine_start(); - virtual void machine_reset(); - UINT32 screen_update_gp32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(s3c240x_lcd_timer_exp); - TIMER_CALLBACK_MEMBER(s3c240x_pwm_timer_exp); - TIMER_CALLBACK_MEMBER(s3c240x_dma_timer_exp); - TIMER_CALLBACK_MEMBER(s3c240x_iic_timer_exp); - TIMER_CALLBACK_MEMBER(s3c240x_iis_timer_exp); -protected: - required_device m_maincpu; - required_device m_smartmedia; - required_device m_dac1; - required_device m_dac2; - required_device m_nvram; - required_ioport m_io_in0; - required_ioport m_io_in1; - required_device m_palette; - - UINT32 s3c240x_get_fclk(int reg); - UINT32 s3c240x_get_hclk(int reg); - UINT32 s3c240x_get_pclk(int reg); - void s3c240x_lcd_dma_reload(); - void s3c240x_lcd_dma_init(); - void s3c240x_lcd_configure(); - void s3c240x_lcd_start(); - void s3c240x_lcd_stop(); - void s3c240x_lcd_recalc(); - void s3c240x_check_pending_irq(); - void s3c240x_request_irq(UINT32 int_type); - void s3c240x_dma_reload(int dma); - void s3c240x_dma_trigger(int dma); - void s3c240x_dma_request_iis(); - void s3c240x_dma_request_pwm(); - void s3c240x_dma_start(int dma); - void s3c240x_dma_stop(int dma); - void s3c240x_dma_recalc(int dma); - void s3c240x_pwm_start(int timer); - void s3c240x_pwm_stop(int timer); - void s3c240x_pwm_recalc(int timer); - void s3c240x_iis_start(); - void s3c240x_iis_stop(); - void s3c240x_iis_recalc(); - void smc_reset(); - void smc_init(); - UINT8 smc_read(); - void smc_write(UINT8 data); - void smc_update(); - void i2s_reset(); - void i2s_init(); - void i2s_write(int line, int data); - UINT8 eeprom_read(UINT16 address); - void eeprom_write(UINT16 address, UINT8 data); - void iic_start(); - void iic_stop(); - void iic_resume(); - void s3c240x_machine_start(); - void s3c240x_machine_reset(); - inline rgb_t s3c240x_get_color_5551( UINT16 data); - UINT32 s3c240x_lcd_dma_read( ); - void s3c240x_lcd_render_01( ); - void s3c240x_lcd_render_02( ); - void s3c240x_lcd_render_04( ); - void s3c240x_lcd_render_08( ); - void s3c240x_lcd_render_16( ); - UINT8 i2cmem_read_byte( int last); - void i2cmem_write_byte( UINT8 data); - void i2cmem_start( ); - void i2cmem_stop( ); -}; - - -#endif diff --git a/src/mess/includes/hec2hrp.h b/src/mess/includes/hec2hrp.h deleted file mode 100644 index c30b7bfccd3..00000000000 --- a/src/mess/includes/hec2hrp.h +++ /dev/null @@ -1,199 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:JJ Stacino -///////////////////////////////////////////////////////////////////// -////// HECTOR HEADER FILE ///////////////////////////////////////// -///////////////////////////////////////////////////////////////////// -/* - Hector 2HR+ - Victor - Hector 2HR - Hector HRX - Hector MX40c - Hector MX80c - Hector 1 - Interact - - 12/05/2009 Skeleton driver - Micko : mmicko@gmail.com - 31/06/2009 Video - Robbbert - - 29/10/2009 Update skeleton to functional machine - by yo_fr (jj.stac @ aliceadsl.fr) - - => add Keyboard, - => add color, - => add cassette, - => add sn76477 sound and 1bit sound, - => add joysticks (stick, pot, fire) - => add BR/HR switching - => add bank switch for HRX - => add device MX80c and bank switching for the ROM - 03/01/2010 Update and clean prog by yo_fr (jj.stac@aliceadsl.fr) - => add the port mapping for keyboard - 20/11/2010 : synchronization between uPD765 and Z80 are now OK, CP/M runnig! JJStacino - 11/11/2011 : add the minidisque support -3 pouces 1/2 driver- JJStacino (jj.stac @ aliceadsl.fr) - - don't forget to keep some information about these machine see DChector project : http://dchector.free.fr/ made by DanielCoulom - (and thank's to Daniel!) and Yves site : http://hectorvictor.free.fr/ (thank's too Yves!) - - TODO : Add the cartridge function, - Adjust the one shot and A/D timing (sn76477) -*/ - -#include "machine/upd765.h" -#include "machine/wd_fdc.h" -#include "imagedev/flopdrv.h" -#include "imagedev/cassette.h" -#include "sound/sn76477.h" /* for sn sound*/ - -/* Enum status for high memory bank (c000 - ffff)*/ -enum -{ - HECTOR_BANK_PROG = 0, /* first BANK is program ram*/ - HECTOR_BANK_VIDEO /* second BANK is Video ram */ -}; -/* Status for rom memory bank (0000 - 3fff) in MX machine*/ -enum -{ - HECTORMX_BANK_PAGE0 = 0, /* first BANK is base rom*/ - HECTORMX_BANK_PAGE1, /* second BANK is basic rom */ - HECTORMX_BANK_PAGE2 /* 3 BANK is monitrix / assemblex rom */ -}; -/* Status for rom memory bank (0000 - 3fff) in Mini Disc machine*/ -enum -{ - HECTOR_BANK_BASE = 0, /* first BANK is normal rom*/ - HECTOR_BANK_DISC /* second BANK is extra rom for mini disc use*/ -}; -/* Enum status for low memory bank (00000 - 0fff) for DISC II*/ -enum -{ - DISCII_BANK_RAM = 0, /* first BANK is program ram*/ - DISCII_BANK_ROM /* second BANK is ROM */ -}; - -class hec2hrp_state : public driver_device -{ -public: - hec2hrp_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_disc2cpu(*this, "disc2cpu"), - m_cassette(*this, "cassette"), - m_sn(*this, "sn76477"), - m_palette(*this, "palette"), - m_videoram(*this,"videoram"), - m_hector_videoram(*this,"hector_videoram") , - m_keyboard(*this, "KEY"), - m_minidisc_fdc(*this, "wd179x"), - m_floppy0(*this, "wd179x:0") - {} - - DECLARE_FLOPPY_FORMATS(minidisc_formats); - - required_device m_maincpu; - optional_device m_disc2cpu; - required_device m_cassette; - required_device m_sn; - required_device m_palette; - optional_shared_ptr m_videoram; - optional_shared_ptr m_hector_videoram; - required_ioport_array<9> m_keyboard; - - optional_device m_minidisc_fdc; - optional_device m_floppy0; - - UINT8 m_hector_flag_hr; - UINT8 m_hector_flag_80c; - UINT8 m_hector_color[4]; - UINT8 m_hector_disc2_data_r_ready; - UINT8 m_hector_disc2_data_w_ready; - UINT8 m_hector_disc2_data_read; - UINT8 m_hector_disc2_data_write; - UINT8 m_hector_disc2_RNMI; - UINT8 m_state3000; - UINT8 m_write_cassette; - emu_timer *m_Cassette_timer; - UINT8 m_CK_signal ; - UINT8 m_flag_clk; - double m_Pin_Value[29][2]; - int m_AU[17]; - int m_ValMixer; - int m_oldstate3000; - int m_oldstate1000; - UINT8 m_pot0; - UINT8 m_pot1; - UINT8 m_actions; - UINT8 m_hector_port_a; - UINT8 m_hector_port_b; - UINT8 m_hector_port_c_h; - UINT8 m_hector_port_c_l; - UINT8 m_hector_port_cmd; - UINT8 m_cassette_bit; - UINT8 m_cassette_bit_mem; - UINT8 m_Data_K7; - int m_counter_write; - int m_IRQ_current_state; - int m_NMI_current_state; - int m_hector_cmd[10]; - int m_hector_nb_cde; - int m_hector_flag_result; - int m_print; - UINT8 m_hector_videoram_hrx[0x04000]; - - DECLARE_WRITE8_MEMBER(minidisc_control_w); - - DECLARE_WRITE8_MEMBER(hector_switch_bank_w); - DECLARE_WRITE8_MEMBER(hector_keyboard_w); - DECLARE_READ8_MEMBER(hector_keyboard_r); - DECLARE_WRITE8_MEMBER(hector_sn_2000_w); - DECLARE_WRITE8_MEMBER(hector_sn_2800_w); - DECLARE_READ8_MEMBER(hector_cassette_r); - DECLARE_WRITE8_MEMBER(hector_sn_3000_w); - DECLARE_WRITE8_MEMBER(hector_color_a_w); - DECLARE_WRITE8_MEMBER(hector_color_b_w); - DECLARE_READ8_MEMBER(hector_io_8255_r); - DECLARE_WRITE8_MEMBER(hector_io_8255_w); - DECLARE_WRITE8_MEMBER(hector_mx40_io_port_w); - DECLARE_WRITE8_MEMBER(hector_mx80_io_port_w); - DECLARE_MACHINE_START(hec2hrp); - DECLARE_MACHINE_RESET(hec2hrp); - DECLARE_VIDEO_START(hec2hrp); - DECLARE_MACHINE_START(hec2hrx); - DECLARE_MACHINE_RESET(hec2hrx); - DECLARE_MACHINE_START(hec2mdhrx); - DECLARE_MACHINE_RESET(hec2mdhrx); - UINT32 screen_update_hec2hrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(Callback_CK); - - DECLARE_WRITE_LINE_MEMBER( disc2_fdc_interrupt ); - DECLARE_WRITE_LINE_MEMBER( disc2_fdc_dma_irq ); - int isHectorWithDisc2(); - int isHectorWithMiniDisc(); - int isHectorHR(); - int isHectoreXtend(); - void Mise_A_Jour_Etat(int Adresse, int Value ); - void Init_Value_SN76477_Hector(); - void Update_Sound(address_space &space, UINT8 data); - void hector_reset(int hr, int with_D2 ); - void hector_init(); - void Init_Hector_Palette(); - void hector_80c(bitmap_ind16 &bitmap, UINT8 *page, int ymax, int yram) ; - void hector_hr(bitmap_ind16 &bitmap, UINT8 *page, int ymax, int yram) ; - /*----------- defined in machine/hecdisk2.c -----------*/ - - // disc2 handling - DECLARE_READ8_MEMBER( hector_disc2_io00_port_r); - DECLARE_WRITE8_MEMBER( hector_disc2_io00_port_w); - DECLARE_READ8_MEMBER( hector_disc2_io20_port_r); - DECLARE_WRITE8_MEMBER( hector_disc2_io20_port_w); - DECLARE_READ8_MEMBER( hector_disc2_io30_port_r); - DECLARE_WRITE8_MEMBER( hector_disc2_io30_port_w); - DECLARE_READ8_MEMBER( hector_disc2_io40_port_r); - DECLARE_WRITE8_MEMBER( hector_disc2_io40_port_w); - DECLARE_READ8_MEMBER( hector_disc2_io50_port_r); - DECLARE_WRITE8_MEMBER( hector_disc2_io50_port_w); - - void hector_disc2_reset(); -}; - -MACHINE_CONFIG_EXTERN( hector_audio ); diff --git a/src/mess/includes/hh_tms1k.h b/src/mess/includes/hh_tms1k.h deleted file mode 100644 index edcea970b64..00000000000 --- a/src/mess/includes/hh_tms1k.h +++ /dev/null @@ -1,86 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:hap, Sean Riddle, Kevin Horton -/* - - TMS1000 MCU series tabletops/handhelds or other simple devices. - -*/ - -#ifndef _HH_TMS1K_H_ -#define _HH_TMS1K_H_ - - -#include "emu.h" -#include "cpu/tms0980/tms0980.h" -#include "sound/speaker.h" - - -class hh_tms1k_state : public driver_device -{ -public: - hh_tms1k_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), - m_speaker(*this, "speaker"), - m_display_wait(33), - m_display_maxy(1), - m_display_maxx(0) - { } - - // devices - required_device m_maincpu; - optional_ioport_array<11> m_inp_matrix; // max 11 - optional_device m_speaker; - - // misc common - UINT16 m_r; // MCU R-pins data - UINT16 m_o; // MCU O-pins data - UINT16 m_inp_mux; // multiplexed inputs mask - bool m_power_on; - bool m_power_led; - - UINT8 read_inputs(int columns); - DECLARE_INPUT_CHANGED_MEMBER(power_button); - DECLARE_WRITE_LINE_MEMBER(auto_power_off); - - // display common - int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) - int m_display_maxy; // display matrix number of rows - int m_display_maxx; // display matrix number of columns (max 31 for now) - - UINT32 m_grid; // VFD current row data - UINT32 m_plate; // VFD current column data - - UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) - UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments - UINT32 m_display_cache[0x20]; // (internal use) - UINT8 m_display_decay[0x20][0x20]; // (internal use) - - TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); - void display_update(); - void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); - void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask); - -protected: - virtual void machine_start(); - virtual void machine_reset(); -}; - - -// LED segments -enum -{ - lA = 0x01, - lB = 0x02, - lC = 0x04, - lD = 0x08, - lE = 0x10, - lF = 0x20, - lG = 0x40, - lDP = 0x80 -}; - - -#endif /* _HH_TMS1K_H_ */ diff --git a/src/mess/includes/hh_ucom4.h b/src/mess/includes/hh_ucom4.h deleted file mode 100644 index 79d51afccb9..00000000000 --- a/src/mess/includes/hh_ucom4.h +++ /dev/null @@ -1,66 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:hap, Kevin Horton -/* - - NEC uCOM4 MCU tabletops/handhelds or other simple devices, - -*/ - -#ifndef _HH_UCOM4_H_ -#define _HH_UCOM4_H_ - - -#include "emu.h" -#include "cpu/ucom4/ucom4.h" -#include "sound/speaker.h" - - -class hh_ucom4_state : public driver_device -{ -public: - hh_ucom4_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), - m_speaker(*this, "speaker"), - m_display_wait(33), - m_display_maxy(1), - m_display_maxx(0) - { } - - // devices - required_device m_maincpu; - optional_ioport_array<5> m_inp_matrix; // max 5 - optional_device m_speaker; - - // misc common - UINT8 m_port[9]; // MCU port A-I write data (optional) - UINT16 m_inp_mux; // multiplexed inputs mask - - UINT8 read_inputs(int columns); - - // display common - int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) - int m_display_maxy; // display matrix number of rows - int m_display_maxx; // display matrix number of columns (max 31 for now) - - UINT32 m_grid; // VFD current row data - UINT32 m_plate; // VFD current column data - - UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) - UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments - UINT32 m_display_cache[0x20]; // (internal use) - UINT8 m_display_decay[0x20][0x20]; // (internal use) - - TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); - void display_update(); - void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); - -protected: - virtual void machine_start(); - virtual void machine_reset(); -}; - - -#endif /* _HH_UCOM4_H_ */ diff --git a/src/mess/includes/hp48.h b/src/mess/includes/hp48.h deleted file mode 100644 index 70780f2817d..00000000000 --- a/src/mess/includes/hp48.h +++ /dev/null @@ -1,219 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Antoine Mine -/********************************************************************** - - Copyright (C) Antoine Mine' 2008 - - Hewlett Packard HP48 S/SX & G/GX and HP49 G - -**********************************************************************/ - -#include "sound/dac.h" -/* model */ -typedef enum { - HP48_S, - HP48_SX, - HP48_G, - HP48_GX, - HP48_GP, - HP49_G -} hp48_models; - -/* memory module configuration */ -typedef struct -{ - /* static part */ - UINT32 off_mask; /* offset bit-mask, indicates the real size */ - read8_delegate read; - const char *read_name; - write8_delegate write; - void* data; /* non-NULL for banks */ - int isnop; - - /* configurable part */ - UINT8 state; /* one of HP48_MODULE_ */ - UINT32 base; /* base address */ - UINT32 mask; /* often improperly called size, it is an address select mask */ - -} hp48_module; - - -/* screen image averaging */ -#define HP48_NB_SCREENS 3 - -class hp48_state : public driver_device -{ -public: - hp48_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_dac(*this, "dac"), - m_palette(*this, "palette") { } - - UINT8 *m_videoram; - UINT8 m_io[64]; - hp48_models m_model; - - /* OUT register from SATURN (actually 12-bit) */ - UINT16 m_out; - - /* keyboard interrupt */ - UINT8 m_kdn; - - /* from highest to lowest priority: HDW, NCE2, CE1, CE2, NCE3, NCE1 */ - hp48_module m_modules[6]; - - /* RAM/ROM extensions, GX/SX only (each UINT8 stores one nibble) - port1: SX/GX: 32/128 KB - port2: SX:32/128KB, GX:128/512/4096 KB - */ - UINT32 m_port_size[2]; - UINT8 m_port_write[2]; - UINT8* m_port_data[2]; - - UINT32 m_bank_switch; - UINT32 m_io_addr; - UINT16 m_crc; - UINT8 m_timer1; - UINT32 m_timer2; - UINT8 m_screens[ HP48_NB_SCREENS ][ 64 ][ 144 ]; - int m_cur_screen; - UINT8* m_rom; - - DECLARE_DRIVER_INIT(hp48); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(hp48); - DECLARE_MACHINE_START(hp49g); - DECLARE_MACHINE_START(hp48gx); - DECLARE_MACHINE_START(hp48g); - DECLARE_MACHINE_START(hp48gp); - DECLARE_MACHINE_START(hp48sx); - DECLARE_MACHINE_START(hp48s); - UINT32 screen_update_hp48(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void hp48_machine_start(hp48_models model); - DECLARE_WRITE8_MEMBER(hp48_io_w); - DECLARE_READ8_MEMBER(hp48_io_r); - DECLARE_READ8_MEMBER(hp48_bank_r); - DECLARE_WRITE8_MEMBER(hp49_bank_w); - TIMER_CALLBACK_MEMBER(hp48_rs232_byte_recv_cb); - TIMER_CALLBACK_MEMBER(hp48_rs232_byte_sent_cb); - TIMER_CALLBACK_MEMBER(hp48_chardev_byte_recv_cb); - TIMER_CALLBACK_MEMBER(hp48_kbd_cb); - TIMER_CALLBACK_MEMBER(hp48_timer1_cb); - TIMER_CALLBACK_MEMBER(hp48_timer2_cb); - void hp48_update_annunciators(); - void hp48_apply_modules(); - required_device m_maincpu; - required_device m_dac; - required_device m_palette; - void hp48_pulse_irq( int irq_line); - void hp48_rs232_start_recv_byte( UINT8 data ); - void hp48_rs232_send_byte( ); - int hp48_get_in( ); - void hp48_update_kdn( ); - void hp48_reset_modules( ); - void hp48_decode_nibble( UINT8* dst, UINT8* src, int size ); - void hp48_encode_nibble( UINT8* dst, UINT8* src, int size ); - - /* memory controller */ - DECLARE_WRITE_LINE_MEMBER( hp48_mem_reset ); - DECLARE_WRITE32_MEMBER( hp48_mem_config ); - DECLARE_WRITE32_MEMBER( hp48_mem_unconfig ); - DECLARE_READ32_MEMBER( hp48_mem_id ); - - /* CRC computation */ - DECLARE_WRITE32_MEMBER( hp48_mem_crc ); - - /* IN/OUT registers */ - DECLARE_READ32_MEMBER( hp48_reg_in ); - DECLARE_WRITE32_MEMBER( hp48_reg_out ); - - /* keybord interrupt system */ - DECLARE_WRITE_LINE_MEMBER( hp48_rsi ); -}; - - -/*************************************************************************** - MACROS -***************************************************************************/ - -/* read from I/O memory */ -#define HP48_IO_4(x) (m_io[(x)]) -#define HP48_IO_8(x) (m_io[(x)] | (m_io[(x)+1] << 4)) -#define HP48_IO_12(x) (m_io[(x)] | (m_io[(x)+1] << 4) | (m_io[(x)+2] << 8)) -#define HP48_IO_20(x) (m_io[(x)] | (m_io[(x)+1] << 4) | (m_io[(x)+2] << 8) | \ - (m_io[(x)+3] << 12) | (m_io[(x)+4] << 16)) - - -/*----------- defined in machine/hp48.c -----------*/ - -/*************************************************************************** - GLOBAL VARIABLES & CONSTANTS -***************************************************************************/ - -/* I/O memory */ - - - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - -/* list of memory modules from highest to lowest priority */ -#define HP48_HDW 0 -#define HP48_NCE2 1 -#define HP48_CE1 2 -#define HP48_CE2 3 -#define HP48_NCE3 4 -#define HP48_NCE1 5 - -/****************************** cards ********************************/ - -class hp48_port_image_device : public device_t, - public device_image_interface -{ -public: - // construction/destruction - hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - static void set_port_config(device_t &device, int port, int module, int max_size) - { - downcast(device).m_port = port; - downcast(device).m_module = module; - downcast(device).m_max_size = max_size; - } - - // image-level overrides - virtual iodevice_t image_type() const { return IO_MEMCARD; } - - virtual bool is_readable() const { return 1; } - virtual bool is_writeable() const { return 1; } - virtual bool is_creatable() const { return 1; } - virtual bool must_be_loaded() const { return 0; } - virtual bool is_reset_on_load() const { return 0; } - virtual const char *image_interface() const { return NULL; } - virtual const char *file_extensions() const { return "crd"; } - virtual const option_guide *create_option_guide() const { return NULL; } - - virtual bool call_load(); - virtual void call_unload(); - virtual bool call_create(int format_type, option_resolution *format_options); -protected: - // device-level overrides - virtual void device_config_complete(); - virtual void device_start(); -private: - void hp48_fill_port(); - void hp48_unfill_port(); - - int m_port; /* port index: 0 or 1 (for port 1 and 2) */ - int m_module; /* memory module where the port is visible */ - int m_max_size; /* maximum size, in bytes 128 KB or 4 GB */ -}; - -// device type definition -extern const device_type HP48_PORT; - -#define MCFG_HP48_PORT_ADD(_tag, _port, _module, _max_size) \ - MCFG_DEVICE_ADD(_tag, HP48_PORT, 0) \ - hp48_port_image_device::set_port_config(*device, _port, _module, _max_size); diff --git a/src/mess/includes/huebler.h b/src/mess/includes/huebler.h deleted file mode 100644 index eb49ae03f07..00000000000 --- a/src/mess/includes/huebler.h +++ /dev/null @@ -1,104 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __HUEBLER__ -#define __HUEBLER__ - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define Z80CTC_TAG "z80ctc" -#define Z80SIO_TAG "z80sio" -#define Z80PIO1_TAG "z80pio1" -#define Z80PIO2_TAG "z80pio2" - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/z80pio.h" -#include "machine/z80dart.h" -#include "machine/z80ctc.h" - -class amu880_state : public driver_device -{ -public: - amu880_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_z80sio(*this, Z80SIO_TAG), - m_palette(*this, "palette"), - m_kb_rom(*this, "keyboard"), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_y10(*this, "Y10"), - m_y11(*this, "Y11"), - m_y12(*this, "Y12"), - m_y13(*this, "Y13"), - m_y14(*this, "Y14"), - m_y15(*this, "Y15"), - m_special(*this, "SPECIAL"), - m_key_d6(0), - m_key_d7(0), - m_key_a8(1) - { } - - required_device m_cassette; - required_device m_z80sio; - required_device m_palette; - required_memory_region m_kb_rom; - required_memory_region m_char_rom; - required_shared_ptr m_video_ram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - required_ioport m_y10; - required_ioport m_y11; - required_ioport m_y12; - required_ioport m_y13; - required_ioport m_y14; - required_ioport m_y15; - required_ioport m_special; - - virtual void machine_start(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( keyboard_r ); - TIMER_DEVICE_CALLBACK_MEMBER( tape_tick ); - - void scan_keyboard(); - - // keyboard state - ioport_port* m_key_row[16]; - int m_key_d6; - int m_key_d7; - int m_key_a4; - int m_key_a5; - int m_key_a8; - - // video state - TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); - DECLARE_WRITE_LINE_MEMBER(ctc_z0_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); - DECLARE_READ_LINE_MEMBER(cassette_r); - DECLARE_WRITE_LINE_MEMBER(cassette_w); -}; - -#endif diff --git a/src/mess/includes/hx20.h b/src/mess/includes/hx20.h deleted file mode 100644 index 11fefd77b62..00000000000 --- a/src/mess/includes/hx20.h +++ /dev/null @@ -1,139 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __HX20__ -#define __HX20__ - -#include "bus/rs232/rs232.h" -#include "cpu/m6800/m6800.h" -#include "imagedev/cassette.h" -#include "bus/epson_sio/epson_sio.h" -#include "machine/mc146818.h" -#include "machine/ram.h" -#include "video/upd7227.h" -#include "sound/speaker.h" -#include "rendlay.h" - -#define HD6301V1_MAIN_TAG "8g" -#define HD6301V1_SLAVE_TAG "6d" -#define MC146818_TAG "6g" -#define UPD7227_0_TAG "lcdc0" -#define UPD7227_1_TAG "lcdc1" -#define UPD7227_2_TAG "lcdc2" -#define UPD7227_3_TAG "lcdc3" -#define UPD7227_4_TAG "lcdc4" -#define UPD7227_5_TAG "lcdc5" -#define SPEAKER_TAG "speaker" -#define CASSETTE_TAG "cassette" -#define RS232_TAG "rs232" -#define SCREEN_TAG "screen" - -class hx20_state : public driver_device -{ -public: - hx20_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, HD6301V1_MAIN_TAG), - m_subcpu(*this, HD6301V1_SLAVE_TAG), - m_rtc(*this, MC146818_TAG), - m_lcdc0(*this, UPD7227_0_TAG), - m_lcdc1(*this, UPD7227_1_TAG), - m_lcdc2(*this, UPD7227_2_TAG), - m_lcdc3(*this, UPD7227_3_TAG), - m_lcdc4(*this, UPD7227_4_TAG), - m_lcdc5(*this, UPD7227_5_TAG), - m_speaker(*this, SPEAKER_TAG), - m_cassette(*this, CASSETTE_TAG), - m_rs232(*this, RS232_TAG), - m_sio(*this, "sio"), - m_ksc0(*this, "KSC0"), - m_ksc1(*this, "KSC1"), - m_ksc2(*this, "KSC2"), - m_ksc3(*this, "KSC3"), - m_ksc4(*this, "KSC4"), - m_ksc5(*this, "KSC5"), - m_ksc6(*this, "KSC6"), - m_ksc7(*this, "KSC7"), - m_sw6(*this, "SW6"), - m_slave_rx(1), - m_slave_tx(1), - m_slave_flag(1), - m_rtc_irq(CLEAR_LINE), - m_kbrequest(1) - { } - - required_device m_maincpu; - required_device m_subcpu; - required_device m_rtc; - required_device m_lcdc0; - required_device m_lcdc1; - required_device m_lcdc2; - required_device m_lcdc3; - required_device m_lcdc4; - required_device m_lcdc5; - required_device m_speaker; - required_device m_cassette; - required_device m_rs232; - required_device m_sio; - required_ioport m_ksc0; - required_ioport m_ksc1; - required_ioport m_ksc2; - required_ioport m_ksc3; - required_ioport m_ksc4; - required_ioport m_ksc5; - required_ioport m_ksc6; - required_ioport m_ksc7; - required_ioport m_sw6; - - virtual void machine_start(); - DECLARE_PALETTE_INIT(hx20); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_WRITE8_MEMBER( ksc_w ); - DECLARE_READ8_MEMBER( krtn07_r ); - DECLARE_READ8_MEMBER( krtn89_r ); - DECLARE_WRITE8_MEMBER( lcd_cs_w ); - DECLARE_WRITE8_MEMBER( lcd_data_w ); - - DECLARE_READ8_MEMBER( main_p1_r ); - DECLARE_WRITE8_MEMBER( main_p1_w ); - DECLARE_READ8_MEMBER( main_p2_r ); - DECLARE_WRITE8_MEMBER( main_p2_w ); - - DECLARE_READ8_MEMBER( slave_p1_r ); - DECLARE_WRITE8_MEMBER( slave_p1_w ); - DECLARE_READ8_MEMBER( slave_p2_r ); - DECLARE_WRITE8_MEMBER( slave_p2_w ); - DECLARE_READ8_MEMBER( slave_p3_r ); - DECLARE_WRITE8_MEMBER( slave_p3_w ); - DECLARE_READ8_MEMBER( slave_p4_r ); - DECLARE_WRITE8_MEMBER( slave_p4_w ); - - DECLARE_WRITE_LINE_MEMBER( rtc_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( sio_rx_w ) { m_sio_rx = state; } - DECLARE_WRITE_LINE_MEMBER( sio_pin_w ) { m_sio_pin = state; } - - void update_interrupt(); - - // CPU state - int m_slave_sio; - int m_slave_rx; - int m_slave_tx; - int m_slave_flag; - int m_rtc_irq; - - // keyboard state - UINT8 m_ksc; - int m_kbrequest; - - // video state - UINT8 m_lcd_data; - - // sio state - int m_sio_rx; - int m_sio_pin; -}; - -#endif diff --git a/src/mess/includes/imds2.h b/src/mess/includes/imds2.h deleted file mode 100644 index 298b808be82..00000000000 --- a/src/mess/includes/imds2.h +++ /dev/null @@ -1,145 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:F. Ulivi -// Driver for Intel Intellec MDS series-II - -#ifndef _IMDS2_H_ -#define _IMDS2_H_ - -#include "emu.h" -#include "cpu/i8085/i8085.h" -#include "cpu/mcs48/mcs48.h" -#include "machine/i8257.h" -#include "video/i8275.h" -#include "sound/beep.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/i8271.h" -#include "imagedev/flopdrv.h" -#include "bus/centronics/ctronics.h" - -class imds2_state : public driver_device -{ - public: - imds2_state(const machine_config &mconfig, device_type type, const char *tag); - - DECLARE_READ8_MEMBER(ipc_mem_read); - DECLARE_WRITE8_MEMBER(ipc_mem_write); - DECLARE_WRITE8_MEMBER(imds2_ipc_control_w); - DECLARE_WRITE_LINE_MEMBER(imds2_ipc_intr); - DECLARE_READ8_MEMBER(imds2_ipcsyspic_r); - DECLARE_READ8_MEMBER(imds2_ipclocpic_r); - DECLARE_WRITE8_MEMBER(imds2_ipcsyspic_w); - DECLARE_WRITE8_MEMBER(imds2_ipclocpic_w); - - DECLARE_WRITE8_MEMBER(imds2_miscout_w); - DECLARE_READ8_MEMBER(imds2_miscin_r); - DECLARE_WRITE_LINE_MEMBER(imds2_beep_timer_w); - DECLARE_WRITE8_MEMBER(imds2_start_timer_w); - DECLARE_READ8_MEMBER(imds2_kb_read); - DECLARE_READ8_MEMBER(imds2_kb_port_p2_r); - DECLARE_WRITE8_MEMBER(imds2_kb_port_p1_w); - DECLARE_READ8_MEMBER(imds2_kb_port_t0_r); - DECLARE_READ8_MEMBER(imds2_kb_port_t1_r); - DECLARE_WRITE8_MEMBER(imds2_ioc_dbbout_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_f0_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_set_f1_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_reset_f1_w); - DECLARE_READ8_MEMBER(imds2_ioc_status_r); - DECLARE_READ8_MEMBER(imds2_ioc_dbbin_r); - DECLARE_READ8_MEMBER(imds2_ipc_dbbout_r); - DECLARE_READ8_MEMBER(imds2_ipc_status_r); - DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_data_w); - DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_cmd_w); - DECLARE_WRITE_LINE_MEMBER(imds2_hrq_w); - - DECLARE_READ8_MEMBER(imds2_ioc_mem_r); - DECLARE_WRITE8_MEMBER(imds2_ioc_mem_w); - DECLARE_READ8_MEMBER(imds2_pio_port_p1_r); - DECLARE_WRITE8_MEMBER(imds2_pio_port_p1_w); - DECLARE_READ8_MEMBER(imds2_pio_port_p2_r); - DECLARE_WRITE8_MEMBER(imds2_pio_port_p2_w); - DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_ack_w); - DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_busy_w); - DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_select_w); - - I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels); - - virtual void driver_start(); - virtual void machine_start(); - virtual void video_start(); - virtual void machine_reset(); - - private: - required_device m_ipccpu; - required_device m_ipcsyspic; - required_device m_ipclocpic; - required_device m_ioccpu; - required_device m_iocdma; - required_device m_ioccrtc; - required_device m_iocbeep; - required_device m_ioctimer; - required_device m_iocfdc; - required_device m_flop0; - required_device m_flop1; - required_device m_iocpio; - required_device m_kbcpu; - required_device m_palette; - required_device m_gfxdecode; - required_device m_centronics; - required_ioport m_io_key0; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; - required_ioport m_io_key4; - required_ioport m_io_key5; - required_ioport m_io_key6; - required_ioport m_io_key7; - required_ioport m_ioc_options; - - std::vector m_ipc_ram; - - bool imds2_in_ipc_rom(offs_t offset) const; - - void imds2_update_beeper(void); - void imds2_update_printer(void); - int floppy_load(floppy_image_device *dev); - void floppy_unload(floppy_image_device *dev); - - // IPC control port - UINT8 m_ipc_control; - - // IPC ROM content - const UINT8 *m_ipc_rom; - - // Character generator - const UINT8 *m_chargen; - - // MISCOUT state - UINT8 m_miscout; - - // Beeper timer line - int m_beeper_timer; - - // Keyboard state - UINT8 m_kb_p1; - - // IPC to IOC buffer - UINT8 m_ioc_ibf; - - // IOC to IPC buffer - UINT8 m_ioc_obf; - - // IPC/IOC status - UINT8 m_ipc_ioc_status; - - // PIO port 1 - UINT8 m_pio_port1; - - // PIO port 2 - UINT8 m_pio_port2; - - // PIO device status byte - UINT8 m_device_status_byte; -}; - -#endif /* _IMDS2_H_ */ diff --git a/src/mess/includes/intv.h b/src/mess/includes/intv.h deleted file mode 100644 index 952844a2022..00000000000 --- a/src/mess/includes/intv.h +++ /dev/null @@ -1,155 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods,Frank Palazzolo -/***************************************************************************** - * - * includes/intv.h - * - ****************************************************************************/ - -#ifndef INTV_H_ -#define INTV_H_ - -#include "sound/ay8910.h" -#include "video/stic.h" -#include "bus/intv/slot.h" -#include "bus/intv/voice.h" -#include "bus/intv/ecs.h" -//#include "bus/intv/keycomp.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -class intv_state : public driver_device -{ -public: - enum - { - TIMER_INTV_INTERRUPT2_COMPLETE, - TIMER_INTV_INTERRUPT_COMPLETE, - TIMER_INTV_BTB_FILL - }; - - intv_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_sound(*this, "ay8914"), - m_stic(*this, "stic"), - m_cart(*this, "cartslot"), - m_intvkbd_dualport_ram(*this, "dualport_ram"), - m_videoram(*this, "videoram"), - m_keyboard(*this, "keyboard"), - m_iocart1(*this, "ioslot1"), - m_iocart2(*this, "ioslot2"), - m_region_maincpu(*this, "maincpu"), - m_region_keyboard(*this, "keyboard"), - m_io_options(*this, "OPTIONS"), - m_io_test(*this, "TEST"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_sound; - required_device m_stic; - optional_device m_cart; - optional_shared_ptr m_intvkbd_dualport_ram; - optional_shared_ptr m_videoram; - - DECLARE_READ16_MEMBER(intv_stic_r); - DECLARE_WRITE16_MEMBER(intv_stic_w); - DECLARE_READ16_MEMBER(intv_gram_r); - DECLARE_WRITE16_MEMBER(intv_gram_w); - DECLARE_READ16_MEMBER(intv_ram8_r); - DECLARE_WRITE16_MEMBER(intv_ram8_w); - DECLARE_READ16_MEMBER(intv_ram16_r); - DECLARE_WRITE16_MEMBER(intv_ram16_w); - DECLARE_READ8_MEMBER(intvkb_iocart_r); - - DECLARE_READ8_MEMBER(intv_right_control_r); - DECLARE_READ8_MEMBER(intv_left_control_r); - - UINT8 m_bus_copy_mode; - UINT8 m_backtab_row; - UINT16 m_ram16[0x160]; - int m_sr1_int_pending; - UINT8 m_ram8[256]; - - // Keyboard Component - DECLARE_READ8_MEMBER(intvkbd_tms9927_r); - DECLARE_WRITE8_MEMBER(intvkbd_tms9927_w); - DECLARE_WRITE16_MEMBER(intvkbd_dualport16_w); - DECLARE_READ8_MEMBER(intvkbd_dualport8_lsb_r); - DECLARE_WRITE8_MEMBER(intvkbd_dualport8_lsb_w); - DECLARE_READ8_MEMBER(intvkbd_dualport8_msb_r); - DECLARE_WRITE8_MEMBER(intvkbd_dualport8_msb_w); - - UINT8 m_tms9927_num_rows; - UINT8 m_tms9927_cursor_col; - UINT8 m_tms9927_cursor_row; - UINT8 m_tms9927_last_row; - - int m_intvkbd_text_blanked; - int m_intvkbd_keyboard_col; - int m_tape_int_pending; - int m_tape_interrupts_enabled; - int m_tape_unknown_write[6]; - int m_tape_motor_mode; - DECLARE_DRIVER_INIT(intvecs); - DECLARE_DRIVER_INIT(intvkbd); - DECLARE_DRIVER_INIT(intv); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(intv); - void ecs_banks_restore(); - UINT32 screen_update_intv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_intvkbd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(intv_interrupt2); - INTERRUPT_GEN_MEMBER(intv_interrupt); - TIMER_CALLBACK_MEMBER(intv_interrupt2_complete); - TIMER_CALLBACK_MEMBER(intv_interrupt_complete); - TIMER_CALLBACK_MEMBER(intv_btb_fill); - -protected: - int m_is_keybd; - - optional_device m_keyboard; - optional_device m_iocart1; - optional_device m_iocart2; - required_memory_region m_region_maincpu; - optional_memory_region m_region_keyboard; - required_ioport m_io_options; - optional_ioport m_io_test; - - optional_device m_gfxdecode; - required_device m_palette; - - ioport_port *m_keypad[4]; - ioport_port *m_disc[4]; - ioport_port *m_discx[4]; - ioport_port *m_discy[4]; - ioport_port *m_intv_keyboard[10]; - - int intv_load_rom_file(device_image_interface &image); - UINT8 intv_control_r(int hand); - void intv_set_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - UINT32 intv_get_pixel(bitmap_ind16 &bitmap, int x, int y); - void intv_plot_box(bitmap_ind16 &bm, int x, int y, int w, int h, int color); - int sprites_collide(int spriteNum1, int spriteNum2); - void determine_sprite_collisions(); - void render_sprites(); - void render_line(bitmap_ind16 &bitmap, UINT8 nextByte, UINT16 x, UINT16 y, UINT8 fgcolor, UINT8 bgcolor); - void render_colored_squares(bitmap_ind16 &bitmap, UINT16 x, UINT16 y, UINT8 color0, UINT8 color1, UINT8 color2, UINT8 color3); - void render_color_stack_mode(bitmap_ind16 &bitmap); - void render_fg_bg_mode(bitmap_ind16 &bitmap); - void copy_sprites_to_background(bitmap_ind16 &bitmap); - void render_background(bitmap_ind16 &bitmap); - void draw_borders(bitmap_ind16 &bm); - void intv_stic_screenrefresh(); - void draw_background(bitmap_ind16 &bitmap, int transparency); - void draw_sprites(bitmap_ind16 &bitmap, int behind_foreground); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* INTV_H_ */ diff --git a/src/mess/includes/jupiter.h b/src/mess/includes/jupiter.h deleted file mode 100644 index 03ffa92de5e..00000000000 --- a/src/mess/includes/jupiter.h +++ /dev/null @@ -1,59 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Robbbert -#pragma once - -#ifndef __JUPITER__ -#define __JUPITER__ - -#define MCM6571AP_TAG "vid125_6c" -#define S6820_TAG "vid125_4a" -#define Z80_TAG "cpu126_4c" -#define INS1771N1_TAG "fdi027_4c" -#define MC6820P_TAG "fdi027_4b" -#define MC6850P_TAG "rsi068_6a" -#define MC6821P_TAG "sdm058_4b" - -class jupiter2_state : public driver_device -{ -public: - jupiter2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MCM6571AP_TAG) - { } - - required_device m_maincpu; - - virtual void machine_start(); - DECLARE_DRIVER_INIT(jupiter); -}; - -class jupiter3_state : public driver_device -{ -public: - jupiter3_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_p_videoram(*this, "p_videoram"), - m_p_ram(*this, "p_ram") - { } - - required_device m_maincpu; - - DECLARE_WRITE8_MEMBER(kbd_put); - DECLARE_READ8_MEMBER(status_r); - DECLARE_READ8_MEMBER(key_r); - DECLARE_READ8_MEMBER(ff_r); - UINT8 m_term_data; - - required_shared_ptr m_p_videoram; - required_shared_ptr m_p_ram; - const UINT8 *m_p_chargen; - - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_DRIVER_INIT(jupiter3); -}; - -#endif diff --git a/src/mess/includes/kaypro.h b/src/mess/includes/kaypro.h deleted file mode 100644 index ef5d5ab008a..00000000000 --- a/src/mess/includes/kaypro.h +++ /dev/null @@ -1,113 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robbbert -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80pio.h" -#include "machine/z80dart.h" -#include "machine/com8116.h" -#include "bus/centronics/ctronics.h" -#include "imagedev/snapquik.h" -#include "sound/beep.h" -#include "video/mc6845.h" -#include "machine/wd_fdc.h" - -struct kay_kbd_t; - -class kaypro_state : public driver_device -{ -public: - enum - { - TIMER_FLOPPY - }; - - kaypro_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_palette(*this, "palette") - , m_maincpu(*this, "maincpu") - , m_pio_g(*this, "z80pio_g") - , m_pio_s(*this, "z80pio_s") - , m_sio(*this, "z80sio") - , m_sio2x(*this, "z80sio_2x") - , m_centronics(*this, "centronics") - , m_fdc(*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") - , m_crtc(*this, "crtc") - , m_beep(*this, "beeper") - {} - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_READ8_MEMBER(kaypro2x_87_r); - DECLARE_READ8_MEMBER(kaypro2x_system_port_r); - DECLARE_READ8_MEMBER(kaypro2x_status_r); - DECLARE_READ8_MEMBER(kaypro2x_videoram_r); - DECLARE_WRITE8_MEMBER(kaypro2x_system_port_w); - DECLARE_WRITE8_MEMBER(kaypro2x_index_w); - DECLARE_WRITE8_MEMBER(kaypro2x_register_w); - DECLARE_WRITE8_MEMBER(kaypro2x_videoram_w); - DECLARE_READ8_MEMBER(pio_system_r); - DECLARE_WRITE8_MEMBER(common_pio_system_w); - DECLARE_WRITE8_MEMBER(kayproii_pio_system_w); - DECLARE_WRITE8_MEMBER(kaypro4_pio_system_w); - DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - DECLARE_READ8_MEMBER(kaypro_videoram_r); - DECLARE_WRITE8_MEMBER(kaypro_videoram_w); - DECLARE_MACHINE_START(kayproii); - DECLARE_MACHINE_RESET(kaypro); - DECLARE_VIDEO_START(kaypro); - DECLARE_PALETTE_INIT(kaypro); - DECLARE_MACHINE_RESET(kay_kbd); - DECLARE_DRIVER_INIT(kaypro); - DECLARE_FLOPPY_FORMATS(kayproii_floppy_formats); - DECLARE_FLOPPY_FORMATS(kaypro2x_floppy_formats); - UINT32 screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(kay_kbd_interrupt); - DECLARE_READ8_MEMBER(kaypro_sio_r); - DECLARE_WRITE8_MEMBER(kaypro_sio_w); - MC6845_UPDATE_ROW(kaypro2x_update_row); - DECLARE_QUICKLOAD_LOAD_MEMBER(kaypro); - const UINT8 *m_p_chargen; - UINT8 m_mc6845_cursor[16]; - UINT8 m_mc6845_reg[32]; - UINT8 m_mc6845_ind; - UINT8 m_framecnt; - UINT8 *m_p_videoram; - kay_kbd_t *m_kbd; - int m_centronics_busy; - required_device m_palette; - -private: - bool m_is_motor_off; - UINT8 m_fdc_rq; - UINT8 m_system_port; - UINT16 m_mc6845_video_address; - floppy_image_device *m_floppy; - void mc6845_cursor_configure(); - void mc6845_screen_configure(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - required_device m_maincpu; - optional_device m_pio_g; - optional_device m_pio_s; - required_device m_sio; - optional_device m_sio2x; - required_device m_centronics; - required_device m_fdc; - required_device m_floppy0; - optional_device m_floppy1; - optional_device m_crtc; - required_device m_beep; -}; - - -/*----------- defined in machine/kay_kbd.c -----------*/ - -UINT8 kay_kbd_c_r( running_machine &machine ); -UINT8 kay_kbd_d_r( running_machine &machine ); -void kay_kbd_d_w( running_machine &machine, UINT8 data ); - -INPUT_PORTS_EXTERN( kay_kbd ); diff --git a/src/mess/includes/kc.h b/src/mess/includes/kc.h deleted file mode 100644 index 46f1cd93d1e..00000000000 --- a/src/mess/includes/kc.h +++ /dev/null @@ -1,189 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker,Sandro Ronco -/***************************************************************************** - * - * includes/kc.h - * - ****************************************************************************/ - -#ifndef KC_H_ -#define KC_H_ - -/* Devices */ -#include "imagedev/cassette.h" -#include "machine/ram.h" - -// Components -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80ctc.h" -#include "machine/z80pio.h" -#include "machine/ram.h" -#include "machine/kc_keyb.h" -#include "machine/rescap.h" -#include "cpu/z80/z80daisy.h" -#include "sound/speaker.h" -#include "sound/wave.h" - -// Devices -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" - -// Formats -#include "formats/kc_cas.h" - -// Expansions -#include "bus/kc/kc.h" -#include "bus/kc/ram.h" -#include "bus/kc/rom.h" -#include "bus/kc/d002.h" -#include "bus/kc/d004.h" - -// from service manual -#define KC85_3_CLOCK 1751938 -#define KC85_4_CLOCK 1773447 - -#define KC85_4_SCREEN_PIXEL_RAM_SIZE 0x04000 -#define KC85_4_SCREEN_COLOUR_RAM_SIZE 0x04000 - -#define KC85_PALETTE_SIZE 24 -#define KC85_SCREEN_WIDTH 320 -#define KC85_SCREEN_HEIGHT 256 - -// cassette input polling frequency -#define KC_CASSETTE_TIMER_FREQUENCY attotime::from_hz(44100) - - -class kc_state : public driver_device -{ -public: - kc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_z80pio(*this, "z80pio"), - m_z80ctc(*this, "z80ctc"), - m_ram(*this, RAM_TAG), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette") - { } - - required_device m_maincpu; - required_device m_z80pio; - required_device m_z80ctc; - required_device m_ram; - required_device m_speaker; - required_device m_cassette; - - // defined in machine/kc.c - virtual void machine_start(); - virtual void machine_reset(); - - // modules read/write - DECLARE_READ8_MEMBER ( expansion_read ); - DECLARE_WRITE8_MEMBER( expansion_write ); - DECLARE_READ8_MEMBER ( expansion_4000_r ); - DECLARE_WRITE8_MEMBER( expansion_4000_w ); - DECLARE_READ8_MEMBER ( expansion_8000_r ); - DECLARE_WRITE8_MEMBER( expansion_8000_w ); - DECLARE_READ8_MEMBER ( expansion_c000_r ); - DECLARE_WRITE8_MEMBER( expansion_c000_w ); - DECLARE_READ8_MEMBER ( expansion_e000_r ); - DECLARE_WRITE8_MEMBER( expansion_e000_w ); - DECLARE_READ8_MEMBER ( expansion_io_read ); - DECLARE_WRITE8_MEMBER( expansion_io_write ); - - // bankswitch - virtual void update_0x00000(); - virtual void update_0x04000(); - virtual void update_0x08000(); - virtual void update_0x0c000(); - virtual void update_0x0e000(); - - // PIO callback - DECLARE_READ8_MEMBER( pio_porta_r ); - DECLARE_READ8_MEMBER( pio_portb_r ); - DECLARE_WRITE_LINE_MEMBER( pio_ardy_cb); - DECLARE_WRITE_LINE_MEMBER( pio_brdy_cb); - DECLARE_WRITE8_MEMBER( pio_porta_w ); - DECLARE_WRITE8_MEMBER( pio_portb_w ); - - // CTC callback - DECLARE_WRITE_LINE_MEMBER( ctc_zc0_callback ); - DECLARE_WRITE_LINE_MEMBER( ctc_zc1_callback ); - DECLARE_WRITE_LINE_MEMBER( ctc_zc2_callback ); - - // keyboard - DECLARE_WRITE_LINE_MEMBER( keyboard_cb ); - - // cassette - void update_cassette(int state); - void cassette_set_motor(int motor_state); - - // speaker - void speaker_update(); - - // defined in video/kc.c - virtual void video_start(); - virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER( video_toggle_blink_state ); - void video_draw_8_pixels(bitmap_ind16 &bitmap, int x, int y, UINT8 colour_byte, UINT8 gfx_byte); - - // driver state - UINT8 * m_ram_base; - UINT8 * m_video_ram; - int m_pio_data[2]; - int m_high_resolution; - UINT8 m_ardy; - UINT8 m_brdy; - int m_kc85_blink_state; - int m_k0_line; - int m_k1_line; - UINT8 m_speaker_level; - - // cassette - emu_timer * m_cassette_timer; - emu_timer * m_cassette_oneshot_timer; - int m_astb; - int m_cassette_in; - - kcexp_slot_device * m_expansions[3]; - DECLARE_PALETTE_INIT(kc85); - TIMER_CALLBACK_MEMBER(kc_cassette_oneshot_timer); - TIMER_CALLBACK_MEMBER(kc_cassette_timer_callback); - TIMER_DEVICE_CALLBACK_MEMBER(kc_scanline); - - DECLARE_QUICKLOAD_LOAD_MEMBER( kc ); -}; - - -class kc85_4_state : public kc_state -{ -public: - kc85_4_state(const machine_config &mconfig, device_type type, const char *tag) - : kc_state(mconfig, type, tag) - { } - - // defined in machine/kc.c - virtual void machine_reset(); - - virtual void update_0x04000(); - virtual void update_0x08000(); - virtual void update_0x0c000(); - - DECLARE_READ8_MEMBER( kc85_4_86_r ); - DECLARE_READ8_MEMBER( kc85_4_84_r ); - DECLARE_WRITE8_MEMBER( kc85_4_86_w ); - DECLARE_WRITE8_MEMBER( kc85_4_84_w ); - - // defined in video/kc.c - virtual void video_start(); - virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void video_control_w(int data); - - // driver state - UINT8 m_port_84_data; - UINT8 m_port_86_data; - UINT8 * m_display_video_ram; -}; - -#endif /* KC_H_ */ diff --git a/src/mess/includes/kramermc.h b/src/mess/includes/kramermc.h deleted file mode 100644 index 87222f7e578..00000000000 --- a/src/mess/includes/kramermc.h +++ /dev/null @@ -1,41 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/kramermc.h - * - ****************************************************************************/ - -#ifndef KRAMERMC_H_ -#define KRAMERMC_H_ - -#include "machine/z80pio.h" - -class kramermc_state : public driver_device -{ -public: - kramermc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 m_key_row; - DECLARE_DRIVER_INIT(kramermc); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_kramermc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(kramermc_port_a_r); - DECLARE_READ8_MEMBER(kramermc_port_b_r); - DECLARE_WRITE8_MEMBER(kramermc_port_a_w); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; -}; - -/*----------- defined in video/kramermc.c -----------*/ - -extern const gfx_layout kramermc_charlayout; - - -#endif /* KRAMERMC_h_ */ diff --git a/src/mess/includes/kyocera.h b/src/mess/includes/kyocera.h deleted file mode 100644 index ef5e5737dea..00000000000 --- a/src/mess/includes/kyocera.h +++ /dev/null @@ -1,291 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __KYOCERA__ -#define __KYOCERA__ - - -#include "bus/rs232/rs232.h" -#include "cpu/i8085/i8085.h" -#include "imagedev/cassette.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8155.h" -#include "machine/i8251.h" -#include "machine/im6402.h" -#include "machine/ram.h" -#include "machine/rp5c01.h" -#include "machine/upd1990a.h" -#include "video/hd44102.h" -#include "video/hd61830.h" -#include "sound/speaker.h" -#include "rendlay.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define SCREEN_TAG "screen" -#define I8085_TAG "m19" -#define I8155_TAG "m25" -#define UPD1990A_TAG "m18" -#define IM6402_TAG "m22" -#define MC14412_TAG "m31" -#define HD44102_0_TAG "m1" -#define HD44102_1_TAG "m2" -#define HD44102_2_TAG "m3" -#define HD44102_3_TAG "m4" -#define HD44102_4_TAG "m5" -#define HD44102_5_TAG "m6" -#define HD44102_6_TAG "m7" -#define HD44102_7_TAG "m8" -#define HD44102_8_TAG "m9" -#define HD44102_9_TAG "m10" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" - -//#define I8085_TAG "m19" -//#define I8155_TAG "m12" -//#define MC14412_TAG "m8" -#define RP5C01A_TAG "m301" -#define TCM5089_TAG "m11" -#define I8251_TAG "m20" -#define HD61830_TAG "m18" - -class kc85_state : public driver_device -{ -public: - kc85_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8085_TAG), - m_rtc(*this, UPD1990A_TAG), - m_uart(*this, IM6402_TAG), - m_lcdc0(*this, HD44102_0_TAG), - m_lcdc1(*this, HD44102_1_TAG), - m_lcdc2(*this, HD44102_2_TAG), - m_lcdc3(*this, HD44102_3_TAG), - m_lcdc4(*this, HD44102_4_TAG), - m_lcdc5(*this, HD44102_5_TAG), - m_lcdc6(*this, HD44102_6_TAG), - m_lcdc7(*this, HD44102_7_TAG), - m_lcdc8(*this, HD44102_8_TAG), - m_lcdc9(*this, HD44102_9_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_opt_cart(*this, "opt_cartslot"), - m_ram(*this, RAM_TAG), - m_rs232(*this, RS232_TAG), - m_rom(*this, I8085_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_battery(*this, "BATTERY") - { } - - required_device m_maincpu; - required_device m_rtc; - optional_device m_uart; - required_device m_lcdc0; - required_device m_lcdc1; - required_device m_lcdc2; - required_device m_lcdc3; - required_device m_lcdc4; - required_device m_lcdc5; - required_device m_lcdc6; - required_device m_lcdc7; - required_device m_lcdc8; - required_device m_lcdc9; - required_device m_centronics; - required_device m_speaker; - required_device m_cassette; - required_device m_opt_cart; - required_device m_ram; - required_device m_rs232; - required_memory_region m_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_battery; - - virtual void machine_start(); - memory_region *m_opt_region; - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( uart_status_r ); - DECLARE_WRITE8_MEMBER( uart_ctrl_w ); - DECLARE_WRITE8_MEMBER( modem_w ); - DECLARE_WRITE8_MEMBER( ctrl_w ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_READ8_MEMBER( lcd_r ); - DECLARE_WRITE8_MEMBER( lcd_w ); - DECLARE_WRITE8_MEMBER( i8155_pa_w ); - DECLARE_WRITE8_MEMBER( i8155_pb_w ); - DECLARE_READ8_MEMBER( i8155_pc_r ); - DECLARE_WRITE_LINE_MEMBER( i8155_to_w ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); - - /* memory state */ - UINT8 m_bank; /* memory bank selection */ - - /* keyboard state */ - UINT16 m_keylatch; /* keyboard latch */ - - /* sound state */ - int m_buzzer; /* buzzer select */ - int m_bell; /* bell output */ - - int m_centronics_busy; - int m_centronics_select; - - DECLARE_PALETTE_INIT(kc85); - DECLARE_WRITE_LINE_MEMBER(kc85_sod_w); - DECLARE_READ_LINE_MEMBER(kc85_sid_r); -}; - -class trsm100_state : public kc85_state -{ -public: - trsm100_state(const machine_config &mconfig, device_type type, const char *tag) - : kc85_state(mconfig, type, tag) { } - - virtual void machine_start(); -}; - -class pc8201_state : public kc85_state -{ -public: - pc8201_state(const machine_config &mconfig, device_type type, const char *tag) - : kc85_state(mconfig, type, tag), - m_cas_cart(*this, "cas_cartslot") - { } - - virtual void machine_start(); - required_device m_cas_cart; - - DECLARE_READ8_MEMBER( bank_r ); - DECLARE_WRITE8_MEMBER( bank_w ); - DECLARE_WRITE8_MEMBER( scp_w ); - DECLARE_READ8_MEMBER( uart_status_r ); - DECLARE_WRITE8_MEMBER( romah_w ); - DECLARE_WRITE8_MEMBER( romal_w ); - DECLARE_WRITE8_MEMBER( romam_w ); - DECLARE_READ8_MEMBER( romrd_r ); - - void bankswitch(UINT8 data); - - // ROM cassette - int m_rom_sel; - UINT32 m_rom_addr; - - /* peripheral state */ - int m_iosel; /* serial interface select */ -}; - -class tandy200_state : public driver_device -{ -public: - tandy200_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8085_TAG), - m_rtc(*this, RP5C01A_TAG), - m_lcdc(*this, HD61830_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_cent_data_out(*this, "cent_data_out"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_opt_cart(*this, "opt_cartslot"), - m_ram(*this, RAM_TAG), - m_rs232(*this, RS232_TAG), - m_rom(*this, I8085_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8") - { } - - required_device m_maincpu; - required_device m_rtc; - required_device m_lcdc; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_speaker; - required_device m_cassette; - required_device m_opt_cart; - required_device m_ram; - required_device m_rs232; - required_memory_region m_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - - virtual void machine_start(); - memory_region *m_opt_region; - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( bank_r ); - DECLARE_WRITE8_MEMBER( bank_w ); - DECLARE_READ8_MEMBER( stbk_r ); - DECLARE_WRITE8_MEMBER( stbk_w ); - DECLARE_WRITE8_MEMBER( i8155_pa_w ); - DECLARE_WRITE8_MEMBER( i8155_pb_w ); - DECLARE_READ8_MEMBER( i8155_pc_r ); - DECLARE_WRITE_LINE_MEMBER( i8155_to_w ); - DECLARE_WRITE_LINE_MEMBER(kc85_sod_w); - DECLARE_READ_LINE_MEMBER(kc85_sid_r); - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_select ); - - DECLARE_PALETTE_INIT(tandy200); - - TIMER_DEVICE_CALLBACK_MEMBER(tandy200_tp_tick); - - void bankswitch(UINT8 data); - - /* memory state */ - UINT8 m_bank; /* memory bank selection */ - - /* keyboard state */ - UINT16 m_keylatch; /* keyboard latch */ - int m_tp; /* timing pulse */ - - /* sound state */ - int m_buzzer; /* buzzer select */ - int m_bell; /* bell output */ - - int m_centronics_busy; - int m_centronics_select; -}; - -/* ---------- defined in video/kyocera.c ---------- */ - -MACHINE_CONFIG_EXTERN( kc85_video ); -MACHINE_CONFIG_EXTERN( tandy200_video ); - -#endif diff --git a/src/mess/includes/lc80.h b/src/mess/includes/lc80.h deleted file mode 100644 index bf54ed9ed95..00000000000 --- a/src/mess/includes/lc80.h +++ /dev/null @@ -1,68 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __LC80__ -#define __LC80__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/z80pio.h" -#include "machine/z80ctc.h" -#include "sound/speaker.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "d201" -#define Z80CTC_TAG "d208" -#define Z80PIO1_TAG "d206" -#define Z80PIO2_TAG "d207" -//#define SPEAKER_TAG "b237" - -class lc80_state : public driver_device -{ -public: - lc80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_pio2(*this, Z80PIO2_TAG), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3") - { } - - required_device m_maincpu; - required_device m_pio2; - required_device m_cassette; - required_device m_speaker; - required_device m_ram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - - virtual void machine_start(); - - DECLARE_WRITE_LINE_MEMBER( ctc_z0_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z1_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); - DECLARE_WRITE8_MEMBER( pio1_pa_w ); - DECLARE_READ8_MEMBER( pio1_pb_r ); - DECLARE_WRITE8_MEMBER( pio1_pb_w ); - DECLARE_READ8_MEMBER( pio2_pb_r ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - - void update_display(); - - // display state - UINT8 m_digit; - UINT8 m_segment; -}; - -#endif diff --git a/src/mess/includes/lisa.h b/src/mess/includes/lisa.h deleted file mode 100644 index c52c53fb833..00000000000 --- a/src/mess/includes/lisa.h +++ /dev/null @@ -1,237 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Raphael Nabet -/***************************************************************************** - * - * includes/lisa.h - * - * Lisa driver declarations - * - ****************************************************************************/ - -#ifndef LISA_H_ -#define LISA_H_ - -#include "emu.h" -#include "cpu/m68000/m68000.h" -#include "machine/6522via.h" -#include "machine/8530scc.h" -#include "machine/6522via.h" -#include "machine/nvram.h" -#include "machine/applefdc.h" -#include "machine/sonydriv.h" -#include "sound/speaker.h" - -#define COP421_TAG "u9f" -#define KB_COP421_TAG "kbcop" - -/* lisa MMU segment regs */ -struct real_mmu_entry -{ - UINT16 sorg; - UINT16 slim; -}; - -/* MMU regs translated into a more efficient format */ -enum mmu_entry_t { RAM_stack_r, RAM_r, RAM_stack_rw, RAM_rw, IO, invalid, special_IO }; - -struct mmu_entry -{ - offs_t sorg; /* (real_sorg & 0x0fff) << 9 */ - mmu_entry_t type; /* <-> (real_slim & 0x0f00) */ - int slim; /* (~ ((real_slim & 0x00ff) << 9)) & 0x01ffff */ -}; - -enum floppy_hardware_t -{ - twiggy, /* twiggy drives (Lisa 1) */ - sony_lisa2, /* 3.5'' drive with LisaLite adapter (Lisa 2) */ - sony_lisa210 /* 3.5'' drive with modified fdc hardware (Lisa 2/10, Mac XL) */ -}; - -enum clock_mode_t -{ - clock_timer_disable = 0, - timer_disable = 1, - timer_interrupt = 2, /* timer underflow generates interrupt */ - timer_power_on = 3 /* timer underflow turns system on if it is off and gens interrupt */ -}; /* clock mode */ - -/* clock registers */ -struct clock_regs_t -{ - long alarm; /* alarm (20-bit binary) */ - int years; /* years (4-bit binary ) */ - int days1; /* days (BCD : 1-366) */ - int days2; - int days3; - int hours1; /* hours (BCD : 0-23) */ - int hours2; - int minutes1; /* minutes (BCD : 0-59) */ - int minutes2; - int seconds1; /* seconds (BCD : 0-59) */ - int seconds2; - int tenths; /* tenths of second (BCD : 0-9) */ - - int clock_write_ptr; /* clock byte to be written next (-1 if clock write disabled) */ - - enum clock_mode_t clock_mode; -}; - -struct lisa_features_t -{ - unsigned int has_fast_timers : 1; /* I/O board VIAs are clocked at 1.25 MHz (?) instead of .5 MHz (?) (Lisa 2/10, Mac XL) */ - /* Note that the beep routine in boot ROMs implies that - VIA clock is 1.25 times faster with fast timers than with - slow timers. I read the schematics again and again, and - I simply don't understand : in one case the VIA is - connected to the 68k E clock, which is CPUCK/10, and in - another case, to a generated PH2 clock which is CPUCK/4, - with additionnal logic to keep it in phase with the 68k - memory cycle. After hearing the beep when MacWorks XL - boots, I bet the correct values are .625 MHz and .5 MHz. - Maybe the schematics are wrong, and PH2 is CPUCK/8. - Maybe the board uses a 6522 variant with different - timings. */ - floppy_hardware_t floppy_hardware; - unsigned int has_double_sided_floppy : 1; /* true on lisa 1 and *hacked* lisa 2/10 / Mac XL */ - unsigned int has_mac_xl_video : 1; /* modified video for MacXL */ -}; - - -class lisa_state : public driver_device -{ -public: - lisa_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_via0(*this, "via6522_0"), - m_via1(*this, "via6522_1"), - m_fdc(*this, "fdc"), - m_scc(*this, "scc"), - m_speaker(*this, "speaker"), - m_nvram(*this, "nvram"), - m_fdc_rom(*this,"fdc_rom"), - m_fdc_ram(*this,"fdc_ram"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_mouse_x(*this, "MOUSE_X"), - m_io_mouse_y(*this, "MOUSE_Y"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_via0; - required_device m_via1; - optional_device m_fdc; - required_device m_scc; - required_device m_speaker; - required_device m_nvram; - - required_shared_ptr m_fdc_rom; - required_shared_ptr m_fdc_ram; - - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; - required_ioport m_io_mouse_x; - required_ioport m_io_mouse_y; - - required_device m_palette; - - UINT8 *m_ram_ptr; - UINT8 *m_rom_ptr; - UINT8 *m_videoROM_ptr; - int m_setup; - int m_seg; - real_mmu_entry m_real_mmu_regs[4][128]; - mmu_entry m_mmu_regs[4][128]; - int m_diag2; - int m_test_parity; - UINT16 m_mem_err_addr_latch; - int m_parity_error_pending; - int m_bad_parity_count; - UINT8 *m_bad_parity_table; - int m_VTMSK; - int m_VTIR; - UINT16 m_video_address_latch; - UINT16 *m_videoram_ptr; - int m_KBIR; - int m_FDIR; - int m_DISK_DIAG; - int m_MT1; - int m_PWM_floppy_motor_speed; - int m_model; - lisa_features_t m_features; - int m_COPS_Ready; - int m_COPS_command; - int m_fifo_data[8]; - int m_fifo_size; - int m_fifo_head; - int m_fifo_tail; - int m_mouse_data_offset; - int m_COPS_force_unplug; - emu_timer *m_mouse_timer; - int m_hold_COPS_data; - int m_NMIcode; - clock_regs_t m_clock_regs; - int m_key_matrix[8]; - int m_last_mx; - int m_last_my; - int m_frame_count; - int m_videoROM_address; - DECLARE_READ8_MEMBER(lisa_fdc_io_r); - DECLARE_WRITE8_MEMBER(lisa_fdc_io_w); - DECLARE_READ8_MEMBER(lisa_fdc_r); - DECLARE_READ8_MEMBER(lisa210_fdc_r); - DECLARE_WRITE8_MEMBER(lisa_fdc_w); - DECLARE_WRITE8_MEMBER(lisa210_fdc_w); - DECLARE_READ16_MEMBER(lisa_r); - DECLARE_WRITE16_MEMBER(lisa_w); - DECLARE_READ16_MEMBER(lisa_IO_r); - DECLARE_WRITE16_MEMBER(lisa_IO_w); - - DECLARE_DRIVER_INIT(lisa210); - DECLARE_DRIVER_INIT(mac_xl); - DECLARE_DRIVER_INIT(lisa2); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - void nvram_init(nvram_device &nvram, void *data, size_t size); - UINT32 screen_update_lisa(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(lisa_interrupt); - TIMER_CALLBACK_MEMBER(handle_mouse); - TIMER_CALLBACK_MEMBER(read_COPS_command); - TIMER_CALLBACK_MEMBER(set_COPS_ready); - DECLARE_WRITE8_MEMBER(COPS_via_out_a); - DECLARE_WRITE_LINE_MEMBER(COPS_via_out_ca2); - DECLARE_WRITE8_MEMBER(COPS_via_out_b); - DECLARE_WRITE_LINE_MEMBER(COPS_via_out_cb2); - - void field_interrupts(); - void set_parity_error_pending(int value); - void set_VTIR(int value); - void cpu_board_control_access(offs_t offset); - void init_COPS(); - void reset_COPS(); - void lisa_fdc_ttl_glue_access(offs_t offset); - void COPS_send_data_if_possible(); - void COPS_queue_data(const UINT8 *data, int len); - void COPS_via_irq_func(int val); - void scan_keyboard(); - void unplug_keyboard(); - void plug_keyboard(); - void init_lisa1(void); -}; - -#endif /* LISA_H_ */ diff --git a/src/mess/includes/llc.h b/src/mess/includes/llc.h deleted file mode 100644 index c98a7484146..00000000000 --- a/src/mess/includes/llc.h +++ /dev/null @@ -1,64 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic, Robbbert -/***************************************************************************** - * - * includes/llc.h - * - ****************************************************************************/ - -#ifndef LLC_H_ -#define LLC_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80pio.h" -#include "machine/z80ctc.h" -#include "machine/ram.h" -#include "machine/k7659kb.h" -#include "sound/speaker.h" - -class llc_state : public driver_device -{ -public: - llc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_speaker(*this, "speaker"), - m_p_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG) { } - - DECLARE_WRITE8_MEMBER(llc2_rom_disable_w); - DECLARE_WRITE8_MEMBER(llc2_basic_enable_w); - DECLARE_WRITE8_MEMBER(kbd_put); - DECLARE_READ8_MEMBER(llc1_port1_a_r); - DECLARE_READ8_MEMBER(llc1_port2_a_r); - DECLARE_READ8_MEMBER(llc1_port2_b_r); - DECLARE_WRITE8_MEMBER(llc1_port1_a_w); - DECLARE_WRITE8_MEMBER(llc1_port1_b_w); - DECLARE_READ8_MEMBER(llc2_port1_b_r); - DECLARE_READ8_MEMBER(llc2_port2_a_r); - DECLARE_WRITE8_MEMBER(llc2_port1_b_w); - const UINT8 *m_p_chargen; - optional_device m_speaker; - optional_shared_ptr m_p_videoram; - bool m_rv; - UINT8 m_term_status; - UINT8 m_llc1_key; -private: - UINT8 m_porta; - UINT8 m_term_data; -public: - DECLARE_DRIVER_INIT(llc2); - DECLARE_DRIVER_INIT(llc1); - virtual void video_start(); - DECLARE_MACHINE_START(llc1); - DECLARE_MACHINE_RESET(llc1); - DECLARE_MACHINE_RESET(llc2); - UINT32 screen_update_llc1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_llc2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device m_maincpu; - optional_device m_ram; -}; - -#endif diff --git a/src/mess/includes/lviv.h b/src/mess/includes/lviv.h deleted file mode 100644 index 363948263e2..00000000000 --- a/src/mess/includes/lviv.h +++ /dev/null @@ -1,70 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha -/***************************************************************************** - * - * includes/lviv.h - * - ****************************************************************************/ - -#ifndef LVIV_H_ -#define LVIV_H_ - -#include "imagedev/snapquik.h" -#include "machine/i8255.h" -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -class lviv_state : public driver_device -{ -public: - lviv_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") { } - - unsigned char * m_video_ram; - unsigned short m_colortable[1][4]; - UINT8 m_ppi_port_outputs[2][3]; - UINT8 m_startup_mem_map; - DECLARE_READ8_MEMBER(lviv_io_r); - DECLARE_WRITE8_MEMBER(lviv_io_w); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(lviv); - UINT32 screen_update_lviv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(lviv_ppi_0_porta_r); - DECLARE_READ8_MEMBER(lviv_ppi_0_portb_r); - DECLARE_READ8_MEMBER(lviv_ppi_0_portc_r); - DECLARE_WRITE8_MEMBER(lviv_ppi_0_porta_w); - DECLARE_WRITE8_MEMBER(lviv_ppi_0_portb_w); - DECLARE_WRITE8_MEMBER(lviv_ppi_0_portc_w); - DECLARE_READ8_MEMBER(lviv_ppi_1_porta_r); - DECLARE_READ8_MEMBER(lviv_ppi_1_portb_r); - DECLARE_READ8_MEMBER(lviv_ppi_1_portc_r); - DECLARE_WRITE8_MEMBER(lviv_ppi_1_porta_w); - DECLARE_WRITE8_MEMBER(lviv_ppi_1_portb_w); - DECLARE_WRITE8_MEMBER(lviv_ppi_1_portc_w); - required_device m_maincpu; - required_device m_speaker; - required_device m_cassette; - required_device m_ram; - required_device m_palette; - void lviv_update_palette(UINT8 pal); - void lviv_update_memory (); - void lviv_setup_snapshot (UINT8 * data); - void dump_registers(); - int lviv_verify_snapshot (UINT8 * data, UINT32 size); - DECLARE_SNAPSHOT_LOAD_MEMBER( lviv ); - DECLARE_INPUT_CHANGED_MEMBER(lviv_reset); -}; - -/*----------- defined in video/lviv.c -----------*/ - -extern const unsigned char lviv_palette[8*3]; - - -#endif /* LVIV_H_ */ diff --git a/src/mess/includes/lynx.h b/src/mess/includes/lynx.h deleted file mode 100644 index 9d45fa13467..00000000000 --- a/src/mess/includes/lynx.h +++ /dev/null @@ -1,295 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/lynx.h - * - ****************************************************************************/ - -#ifndef LYNX_H_ -#define LYNX_H_ - -#include "audio/lynx.h" -#include "imagedev/snapquik.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define LYNX_CART 0 -#define LYNX_QUICKLOAD 1 - - -struct BLITTER -{ - // global - UINT16 screen; - UINT16 colbuf; - UINT16 colpos; // byte where value of collision is written - INT16 xoff, yoff; - // in command - int mode; - UINT8 spr_coll; - UINT8 spritenr; - INT16 x_pos,y_pos; - UINT16 width, height; // uint16 important for blue lightning - INT16 tilt_accumulator; - UINT16 height_accumulator, width_accumulator; - UINT16 width_offset, height_offset; - INT16 stretch, tilt; - UINT8 color[16]; // or stored - UINT16 bitmap; - int use_rle; - int line_color; - - UINT8 spr_ctl0; - UINT8 spr_ctl1; - UINT16 scb; - UINT16 scb_next; - UINT8 sprite_collide; - - int everon; - UINT8 fred; - int memory_accesses; - attotime time; - - int no_collide; - int vstretch; - int lefthanded; - int busy; -}; - -struct UART -{ - UINT8 serctl; - UINT8 data_received, data_to_send, buffer; - int received; - int sending; - int buffer_loaded; -}; - -struct SUZY -{ - UINT8 data[0x100]; - UINT8 high; - int low; - int signed_math; - int accumulate; - int accumulate_overflow; -}; - -struct MIKEY -{ - UINT8 data[0x100]; - UINT16 disp_addr; - UINT8 vb_rest; -}; - -struct LYNX_TIMER -{ - UINT8 bakup; - UINT8 cntrl1; - UINT8 cntrl2; - UINT8 counter; - emu_timer *timer; - int timer_active; -}; - -#define NR_LYNX_TIMERS 8 - -class lynx_state : public driver_device -{ -public: - enum - { - TIMER_BLITTER, - TIMER_SHOT, - TIMER_UART_LOOPBACK, - TIMER_UART - }; - - lynx_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_mem_0000(*this, "mem_0000"), - m_mem_fc00(*this, "mem_fc00"), - m_mem_fd00(*this, "mem_fd00"), - m_mem_fe00(*this, "mem_fe00"), - m_mem_fffa(*this, "mem_fffa"), - m_maincpu(*this, "maincpu"), - m_sound(*this, "custom"), - m_cart(*this, "cartslot"), - m_palette(*this, "palette") { } - - virtual void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - required_shared_ptr m_mem_0000; - required_shared_ptr m_mem_fc00; - required_shared_ptr m_mem_fd00; - required_shared_ptr m_mem_fe00; - required_shared_ptr m_mem_fffa; - required_device m_maincpu; - required_device m_sound; - required_device m_cart; - required_device m_palette; - UINT16 m_granularity; - int m_sign_AB; - int m_sign_CD; - UINT32 m_lynx_palette[0x10]; - int m_rotate; - UINT8 m_memory_config; - - BLITTER m_blitter; - SUZY m_suzy; - MIKEY m_mikey; - UART m_uart; - LYNX_TIMER m_timer[NR_LYNX_TIMERS]; - - bitmap_ind16 m_bitmap; - bitmap_ind16 m_bitmap_temp; - DECLARE_READ8_MEMBER(suzy_read); - DECLARE_WRITE8_MEMBER(suzy_write); - DECLARE_WRITE8_MEMBER(lynx_uart_w); - DECLARE_READ8_MEMBER(lynx_uart_r); - DECLARE_READ8_MEMBER(mikey_read); - DECLARE_WRITE8_MEMBER(mikey_write); - DECLARE_READ8_MEMBER(lynx_memory_config_r); - DECLARE_WRITE8_MEMBER(lynx_memory_config_w); - void lynx_divide(); - void lynx_multiply(); - UINT8 lynx_timer_read(int which, int offset); - void lynx_timer_write(int which, int offset, UINT8 data); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(lynx); - void sound_cb(); - TIMER_CALLBACK_MEMBER(lynx_blitter_timer); - TIMER_CALLBACK_MEMBER(lynx_timer_shot); - TIMER_CALLBACK_MEMBER(lynx_uart_loopback_timer); - TIMER_CALLBACK_MEMBER(lynx_uart_timer); - void lynx_postload(); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( lynx_cart ); - UINT8 lynx_read_ram(UINT16 address); - void lynx_write_ram(UINT16 address, UINT8 data); - inline void lynx_plot_pixel(const int mode, const INT16 x, const int y, const int color); - void lynx_blit_do_work(const int y, const int xdir, const int bits_per_pixel, const int mask ); - void lynx_blit_rle_do_work( const INT16 y, const int xdir, const int bits_per_pixel, const int mask ); - void lynx_blit_lines(); - void lynx_blitter(); - void lynx_draw_line(); - void lynx_timer_init(int which); - void lynx_timer_signal_irq(int which); - void lynx_timer_count_down(int which); - UINT32 lynx_time_factor(int val); - void lynx_uart_reset(); - int lynx_verify_cart (char *header, int kind); - DECLARE_QUICKLOAD_LOAD_MEMBER( lynx ); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -/*---------- suzy registers ------------- */ -#define TMPADRL 0x00 // Temporary address (not sure what this is used for) -#define TMPADRH 0x01 -#define TILTACUML 0x02 // Tilt accumulator (signed fixed-point, eight bits to the left of decimal) -#define TILTACUMH 0x03 -#define HOFFL 0x04 // X offset to edge of visible window -#define HOFFH 0x05 -#define VOFFL 0x06 // Y offset to edge of visible window -#define VOFFH 0x07 -#define VIDBASL 0x08 // Video buffer address -#define VIDBASH 0x09 -#define COLLBASL 0x0A // Collision buffer address -#define COLLBASH 0x0B -#define VIDADRL 0x0C // Current Video Build Address -#define VIDADRH 0x0D -#define COLLADRL 0x0E // Current Collision Build Address -#define COLLADRH 0x0F -#define SCBNEXTL 0x10 // Address of next SCB -#define SCBNEXTH 0x11 -#define SPRDLINEL 0x12 // Sprite data start address -#define SPRDLINEH 0x13 -#define HPOSSTRTL 0x14 // Starting Hpos -#define HPOSSTRTH 0x15 -#define VPOSSTRTL 0x16 // Starting Vpos -#define VPOSSTRTH 0x17 -#define SPRHSIZL 0x18 // H Size -#define SPRHSIZH 0x19 -#define SPRVSIZL 0x1A // V Size -#define SPRVSIZH 0x1B -#define STRETCHL 0x1C // H/V Size Adder (signed fixed-point) -#define STRETCHH 0x1D -#define TILTL 0x1E // H Position Adder (signed fixed-point) -#define TILTH 0x1F -#define SPRDOFFL 0x20 // Offset to Next Sprite Data Line -#define SPRDOFFH 0x21 -#define SPRVPOSL 0x22 // Current Vpos -#define SPRVPOSH 0x23 -#define COLLOFFL 0x24 // Offset to Collision Depository -#define COLLOFFH 0x25 -#define VSIZACUML 0x26 // Vertical Size Accumulator -#define VSIZACUMH 0x27 -#define HSIZOFFL 0x28 // Horizontal Size Offset -#define HSIZOFFH 0x29 -#define VSIZOFFL 0x2A // Vertical Size Offset -#define VSIZOFFH 0x2B -#define SCBADRL 0x2C // Address of Current SCB -#define SCBADRH 0x2D -#define PROCADRL 0x2E // Current Spr Data Proc Address - -#define MATH_D 0x52 -#define MATH_C 0x53 -#define MATH_B 0x54 -#define MATH_A 0x55 -#define MATH_P 0x56 -#define MATH_N 0x57 -#define MATH_H 0x60 -#define MATH_G 0x61 -#define MATH_F 0x62 -#define MATH_E 0x63 - -#define MATH_M 0x6c -#define MATH_L 0x6d -#define MATH_K 0x6e -#define MATH_J 0x6f - -#define SPRCTL0 0x80 // Sprite Control Bits 0 (W)(U) -#define SPRCTL1 0x81 // Sprite Control Bits 1 (W)(U) -#define SPRCOLL 0x82 // Sprite Collision Number (W) -#define SPRINIT 0x83 // Sprite Initialization Bits (W)(U) - -#define SUZYHREV 0x88 // Suzy Hardware Revision (R) = '01' - -#define SUZYBUSEN 0x90 // Suzy Bus Enable (W) -#define SPRGO 0x91 // Sprite Process Start Bit (W) -#define SPRSYS 0x92 // System Control Bits (R/W) - -#define JOYSTICK 0xB0 // Read Joystick and Switches(R) -#define SWITCHES 0xB1 // Read Other Switches (R) -#define RCART 0xB2 // Read / Write Cartridge Bank 0 (R/W) -#define RCART_BANK1 0xB3 // Read / Write Cartridge Bank 1 (R/W) (Unused in existing cartridges?) - -//0xC0 LEDs (W) -//0xC2 Parallel Port Status(R/W) -//0xC3 Parallel Port Data (R/W) -//0xC4 Howie (R/W) - -// SCB offsets - -//8-bit -#define SCB_SPRCTL0 0x00 // 8 bit -#define SCB_SPRCTL1 0x01 // 8 bit -#define SCB_SPRCOLL 0x02 // 4 bit - -//16-bit -#define SCB_SCBNEXT 0x03 // L,H Address of Next SCB -#define SCB_SPRDLINE 0x05 // L,H Start of Sprite Data Line Address -#define SCB_HPOSSTRT 0x07 // L,H Starting Hpos -#define SCB_VPOSSTRT 0x09 // L,H Starting Vpos -#define SCB_SPRHSIZ 0x0B // L,H H Size -#define SCB_SPRVSIZ 0x0D // L,H V Size -#define SCB_STRETCH 0x0F // L H H/V Size Adder -#define SCB_TILT 0x11 // L,H H Position Adder - -#endif /* LYNX_H_ */ diff --git a/src/mess/includes/m5.h b/src/mess/includes/m5.h deleted file mode 100644 index 6d95a69a6c5..00000000000 --- a/src/mess/includes/m5.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __M5__ -#define __M5__ - -#include "machine/z80ctc.h" - -#define Z80_TAG "ic17" -#define Z80CTC_TAG "ic19" -#define SN76489AN_TAG "ic15" -#define TMS9918A_TAG "ic10" -#define TMS9929A_TAG "ic10" -#define I8255A_TAG "i8255a" -#define Z80_FD5_TAG "z80fd5" -#define UPD765_TAG "upd765" -#define CENTRONICS_TAG "centronics" -#define SCREEN_TAG "screen" - -class m5_state : public driver_device -{ -public: - m5_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_fd5cpu(*this, Z80_FD5_TAG), - m_ctc(*this, Z80CTC_TAG), - m_ppi(*this, I8255A_TAG), - m_fdc(*this, UPD765_TAG), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_centronics(*this, CENTRONICS_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG ":0:525dd"), - m_reset(*this, "RESET") - { } - - required_device m_maincpu; - required_device m_fd5cpu; - required_device m_ctc; - required_device m_ppi; - required_device m_fdc; - required_device m_cassette; - required_device m_cart; - required_device m_centronics; - required_device m_ram; - required_device m_floppy0; - required_ioport m_reset; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( sts_r ); - DECLARE_WRITE8_MEMBER( com_w ); - - DECLARE_READ8_MEMBER( ppi_pa_r ); - DECLARE_WRITE8_MEMBER( ppi_pa_w ); - DECLARE_WRITE8_MEMBER( ppi_pb_w ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - - DECLARE_READ8_MEMBER( fd5_data_r ); - DECLARE_WRITE8_MEMBER( fd5_data_w ); - DECLARE_READ8_MEMBER( fd5_com_r ); - DECLARE_WRITE8_MEMBER( fd5_com_w ); - DECLARE_WRITE8_MEMBER( fd5_ctrl_w ); - DECLARE_WRITE8_MEMBER( fd5_tc_w ); - - // video state -// const TMS9928a_interface *m_vdp_intf; - - int m_centronics_busy; - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - - // floppy state - UINT8 m_fd5_data; - UINT8 m_fd5_com; - int m_intra; - int m_ibfa; - int m_obfa; - DECLARE_DRIVER_INIT(pal); - DECLARE_DRIVER_INIT(ntsc); - DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); -}; - -#endif diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h deleted file mode 100644 index 6b0092501fd..00000000000 --- a/src/mess/includes/mac.h +++ /dev/null @@ -1,562 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nathan Woods, Raphael Nabet, R. Belmont -/***************************************************************************** - * - * includes/mac.h - * - * Macintosh driver declarations - * - ****************************************************************************/ - -#ifndef MAC_H_ -#define MAC_H_ - -#include "machine/8530scc.h" -#include "machine/6522via.h" -#include "machine/ram.h" -#include "machine/egret.h" -#include "machine/cuda.h" -#include "bus/nubus/nubus.h" -#include "bus/macpds/macpds.h" -#include "machine/ncr539x.h" -#include "machine/ncr5380.h" -#include "machine/mackbd.h" -#include "machine/macrtc.h" -#include "sound/asc.h" -#include "sound/awacs.h" -#include "cpu/m68000/m68000.h" - -#define MAC_SCREEN_NAME "screen" -#define MAC_539X_1_TAG "539x_1" -#define MAC_539X_2_TAG "539x_2" -#define MACKBD_TAG "mackbd" - -// uncomment to run i8021 keyboard in original Mac/512(e)/Plus -//#define MAC_USE_EMULATED_KBD (1) - -// model helpers -#define ADB_IS_BITBANG ((mac->m_model == MODEL_MAC_SE || mac->m_model == MODEL_MAC_CLASSIC) || (mac->m_model >= MODEL_MAC_II && mac->m_model <= MODEL_MAC_IICI) || (mac->m_model == MODEL_MAC_SE30) || (mac->m_model == MODEL_MAC_QUADRA_700)) -#define ADB_IS_BITBANG_CLASS ((m_model == MODEL_MAC_SE || m_model == MODEL_MAC_CLASSIC) || (m_model >= MODEL_MAC_II && m_model <= MODEL_MAC_IICI) || (m_model == MODEL_MAC_SE30) || (m_model == MODEL_MAC_QUADRA_700)) -#define ADB_IS_EGRET (m_model >= MODEL_MAC_LC && m_model <= MODEL_MAC_CLASSIC_II) || ((m_model >= MODEL_MAC_IISI) && (m_model <= MODEL_MAC_IIVI)) -#define ADB_IS_EGRET_NONCLASS (mac->m_model >= MODEL_MAC_LC && mac->m_model <= MODEL_MAC_CLASSIC_II) || ((mac->m_model >= MODEL_MAC_IISI) && (mac->m_model <= MODEL_MAC_IIVI)) -#define ADB_IS_CUDA ((m_model >= MODEL_MAC_COLOR_CLASSIC && m_model <= MODEL_MAC_LC_580) || ((m_model >= MODEL_MAC_QUADRA_660AV) && (m_model <= MODEL_MAC_QUADRA_630)) || (m_model >= MODEL_MAC_POWERMAC_6100)) -#define ADB_IS_CUDA_NONCLASS ((mac->m_model >= MODEL_MAC_COLOR_CLASSIC && mac->m_model <= MODEL_MAC_LC_580) || ((mac->m_model >= MODEL_MAC_QUADRA_660AV) && (mac->m_model <= MODEL_MAC_QUADRA_630)) || (mac->m_model >= MODEL_MAC_POWERMAC_6100)) -#define ADB_IS_PM_VIA1_CLASS (m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100) -#define ADB_IS_PM_VIA2_CLASS (m_model >= MODEL_MAC_PB140 && m_model <= MODEL_MAC_PBDUO_270c) -#define ADB_IS_PM_CLASS ((m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100) || (m_model >= MODEL_MAC_PB140 && m_model <= MODEL_MAC_PBDUO_270c)) - -/* for Egret and CUDA streaming MCU commands, command types */ -enum mac_streaming_t -{ - MCU_STREAMING_NONE = 0, - MCU_STREAMING_PRAMRD, - MCU_STREAMING_PRAMWR, - MCU_STREAMING_WRAMRD, - MCU_STREAMING_WRAMWR -}; - -enum -{ - RBV_TYPE_RBV = 0, - RBV_TYPE_V8, - RBV_TYPE_SONORA, - RBV_TYPE_DAFB -}; - -/* tells which model is being emulated (set by macxxx_init) */ -enum model_t -{ - MODEL_MAC_128K512K, // 68000 machines - MODEL_MAC_512KE, - MODEL_MAC_PLUS, - MODEL_MAC_SE, - MODEL_MAC_CLASSIC, - - MODEL_MAC_PORTABLE, // Portable/PB100 are sort of hybrid classic and Mac IIs - MODEL_MAC_PB100, - - MODEL_MAC_II, // Mac II class 68020/030 machines - MODEL_MAC_II_FDHD, - MODEL_MAC_IIX, - MODEL_MAC_IICX, - MODEL_MAC_IICI, - MODEL_MAC_IISI, - MODEL_MAC_IIVX, - MODEL_MAC_IIVI, - MODEL_MAC_IIFX, - MODEL_MAC_SE30, - - MODEL_MAC_LC, // LC class 68030 machines, generally using a V8 or compatible gate array - MODEL_MAC_LC_II, - MODEL_MAC_LC_III, - MODEL_MAC_LC_III_PLUS, - MODEL_MAC_CLASSIC_II, - MODEL_MAC_COLOR_CLASSIC, - - MODEL_MAC_LC_475, // LC III clones with Cuda instead of Egret and 68LC040 on most models - MODEL_MAC_LC_520, - MODEL_MAC_LC_550, - MODEL_MAC_TV, - MODEL_MAC_LC_575, - MODEL_MAC_LC_580, - - MODEL_MAC_PB140, // 68030 PowerBooks. 140/145/145B/170 all have the same machine ID - MODEL_MAC_PB160, // 160/180/165 all have the same machine ID too - MODEL_MAC_PB165c, - MODEL_MAC_PB180c, - MODEL_MAC_PB150, // 150 is fairly radically different from the other 1x0s - - MODEL_MAC_PBDUO_210, // 68030 PowerBook Duos - MODEL_MAC_PBDUO_230, - MODEL_MAC_PBDUO_250, - MODEL_MAC_PBDUO_270c, - - MODEL_MAC_QUADRA_700, // 68(LC)040 desktops - MODEL_MAC_QUADRA_610, - MODEL_MAC_QUADRA_650, - MODEL_MAC_QUADRA_800, - MODEL_MAC_QUADRA_900, - MODEL_MAC_QUADRA_950, - MODEL_MAC_QUADRA_660AV, - MODEL_MAC_QUADRA_840AV, - MODEL_MAC_QUADRA_605, - MODEL_MAC_QUADRA_630, - - MODEL_MAC_PB550c, // 68(LC)040 PowerBooks - MODEL_MAC_PB520, - MODEL_MAC_PB520c, - MODEL_MAC_PB540, - MODEL_MAC_PB540c, - MODEL_MAC_PB190, - MODEL_MAC_PB190cs, - - MODEL_MAC_POWERMAC_6100, // NuBus PowerMacs - MODEL_MAC_POWERMAC_7100, - MODEL_MAC_POWERMAC_8100 -}; - -// video parameters for classic Macs -#define MAC_H_VIS (512) -#define MAC_V_VIS (342) -#define MAC_H_TOTAL (704) // (512+192) -#define MAC_V_TOTAL (370) // (342+28) - -/*----------- defined in machine/mac.c -----------*/ - -void mac_fdc_set_enable_lines(device_t *device, int enable_mask); - -/*----------- defined in audio/mac.c -----------*/ - -class mac_sound_device : public device_t, - public device_sound_interface -{ -public: - mac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - ~mac_sound_device() {} - - void enable_sound(int on); - void set_sound_buffer(int buffer); - void set_volume(int volume); - void sh_updatebuffer(); - -protected: - // device-level overrides - virtual void device_config_complete(); - virtual void device_start(); - - // sound stream update overrides - virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); -private: - // internal state - - ram_device *m_ram; - model_t m_mac_model; - - sound_stream *m_mac_stream; - int m_sample_enable; - UINT16 *m_mac_snd_buf_ptr; - UINT8 *m_snd_cache; - int m_snd_cache_len; - int m_snd_cache_head; - int m_snd_cache_tail; - int m_indexx; -}; - -extern const device_type MAC_SOUND; - - -/* Mac driver data */ - -class mac_state : public driver_device -{ -public: - mac_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_via1(*this, "via6522_0"), - m_via2(*this, "via6522_1"), - m_asc(*this, "asc"), - m_awacs(*this, "awacs"), - m_egret(*this, EGRET_TAG), - m_cuda(*this, CUDA_TAG), - m_ram(*this, RAM_TAG), - m_539x_1(*this, MAC_539X_1_TAG), - m_539x_2(*this, MAC_539X_2_TAG), - m_ncr5380(*this, "ncr5380"), - m_mackbd(*this, MACKBD_TAG), - m_rtc(*this,"rtc"), - m_mouse0(*this, "MOUSE0"), - m_mouse1(*this, "MOUSE1"), - m_mouse2(*this, "MOUSE2"), - m_key0(*this, "KEY0"), - m_key1(*this, "KEY1"), - m_key2(*this, "KEY2"), - m_key3(*this, "KEY3"), - m_key4(*this, "KEY4"), - m_key5(*this, "KEY5"), - m_key6(*this, "KEY6"), - m_montype(*this, "MONTYPE"), - m_vram(*this,"vram"), - m_vram16(*this,"vram16"), - m_via2_ca1_hack(0), - m_screen(*this, "screen"), - m_palette(*this, "palette") - { - } - - required_device m_maincpu; - required_device m_via1; - optional_device m_via2; - optional_device m_asc; - optional_device m_awacs; - optional_device m_egret; - optional_device m_cuda; - required_device m_ram; - optional_device m_539x_1; - optional_device m_539x_2; - optional_device m_ncr5380; - optional_device m_mackbd; - optional_device m_rtc; - - required_ioport m_mouse0, m_mouse1, m_mouse2; - required_ioport m_key0, m_key1, m_key2, m_key3, m_key4, m_key5; - optional_ioport m_key6, m_montype; - - virtual void machine_start(); - virtual void machine_reset(); - - model_t m_model; - - UINT32 m_overlay; - int m_drive_select; - int m_scsiirq_enable; - - UINT32 m_via2_vbl; - UINT32 m_se30_vbl_enable; - UINT8 m_nubus_irq_state; - -#ifndef MAC_USE_EMULATED_KBD - /* used to store the reply to most keyboard commands */ - int m_keyboard_reply; - - /* Keyboard communication in progress? */ - int m_kbd_comm; - int m_kbd_receive; - /* timer which is used to time out inquiry */ - emu_timer *m_inquiry_timeout; - - int m_kbd_shift_reg; - int m_kbd_shift_count; - - /* keycode buffer (used for keypad/arrow key transition) */ - int m_keycode_buf[2]; - int m_keycode_buf_index; -#endif - - /* keyboard matrix to detect transition - macadb needs to stop relying on this */ - int m_key_matrix[7]; - - int m_mouse_bit_x; - int m_mouse_bit_y; - int last_mx, last_my; - int count_x, count_y; - int m_last_was_x; - int m_screen_buffer; - - int irq_count, ca1_data, ca2_data; - - // Mac ADB state - INT32 m_adb_irq_pending, m_adb_waiting_cmd, m_adb_datasize, m_adb_buffer[257]; - INT32 m_adb_state, m_adb_command, m_adb_send, m_adb_timer_ticks, m_adb_extclock, m_adb_direction; - INT32 m_adb_listenreg, m_adb_listenaddr, m_adb_last_talk, m_adb_srq_switch; - INT32 m_adb_streaming, m_adb_stream_ptr; - INT32 m_adb_linestate; - bool m_adb_srqflag; -#define kADBKeyBufSize 32 - UINT8 m_adb_keybuf[kADBKeyBufSize]; - UINT8 m_adb_keybuf_start; - UINT8 m_adb_keybuf_end; - - // Portable/PB100 Power Manager IC comms (chapter 4, "Guide to the Macintosh Family Hardware", second edition) - UINT8 m_pm_data_send, m_pm_data_recv, m_pm_ack, m_pm_req, m_pm_cmd[32], m_pm_out[32], m_pm_dptr, m_pm_sptr, m_pm_slen, m_pm_state; - UINT8 m_pmu_int_status, m_pmu_last_adb_command, m_pmu_poll; - emu_timer *m_pmu_send_timer; - - // 60.15 Hz timer for RBV/V8/Sonora/Eagle/VASP/etc. - emu_timer *m_6015_timer; - - // RBV and friends (V8, etc) - UINT8 m_rbv_regs[256], m_rbv_ier, m_rbv_ifr, m_rbv_type, m_rbv_montype, m_rbv_vbltime; - UINT32 m_rbv_colors[3], m_rbv_count, m_rbv_clutoffs, m_rbv_immed10wr; - UINT32 m_rbv_palette[256]; - UINT8 m_sonora_vctl[8]; - emu_timer *m_vbl_timer, *m_cursor_timer; - UINT16 m_cursor_line; - UINT16 m_dafb_int_status; - int m_dafb_scsi1_drq, m_dafb_scsi2_drq; - UINT8 m_dafb_mode; - UINT32 m_dafb_base, m_dafb_stride; - - // this is shared among all video setups with vram - optional_shared_ptr m_vram; - optional_shared_ptr m_vram16; - - // interrupts - int m_scc_interrupt, m_via_interrupt, m_via2_interrupt, m_scsi_interrupt, m_asc_interrupt, m_last_taken_interrupt; - - // defined in machine/mac.c - void v8_resize(); - void set_memory_overlay(int overlay); - void scc_mouse_irq( int x, int y ); - void nubus_slot_interrupt(UINT8 slot, UINT32 state); - DECLARE_WRITE_LINE_MEMBER(set_scc_interrupt); - void set_via_interrupt(int value); - void set_via2_interrupt(int value); - void field_interrupts(); - void rtc_write_rTCEnb(int data); - void rtc_shift_data(int data); - void vblank_irq(); - void rtc_incticks(); - void adb_talk(); - void mouse_callback(); - void rbv_recalc_irqs(); - void pmu_exec(); - void mac_adb_newaction(int state); - void set_adb_line(int linestate); - - DECLARE_READ16_MEMBER ( mac_via_r ); - DECLARE_WRITE16_MEMBER ( mac_via_w ); - DECLARE_READ16_MEMBER ( mac_via2_r ); - DECLARE_WRITE16_MEMBER ( mac_via2_w ); - DECLARE_READ16_MEMBER ( mac_autovector_r ); - DECLARE_WRITE16_MEMBER ( mac_autovector_w ); - DECLARE_READ16_MEMBER ( mac_iwm_r ); - DECLARE_WRITE16_MEMBER ( mac_iwm_w ); - DECLARE_READ16_MEMBER ( mac_scc_r ); - DECLARE_WRITE16_MEMBER ( mac_scc_w ); - DECLARE_WRITE16_MEMBER ( mac_scc_2_w ); - DECLARE_READ16_MEMBER ( macplus_scsi_r ); - DECLARE_WRITE16_MEMBER ( macplus_scsi_w ); - DECLARE_WRITE16_MEMBER ( macii_scsi_w ); - DECLARE_READ32_MEMBER (macii_scsi_drq_r); - DECLARE_WRITE32_MEMBER (macii_scsi_drq_w); - - DECLARE_READ32_MEMBER( rbv_ramdac_r ); - DECLARE_WRITE32_MEMBER( rbv_ramdac_w ); - DECLARE_WRITE32_MEMBER( ariel_ramdac_w ); - DECLARE_READ8_MEMBER( mac_sonora_vctl_r ); - DECLARE_WRITE8_MEMBER( mac_sonora_vctl_w ); - DECLARE_READ8_MEMBER ( mac_rbv_r ); - DECLARE_WRITE8_MEMBER ( mac_rbv_w ); - - DECLARE_READ32_MEMBER(mac_read_id); - - DECLARE_READ16_MEMBER(mac_config_r); - - DECLARE_READ32_MEMBER(biu_r); - DECLARE_WRITE32_MEMBER(biu_w); - DECLARE_READ8_MEMBER(oss_r); - DECLARE_WRITE8_MEMBER(oss_w); - DECLARE_READ32_MEMBER(buserror_r); - DECLARE_READ8_MEMBER(swimiop_r); - DECLARE_WRITE8_MEMBER(swimiop_w); - DECLARE_READ8_MEMBER(scciop_r); - DECLARE_WRITE8_MEMBER(scciop_w); - - DECLARE_READ8_MEMBER(hmc_r); - DECLARE_WRITE8_MEMBER(hmc_w); - DECLARE_READ8_MEMBER(amic_dma_r); - DECLARE_WRITE8_MEMBER(amic_dma_w); - DECLARE_READ8_MEMBER(pmac_diag_r); - - DECLARE_READ8_MEMBER(mac_gsc_r); - DECLARE_WRITE8_MEMBER(mac_gsc_w); - - DECLARE_READ8_MEMBER(mac_5396_r); - DECLARE_WRITE8_MEMBER(mac_5396_w); - - DECLARE_READ32_MEMBER(dafb_r); - DECLARE_WRITE32_MEMBER(dafb_w); - DECLARE_READ32_MEMBER(dafb_dac_r); - DECLARE_WRITE32_MEMBER(dafb_dac_w); - - DECLARE_READ32_MEMBER(macwd_r); - DECLARE_WRITE32_MEMBER(macwd_w); - - DECLARE_WRITE_LINE_MEMBER(nubus_irq_9_w); - DECLARE_WRITE_LINE_MEMBER(nubus_irq_a_w); - DECLARE_WRITE_LINE_MEMBER(nubus_irq_b_w); - DECLARE_WRITE_LINE_MEMBER(nubus_irq_c_w); - DECLARE_WRITE_LINE_MEMBER(nubus_irq_d_w); - DECLARE_WRITE_LINE_MEMBER(nubus_irq_e_w); - - DECLARE_WRITE_LINE_MEMBER(irq_539x_1_w); - DECLARE_WRITE_LINE_MEMBER(drq_539x_1_w); - - DECLARE_WRITE_LINE_MEMBER(cuda_reset_w); - DECLARE_WRITE_LINE_MEMBER(adb_linechange_w); - - DECLARE_WRITE_LINE_MEMBER(mac_scsi_irq); - DECLARE_WRITE_LINE_MEMBER(mac_asc_irq); - - DECLARE_DIRECT_UPDATE_MEMBER(overlay_opbaseoverride); -private: - int has_adb(); - void adb_reset(); - void adb_vblank(); - int adb_pollkbd(int update); - int adb_pollmouse(); - void adb_accummouse( UINT8 *MouseX, UINT8 *MouseY ); - void pmu_one_byte_reply(UINT8 result); - void pmu_three_byte_reply(UINT8 result1, UINT8 result2, UINT8 result3); - - // wait states for accessing the VIA - int m_via_cycles; - - // ADB mouse state - int m_adb_mouseaddr; - int m_adb_lastmousex, m_adb_lastmousey, m_adb_lastbutton, m_adb_mouse_initialized; - - // ADB keyboard state - int m_adb_keybaddr; - int m_adb_keybinitialized, m_adb_currentkeys[2], m_adb_modifiers; - - // PRAM for ADB MCU HLEs (mostly unused now) - UINT8 m_adb_pram[256]; - - UINT8 m_oss_regs[0x400]; - - // AMIC for x100 PowerMacs - UINT8 m_amic_regs[0x200]; - - // HMC for x100 PowerMacs - UINT64 m_hmc_reg, m_hmc_shiftout; - - int m_via2_ca1_hack; - optional_device m_screen; - optional_device m_palette; -public: - emu_timer *m_scanline_timer; - emu_timer *m_adb_timer; - DECLARE_DRIVER_INIT(maclc2); - DECLARE_DRIVER_INIT(maciifdhd); - DECLARE_DRIVER_INIT(macse30); - DECLARE_DRIVER_INIT(macprtb); - DECLARE_DRIVER_INIT(maciivx); - DECLARE_DRIVER_INIT(macpd210); - DECLARE_DRIVER_INIT(macii); - DECLARE_DRIVER_INIT(macclassic); - DECLARE_DRIVER_INIT(macquadra700); - DECLARE_DRIVER_INIT(macclassic2); - DECLARE_DRIVER_INIT(maciifx); - DECLARE_DRIVER_INIT(maclc); - DECLARE_DRIVER_INIT(macpb160); - DECLARE_DRIVER_INIT(macplus); - DECLARE_DRIVER_INIT(macse); - DECLARE_DRIVER_INIT(macpb140); - DECLARE_DRIVER_INIT(mac128k512k); - DECLARE_DRIVER_INIT(macpm6100); - DECLARE_DRIVER_INIT(mac512ke); - DECLARE_DRIVER_INIT(maclc520); - DECLARE_DRIVER_INIT(maciici); - DECLARE_DRIVER_INIT(maciix); - DECLARE_DRIVER_INIT(maclrcclassic); - DECLARE_DRIVER_INIT(maciisi); - DECLARE_DRIVER_INIT(maciicx); - DECLARE_DRIVER_INIT(maclc3); - DECLARE_DRIVER_INIT(maclc3plus); - DECLARE_DRIVER_INIT(macpm7100); - DECLARE_DRIVER_INIT(macpm8100); - DECLARE_DRIVER_INIT(macpb100); - DECLARE_VIDEO_START(mac); - DECLARE_PALETTE_INIT(mac); - DECLARE_VIDEO_START(macprtb); - DECLARE_PALETTE_INIT(macgsc); - DECLARE_VIDEO_START(macsonora); - DECLARE_VIDEO_RESET(macrbv); - DECLARE_VIDEO_START(macdafb); - DECLARE_VIDEO_RESET(macdafb); - DECLARE_VIDEO_START(macv8); - DECLARE_VIDEO_RESET(macsonora); - DECLARE_VIDEO_RESET(maceagle); - DECLARE_VIDEO_START(macrbv); - UINT32 screen_update_mac(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macprtb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macse30(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macpb140(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macpb160(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macrbv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macdafb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macv8(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macsonora(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_macpbwd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(mac_rbv_vbl); -#ifndef MAC_USE_EMULATED_KBD - TIMER_CALLBACK_MEMBER(kbd_clock); - TIMER_CALLBACK_MEMBER(inquiry_timeout_func); -#endif - TIMER_CALLBACK_MEMBER(mac_6015_tick); - TIMER_CALLBACK_MEMBER(mac_scanline_tick); - TIMER_CALLBACK_MEMBER(dafb_vbl_tick); - TIMER_CALLBACK_MEMBER(dafb_cursor_tick); - DECLARE_WRITE_LINE_MEMBER(mac_via_out_cb2); - DECLARE_WRITE_LINE_MEMBER(mac_adb_via_out_cb2); - DECLARE_READ8_MEMBER(mac_via_in_a); - DECLARE_READ8_MEMBER(mac_via_in_b); - DECLARE_WRITE8_MEMBER(mac_via_out_a); - DECLARE_WRITE8_MEMBER(mac_via_out_b); - DECLARE_READ8_MEMBER(mac_via_in_a_pmu); - DECLARE_READ8_MEMBER(mac_via_in_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_a_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_bbadb); - DECLARE_WRITE8_MEMBER(mac_via_out_b_egadb); - DECLARE_WRITE8_MEMBER(mac_via_out_b_cdadb); - DECLARE_READ8_MEMBER(mac_via_in_b_via2pmu); - DECLARE_WRITE8_MEMBER(mac_via_out_b_via2pmu); - DECLARE_READ8_MEMBER(mac_via2_in_a); - DECLARE_READ8_MEMBER(mac_via2_in_b); - DECLARE_WRITE8_MEMBER(mac_via2_out_a); - DECLARE_WRITE8_MEMBER(mac_via2_out_b); - DECLARE_READ8_MEMBER(mac_via2_in_a_pmu); - DECLARE_READ8_MEMBER(mac_via2_in_b_pmu); - DECLARE_WRITE8_MEMBER(mac_via2_out_a_pmu); - DECLARE_WRITE8_MEMBER(mac_via2_out_b_pmu); - DECLARE_WRITE_LINE_MEMBER(mac_kbd_clk_in); - void mac_state_load(); - DECLARE_WRITE_LINE_MEMBER(mac_via_irq); - DECLARE_WRITE_LINE_MEMBER(mac_via2_irq); - void dafb_recalc_ints(); - void set_scc_waitrequest(int waitrequest); - int scan_keyboard(); - void keyboard_init(); - void kbd_shift_out(int data); - void keyboard_receive(int val); - void mac_driver_init(model_t model); - void mac_tracetrap(const char *cpu_name_local, int addr, int trap); - void mac_install_memory(offs_t memory_begin, offs_t memory_end, - offs_t memory_size, void *memory_data, int is_rom, const char *bank); -}; - -#endif /* MAC_H_ */ diff --git a/src/mess/includes/macpci.h b/src/mess/includes/macpci.h deleted file mode 100644 index 56f7d066431..00000000000 --- a/src/mess/includes/macpci.h +++ /dev/null @@ -1,169 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:R. Belmont -/***************************************************************************** - * - * includes/macpci.h - * - * PCI-based Power Macintosh driver declarations - * - ****************************************************************************/ - -#ifndef MACPCI_H_ -#define MACPCI_H_ - -#include "machine/8530scc.h" -#include "machine/6522via.h" -#include "machine/ram.h" -#include "machine/cuda.h" -#include "machine/ncr539x.h" -#include "sound/awacs.h" - -#define C7M (7833600) -#define C15M (C7M*2) - -#define MAC_SCREEN_NAME "screen" -#define MAC_539X_1_TAG "539x_1" -#define MAC_539X_2_TAG "539x_2" - -/* tells which model is being emulated (set by macxxx_init) */ -enum model_t -{ - PCIMODEL_MAC_PM5200, - PCIMODEL_MAC_PM6200, - PCIMODEL_MAC_PM5300, - PCIMODEL_MAC_PM7200, - PCIMODEL_MAC_PM7500, - PCIMODEL_MAC_PM8500, - PCIMODEL_MAC_PM9500, - PCIMODEL_MAC_PM7215, - PCIMODEL_MAC_PM5260, - PCIMODEL_MAC_PM5400, - PCIMODEL_MAC_PM7600, - PCIMODEL_MAC_PM8200, - PCIMODEL_MAC_PM6300, - PCIMODEL_MAC_PM6400, - PCIMODEL_MAC_PM4400, - PCIMODEL_MAC_PM5500, - PCIMODEL_MAC_PM7220, - PCIMODEL_MAC_PM7300, - PCIMODEL_MAC_PM6500, - PCIMODEL_MAC_PM8600, - PCIMODEL_MAC_PM9600, - - PCIMODEL_MAC_20TH, - - PCIMODEL_MAC_G3_GOSSAMER, - PCIMODEL_MAC_G3_ALLINONE, - - PCIMODEL_MAC_PB5x0PPC, - PCIMODEL_MAC_PB1400, - PCIMODEL_MAC_PB2300, - PCIMODEL_MAC_PB2400, - PCIMODEL_MAC_PB3400, - PCIMODEL_MAC_PB5300, - - PCIMODEL_MAC_PBG3KANGA, - PCIMODEL_MAC_PBG3WALLST1, - PCIMODEL_MAC_PBG3WALLST2, - - PCIMODEL_MAC_PIPPIN // Apple/Bandai Pippin - -}; - - -/* Mac driver data */ - -class macpci_state : public driver_device -{ -public: - macpci_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_via1(*this, "via6522_0"), - m_awacs(*this, "awacs"), - m_cuda(*this, CUDA_TAG), - m_ram(*this, RAM_TAG), - m_539x_1(*this, MAC_539X_1_TAG), - m_539x_2(*this, MAC_539X_2_TAG) - { } - - required_device m_maincpu; - required_device m_via1; - optional_device m_awacs; - required_device m_cuda; - required_device m_ram; - optional_device m_539x_1; - optional_device m_539x_2; - - virtual void machine_start(); - virtual void machine_reset(); - - model_t m_model; - - // 60.15 Hz timer for RBV/V8/Sonora/Eagle/VASP/etc. - emu_timer *m_6015_timer; - - // RBV and friends (V8, etc) - UINT8 m_rbv_regs[256], m_rbv_ier, m_rbv_ifr, m_rbv_type, m_rbv_montype, m_rbv_vbltime; - UINT32 m_rbv_colors[3], m_rbv_count, m_rbv_clutoffs, m_rbv_immed10wr; - UINT32 m_rbv_palette[256]; - UINT8 m_sonora_vctl[8]; - emu_timer *m_vbl_timer, *m_cursor_timer; - UINT16 m_cursor_line; - UINT16 m_dafb_int_status; - int m_dafb_scsi1_drq, m_dafb_scsi2_drq; - UINT8 m_dafb_mode; - UINT32 m_dafb_base, m_dafb_stride; - - // this is shared among all video setups with vram - UINT32 *m_vram; - - // defined in machine/mac.c - void set_via_interrupt(int value); - void vblank_irq(); - void mac_adb_newaction(int state); - - DECLARE_READ16_MEMBER ( mac_via_r ); - DECLARE_WRITE16_MEMBER ( mac_via_w ); - DECLARE_READ16_MEMBER ( mac_scc_r ); - DECLARE_WRITE16_MEMBER ( mac_scc_w ); - DECLARE_WRITE16_MEMBER ( mac_scc_2_w ); - - DECLARE_READ32_MEMBER(mac_read_id); - - DECLARE_READ8_MEMBER(mac_5396_r); - DECLARE_WRITE8_MEMBER(mac_5396_w); - - DECLARE_WRITE_LINE_MEMBER(irq_539x_1_w); - DECLARE_WRITE_LINE_MEMBER(drq_539x_1_w); - - DECLARE_WRITE_LINE_MEMBER(cuda_reset_w); - DECLARE_WRITE_LINE_MEMBER(cuda_adb_linechange_w); - - // hack functions - DECLARE_READ64_MEMBER ( unk1_r ); - DECLARE_READ64_MEMBER ( unk2_r ); - - DECLARE_DRIVER_INIT(pippin); -private: - // wait states for accessing the VIA - int m_via_cycles; - - // hack - UINT16 m_unk1_test; - -public: - emu_timer *m_scanline_timer; - UINT32 screen_update_pippin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(mac_6015_tick); - DECLARE_READ8_MEMBER(mac_via_in_a); - DECLARE_READ8_MEMBER(mac_via_in_b); - DECLARE_WRITE8_MEMBER(mac_via_out_a); - DECLARE_WRITE8_MEMBER(mac_via_out_b); - DECLARE_READ_LINE_MEMBER(mac_adb_via_in_cb2); - DECLARE_WRITE_LINE_MEMBER(mac_adb_via_out_cb2); - DECLARE_WRITE_LINE_MEMBER(mac_via_irq); - void mac_driver_init(model_t model); -}; - -#endif /* PCIMAC_H_ */ diff --git a/src/mess/includes/mbc55x.h b/src/mess/includes/mbc55x.h deleted file mode 100644 index d0578708939..00000000000 --- a/src/mess/includes/mbc55x.h +++ /dev/null @@ -1,221 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phill Harvey-Smith -/* - mbc55x.h - Includes for the Sanyo MBC-550, MBC-555. - - Phill Harvey-Smith - 2011-01-29. -*/ - -#include "emu.h" -#include "cpu/i86/i86.h" -#include "machine/ram.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/wd_fdc.h" -#include "machine/i8251.h" -#include "sound/speaker.h" -#include "video/mc6845.h" -#include "imagedev/flopdrv.h" -#include "formats/pc_dsk.h" -#include "debugger.h" -#include "debug/debugcon.h" - -#define MAINCPU_TAG "maincpu" - -#define SCREEN_TAG "screen" -#define SCREEN_WIDTH_PIXELS 640 -#define SCREEN_HEIGHT_LINES 250 -#define SCREEN_NO_COLOURS 8 - -#define VIDEO_MEM_SIZE (32*1024) -#define VID_MC6845_NAME "mc6845" - -// Red and blue colour planes sit at a fixed location, green -// is in main memory. - -#define COLOUR_PLANE_SIZE 0x4000 - -#define RED_PLANE_OFFSET (0*COLOUR_PLANE_SIZE) -#define BLUE_PLANE_OFFSET (1*COLOUR_PLANE_SIZE) - -#define COLOUR_PLANE_MEMBASE 0xF0000 -#define RED_PLANE_MEMBASE (COLOUR_PLANE_MEMBASE+RED_PLANE_OFFSET) -#define BLUE_PLANE_MEMBASE (COLOUR_PLANE_MEMBASE+BLUE_PLANE_OFFSET) - -#define RED_PLANE_TAG "red" -#define BLUE_PLANE_TAG "blue" - -// Keyboard - -#define MBC55X_KEYROWS 7 -#define KEYBOARD_QUEUE_SIZE 32 - -#define KB_BITMASK 0x1000 -#define KB_SHIFTS 12 - -#define KEY_SPECIAL_TAG "KEY_SPECIAL" -#define KEY_BIT_LSHIFT 0x01 -#define KEY_BIT_RSHIFT 0x02 -#define KEY_BIT_CTRL 0x04 -#define KEY_BIT_GRAPH 0x08 - -#define PPI8255_TAG "ppi8255" -#define PIC8259_TAG "pic8259" - -// From tech manual clock c1 is fed from c0, but it approx 100Hz -#define PIT8253_TAG "pit8253" -#define PIT_C0_CLOCK 78600 -#define PIT_C1_CLOCK 100 -#define PIT_C2_CLOCK 1789770 - -#define MONO_TAG "mono" -#define I8251A_KB_TAG "i8251a_kb" -#define FDC_TAG "wd1793" - - -struct keyboard_t -{ - UINT8 keyrows[MBC55X_KEYROWS]; - emu_timer *keyscan_timer; - - UINT8 key_special; -}; - - -class mbc55x_state : public driver_device -{ -public: - mbc55x_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MAINCPU_TAG), - m_crtc(*this, VID_MC6845_NAME), - m_kb_uart(*this, I8251A_KB_TAG), - m_pit(*this, PIT8253_TAG), - m_ppi(*this, PPI8255_TAG), - m_pic(*this, PIC8259_TAG), - m_fdc(*this, FDC_TAG), - m_floppy0(*this, FDC_TAG ":0"), - m_floppy1(*this, FDC_TAG ":1"), - m_floppy2(*this, FDC_TAG ":2"), - m_floppy3(*this, FDC_TAG ":3"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") - { - } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device m_maincpu; - required_device m_crtc; - required_device m_kb_uart; - required_device m_pit; - required_device m_ppi; - required_device m_pic; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_speaker; - required_device m_ram; - required_device m_palette; - //DECLARE_READ8_MEMBER(pic8259_r); - //DECLARE_WRITE8_MEMBER(pic8259_w); - //DECLARE_READ8_MEMBER(mbc55x_disk_r); - //DECLARE_WRITE8_MEMBER(mbc55x_disk_w); - DECLARE_READ8_MEMBER(mbc55x_usart_r); - DECLARE_WRITE8_MEMBER(mbc55x_usart_w); - //DECLARE_READ8_MEMBER(mbc55x_kb_usart_r); - //DECLARE_WRITE8_MEMBER(mbc55x_kb_usart_w); - DECLARE_READ8_MEMBER(vram_page_r); - DECLARE_WRITE8_MEMBER(vram_page_w); - DECLARE_READ8_MEMBER(ppi8255_r); - DECLARE_WRITE8_MEMBER(ppi8255_w); - //DECLARE_READ8_MEMBER(pit8253_r); - //DECLARE_WRITE8_MEMBER(pit8253_w); - DECLARE_READ16_MEMBER(mbc55x_io_r); - DECLARE_WRITE16_MEMBER(mbc55x_io_w); - DECLARE_READ8_MEMBER(mbc55x_ppi_porta_r); - DECLARE_READ8_MEMBER(mbc55x_ppi_portb_r); - DECLARE_READ8_MEMBER(mbc55x_ppi_portc_r); - DECLARE_WRITE8_MEMBER(mbc55x_ppi_porta_w); - DECLARE_WRITE8_MEMBER(mbc55x_ppi_portb_w); - DECLARE_WRITE8_MEMBER(mbc55x_ppi_portc_w); - DECLARE_WRITE_LINE_MEMBER(vid_hsync_changed); - DECLARE_WRITE_LINE_MEMBER(vid_vsync_changed); - DECLARE_WRITE_LINE_MEMBER(pit8253_t2); - - UINT32 m_debug_machine; - UINT32 m_debug_video; - UINT8 m_video_mem[VIDEO_MEM_SIZE]; - UINT8 m_vram_page; - - keyboard_t m_keyboard; - DECLARE_READ8_MEMBER(mbcpic8259_r); - DECLARE_WRITE8_MEMBER(mbcpic8259_w); - DECLARE_READ8_MEMBER(mbcpit8253_r); - DECLARE_WRITE8_MEMBER(mbcpit8253_w); - DECLARE_READ8_MEMBER(mbc55x_disk_r); - DECLARE_WRITE8_MEMBER(mbc55x_disk_w); - DECLARE_READ8_MEMBER(mbc55x_kb_usart_r); - DECLARE_WRITE8_MEMBER(mbc55x_kb_usart_w); - DECLARE_DRIVER_INIT(mbc55x); - MC6845_UPDATE_ROW(crtc_update_row); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - virtual void video_reset(); - DECLARE_PALETTE_INIT(mbc55x); - void screen_eof_mbc55x(screen_device &screen, bool state); - TIMER_CALLBACK_MEMBER(keyscan_callback); - void keyboard_reset(); - void scan_keyboard(); - void set_ram_size(); -}; - -/*----------- defined in drivers/mbc55x.c -----------*/ - -extern const unsigned char mbc55x_palette[SCREEN_NO_COLOURS][3]; - - -/*----------- defined in machine/mbc55x.c -----------*/ - -/* Memory controller */ -#define RAM_BANK00_TAG "bank0" -#define RAM_BANK01_TAG "bank1" -#define RAM_BANK02_TAG "bank2" -#define RAM_BANK03_TAG "bank3" -#define RAM_BANK04_TAG "bank4" -#define RAM_BANK05_TAG "bank5" -#define RAM_BANK06_TAG "bank6" -#define RAM_BANK07_TAG "bank7" -#define RAM_BANK08_TAG "bank8" -#define RAM_BANK09_TAG "bank9" -#define RAM_BANK0A_TAG "banka" -#define RAM_BANK0B_TAG "bankb" -#define RAM_BANK0C_TAG "bankc" -#define RAM_BANK0D_TAG "bankd" -#define RAM_BANK0E_TAG "banke" - -#define RAM_BANK_SIZE (64*1024) -#define RAM_BANK_COUNT 15 - -/* Floppy drive interface */ - -#define FDC_PAUSE 10000 - - -/*----------- defined in video/mbc55x.c -----------*/ - -#define RED 0 -#define GREEN 1 -#define BLUE 2 - -#define LINEAR_ADDR(seg,ofs) ((seg<<4)+ofs) - -#define OUTPUT_SEGOFS(mess,seg,ofs) logerror("%s=%04X:%04X [%08X]\n",mess,seg,ofs,((seg<<4)+ofs)) diff --git a/src/mess/includes/mbee.h b/src/mess/includes/mbee.h deleted file mode 100644 index 53ea3282d37..00000000000 --- a/src/mess/includes/mbee.h +++ /dev/null @@ -1,171 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robbbert -/***************************************************************************** - * - * includes/mbee.h - * - ****************************************************************************/ - -#ifndef MBEE_H_ -#define MBEE_H_ - -#include "emu.h" -#include "imagedev/snapquik.h" -#include "machine/z80pio.h" -#include "machine/8530scc.h" -#include "imagedev/cassette.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "machine/mc146818.h" -#include "video/mc6845.h" -#include "sound/speaker.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "sound/wave.h" -#include "machine/wd_fdc.h" - - -class mbee_state : public driver_device -{ -public: - enum - { - TIMER_MBEE_NEWKB - }; - - mbee_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_palette(*this, "palette") - , m_maincpu(*this, "maincpu") - , m_pio(*this, "z80pio") - , m_cassette(*this, "cassette") - , m_wave(*this, WAVE_TAG) - , m_speaker(*this, "speaker") - , m_centronics(*this, "centronics") - , m_cent_data_out(*this, "cent_data_out") - , m_crtc(*this, "crtc") - , m_fdc(*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") - , m_rtc(*this, "rtc") - , m_pak(*this, "pak") - , m_telcom(*this, "telcom") - , m_basic(*this, "basic") - , m_io_x7(*this, "X.7") - , m_io_oldkb(*this, "X") - , m_io_newkb(*this, "Y") - , m_io_config(*this, "CONFIG") - , m_screen(*this, "screen") - { } - - DECLARE_WRITE8_MEMBER(port04_w); - DECLARE_WRITE8_MEMBER(port06_w); - DECLARE_READ8_MEMBER(port07_r); - DECLARE_READ8_MEMBER(port08_r); - DECLARE_WRITE8_MEMBER(port08_w); - DECLARE_WRITE8_MEMBER(port0a_w); - DECLARE_WRITE8_MEMBER(port0b_w); - DECLARE_READ8_MEMBER(port18_r); - DECLARE_READ8_MEMBER(port1c_r); - DECLARE_WRITE8_MEMBER(port1c_w); - DECLARE_WRITE8_MEMBER(mbee128_50_w); - DECLARE_WRITE8_MEMBER(mbee256_50_w); - DECLARE_READ8_MEMBER(telcom_low_r); - DECLARE_READ8_MEMBER(telcom_high_r); - DECLARE_READ8_MEMBER(speed_low_r); - DECLARE_READ8_MEMBER(speed_high_r); - DECLARE_WRITE8_MEMBER(m6545_index_w); - DECLARE_WRITE8_MEMBER(m6545_data_w); - DECLARE_READ8_MEMBER(video_low_r); - DECLARE_READ8_MEMBER(video_high_r); - DECLARE_WRITE8_MEMBER(video_low_w); - DECLARE_WRITE8_MEMBER(video_high_w); - DECLARE_WRITE8_MEMBER(pio_port_b_w); - DECLARE_READ8_MEMBER(pio_port_b_r); - DECLARE_WRITE_LINE_MEMBER(pio_ardy); - DECLARE_WRITE_LINE_MEMBER(crtc_vs); - DECLARE_READ8_MEMBER(fdc_status_r); - DECLARE_WRITE8_MEMBER(fdc_motor_w); - DECLARE_DRIVER_INIT(mbeepc85); - DECLARE_DRIVER_INIT(mbee256); - DECLARE_DRIVER_INIT(mbee56); - DECLARE_DRIVER_INIT(mbeett); - DECLARE_DRIVER_INIT(mbeeppc); - DECLARE_DRIVER_INIT(mbee); - DECLARE_DRIVER_INIT(mbeepc); - DECLARE_DRIVER_INIT(mbeeic); - DECLARE_DRIVER_INIT(mbee128); - DECLARE_MACHINE_RESET(mbee); - DECLARE_VIDEO_START(mono); - DECLARE_VIDEO_START(standard); - DECLARE_VIDEO_START(premium); - DECLARE_PALETTE_INIT(standard); - DECLARE_PALETTE_INIT(premium); - DECLARE_MACHINE_RESET(mbee56); - DECLARE_MACHINE_RESET(mbee128); - DECLARE_MACHINE_RESET(mbee256); - DECLARE_MACHINE_RESET(mbeett); - UINT32 screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(timer_newkb); - DECLARE_QUICKLOAD_LOAD_MEMBER(mbee); - DECLARE_QUICKLOAD_LOAD_MEMBER(mbee_z80bin); - WRITE_LINE_MEMBER(rtc_irq_w); - WRITE_LINE_MEMBER(fdc_intrq_w); - WRITE_LINE_MEMBER(fdc_drq_w); - MC6845_UPDATE_ROW(crtc_update_row); - MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update_addr); - - required_device m_palette; -private: - UINT8 *m_p_videoram; - UINT8 *m_p_gfxram; - UINT8 *m_p_colorram; - UINT8 *m_p_attribram; - bool m_is_premium; - bool m_has_oldkb; - size_t m_size; - bool m_b7_rtc; - bool m_b7_vs; - bool m_b2; - UINT8 m_framecnt; - UINT8 m_08; - UINT8 m_0a; - UINT8 m_0b; - UINT8 m_1c; - UINT8 m_sy6545_cursor[16]; - UINT8 m_mbee256_was_pressed[15]; - UINT8 m_mbee256_q[20]; - UINT8 m_mbee256_q_pos; - UINT8 m_sy6545_reg[32]; - UINT8 m_sy6545_ind; - UINT8 m_fdc_rq; - UINT8 m_bank_array[33]; - void setup_banks(UINT8 data, bool first_time, UINT8 b_mask); - void sy6545_cursor_configure(); - void oldkb_scan(UINT16 param); - void oldkb_matrix_r(UINT16 offs); - void machine_reset_common(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - required_device m_maincpu; - required_device m_pio; - required_device m_cassette; - required_device m_wave; - required_device m_speaker; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_crtc; - optional_device m_fdc; - optional_device m_floppy0; - optional_device m_floppy1; - optional_device m_rtc; - optional_memory_bank m_pak; - optional_memory_bank m_telcom; - optional_memory_bank m_basic; - optional_ioport m_io_x7; - optional_ioport_array<8> m_io_oldkb; - optional_ioport_array<15> m_io_newkb; - required_ioport m_io_config; - required_device m_screen; -}; - -#endif /* MBEE_H_ */ diff --git a/src/mess/includes/mboard.h b/src/mess/includes/mboard.h deleted file mode 100644 index b6e8c5028f4..00000000000 --- a/src/mess/includes/mboard.h +++ /dev/null @@ -1,122 +0,0 @@ -// license:??? -// copyright-holders:Ralf Schaefer, Cowering -/********************************************************************** - - Mephisto Chess Computers - -**********************************************************************/ - -#ifndef __MBOARD_H__ -#define __MBOARD_H__ - -/*************************************************************************** - MACROS -***************************************************************************/ - -enum -{ - EM, /*No piece*/ - BP, - BN, - BB, - BR, - BQ, - BK, - WP, - WN, - WB, - WR, - WQ, - WK -}; - -#define NOT_VALID 99 -#define BORDER_PIECE 64 - - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - -class mboard_state : public driver_device -{ -public: - mboard_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_line(*this, "LINE"), - m_line10(*this, "LINE10"), - m_b_white(*this, "B_WHITE"), - m_b_black(*this, "B_BLACK"), - m_b_buttons(*this, "B_BUTTONS"), - m_mouse_x(*this, "MOUSE_X"), - m_mouse_y(*this, "MOUSE_Y"), - m_button_l(*this, "BUTTON_L"), - m_button_r(*this, "BUTTON_R") - { } - - DECLARE_READ8_MEMBER(mboard_read_board_8); - DECLARE_WRITE8_MEMBER(mboard_write_board_8); - DECLARE_WRITE8_MEMBER(mboard_write_LED_8); - - DECLARE_READ16_MEMBER(mboard_read_board_16); - DECLARE_WRITE16_MEMBER(mboard_write_board_16); - DECLARE_WRITE16_MEMBER(mboard_write_LED_16); - - DECLARE_READ32_MEMBER(mboard_read_board_32); - DECLARE_WRITE32_MEMBER(mboard_write_board_32); - DECLARE_WRITE32_MEMBER(mboard_write_LED_32); - - TIMER_DEVICE_CALLBACK_MEMBER( mboard_update_artwork); - - void mboard_savestate_register(); - - void mboard_set_board(); - void mboard_set_border_pieces(); - - inline UINT8 pos_to_num(UINT8 val); - - UINT8 mboard_lcd_invert; - UINT8 mboard_key_select; - UINT8 mboard_key_selector; - - int get_first_cleared_bit(UINT8 data); -private: - static const int start_board[64]; - static UINT8 border_pieces[12]; - - int m_board[64]; - int save_board[64]; - UINT16 Line18_LED; - UINT16 Line18_REED; - - int mouse_hold_border_piece; - UINT8 mouse_hold_from; - UINT8 mouse_hold_piece; - - int read_board_flag; - int get_first_bit(UINT8 data); - UINT8 read_board(); - void write_board(UINT8 data); - void write_LED(UINT8 data); - void board_presave(); - void board_postload(); - void clear_board(); - void set_artwork(); - void check_board_buttons(); -public: - required_device m_maincpu; - required_ioport_array<8> m_line; - required_ioport m_line10; - required_ioport m_b_white; - required_ioport m_b_black; - required_ioport m_b_buttons; - required_ioport m_mouse_x; - required_ioport m_mouse_y; - required_ioport m_button_l; - required_ioport m_button_r; -}; - - - -#endif /* __MBOARD_H__ */ diff --git a/src/mess/includes/mc1000.h b/src/mess/includes/mc1000.h deleted file mode 100644 index b39932b290e..00000000000 --- a/src/mess/includes/mc1000.h +++ /dev/null @@ -1,120 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __MC1000__ -#define __MC1000__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "imagedev/cassette.h" -#include "video/mc6845.h" -#include "video/mc6847.h" -#include "sound/ay8910.h" -#include "bus/centronics/ctronics.h" -#include "machine/rescap.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "u13" -#define AY8910_TAG "u21" -#define MC6845_TAG "mc6845" -#define MC6847_TAG "u19" -#define CENTRONICS_TAG "centronics" - -#define MC1000_MC6845_VIDEORAM_SIZE 0x800 -#define MC1000_MC6847_VIDEORAM_SIZE 0x1800 - -class mc1000_state : public driver_device -{ -public: - mc1000_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_vdg(*this, MC6847_TAG), - m_crtc(*this, MC6845_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_mc6845_video_ram(*this, "mc6845_vram"), - m_mc6847_video_ram(*this, "mc6847_vram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_joya(*this, "JOYA"), - m_joyb(*this, "JOYB"), - m_modifiers(*this, "MODIFIERS"), - m_joyakeymap(*this, "JOYAKEYMAP"), - m_joybkeymap(*this, "JOYBKEYMAP") - { } - - required_device m_maincpu; - required_device m_vdg; - optional_device m_crtc; - required_device m_centronics; - required_device m_cassette; - required_device m_ram; - required_memory_region m_rom; - required_shared_ptr m_mc6845_video_ram; - required_shared_ptr m_mc6847_video_ram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_joya; - required_ioport m_joyb; - required_ioport m_modifiers; - required_ioport m_joyakeymap; - required_ioport m_joybkeymap; - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( printer_r ); - DECLARE_WRITE8_MEMBER( printer_w ); - DECLARE_WRITE8_MEMBER( mc6845_ctrl_w ); - DECLARE_WRITE8_MEMBER( mc6847_attr_w ); - DECLARE_WRITE_LINE_MEMBER( fs_w ); - DECLARE_WRITE_LINE_MEMBER( hs_w ); - DECLARE_READ8_MEMBER( videoram_r ); - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_READ8_MEMBER( keydata_r ); - DIRECT_UPDATE_MEMBER(mc1000_direct_update_handler); - - void bankswitch(); - - /* cpu state */ - int m_ne555_int; - - /* memory state */ - int m_rom0000; - int m_mc6845_bank; - int m_mc6847_bank; - - /* keyboard state */ - int m_keylatch; - - /* video state */ - int m_hsync; - int m_vsync; - UINT8 m_mc6847_attr; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - int m_centronics_busy; - - DECLARE_DRIVER_INIT(mc1000); - TIMER_DEVICE_CALLBACK_MEMBER(ne555_tick); -}; - -#endif diff --git a/src/mess/includes/mc1502.h b/src/mess/includes/mc1502.h deleted file mode 100644 index 28b38aca85e..00000000000 --- a/src/mess/includes/mc1502.h +++ /dev/null @@ -1,84 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -/***************************************************************************** - * - * includes/mc1502.h - * - ****************************************************************************/ - -#ifndef MC1502_H_ -#define MC1502_H_ - -#include "imagedev/cassette.h" -#include "machine/i8251.h" -#include "machine/i8255.h" -#include "bus/isa/isa.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "bus/isa/xsu_cards.h" -#include "sound/speaker.h" -#include "bus/centronics/ctronics.h" - -class mc1502_state : public driver_device -{ -public: - mc1502_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_upd8251(*this, "upd8251"), - m_pic8259(*this, "pic8259"), - m_pit8253(*this, "pit8253"), - m_ppi8255n1(*this, "ppi8255n1"), - m_ppi8255n2(*this, "ppi8255n2"), - m_isabus(*this, "isa"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_centronics(*this, "centronics"), - m_ram(*this, RAM_TAG) { } - - required_device m_maincpu; - required_device m_upd8251; - required_device m_pic8259; - required_device m_pit8253; - required_device m_ppi8255n1; - required_device m_ppi8255n2; - required_device m_isabus; - required_device m_speaker; - required_device m_cassette; - required_device m_centronics; - required_device m_ram; - - DECLARE_DRIVER_INIT(mc1502); - DECLARE_MACHINE_START(mc1502); - DECLARE_MACHINE_RESET(mc1502); - - TIMER_CALLBACK_MEMBER(keyb_signal_callback); - - struct { - UINT8 pulsing; - UINT16 mask; /* input lines */ - emu_timer *keyb_signal_timer; - } m_kbd; - - UINT8 m_ppi_portb; - UINT8 m_ppi_portc; - UINT8 m_spkrdata; - - DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out1_changed); - DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out2_changed); - DECLARE_WRITE_LINE_MEMBER(mc1502_speaker_set_spkrdata); - DECLARE_WRITE_LINE_MEMBER(mc1502_i8251_syndet); - - DECLARE_WRITE8_MEMBER(mc1502_ppi_portb_w); - DECLARE_WRITE8_MEMBER(mc1502_ppi_portc_w); - DECLARE_READ8_MEMBER(mc1502_ppi_portc_r); - DECLARE_READ8_MEMBER(mc1502_kppi_porta_r); - DECLARE_WRITE8_MEMBER(mc1502_kppi_portb_w); - DECLARE_WRITE8_MEMBER(mc1502_kppi_portc_w); - -private: - int m_pit_out2; -}; - -#endif /* MC1502_H_ */ diff --git a/src/mess/includes/mc80.h b/src/mess/includes/mc80.h deleted file mode 100644 index 74699a2327c..00000000000 --- a/src/mess/includes/mc80.h +++ /dev/null @@ -1,57 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/mc80.h - * - ****************************************************************************/ - -#ifndef MC80_H_ -#define MC80_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/z80ctc.h" -#include "machine/z80pio.h" -#include "machine/z80dart.h" - -class mc80_state : public driver_device -{ -public: - mc80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_p_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu") { } - - DECLARE_WRITE8_MEMBER(mc8030_zve_write_protect_w); - DECLARE_WRITE8_MEMBER(mc8030_vis_w); - DECLARE_WRITE8_MEMBER(mc8030_eprom_prog_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z0_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z1_w); - DECLARE_READ8_MEMBER(mc80_port_b_r); - DECLARE_READ8_MEMBER(mc80_port_a_r); - DECLARE_WRITE8_MEMBER(mc80_port_a_w); - DECLARE_WRITE8_MEMBER(mc80_port_b_w); - DECLARE_READ8_MEMBER(zve_port_a_r); - DECLARE_READ8_MEMBER(zve_port_b_r); - DECLARE_WRITE8_MEMBER(zve_port_a_w); - DECLARE_WRITE8_MEMBER(zve_port_b_w); - DECLARE_READ8_MEMBER(asp_port_a_r); - DECLARE_READ8_MEMBER(asp_port_b_r); - DECLARE_WRITE8_MEMBER(asp_port_a_w); - DECLARE_WRITE8_MEMBER(asp_port_b_w); - optional_shared_ptr m_p_videoram; - DECLARE_MACHINE_RESET(mc8020); - DECLARE_VIDEO_START(mc8020); - DECLARE_MACHINE_RESET(mc8030); - DECLARE_VIDEO_START(mc8030); - UINT32 screen_update_mc8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_mc8030(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(mc8020_kbd); - DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); - IRQ_CALLBACK_MEMBER(mc8020_irq_callback); - IRQ_CALLBACK_MEMBER(mc8030_irq_callback); - required_device m_maincpu; -}; - -#endif diff --git a/src/mess/includes/md_cons.h b/src/mess/includes/md_cons.h deleted file mode 100644 index b2904a4134a..00000000000 --- a/src/mess/includes/md_cons.h +++ /dev/null @@ -1,49 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:David Haywood - -#include "includes/megadriv.h" -#include "bus/megadrive/md_slot.h" -#include "bus/megadrive/md_carts.h" -#include "machine/mega32x.h" -#include "machine/megacd.h" - - -class md_cons_state : public md_base_state -{ -public: - md_cons_state(const machine_config &mconfig, device_type type, const char *tag) - : md_base_state(mconfig, type, tag), - m_32x(*this,"sega32x"), - m_segacd(*this,"segacd"), - m_cart(*this, "mdslot") - { } - - ioport_port *m_io_ctrlr; - ioport_port *m_io_pad3b[4]; - ioport_port *m_io_pad6b[2][4]; - - optional_device m_32x; - optional_device m_segacd; - optional_device m_cart; - - DECLARE_DRIVER_INIT(mess_md_common); - DECLARE_DRIVER_INIT(genesis); - DECLARE_DRIVER_INIT(md_eur); - DECLARE_DRIVER_INIT(md_jpn); - - READ8_MEMBER(mess_md_io_read_data_port); - WRITE16_MEMBER(mess_md_io_write_data_port); - - DECLARE_MACHINE_START( md_common ); // setup ioport_port - DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers - DECLARE_MACHINE_START( ms_megacd ); // setup ioport_port + dma delay for cd - DECLARE_MACHINE_RESET( ms_megadriv ); - - void screen_eof_console(screen_device &screen, bool state); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( _32x_cart ); - - void _32x_scanline_callback(int x, UINT32 priority, UINT16 &lineptr); - void _32x_interrupt_callback(int scanline, int irq6); - void _32x_scanline_helper_callback(int scanline); -}; diff --git a/src/mess/includes/micronic.h b/src/mess/includes/micronic.h deleted file mode 100644 index f55fe9bb586..00000000000 --- a/src/mess/includes/micronic.h +++ /dev/null @@ -1,98 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/***************************************************************************** - - includes/micronic.h - -*****************************************************************************/ - -#ifndef __MICRONIC__ -#define __MICRONIC__ - -#include "cpu/z80/z80.h" -#include "video/hd61830.h" -#include "machine/mc146818.h" -#include "machine/ram.h" -#include "machine/nvram.h" -#include "sound/beep.h" -#include "imagedev/cassette.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define MC146818_TAG "mc146818" -#define HD61830_TAG "hd61830" - -class micronic_state : public driver_device -{ -public: - micronic_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_lcdc(*this, HD61830_TAG), - m_beep(*this, "beeper"), - m_rtc(*this, MC146818_TAG), - m_nvram1(*this, "nvram1"), - m_nvram2(*this, "nvram2"), - m_ram(*this, RAM_TAG), - m_ram_base(*this, "ram_base"), - m_status_flag(1), - m_bank1(*this, "bank1"), - m_bit0(*this, "BIT0"), - m_bit1(*this, "BIT1"), - m_bit2(*this, "BIT2"), - m_bit3(*this, "BIT3"), - m_bit4(*this, "BIT4"), - m_bit5(*this, "BIT5"), - m_backbattery(*this, "BACKBATTERY"), - m_mainbattery(*this, "MAINBATTERY"), - m_cassette(*this, "cassette") - { } - - required_device m_maincpu; - required_device m_lcdc; - required_device m_beep; - required_device m_rtc; - required_device m_nvram1; - required_device m_nvram2; - required_device m_ram; - - virtual void machine_start(); - virtual void machine_reset(); - void nvram_init(nvram_device &nvram, void *data, size_t size); - - DECLARE_READ8_MEMBER( keypad_r ); - DECLARE_READ8_MEMBER( status_flag_r ); - DECLARE_WRITE8_MEMBER( status_flag_w ); - DECLARE_WRITE8_MEMBER( kp_matrix_w ); - DECLARE_WRITE8_MEMBER( beep_w ); - DECLARE_READ8_MEMBER( irq_flag_r ); - DECLARE_WRITE8_MEMBER( port_2c_w ); - DECLARE_WRITE8_MEMBER( bank_select_w ); - DECLARE_WRITE8_MEMBER( lcd_contrast_w ); - DECLARE_WRITE8_MEMBER( rtc_address_w ); - DECLARE_READ8_MEMBER( rtc_data_r ); - DECLARE_WRITE8_MEMBER( rtc_data_w ); - DECLARE_WRITE_LINE_MEMBER( mc146818_irq ); - - required_shared_ptr m_ram_base; - UINT8 m_banks_num; - UINT8 m_kp_matrix; - UINT8 m_lcd_contrast; - int m_lcd_backlight; - UINT8 m_status_flag; - DECLARE_PALETTE_INIT(micronic); - -protected: - required_memory_bank m_bank1; - required_ioport m_bit0; - required_ioport m_bit1; - required_ioport m_bit2; - required_ioport m_bit3; - required_ioport m_bit4; - required_ioport m_bit5; - required_ioport m_backbattery; - required_ioport m_mainbattery; - optional_device m_cassette; -}; - -#endif diff --git a/src/mess/includes/microtan.h b/src/mess/includes/microtan.h deleted file mode 100644 index 29640649763..00000000000 --- a/src/mess/includes/microtan.h +++ /dev/null @@ -1,103 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller -/****************************************************************************** - * Microtan 65 - * - * variables and function prototypes - * - * Juergen Buchmueller , Jul 2000 - * - * Thanks go to Geoff Macdonald - * for his site http://www.geo255.redhotant.com - * and to Fabrice Frances - * for his site http://www.ifrance.com/oric/microtan.html - * - ******************************************************************************/ - -#ifndef MICROTAN_H_ -#define MICROTAN_H_ - -#include "imagedev/snapquik.h" -#include "machine/6522via.h" -#include "imagedev/cassette.h" - -class microtan_state : public driver_device -{ -public: - enum - { - TIMER_READ_CASSETTE, - TIMER_PULSE_NMI - }; - - microtan_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_via6522_0(*this, "via6522_0"), - m_via6522_1(*this, "via6522_1"), - m_gfxdecode(*this, "gfxdecode") - { } - - required_shared_ptr m_videoram; - UINT8 m_chunky_graphics; - UINT8 *m_chunky_buffer; - UINT8 m_keypad_column; - UINT8 m_keyboard_ascii; - emu_timer *m_timer; - int m_via_0_irq_line; - int m_via_1_irq_line; - int m_kbd_irq_line; - UINT8 m_keyrows[10]; - int m_lastrow; - int m_mask; - int m_key; - int m_repeat; - int m_repeater; - tilemap_t *m_bg_tilemap; - DECLARE_READ8_MEMBER(microtan_sound_r); - DECLARE_WRITE8_MEMBER(microtan_sound_w); - DECLARE_READ8_MEMBER(microtan_bffx_r); - DECLARE_WRITE8_MEMBER(microtan_bffx_w); - DECLARE_WRITE8_MEMBER(microtan_videoram_w); - DECLARE_DRIVER_INIT(microtan); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_microtan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(microtan_interrupt); - TIMER_CALLBACK_MEMBER(microtan_read_cassette); - TIMER_CALLBACK_MEMBER(microtan_pulse_nmi); - DECLARE_READ8_MEMBER(via_0_in_a); - DECLARE_WRITE8_MEMBER(via_0_out_a); - DECLARE_WRITE8_MEMBER(via_0_out_b); - DECLARE_WRITE_LINE_MEMBER(via_0_out_ca2); - DECLARE_WRITE_LINE_MEMBER(via_0_out_cb2); - DECLARE_WRITE8_MEMBER(via_1_out_a); - DECLARE_WRITE8_MEMBER(via_1_out_b); - DECLARE_WRITE_LINE_MEMBER(via_1_out_ca2); - DECLARE_WRITE_LINE_MEMBER(via_1_out_cb2); - DECLARE_WRITE_LINE_MEMBER(via_0_irq); - DECLARE_WRITE_LINE_MEMBER(via_1_irq); - required_device m_maincpu; - required_device m_cassette; - required_device m_via6522_0; - required_device m_via6522_1; - required_device m_gfxdecode; - UINT8 read_dsw(); - void microtan_set_irq_line(); - void store_key(int key); - int microtan_verify_snapshot(UINT8 *data, int size); - int parse_intel_hex(UINT8 *snapshot_buff, char *src); - int parse_zillion_hex(UINT8 *snapshot_buff, char *src); - void microtan_set_cpu_regs(const UINT8 *snapshot_buff, int base); - void microtan_snapshot_copy(UINT8 *snapshot_buff, int snapshot_size); - DECLARE_SNAPSHOT_LOAD_MEMBER( microtan ); - DECLARE_QUICKLOAD_LOAD_MEMBER( microtan ); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* MICROTAN_H_ */ diff --git a/src/mess/includes/mikro80.h b/src/mess/includes/mikro80.h deleted file mode 100644 index 99ca55e3692..00000000000 --- a/src/mess/includes/mikro80.h +++ /dev/null @@ -1,80 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/mikro80.h - * - ****************************************************************************/ - -#ifndef MIKRO80_H_ -#define MIKRO80_H_ - -#include "machine/i8255.h" -#include "imagedev/cassette.h" - -class mikro80_state : public driver_device -{ -public: - enum - { - TIMER_RESET - }; - - mikro80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cursor_ram(*this, "cursor_ram"), - m_video_ram(*this, "video_ram"), - m_ppi8255(*this, "ppi8255"), - m_cassette(*this, "cassette"), - m_region_maincpu(*this, "maincpu"), - m_region_gfx1(*this, "gfx1"), - m_bank1(*this, "bank1"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_line8(*this, "LINE8") , - m_maincpu(*this, "maincpu") { } - - required_shared_ptr m_cursor_ram; - required_shared_ptr m_video_ram; - int m_keyboard_mask; - int m_key_mask; - DECLARE_READ8_MEMBER(mikro80_8255_portb_r); - DECLARE_READ8_MEMBER(mikro80_8255_portc_r); - DECLARE_WRITE8_MEMBER(mikro80_8255_porta_w); - DECLARE_WRITE8_MEMBER(mikro80_8255_portc_w); - DECLARE_READ8_MEMBER(mikro80_keyboard_r); - DECLARE_WRITE8_MEMBER(mikro80_keyboard_w); - DECLARE_WRITE8_MEMBER(mikro80_tape_w); - DECLARE_READ8_MEMBER(mikro80_tape_r); - DECLARE_DRIVER_INIT(radio99); - DECLARE_DRIVER_INIT(mikro80); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_mikro80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - required_device m_ppi8255; - required_device m_cassette; - required_memory_region m_region_maincpu; - required_memory_region m_region_gfx1; - required_memory_bank m_bank1; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; - required_ioport m_io_line8; - required_device m_maincpu; -}; - -#endif /* UT88_H_ */ diff --git a/src/mess/includes/mikromik.h b/src/mess/includes/mikromik.h deleted file mode 100644 index 3565d77e8de..00000000000 --- a/src/mess/includes/mikromik.h +++ /dev/null @@ -1,138 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __MIKROMIKKO__ -#define __MIKROMIKKO__ - -#include "bus/rs232/rs232.h" -#include "cpu/i8085/i8085.h" -#include "formats/mm_dsk.h" -#include "machine/am9517a.h" -#include "machine/i8212.h" -#include "machine/mm1kb.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "machine/z80dart.h" -#include "machine/upd765.h" -#include "video/i8275.h" -#include "video/upd7220.h" - -#define SCREEN_TAG "screen" -#define I8085A_TAG "ic40" -#define I8212_TAG "ic12" -#define I8237_TAG "ic45" -#define I8253_TAG "ic6" -#define UPD765_TAG "ic15" -#define I8275_TAG "ic59" -#define UPD7201_TAG "ic11" -#define UPD7220_TAG "ic101" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define RS232_C_TAG "rs232c" -#define KB_TAG "kb" - -class mm1_state : public driver_device -{ -public: - mm1_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, I8085A_TAG), - m_iop(*this, I8212_TAG), - m_dmac(*this, I8237_TAG), - m_pit(*this, I8253_TAG), - m_crtc(*this, I8275_TAG), - m_fdc(*this, UPD765_TAG), - m_mpsc(*this, UPD7201_TAG), - m_hgdc(*this, UPD7220_TAG), - m_palette(*this, "palette"), - m_floppy0(*this, UPD765_TAG ":0:525qd"), - m_floppy1(*this, UPD765_TAG ":1:525qd"), - m_rs232a(*this, RS232_A_TAG), - m_rs232b(*this, RS232_B_TAG), - m_rs232c(*this, RS232_C_TAG), - m_ram(*this, RAM_TAG), - m_rom(*this, I8085A_TAG), - m_mmu_rom(*this, "address"), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_a8(0), - m_recall(0), - m_dack3(1), - m_tc(CLEAR_LINE), - m_fdc_tc(0) - { } - - required_device m_maincpu; - required_device m_iop; - required_device m_dmac; - required_device m_pit; - required_device m_crtc; - required_device m_fdc; - required_device m_mpsc; - required_device m_hgdc; - required_device m_palette; - required_device m_floppy0; - required_device m_floppy1; - required_device m_rs232a; - required_device m_rs232b; - required_device m_rs232c; - required_device m_ram; - required_memory_region m_rom; - required_memory_region m_mmu_rom; - required_memory_region m_char_rom; - required_shared_ptr m_video_ram; - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE8_MEMBER( ls259_w ); - DECLARE_WRITE_LINE_MEMBER( dma_hrq_w ); - DECLARE_READ8_MEMBER( mpsc_dack_r ); - DECLARE_WRITE8_MEMBER( mpsc_dack_w ); - DECLARE_WRITE_LINE_MEMBER( dma_eop_w ); - DECLARE_WRITE_LINE_MEMBER( dack3_w ); - DECLARE_WRITE_LINE_MEMBER( itxc_w ); - DECLARE_WRITE_LINE_MEMBER( irxc_w ); - DECLARE_WRITE_LINE_MEMBER( auxc_w ); - DECLARE_WRITE_LINE_MEMBER( drq2_w ); - DECLARE_WRITE_LINE_MEMBER( drq1_w ); - DECLARE_READ_LINE_MEMBER( dsra_r ); - - void update_tc(); - void fdc_intrq_w(bool state); - void fdc_drq_w(bool state); - - int m_a8; - - // video state - int m_llen; - - // serial state - int m_intc; - int m_rx21; - int m_tx21; - int m_rcl; - - // floppy state - int m_recall; - int m_dack3; - int m_tc; - int m_fdc_tc; - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - I8275_DRAW_CHARACTER_MEMBER( crtc_display_pixels ); - UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels ); -}; - - -//----------- defined in video/mikromik.c ----------- - -MACHINE_CONFIG_EXTERN( mm1m6_video ); - - -#endif diff --git a/src/mess/includes/mpf1.h b/src/mess/includes/mpf1.h deleted file mode 100644 index e4d6a19b628..00000000000 --- a/src/mess/includes/mpf1.h +++ /dev/null @@ -1,78 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Curt Coder -#pragma once - -#ifndef __MPF1__ -#define __MPF1__ - - -#include "emu.h" -#include "machine/spchrom.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "imagedev/cassette.h" -#include "machine/i8255.h" -#include "machine/z80ctc.h" -#include "machine/z80pio.h" -#include "sound/speaker.h" -#include "sound/tms5220.h" - -#define Z80_TAG "u1" -#define Z80CTC_TAG "u11" -#define Z80PIO_TAG "u10" -#define I8255A_TAG "u14" -#define TMS5220_TAG "tms5220" - -class mpf1_state : public driver_device -{ -public: - mpf1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_pc0(*this, "PC0"), - m_pc1(*this, "PC1"), - m_pc2(*this, "PC2"), - m_pc3(*this, "PC3"), - m_pc4(*this, "PC4"), - m_pc5(*this, "PC5"), - m_special(*this, "SPECIAL") - { } - - required_device m_maincpu; - required_device m_ctc; - required_device m_speaker; - required_device m_cassette; - required_ioport m_pc0; - required_ioport m_pc1; - required_ioport m_pc2; - required_ioport m_pc3; - required_ioport m_pc4; - required_ioport m_pc5; - required_ioport m_special; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( ppi_pa_r ); - DECLARE_WRITE8_MEMBER( ppi_pb_w ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_irq ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_res ); - DECLARE_DIRECT_UPDATE_MEMBER(mpf1_direct_update_handler); - - int m_break; - int m_m1; - - UINT8 m_lednum; - - emu_timer *m_led_refresh_timer; - DECLARE_DRIVER_INIT(mpf1); - TIMER_CALLBACK_MEMBER(led_refresh); - TIMER_DEVICE_CALLBACK_MEMBER(check_halt_callback); -}; - -#endif diff --git a/src/mess/includes/mpz80.h b/src/mess/includes/mpz80.h deleted file mode 100644 index 8802273b5a3..00000000000 --- a/src/mess/includes/mpz80.h +++ /dev/null @@ -1,99 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __MPZ80__ -#define __MPZ80__ - -#include "emu.h" -#include "bus/s100/s100.h" -#include "cpu/z80/z80.h" -#include "machine/ram.h" - -#define Z80_TAG "17a" -#define AM9512_TAG "17d" - -class mpz80_state : public driver_device -{ -public: - mpz80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ram(*this, RAM_TAG), - m_s100(*this, S100_TAG), - m_rom(*this, Z80_TAG), - m_map_ram(*this, "map_ram"), - m_16c(*this, "16C"), - m_nmi(1), - m_pint(1), - m_int_pend(0), - m_pretrap(0), - m_trap(0), - m_trap_reset(0), - m_trap_void(1), - m_trap_halt(1), - m_trap_int(1), - m_trap_stop(1), - m_trap_aux(1) - { } - - required_device m_maincpu; - required_device m_ram; - required_device m_s100; - required_memory_region m_rom; - optional_shared_ptr m_map_ram; - required_ioport m_16c; - - virtual void machine_start(); - virtual void machine_reset(); - - inline offs_t get_address(offs_t offset); - inline offs_t get_io_address(offs_t offset); - - inline void check_traps(); - inline void check_interrupt(); - - DECLARE_READ8_MEMBER( mmu_r ); - DECLARE_WRITE8_MEMBER( mmu_w ); - DECLARE_READ8_MEMBER( mmu_io_r ); - DECLARE_WRITE8_MEMBER( mmu_io_w ); - DECLARE_READ8_MEMBER( trap_addr_r ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_READ8_MEMBER( switch_r ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( disp_seg_w ); - DECLARE_WRITE8_MEMBER( disp_col_w ); - DECLARE_WRITE8_MEMBER( task_w ); - DECLARE_WRITE8_MEMBER( mask_w ); - DECLARE_WRITE8_MEMBER( terminal_w ); - DECLARE_WRITE_LINE_MEMBER( s100_pint_w ); - DECLARE_WRITE_LINE_MEMBER( s100_nmi_w ); - DECLARE_DIRECT_UPDATE_MEMBER(mpz80_direct_update_handler); - - // memory state - UINT32 m_addr; - UINT8 m_task; - UINT8 m_mask; - - // interrupt state - int m_nmi; - int m_pint; - int m_int_pend; - - // trap state - UINT8 m_pretrap_addr; - UINT8 m_trap_addr; - UINT8 m_status; - UINT16 m_trap_start; - int m_pretrap; - int m_trap; - int m_trap_reset; - int m_trap_void; - int m_trap_halt; - int m_trap_int; - int m_trap_stop; - int m_trap_aux; - DECLARE_DRIVER_INIT(mpz80); -}; - -#endif diff --git a/src/mess/includes/msbc1.h b/src/mess/includes/msbc1.h deleted file mode 100644 index 870e0d65167..00000000000 --- a/src/mess/includes/msbc1.h +++ /dev/null @@ -1,28 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic, Curt Coder -#pragma once - -#ifndef __MSBC1__ -#define __MSBC1__ - -#define MC68000R12_TAG "u50" -#define MK68564_0_TAG "u14" -#define MK68564_1_TAG "u15" -#define MC68230L10_TAG "u16" - -class msbc1_state : public driver_device -{ -public: - msbc1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this,MC68000R12_TAG) - { - } - - virtual void machine_reset(); - -private: - required_device m_maincpu; -}; - -#endif diff --git a/src/mess/includes/msx.h b/src/mess/includes/msx.h deleted file mode 100644 index d849693ec14..00000000000 --- a/src/mess/includes/msx.h +++ /dev/null @@ -1,265 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/msx.h - * - ****************************************************************************/ - -#ifndef __MSX_H__ -#define __MSX_H__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/rp5c01.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "sound/ay8910.h" -#include "sound/dac.h" -#include "sound/wave.h" -#include "sound/2413intf.h" -#include "video/v9938.h" -#include "video/tms9928a.h" -#include "imagedev/flopdrv.h" -#include "imagedev/cassette.h" -#include "formats/fmsx_cas.h" -#include "formats/msx_dsk.h" -#include "hashfile.h" -#include "machine/wd_fdc.h" -#include "imagedev/floppy.h" -#include "bus/msx_slot/slot.h" -#include "bus/msx_slot/rom.h" -#include "bus/msx_slot/ram.h" -#include "bus/msx_slot/cartridge.h" -#include "bus/msx_slot/ram_mm.h" -#include "bus/msx_slot/disk.h" -#include "bus/msx_slot/music.h" -#include "bus/msx_slot/bunsetsu.h" -#include "bus/msx_slot/fs4600.h" -#include "bus/msx_slot/panasonic08.h" -#include "bus/msx_slot/sony08.h" - - -#define TC8521_TAG "rtc" - -#define MCFG_MSX_LAYOUT_ROM(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_ROM_ADD(_tag, _page, _numpages, _region, _offset) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_RAM(_tag, _prim, _sec, _page, _numpages) \ - MCFG_MSX_SLOT_RAM_ADD(_tag, _page, _numpages) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_CARTRIDGE(_tag, _prim, _sec) \ - MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag, WRITELINE(msx_state, msx_irq_source1)) \ - msx_state::install_slot_pages(*owner, _prim, _sec, 0, 4, device); - -#define MCFG_MSX_LAYOUT_YAMAHA_EXPANSION(_tag, _prim, _sec, _default) \ - MCFG_MSX_SLOT_YAMAHA_EXPANSION_ADD(_tag, WRITELINE(msx_state, msx_irq_source2), _default) \ - msx_state::install_slot_pages(*owner, _prim, _sec, 0, 4, device); - -#define MCFG_MSX_LAYOUT_RAM_MM(_tag, _prim, _sec, _total_size) \ - MCFG_MSX_SLOT_RAM_MM_ADD(_tag, _total_size) \ - msx_state::install_slot_pages(*owner, _prim, _sec, 0, 4, device); - -#define MCFG_MSX_RAMIO_SET_BITS(_ramio_set_bits) \ - MCFG_MSX_SLOT_RAMM_SET_RAMIO_BITS(_ramio_set_bits) - -#define MCFG_MSX_LAYOUT_DISK1(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK1_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages + 1, device); /* Memory mapped FDC registers are also accessible through page 2 */ - -#define MCFG_MSX_LAYOUT_DISK2(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK2_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages + 1, device); /* Memory mapped FDC registers are also accessible through page 2 */ - -#define MCFG_MSX_LAYOUT_DISK3(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK3_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_DISK4(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK4_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_DISK5(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK5_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1", "fdc:2", "fdc:3") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_DISK6(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_DISK6_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_MUSIC(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_MUSIC_ADD(_tag, _page, _numpages, _region, _offset, "ym2413" ) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_BUNSETSU(_tag, _prim, _sec, _page, _numpages, _region, _offset, _bunsetsu_tag) \ - MCFG_MSX_SLOT_BUNSETSU_ADD(_tag, _page, _numpages, _region, _offset, _bunsetsu_tag) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_FS4600(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_FS4600_ADD(_tag, _page, _numpages, _region, _offset) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_PANASONIC08(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_PANASONIC08_ADD(_tag, _page, _numpages, _region, _offset) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - -#define MCFG_MSX_LAYOUT_SONY08(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ - MCFG_MSX_SLOT_SONY08_ADD(_tag, _page, _numpages, _region, _offset) \ - msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); - - -class msx_state : public driver_device -{ -public: - msx_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_v9938(*this, "v9938") - , m_v9958(*this, "v9958") - , m_cassette(*this, "cassette") - , m_ay8910(*this, "ay8910") - , m_dac(*this, "dac") - , m_rtc(*this, TC8521_TAG) - , m_switched_device_as_config("switched_device", ENDIANNESS_LITTLE, 8, 16, 0, address_map_delegate(FUNC(msx_state::switched_device_map), this)) - , m_region_maincpu(*this, "maincpu") - , m_region_kanji(*this, "kanji") - , m_io_joy0(*this, "JOY0") - , m_io_joy1(*this, "JOY1") - , m_io_dsw(*this, "DSW") - , m_io_mouse0(*this, "MOUSE0") - , m_io_mouse1(*this, "MOUSE1") - , m_io_key0(*this, "KEY0") - , m_io_key1(*this, "KEY1") - , m_io_key2(*this, "KEY2") - , m_io_key3(*this, "KEY3") - , m_io_key4(*this, "KEY4") - , m_io_key5(*this, "KEY5") - , m_psg_b(0) - , m_rtc_latch(0) - , m_kanji_latch(0) - , m_primary_slot(0) - , m_port_c_old(0) - , m_keylatch(0) - , m_current_switched_device(0) - { - for (int prim = 0; prim < 4; prim++ ) - { - m_slot_expanded[prim] = false; - m_secondary_slot[prim] = 0; - for (int sec = 0; sec < 4; sec++ ) - { - for (int page = 0; page < 4; page++ ) - { - m_all_slots[prim][sec][page] = NULL; - } - } - } - m_mouse[0] = m_mouse[1] = 0; - m_mouse_stat[0] = m_mouse_stat[1] = 0; - for (int i = 0; i < ARRAY_LENGTH(m_irq_state); i++) - { - m_irq_state[i] = CLEAR_LINE; - } - } - - // static configuration helpers - static void install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device); - - virtual void driver_start(); - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_ADDRESS_MAP(switched_device_map, 8); - DECLARE_WRITE8_MEMBER(msx_sec_slot_w); - DECLARE_READ8_MEMBER(msx_sec_slot_r); - DECLARE_READ8_MEMBER(msx_kanji_r); - DECLARE_WRITE8_MEMBER(msx_kanji_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_a_w); - DECLARE_WRITE8_MEMBER(msx_ppi_port_c_w); - DECLARE_READ8_MEMBER(msx_ppi_port_b_r); - DECLARE_READ8_MEMBER(msx_rtc_reg_r); - DECLARE_WRITE8_MEMBER(msx_rtc_reg_w); - DECLARE_WRITE8_MEMBER(msx_rtc_latch_w); - DECLARE_READ8_MEMBER(msx_mem_read); - DECLARE_WRITE8_MEMBER(msx_mem_write); - DECLARE_READ8_MEMBER(msx_switched_r); - DECLARE_WRITE8_MEMBER(msx_switched_w); - DECLARE_WRITE_LINE_MEMBER(turbo_w); - - void msx_memory_map_all(); - void msx_memory_map_page(UINT8 page); - void msx_memory_reset(); - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - DECLARE_READ8_MEMBER(msx_psg_port_a_r); - DECLARE_READ8_MEMBER(msx_psg_port_b_r); - DECLARE_WRITE8_MEMBER(msx_psg_port_a_w); - DECLARE_WRITE8_MEMBER(msx_psg_port_b_w); - INTERRUPT_GEN_MEMBER(msx_interrupt); - DECLARE_WRITE8_MEMBER(msx_ay8910_w); - void msx_memory_init(); - void post_load(); - - DECLARE_WRITE_LINE_MEMBER(msx_irq_source0) { msx_irq_source(0, state); } // usually tms9918/v9938/v9958 - DECLARE_WRITE_LINE_MEMBER(msx_irq_source1) { msx_irq_source(1, state); } // usually first cartridge slot - DECLARE_WRITE_LINE_MEMBER(msx_irq_source2) { msx_irq_source(2, state); } // usually second cartridge slot - DECLARE_WRITE_LINE_MEMBER(msx_irq_source3) { msx_irq_source(3, state); } // sometimes expansion slot - -protected: - virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == 0) ? &m_switched_device_as_config : NULL; } - -private: - required_device m_maincpu; - optional_device m_v9938; - optional_device m_v9958; - required_device m_cassette; - required_device m_ay8910; - required_device m_dac; - optional_device m_rtc; - address_space_config m_switched_device_as_config; - required_memory_region m_region_maincpu; - optional_memory_region m_region_kanji; - required_ioport m_io_joy0; - required_ioport m_io_joy1; - required_ioport m_io_dsw; - required_ioport m_io_mouse0; - required_ioport m_io_mouse1; - required_ioport m_io_key0; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; - required_ioport m_io_key4; - required_ioport m_io_key5; - - /* PSG */ - int m_psg_b; - /* mouse */ - UINT16 m_mouse[2]; - int m_mouse_stat[2]; - /* rtc */ - int m_rtc_latch; - /* kanji */ - int m_kanji_latch; - /* memory */ - msx_internal_slot_interface m_empty_slot; - msx_internal_slot_interface *m_all_slots[4][4][4]; - msx_internal_slot_interface *m_current_page[4]; - bool m_slot_expanded[4]; - UINT8 m_primary_slot; - UINT8 m_secondary_slot[4]; - int m_port_c_old; - int m_keylatch; - UINT8 m_current_switched_device; - - int m_irq_state[4]; - - void msx_irq_source(int source, int level); - void check_irq(); -}; - - -#endif /* __MSX_H__ */ diff --git a/src/mess/includes/mtx.h b/src/mess/includes/mtx.h deleted file mode 100644 index 5558e1fcd15..00000000000 --- a/src/mess/includes/mtx.h +++ /dev/null @@ -1,99 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Lee Ward, Dirk Best, Curt Coder -/************************************************************************* - - Memotech MTX 500, MTX 512 and RS 128 - -*************************************************************************/ - -#ifndef __MTX__ -#define __MTX__ - -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "bus/centronics/ctronics.h" -#include "machine/z80dart.h" -#include "machine/z80ctc.h" -#include "sound/sn76496.h" -#include "machine/ram.h" - -#define Z80_TAG "z80" -#define Z80CTC_TAG "z80ctc" -#define Z80DART_TAG "z80dart" -#define FD1793_TAG "fd1793" // SDX -#define FD1791_TAG "fd1791" // FDX -#define SN76489A_TAG "sn76489a" -#define MC6845_TAG "mc6845" -#define SCREEN_TAG "screen" -#define CENTRONICS_TAG "centronics" - -class mtx_state : public driver_device -{ -public: - mtx_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_sn(*this, SN76489A_TAG), - m_z80ctc(*this, Z80CTC_TAG), - m_z80dart(*this, Z80DART_TAG), - m_cassette(*this, "cassette"), - m_centronics(*this, CENTRONICS_TAG), - m_ram(*this, RAM_TAG) - { } - - required_device m_maincpu; - required_device m_sn; - required_device m_z80ctc; - optional_device m_z80dart; - required_device m_cassette; - required_device m_centronics; - required_device m_ram; - - /* keyboard state */ - UINT8 m_key_sense; - - /* video state */ - UINT8 *m_video_ram; - UINT8 *m_attr_ram; - - /* sound state */ - UINT8 m_sound_latch; - - /* timers */ - device_t *m_cassette_timer; - - int m_centronics_busy; - int m_centronics_fault; - int m_centronics_perror; - int m_centronics_select; - - DECLARE_WRITE8_MEMBER(mtx_bankswitch_w); - DECLARE_WRITE8_MEMBER(mtx_sound_latch_w); - DECLARE_WRITE8_MEMBER(mtx_sense_w); - DECLARE_READ8_MEMBER(mtx_key_lo_r); - DECLARE_READ8_MEMBER(mtx_key_hi_r); - DECLARE_WRITE8_MEMBER(hrx_address_w); - DECLARE_READ8_MEMBER(hrx_data_r); - DECLARE_WRITE8_MEMBER(hrx_data_w); - DECLARE_READ8_MEMBER(hrx_attr_r); - DECLARE_WRITE8_MEMBER(hrx_attr_w); - DECLARE_MACHINE_START(mtx512); - DECLARE_MACHINE_RESET(mtx512); - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - TIMER_DEVICE_CALLBACK_MEMBER(cassette_tick); - DECLARE_WRITE_LINE_MEMBER(ctc_trg1_w); - DECLARE_WRITE_LINE_MEMBER(ctc_trg2_w); - DECLARE_WRITE_LINE_MEMBER(mtx_tms9929a_interrupt); - DECLARE_READ8_MEMBER(mtx_strobe_r); - DECLARE_READ8_MEMBER(mtx_sound_strobe_r); - DECLARE_WRITE8_MEMBER(mtx_cst_w); - DECLARE_READ8_MEMBER(mtx_prt_r); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - void bankswitch(UINT8 data); - DECLARE_SNAPSHOT_LOAD_MEMBER( mtx ); -}; - -#endif /* __MTX_H__ */ diff --git a/src/mess/includes/mz700.h b/src/mess/includes/mz700.h deleted file mode 100644 index 6558180dbbd..00000000000 --- a/src/mess/includes/mz700.h +++ /dev/null @@ -1,119 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Dirk Best -/****************************************************************************** - * Sharp MZ700 - * - * Reference: http://sharpmz.computingmuseum.com - * - ******************************************************************************/ - -#ifndef MZ700_H_ -#define MZ700_H_ - -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/z80pio.h" -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "bus/centronics/ctronics.h" -#include "machine/ram.h" - -class mz_state : public driver_device -{ -public: - mz_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_pit(*this, "pit8253"), - m_ppi(*this, "ppi8255"), - m_cassette(*this, "cassette"), - m_centronics(*this, "centronics"), - m_ram(*this, RAM_TAG), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - int m_mz700; /* 1 if running on an mz700 */ - - int m_cursor_timer; - int m_other_timer; - - int m_intmsk; /* PPI8255 pin PC2 */ - - int m_mz700_ram_lock; /* 1 if ram lock is active */ - int m_mz700_ram_vram; /* 1 if vram is banked in */ - - /* mz800 specific */ - UINT8 *m_cgram; - - int m_mz700_mode; /* 1 if in mz700 mode */ - int m_mz800_ram_lock; /* 1 if lock is active */ - int m_mz800_ram_monitor; /* 1 if monitor rom banked in */ - - int m_hires_mode; /* 1 if in 640x200 mode */ - int m_screennum; /* screen designation */ - - int m_centronics_busy; - int m_centronics_perror; - - UINT8 *m_colorram; - UINT8 *m_videoram; - UINT8 m_speaker_level; - UINT8 m_prev_state; - UINT16 m_mz800_ramaddr; - UINT8 m_mz800_palette[4]; - UINT8 m_mz800_palette_bank; - DECLARE_READ8_MEMBER(mz700_e008_r); - DECLARE_WRITE8_MEMBER(mz700_e008_w); - DECLARE_READ8_MEMBER(mz800_bank_0_r); - DECLARE_WRITE8_MEMBER(mz700_bank_0_w); - DECLARE_WRITE8_MEMBER(mz800_bank_0_w); - DECLARE_READ8_MEMBER(mz800_bank_1_r); - DECLARE_WRITE8_MEMBER(mz700_bank_1_w); - DECLARE_WRITE8_MEMBER(mz700_bank_2_w); - DECLARE_WRITE8_MEMBER(mz700_bank_3_w); - DECLARE_WRITE8_MEMBER(mz700_bank_4_w); - DECLARE_WRITE8_MEMBER(mz700_bank_5_w); - DECLARE_WRITE8_MEMBER(mz700_bank_6_w); - DECLARE_READ8_MEMBER(mz800_crtc_r); - DECLARE_WRITE8_MEMBER(mz800_write_format_w); - DECLARE_WRITE8_MEMBER(mz800_read_format_w); - DECLARE_WRITE8_MEMBER(mz800_display_mode_w); - DECLARE_WRITE8_MEMBER(mz800_scroll_border_w); - DECLARE_READ8_MEMBER(mz800_ramdisk_r); - DECLARE_WRITE8_MEMBER(mz800_ramdisk_w); - DECLARE_WRITE8_MEMBER(mz800_ramaddr_w); - DECLARE_WRITE8_MEMBER(mz800_palette_w); - DECLARE_WRITE8_MEMBER(mz800_cgram_w); - DECLARE_DRIVER_INIT(mz800); - DECLARE_DRIVER_INIT(mz700); - virtual void machine_start(); - DECLARE_PALETTE_INIT(mz); - DECLARE_VIDEO_START(mz800); - UINT32 screen_update_mz700(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_mz800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(ne556_cursor_callback); - TIMER_DEVICE_CALLBACK_MEMBER(ne556_other_callback); - DECLARE_WRITE_LINE_MEMBER(pit_out0_changed); - DECLARE_WRITE_LINE_MEMBER(pit_irq_2); - DECLARE_READ8_MEMBER(pio_port_b_r); - DECLARE_READ8_MEMBER(pio_port_c_r); - DECLARE_WRITE8_MEMBER(pio_port_a_w); - DECLARE_WRITE8_MEMBER(pio_port_c_w); - DECLARE_WRITE_LINE_MEMBER(mz800_z80pio_irq); - DECLARE_READ8_MEMBER(mz800_z80pio_port_a_r); - DECLARE_WRITE8_MEMBER(mz800_z80pio_port_a_w); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - required_device m_maincpu; - required_device m_speaker; - required_device m_pit; - required_device m_ppi; - required_device m_cassette; - optional_device m_centronics; - required_device m_ram; - required_device m_gfxdecode; - required_device m_palette; -}; - -#endif /* MZ700_H_ */ diff --git a/src/mess/includes/mz80.h b/src/mess/includes/mz80.h deleted file mode 100644 index ac973027482..00000000000 --- a/src/mess/includes/mz80.h +++ /dev/null @@ -1,70 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/mz80.h - * - ****************************************************************************/ - -#ifndef MZ80_H_ -#define MZ80_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "imagedev/cassette.h" -#include "sound/speaker.h" -#include "sound/wave.h" - -class mz80_state : public driver_device -{ -public: - mz80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pit(*this, "pit8253"), - m_ppi(*this, "ppi8255"), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_p_ram(*this, "p_ram"), - m_p_videoram(*this, "p_videoram"){ } - - required_device m_maincpu; - required_device m_pit; - required_device m_ppi; - required_device m_cassette; - required_device m_speaker; - DECLARE_READ8_MEMBER(mz80k_strobe_r); - DECLARE_WRITE8_MEMBER(mz80k_strobe_w); - DECLARE_READ8_MEMBER(mz80k_8255_portb_r); - DECLARE_READ8_MEMBER(mz80k_8255_portc_r); - DECLARE_WRITE8_MEMBER(mz80k_8255_porta_w); - DECLARE_WRITE8_MEMBER(mz80k_8255_portc_w); - DECLARE_WRITE_LINE_MEMBER(pit_out0_changed); - DECLARE_WRITE_LINE_MEMBER(pit_out2_changed); - bool m_mz80k_vertical; - bool m_mz80k_tempo_strobe; - UINT8 m_speaker_level; - bool m_prev_state; - UINT8 m_mz80k_cursor_cnt; - UINT8 m_mz80k_keyboard_line; - required_shared_ptr m_p_ram; - const UINT8 *m_p_chargen; - required_shared_ptr m_p_videoram; - DECLARE_DRIVER_INIT(mz80k); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_mz80k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_mz80kj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_mz80a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(ne555_tempo_callback); -}; - - -/*----------- defined in video/mz80.c -----------*/ - -extern const gfx_layout mz80k_charlayout; -extern const gfx_layout mz80kj_charlayout; - -#endif /* MZ80_H_ */ diff --git a/src/mess/includes/nc.h b/src/mess/includes/nc.h deleted file mode 100644 index e640ee3927d..00000000000 --- a/src/mess/includes/nc.h +++ /dev/null @@ -1,155 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Wilbert Pol, Kevin Thacker -/***************************************************************************** - * - * includes/nc.h - * - ****************************************************************************/ - -#ifndef NC_H_ -#define NC_H_ - -#include "bus/centronics/ctronics.h" -#include "machine/i8251.h" -#include "machine/clock.h" -#include "machine/ram.h" -#include "machine/nvram.h" -#include "sound/beep.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define NC_NUM_COLOURS 4 - -#define NC_SCREEN_WIDTH 480 -#define NC_SCREEN_HEIGHT 64 - -#define NC200_SCREEN_WIDTH 480 -#define NC200_SCREEN_HEIGHT 128 - -#define NC200_NUM_COLOURS 4 - -enum -{ - NC_TYPE_1xx, /* nc100/nc150 */ - NC_TYPE_200 /* nc200 */ -}; - - -class nc_state : public driver_device -{ -public: - nc_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_beeper1(*this, "beep.1"), - m_beeper2(*this, "beep.2"), - m_centronics(*this, "centronics"), - m_card(*this, "cardslot"), - m_uart(*this, "uart"), - m_uart_clock(*this, "uart_clock"), - m_nvram(*this, "nvram") - { - } - - DECLARE_READ8_MEMBER(nc_memory_management_r); - DECLARE_WRITE8_MEMBER(nc_memory_management_w); - DECLARE_WRITE8_MEMBER(nc_irq_mask_w); - DECLARE_WRITE8_MEMBER(nc_irq_status_w); - DECLARE_READ8_MEMBER(nc_irq_status_r); - DECLARE_READ8_MEMBER(nc_key_data_in_r); - DECLARE_WRITE8_MEMBER(nc_sound_w); - DECLARE_WRITE8_MEMBER(nc_uart_control_w); - DECLARE_WRITE8_MEMBER(nc100_display_memory_start_w); - DECLARE_WRITE8_MEMBER(nc100_uart_control_w); - DECLARE_WRITE8_MEMBER(nc100_poweroff_control_w); - DECLARE_READ8_MEMBER(nc100_card_battery_status_r); - DECLARE_WRITE8_MEMBER(nc100_memory_card_wait_state_w); - DECLARE_WRITE8_MEMBER(nc200_display_memory_start_w); - DECLARE_READ8_MEMBER(nc200_card_battery_status_r); - DECLARE_READ8_MEMBER(nc200_printer_status_r); - DECLARE_WRITE8_MEMBER(nc200_uart_control_w); - DECLARE_WRITE8_MEMBER(nc200_memory_card_wait_state_w); - DECLARE_WRITE8_MEMBER(nc200_poweroff_control_w); - - DECLARE_PALETTE_INIT(nc); - DECLARE_MACHINE_START(nc200); - DECLARE_MACHINE_RESET(nc200); - UINT32 screen_update_nc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(nc_keyboard_timer_callback); - TIMER_CALLBACK_MEMBER(nc_serial_timer_callback); - TIMER_DEVICE_CALLBACK_MEMBER(dummy_timer_callback); - DECLARE_WRITE_LINE_MEMBER(nc100_tc8521_alarm_callback); - DECLARE_WRITE_LINE_MEMBER(nc100_txrdy_callback); - DECLARE_WRITE_LINE_MEMBER(nc100_rxrdy_callback); - DECLARE_WRITE_LINE_MEMBER(write_uart_clock); - DECLARE_WRITE_LINE_MEMBER(write_nc100_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_nc200_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(nc200_txrdy_callback); - DECLARE_WRITE_LINE_MEMBER(nc200_rxrdy_callback); - DECLARE_WRITE_LINE_MEMBER(nc200_fdc_interrupt); - - DECLARE_DRIVER_INIT( nc ); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nc_pcmcia_card ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nc_pcmcia_card ); - -protected: - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - -private: - void nc200_video_set_backlight(int state); - int card_calculate_mask(int size); - void set_card_present_state(int state); - void nc_update_interrupts(); - void nc_refresh_memory_bank_config(int bank); - void nc_refresh_memory_config(); - void nc_common_init_machine(); - void nc_sound_update(int channel); - void nc150_init_machine(); - void nc200_refresh_uart_interrupt(); - void nc200_floppy_drive_index_callback(int drive_id); - -public: // HACK FOR MC6845 - required_device m_maincpu; - required_device m_ram; - required_device m_beeper1; - required_device m_beeper2; - required_device m_centronics; - required_device m_card; - required_device m_uart; - required_device m_uart_clock; - required_device m_nvram; - - char m_memory_config[4]; - emu_timer *m_keyboard_timer; - int m_membank_rom_mask; - int m_membank_internal_ram_mask; - UINT8 m_poweroff_control; - int m_card_status; - unsigned char m_uart_control; - int m_irq_mask; - int m_irq_status; - int m_irq_latch; - int m_irq_latch_mask; - int m_sound_channel_periods[2]; - int m_previous_inputport_10_state; - int m_previous_alarm_state; - UINT8 m_nc200_uart_interrupt_irq; - memory_region *m_card_ram; - int m_membank_card_ram_mask; - int m_card_size; - unsigned long m_display_memory_start; - UINT8 m_type; - int m_nc200_backlight; - - int m_centronics_ack; - int m_centronics_busy; -}; - - - -#endif /* NC_H_ */ diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h deleted file mode 100644 index 49d8b51df12..00000000000 --- a/src/mess/includes/nes.h +++ /dev/null @@ -1,120 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Brad Oliver,Fabio Priuli -/***************************************************************************** - - nes.h - - Nintendo Entertainment System / Famicom - - ****************************************************************************/ - -#ifndef NES_H_ -#define NES_H_ - - -#include "video/ppu2c0x.h" -#include "bus/nes/nes_slot.h" -#include "bus/nes/nes_carts.h" -#include "bus/nes_ctrl/ctrl.h" -#include "sound/nes_apu.h" - -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define NTSC_CLOCK N2A03_DEFAULTCLOCK /* 1.789772 MHz */ -#define PAL_CLOCK (26601712.0/16) /* 1.662607 MHz */ - -#define NES_BATTERY_SIZE 0x2000 - - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -/*PPU fast banking constants and structures */ - -#define CHRROM 0 -#define CHRRAM 1 - - -/*PPU nametable fast banking constants and structures */ - -#define CIRAM 0 -#define ROM 1 -#define EXRAM 2 -#define MMC5FILL 3 -#define CART_NTRAM 4 - -#define NES_BATTERY 0 -#define NES_WRAM 1 - - -class nes_state : public driver_device -{ -public: - nes_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ppu(*this, "ppu"), - m_sound(*this, "nessound"), - m_ctrl1(*this, "ctrl1"), - m_ctrl2(*this, "ctrl2"), - m_exp(*this, "exp"), - m_cartslot(*this, "nes_slot"), - m_disk(*this, "disk") - { } - - /* video-related */ - int m_last_frame_flip; - - /* misc */ - ioport_port *m_io_disksel; - - UINT8 *m_vram; - UINT8 *m_ciram; //PPU nametable RAM - external to PPU! - - required_device m_maincpu; - required_device m_ppu; - required_device m_sound; - required_device m_ctrl1; - required_device m_ctrl2; - optional_device m_exp; - optional_device m_cartslot; - optional_device m_disk; - - int nes_ppu_vidaccess(int address, int data); - void ppu_nmi(int *ppu_regs); - - DECLARE_READ8_MEMBER(nes_in0_r); - DECLARE_READ8_MEMBER(nes_in1_r); - DECLARE_WRITE8_MEMBER(nes_in0_w); - DECLARE_READ8_MEMBER(fc_in0_r); - DECLARE_READ8_MEMBER(fc_in1_r); - DECLARE_WRITE8_MEMBER(fc_in0_w); - DECLARE_WRITE8_MEMBER(nes_vh_sprite_dma_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - virtual void video_reset(); - DECLARE_PALETTE_INIT(nes); - UINT32 screen_update_nes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(psg_4015_r); - DECLARE_WRITE8_MEMBER(psg_4015_w); - DECLARE_WRITE8_MEMBER(psg_4017_w); - NESCTRL_BRIGHTPIXEL_CB(bright_pixel); - - DECLARE_DRIVER_INIT(famicom); - - // these are needed until we modernize the FDS controller - DECLARE_MACHINE_START(fds); - DECLARE_MACHINE_START(famitwin); - DECLARE_MACHINE_RESET(fds); - DECLARE_MACHINE_RESET(famitwin); - void setup_disk(nes_disksys_device *slot); - -private: - memory_bank *m_prg_bank_mem[5]; -}; - -#endif /* NES_H_ */ diff --git a/src/mess/includes/newbrain.h b/src/mess/includes/newbrain.h deleted file mode 100644 index 6819aef9729..00000000000 --- a/src/mess/includes/newbrain.h +++ /dev/null @@ -1,274 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __NEWBRAIN__ -#define __NEWBRAIN__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "cpu/cop400/cop400.h" -#include "imagedev/cassette.h" -#include "machine/6850acia.h" -#include "machine/adc0808.h" -#include "machine/z80ctc.h" -#include "machine/rescap.h" -#include "machine/ram.h" -#include "machine/upd765.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "409" -#define COP420_TAG "419" -#define MC6850_TAG "459" -#define ADC0809_TAG "427" -#define DAC0808_TAG "461" -#define Z80CTC_TAG "458" -#define FDC_Z80_TAG "416" -#define UPD765_TAG "418" - -#define NEWBRAIN_EIM_RAM_SIZE 0x10000 - -#define NEWBRAIN_ENRG1_CLK 0x01 -#define NEWBRAIN_ENRG1_TVP 0x04 -#define NEWBRAIN_ENRG1_CTS 0x10 -#define NEWBRAIN_ENRG1_DO 0x20 -#define NEWBRAIN_ENRG1_PO 0x80 -#define NEWBRAIN_ENRG1_UST_BIT_1_MASK 0x30 -#define NEWBRAIN_ENRG1_UST_BIT_0_MASK 0xc0 - -#define NEWBRAIN_ENRG2_USERP 0x01 -#define NEWBRAIN_ENRG2_ANP 0x02 -#define NEWBRAIN_ENRG2_MLTMD 0x04 -#define NEWBRAIN_ENRG2_MSPD 0x08 -#define NEWBRAIN_ENRG2_ENOR 0x10 -#define NEWBRAIN_ENRG2_ANSW 0x20 -#define NEWBRAIN_ENRG2_ENOT 0x40 -#define NEWBRAIN_ENRG2_CENTRONICS_OUT 0x80 - -#define NEWBRAIN_VIDEO_RV 0x01 -#define NEWBRAIN_VIDEO_FS 0x02 -#define NEWBRAIN_VIDEO_32_40 0x04 -#define NEWBRAIN_VIDEO_UCR 0x08 -#define NEWBRAIN_VIDEO_80L 0x40 - -class newbrain_state : public driver_device -{ -public: - newbrain_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_copcpu(*this, COP420_TAG), - m_palette(*this, "palette"), - m_cassette1(*this, "cassette"), - m_cassette2(*this, "cassette2"), - m_rom(*this, Z80_TAG), - m_eim_rom(*this, "eim"), - m_char_rom(*this, "chargen"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_y10(*this, "Y10"), - m_y11(*this, "Y11"), - m_y12(*this, "Y12"), - m_y13(*this, "Y13"), - m_y14(*this, "Y14"), - m_y15(*this, "Y15") - { - } - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_WRITE8_MEMBER( enrg1_w ); - DECLARE_WRITE8_MEMBER( a_enrg1_w ); - DECLARE_READ8_MEMBER( ust_r ); - DECLARE_READ8_MEMBER( a_ust_r ); - DECLARE_READ8_MEMBER( user_r ); - DECLARE_WRITE8_MEMBER( user_w ); - DECLARE_READ8_MEMBER( clclk_r ); - DECLARE_WRITE8_MEMBER( clclk_w ); - DECLARE_READ8_MEMBER( clusr_r ); - DECLARE_WRITE8_MEMBER( clusr_w ); - DECLARE_READ8_MEMBER( cop_l_r ); - DECLARE_WRITE8_MEMBER( cop_l_w ); - DECLARE_WRITE8_MEMBER( cop_g_w ); - DECLARE_READ8_MEMBER( cop_g_r ); - DECLARE_WRITE8_MEMBER( cop_d_w ); - DECLARE_READ8_MEMBER( cop_in_r ); - DECLARE_WRITE_LINE_MEMBER( cop_sk_w ); - DECLARE_READ_LINE_MEMBER( cop_si_r ); - DECLARE_WRITE_LINE_MEMBER( cop_so_w ); - DECLARE_READ8_MEMBER( tvl_r ); - DECLARE_WRITE8_MEMBER( tvl_w ); - DECLARE_WRITE8_MEMBER( tvctl_w ); - DECLARE_READ8_MEMBER( cop_r ); - DECLARE_WRITE8_MEMBER( cop_w ); - - INTERRUPT_GEN_MEMBER(newbrain_interrupt); - TIMER_DEVICE_CALLBACK_MEMBER(cop_regint_tick); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - - enum - { - TIMER_ID_RESET, - TIMER_ID_PWRUP - }; - - void check_interrupt(); - void bankswitch(); - void tvram_w(UINT8 data, int a6); - inline int get_reset_t(); - inline int get_pwrup_t(); - void screen_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); - - required_device m_maincpu; - required_device m_copcpu; - required_device m_palette; - required_device m_cassette1; - required_device m_cassette2; - required_memory_region m_rom; - optional_memory_region m_eim_rom; - required_memory_region m_char_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - required_ioport m_y10; - required_ioport m_y11; - required_ioport m_y12; - required_ioport m_y13; - required_ioport m_y14; - required_ioport m_y15; - - // processor state - int m_pwrup; // power up - int m_userint; // user interrupt - int m_userint0; // parallel port interrupt - int m_clkint; // clock interrupt - int m_aciaint; // ACIA interrupt - int m_copint; // COP interrupt - int m_anint; // A/DC interrupt - int m_bee; // identity - UINT8 m_enrg1; // enable register 1 - UINT8 m_enrg2; // enable register 2 - int m_acia_txd; // ACIA transmit - - // COP420 state - UINT8 m_cop_bus; // data bus - int m_cop_so; // serial out - int m_cop_tdo; // tape data output - int m_cop_tdi; // tape data input - int m_cop_rd; // memory read - int m_cop_wr; // memory write - int m_cop_access; // COP access - - // keyboard state - ioport_port* m_key_row[16]; - int m_keylatch; // keyboard row - int m_keydata; // keyboard column - - // video state - int m_segment_data[16]; // VF segment data - int m_tvcnsl; // TV console required - int m_tvctl; // TV control register - UINT16 m_tvram; // TV start address - - // user bus state - UINT8 m_user; - - // devices - UINT8 m_copdata; - int m_copstate; - int m_copbytes; - int m_copregint; -}; - -class newbrain_eim_state : public newbrain_state -{ -public: - newbrain_eim_state(const machine_config &mconfig, device_type type, const char *tag) - : newbrain_state(mconfig, type, tag), - m_fdccpu(*this, FDC_Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_acia(*this, MC6850_TAG), - m_fdc(*this, UPD765_TAG), - m_floppy(*this, UPD765_TAG ":0:525dd"), - m_eim_ram(*this, "eim_ram") - { } - - required_device m_fdccpu; - required_device m_ctc; - required_device m_acia; - required_device m_fdc; - required_device m_floppy; - optional_shared_ptr m_eim_ram; - - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( fdc_auxiliary_w ); - DECLARE_READ8_MEMBER( fdc_control_r ); - DECLARE_READ8_MEMBER( ust2_r ); - DECLARE_WRITE8_MEMBER( enrg2_w ); - DECLARE_WRITE8_MEMBER( pr_w ); - DECLARE_READ8_MEMBER( user_r ); - DECLARE_WRITE8_MEMBER( user_w ); - DECLARE_READ8_MEMBER( anout_r ); - DECLARE_WRITE8_MEMBER( anout_w ); - DECLARE_READ8_MEMBER( anin_r ); - DECLARE_WRITE8_MEMBER( anio_w ); - DECLARE_READ8_MEMBER( st0_r ); - DECLARE_READ8_MEMBER( st1_r ); - DECLARE_READ8_MEMBER( st2_r ); - DECLARE_READ8_MEMBER( usbs_r ); - DECLARE_WRITE8_MEMBER( usbs_w ); - DECLARE_WRITE8_MEMBER( paging_w ); - DECLARE_WRITE_LINE_MEMBER( acia_tx ); - DECLARE_WRITE_LINE_MEMBER( acia_interrupt ); - DECLARE_WRITE_LINE_MEMBER( fdc_interrupt ); - DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); - DECLARE_WRITE_LINE_MEMBER( adc_eoc_w ); - - ADC0808_ANALOG_READ_CB(adc_vref_pos_r); - ADC0808_ANALOG_READ_CB(adc_vref_neg_r); - ADC0808_ANALOG_READ_CB(adc_input_r); - - TIMER_DEVICE_CALLBACK_MEMBER(ctc_c2_tick); - - void bankswitch(); - - // paging state - int m_paging; // paging enabled - int m_mpm; // multi paging mode ? - int m_a16; // address line 16 - UINT8 m_pr[16]; // expansion interface paging register - - // floppy state - int m_fdc_int; // interrupt - int m_fdc_att; // attention -}; - -// ---------- defined in video/newbrain.c ---------- - -MACHINE_CONFIG_EXTERN( newbrain_video ); - -#endif diff --git a/src/mess/includes/next.h b/src/mess/includes/next.h deleted file mode 100644 index 25bc09cdaa5..00000000000 --- a/src/mess/includes/next.h +++ /dev/null @@ -1,190 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Olivier Galibert -#pragma once - -#ifndef __NEXT__ -#define __NEXT__ - -#include "emu.h" -#include "cpu/m68000/m68000.h" -#include "machine/nscsi_bus.h" -#include "machine/mccs1850.h" -#include "machine/8530scc.h" -#include "machine/nextkbd.h" -#include "machine/upd765.h" -#include "machine/ncr5390.h" -#include "machine/mb8795.h" -#include "machine/nextmo.h" -#include "imagedev/chd_cd.h" -#include "imagedev/harddriv.h" - -class next_state : public driver_device -{ -public: - next_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - maincpu(*this, "maincpu"), - rtc(*this, "rtc"), - scc(*this, "scc"), - keyboard(*this, "keyboard"), - scsibus(*this, "scsibus"), - scsi(*this, "scsibus:7:ncr5390"), - net(*this, "net"), - mo(*this, "mo"), - fdc(*this, "fdc"), - vram(*this, "vram"), - m_maincpu(*this, "maincpu") { } - - required_device maincpu; - required_device rtc; - required_device scc; - required_device keyboard; - required_device scsibus; - required_device scsi; - required_device net; - required_device mo; - optional_device fdc; // 040 only - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void setup(UINT32 scr1, int size_x, int size_y, int skip, bool color); - - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); - DECLARE_READ32_MEMBER( rom_map_r ); - DECLARE_READ32_MEMBER( scr2_r ); - DECLARE_WRITE32_MEMBER( scr2_w ); - DECLARE_READ32_MEMBER( scr1_r ); - DECLARE_READ32_MEMBER( irq_status_r ); - DECLARE_READ32_MEMBER( irq_mask_r ); - DECLARE_WRITE32_MEMBER( irq_mask_w ); - DECLARE_READ32_MEMBER( modisk_r ); - DECLARE_READ32_MEMBER( network_r ); - DECLARE_READ32_MEMBER( event_counter_r ); - DECLARE_READ32_MEMBER( dsp_r ); - DECLARE_READ32_MEMBER( fdc_control_r ); - DECLARE_WRITE32_MEMBER( fdc_control_w ); - DECLARE_READ32_MEMBER( dma_ctrl_r ); - DECLARE_WRITE32_MEMBER( dma_ctrl_w ); - DECLARE_WRITE32_MEMBER( dma_040_ctrl_w ); - DECLARE_READ32_MEMBER( dma_regs_r ); - DECLARE_WRITE32_MEMBER( dma_regs_w ); - DECLARE_READ32_MEMBER( scsictrl_r ); - DECLARE_WRITE32_MEMBER( scsictrl_w ); - DECLARE_READ32_MEMBER( phy_r ); - DECLARE_WRITE32_MEMBER( phy_w ); - DECLARE_READ32_MEMBER( timer_data_r ); - DECLARE_WRITE32_MEMBER( timer_data_w ); - DECLARE_READ32_MEMBER( timer_ctrl_r ); - DECLARE_WRITE32_MEMBER( timer_ctrl_w ); - DECLARE_WRITE8_MEMBER( ramdac_w ); - - UINT32 scr1; - UINT32 scr2; - UINT32 irq_status; - UINT32 irq_mask; - int irq_level; - required_shared_ptr vram; - UINT8 scsictrl, scsistat; - - UINT32 phy[2]; - - attotime timer_tbase; - UINT16 timer_vbase; - UINT32 timer_data, timer_next_data; - UINT32 timer_ctrl; - emu_timer *timer_tm; - - UINT32 eventc_latch; - - DECLARE_WRITE_LINE_MEMBER(scc_irq); - DECLARE_WRITE_LINE_MEMBER(keyboard_irq); - DECLARE_WRITE_LINE_MEMBER(power_irq); - DECLARE_WRITE_LINE_MEMBER(nmi_irq); - - DECLARE_WRITE_LINE_MEMBER(scsi_irq); - DECLARE_WRITE_LINE_MEMBER(scsi_drq); - - DECLARE_WRITE_LINE_MEMBER(fdc_irq); - DECLARE_WRITE_LINE_MEMBER(fdc_drq); - - DECLARE_WRITE_LINE_MEMBER(net_tx_irq); - DECLARE_WRITE_LINE_MEMBER(net_rx_irq); - DECLARE_WRITE_LINE_MEMBER(net_tx_drq); - DECLARE_WRITE_LINE_MEMBER(net_rx_drq); - - DECLARE_WRITE_LINE_MEMBER(mo_irq); - DECLARE_WRITE_LINE_MEMBER(mo_drq); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - void vblank_w(screen_device &screen, bool vblank_state); - -protected: - struct dma_slot { - UINT32 start, limit, chain_start, chain_limit, current; - UINT8 state; - bool supdate, restart, drq; - }; - - enum { - // write bits - DMA_SETENABLE = 0x01, - DMA_SETSUPDATE = 0x02, - DMA_SETREAD = 0x04, - DMA_CLRCOMPLETE = 0x08, - DMA_RESET = 0x10, - DMA_INITBUF = 0x20, - DMA_INITBUFTURBO = 0x40, - - // read bits - DMA_ENABLE = 0x01, - DMA_SUPDATE = 0x02, - DMA_READ = 0x04, - DMA_COMPLETE = 0x08, - DMA_BUSEXC = 0x10 - }; - - static const char *dma_targets[0x20]; - static const int dma_irqs[0x20]; - static const bool dma_has_saved[0x20]; - static const int scsi_clocks[4]; - - dma_slot dma_slots[0x20]; - UINT32 esp; - - int screen_sx, screen_sy, screen_skip; - bool screen_color; - bool vbl_enabled; - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - void timer_start(); - void timer_update(); - - void irq_set(int id, bool raise); - void irq_check(); - const char *dma_name(int slot); - void dma_do_ctrl_w(int slot, UINT8 data); - void dma_drq_w(int slot, bool state); - void dma_read(int slot, UINT8 &val, bool &eof, bool &err); - void dma_write(int slot, UINT8 val, bool eof, bool &err); - void dma_check_update(int slot); - void dma_check_end(int slot, bool eof); - void dma_done(int slot); - void dma_end(int slot); - -public: - DECLARE_DRIVER_INIT(nexts2); - DECLARE_DRIVER_INIT(next); - DECLARE_DRIVER_INIT(nextsc); - DECLARE_DRIVER_INIT(nextst); - DECLARE_DRIVER_INIT(nextct); - DECLARE_DRIVER_INIT(nextstc); - DECLARE_DRIVER_INIT(nextctc); - DECLARE_DRIVER_INIT(nexts); - required_device m_maincpu; -}; - -#endif diff --git a/src/mess/includes/ob68k1a.h b/src/mess/includes/ob68k1a.h deleted file mode 100644 index 4f0560273fd..00000000000 --- a/src/mess/includes/ob68k1a.h +++ /dev/null @@ -1,62 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __OB68K1A__ -#define __OB68K1A__ - -#include "bus/rs232/rs232.h" -#include "cpu/m68000/m68000.h" -#include "machine/6821pia.h" -#include "machine/6840ptm.h" -#include "machine/6850acia.h" -#include "machine/com8116.h" -#include "machine/ram.h" - -#define MC68000L10_TAG "u50" -#define MC6821_0_TAG "u32" -#define MC6821_1_TAG "u33" -#define MC6840_TAG "u35" -#define MC6850_0_TAG "u34" -#define MC6850_1_TAG "u26" -#define COM8116_TAG "u56" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -class ob68k1a_state : public driver_device -{ -public: - ob68k1a_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MC68000L10_TAG), - m_dbrg(*this, COM8116_TAG), - m_acia0(*this, MC6850_0_TAG), - m_acia1(*this, MC6850_1_TAG), - m_pia0(*this, MC6821_0_TAG), - m_pia1(*this, MC6821_1_TAG), - m_rs232a(*this, RS232_A_TAG), - m_rs232b(*this, RS232_B_TAG), - m_ram(*this, RAM_TAG) - { } - - required_device m_maincpu; - required_device m_dbrg; - required_device m_acia0; - required_device m_acia1; - required_device m_pia0; - required_device m_pia1; - required_device m_rs232a; - required_device m_rs232b; - required_device m_ram; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( com8116_w ); - DECLARE_READ8_MEMBER( pia_r ); - DECLARE_WRITE8_MEMBER( pia_w ); - DECLARE_WRITE_LINE_MEMBER( rx_tx_0_w ); - DECLARE_WRITE_LINE_MEMBER( rx_tx_1_w ); -}; - -#endif diff --git a/src/mess/includes/ondra.h b/src/mess/includes/ondra.h deleted file mode 100644 index f0bae4768fa..00000000000 --- a/src/mess/includes/ondra.h +++ /dev/null @@ -1,76 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/ondra.h - * - ****************************************************************************/ - -#ifndef ONDRA_H_ -#define ONDRA_H_ - -#include "imagedev/cassette.h" -#include "machine/ram.h" - -class ondra_state : public driver_device -{ -public: - ondra_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_line0(*this, "LINE0"), - m_line1(*this, "LINE1"), - m_line2(*this, "LINE2"), - m_line3(*this, "LINE3"), - m_line4(*this, "LINE4"), - m_line5(*this, "LINE5"), - m_line6(*this, "LINE6"), - m_line7(*this, "LINE7"), - m_line8(*this, "LINE8"), - m_line9(*this, "LINE9"), - m_nmi(*this, "NMI") { } - - UINT8 m_video_enable; - UINT8 m_bank1_status; - UINT8 m_bank2_status; - DECLARE_READ8_MEMBER(ondra_keyboard_r); - DECLARE_WRITE8_MEMBER(ondra_port_03_w); - DECLARE_WRITE8_MEMBER(ondra_port_09_w); - DECLARE_WRITE8_MEMBER(ondra_port_0a_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(ondra_interrupt); - TIMER_CALLBACK_MEMBER(nmi_check_callback); - -protected: - required_device m_maincpu; - required_device m_cassette; - required_device m_ram; - required_memory_region m_region_maincpu; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_ioport m_line0; - required_ioport m_line1; - required_ioport m_line2; - required_ioport m_line3; - required_ioport m_line4; - required_ioport m_line5; - required_ioport m_line6; - required_ioport m_line7; - required_ioport m_line8; - required_ioport m_line9; - required_ioport m_nmi; - - void ondra_update_banks(); -}; - -#endif diff --git a/src/mess/includes/orao.h b/src/mess/includes/orao.h deleted file mode 100644 index abd6a619529..00000000000 --- a/src/mess/includes/orao.h +++ /dev/null @@ -1,46 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/orao.h - * - ****************************************************************************/ - -#ifndef ORAO_H_ -#define ORAO_H_ -#include "sound/speaker.h" -#include "imagedev/cassette.h" - -class orao_state : public driver_device -{ -public: - orao_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_memory(*this, "memory"), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_line(*this, "LINE"), - m_beep(0) - { } - - DECLARE_READ8_MEMBER(orao_io_r); - DECLARE_WRITE8_MEMBER(orao_io_w); - DECLARE_DRIVER_INIT(orao); - DECLARE_DRIVER_INIT(orao103); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - -private: - required_shared_ptr m_memory; - required_shared_ptr m_video_ram; - required_device m_maincpu; - required_device m_speaker; - required_device m_cassette; - required_ioport_array<20> m_line; - UINT8 m_beep; -}; - -#endif /* ORAO_H_ */ diff --git a/src/mess/includes/orion.h b/src/mess/includes/orion.h deleted file mode 100644 index 5d6a57058be..00000000000 --- a/src/mess/includes/orion.h +++ /dev/null @@ -1,125 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/orion.h - * - ****************************************************************************/ - -#ifndef ORION_H_ -#define ORION_H_ - -#include "machine/wd_fdc.h" -#include "includes/radio86.h" -#include "cpu/z80/z80.h" -#include "cpu/i8085/i8085.h" -#include "machine/i8255.h" -#include "machine/ram.h" -#include "machine/mc146818.h" -#include "sound/speaker.h" -#include "sound/ay8910.h" -#include "sound/wave.h" - - -class orion_state : public radio86_state -{ -public: - orion_state(const machine_config &mconfig, device_type type, const char *tag) - : radio86_state(mconfig, type, tag) - , m_fdc(*this, "fd1793") - , m_ram(*this, RAM_TAG) - , m_fd0(*this, "fd0") - , m_fd1(*this, "fd1") - , m_fd2(*this, "fd2") - , m_fd3(*this, "fd3") - , m_rtc(*this, "rtc") - , m_speaker(*this, "speaker") - , m_ay8912(*this, "ay8912") - , m_bank2(*this, "bank2") - , m_bank3(*this, "bank3") - , m_bank4(*this, "bank4") - , m_bank5(*this, "bank5") - , m_bank6(*this, "bank6") - , m_bank7(*this, "bank7") - , m_bank8(*this, "bank8") - { } - - UINT8 m_orion128_video_mode; - UINT8 m_orion128_video_page; - UINT8 m_orion128_video_width; - UINT8 m_video_mode_mask; - UINT8 m_orionpro_pseudo_color; - UINT8 m_romdisk_lsb; - UINT8 m_romdisk_msb; - UINT8 m_orion128_memory_page; - UINT8 m_orionz80_memory_page; - UINT8 m_orionz80_dispatcher; - UINT8 m_speaker_data; - UINT8 m_orionpro_ram0_segment; - UINT8 m_orionpro_ram1_segment; - UINT8 m_orionpro_ram2_segment; - UINT8 m_orionpro_page; - UINT8 m_orionpro_128_page; - UINT8 m_orionpro_rom2_segment; - UINT8 m_orionpro_dispatcher; - - required_device m_fdc; - - DECLARE_READ8_MEMBER(orion128_system_r); - DECLARE_WRITE8_MEMBER(orion128_system_w); - DECLARE_READ8_MEMBER(orion128_romdisk_r); - DECLARE_WRITE8_MEMBER(orion128_romdisk_w); - DECLARE_WRITE8_MEMBER(orion128_video_mode_w); - DECLARE_WRITE8_MEMBER(orion128_video_page_w); - DECLARE_WRITE8_MEMBER(orion128_memory_page_w); - DECLARE_WRITE8_MEMBER(orion_disk_control_w); - DECLARE_READ8_MEMBER(orion128_floppy_r); - DECLARE_WRITE8_MEMBER(orion128_floppy_w); - DECLARE_READ8_MEMBER(orionz80_floppy_rtc_r); - DECLARE_WRITE8_MEMBER(orionz80_floppy_rtc_w); - DECLARE_WRITE8_MEMBER(orionz80_sound_w); - DECLARE_WRITE8_MEMBER(orionz80_sound_fe_w); - DECLARE_WRITE8_MEMBER(orionz80_memory_page_w); - DECLARE_WRITE8_MEMBER(orionz80_dispatcher_w); - DECLARE_READ8_MEMBER(orionz80_io_r); - DECLARE_WRITE8_MEMBER(orionz80_io_w); - DECLARE_WRITE8_MEMBER(orionpro_memory_page_w); - DECLARE_READ8_MEMBER(orionpro_io_r); - DECLARE_WRITE8_MEMBER(orionpro_io_w); - DECLARE_MACHINE_START(orion128); - DECLARE_MACHINE_RESET(orion128); - DECLARE_VIDEO_START(orion128); - DECLARE_PALETTE_INIT(orion128); - DECLARE_MACHINE_START(orionz80); - DECLARE_MACHINE_RESET(orionz80); - DECLARE_MACHINE_RESET(orionpro); - UINT32 screen_update_orion128(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(orionz80_interrupt); - DECLARE_READ8_MEMBER(orion_romdisk_porta_r); - DECLARE_WRITE8_MEMBER(orion_romdisk_portb_w); - DECLARE_WRITE8_MEMBER(orion_romdisk_portc_w); - DECLARE_FLOPPY_FORMATS( orion_floppy_formats ); - -protected: - required_device m_ram; - required_device m_fd0; - required_device m_fd1; - required_device m_fd2; - required_device m_fd3; - optional_device m_rtc; - optional_device m_speaker; - optional_device m_ay8912; - required_memory_bank m_bank2; - optional_memory_bank m_bank3; - optional_memory_bank m_bank4; - optional_memory_bank m_bank5; - optional_memory_bank m_bank6; - optional_memory_bank m_bank7; - optional_memory_bank m_bank8; - - void orionz80_switch_bank(); - void orion_set_video_mode(int width); - void orionpro_bank_switch(); -}; - -#endif /* ORION_H_ */ diff --git a/src/mess/includes/osborne1.h b/src/mess/includes/osborne1.h deleted file mode 100644 index 52d39a09461..00000000000 --- a/src/mess/includes/osborne1.h +++ /dev/null @@ -1,147 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/osborne1.h - * - ****************************************************************************/ - -#ifndef OSBORNE1_H_ -#define OSBORNE1_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "sound/beep.h" -#include "machine/6821pia.h" -#include "machine/6850acia.h" -#include "bus/ieee488/ieee488.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" - -class osborne1_state : public driver_device -{ -public: - enum - { - TIMER_VIDEO, - TIMER_SETUP - }; - - osborne1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pia0(*this, "pia_0"), - m_pia1(*this, "pia_1"), - m_fdc(*this, "mb8877"), - m_beep(*this, "beeper"), - m_ram(*this, RAM_TAG), - m_ieee(*this, IEEE488_TAG), - m_floppy0(*this, "mb8877:0:525ssdd"), - m_floppy1(*this, "mb8877:1:525ssdd"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_region_maincpu(*this, "maincpu") { } - - virtual void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - bitmap_ind16 m_bitmap; - - required_device m_maincpu; - required_device m_pia0; - required_device m_pia1; - required_device m_fdc; - required_device m_beep; - required_device m_ram; - required_device m_ieee; - required_device m_floppy0; - required_device m_floppy1; - - DECLARE_WRITE8_MEMBER(osborne1_0000_w); - DECLARE_WRITE8_MEMBER(osborne1_1000_w); - DECLARE_READ8_MEMBER(osborne1_2000_r); - DECLARE_WRITE8_MEMBER(osborne1_2000_w); - DECLARE_WRITE8_MEMBER(osborne1_3000_w); - DECLARE_WRITE8_MEMBER(osborne1_videoram_w); - DECLARE_WRITE8_MEMBER(osborne1_bankswitch_w); - DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func); - DECLARE_READ8_MEMBER(ieee_pia_pb_r); - DECLARE_WRITE8_MEMBER(ieee_pia_pb_w); - DECLARE_WRITE_LINE_MEMBER(video_pia_out_cb2_dummy); - DECLARE_WRITE8_MEMBER(video_pia_port_a_w); - DECLARE_WRITE8_MEMBER(video_pia_port_b_w); - DECLARE_WRITE_LINE_MEMBER(video_pia_irq_a_func); - DECLARE_DIRECT_UPDATE_MEMBER(osborne1_opbase); - - bool m_bank2_enabled; - bool m_bank3_enabled; - UINT8 *m_bank4_ptr; - UINT8 *m_empty_4K; - /* IRQ states */ - bool m_pia_0_irq_state; - bool m_pia_1_irq_state; - /* video related */ - UINT8 m_new_start_x; - UINT8 m_new_start_y; - emu_timer *m_video_timer; - UINT8 *m_p_chargen; - /* bankswitch setting */ - UINT8 m_bankswitch; - bool m_in_irq_handler; - bool m_beep_state; - DECLARE_DRIVER_INIT(osborne1); - virtual void machine_reset(); - TIMER_CALLBACK_MEMBER(osborne1_video_callback); - TIMER_CALLBACK_MEMBER(setup_osborne1); - -protected: - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_region m_region_maincpu; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -// ======================> osborne1_daisy_device - -class osborne1_daisy_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - osborne1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); -}; - -extern const device_type OSBORNE1_DAISY; - -#endif /* OSBORNE1_H_ */ diff --git a/src/mess/includes/osi.h b/src/mess/includes/osi.h deleted file mode 100644 index 735b511fc37..00000000000 --- a/src/mess/includes/osi.h +++ /dev/null @@ -1,167 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder, Robbbert, Wilbert Pol -#pragma once - -#ifndef __OSI__ -#define __OSI__ - - -#include "emu.h" -#include "cpu/m6502/m6502.h" -#include "formats/basicdsk.h" -#include "imagedev/cassette.h" -#include "imagedev/floppy.h" -#include "machine/6850acia.h" -#include "machine/6821pia.h" -#include "machine/ram.h" -#include "sound/discrete.h" -#include "sound/beep.h" - -#define SCREEN_TAG "screen" -#define M6502_TAG "m6502" -#define DISCRETE_TAG "discrete" - -#define X1 3932160 -#define UK101_X1 XTAL_8MHz - -#define OSI600_VIDEORAM_SIZE 0x400 -#define OSI630_COLORRAM_SIZE 0x400 - -class sb2m600_state : public driver_device -{ -public: - sb2m600_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_acia_0(*this, "acia_0"), - m_cassette(*this, "cassette"), - m_discrete(*this, DISCRETE_TAG), - m_ram(*this, RAM_TAG), - m_video_ram(*this, "video_ram"), - m_color_ram(*this, "color_ram"), - m_io_row0(*this, "ROW0"), - m_io_row1(*this, "ROW1"), - m_io_row2(*this, "ROW2"), - m_io_row3(*this, "ROW3"), - m_io_row4(*this, "ROW4"), - m_io_row5(*this, "ROW5"), - m_io_row6(*this, "ROW6"), - m_io_row7(*this, "ROW7"), - m_io_sound(*this, "Sound"), - m_io_reset(*this, "Reset"), - m_beeper(*this, "beeper") - { - } - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_WRITE8_MEMBER( keyboard_w ); - DECLARE_WRITE8_MEMBER( ctrl_w ); - DECLARE_WRITE_LINE_MEMBER( cassette_tx ); - DECLARE_WRITE_LINE_MEMBER( write_cassette_clock ); - - void floppy_index_callback(floppy_image_device *floppy, int state); - - DECLARE_PALETTE_INIT(osi630); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void video_start(); - - enum - { - TIMER_SETUP_BEEP - }; - - required_device m_maincpu; - required_device m_acia_0; - required_device m_cassette; - optional_device m_discrete; - required_device m_ram; - required_shared_ptr m_video_ram; - optional_shared_ptr m_color_ram; - required_ioport m_io_row0; - required_ioport m_io_row1; - required_ioport m_io_row2; - required_ioport m_io_row3; - required_ioport m_io_row4; - required_ioport m_io_row5; - required_ioport m_io_row6; - required_ioport m_io_row7; - required_ioport m_io_sound; - required_ioport m_io_reset; - optional_device m_beeper; - - /* floppy state */ - int m_fdc_index; - - /* keyboard state */ - UINT8 m_keylatch; - - /* video state */ - int m_32; - int m_coloren; - UINT8 *m_p_chargen; -}; - -class c1p_state : public sb2m600_state -{ -public: - c1p_state(const machine_config &mconfig, device_type type, const char *tag) : - sb2m600_state(mconfig, type, tag), - m_beep(*this, "beeper") - { - } - - required_device m_beep; - - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( osi630_ctrl_w ); - DECLARE_WRITE8_MEMBER( osi630_sound_w ); - DECLARE_DRIVER_INIT(c1p); -}; - -class c1pmf_state : public c1p_state -{ -public: - c1pmf_state(const machine_config &mconfig, device_type type, const char *tag) : - c1p_state(mconfig, type, tag), - m_floppy0(*this, "floppy0"), - m_floppy1(*this, "floppy1") - { } - - DECLARE_READ8_MEMBER( osi470_pia_pa_r ); - DECLARE_WRITE8_MEMBER( osi470_pia_pa_w ); - DECLARE_WRITE8_MEMBER( osi470_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( osi470_pia_cb2_w ); - -protected: - virtual void machine_start(); - -private: - required_device m_floppy0; - required_device m_floppy1; -}; - -class uk101_state : public sb2m600_state -{ -public: - uk101_state(const machine_config &mconfig, device_type type, const char *tag) : - sb2m600_state(mconfig, type, tag) - { - } - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_WRITE8_MEMBER( keyboard_w ); -}; - -/* ---------- defined in video/osi.c ---------- */ - -MACHINE_CONFIG_EXTERN( osi600_video ); -MACHINE_CONFIG_EXTERN( uk101_video ); -MACHINE_CONFIG_EXTERN( osi630_video ); - -#endif diff --git a/src/mess/includes/p2000t.h b/src/mess/includes/p2000t.h deleted file mode 100644 index 0548f661356..00000000000 --- a/src/mess/includes/p2000t.h +++ /dev/null @@ -1,57 +0,0 @@ -// license:??? -// copyright-holders:Paul Daniels -/***************************************************************************** - * - * includes/p2000t.h - * - ****************************************************************************/ - -#ifndef P2000T_H_ -#define P2000T_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/speaker.h" -#include "video/saa5050.h" - - -class p2000t_state : public driver_device -{ -public: - p2000t_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_videoram(*this, "videoram"), - m_keyboard(*this, "KEY") { } - - required_device m_maincpu; - required_device m_speaker; - optional_device m_gfxdecode; - optional_device m_palette; - required_shared_ptr m_videoram; - required_ioport_array<10> m_keyboard; - DECLARE_READ8_MEMBER(p2000t_port_000f_r); - DECLARE_READ8_MEMBER(p2000t_port_202f_r); - DECLARE_WRITE8_MEMBER(p2000t_port_101f_w); - DECLARE_WRITE8_MEMBER(p2000t_port_303f_w); - DECLARE_WRITE8_MEMBER(p2000t_port_505f_w); - DECLARE_WRITE8_MEMBER(p2000t_port_707f_w); - DECLARE_WRITE8_MEMBER(p2000t_port_888b_w); - DECLARE_WRITE8_MEMBER(p2000t_port_8c90_w); - DECLARE_WRITE8_MEMBER(p2000t_port_9494_w); - DECLARE_READ8_MEMBER(videoram_r); - UINT8 m_port_101f; - UINT8 m_port_202f; - UINT8 m_port_303f; - UINT8 m_port_707f; - INT8 m_frame_count; - DECLARE_VIDEO_START(p2000m); - DECLARE_PALETTE_INIT(p2000m); - UINT32 screen_update_p2000m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(p2000_interrupt); -}; - -#endif /* P2000T_H_ */ diff --git a/src/mess/includes/partner.h b/src/mess/includes/partner.h deleted file mode 100644 index f5eba1168f8..00000000000 --- a/src/mess/includes/partner.h +++ /dev/null @@ -1,45 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/partner.h - * - ****************************************************************************/ - -#ifndef partner_H_ -#define partner_H_ - -#include "machine/i8255.h" -#include "machine/wd_fdc.h" -#include "machine/ram.h" - -class partner_state : public radio86_state -{ -public: - partner_state(const machine_config &mconfig, device_type type, const char *tag) - : radio86_state(mconfig, type, tag), - m_ram(*this, RAM_TAG), - m_fdc(*this, "wd1793") { } - - UINT8 m_mem_page; - UINT8 m_win_mem_page; - DECLARE_READ8_MEMBER(partner_floppy_r); - DECLARE_WRITE8_MEMBER(partner_floppy_w); - DECLARE_WRITE8_MEMBER(partner_win_memory_page_w); - DECLARE_WRITE8_MEMBER(partner_mem_page_w); - DECLARE_DRIVER_INIT(partner); - DECLARE_MACHINE_START(partner); - DECLARE_MACHINE_RESET(partner); - I8275_DRAW_CHARACTER_MEMBER(display_pixels); - - void partner_window_1(UINT8 bank_num, UINT16 offset,UINT8 *rom); - void partner_window_2(UINT8 bank_num, UINT16 offset,UINT8 *rom); - void partner_iomap_bank(UINT8 *rom); - void partner_bank_switch(); - required_device m_ram; - required_device m_fdc; - DECLARE_FLOPPY_FORMATS( floppy_formats ); -}; - - -#endif /* partner_H_ */ diff --git a/src/mess/includes/pasopia.h b/src/mess/includes/pasopia.h deleted file mode 100644 index 80902e20682..00000000000 --- a/src/mess/includes/pasopia.h +++ /dev/null @@ -1,137 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Angelo Salese -#define PASOPIA_KEYBOARD \ - PORT_START("KEY0") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) \ - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("KANA LOCK") \ - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) \ - PORT_START("KEY1") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) \ - PORT_START("KEY2") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_NAME("Home") \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) \ - PORT_START("KEY3") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Status?") \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BACKSPACE") PORT_CHAR(8) \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) \ - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) \ - PORT_START("KEY4") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_NAME("StatusLine") \ - PORT_DIPNAME( 0x02, 0x00, "4" ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) \ - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") \ - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) \ - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("SPACE") PORT_CHAR(' ') \ - PORT_START("KEY5") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_NAME("F1") \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_NAME("F2") \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_NAME("F3") \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_NAME("F4") \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_NAME("F5") \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_NAME("F6") \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_NAME("F7") \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_NAME("F8") \ - PORT_START("KEY6") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_CHAR('1') PORT_CHAR('1') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_NAME("0") PORT_CHAR('0') PORT_CHAR('0') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_NAME("4") PORT_CHAR('4') PORT_CHAR('O') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_NAME("R") PORT_CHAR('r') PORT_CHAR('O') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_NAME("Y") PORT_CHAR('y') PORT_CHAR('O') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("_") PORT_CHAR('_') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("^") \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Yen") \ - PORT_START("KEY7") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_CHAR('2') PORT_CHAR('"') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("3") PORT_CHAR('3') PORT_CHAR('#') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_NAME("8") PORT_CHAR('8') PORT_CHAR('(') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_NAME("T") PORT_CHAR('T') PORT_CHAR('t') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_NAME("U") PORT_CHAR('U') PORT_CHAR('u') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_NAME("7") PORT_CHAR('7') PORT_CHAR('\'') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_NAME("@") PORT_CHAR('@') \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("[ {") PORT_CHAR('[') PORT_CHAR('{') \ - PORT_START("KEY8") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_NAME("-") PORT_CHAR('-') PORT_CHAR('=') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_NAME("5") PORT_CHAR('5') PORT_CHAR('%') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_NAME("6") PORT_CHAR('6') PORT_CHAR('&') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_NAME("F") PORT_CHAR('F') PORT_CHAR('f') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_NAME("H") PORT_CHAR('H') PORT_CHAR('h') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_NAME("9") PORT_CHAR('9') PORT_CHAR(')') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_NAME(": *") PORT_CHAR(':') PORT_CHAR('*') \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("] }") PORT_CHAR(']') PORT_CHAR('}') \ - PORT_START("KEY9") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") PORT_CHAR('Q') PORT_CHAR('q') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("W") PORT_CHAR('W') PORT_CHAR('w') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("E") PORT_CHAR('E') PORT_CHAR('e') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_NAME("G") PORT_CHAR('G') PORT_CHAR('g') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_NAME("J") PORT_CHAR('J') PORT_CHAR('j') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("I") PORT_CHAR('I') PORT_CHAR('i') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_NAME("O") PORT_CHAR('O') PORT_CHAR('o') \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_NAME("P") PORT_CHAR('P') PORT_CHAR('p') \ - PORT_START("KEYA") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("A") PORT_CHAR('A') PORT_CHAR('a') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("S") PORT_CHAR('S') PORT_CHAR('s') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("D") PORT_CHAR('D') PORT_CHAR('d') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_NAME("V") PORT_CHAR('V') PORT_CHAR('v') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_NAME("N") PORT_CHAR('N') PORT_CHAR('n') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("K") PORT_CHAR('K') PORT_CHAR('k') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_NAME("L") PORT_CHAR('L') PORT_CHAR('l') \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_NAME("; +") PORT_CHAR(';') PORT_CHAR('+') \ - PORT_START("KEYB") \ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Z") PORT_CHAR('Z') PORT_CHAR('z') \ - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("X") PORT_CHAR('X') PORT_CHAR('x') \ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("C") PORT_CHAR('C') PORT_CHAR('c') \ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_NAME("B") PORT_CHAR('B') PORT_CHAR('b') \ - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_NAME("M") PORT_CHAR('M') PORT_CHAR('m') \ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME(", <") PORT_CHAR(',') PORT_CHAR('<') \ - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME(". >") PORT_CHAR('.') PORT_CHAR('>') \ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_NAME("/ ?") PORT_CHAR('/') PORT_CHAR('?') diff --git a/src/mess/includes/pc1251.h b/src/mess/includes/pc1251.h deleted file mode 100644 index d03a4524bf5..00000000000 --- a/src/mess/includes/pc1251.h +++ /dev/null @@ -1,62 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/pc1251.h - * - * Pocket Computer 1251 - * - ****************************************************************************/ - -#ifndef PC1251_H_ -#define PC1251_H_ - -#include "pocketc.h" -#include "cpu/sc61860/sc61860.h" -#include "machine/nvram.h" - -#define PC1251_CONTRAST (ioport("DSW0")->read() & 0x07) - - -class pc1251_state : public pocketc_state -{ -public: - enum - { - TIMER_POWER_UP - }; - - pc1251_state(const machine_config &mconfig, device_type type, const char *tag) - : pocketc_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 m_outa; - UINT8 m_outb; - int m_power; - UINT8 m_reg[0x100]; - - DECLARE_DRIVER_INIT(pc1251); - UINT32 screen_update_pc1251(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(pc1251_outa); - DECLARE_WRITE8_MEMBER(pc1251_outb); - DECLARE_WRITE8_MEMBER(pc1251_outc); - - DECLARE_READ_LINE_MEMBER(pc1251_reset); - DECLARE_READ_LINE_MEMBER(pc1251_brk); - DECLARE_READ8_MEMBER(pc1251_ina); - DECLARE_READ8_MEMBER(pc1251_inb); - DECLARE_READ8_MEMBER(pc1251_lcd_read); - DECLARE_WRITE8_MEMBER(pc1251_lcd_write); - virtual void machine_start(); - DECLARE_MACHINE_START(pc1260); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* PC1251_H_ */ diff --git a/src/mess/includes/pc1350.h b/src/mess/includes/pc1350.h deleted file mode 100644 index b50758c5917..00000000000 --- a/src/mess/includes/pc1350.h +++ /dev/null @@ -1,60 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/pc1350.h - * - * Pocket Computer 1350 - * - ****************************************************************************/ - -#ifndef PC1350_H_ -#define PC1350_H_ - -#include "pocketc.h" -#include "cpu/sc61860/sc61860.h" -#include "machine/nvram.h" -#include "machine/ram.h" - -#define PC1350_CONTRAST (ioport("DSW0")->read() & 0x07) - - -class pc1350_state : public pocketc_state -{ -public: - enum - { - TIMER_POWER_UP - }; - - pc1350_state(const machine_config &mconfig, device_type type, const char *tag) - : pocketc_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG) { } - - UINT8 m_outa; - UINT8 m_outb; - int m_power; - UINT8 m_reg[0x1000]; - UINT32 screen_update_pc1350(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_WRITE8_MEMBER(pc1350_outa); - DECLARE_WRITE8_MEMBER(pc1350_outb); - DECLARE_WRITE8_MEMBER(pc1350_outc); - - DECLARE_READ_LINE_MEMBER(pc1350_brk); - DECLARE_READ8_MEMBER(pc1350_ina); - DECLARE_READ8_MEMBER(pc1350_inb); - DECLARE_READ8_MEMBER(pc1350_lcd_read); - DECLARE_WRITE8_MEMBER(pc1350_lcd_write); - DECLARE_READ8_MEMBER(pc1350_keyboard_line_r); - - virtual void machine_start(); - required_device m_maincpu; - required_device m_ram; - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* PC1350_H_ */ diff --git a/src/mess/includes/pc1401.h b/src/mess/includes/pc1401.h deleted file mode 100644 index 00797e2fe17..00000000000 --- a/src/mess/includes/pc1401.h +++ /dev/null @@ -1,60 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/pc1401.h - * - * Pocket Computer 1401 - * - ****************************************************************************/ - -#ifndef PC1401_H_ -#define PC1401_H_ - -#include "pocketc.h" -#include "cpu/sc61860/sc61860.h" -#include "machine/nvram.h" - -#define CONTRAST (ioport("DSW0")->read() & 0x07) - - -class pc1401_state : public pocketc_state -{ -public: - enum - { - TIMER_POWER_UP - }; - - pc1401_state(const machine_config &mconfig, device_type type, const char *tag) - : pocketc_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 m_portc; - UINT8 m_outa; - UINT8 m_outb; - int m_power; - UINT8 m_reg[0x100]; - DECLARE_DRIVER_INIT(pc1401); - UINT32 screen_update_pc1401(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ_LINE_MEMBER(pc1401_reset); - DECLARE_READ_LINE_MEMBER(pc1401_brk); - DECLARE_WRITE8_MEMBER(pc1401_outa); - DECLARE_WRITE8_MEMBER(pc1401_outb); - DECLARE_WRITE8_MEMBER(pc1401_outc); - DECLARE_READ8_MEMBER(pc1401_ina); - DECLARE_READ8_MEMBER(pc1401_inb); - DECLARE_READ8_MEMBER(pc1401_lcd_read); - DECLARE_WRITE8_MEMBER(pc1401_lcd_write); - - virtual void machine_start(); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* PC1401_H_ */ diff --git a/src/mess/includes/pc1403.h b/src/mess/includes/pc1403.h deleted file mode 100644 index d40b2bb2bce..00000000000 --- a/src/mess/includes/pc1403.h +++ /dev/null @@ -1,65 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/pc1403.h - * - * Pocket Computer 1403 - * - ****************************************************************************/ - -#ifndef PC1403_H_ -#define PC1403_H_ - -#include "pocketc.h" -#include "cpu/sc61860/sc61860.h" -#include "machine/nvram.h" - -#define CONTRAST (ioport("DSW0")->read() & 0x07) - - -class pc1403_state : public pocketc_state -{ -public: - enum - { - TIMER_POWER_UP - }; - - pc1403_state(const machine_config &mconfig, device_type type, const char *tag) - : pocketc_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 m_portc; - UINT8 m_outa; - int m_power; - UINT8 m_asic[4]; - int m_DOWN; - int m_RIGHT; - UINT8 m_reg[0x100]; - - DECLARE_DRIVER_INIT(pc1403); - UINT32 screen_update_pc1403(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ_LINE_MEMBER(pc1403_reset); - DECLARE_READ_LINE_MEMBER(pc1403_brk); - DECLARE_WRITE8_MEMBER(pc1403_outa); - DECLARE_WRITE8_MEMBER(pc1403_outc); - DECLARE_READ8_MEMBER(pc1403_ina); - - DECLARE_READ8_MEMBER(pc1403_asic_read); - DECLARE_WRITE8_MEMBER(pc1403_asic_write); - DECLARE_READ8_MEMBER(pc1403_lcd_read); - DECLARE_WRITE8_MEMBER(pc1403_lcd_write); - virtual void video_start(); - virtual void machine_start(); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* PC1403_H_ */ diff --git a/src/mess/includes/pc1512.h b/src/mess/includes/pc1512.h deleted file mode 100644 index 218a3d5599e..00000000000 --- a/src/mess/includes/pc1512.h +++ /dev/null @@ -1,258 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PC1512__ -#define __PC1512__ - -#include "emu.h" -#include "cpu/i86/i86.h" -#include "cpu/mcs48/mcs48.h" -#include "formats/pc_dsk.h" -#include "machine/am9517a.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "machine/ins8250.h" -#include "bus/isa/isa.h" -#include "bus/isa/isa_cards.h" -#include "machine/mc146818.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/pc1512kb.h" -#include "machine/pc_fdc.h" -#include "machine/ram.h" -#include "sound/speaker.h" -#include "video/mc6845.h" -#include "bus/isa/pc1640_iga.h" - -#define I8086_TAG "ic120" -#define I8087_TAG "ic119" -#define I8048_TAG "i8048" -#define I8237A5_TAG "ic130" -#define I8259A2_TAG "ic109" -#define I8253_TAG "ic114" -#define MC146818_TAG "ic134" -#define PC_FDC_XT_TAG "ic112" -#define INS8250_TAG "ic106" -#define AMS40041_TAG "ic126" -#define CENTRONICS_TAG "centronics" -#define SPEAKER_TAG "speaker" -#define ISA_BUS_TAG "isa" -#define RS232_TAG "rs232" -#define SCREEN_TAG "screen" - -class pc1512_state : public driver_device -{ -public: - pc1512_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, I8086_TAG), - m_dmac(*this, I8237A5_TAG), - m_pic(*this, I8259A2_TAG), - m_pit(*this, I8253_TAG), - m_rtc(*this, MC146818_TAG), - m_fdc(*this, PC_FDC_XT_TAG), - m_uart(*this, INS8250_TAG), - m_vdu(*this, AMS40041_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_cent_data_out(*this, "cent_data_out"), - m_speaker(*this, SPEAKER_TAG), - m_kb(*this, PC1512_KEYBOARD_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ), - m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ), - m_bus(*this, ISA_BUS_TAG), - m_char_rom(*this, AMS40041_TAG), - m_video_ram(*this, "video_ram"), - m_lk(*this, "LK"), - m_pit1(0), - m_pit2(0), - m_status1(0), - m_status2(0), - m_port61(0), - m_nmi_enable(0), - m_kb_bits(0), - m_kbclk(1), - m_kbdata(1), - m_dreq0(0), - m_nden(1), - m_dint(0), - m_ddrq(0), - m_fdc_dsr(0), - m_neop(0), - m_ack_int_enable(1), - m_centronics_ack(0), - m_speaker_drive(0) - { } - - required_device m_maincpu; - required_device m_dmac; - required_device m_pic; - required_device m_pit; - required_device m_rtc; - required_device m_fdc; - required_device m_uart; - optional_device m_vdu; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_speaker; - required_device m_kb; - required_device m_ram; - required_device m_floppy0; - optional_device m_floppy1; - required_device m_bus; - optional_memory_region m_char_rom; - optional_shared_ptr m_video_ram; - required_ioport m_lk; - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void update_speaker(); - void update_fdc_int(); - void update_fdc_drq(); - void update_fdc_tc(); - void update_ack(); - void set_fdc_dsr(UINT8 data); - int get_display_mode(UINT8 mode); - offs_t get_char_rom_offset(); - int get_color(UINT8 data); - MC6845_UPDATE_ROW(draw_alpha); - MC6845_UPDATE_ROW(draw_graphics_1); - MC6845_UPDATE_ROW(draw_graphics_2); - - DECLARE_READ8_MEMBER( video_ram_r ); - DECLARE_WRITE8_MEMBER( video_ram_w ); - DECLARE_READ8_MEMBER( system_r ); - DECLARE_WRITE8_MEMBER( system_w ); - DECLARE_READ8_MEMBER( mouse_r ); - DECLARE_WRITE8_MEMBER( mouse_w ); - DECLARE_WRITE8_MEMBER( dma_page_w ); - DECLARE_WRITE8_MEMBER( nmi_mask_w ); - DECLARE_READ8_MEMBER( printer_r ); - DECLARE_WRITE8_MEMBER( printer_w ); - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_READ8_MEMBER( vdu_r ); - DECLARE_WRITE8_MEMBER( vdu_w ); - DECLARE_WRITE_LINE_MEMBER( kbdata_w ); - DECLARE_WRITE_LINE_MEMBER( kbclk_w ); - DECLARE_WRITE_LINE_MEMBER( pit1_w ); - DECLARE_WRITE_LINE_MEMBER( pit2_w ); - DECLARE_WRITE_LINE_MEMBER( ack_w ); - DECLARE_WRITE_LINE_MEMBER( hrq_w ); - DECLARE_WRITE_LINE_MEMBER( eop_w ); - DECLARE_READ8_MEMBER( memr_r ); - DECLARE_WRITE8_MEMBER( memw_w ); - DECLARE_READ8_MEMBER( ior1_r ); - DECLARE_READ8_MEMBER( ior2_r ); - DECLARE_READ8_MEMBER( ior3_r ); - DECLARE_WRITE8_MEMBER( iow0_w ); - DECLARE_WRITE8_MEMBER( iow1_w ); - DECLARE_WRITE8_MEMBER( iow2_w ); - DECLARE_WRITE8_MEMBER( iow3_w ); - DECLARE_WRITE_LINE_MEMBER( dack0_w ); - DECLARE_WRITE_LINE_MEMBER( dack1_w ); - DECLARE_WRITE_LINE_MEMBER( dack2_w ); - DECLARE_WRITE_LINE_MEMBER( dack3_w ); - DECLARE_INPUT_CHANGED_MEMBER( mouse_button_1_changed ); - DECLARE_INPUT_CHANGED_MEMBER( mouse_button_2_changed ); - DECLARE_INPUT_CHANGED_MEMBER( mouse_x_changed ); - DECLARE_INPUT_CHANGED_MEMBER( mouse_y_changed ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - DECLARE_WRITE_LINE_MEMBER( fdc_int_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - MC6845_UPDATE_ROW(crtc_update_row); - - // system status register - int m_pit1; - int m_pit2; - UINT8 m_status1; - UINT8 m_status2; - UINT8 m_port61; - - // interrupt state - int m_nmi_enable; - - // keyboard state - UINT8 m_kbd; - int m_kb_bits; - int m_kbclk; - int m_kbdata; - - // mouse state - UINT8 m_mouse_x; - UINT8 m_mouse_y; - - // DMA state - UINT8 m_dma_page[4]; - int m_dma_channel; - int m_dreq0; - - // floppy state - int m_nden; - int m_dint; - int m_ddrq; - UINT8 m_fdc_dsr; - int m_neop; - - // printer state - int m_ack_int_enable; - int m_centronics_ack; - int m_centronics_busy; - int m_centronics_perror; - int m_centronics_select; - int m_centronics_fault; - UINT8 m_printer_data; - UINT8 m_printer_control; - - // video state - int m_toggle; - int m_lpen; - int m_blink; - int m_cursor; - int m_blink_ctr; - UINT8 m_vdu_mode; - UINT8 m_vdu_color; - UINT8 m_vdu_plane; - UINT8 m_vdu_rdsel; - UINT8 m_vdu_border; - - // sound state - int m_speaker_drive; -}; - -class pc1640_state : public pc1512_state -{ -public: - pc1640_state(const machine_config &mconfig, device_type type, const char *tag) - : pc1512_state(mconfig, type, tag), - m_sw(*this, "SW"), - m_opt(0) - { } - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( io_r ); - DECLARE_READ8_MEMBER( printer_r ); - - required_ioport m_sw; - - int m_opt; -}; - -// ---------- defined in video/pc1512.c ---------- - -MACHINE_CONFIG_EXTERN( pc1512_video ); - -#endif diff --git a/src/mess/includes/pc4.h b/src/mess/includes/pc4.h deleted file mode 100644 index 003669597b8..00000000000 --- a/src/mess/includes/pc4.h +++ /dev/null @@ -1,76 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/*************************************************************************** - - VTech Laser PC4 - -****************************************************************************/ - -#pragma once - -#ifndef _PC4_H_ -#define _PC4_H_ - - -#include "sound/beep.h" - -class pc4_state : public driver_device -{ -public: - pc4_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_beep(*this, "beeper"), - m_region_charset(*this, "charset"), - m_rombank(*this, "rombank") { } - - required_device m_maincpu; - required_device m_beep; - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( beep_w ); - DECLARE_WRITE8_MEMBER( bank_w ); - DECLARE_READ8_MEMBER( kb_r ); - - //LCD controller - void update_ac(void); - void set_busy_flag(UINT16 usec); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - DECLARE_WRITE8_MEMBER(lcd_control_w); - DECLARE_READ8_MEMBER(lcd_control_r); - DECLARE_WRITE8_MEMBER(lcd_data_w); - DECLARE_READ8_MEMBER(lcd_data_r); - DECLARE_WRITE8_MEMBER( lcd_offset_w ); - - static const device_timer_id BUSY_TIMER = 0; - static const device_timer_id BLINKING_TIMER = 1; - - emu_timer *m_blink_timer; - emu_timer *m_busy_timer; - - UINT8 m_busy_flag; - UINT8 m_ddram[0xa0]; - UINT8 m_cgram[0x40]; - INT16 m_ac; - UINT8 m_ac_mode; - UINT8 m_data_bus_flag; - INT16 m_cursor_pos; - UINT8 m_display_on; - UINT8 m_cursor_on; - UINT8 m_blink_on; - UINT8 m_shift_on; - INT8 m_disp_shift; - INT8 m_direction; - UINT8 m_blink; - DECLARE_PALETTE_INIT(pc4); - -protected: - required_memory_region m_region_charset; - required_memory_bank m_rombank; - ioport_port *io_port[8]; -}; - -#endif // _PC4_H_ diff --git a/src/mess/includes/pc8001.h b/src/mess/includes/pc8001.h deleted file mode 100644 index 524adfba29c..00000000000 --- a/src/mess/includes/pc8001.h +++ /dev/null @@ -1,96 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PC8001__ -#define __PC8001__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "imagedev/cassette.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8257.h" -#include "machine/i8255.h" -#include "machine/i8251.h" -#include "machine/ram.h" -#include "machine/upd1990a.h" -#include "sound/speaker.h" -#include "video/upd3301.h" - -#define Z80_TAG "z80" -#define I8251_TAG "i8251" -#define I8255A_TAG "i8255" -#define I8257_TAG "i8257" -#define UPD1990A_TAG "upd1990a" -#define UPD3301_TAG "upd3301" -#define CENTRONICS_TAG "centronics" -#define SCREEN_TAG "screen" - -class pc8001_state : public driver_device -{ -public: - pc8001_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_rtc(*this, UPD1990A_TAG), - m_dma(*this, I8257_TAG), - m_crtc(*this, UPD3301_TAG), - m_cassette(*this, "cassette"), - m_centronics(*this, CENTRONICS_TAG), - m_cent_data_out(*this, "cent_data_out"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_char_rom(*this, UPD3301_TAG) - { } - - required_device m_maincpu; - required_device m_rtc; - required_device m_dma; - required_device m_crtc; - required_device m_cassette; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_speaker; - required_device m_ram; - required_memory_region m_rom; - required_memory_region m_char_rom; - - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( port10_w ); - DECLARE_WRITE8_MEMBER( port30_w ); - DECLARE_READ8_MEMBER( port40_r ); - DECLARE_WRITE8_MEMBER( port40_w ); - DECLARE_WRITE_LINE_MEMBER( crtc_drq_w ); - DECLARE_WRITE_LINE_MEMBER( hrq_w ); - DECLARE_READ8_MEMBER( dma_mem_r ); - - /* video state */ - int m_width80; - int m_color; - - int m_centronics_busy; - int m_centronics_ack; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - UPD3301_DRAW_CHARACTER_MEMBER( pc8001_display_pixels ); -}; - -class pc8001mk2_state : public pc8001_state -{ -public: - pc8001mk2_state(const machine_config &mconfig, device_type type, const char *tag) - : pc8001_state(mconfig, type, tag), - m_kanji_rom(*this, "kanji") - { } - - required_memory_region m_kanji_rom; - - DECLARE_WRITE8_MEMBER( port31_w ); -}; - -#endif diff --git a/src/mess/includes/pc8401a.h b/src/mess/includes/pc8401a.h deleted file mode 100644 index 10e99652cd1..00000000000 --- a/src/mess/includes/pc8401a.h +++ /dev/null @@ -1,115 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PC8401A__ -#define __PC8401A__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/i8251.h" -#include "machine/ram.h" -#include "machine/upd1990a.h" -#include "video/mc6845.h" -#include "video/sed1330.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define SCREEN_TAG "screen" -#define CRT_SCREEN_TAG "screen2" - -#define Z80_TAG "z80" -#define I8255A_TAG "i8255a" -#define UPD1990A_TAG "upd1990a" -#define AY8910_TAG "ay8910" -#define SED1330_TAG "sed1330" -#define MC6845_TAG "mc6845" -#define I8251_TAG "i8251" -#define RS232_TAG "rs232" - -#define PC8401A_CRT_VIDEORAM_SIZE 0x2000 - -class pc8401a_state : public driver_device -{ -public: - pc8401a_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_rtc(*this, UPD1990A_TAG), - m_lcdc(*this, SED1330_TAG), - m_crtc(*this, MC6845_TAG), - m_screen_lcd(*this, SCREEN_TAG), - m_cart(*this, "cartslot"), - m_io_cart(*this, "io_cart"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_crt_ram(*this, "crt_ram"), - m_io_y(*this, "Y") - { } - - required_device m_maincpu; - required_device m_rtc; - required_device m_lcdc; - optional_device m_crtc; - required_device m_screen_lcd; - required_device m_cart; - required_device m_io_cart; - required_device m_ram; - required_memory_region m_rom; - optional_shared_ptr m_crt_ram; - required_ioport_array<10> m_io_y; - - memory_region *m_cart_rom; - - virtual void machine_start(); - virtual void video_start(); - - DECLARE_WRITE8_MEMBER( mmr_w ); - DECLARE_READ8_MEMBER( mmr_r ); - DECLARE_READ8_MEMBER( rtc_r ); - DECLARE_WRITE8_MEMBER( rtc_cmd_w ); - DECLARE_WRITE8_MEMBER( rtc_ctrl_w ); - DECLARE_READ8_MEMBER( io_rom_data_r ); - DECLARE_WRITE8_MEMBER( io_rom_addr_w ); - DECLARE_READ8_MEMBER( port70_r ); - DECLARE_READ8_MEMBER( port71_r ); - DECLARE_WRITE8_MEMBER( port70_w ); - DECLARE_WRITE8_MEMBER( port71_w ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_PALETTE_INIT(pc8401a); - - void scan_keyboard(); - void bankswitch(UINT8 data); - - // keyboard state - int m_key_strobe; // key pressed - - // memory state - UINT8 m_mmr; // memory mapping register - UINT32 m_io_addr; // I/O ROM address counter - - UINT8 m_key_latch; - TIMER_DEVICE_CALLBACK_MEMBER(pc8401a_keyboard_tick); -}; - -class pc8500_state : public pc8401a_state -{ -public: - pc8500_state(const machine_config &mconfig, device_type type, const char *tag) - : pc8401a_state(mconfig, type, tag) - { } - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -}; - -// ---------- defined in video/pc8401a.c ---------- - -MACHINE_CONFIG_EXTERN( pc8401a_video ); -MACHINE_CONFIG_EXTERN( pc8500_video ); - -#endif diff --git a/src/mess/includes/pce.h b/src/mess/includes/pce.h deleted file mode 100644 index 9d9a7d34b56..00000000000 --- a/src/mess/includes/pce.h +++ /dev/null @@ -1,82 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Charles MacDonald, Wilbert Pol, Angelo Salese -/***************************************************************************** - * - * includes/pce.h - * - * NEC PC Engine/TurboGrafx16 - * - ****************************************************************************/ - -#ifndef PCE_H_ -#define PCE_H_ - -#include "cdrom.h" -#include "cpu/h6280/h6280.h" -#include "bus/pce/pce_slot.h" -#include "machine/pce_cd.h" -#include "video/huc6260.h" - -#define C6280_TAG "c6280" - -#define MAIN_CLOCK 21477270 - -#define TG_16_JOY_SIG 0x00 -#define PCE_JOY_SIG 0x40 -#define NO_CD_SIG 0x80 -#define CD_SIG 0x00 -/* these might be used to indicate something, but they always seem to return 1 */ -#define CONST_SIG 0x30 - - - -class pce_state : public driver_device -{ -public: - pce_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cd_ram(*this, "cd_ram"), - m_user_ram(*this, "user_ram"), - m_huc6260(*this, "huc6260"), - m_cartslot(*this, "cartslot"), - m_cd(*this, "pce_cd"), - m_joy(*this, "JOY_P"), - m_joy6b(*this, "JOY6B_P"), - m_joy_type(*this, "JOY_TYPE"), - m_a_card(*this, "A_CARD") - { } - - required_device m_maincpu; - required_shared_ptr m_cd_ram; - required_shared_ptr m_user_ram; - optional_device m_huc6260; - required_device m_cartslot; - optional_device m_cd; - required_ioport_array<5> m_joy; - required_ioport_array<5> m_joy6b; - required_ioport m_joy_type; - required_ioport m_a_card; - - UINT8 m_io_port_options; - UINT8 m_sys3_card; - UINT8 m_acard; - int m_joystick_port_select; - int m_joystick_data_select; - UINT8 m_joy_6b_packet[5]; - DECLARE_WRITE8_MEMBER(mess_pce_joystick_w); - DECLARE_READ8_MEMBER(mess_pce_joystick_r); - DECLARE_WRITE8_MEMBER(pce_cd_intf_w); - DECLARE_READ8_MEMBER(pce_cd_intf_r); - DECLARE_READ8_MEMBER(pce_cd_acard_wram_r); - DECLARE_WRITE8_MEMBER(pce_cd_acard_wram_w); - DECLARE_DRIVER_INIT(sgx); - DECLARE_DRIVER_INIT(tg16); - DECLARE_DRIVER_INIT(mess_pce); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_MACHINE_START(pce); - DECLARE_MACHINE_RESET(mess_pce); - DECLARE_WRITE_LINE_MEMBER(pce_irq_changed); -}; - -#endif /* PCE_H_ */ diff --git a/src/mess/includes/pcw.h b/src/mess/includes/pcw.h deleted file mode 100644 index ef81c98bc82..00000000000 --- a/src/mess/includes/pcw.h +++ /dev/null @@ -1,140 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker -/***************************************************************************** - * - * includes/pcw.h - * - ****************************************************************************/ - -#ifndef PCW_H_ -#define PCW_H_ - -#include "machine/upd765.h" -#include "machine/ram.h" -#include "sound/beep.h" - -#define PCW_BORDER_HEIGHT 8 -#define PCW_BORDER_WIDTH 8 -#define PCW_NUM_COLOURS 2 -#define PCW_DISPLAY_WIDTH 720 -#define PCW_DISPLAY_HEIGHT 256 - -#define PCW_SCREEN_WIDTH (PCW_DISPLAY_WIDTH + (PCW_BORDER_WIDTH<<1)) -#define PCW_SCREEN_HEIGHT (PCW_DISPLAY_HEIGHT + (PCW_BORDER_HEIGHT<<1)) -#define PCW_PRINTER_WIDTH (80*16) -#define PCW_PRINTER_HEIGHT (20*16) - - -class pcw_state : public driver_device -{ -public: - pcw_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_fdc(*this, "upd765"), - m_ram(*this, RAM_TAG), - m_beeper(*this, "beeper"), - m_screen(*this, "screen"), - m_palette(*this, "palette") - { } - - int m_boot; - int m_system_status; - int m_fdc_interrupt_code; - int m_interrupt_counter; - UINT8 m_banks[4]; - unsigned char m_bank_force; - UINT8 m_timer_irq_flag; - UINT8 m_nmi_flag; - UINT8 m_printer_command; - UINT8 m_printer_data; - UINT8 m_printer_status; - INT16 m_printer_headpos; - UINT16 m_kb_scan_row; - UINT8 m_mcu_keyboard_data[16]; - UINT8 m_mcu_transmit_reset_seq; - UINT8 m_mcu_transmit_count; - UINT8 m_mcu_selected; - UINT8 m_mcu_buffer; - UINT8 m_mcu_prev; - unsigned int m_roller_ram_addr; - unsigned short m_roller_ram_offset; - unsigned char m_vdu_video_control_register; - UINT8 m_printer_serial; // value if shift/store data pin - UINT8 m_printer_shift; // state of shift register - UINT8 m_printer_shift_output; // output presented to the paper feed motor and print head motor - UINT8 m_head_motor_state; - UINT8 m_linefeed_motor_state; - UINT16 m_printer_pins; - UINT8 m_printer_p2; // MCU port P2 state - UINT32 m_paper_feed; // amount of paper fed through printer, by n/360 inches. One line feed is 61/360in (from the linefeed command in CP/M;s ptr menu) - bitmap_ind16* m_prn_output; - UINT8 m_printer_p2_prev; - emu_timer* m_prn_stepper; - emu_timer* m_prn_pins; - DECLARE_READ8_MEMBER(pcw_keyboard_r); - DECLARE_READ8_MEMBER(pcw_keyboard_data_r); - DECLARE_READ8_MEMBER(pcw_interrupt_counter_r); - DECLARE_WRITE8_MEMBER(pcw_bank_select_w); - DECLARE_WRITE8_MEMBER(pcw_bank_force_selection_w); - DECLARE_WRITE8_MEMBER(pcw_roller_ram_addr_w); - DECLARE_WRITE8_MEMBER(pcw_pointer_table_top_scan_w); - DECLARE_WRITE8_MEMBER(pcw_vdu_video_control_register_w); - DECLARE_WRITE8_MEMBER(pcw_system_control_w); - DECLARE_READ8_MEMBER(pcw_system_status_r); - DECLARE_READ8_MEMBER(pcw_expansion_r); - DECLARE_WRITE8_MEMBER(pcw_expansion_w); - DECLARE_WRITE8_MEMBER(pcw_printer_data_w); - DECLARE_WRITE8_MEMBER(pcw_printer_command_w); - DECLARE_READ8_MEMBER(pcw_printer_data_r); - DECLARE_READ8_MEMBER(pcw_printer_status_r); - DECLARE_READ8_MEMBER(mcu_printer_p1_r); - DECLARE_WRITE8_MEMBER(mcu_printer_p1_w); - DECLARE_READ8_MEMBER(mcu_printer_p2_r); - DECLARE_WRITE8_MEMBER(mcu_printer_p2_w); - DECLARE_READ8_MEMBER(mcu_printer_t1_r); - DECLARE_READ8_MEMBER(mcu_printer_t0_r); - DECLARE_READ8_MEMBER(mcu_kb_scan_r); - DECLARE_WRITE8_MEMBER(mcu_kb_scan_w); - DECLARE_READ8_MEMBER(mcu_kb_scan_high_r); - DECLARE_WRITE8_MEMBER(mcu_kb_scan_high_w); - DECLARE_READ8_MEMBER(mcu_kb_data_r); - DECLARE_READ8_MEMBER(mcu_kb_t1_r); - DECLARE_READ8_MEMBER(mcu_kb_t0_r); - DECLARE_READ8_MEMBER(pcw9512_parallel_r); - DECLARE_WRITE8_MEMBER(pcw9512_parallel_w); - void mcu_transmit_serial(UINT8 bit); - DECLARE_DRIVER_INIT(pcw); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(pcw); - UINT32 screen_update_pcw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_pcw_printer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(pcw_timer_pulse); - TIMER_CALLBACK_MEMBER(pcw_stepper_callback); - TIMER_CALLBACK_MEMBER(pcw_pins_callback); - TIMER_CALLBACK_MEMBER(setup_beep); - TIMER_DEVICE_CALLBACK_MEMBER(pcw_timer_interrupt); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - DECLARE_WRITE_LINE_MEMBER( pcw_fdc_interrupt ); - required_device m_maincpu; - required_device m_fdc; - required_device m_ram; - required_device m_beeper; - required_device m_screen; - required_device m_palette; - - inline void pcw_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void pcw_update_interrupt_counter(); - void pcw_update_irqs(); - void pcw_update_read_memory_block(int block, int bank); - void pcw_update_write_memory_block(int block, int bank); - void pcw_update_mem(int block, int data); - int pcw_get_sys_status(); - void pcw_printer_fire_pins(UINT16 pins); -}; - -#endif /* PCW_H_ */ diff --git a/src/mess/includes/pcw16.h b/src/mess/includes/pcw16.h deleted file mode 100644 index 2321267578c..00000000000 --- a/src/mess/includes/pcw16.h +++ /dev/null @@ -1,160 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker -/***************************************************************************** - * - * includes/pcw16.h - * - ****************************************************************************/ - -#ifndef PCW16_H_ -#define PCW16_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/upd765.h" /* FDC superio */ -#include "machine/pc_lpt.h" /* PC-Parallel Port */ -#include "machine/pckeybrd.h" /* PC-AT keyboard */ -#include "machine/upd765.h" /* FDC superio */ -#include "machine/ins8250.h" /* pc com port */ -#include "sound/beep.h" /* pcw/pcw16 beeper */ -#include "machine/intelfsh.h" -#include "formats/pc_dsk.h" -#include "machine/ram.h" - -#define PCW16_BORDER_HEIGHT 8 -#define PCW16_BORDER_WIDTH 8 -#define PCW16_NUM_COLOURS 32 -#define PCW16_DISPLAY_WIDTH 640 -#define PCW16_DISPLAY_HEIGHT 480 - -#define PCW16_SCREEN_WIDTH (PCW16_DISPLAY_WIDTH + (PCW16_BORDER_WIDTH<<1)) -#define PCW16_SCREEN_HEIGHT (PCW16_DISPLAY_HEIGHT + (PCW16_BORDER_HEIGHT<<1)) - - -class pcw16_state : public driver_device -{ -public: - pcw16_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_flash0(*this, "flash0"), - m_flash1(*this, "flash1"), - m_fdc(*this, "fdc"), - m_uart2(*this, "ns16550_2"), - m_beeper(*this, "beeper"), - m_ram(*this, RAM_TAG), - m_keyboard(*this, "at_keyboard"), - m_region_rom(*this, "maincpu"), - m_io_extra(*this, "EXTRA") - { } - - required_device m_maincpu; - required_device m_flash0; - required_device m_flash1; - required_device m_fdc; - required_device m_uart2; - required_device m_beeper; - required_device m_ram; - required_device m_keyboard; - required_memory_region m_region_rom; - required_ioport m_io_extra; - - unsigned long m_interrupt_counter; - int m_banks[4]; - int m_4_bit_port; - int m_fdc_int_code; - int m_system_status; - char *m_mem_ptr[4]; - unsigned char m_keyboard_data_shift; - int m_keyboard_parity_table[256]; - int m_keyboard_bits; - int m_keyboard_bits_output; - int m_keyboard_state; - int m_keyboard_previous_state; - unsigned char m_rtc_seconds; - unsigned char m_rtc_minutes; - unsigned char m_rtc_hours; - unsigned char m_rtc_days_max; - unsigned char m_rtc_days; - unsigned char m_rtc_months; - unsigned char m_rtc_years; - unsigned char m_rtc_control; - unsigned char m_rtc_256ths_seconds; - int m_previous_fdc_int_state; - int m_colour_palette[16]; - int m_video_control; - DECLARE_WRITE8_MEMBER(pcw16_palette_w); - DECLARE_READ8_MEMBER(pcw16_bankhw_r); - DECLARE_WRITE8_MEMBER(pcw16_bankhw_w); - DECLARE_WRITE8_MEMBER(pcw16_video_control_w); - DECLARE_READ8_MEMBER(pcw16_keyboard_data_shift_r); - DECLARE_WRITE8_MEMBER(pcw16_keyboard_data_shift_w); - DECLARE_READ8_MEMBER(pcw16_keyboard_status_r); - DECLARE_WRITE8_MEMBER(pcw16_keyboard_control_w); - DECLARE_READ8_MEMBER(rtc_year_invalid_r); - DECLARE_READ8_MEMBER(rtc_month_r); - DECLARE_READ8_MEMBER(rtc_days_r); - DECLARE_READ8_MEMBER(rtc_hours_r); - DECLARE_READ8_MEMBER(rtc_minutes_r); - DECLARE_READ8_MEMBER(rtc_seconds_r); - DECLARE_READ8_MEMBER(rtc_256ths_seconds_r); - DECLARE_WRITE8_MEMBER(rtc_control_w); - DECLARE_WRITE8_MEMBER(rtc_seconds_w); - DECLARE_WRITE8_MEMBER(rtc_minutes_w); - DECLARE_WRITE8_MEMBER(rtc_hours_w); - DECLARE_WRITE8_MEMBER(rtc_days_w); - DECLARE_WRITE8_MEMBER(rtc_month_w); - DECLARE_WRITE8_MEMBER(rtc_year_w); - DECLARE_READ8_MEMBER(pcw16_system_status_r); - DECLARE_READ8_MEMBER(pcw16_timer_interrupt_counter_r); - DECLARE_WRITE8_MEMBER(pcw16_system_control_w); - DECLARE_WRITE8_MEMBER(pcw16_superio_fdc_datarate_w); - DECLARE_WRITE8_MEMBER(pcw16_superio_fdc_digital_output_register_w); - DECLARE_WRITE8_MEMBER(pcw16_superio_fdc_data_w); - DECLARE_READ8_MEMBER(pcw16_superio_fdc_data_r); - DECLARE_READ8_MEMBER(pcw16_superio_fdc_main_status_register_r); - DECLARE_READ8_MEMBER(pcw16_superio_fdc_digital_input_register_r); - DECLARE_READ8_MEMBER(pcw16_mem_r); - DECLARE_WRITE8_MEMBER(pcw16_mem_w); - void pcw16_keyboard_init(); - void pcw16_keyboard_refresh_outputs(); - void pcw16_keyboard_set_clock_state(int state); - void pcw16_keyboard_int(int state); - void pcw16_keyboard_reset(); - int pcw16_keyboard_can_transmit(); - void pcw16_keyboard_signal_byte_received(int data); - void pcw16_refresh_ints(); - void rtc_setup_max_days(); - UINT8 pcw16_read_mem(UINT8 bank, UINT16 offset); - void pcw16_write_mem(UINT8 bank, UINT16 offset, UINT8 data); - UINT8 read_bank_data(UINT8 type, UINT16 offset); - void write_bank_data(UINT8 type, UINT16 offset, UINT8 data); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(pcw16); - UINT32 screen_update_pcw16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(pcw16_timer_callback); - TIMER_DEVICE_CALLBACK_MEMBER(rtc_timer_callback); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_interrupt_1); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_interrupt_2); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_tx_0); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_dtr_0); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_rts_0); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_tx_1); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_dtr_1); - DECLARE_WRITE_LINE_MEMBER(pcw16_com_rts_1); - DECLARE_WRITE_LINE_MEMBER(pcw16_keyboard_callback); - INPUT_CHANGED_MEMBER(power); - - void trigger_fdc_int(); - DECLARE_WRITE_LINE_MEMBER( fdc_interrupt ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - inline void pcw16_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void pcw16_vh_decode_mode0(bitmap_ind16 &bitmap, int x, int y, unsigned char byte); - void pcw16_vh_decode_mode1(bitmap_ind16 &bitmap, int x, int y, unsigned char byte); - void pcw16_vh_decode_mode2(bitmap_ind16 &bitmap, int x, int y, unsigned char byte); - void pcw16_begin_byte_transfer(); -}; - -#endif /* PCW16_H_ */ diff --git a/src/mess/includes/pdp1.h b/src/mess/includes/pdp1.h deleted file mode 100644 index 074c907a489..00000000000 --- a/src/mess/includes/pdp1.h +++ /dev/null @@ -1,336 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Raphael Nabet -/***************************************************************************** - * - * includes/pdp1.h - * - ****************************************************************************/ - -#ifndef PDP1_H_ -#define PDP1_H_ - -#include "cpu/pdp1/pdp1.h" -#include "video/crt.h" - -/* defines for each bit and mask in input port "CSW" */ -enum -{ - /* bit numbers */ - pdp1_control_bit = 0, - - pdp1_extend_bit = 1, - pdp1_start_nobrk_bit= 2, - pdp1_start_brk_bit = 3, - pdp1_stop_bit = 4, - pdp1_continue_bit = 5, - pdp1_examine_bit = 6, - pdp1_deposit_bit = 7, - pdp1_read_in_bit = 8, - pdp1_reader_bit = 9, - pdp1_tape_feed_bit = 10, - pdp1_single_step_bit= 11, - pdp1_single_inst_bit= 12, - - /* masks */ - pdp1_control = (1 << pdp1_control_bit), - pdp1_extend = (1 << pdp1_extend_bit), - pdp1_start_nobrk = (1 << pdp1_start_nobrk_bit), - pdp1_start_brk = (1 << pdp1_start_brk_bit), - pdp1_stop = (1 << pdp1_stop_bit), - pdp1_continue = (1 << pdp1_continue_bit), - pdp1_examine = (1 << pdp1_examine_bit), - pdp1_deposit = (1 << pdp1_deposit_bit), - pdp1_read_in = (1 << pdp1_read_in_bit), - pdp1_reader = (1 << pdp1_reader_bit), - pdp1_tape_feed = (1 << pdp1_tape_feed_bit), - pdp1_single_step = (1 << pdp1_single_step_bit), - pdp1_single_inst = (1 << pdp1_single_inst_bit) -}; - -/* defines for each bit in input port pdp1_spacewar_controllers*/ -#define ROTATE_LEFT_PLAYER1 0x01 -#define ROTATE_RIGHT_PLAYER1 0x02 -#define THRUST_PLAYER1 0x04 -#define FIRE_PLAYER1 0x08 -#define ROTATE_LEFT_PLAYER2 0x10 -#define ROTATE_RIGHT_PLAYER2 0x20 -#define THRUST_PLAYER2 0x40 -#define FIRE_PLAYER2 0x80 -#define HSPACE_PLAYER1 0x100 -#define HSPACE_PLAYER2 0x200 - -/* defines for each field in input port pdp1_config */ -enum -{ - pdp1_config_extend_bit = 0, - pdp1_config_extend_mask = 0x3, /* 2 bits */ - pdp1_config_hw_mul_div_bit = 2, - pdp1_config_hw_mul_div_mask = 0x1, - /*pdp1_config_hw_obsolete_bit = 3, - pdp1_config_hw_obsolete_mask = 0x1,*/ - pdp1_config_type_20_sbs_bit = 4, - pdp1_config_type_20_sbs_mask = 0x1, - pdp1_config_lightpen_bit = 5, - pdp1_config_lightpen_mask = 0x1 -}; - -/* defines for each field in input port pdp1_lightpen_state */ -enum -{ - pdp1_lightpen_down_bit = 0, - pdp1_lightpen_smaller_bit = 1, - pdp1_lightpen_larger_bit = 2, - - pdp1_lightpen_down = (1 << pdp1_lightpen_down_bit), - pdp1_lightpen_smaller = (1 << pdp1_lightpen_smaller_bit), - pdp1_lightpen_larger = (1 << pdp1_lightpen_larger_bit) -}; - -/* defines for our font */ -enum -{ - pdp1_charnum = /*104*/128, /* ASCII set + 8 special characters */ - /* for whatever reason, 104 breaks some characters */ - - pdp1_fontdata_size = 8 * pdp1_charnum -}; - -enum -{ - /* size and position of crt window */ - crt_window_width = 512, - crt_window_height = 512, - crt_window_offset_x = 0, - crt_window_offset_y = 0, - /* size and position of operator control panel window */ - panel_window_width = 384, - panel_window_height = 128, - panel_window_offset_x = crt_window_width, - panel_window_offset_y = 0, - /* size and position of typewriter window */ - typewriter_window_width = 640, - typewriter_window_height = 160, - typewriter_window_offset_x = 0, - typewriter_window_offset_y = crt_window_height -}; - -enum -{ - total_width = crt_window_width + panel_window_width, - total_height = crt_window_height + typewriter_window_height, - - /* respect 4:3 aspect ratio to keep pixels square */ - virtual_width_1 = ((total_width+3)/4)*4, - virtual_height_1 = ((total_height+2)/3)*3, - virtual_width_2 = virtual_height_1*4/3, - virtual_height_2 = virtual_width_1*3/4, - virtual_width = (virtual_width_1 > virtual_width_2) ? virtual_width_1 : virtual_width_2, - virtual_height = (virtual_height_1 > virtual_height_2) ? virtual_height_1 : virtual_height_2 -}; - -enum -{ /* refresh rate in Hz: can be changed at will */ - refresh_rate = 60 -}; - -/* Color codes */ -enum -{ - /* first pen_crt_num_levels colors used for CRT (with remanence) */ - pen_crt_num_levels = 69, - pen_crt_max_intensity = pen_crt_num_levels-1, - - /* next colors used for control panel and typewriter */ - pen_black = pen_crt_num_levels, - pen_white, - pen_green, - pen_dk_green, - pen_red, - pen_lt_gray, - - /* color constants for control panel */ - pen_panel_bg = pen_black, - pen_panel_caption = pen_white, - color_panel_caption = 0, - pen_switch_nut = pen_lt_gray, - pen_switch_button = pen_white, - pen_lit_lamp = pen_green, - pen_unlit_lamp = pen_dk_green, - - /* color constants for typewriter */ - pen_typewriter_bg = pen_white, - color_typewriter_black = 1, - color_typewriter_red = 2, - - /* color constants used for light pen */ - pen_lightpen_nonpressed = pen_red, - pen_lightpen_pressed = pen_green -}; - -/* tape reader registers */ -struct tape_reader_t -{ - device_image_interface *fd; /* file descriptor of tape image */ - - int motor_on; /* 1-bit reader motor on */ - - int rb; /* 18-bit reader buffer */ - int rcl; /* 1-bit reader clutch */ - int rc; /* 2-bit reader counter */ - int rby; /* 1-bit reader binary mode flip-flop */ - int rcp; /* 1-bit reader "need a completion pulse" flip-flop */ - - emu_timer *timer; /* timer to simulate reader timing */ -}; - - - -/* tape puncher registers */ -struct tape_puncher_t -{ - device_image_interface *fd; /* file descriptor of tape image */ - - emu_timer *timer; /* timer to generate completion pulses */ -}; - - - -/* typewriter registers */ -struct typewriter_t -{ - device_image_interface *fd; /* file descriptor of output image */ - - int tb; /* typewriter buffer */ - - emu_timer *tyo_timer;/* timer to generate completion pulses */ -}; - -/* MIT parallel drum (mostly similar to type 23) */ -struct parallel_drum_t -{ - device_image_interface *fd; /* file descriptor of drum image */ - - int il; /* initial location (12-bit) */ - int wc; /* word counter (12-bit) */ - int wcl; /* word core location counter (16-bit) */ - int rfb; /* read field buffer (5-bit) */ - int wfb; /* write field buffer (5-bit) */ - - int dba; - - emu_timer *rotation_timer; /* timer called each time dc is 0 */ - emu_timer *il_timer; /* timer called each time dc is il */ -}; - - -struct lightpen_t -{ - char active; - char down; - short x, y; - short radius; -}; - - -class pdp1_state : public driver_device -{ -public: - pdp1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_crt(*this, "crt"), - m_spacewar(*this, "SPACEWAR"), - m_csw(*this, "CSW"), - m_sense(*this, "SENSE"), - m_tstadd(*this, "TSTADD"), - m_twdmsb(*this, "TWDMSB"), - m_twdlsb(*this, "TWDLSB"), - m_twr(*this, "TWR"), - m_cfg(*this, "CFG"), - m_io_lightpen(*this, "LIGHTPEN"), - m_lightx(*this, "LIGHTX"), - m_lighty(*this, "LIGHTY") - { } - - int m_io_status; - tape_reader_t m_tape_reader; - tape_puncher_t m_tape_puncher; - typewriter_t m_typewriter; - emu_timer *m_dpy_timer; - lightpen_t m_lightpen; - parallel_drum_t m_parallel_drum; - required_device m_maincpu; - - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(pdp1); - UINT32 screen_update_pdp1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_pdp1(screen_device &screen, bool state); - INTERRUPT_GEN_MEMBER(pdp1_interrupt); - TIMER_CALLBACK_MEMBER(reader_callback); - TIMER_CALLBACK_MEMBER(puncher_callback); - TIMER_CALLBACK_MEMBER(tyo_callback); - TIMER_CALLBACK_MEMBER(dpy_callback); - TIMER_CALLBACK_MEMBER(il_timer_callback); - void pdp1_machine_stop(); - inline void pdp1_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void pdp1_plot(int x, int y); - void pdp1_draw_led(bitmap_ind16 &bitmap, int x, int y, int state); - void pdp1_draw_multipleled(bitmap_ind16 &bitmap, int x, int y, int value, int nb_bits); - void pdp1_draw_switch(bitmap_ind16 &bitmap, int x, int y, int state); - void pdp1_draw_multipleswitch(bitmap_ind16 &bitmap, int x, int y, int value, int nb_bits); - void pdp1_draw_char(bitmap_ind16 &bitmap, char character, int x, int y, int color); - void pdp1_draw_string(bitmap_ind16 &bitmap, const char *buf, int x, int y, int color); - void pdp1_draw_panel_backdrop(bitmap_ind16 &bitmap); - void pdp1_draw_panel(bitmap_ind16 &bitmap); - void pdp1_typewriter_linefeed(); - void pdp1_typewriter_drawchar(int character); - void pdp1_update_lightpen_state(const lightpen_t *new_state); - void pdp1_draw_circle(bitmap_ind16 &bitmap, int x, int y, int radius, int color_); - void pdp1_erase_lightpen(bitmap_ind16 &bitmap); - void pdp1_draw_lightpen(bitmap_ind16 &bitmap); - int tape_read(UINT8 *reply); - void begin_tape_read(int binary, int nac); - void tape_write(UINT8 data); - void typewriter_out(UINT8 data); - void parallel_drum_set_il(int il); - void parallel_drum_init(); - UINT32 drum_read(int field, int position); - void drum_write(int field, int position, UINT32 data); - void pdp1_keyboard(); - void pdp1_lightpen(); - int read_spacewar() { return m_spacewar->read(); } - -private: - pdp1_reset_param_t m_reset_param; - int m_old_typewriter_keys[4]; - int m_old_lightpen; - int m_old_control_keys; - int m_old_tw_keys; - int m_old_ta_keys; - int m_typewriter_color; - bitmap_ind16 m_panel_bitmap; - bitmap_ind16 m_typewriter_bitmap; - lightpen_t m_lightpen_state; - lightpen_t m_previous_lightpen_state; - int m_pos; - int m_case_shift; - required_device m_gfxdecode; - required_device m_palette; - required_device m_crt; - required_ioport m_spacewar; - required_ioport m_csw; - required_ioport m_sense; - required_ioport m_tstadd; - required_ioport m_twdmsb; - required_ioport m_twdlsb; - required_ioport_array<4> m_twr; - required_ioport m_cfg; - required_ioport m_io_lightpen; - required_ioport m_lightx; - required_ioport m_lighty; -}; -#endif /* PDP1_H_ */ diff --git a/src/mess/includes/pecom.h b/src/mess/includes/pecom.h deleted file mode 100644 index 0cbe6111337..00000000000 --- a/src/mess/includes/pecom.h +++ /dev/null @@ -1,76 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -#ifndef __PECOM__ -#define __PECOM__ - -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "cdp1802" -#define CDP1869_TAG "cdp1869" - -#define PECOM_CHAR_RAM_SIZE 0x800 - -class pecom_state : public driver_device -{ -public: - pecom_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cdp1802(*this, CDP1802_TAG), - m_cdp1869(*this, CDP1869_TAG), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_io_cnt(*this, "CNT") { } - - required_device m_cdp1802; - required_device m_cdp1869; - - UINT8 *m_charram; /* character generator ROM */ - int m_reset; /* CPU mode */ - int m_dma; /* memory refresh DMA */ - - /* timers */ - emu_timer *m_reset_timer; /* power on reset timer */ - - DECLARE_READ8_MEMBER(pecom_cdp1869_charram_r); - DECLARE_WRITE8_MEMBER(pecom_cdp1869_charram_w); - DECLARE_READ8_MEMBER(pecom_cdp1869_pageram_r); - DECLARE_WRITE8_MEMBER(pecom_cdp1869_pageram_w); - DECLARE_WRITE8_MEMBER(pecom_bank_w); - DECLARE_READ8_MEMBER(pecom_keyboard_r); - DECLARE_WRITE8_MEMBER(pecom_cdp1869_w); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_VIDEO_START(pecom); - DECLARE_INPUT_CHANGED_MEMBER(ef_w); - TIMER_CALLBACK_MEMBER(reset_tick); - DECLARE_READ_LINE_MEMBER(clear_r); - DECLARE_READ_LINE_MEMBER(ef2_r); - DECLARE_WRITE_LINE_MEMBER(q_w); - DECLARE_WRITE8_MEMBER( sc_w ); - DECLARE_WRITE_LINE_MEMBER(pecom_prd_w); - CDP1869_CHAR_RAM_READ_MEMBER(pecom_char_ram_r); - CDP1869_CHAR_RAM_WRITE_MEMBER(pecom_char_ram_w); - CDP1869_PCB_READ_MEMBER(pecom_pcb_r); -protected: - required_device m_cassette; - required_device m_ram; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_ioport m_io_cnt; - ioport_port *m_io_ports[26]; -}; - -/* ---------- defined in video/pecom.c ---------- */ - -MACHINE_CONFIG_EXTERN( pecom_video ); - -#endif diff --git a/src/mess/includes/pes.h b/src/mess/includes/pes.h deleted file mode 100644 index 2130901cb3d..00000000000 --- a/src/mess/includes/pes.h +++ /dev/null @@ -1,55 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Jonathan Gevaryahu -/*************************************************************************** - - pes.h - -****************************************************************************/ - -#pragma once - -#ifndef _PES_H_ -#define _PES_H_ - -#include "machine/terminal.h" -#include "sound/tms5220.h" -#include "cpu/mcs51/mcs51.h" - -#define TERMINAL_TAG "terminal" - -class pes_state : public driver_device -{ -public: - pes_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_terminal(*this, TERMINAL_TAG), - m_speech(*this, "tms5220") - { - } - - required_device m_maincpu; - required_device m_terminal; - required_device m_speech; - - UINT8 m_wsstate; // /WS - UINT8 m_rsstate; // /RS - UINT8 m_port3_state; // Port3 state as last written - UINT8 m_infifo[32]; // input fifo - UINT8 m_infifo_tail_ptr; // " tail - UINT8 m_infifo_head_ptr; // " head - - virtual void machine_reset(); - DECLARE_WRITE8_MEMBER(rsws_w); - DECLARE_WRITE8_MEMBER(port1_w); - DECLARE_WRITE8_MEMBER(port3_w); - DECLARE_READ8_MEMBER(port1_r); - DECLARE_READ8_MEMBER(port3_r); - DECLARE_DRIVER_INIT(pes); - DECLARE_WRITE8_MEMBER(pes_kbd_input); - DECLARE_READ8_MEMBER(data_to_i8031); - DECLARE_WRITE8_MEMBER(data_from_i8031); -}; - - -#endif // _PES_H_ diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h deleted file mode 100644 index d4572a99c05..00000000000 --- a/src/mess/includes/pet.h +++ /dev/null @@ -1,284 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PET__ -#define __PET__ - -#include "emu.h" -#include "bus/ieee488/c8050.h" -#include "bus/ieee488/ieee488.h" -#include "bus/pet/cass.h" -#include "bus/pet/exp.h" -#include "bus/pet/user.h" -#include "cpu/m6502/m6502.h" -#include "machine/6522via.h" -#include "machine/6821pia.h" -#include "imagedev/snapquik.h" -#include "machine/pla.h" -#include "machine/ram.h" -#include "sound/speaker.h" -#include "video/mc6845.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define M6502_TAG "f3" -#define M6522_TAG "a5" -#define M6520_1_TAG "g8" -#define M6520_2_TAG "b8" -#define MC6845_TAG "ub13" -#define SCREEN_TAG "screen" -#define PLA1_TAG "ue6" -#define PLA2_TAG "ue5" -#define PET_USER_PORT_TAG "user" - -class pet_state : public driver_device -{ -public: - pet_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_via(*this, M6522_TAG), - m_pia1(*this, M6520_1_TAG), - m_pia2(*this, M6520_2_TAG), - m_crtc(*this, MC6845_TAG), - m_ieee(*this, IEEE488_TAG), - m_palette(*this, "palette"), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_cassette2(*this, PET_DATASSETTE_PORT2_TAG), - m_exp(*this, PET_EXPANSION_SLOT_TAG), - m_user(*this, PET_USER_PORT_TAG), - m_speaker(*this, "speaker"), - m_cart_9000(*this, "cart_9000"), - m_cart_a000(*this, "cart_a000"), - m_cart_b000(*this, "cart_b000"), - m_ram(*this, RAM_TAG), - m_rom(*this, M6502_TAG), - m_char_rom(*this, "charom"), - m_video_ram(*this, "video_ram"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_row8(*this, "ROW8"), - m_row9(*this, "ROW9"), - m_lock(*this, "LOCK"), - m_key(0), - m_sync(0), - m_graphic(0), - m_blanktv(0), - m_via_irq(CLEAR_LINE), - m_pia1a_irq(CLEAR_LINE), - m_pia1b_irq(CLEAR_LINE), - m_pia2a_irq(CLEAR_LINE), - m_pia2b_irq(CLEAR_LINE), - m_exp_irq(CLEAR_LINE), - m_user_diag(1) - { } - - required_device m_maincpu; - required_device m_via; - required_device m_pia1; - required_device m_pia2; - optional_device m_crtc; - required_device m_ieee; - required_device m_palette; - required_device m_cassette; - required_device m_cassette2; - required_device m_exp; - required_device m_user; - optional_device m_speaker; - optional_device m_cart_9000; - optional_device m_cart_a000; - optional_device m_cart_b000; - required_device m_ram; - required_memory_region m_rom; - required_memory_region m_char_rom; - optional_shared_ptr m_video_ram; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_ioport m_row8; - required_ioport m_row9; - required_ioport m_lock; - - DECLARE_MACHINE_START( pet ); - DECLARE_MACHINE_START( pet2001 ); - DECLARE_MACHINE_RESET( pet ); - DECLARE_MACHINE_START( pet40 ); - DECLARE_MACHINE_RESET( pet40 ); - - MC6845_BEGIN_UPDATE( pet_begin_update ); - MC6845_UPDATE_ROW( pet40_update_row ); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void check_interrupts(); - void update_speaker(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE_LINE_MEMBER( via_irq_w ); - DECLARE_WRITE8_MEMBER( via_pa_w ); - DECLARE_READ8_MEMBER( via_pb_r ); - DECLARE_WRITE8_MEMBER( via_pb_w ); - DECLARE_WRITE_LINE_MEMBER( via_ca2_w ); - DECLARE_WRITE_LINE_MEMBER( via_cb2_w ); - - DECLARE_WRITE_LINE_MEMBER( pia1_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( pia1_irqb_w ); - DECLARE_READ8_MEMBER( pia1_pa_r ); - DECLARE_READ8_MEMBER( pia1_pb_r ); - DECLARE_WRITE8_MEMBER( pia1_pa_w ); - DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w ); - - DECLARE_WRITE_LINE_MEMBER( pia2_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( pia2_irqb_w ); - - DECLARE_WRITE_LINE_MEMBER( user_diag_w ); - - TIMER_DEVICE_CALLBACK_MEMBER( sync_tick ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_pet ); - - enum - { - SEL0 = 0, - SEL1, - SEL2, - SEL3, - SEL4, - SEL5, - SEL6, - SEL7, - SEL8, - SEL9, - SELA, - SELB, - SELC, - SELD, - SELE, - SELF - }; - - // keyboard state - UINT8 m_key; - - // video state - int m_sync; - int m_graphic; - int m_blanktv; - int m_video_ram_size; - - // sound state - int m_via_cb2; - int m_pia1_pa7; - - UINT8 m_via_pa; - - // interrupt state - int m_via_irq; - int m_pia1a_irq; - int m_pia1b_irq; - int m_pia2a_irq; - int m_pia2b_irq; - int m_exp_irq; - int m_user_diag; -}; - - -class pet2001b_state : public pet_state -{ -public: - pet2001b_state(const machine_config &mconfig, device_type type, const char *tag) : - pet_state(mconfig, type, tag) - { } - - DECLARE_READ8_MEMBER( pia1_pb_r ); -}; - - -class pet80_state : public pet2001b_state -{ -public: - pet80_state(const machine_config &mconfig, device_type type, const char *tag) : - pet2001b_state(mconfig, type, tag) - { } - - DECLARE_MACHINE_START( pet80 ); - DECLARE_MACHINE_RESET( pet80 ); - - MC6845_UPDATE_ROW( pet80_update_row ); - MC6845_UPDATE_ROW( cbm8296_update_row ); -}; - - -class superpet_state : public pet80_state -{ -public: - superpet_state(const machine_config &mconfig, device_type type, const char *tag) - : pet80_state(mconfig, type, tag) - { } -}; - - -class cbm8096_state : public pet80_state -{ -public: - cbm8096_state(const machine_config &mconfig, device_type type, const char *tag) : - pet80_state(mconfig, type, tag) - { } -}; - - -class cbm8296_state : public pet80_state -{ -public: - cbm8296_state(const machine_config &mconfig, device_type type, const char *tag) : - pet80_state(mconfig, type, tag), - m_basic_rom(*this, "basic"), - m_editor_rom(*this, "editor"), - m_ue5_rom(*this, "ue5_eprom"), - m_ue6_rom(*this, "ue6_eprom"), - m_pla1(*this, PLA1_TAG), - m_pla2(*this, PLA2_TAG) - { } - - required_memory_region m_basic_rom; - required_memory_region m_editor_rom; - required_memory_region m_ue5_rom; - required_memory_region m_ue6_rom; - required_device m_pla1; - required_device m_pla2; - - DECLARE_MACHINE_START( cbm8296 ); - DECLARE_MACHINE_RESET( cbm8296 ); - - void read_pla1(offs_t offset, int phi2, int brw, int noscreen, int noio, int ramsela, int ramsel9, int ramon, int norom, - int &cswff, int &cs9, int &csa, int &csio, int &cse, int &cskb, int &fa12, int &casena1); - void read_pla2(offs_t offset, int phi2, int brw, int casena1, int &endra, int &noscreen, int &casena2, int &fa15); - - void read_pla1_eprom(offs_t offset, int phi2, int brw, int noscreen, int noio, int ramsela, int ramsel9, int ramon, int norom, - int &cswff, int &cs9, int &csa, int &csio, int &cse, int &cskb, int &fa12, int &casena1); - void read_pla2_eprom(offs_t offset, int phi2, int brw, int casena1, int &endra, int &noscreen, int &casena2, int &fa15); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - UINT8 m_cr; -}; - - - -#endif diff --git a/src/mess/includes/phc25.h b/src/mess/includes/phc25.h deleted file mode 100644 index 482a543b83b..00000000000 --- a/src/mess/includes/phc25.h +++ /dev/null @@ -1,59 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder, Robbbert -#pragma once - -#ifndef __PHC25__ -#define __PHC25__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "imagedev/cassette.h" -#include "sound/wave.h" -#include "machine/ram.h" -#include "bus/centronics/ctronics.h" -#include "video/mc6847.h" -#include "sound/ay8910.h" -#include "formats/phc25_cas.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define AY8910_TAG "ay8910" -#define MC6847_TAG "mc6847" -#define CENTRONICS_TAG "centronics" - -#define PHC25_VIDEORAM_SIZE 0x1800 - -class phc25_state : public driver_device -{ -public: - phc25_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_video_ram(*this, "video_ram") - , m_maincpu(*this, Z80_TAG) - , m_vdg(*this, MC6847_TAG) - , m_centronics(*this, CENTRONICS_TAG) - , m_cassette(*this, "cassette") - { } - - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_READ8_MEMBER( port40_r ); - DECLARE_WRITE8_MEMBER( port40_w ); - DECLARE_WRITE_LINE_MEMBER(irq_w); - DECLARE_READ8_MEMBER( video_ram_r ); - MC6847_GET_CHARROM_MEMBER(ntsc_char_rom_r); - MC6847_GET_CHARROM_MEMBER(pal_char_rom_r); - -private: - virtual void video_start(); - UINT8 *m_char_rom; - UINT8 m_port40; - required_shared_ptr m_video_ram; - required_device m_maincpu; - required_device m_vdg; - required_device m_centronics; - required_device m_cassette; - int m_centronics_busy; -}; - -#endif diff --git a/src/mess/includes/pk8020.h b/src/mess/includes/pk8020.h deleted file mode 100644 index e73fa870187..00000000000 --- a/src/mess/includes/pk8020.h +++ /dev/null @@ -1,108 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/pk8020.h - * - ****************************************************************************/ - -#ifndef PK8020_H_ -#define PK8020_H_ - -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/i8251.h" -#include "machine/wd_fdc.h" -#include "imagedev/cassette.h" -#include "sound/speaker.h" -#include "sound/wave.h" -#include "machine/ram.h" - - -class pk8020_state : public driver_device -{ -public: - pk8020_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ppi8255_1(*this, "ppi8255_1"), - m_ppi8255_2(*this, "ppi8255_2"), - m_ppi8255_3(*this, "ppi8255_3"), - m_rs232(*this, "rs232"), - m_lan(*this, "lan"), - m_ram(*this, RAM_TAG), - m_wd1793(*this, "wd1793"), - m_floppy0(*this, "wd1793:0"), - m_floppy1(*this, "wd1793:1"), - m_floppy2(*this, "wd1793:2"), - m_floppy3(*this, "wd1793:3"), - m_pit8253(*this, "pit8253"), - m_pic8259(*this, "pic8259"), - m_speaker(*this, "speaker"), - m_region_maincpu(*this, "maincpu"), - m_region_gfx1(*this, "gfx1"), - m_palette(*this, "palette") { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - UINT8 m_color; - UINT8 m_video_page; - UINT8 m_wide; - UINT8 m_font; - UINT8 m_attr; - UINT8 m_text_attr; - UINT8 m_takt; - UINT8 m_video_page_access; - UINT8 m_portc_data; - UINT8 m_sound_gate; - UINT8 m_sound_level; - DECLARE_READ8_MEMBER(keyboard_r); - DECLARE_READ8_MEMBER(sysreg_r); - DECLARE_WRITE8_MEMBER(sysreg_w); - DECLARE_READ8_MEMBER(text_r); - DECLARE_WRITE8_MEMBER(text_w); - DECLARE_READ8_MEMBER(gzu_r); - DECLARE_WRITE8_MEMBER(gzu_w); - DECLARE_READ8_MEMBER(devices_r); - DECLARE_WRITE8_MEMBER(devices_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(pk8020); - UINT32 screen_update_pk8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(pk8020_interrupt); - DECLARE_READ8_MEMBER(pk8020_porta_r); - DECLARE_WRITE8_MEMBER(pk8020_portc_w); - DECLARE_WRITE8_MEMBER(pk8020_portb_w); - DECLARE_READ8_MEMBER(pk8020_portc_r); - DECLARE_WRITE8_MEMBER(pk8020_2_portc_w); - DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out0); - DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out1); - DECLARE_WRITE_LINE_MEMBER(pk8020_pic_set_int_line); - IRQ_CALLBACK_MEMBER(pk8020_irq_callback); - -protected: - required_device m_maincpu; - required_device m_ppi8255_1; - required_device m_ppi8255_2; - required_device m_ppi8255_3; - required_device m_rs232; - required_device m_lan; - required_device m_ram; - required_device m_wd1793; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_pit8253; - required_device m_pic8259; - required_device m_speaker; - required_memory_region m_region_maincpu; - required_memory_region m_region_gfx1; - ioport_port *m_io_port[16]; - required_device m_palette; - void pk8020_set_bank(UINT8 data); -}; - -#endif /* pk8020_H_ */ diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h deleted file mode 100644 index adadf6e19ec..00000000000 --- a/src/mess/includes/plus4.h +++ /dev/null @@ -1,176 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PLUS4__ -#define __PLUS4__ - -#include "emu.h" -#include "bus/cbmiec/cbmiec.h" -#include "bus/pet/cass.h" -#include "bus/plus4/exp.h" -#include "bus/plus4/user.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "cpu/m6502/m7501.h" -#include "imagedev/snapquik.h" -#include "machine/mos6529.h" -#include "machine/mos6551.h" -#include "machine/mos8706.h" -#include "machine/pla.h" -#include "machine/ram.h" -#include "sound/mos7360.h" - -#define MOS7501_TAG "u2" -#define MOS7360_TAG "u1" -#define MOS6551_TAG "u3" -#define MOS6529_USER_TAG "u5" -#define MOS6529_KB_TAG "u27" -#define T6721A_TAG "t6721a" -#define MOS8706_TAG "mos8706" -#define PLA_TAG "u19" -#define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" -#define PET_USER_PORT_TAG "user" - -class plus4_state : public driver_device -{ -public: - plus4_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, MOS7501_TAG), - m_pla(*this, PLA_TAG), - m_ted(*this, MOS7360_TAG), - m_acia(*this, MOS6551_TAG), - m_spi_user(*this, MOS6529_USER_TAG), - m_spi_kb(*this, MOS6529_KB_TAG), - m_vslsi(*this, MOS8706_TAG), - m_iec(*this, CBM_IEC_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_exp(*this, PLUS4_EXPANSION_SLOT_TAG), - m_user(*this, PET_USER_PORT_TAG), - m_ram(*this, RAM_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_kernal(*this, "kernal"), - m_function(*this, "function"), - m_c2(*this, "c2"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_lock(*this, "LOCK"), - m_addr(0), - m_ted_irq(CLEAR_LINE), - m_acia_irq(CLEAR_LINE), - m_exp_irq(CLEAR_LINE) - { } - - required_device m_maincpu; - required_device m_pla; - required_device m_ted; - optional_device m_acia; - optional_device m_spi_user; - required_device m_spi_kb; - optional_device m_vslsi; - required_device m_iec; - required_device m_joy1; - required_device m_joy2; - required_device m_exp; - optional_device m_user; - required_device m_ram; - required_device m_cassette; - required_memory_region m_kernal; - optional_memory_region m_function; - optional_memory_region m_c2; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_ioport m_lock; - - virtual void machine_start(); - virtual void machine_reset(); - - void check_interrupts(); - void bankswitch(offs_t offset, int phi0, int mux, int ras, int *scs, int *phi2, int *user, int *_6551, int *addr_clk, int *keyport, int *kernal); - UINT8 read_memory(address_space &space, offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal); - UINT8 read_keyboard(UINT8 databus); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( ted_videoram_r ); - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); - - DECLARE_WRITE_LINE_MEMBER( ted_irq_w ); - DECLARE_READ8_MEMBER( ted_ram_r ); - DECLARE_READ8_MEMBER( ted_rom_r ); - DECLARE_READ8_MEMBER( ted_k_r ); - - DECLARE_WRITE_LINE_MEMBER( write_kb0 ) { if (state) m_kb |= 1; else m_kb &= ~1; } - DECLARE_WRITE_LINE_MEMBER( write_kb1 ) { if (state) m_kb |= 2; else m_kb &= ~2; } - DECLARE_WRITE_LINE_MEMBER( write_kb2 ) { if (state) m_kb |= 4; else m_kb &= ~4; } - DECLARE_WRITE_LINE_MEMBER( write_kb3 ) { if (state) m_kb |= 8; else m_kb &= ~8; } - DECLARE_WRITE_LINE_MEMBER( write_kb4 ) { if (state) m_kb |= 16; else m_kb &= ~16; } - DECLARE_WRITE_LINE_MEMBER( write_kb5 ) { if (state) m_kb |= 32; else m_kb &= ~32; } - DECLARE_WRITE_LINE_MEMBER( write_kb6 ) { if (state) m_kb |= 64; else m_kb &= ~64; } - DECLARE_WRITE_LINE_MEMBER( write_kb7 ) { if (state) m_kb |= 128; else m_kb &= ~128; } - - DECLARE_WRITE_LINE_MEMBER( acia_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( exp_irq_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c16 ); - - enum - { - CS0_BASIC = 0, - CS0_FUNCTION_LO, - CS0_C1_LOW, - CS0_C2_LOW - }; - - enum - { - CS1_KERNAL = 0, - CS1_FUNCTION_HI, - CS1_C1_HIGH, - CS1_C2_HIGH - }; - - // memory state - UINT8 m_addr; - - // interrupt state - int m_ted_irq; - int m_acia_irq; - int m_exp_irq; - - // keyboard state - UINT8 m_kb; -}; - - -class c16_state : public plus4_state -{ -public: - c16_state(const machine_config &mconfig, device_type type, const char *tag) - : plus4_state(mconfig, type, tag) - { } - - DECLARE_READ8_MEMBER( cpu_r ); -}; - - - -#endif diff --git a/src/mess/includes/pmd85.h b/src/mess/includes/pmd85.h deleted file mode 100644 index 07d9986994b..00000000000 --- a/src/mess/includes/pmd85.h +++ /dev/null @@ -1,155 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha -/***************************************************************************** - * - * includes/pmd85.h - * - ****************************************************************************/ - -#ifndef PMD85_H_ -#define PMD85_H_ - -#include "machine/i8251.h" -#include "machine/pit8253.h" -#include "machine/i8255.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - - -class pmd85_state : public driver_device -{ -public: - enum - { - TIMER_CASSETTE - }; - - pmd85_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_cassette(*this, "cassette"), - m_pit8253(*this, "pit8253"), - m_uart(*this, "uart"), - m_ppi8255_0(*this, "ppi8255_0"), - m_ppi8255_1(*this, "ppi8255_1"), - m_ppi8255_2(*this, "ppi8255_2"), - m_ppi8255_3(*this, "ppi8255_3"), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_bank7(*this, "bank7"), - m_bank8(*this, "bank8"), - m_bank9(*this, "bank9"), - m_bank10(*this, "bank10"), - m_bank11(*this, "bank11"), - m_bank12(*this, "bank12"), - m_bank13(*this, "bank13"), - m_bank14(*this, "bank14"), - m_bank15(*this, "bank15"), - m_bank16(*this, "bank16"), - m_io_dsw0(*this, "DSW0"), - m_palette(*this, "palette") { } - - UINT8 m_rom_module_present; - UINT8 m_ppi_port_outputs[4][3]; - UINT8 m_startup_mem_map; - UINT8 m_pmd853_memory_mapping; - int m_previous_level; - int m_clk_level; - int m_clk_level_tape; - UINT8 m_model; - emu_timer * m_cassette_timer; - void (pmd85_state::*update_memory)(); - DECLARE_READ8_MEMBER(pmd85_io_r); - DECLARE_WRITE8_MEMBER(pmd85_io_w); - DECLARE_READ8_MEMBER(mato_io_r); - DECLARE_WRITE8_MEMBER(mato_io_w); - DECLARE_DRIVER_INIT(mato); - DECLARE_DRIVER_INIT(pmd852a); - DECLARE_DRIVER_INIT(pmd851); - DECLARE_DRIVER_INIT(pmd853); - DECLARE_DRIVER_INIT(alfa); - DECLARE_DRIVER_INIT(c2717); - virtual void machine_reset(); - UINT32 screen_update_pmd85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(pmd85_cassette_timer_callback); - DECLARE_WRITE_LINE_MEMBER(write_cas_tx); - DECLARE_READ8_MEMBER(pmd85_ppi_0_porta_r); - DECLARE_READ8_MEMBER(pmd85_ppi_0_portb_r); - DECLARE_READ8_MEMBER(pmd85_ppi_0_portc_r); - DECLARE_WRITE8_MEMBER(pmd85_ppi_0_porta_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_0_portb_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_0_portc_w); - DECLARE_READ8_MEMBER(mato_ppi_0_portb_r); - DECLARE_READ8_MEMBER(mato_ppi_0_portc_r); - DECLARE_WRITE8_MEMBER(mato_ppi_0_portc_w); - DECLARE_READ8_MEMBER(pmd85_ppi_1_porta_r); - DECLARE_READ8_MEMBER(pmd85_ppi_1_portb_r); - DECLARE_READ8_MEMBER(pmd85_ppi_1_portc_r); - DECLARE_WRITE8_MEMBER(pmd85_ppi_1_porta_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_1_portb_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_1_portc_w); - DECLARE_READ8_MEMBER(pmd85_ppi_2_porta_r); - DECLARE_READ8_MEMBER(pmd85_ppi_2_portb_r); - DECLARE_READ8_MEMBER(pmd85_ppi_2_portc_r); - DECLARE_WRITE8_MEMBER(pmd85_ppi_2_porta_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_2_portb_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_2_portc_w); - DECLARE_READ8_MEMBER(pmd85_ppi_3_porta_r); - DECLARE_READ8_MEMBER(pmd85_ppi_3_portb_r); - DECLARE_READ8_MEMBER(pmd85_ppi_3_portc_r); - DECLARE_WRITE8_MEMBER(pmd85_ppi_3_porta_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_3_portb_w); - DECLARE_WRITE8_MEMBER(pmd85_ppi_3_portc_w); - DECLARE_INPUT_CHANGED_MEMBER(pmd85_reset); - -protected: - required_device m_maincpu; - required_device m_ram; - required_device m_cassette; - required_device m_pit8253; - optional_device m_uart; - optional_device m_ppi8255_0; - optional_device m_ppi8255_1; - optional_device m_ppi8255_2; - optional_device m_ppi8255_3; - required_memory_region m_region_maincpu; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - optional_memory_bank m_bank5; - optional_memory_bank m_bank6; - optional_memory_bank m_bank7; - optional_memory_bank m_bank8; - optional_memory_bank m_bank9; - optional_memory_bank m_bank10; - optional_memory_bank m_bank11; - optional_memory_bank m_bank12; - optional_memory_bank m_bank13; - optional_memory_bank m_bank14; - optional_memory_bank m_bank15; - optional_memory_bank m_bank16; - optional_ioport m_io_dsw0; - ioport_port *m_io_port[16]; - required_device m_palette; - - void pmd851_update_memory(); - void pmd852a_update_memory(); - void pmd853_update_memory(); - void alfa_update_memory(); - void mato_update_memory(); - void c2717_update_memory(); - void pmd85_common_driver_init(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - int m_cas_tx; -}; - - -#endif /* PMD85_H_ */ diff --git a/src/mess/includes/pocketc.h b/src/mess/includes/pocketc.h deleted file mode 100644 index 5edc361dc70..00000000000 --- a/src/mess/includes/pocketc.h +++ /dev/null @@ -1,26 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/pocketc.h - * - ****************************************************************************/ - -#ifndef POCKETC_H_ -#define POCKETC_H_ - -typedef const char *POCKETC_FIGURE[]; - -class pocketc_state : public driver_device -{ -public: - pocketc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } - - DECLARE_PALETTE_INIT(pocketc); - - static const unsigned short pocketc_colortable[8][2]; - void pocketc_draw_special(bitmap_ind16 &bitmap,int x, int y, const POCKETC_FIGURE fig, int color); -}; - -#endif /* POCKETC_H_ */ diff --git a/src/mess/includes/poisk1.h b/src/mess/includes/poisk1.h deleted file mode 100644 index 023b4d5afd9..00000000000 --- a/src/mess/includes/poisk1.h +++ /dev/null @@ -1,101 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sergey Svishchev -/***************************************************************************** - * - * includes/poisk1.h - * - ****************************************************************************/ - -#ifndef POISK1_H_ -#define POISK1_H_ - -#include "imagedev/cassette.h" -#include "machine/i8255.h" -#include "bus/isa/isa.h" -#include "machine/pic8259.h" -#include "machine/pit8253.h" -#include "machine/ram.h" -#include "bus/isa/xsu_cards.h" -#include "sound/speaker.h" - -#define POISK1_UPDATE_ROW(name) \ - void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride) - -class p1_state : public driver_device -{ -public: - p1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pic8259(*this, "pic8259"), - m_pit8253(*this, "pit8253"), - m_ppi8255n1(*this, "ppi8255n1"), - m_ppi8255n2(*this, "ppi8255n2"), - m_isabus(*this, "isa"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") { } - - required_device m_maincpu; - required_device m_pic8259; - required_device m_pit8253; - required_device m_ppi8255n1; - required_device m_ppi8255n2; - required_device m_isabus; - required_device m_speaker; - required_device m_cassette; - required_device m_ram; - - DECLARE_DRIVER_INIT(poisk1); - DECLARE_MACHINE_START(poisk1); - DECLARE_MACHINE_RESET(poisk1); - - DECLARE_PALETTE_INIT(p1); - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void set_palette_luts(); - POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row); - POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row); - POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row); - - DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed); - DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata); - UINT8 m_p1_spkrdata; - UINT8 m_p1_input; - - UINT8 m_kbpoll_mask; - - struct - { - UINT8 trap[4]; - UINT8 *videoram_base; - UINT8 *videoram; - UINT8 mode_control_6a; - UINT8 color_select_68; - UINT8 palette_lut_2bpp[4]; - int stride; - void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride); - } m_video; - - DECLARE_READ8_MEMBER(p1_trap_r); - DECLARE_WRITE8_MEMBER(p1_trap_w); - DECLARE_READ8_MEMBER(p1_cga_r); - DECLARE_WRITE8_MEMBER(p1_cga_w); - DECLARE_WRITE8_MEMBER(p1_vram_w); - - DECLARE_READ8_MEMBER(p1_ppi_r); - DECLARE_WRITE8_MEMBER(p1_ppi_w); - DECLARE_WRITE8_MEMBER(p1_ppi_porta_w); - DECLARE_READ8_MEMBER(p1_ppi_porta_r); - DECLARE_READ8_MEMBER(p1_ppi_portb_r); - DECLARE_READ8_MEMBER(p1_ppi_portc_r); - DECLARE_WRITE8_MEMBER(p1_ppi_portc_w); - DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w); - DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w); - DECLARE_READ8_MEMBER(p1_ppi2_portc_r); - required_device m_palette; - const char *m_cputag; -}; - -#endif /* POISK1_H_ */ diff --git a/src/mess/includes/poly88.h b/src/mess/includes/poly88.h deleted file mode 100644 index 1cdc53463b6..00000000000 --- a/src/mess/includes/poly88.h +++ /dev/null @@ -1,85 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/poly88.h - * - ****************************************************************************/ - -#ifndef POLY88_H_ -#define POLY88_H_ - -#include "machine/i8251.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" - -class poly88_state : public driver_device -{ -public: - enum - { - TIMER_USART, - TIMER_KEYBOARD, - TIMER_CASSETTE - }; - - poly88_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_uart(*this, "uart"), - m_cassette(*this, "cassette"), - m_linec(*this, "LINEC"), - m_line0(*this, "LINE0"), - m_line1(*this, "LINE1"), - m_line2(*this, "LINE2"), - m_line3(*this, "LINE3"), - m_line4(*this, "LINE4"), - m_line5(*this, "LINE5"), - m_line6(*this, "LINE6") { } - - required_shared_ptr m_video_ram; - UINT8 *m_FNT; - UINT8 m_intr; - UINT8 m_last_code; - UINT8 m_int_vector; - emu_timer * m_cassette_timer; - emu_timer * m_usart_timer; - int m_previous_level; - int m_clk_level; - int m_clk_level_tape; - DECLARE_WRITE8_MEMBER(poly88_baud_rate_w); - DECLARE_READ8_MEMBER(poly88_keyboard_r); - DECLARE_WRITE8_MEMBER(poly88_intr_w); - DECLARE_DRIVER_INIT(poly88); - virtual void machine_reset(); - virtual void video_start(); - UINT32 screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(poly88_interrupt); - TIMER_CALLBACK_MEMBER(poly88_usart_timer_callback); - TIMER_CALLBACK_MEMBER(keyboard_callback); - TIMER_CALLBACK_MEMBER(poly88_cassette_timer_callback); - DECLARE_WRITE_LINE_MEMBER(write_cas_tx); - DECLARE_WRITE_LINE_MEMBER(poly88_usart_rxready); - IRQ_CALLBACK_MEMBER(poly88_irq_callback); - DECLARE_SNAPSHOT_LOAD_MEMBER( poly88 ); - -protected: - required_device m_maincpu; - required_device m_uart; - required_device m_cassette; - required_ioport m_linec; - required_ioport m_line0; - required_ioport m_line1; - required_ioport m_line2; - required_ioport m_line3; - required_ioport m_line4; - required_ioport m_line5; - required_ioport m_line6; - UINT8 row_number(UINT8 code); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - int m_cas_tx; -}; - -#endif /* POLY88_H_ */ diff --git a/src/mess/includes/poly880.h b/src/mess/includes/poly880.h deleted file mode 100644 index b92ed0a92f4..00000000000 --- a/src/mess/includes/poly880.h +++ /dev/null @@ -1,59 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __POLY880__ -#define __POLY880__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "imagedev/cassette.h" -#include "machine/z80pio.h" -#include "machine/z80ctc.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "i1" -#define Z80CTC_TAG "i4" -#define Z80PIO1_TAG "i2" -#define Z80PIO2_TAG "i3" - -class poly880_state : public driver_device -{ -public: - poly880_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_cassette(*this, "cassette"), - m_ki1(*this, "KI1"), - m_ki2(*this, "KI2"), - m_ki3(*this, "KI3") - { } - - required_device m_maincpu; - required_device m_cassette; - required_ioport m_ki1; - required_ioport m_ki2; - required_ioport m_ki3; - - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( cldig_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z0_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z1_w ); - DECLARE_WRITE8_MEMBER( pio1_pa_w ); - DECLARE_READ8_MEMBER( pio1_pb_r ); - DECLARE_WRITE8_MEMBER( pio1_pb_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - - void update_display(); - - /* display state */ - UINT8 m_digit; - UINT8 m_segment; -}; - -#endif diff --git a/src/mess/includes/portfoli.h b/src/mess/includes/portfoli.h deleted file mode 100644 index e02a206f0e4..00000000000 --- a/src/mess/includes/portfoli.h +++ /dev/null @@ -1,123 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PORTFOLIO__ -#define __PORTFOLIO__ - -#include "emu.h" -#include "cpu/i86/i86.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8255.h" -#include "machine/ins8250.h" -#include "machine/nvram.h" -#include "machine/ram.h" -#include "sound/speaker.h" -#include "video/hd61830.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define M80C88A_TAG "u1" -#define M82C55A_TAG "hpc101_u1" -#define M82C50A_TAG "hpc102_u1" -#define HD61830_TAG "hd61830" -#define CENTRONICS_TAG "centronics" -#define TIMER_TICK_TAG "tick" -#define SCREEN_TAG "screen" -#define RS232_TAG "rs232" - -class portfolio_state : public driver_device -{ -public: - portfolio_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M80C88A_TAG), - m_lcdc(*this, HD61830_TAG), - m_ppi(*this, M82C55A_TAG), - m_uart(*this, M82C50A_TAG), - m_speaker(*this, "speaker"), - m_timer_tick(*this, TIMER_TICK_TAG), - m_rom(*this, M80C88A_TAG), - m_char_rom(*this, HD61830_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_battery(*this, "BATTERY"), - m_contrast(*this, "contrast"), - m_ram(*this, RAM_TAG) - { } - - required_device m_maincpu; - required_device m_lcdc; - required_device m_ppi; - required_device m_uart; - required_device m_speaker; - required_device m_timer_tick; - required_region_ptr m_rom; - required_region_ptr m_char_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_battery; - - virtual void machine_start(); - virtual void machine_reset(); - - void check_interrupt(); - void trigger_interrupt(int level); - void scan_keyboard(); - - DECLARE_READ8_MEMBER( irq_status_r ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_READ8_MEMBER( battery_r ); - DECLARE_READ8_MEMBER( counter_r ); - DECLARE_READ8_MEMBER( pid_r ); - - DECLARE_WRITE8_MEMBER( irq_mask_w ); - DECLARE_WRITE8_MEMBER( sivr_w ); - DECLARE_WRITE8_MEMBER( speaker_w ); - DECLARE_WRITE8_MEMBER( power_w ); - DECLARE_WRITE8_MEMBER( unknown_w ); - DECLARE_WRITE8_MEMBER( counter_w ); - DECLARE_WRITE8_MEMBER( ncc1_w ); - - DECLARE_WRITE_LINE_MEMBER( i8250_intrpt_w ); - - /* interrupt state */ - UINT8 m_ip; /* interrupt pending */ - UINT8 m_ie; /* interrupt enable */ - UINT8 m_sivr; /* serial interrupt vector register */ - - /* counter state */ - UINT16 m_counter; - - /* keyboard state */ - UINT8 m_keylatch; - - /* video state */ - required_shared_ptr m_contrast; - - /* peripheral state */ - UINT8 m_pid; /* peripheral identification */ - DECLARE_PALETTE_INIT(portfolio); - TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); - TIMER_DEVICE_CALLBACK_MEMBER(system_tick); - TIMER_DEVICE_CALLBACK_MEMBER(counter_tick); - DECLARE_READ8_MEMBER(hd61830_rd_r); - IRQ_CALLBACK_MEMBER(portfolio_int_ack); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( portfolio_cart ); - required_device m_ram; -}; - -#endif diff --git a/src/mess/includes/pp01.h b/src/mess/includes/pp01.h deleted file mode 100644 index d405563bcdc..00000000000 --- a/src/mess/includes/pp01.h +++ /dev/null @@ -1,66 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/pp01.h - * - ****************************************************************************/ - -#ifndef PP01_H_ -#define PP01_H_ - -#include "emu.h" -#include "cpu/i8085/i8085.h" -#include "machine/ram.h" -#include "machine/i8251.h" -#include "machine/pit8253.h" -#include "machine/i8255.h" -#include "sound/speaker.h" -//#include "sound/wave.h" -//#include "imagedev/cassette.h" - -class pp01_state : public driver_device -{ -public: - pp01_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pit(*this, "pit8253"), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG) { } - - required_device m_maincpu; - required_device m_pit; - required_device m_speaker; - required_device m_ram; - UINT8 m_video_scroll; - UINT8 m_memory_block[16]; - UINT8 m_video_write_mode; - UINT8 m_key_line; - DECLARE_WRITE8_MEMBER(pp01_video_write_mode_w); - DECLARE_WRITE8_MEMBER(pp01_video_r_1_w); - DECLARE_WRITE8_MEMBER(pp01_video_g_1_w); - DECLARE_WRITE8_MEMBER(pp01_video_b_1_w); - DECLARE_WRITE8_MEMBER(pp01_video_r_2_w); - DECLARE_WRITE8_MEMBER(pp01_video_g_2_w); - DECLARE_WRITE8_MEMBER(pp01_video_b_2_w); - DECLARE_WRITE8_MEMBER(pp01_mem_block_w); - DECLARE_READ8_MEMBER(pp01_mem_block_r); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(pp01); - UINT32 screen_update_pp01(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(pp01_pit_out0); - DECLARE_WRITE_LINE_MEMBER(pp01_pit_out1); - DECLARE_READ8_MEMBER(pp01_8255_porta_r); - DECLARE_WRITE8_MEMBER(pp01_8255_porta_w); - DECLARE_READ8_MEMBER(pp01_8255_portb_r); - DECLARE_WRITE8_MEMBER(pp01_8255_portb_w); - DECLARE_WRITE8_MEMBER(pp01_8255_portc_w); - DECLARE_READ8_MEMBER(pp01_8255_portc_r); - void pp01_video_w(UINT8 block,UINT16 offset,UINT8 data,UINT8 part); - void pp01_set_memory(UINT8 block, UINT8 data); -}; - -#endif diff --git a/src/mess/includes/primo.h b/src/mess/includes/primo.h deleted file mode 100644 index ef58558bc7f..00000000000 --- a/src/mess/includes/primo.h +++ /dev/null @@ -1,70 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha -/***************************************************************************** - * - * includes/primo.h - * - ****************************************************************************/ - -#ifndef PRIMO_H_ -#define PRIMO_H_ - -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "bus/cbmiec/cbmiec.h" -#include "sound/speaker.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -class primo_state : public driver_device -{ -public: - primo_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_iec(*this, CBM_IEC_TAG), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_cart1(*this, "cartslot1"), - m_cart2(*this, "cartslot2") - { } - - required_device m_maincpu; - required_device m_iec; - required_device m_speaker; - required_device m_cassette; - required_device m_cart1; - required_device m_cart2; - - memory_region *m_cart1_rom; - memory_region *m_cart2_rom; - - UINT16 m_video_memory_base; - UINT8 m_port_FD; - int m_nmi; - DECLARE_READ8_MEMBER(primo_be_1_r); - DECLARE_READ8_MEMBER(primo_be_2_r); - DECLARE_WRITE8_MEMBER(primo_ki_1_w); - DECLARE_WRITE8_MEMBER(primo_ki_2_w); - DECLARE_WRITE8_MEMBER(primo_FD_w); - DECLARE_DRIVER_INIT(primo48); - DECLARE_DRIVER_INIT(primo64); - DECLARE_DRIVER_INIT(primo32); - virtual void machine_reset(); - virtual void machine_start(); - DECLARE_MACHINE_RESET(primob); - UINT32 screen_update_primo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(primo_vblank_interrupt); - void primo_draw_scanline(bitmap_ind16 &bitmap, int primo_scanline); - void primo_update_memory(); - void primo_common_driver_init (primo_state *state); - void primo_common_machine_init (); - void primo_setup_pss (UINT8* snapshot_data, UINT32 snapshot_size); - void primo_setup_pp (UINT8* quickload_data, UINT32 quickload_size); - DECLARE_SNAPSHOT_LOAD_MEMBER( primo ); - DECLARE_QUICKLOAD_LOAD_MEMBER( primo ); -}; - - -#endif /* PRIMO_H_ */ diff --git a/src/mess/includes/prof180x.h b/src/mess/includes/prof180x.h deleted file mode 100644 index 0c38e6d183f..00000000000 --- a/src/mess/includes/prof180x.h +++ /dev/null @@ -1,48 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PROF180X__ -#define __PROF180X__ - -#define HD64180_TAG "hd64180" -#define FDC9268_TAG "fdc9268" -#define FDC9229_TAG "fdc9229" -#define MK3835_TAG "mk3835" -#define SCREEN_TAG "screen" -#define CENTRONICS_TAG "centronics" - -class prof180x_state : public driver_device -{ -public: - prof180x_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_centronics(*this, CENTRONICS_TAG) - { - } - - required_device m_centronics; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE8_MEMBER( flr_w ); - DECLARE_READ8_MEMBER( status0_r ); - DECLARE_READ8_MEMBER( status1_r ); - DECLARE_READ8_MEMBER( status_r ); - - void ls259_w(int flag, int value); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - int m_c0; - int m_c1; - int m_c2; - int m_mm0; - int m_mm1; -}; - -#endif diff --git a/src/mess/includes/prof80.h b/src/mess/includes/prof80.h deleted file mode 100644 index 5a48f376196..00000000000 --- a/src/mess/includes/prof80.h +++ /dev/null @@ -1,98 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __PROF80__ -#define __PROF80__ - -#include "bus/ecbbus/ecbbus.h" -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/prof80mmu.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "machine/upd1990a.h" -#include "machine/upd765.h" - -#define Z80_TAG "z1" -#define MMU_TAG "mmu" -#define UPD765_TAG "z38" -#define UPD1990A_TAG "z43" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -// ------------------------------------------------------------------------ - -#define UNIO_Z80STI_TAG "z5" -#define UNIO_Z80SIO_TAG "z15" -#define UNIO_Z80PIO_TAG "z13" -#define UNIO_CENTRONICS1_TAG "n3" -#define UNIO_CENTRONICS2_TAG "n4" - -class prof80_state : public driver_device -{ -public: - prof80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_mmu(*this, MMU_TAG), - m_rtc(*this, UPD1990A_TAG), - m_fdc(*this, UPD765_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG":0"), - m_floppy1(*this, UPD765_TAG":1"), - m_ecb(*this, ECBBUS_TAG), - m_rs232a(*this, RS232_A_TAG), - m_rs232b(*this, RS232_B_TAG), - m_rom(*this, Z80_TAG), - m_j4(*this, "J4"), - m_j5(*this, "J5") - { } - - required_device m_maincpu; - required_device m_mmu; - required_device m_rtc; - required_device m_fdc; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_ecb; - required_device m_rs232a; - required_device m_rs232b; - required_memory_region m_rom; - required_ioport m_j4; - required_ioport m_j5; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void machine_reset(); - - enum - { - TIMER_ID_MOTOR - }; - - DECLARE_WRITE8_MEMBER( flr_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_READ8_MEMBER( status2_r ); - - void ls259_w(int fa, int sa, int fb, int sb); - void motor(int mon); - - // RTC state - int m_c0; - int m_c1; - int m_c2; - - // floppy state - int m_motor; - int m_ready; - int m_select; - - // timers - emu_timer *m_floppy_motor_off_timer; - -}; - -#endif diff --git a/src/mess/includes/psion.h b/src/mess/includes/psion.h deleted file mode 100644 index 65d5648f601..00000000000 --- a/src/mess/includes/psion.h +++ /dev/null @@ -1,104 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/*************************************************************************** - - Psion Organiser II series - -****************************************************************************/ - -#pragma once - -#ifndef _PSION_H_ -#define _PSION_H_ - -#include "cpu/m6800/m6800.h" -#include "machine/nvram.h" -#include "machine/psion_pack.h" -#include "video/hd44780.h" -#include "sound/beep.h" - - -// ======================> psion_state - -class psion_state : public driver_device -{ -public: - psion_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_lcdc(*this, "hd44780"), - m_beep(*this, "beeper"), - m_pack1(*this, "pack1"), - m_pack2(*this, "pack2"), - m_nvram1(*this, "nvram1"), - m_nvram2(*this, "nvram2"), - m_nvram3(*this, "nvram3"), - m_sys_register(*this, "sys_register"), - m_stby_pwr(1), - m_ram(*this, "ram"){ } - - required_device m_maincpu; - required_device m_lcdc; - required_device m_beep; - required_device m_pack1; - required_device m_pack2; - required_device m_nvram1; - required_device m_nvram2; - optional_device m_nvram3; - - UINT16 m_kb_counter; - UINT8 m_enable_nmi; - optional_shared_ptr m_sys_register; - UINT8 m_tcsr_value; - UINT8 m_stby_pwr; - UINT8 m_pulse; - - UINT8 m_port2_ddr; // datapack i/o ddr - UINT8 m_port2; // datapack i/o data bus - UINT8 m_port6_ddr; // datapack control lines ddr - UINT8 m_port6; // datapack control lines - - // RAM/ROM banks - required_shared_ptr m_ram; - UINT8 *m_paged_ram; - UINT8 m_rom_bank; - UINT8 m_ram_bank; - UINT8 m_ram_bank_count; - UINT8 m_rom_bank_count; - - virtual void machine_start(); - virtual void machine_reset(); - void nvram_init(nvram_device &nvram, void *data, size_t size); - - UINT8 kb_read(); - void update_banks(); - DECLARE_WRITE8_MEMBER( hd63701_int_reg_w ); - DECLARE_READ8_MEMBER( hd63701_int_reg_r ); - void io_rw(address_space &space, UINT16 offset); - DECLARE_WRITE8_MEMBER( io_w ); - DECLARE_READ8_MEMBER( io_r ); - DECLARE_PALETTE_INIT(psion); - DECLARE_INPUT_CHANGED_MEMBER(psion_on); - TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); - - static HD44780_PIXEL_UPDATE(lz_pixel_update); -}; - - -class psion1_state : public psion_state -{ -public: - psion1_state(const machine_config &mconfig, device_type type, const char *tag) - : psion_state(mconfig, type, tag) - { } - - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( reset_kb_counter_r ); - DECLARE_READ8_MEMBER( inc_kb_counter_r ); - DECLARE_READ8_MEMBER( switchoff_r ); - - static HD44780_PIXEL_UPDATE(psion1_pixel_update); -}; - -#endif // _PSION_H_ diff --git a/src/mess/includes/px8.h b/src/mess/includes/px8.h deleted file mode 100644 index 22034809b86..00000000000 --- a/src/mess/includes/px8.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Curt Coder,Dirk Best -#pragma once - -#ifndef __PX8__ -#define __PX8__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/m6800/m6800.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/i8251.h" -#include "bus/epson_sio/pf10.h" -#include "sound/wave.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define UPD70008_TAG "4a" -#define UPD7508_TAG "2e" -#define HD6303_TAG "13d" -#define SED1320_TAG "7c" -#define I8251_TAG "13e" -#define UPD7001_TAG "1d" -#define SCREEN_TAG "screen" - -#define PX8_VIDEORAM_MASK 0x17ff - -class px8_state : public driver_device -{ -public: - px8_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, UPD70008_TAG), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_video_ram(*this, "video_ram"){ } - - required_device m_maincpu; - required_device m_cassette; - required_device m_ram; - /* video state */ - required_shared_ptr m_video_ram; /* LCD video RAM */ - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( gah40m_r ); - DECLARE_WRITE8_MEMBER( gah40m_w ); - DECLARE_READ8_MEMBER( gah40s_r ); - DECLARE_WRITE8_MEMBER( gah40s_w ); - DECLARE_WRITE8_MEMBER( gah40s_ier_w ); - DECLARE_READ8_MEMBER( krtn_0_3_r ); - DECLARE_READ8_MEMBER( krtn_4_7_r ); - DECLARE_WRITE8_MEMBER( ksc_w ); - - void bankswitch(); - UINT8 krtn_read(); - - /* GAH40M state */ - UINT16 m_icr; /* input capture register */ - UINT16 m_frc; /* free running counter */ - UINT8 m_ier; /* interrupt acknowledge register */ - UINT8 m_isr; /* interrupt status register */ - UINT8 m_sio; /* serial I/O register */ - int m_bank0; /* */ - - /* GAH40S state */ - UINT16 m_cnt; /* microcassette tape counter */ - int m_swpr; /* P-ROM power switch */ - UINT16 m_pra; /* P-ROM address */ - UINT8 m_prd; /* P-ROM data */ - - /* memory state */ - int m_bk2; /* */ - - /* keyboard state */ - int m_ksc; /* keyboard scan column */ - DECLARE_PALETTE_INIT(px8); - UINT32 screen_update_px8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -}; - -#endif diff --git a/src/mess/includes/ql.h b/src/mess/includes/ql.h deleted file mode 100644 index ad2b14039ac..00000000000 --- a/src/mess/includes/ql.h +++ /dev/null @@ -1,143 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder, Phill Harvey-Smith -#pragma once - -#ifndef __QL__ -#define __QL__ - -#include "emu.h" -#include "bus/ql/exp.h" -#include "bus/ql/rom.h" -#include "bus/rs232/rs232.h" -#include "cpu/m68000/m68000.h" -#include "cpu/mcs48/mcs48.h" -#include "machine/microdrv.h" -#include "machine/qimi.h" -#include "machine/ram.h" -#include "machine/zx8302.h" -#include "sound/speaker.h" -#include "video/zx8301.h" - -#define SCREEN_TAG "screen" - -#define M68008_TAG "ic18" -#define I8749_TAG "ic24" -#define I8051_TAG "i8051" -#define ZX8301_TAG "ic22" -#define ZX8302_TAG "ic23" -#define RS232_A_TAG "ser1" -#define RS232_B_TAG "ser2" -#define QIMI_TAG "qimi" - -#define X1 XTAL_15MHz -#define X2 XTAL_32_768kHz -#define X3 XTAL_4_436MHz -#define X4 XTAL_11MHz - -class ql_state : public driver_device -{ -public: - ql_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, M68008_TAG), - m_ipc(*this, I8749_TAG), - m_zx8301(*this, ZX8301_TAG), - m_zx8302(*this, ZX8302_TAG), - m_speaker(*this, "speaker"), - m_mdv1(*this, MDV_1), - m_mdv2(*this, MDV_2), - m_ser1(*this, RS232_A_TAG), - m_ser2(*this, RS232_A_TAG), - m_ram(*this, RAM_TAG), - m_exp(*this, "exp"), - m_cart(*this, "rom"), - m_qimi(*this, QIMI_TAG), - m_rom(*this, M68008_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_joy0(*this, "JOY0"), - m_joy1(*this, "JOY1"), - m_config(*this, "config"), - m_extintl(CLEAR_LINE), - m_keylatch(0), - m_ipl(0), - m_comdata_to_ipc(0), - m_baudx4(0), - m_qimi_enabled(false), - m_qimi_extint(CLEAR_LINE) - { } - - required_device m_maincpu; - required_device m_ipc; - required_device m_zx8301; - required_device m_zx8302; - required_device m_speaker; - required_device m_mdv1; - required_device m_mdv2; - required_device m_ser1; - required_device m_ser2; - required_device m_ram; - required_device m_exp; - required_device m_cart; - optional_device m_qimi; - required_memory_region m_rom; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_joy0; - required_ioport m_joy1; - required_ioport m_config; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE8_MEMBER( ipc_w ); - DECLARE_WRITE8_MEMBER( ipc_port1_w ); - DECLARE_WRITE8_MEMBER( ipc_port2_w ); - DECLARE_READ8_MEMBER( ipc_port2_r ); - DECLARE_READ8_MEMBER( ipc_t1_r ); - DECLARE_READ8_MEMBER( ipc_bus_r ); - DECLARE_READ8_MEMBER( ql_ram_r ); - DECLARE_WRITE8_MEMBER( ql_ram_w ); - DECLARE_WRITE_LINE_MEMBER( ql_baudx4_w ); - DECLARE_WRITE_LINE_MEMBER( ql_comdata_w ); - DECLARE_WRITE_LINE_MEMBER( zx8302_mdselck_w ); - DECLARE_WRITE_LINE_MEMBER( zx8302_mdrdw_w ); - DECLARE_WRITE_LINE_MEMBER( zx8302_erase_w ); - DECLARE_WRITE_LINE_MEMBER( zx8302_raw1_w ); - DECLARE_READ_LINE_MEMBER( zx8302_raw1_r ); - DECLARE_WRITE_LINE_MEMBER( zx8302_raw2_w ); - DECLARE_READ_LINE_MEMBER( zx8302_raw2_r ); - DECLARE_WRITE_LINE_MEMBER( exp_extintl_w ); - DECLARE_WRITE_LINE_MEMBER( qimi_extintl_w ); - - void update_interrupt(); - - int m_extintl; - - // IPC - UINT8 m_keylatch; - int m_ipl; - int m_comdata_to_ipc; - int m_baudx4; - - // QIMI - bool m_qimi_enabled; - int m_qimi_extint; -}; - -#endif diff --git a/src/mess/includes/radio86.h b/src/mess/includes/radio86.h deleted file mode 100644 index 2dd9f3298e8..00000000000 --- a/src/mess/includes/radio86.h +++ /dev/null @@ -1,129 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/radio86.h - * - ****************************************************************************/ - -#ifndef radio86_H_ -#define radio86_H_ - -#include "machine/i8255.h" -#include "machine/i8257.h" -#include "video/i8275.h" -#include "imagedev/cassette.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -class radio86_state : public driver_device -{ -public: - enum - { - TIMER_RESET - }; - - radio86_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_dma8257(*this, "dma8257"), - m_ppi8255_1(*this, "ppi8255_1"), - m_ppi8255_2(*this, "ppi8255_2"), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_line8(*this, "LINE8"), - m_io_cline0(*this, "CLINE0"), - m_io_cline1(*this, "CLINE1"), - m_io_cline2(*this, "CLINE2"), - m_io_cline3(*this, "CLINE3"), - m_io_cline4(*this, "CLINE4"), - m_io_cline5(*this, "CLINE5"), - m_io_cline6(*this, "CLINE6"), - m_io_cline7(*this, "CLINE7"), - m_palette(*this, "palette") { } - - virtual void video_start(); - - UINT8 m_tape_value; - UINT8 m_mikrosha_font_page; - int m_keyboard_mask; - UINT8* m_radio_ram_disk; - UINT8 m_romdisk_lsb; - UINT8 m_romdisk_msb; - UINT8 m_disk_sel; - const UINT8 *m_charmap; - DECLARE_READ8_MEMBER(radio_cpu_state_r); - DECLARE_READ8_MEMBER(radio_io_r); - DECLARE_WRITE8_MEMBER(radio_io_w); - DECLARE_WRITE8_MEMBER(radio86_pagesel); - DECLARE_DRIVER_INIT(radioram); - DECLARE_DRIVER_INIT(radio86); - DECLARE_MACHINE_RESET(radio86); - DECLARE_PALETTE_INIT(radio86); - DECLARE_READ8_MEMBER(radio86_8255_portb_r2); - DECLARE_READ8_MEMBER(radio86_8255_portc_r2); - DECLARE_WRITE8_MEMBER(radio86_8255_porta_w2); - DECLARE_WRITE8_MEMBER(radio86_8255_portc_w2); - DECLARE_READ8_MEMBER(rk7007_8255_portc_r); - DECLARE_WRITE_LINE_MEMBER(hrq_w); - DECLARE_READ8_MEMBER(radio86rom_romdisk_porta_r); - DECLARE_READ8_MEMBER(radio86ram_romdisk_porta_r); - DECLARE_WRITE8_MEMBER(radio86_romdisk_portb_w); - DECLARE_WRITE8_MEMBER(radio86_romdisk_portc_w); - DECLARE_WRITE8_MEMBER(mikrosha_8255_font_page_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - I8275_DRAW_CHARACTER_MEMBER(display_pixels); - required_device m_maincpu; - -protected: - required_device m_cassette; - optional_device m_cart; // for ROMDisk - only Radio86K & Orion? - optional_device m_dma8257; - required_device m_ppi8255_1; - optional_device m_ppi8255_2; - required_memory_region m_region_maincpu; - required_memory_bank m_bank1; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; - required_ioport m_io_line8; - optional_ioport m_io_cline0; - optional_ioport m_io_cline1; - optional_ioport m_io_cline2; - optional_ioport m_io_cline3; - optional_ioport m_io_cline4; - optional_ioport m_io_cline5; - optional_ioport m_io_cline6; - optional_ioport m_io_cline7; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - void radio86_init_keyboard(); -public: - required_device m_palette; -}; - - -/*----------- defined in drivers/radio86.c -----------*/ - -INPUT_PORTS_EXTERN( radio86 ); -INPUT_PORTS_EXTERN( ms7007 ); - -#endif /* radio86_H_ */ diff --git a/src/mess/includes/rm380z.h b/src/mess/includes/rm380z.h deleted file mode 100644 index b3b47a23bfd..00000000000 --- a/src/mess/includes/rm380z.h +++ /dev/null @@ -1,138 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol,Gabriele D'Antona - -/* - -Research Machines RM 380Z - -*/ - -#ifndef RM380Z_H_ -#define RM380Z_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/ram.h" -#include "imagedev/flopdrv.h" -#include "machine/wd_fdc.h" -#include "machine/keyboard.h" - -// -// -// - -#define RM380Z_MAINCPU_TAG "maincpu" -#define RM380Z_PORTS_ENABLED_HIGH ( m_port0 & 0x80 ) -#define RM380Z_PORTS_ENABLED_LOW ( ( m_port0 & 0x80 ) == 0x00 ) - -#define RM380Z_VIDEOMODE_40COL 0x01 -#define RM380Z_VIDEOMODE_80COL 0x02 - -#define RM380Z_CHDIMX 5 -#define RM380Z_CHDIMY 9 -#define RM380Z_NCX 8 -#define RM380Z_NCY 16 -#define RM380Z_SCREENCOLS 80 -#define RM380Z_SCREENROWS 24 - -#define RM380Z_VIDEORAM_SIZE 0x600 -#define RM380Z_SCREENSIZE 0x1200 - - -// -// -// - - -class rm380z_state : public driver_device -{ -private: - - void put_point(int charnum,int x,int y,int col); - void init_graphic_chars(); - - void putChar(int charnum,int attribs,int x,int y,bitmap_ind16 &bitmap,unsigned char* chsb,int vmode); - void decode_videoram_char(int pos,UINT8& chr,UINT8& attrib); - void scroll_videoram(); - void config_videomode(); - void check_scroll_register(); - - int writenum; - -protected: - virtual void machine_reset(); - virtual void machine_start(); - -public: - - UINT8 m_port0; - UINT8 m_port0_kbd; - UINT8 m_port1; - UINT8 m_fbfd; - UINT8 m_fbfe; - - UINT8 m_graphic_chars[0x80][(RM380Z_CHDIMX+1)*(RM380Z_CHDIMY+1)]; - - UINT8 m_mainVideoram[RM380Z_VIDEORAM_SIZE]; - UINT8 m_vramchars[RM380Z_SCREENSIZE]; - UINT8 m_vramattribs[RM380Z_SCREENSIZE]; - UINT8 m_vram[RM380Z_SCREENSIZE]; - - int m_rasterlineCtr; - emu_timer* m_vblankTimer; - - int m_old_fbfd; - int m_old_old_fbfd; - - int m_videomode; - int m_old_videomode; - - required_device m_maincpu; - required_device m_messram; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - - rm380z_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, RM380Z_MAINCPU_TAG), - m_messram(*this, RAM_TAG), - m_fdc(*this, "wd1771"), - m_floppy0(*this, "wd1771:0"), - m_floppy1(*this, "wd1771:1") - { - } - - DECLARE_WRITE8_MEMBER( port_write ); - DECLARE_READ8_MEMBER( port_read ); - DECLARE_WRITE8_MEMBER( port_write_1b00 ); - DECLARE_READ8_MEMBER( port_read_1b00 ); - - DECLARE_READ8_MEMBER( main_read ); - DECLARE_WRITE8_MEMBER( main_write ); - - DECLARE_READ8_MEMBER( videoram_read ); - DECLARE_WRITE8_MEMBER( videoram_write ); - - UINT8 hiram[0x1000]; - DECLARE_READ8_MEMBER( hiram_read ); - DECLARE_WRITE8_MEMBER( hiram_write ); - - DECLARE_READ8_MEMBER( rm380z_portlow_r ); - DECLARE_WRITE8_MEMBER( rm380z_portlow_w ); - DECLARE_READ8_MEMBER( rm380z_porthi_r ); - DECLARE_WRITE8_MEMBER( rm380z_porthi_w ); - - DECLARE_WRITE8_MEMBER(disk_0_control); - - DECLARE_WRITE8_MEMBER( keyboard_put ); - - void config_memory_map(); - int keyboard_decode(); - void update_screen(bitmap_ind16 &bitmap); - UINT32 screen_update_rm380z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(static_vblank_timer); -}; - - -#endif diff --git a/src/mess/includes/rmnimbus.h b/src/mess/includes/rmnimbus.h deleted file mode 100644 index 3d0cba8e05c..00000000000 --- a/src/mess/includes/rmnimbus.h +++ /dev/null @@ -1,222 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phill Harvey-Smith, Carl -/* - rmnimbus.c - Machine driver for the Research Machines Nimbus. - - Phill Harvey-Smith - 2009-11-29. -*/ -#include "emu.h" -#include "cpu/i86/i186.h" -#include "machine/z80dart.h" -#include "machine/wd_fdc.h" -#include "bus/scsi/scsi.h" -#include "machine/6522via.h" -#include "machine/ram.h" -#include "machine/eepromser.h" -#include "sound/ay8910.h" -#include "sound/msm5205.h" -#include "bus/centronics/ctronics.h" - -#define MAINCPU_TAG "maincpu" -#define IOCPU_TAG "iocpu" -#define Z80SIO_TAG "z80sio" -#define FDC_TAG "wd2793" -#define SCSIBUS_TAG "scsibus" -#define ER59256_TAG "er59256" -#define AY8910_TAG "ay8910" -#define MONO_TAG "mono" -#define MSM5205_TAG "msm5205" -#define VIA_TAG "via6522" -#define CENTRONICS_TAG "centronics" - -/* Mouse / Joystick */ - -#define JOYSTICK0_TAG "joystick0" -#define MOUSE_BUTTON_TAG "mousebtn" -#define MOUSEX_TAG "mousex" -#define MOUSEY_TAG "mousey" - -/* Memory controller */ -#define RAM_BANK00_TAG "bank0" -#define RAM_BANK01_TAG "bank1" -#define RAM_BANK02_TAG "bank2" -#define RAM_BANK03_TAG "bank3" -#define RAM_BANK04_TAG "bank4" -#define RAM_BANK05_TAG "bank5" -#define RAM_BANK06_TAG "bank6" -#define RAM_BANK07_TAG "bank7" - -class rmnimbus_state : public driver_device -{ -public: - rmnimbus_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_msm(*this, MSM5205_TAG), - m_scsibus(*this, SCSIBUS_TAG), - m_ram(*this, RAM_TAG), - m_eeprom(*this, ER59256_TAG), - m_via(*this, VIA_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_palette(*this, "palette"), - m_scsi_data_out(*this, "scsi_data_out"), - m_scsi_data_in(*this, "scsi_data_in"), - m_scsi_ctrl_out(*this, "scsi_ctrl_out"), - m_fdc(*this, FDC_TAG), - m_z80sio(*this, Z80SIO_TAG), - m_screen(*this, "screen"), - m_io_config(*this, "config"), - m_io_joystick0(*this, JOYSTICK0_TAG), - m_io_mouse_button(*this, MOUSE_BUTTON_TAG), - m_io_mousex(*this, MOUSEX_TAG), - m_io_mousey(*this, MOUSEY_TAG) - { - } - - required_device m_maincpu; - required_device m_msm; - required_device m_scsibus; - required_device m_ram; - required_device m_eeprom; - required_device m_via; - required_device m_centronics; - required_device m_palette; - required_device m_scsi_data_out; - required_device m_scsi_data_in; - required_device m_scsi_ctrl_out; - required_device m_fdc; - required_device m_z80sio; - required_device m_screen; - required_ioport m_io_config; - required_ioport m_io_joystick0; - required_ioport m_io_mouse_button; - required_ioport m_io_mousex; - required_ioport m_io_mousey; - - bitmap_ind16 m_video_mem; - - UINT32 m_debug_machine; - UINT8 m_mcu_reg080; - UINT8 m_iou_reg092; - UINT8 m_last_playmode; - UINT8 m_ay8910_a; - UINT16 m_x, m_y, m_yline; - UINT8 m_colours, m_mode, m_op; - UINT32 m_debug_video; - UINT8 m_vector; - UINT8 m_eeprom_bits; - UINT8 m_eeprom_state; - - DECLARE_READ8_MEMBER(nimbus_mcu_r); - DECLARE_WRITE8_MEMBER(nimbus_mcu_w); - DECLARE_READ8_MEMBER(scsi_r); - DECLARE_WRITE8_MEMBER(scsi_w); - DECLARE_WRITE8_MEMBER(fdc_ctl_w); - DECLARE_READ8_MEMBER(nimbus_pc8031_r); - DECLARE_WRITE8_MEMBER(nimbus_pc8031_w); - DECLARE_READ8_MEMBER(nimbus_pc8031_iou_r); - DECLARE_WRITE8_MEMBER(nimbus_pc8031_iou_w); - DECLARE_READ8_MEMBER(nimbus_pc8031_port_r); - DECLARE_WRITE8_MEMBER(nimbus_pc8031_port_w); - DECLARE_READ8_MEMBER(nimbus_iou_r); - DECLARE_WRITE8_MEMBER(nimbus_iou_w); - DECLARE_WRITE8_MEMBER(nimbus_sound_ay8910_porta_w); - DECLARE_WRITE8_MEMBER(nimbus_sound_ay8910_portb_w); - DECLARE_READ8_MEMBER(nimbus_mouse_js_r); - DECLARE_WRITE8_MEMBER(nimbus_mouse_js_w); - DECLARE_READ16_MEMBER(nimbus_video_io_r); - DECLARE_WRITE16_MEMBER(nimbus_video_io_w); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - virtual void video_reset(); - UINT32 screen_update_nimbus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(sio_interrupt); - DECLARE_WRITE_LINE_MEMBER(nimbus_fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(nimbus_fdc_drq_w); - DECLARE_WRITE8_MEMBER(nimbus_via_write_portb); - DECLARE_WRITE_LINE_MEMBER(write_scsi_bsy); - DECLARE_WRITE_LINE_MEMBER(write_scsi_cd); - DECLARE_WRITE_LINE_MEMBER(write_scsi_io); - DECLARE_WRITE_LINE_MEMBER(write_scsi_msg); - DECLARE_WRITE_LINE_MEMBER(write_scsi_req); - DECLARE_WRITE_LINE_MEMBER(nimbus_msm5205_vck); - DECLARE_WRITE_LINE_MEMBER(write_scsi_iena); - - UINT8 get_pixel(UINT16 x, UINT16 y); - UINT16 read_pixel_line(UINT16 x, UINT16 y, UINT8 pixels, UINT8 bpp); - UINT16 read_pixel_data(UINT16 x, UINT16 y); - void set_pixel(UINT16 x, UINT16 y, UINT8 colour); - void set_pixel40(UINT16 x, UINT16 y, UINT8 colour); - void write_pixel_line(UINT16 x, UINT16 y, UINT16, UINT8 pixels, UINT8 bpp); - void move_pixel_line(UINT16 x, UINT16 y, UINT8 width); - void write_pixel_data(UINT16 x, UINT16 y, UINT16 data); - void change_palette(UINT8 bank, UINT16 colours); - void external_int(UINT8 vector, bool state); - DECLARE_READ8_MEMBER(cascade_callback); - void nimbus_bank_memory(); - void memory_reset(); - void fdc_reset(); - UINT8 fdc_driveno(UINT8 drivesel); - void hdc_reset(); - void hdc_ctrl_write(UINT8 data); - void hdc_post_rw(); - void hdc_drq(bool state); - void pc8031_reset(); - //void ipc_dumpregs(); - void iou_reset(); - void rmni_sound_reset(); - void mouse_js_reset(); - void check_scsi_irq(); - - int m_scsi_iena; - int m_scsi_msg; - int m_scsi_bsy; - int m_scsi_io; - int m_scsi_cd; - int m_scsi_req; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - enum - { - TIMER_MOUSE - }; - - // Static data related to Floppy and SCSI hard disks - struct - { - UINT8 reg400; - } m_nimbus_drives; - - /* 8031 Peripheral controler */ - struct - { - UINT8 ipc_in; - UINT8 ipc_out; - UINT8 status_in; - UINT8 status_out; - } m_ipc_interface; - - /* Mouse/Joystick */ - struct - { - UINT8 m_mouse_px; - UINT8 m_mouse_py; - - UINT8 m_mouse_x; - UINT8 m_mouse_y; - UINT8 m_mouse_pc; - UINT8 m_mouse_pcx; - UINT8 m_mouse_pcy; - - UINT8 m_intstate_x; - UINT8 m_intstate_y; - - UINT8 m_reg0a4; - - emu_timer *m_mouse_timer; - } m_nimbus_mouse; -}; diff --git a/src/mess/includes/sage2.h b/src/mess/includes/sage2.h deleted file mode 100644 index a8138e3c716..00000000000 --- a/src/mess/includes/sage2.h +++ /dev/null @@ -1,99 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder - -#include "emu.h" -#include "cpu/m68000/m68000.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8251.h" -#include "machine/i8255.h" -#include "bus/ieee488/ieee488.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/upd765.h" - -#define M68000_TAG "u68" -#define I8255A_0_TAG "u22" -#define I8255A_1_TAG "u39" -#define I8253_0_TAG "u74" -#define I8253_1_TAG "u75" -#define I8259_TAG "u73" -#define I8251_0_TAG "u58" -#define I8251_1_TAG "u67" -#define UPD765_TAG "u21" -#define TMS9914_TAG "u6" -#define CENTRONICS_TAG "centronics" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -class sage2_state : public driver_device -{ -public: - sage2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M68000_TAG), - m_pic(*this, I8259_TAG), - m_usart0(*this, I8251_0_TAG), - m_usart1(*this, I8251_1_TAG), - m_fdc(*this, UPD765_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG ":0"), - m_floppy1(*this, UPD765_TAG ":1"), - m_floppy(NULL), - m_centronics(*this, CENTRONICS_TAG), - m_ieee488(*this, IEEE488_TAG), - m_reset(1), - m_fdc_int(0), - m_fdie(0) - { } - - required_device m_maincpu; - required_device m_pic; - required_device m_usart0; - required_device m_usart1; - required_device m_fdc; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - floppy_image_device *m_floppy; - required_device m_centronics; - required_device m_ieee488; - - virtual void machine_start(); - virtual void machine_reset(); - - void update_fdc_int(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE_LINE_MEMBER( br1_w ); - DECLARE_WRITE_LINE_MEMBER( br2_w ); - DECLARE_WRITE8_MEMBER( ppi0_pc_w ); - DECLARE_READ8_MEMBER( ppi1_pb_r ); - DECLARE_WRITE8_MEMBER( ppi1_pc_w ); - - DECLARE_WRITE8_MEMBER(kbd_put); - - DECLARE_DIRECT_UPDATE_MEMBER(sage2_direct_update_handler); - - DECLARE_WRITE_LINE_MEMBER( fdc_irq ); - - const UINT8 *m_rom; - int m_reset; - - // floppy state - int m_fdc_int; - int m_fdie; - DECLARE_DRIVER_INIT(sage2); - - int m_centronics_busy; - int m_centronics_perror; - int m_centronics_select; - int m_centronics_fault; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); -}; diff --git a/src/mess/includes/samcoupe.h b/src/mess/includes/samcoupe.h deleted file mode 100644 index e576e32f782..00000000000 --- a/src/mess/includes/samcoupe.h +++ /dev/null @@ -1,203 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Lee Hammerton, Dirk Best -/***************************************************************************** - * - * includes/coupe.h - * - * SAM Coupe - * - * Driver by Lee Hammerton - * - ****************************************************************************/ - -#ifndef SAMCOUPE_H_ -#define SAMCOUPE_H_ - -#include "machine/wd_fdc.h" -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "bus/centronics/ctronics.h" -#include "machine/ram.h" -#include "machine/msm6242.h" - -/* screen dimensions */ -#define SAM_BLOCK 8 - -#define SAM_TOTAL_WIDTH SAM_BLOCK*96 -#define SAM_TOTAL_HEIGHT 312 -#define SAM_SCREEN_WIDTH SAM_BLOCK*64 -#define SAM_SCREEN_HEIGHT 192 -#define SAM_BORDER_LEFT SAM_BLOCK*4 -#define SAM_BORDER_RIGHT SAM_BLOCK*4 -#define SAM_BORDER_TOP 37 -#define SAM_BORDER_BOTTOM 46 - -/* interrupt sources */ -#define SAM_LINE_INT 0x01 -#define SAM_MOUSE_INT 0x02 -#define SAM_MIDIIN_INT 0x04 -#define SAM_FRAME_INT 0x08 -#define SAM_MIDIOUT_INT 0x10 - - -class samcoupe_state : public driver_device -{ -public: - enum - { - TIMER_IRQ_OFF, - TIMER_MOUSE_RESET, - TIMER_VIDEO_UPDATE - }; - - samcoupe_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_lpt1(*this, "lpt1"), - m_lpt2(*this, "lpt2"), - m_ram(*this, RAM_TAG), - m_rtc(*this, "sambus_clock"), - m_fdc(*this, "wd1772"), - m_wd1772_0(*this, "wd1772:0"), - m_wd1772_1(*this, "wd1772:1"), - m_region_maincpu(*this, "maincpu"), - m_keyboard_row_fe(*this, "keyboard_row_fe"), - m_keyboard_row_fd(*this, "keyboard_row_fd"), - m_keyboard_row_fb(*this, "keyboard_row_fb"), - m_keyboard_row_f7(*this, "keyboard_row_f7"), - m_keyboard_row_ef(*this, "keyboard_row_ef"), - m_keyboard_row_df(*this, "keyboard_row_df"), - m_keyboard_row_bf(*this, "keyboard_row_bf"), - m_keyboard_row_7f(*this, "keyboard_row_7f"), - m_keyboard_row_ff(*this, "keyboard_row_ff"), - m_mouse_buttons(*this, "mouse_buttons"), - m_io_mouse_x(*this, "mouse_x"), - m_io_mouse_y(*this, "mouse_y"), - m_config(*this, "config") - { - sam_bank_read_ptr[0] = NULL; - sam_bank_write_ptr[0] = NULL; - sam_bank_read_ptr[1] = NULL; - sam_bank_write_ptr[1] = NULL; - sam_bank_read_ptr[2] = NULL; - sam_bank_write_ptr[2] = NULL; - sam_bank_read_ptr[3] = NULL; - sam_bank_write_ptr[3] = NULL; - } - - virtual void video_start(); - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - bitmap_ind16 m_bitmap; - - emu_timer *m_video_update_timer; - - UINT8 m_lmpr, m_hmpr, m_vmpr; /* memory pages */ - UINT8 m_lext, m_hext; /* extended memory page */ - UINT8 m_border; /* border */ - UINT8 m_clut[16]; /* color lookup table, 16 entries */ - UINT8 m_line_int; /* line interrupt */ - UINT8 m_status; /* status register */ - - /* attribute */ - UINT8 m_attribute; - - /* mouse */ - int m_mouse_index; - emu_timer *m_mouse_reset; - UINT8 m_mouse_data[9]; - int m_mouse_x, m_mouse_y; - UINT8 *m_videoram; - DECLARE_WRITE8_MEMBER(samcoupe_ext_mem_w); - DECLARE_READ8_MEMBER(samcoupe_disk_r); - DECLARE_WRITE8_MEMBER(samcoupe_disk_w); - DECLARE_READ8_MEMBER(samcoupe_pen_r); - DECLARE_WRITE8_MEMBER(samcoupe_clut_w); - DECLARE_READ8_MEMBER(samcoupe_status_r); - DECLARE_WRITE8_MEMBER(samcoupe_line_int_w); - DECLARE_READ8_MEMBER(samcoupe_lmpr_r); - DECLARE_WRITE8_MEMBER(samcoupe_lmpr_w); - DECLARE_READ8_MEMBER(samcoupe_hmpr_r); - DECLARE_WRITE8_MEMBER(samcoupe_hmpr_w); - DECLARE_READ8_MEMBER(samcoupe_vmpr_r); - DECLARE_WRITE8_MEMBER(samcoupe_vmpr_w); - DECLARE_READ8_MEMBER(samcoupe_midi_r); - DECLARE_WRITE8_MEMBER(samcoupe_midi_w); - DECLARE_READ8_MEMBER(samcoupe_keyboard_r); - DECLARE_WRITE8_MEMBER(samcoupe_border_w); - DECLARE_READ8_MEMBER(samcoupe_attributes_r); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(samcoupe); - INTERRUPT_GEN_MEMBER(samcoupe_frame_interrupt); - TIMER_CALLBACK_MEMBER(irq_off); - TIMER_CALLBACK_MEMBER(samcoupe_mouse_reset); - TIMER_CALLBACK_MEMBER(sam_video_update_callback); - DECLARE_READ8_MEMBER(samcoupe_lpt1_busy_r); - DECLARE_WRITE8_MEMBER(samcoupe_lpt1_strobe_w); - DECLARE_READ8_MEMBER(samcoupe_lpt2_busy_r); - DECLARE_WRITE8_MEMBER(samcoupe_lpt2_strobe_w); - DECLARE_READ8_MEMBER(samcoupe_rtc_r); - DECLARE_WRITE8_MEMBER(samcoupe_rtc_w); - - DECLARE_READ8_MEMBER(sam_bank1_r); - DECLARE_WRITE8_MEMBER(sam_bank1_w); - DECLARE_READ8_MEMBER(sam_bank2_r); - DECLARE_WRITE8_MEMBER(sam_bank2_w); - DECLARE_READ8_MEMBER(sam_bank3_r); - DECLARE_WRITE8_MEMBER(sam_bank3_w); - DECLARE_READ8_MEMBER(sam_bank4_r); - DECLARE_WRITE8_MEMBER(sam_bank4_w); - - UINT8* sam_bank_read_ptr[4]; - UINT8* sam_bank_write_ptr[4]; - DECLARE_FLOPPY_FORMATS( floppy_formats ); - required_device m_maincpu; - required_device m_speaker; - required_device m_cassette; - required_device m_lpt1; - required_device m_lpt2; - required_device m_ram; - required_device m_rtc; - required_device m_fdc; - required_device m_wd1772_0; - required_device m_wd1772_1; - required_memory_region m_region_maincpu; - required_ioport m_keyboard_row_fe; - required_ioport m_keyboard_row_fd; - required_ioport m_keyboard_row_fb; - required_ioport m_keyboard_row_f7; - required_ioport m_keyboard_row_ef; - required_ioport m_keyboard_row_df; - required_ioport m_keyboard_row_bf; - required_ioport m_keyboard_row_7f; - required_ioport m_keyboard_row_ff; - required_ioport m_mouse_buttons; - required_ioport m_io_mouse_x; - required_ioport m_io_mouse_y; - required_ioport m_config; - - void draw_mode4_line(int y, int hpos); - void draw_mode3_line(int y, int hpos); - void draw_mode12_block(bitmap_ind16 &bitmap, int vpos, int hpos, UINT8 mask); - void draw_mode2_line(int y, int hpos); - void draw_mode1_line(int y, int hpos); - void samcoupe_update_bank(address_space &space, int bank_num, UINT8 *memory, int is_readonly); - void samcoupe_install_ext_mem(address_space &space); - void samcoupe_update_memory(address_space &space); - UINT8 samcoupe_mouse_r(); - void samcoupe_irq(UINT8 src); - - DECLARE_WRITE_LINE_MEMBER(write_lpt1_busy); - DECLARE_WRITE_LINE_MEMBER(write_lpt2_busy); - - int m_lpt1_busy; - int m_lpt2_busy; -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* SAMCOUPE_H_ */ diff --git a/src/mess/includes/sg1000.h b/src/mess/includes/sg1000.h deleted file mode 100644 index 47d9497f7db..00000000000 --- a/src/mess/includes/sg1000.h +++ /dev/null @@ -1,149 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __SG1000__ -#define __SG1000__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "formats/sc3000_bit.h" -#include "formats/sf7000_dsk.h" -#include "imagedev/cassette.h" -#include "imagedev/printer.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8255.h" -#include "machine/i8251.h" -#include "machine/ram.h" -#include "bus/sega8/sega8_slot.h" -#include "machine/upd765.h" -#include "sound/sn76496.h" -#include "video/tms9928a.h" -#include "crsshair.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define SN76489AN_TAG "sn76489an" -#define UPD765_TAG "upd765" -#define UPD8251_TAG "upd8251" -#define UPD9255_TAG "upd9255" -#define UPD9255_0_TAG "upd9255_0" -#define UPD9255_1_TAG "upd9255_1" -#define CENTRONICS_TAG "centronics" -#define TMS9918A_TAG "tms9918a" -#define RS232_TAG "rs232" -#define CARTSLOT_TAG "slot" - - -INPUT_PORTS_EXTERN( sk1100 ); - -class sg1000_state : public driver_device -{ -public: - enum - { - TIMER_LIGHTGUN_TICK - }; - - sg1000_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_cart(*this, CARTSLOT_TAG) - { } - - required_device m_maincpu; - required_device m_ram; - required_memory_region m_rom; - optional_device m_cart; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( joysel_r ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); - - DECLARE_READ8_MEMBER( omv_r ); - DECLARE_WRITE8_MEMBER( omv_w ); - - /* keyboard state */ - UINT8 m_keylatch; - - DECLARE_WRITE_LINE_MEMBER(sg1000_vdp_interrupt); -}; - -class sc3000_state : public sg1000_state -{ -public: - sc3000_state(const machine_config &mconfig, device_type type, const char *tag) - : sg1000_state(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_pa0(*this, "PA0"), - m_pa1(*this, "PA1"), - m_pa2(*this, "PA2"), - m_pa3(*this, "PA3"), - m_pa4(*this, "PA4"), - m_pa5(*this, "PA5"), - m_pa6(*this, "PA6"), - m_pa7(*this, "PA7"), - m_pb0(*this, "PB0"), - m_pb1(*this, "PB1"), - m_pb2(*this, "PB2"), - m_pb3(*this, "PB3"), - m_pb4(*this, "PB4"), - m_pb5(*this, "PB5"), - m_pb6(*this, "PB6"), - m_pb7(*this, "PB7") - { } - - required_device m_cassette; - required_ioport m_pa0; - required_ioport m_pa1; - required_ioport m_pa2; - required_ioport m_pa3; - required_ioport m_pa4; - required_ioport m_pa5; - required_ioport m_pa6; - required_ioport m_pa7; - required_ioport m_pb0; - required_ioport m_pb1; - required_ioport m_pb2; - required_ioport m_pb3; - required_ioport m_pb4; - required_ioport m_pb5; - required_ioport m_pb6; - required_ioport m_pb7; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( ppi_pa_r ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - - ioport_port* m_key_row[16]; -}; - -class sf7000_state : public sc3000_state -{ -public: - sf7000_state(const machine_config &mconfig, device_type type, const char *tag) - : sc3000_state(mconfig, type, tag), - m_fdc(*this, UPD765_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_floppy0(*this, UPD765_TAG ":0:3ssdd") - { } - - required_device m_fdc; - required_device m_centronics; - required_device m_floppy0; - - virtual void machine_start(); - virtual void machine_reset(); - - int m_centronics_busy; - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_READ8_MEMBER( ppi_pa_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); -}; - -#endif diff --git a/src/mess/includes/sms.h b/src/mess/includes/sms.h deleted file mode 100644 index 4f2efcdbbd3..00000000000 --- a/src/mess/includes/sms.h +++ /dev/null @@ -1,250 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol, Charles MacDonald,Mathis Rosenhauer,Brad Oliver,Michael Luong,Fabio Priuli,Enik Land -/***************************************************************************** - * - * includes/sms.h - * - ****************************************************************************/ - -#ifndef SMS_H_ -#define SMS_H_ - -#define LOG_REG -#define LOG_PAGING -#define LOG_COLOR - -#define NVRAM_SIZE (0x08000) -#define CPU_ADDRESSABLE_SIZE (0x10000) - -#define MAX_CARTRIDGES 16 - -#define CONTROL1_TAG "ctrl1" -#define CONTROL2_TAG "ctrl2" - -#include "bus/sega8/sega8_slot.h" -#include "bus/sms_exp/smsexp.h" -#include "bus/sms_ctrl/smsctrl.h" -#include "bus/gamegear/ggext.h" - - -class sms_state : public driver_device -{ -public: - sms_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_vdp(*this, "sms_vdp"), - m_main_scr(*this, "screen"), - m_psg_sms(*this, "segapsg"), - m_psg_gg(*this, "gamegear"), - m_ym(*this, "ym2413"), - m_port_ctrl1(*this, CONTROL1_TAG), - m_port_ctrl2(*this, CONTROL2_TAG), - m_port_gg_ext(*this, "ext"), - m_port_gg_dc(*this, "GG_PORT_DC"), - m_port_pause(*this, "PAUSE"), - m_port_reset(*this, "RESET"), - m_port_start(*this, "START"), - m_port_scope(*this, "SEGASCOPE"), - m_port_scope_binocular(*this, "SSCOPE_BINOCULAR"), - m_port_persist(*this, "PERSISTENCE"), - m_region_maincpu(*this, "maincpu"), - m_mainram(NULL), - m_is_gamegear(0), - m_is_gg_region_japan(0), - m_is_smsj(0), - m_is_mark_iii(0), - m_is_sdisp(0), - m_has_bios_0400(0), - m_has_bios_2000(0), - m_has_bios_full(0), - m_has_fm(0), - m_has_jpn_sms_cart_slot(0), - m_store_cart_selection_data(0) { } - - // devices - required_device m_maincpu; - required_device m_vdp; - required_device m_main_scr; - optional_device m_psg_sms; - optional_device m_psg_gg; - optional_device m_ym; - optional_device m_port_ctrl1; - optional_device m_port_ctrl2; - optional_device m_port_gg_ext; - - optional_ioport m_port_gg_dc; - optional_ioport m_port_pause; - optional_ioport m_port_reset; - optional_ioport m_port_start; - optional_ioport m_port_scope; - optional_ioport m_port_scope_binocular; - optional_ioport m_port_persist; - - required_memory_region m_region_maincpu; - address_space *m_space; - UINT8 *m_mainram; - UINT8 *m_BIOS; - - // for 3D glass binocular hack - device_t *m_left_lcd; - device_t *m_right_lcd; - bitmap_rgb32 m_prevleft_bitmap; - bitmap_rgb32 m_prevright_bitmap; - - // for gamegear LCD persistence hack - bitmap_rgb32 m_prev_bitmap; - bool m_prev_bitmap_copied; - - // for gamegear SMS mode scaling - bitmap_rgb32 m_gg_sms_mode_bitmap; - // line_buffer will be used to hold 4 lines of line data as a kind of cache for - // vertical scaling in the gamegear sms compatibility mode. - int *m_line_buffer; - - // model identifiers - UINT8 m_is_gamegear; - UINT8 m_is_gg_region_japan; - UINT8 m_is_smsj; - UINT8 m_is_mark_iii; - UINT8 m_is_sdisp; - UINT8 m_has_bios_0400; - UINT8 m_has_bios_2000; - UINT8 m_has_bios_full; - UINT8 m_has_fm; - UINT8 m_has_jpn_sms_cart_slot; - - // [0] for 0x400-0x3fff, [1] for 0x4000-0x7fff, [2] for 0x8000-0xffff, [3] for 0x0000-0x0400 - UINT8 m_bios_page[4]; - - UINT8 m_bios_page_count; - UINT8 m_mapper[4]; - UINT8 m_io_ctrl_reg; - UINT8 m_mem_ctrl_reg; - UINT8 m_mem_device_enabled; - UINT8 m_audio_control; - UINT8 m_port_dc_reg; - UINT8 m_port_dd_reg; - UINT8 m_gg_sio[5]; - int m_paused; - - UINT8 m_ctrl1_th_state; - UINT8 m_ctrl2_th_state; - UINT8 m_ctrl1_th_latch; - UINT8 m_ctrl2_th_latch; - - // Data needed for Light Phaser - int m_lphaser_x_offs; /* Needed to 'calibrate' lphaser; set at cart loading */ - - // Data needed for SegaScope (3D glasses) - UINT8 m_sscope_state; - UINT8 m_frame_sscope_state; - - // slot devices - sega8_cart_slot_device *m_cartslot; - sega8_card_slot_device *m_cardslot; - sms_expansion_slot_device *m_expslot; - - // these are only used by the Store Display unit, but we keep them here temporarily to avoid the need of separate start/reset - sega8_cart_slot_device *m_slots[16]; - sega8_card_slot_device *m_cards[16]; - UINT8 m_store_control; - UINT8 m_store_cart_selection_data; - void store_post_load(); - void store_select_cart(UINT8 data); - - DECLARE_READ8_MEMBER(read_0000); - DECLARE_READ8_MEMBER(read_4000); - DECLARE_READ8_MEMBER(read_8000); - DECLARE_READ8_MEMBER(read_ram); - DECLARE_WRITE8_MEMBER(write_ram); - DECLARE_WRITE8_MEMBER(write_cart); - - DECLARE_READ8_MEMBER(sms_mapper_r); - DECLARE_WRITE8_MEMBER(sms_mapper_w); - DECLARE_WRITE8_MEMBER(sms_mem_control_w); - DECLARE_WRITE8_MEMBER(sms_io_control_w); - DECLARE_READ8_MEMBER(sms_count_r); - DECLARE_READ8_MEMBER(sms_input_port_dc_r); - DECLARE_READ8_MEMBER(sms_input_port_dd_r); - DECLARE_READ8_MEMBER(gg_input_port_00_r); - DECLARE_READ8_MEMBER(gg_sio_r); - DECLARE_WRITE8_MEMBER(gg_sio_w); - DECLARE_WRITE8_MEMBER(gg_psg_stereo_w); - DECLARE_WRITE8_MEMBER(gg_psg_w); - DECLARE_WRITE8_MEMBER(sms_psg_w); - DECLARE_READ8_MEMBER(sms_audio_control_r); - DECLARE_WRITE8_MEMBER(sms_audio_control_w); - DECLARE_WRITE8_MEMBER(sms_ym2413_register_port_w); - DECLARE_WRITE8_MEMBER(sms_ym2413_data_port_w); - DECLARE_READ8_MEMBER(sms_sscope_r); - DECLARE_WRITE8_MEMBER(sms_sscope_w); - - DECLARE_WRITE_LINE_MEMBER(sms_int_callback); - DECLARE_WRITE_LINE_MEMBER(sms_pause_callback); - DECLARE_WRITE_LINE_MEMBER(sms_ctrl1_th_input); - DECLARE_WRITE_LINE_MEMBER(sms_ctrl2_th_input); - DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input); - DECLARE_READ32_MEMBER(sms_pixel_color); - - DECLARE_DRIVER_INIT(sg1000m3); - DECLARE_DRIVER_INIT(gamegear); - DECLARE_DRIVER_INIT(gamegeaj); - DECLARE_DRIVER_INIT(sms1krfm); - DECLARE_DRIVER_INIT(sms1kr); - DECLARE_DRIVER_INIT(smskr); - DECLARE_DRIVER_INIT(smsj); - DECLARE_DRIVER_INIT(sms1); - DECLARE_MACHINE_START(sms); - DECLARE_MACHINE_RESET(sms); - DECLARE_VIDEO_START(gamegear); - DECLARE_VIDEO_RESET(gamegear); - DECLARE_VIDEO_START(sms1); - DECLARE_VIDEO_RESET(sms1); - - UINT32 screen_update_sms(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_sms1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_gamegear(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void screen_gg_sms_mode_scaling(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void screen_vblank_sms1(screen_device &screen, bool state); - -protected: - UINT8 read_bus(address_space &space, unsigned int bank, UINT16 base_addr, UINT16 offset); - void setup_bios(); - void setup_media_slots(); - void setup_enabled_slots(); - void lphaser_hcount_latch(); - void sms_get_inputs(); -}; - -class smssdisp_state : public sms_state -{ -public: - smssdisp_state(const machine_config &mconfig, device_type type, const char *tag) - : sms_state(mconfig, type, tag), - m_control_cpu(*this, "control") - { } - - required_device m_control_cpu; - - DECLARE_READ8_MEMBER(sms_store_cart_select_r); - DECLARE_WRITE8_MEMBER(sms_store_cart_select_w); - DECLARE_WRITE8_MEMBER(sms_store_control_w); - DECLARE_DRIVER_INIT(smssdisp); - - DECLARE_READ8_MEMBER(store_cart_peek); - - DECLARE_WRITE_LINE_MEMBER(sms_store_int_callback); -}; - - -/*----------- defined in machine/sms.c -----------*/ - -#define IO_EXPANSION (0x80) /* Expansion slot enable (1= disabled, 0= enabled) */ -#define IO_CARTRIDGE (0x40) /* Cartridge slot enable (1= disabled, 0= enabled) */ -#define IO_CARD (0x20) /* Card slot disabled (1= disabled, 0= enabled) */ -#define IO_WORK_RAM (0x10) /* Work RAM disabled (1= disabled, 0= enabled) */ -#define IO_BIOS_ROM (0x08) /* BIOS ROM disabled (1= disabled, 0= enabled) */ -#define IO_CHIP (0x04) /* I/O chip disabled (1= disabled, 0= enabled) */ - -#endif /* SMS_H_ */ diff --git a/src/mess/includes/softbox.h b/src/mess/includes/softbox.h deleted file mode 100644 index 2ad510fa682..00000000000 --- a/src/mess/includes/softbox.h +++ /dev/null @@ -1,68 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder, Mike Naberezny -#pragma once - -#ifndef __SOFTBOX__ -#define __SOFTBOX__ - -#include "emu.h" -#include "bus/ieee488/ieee488.h" -#include "bus/imi7000/imi7000.h" -#include "cpu/z80/z80.h" -#include "imagedev/harddriv.h" -#include "machine/corvushd.h" -#include "machine/com8116.h" -#include "machine/i8251.h" -#include "machine/i8255.h" - -#define Z80_TAG "z80" -#define I8251_TAG "ic15" -#define I8255_0_TAG "ic17" -#define I8255_1_TAG "ic16" -#define COM8116_TAG "ic14" -#define RS232_TAG "rs232" -#define CORVUS_HDC_TAG "corvus" - -class softbox_state : public driver_device -{ -public: - softbox_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_dbrg(*this, COM8116_TAG), - m_ieee(*this, IEEE488_TAG), - m_hdc(*this, CORVUS_HDC_TAG) - { } - - required_device m_maincpu; - required_device m_dbrg; - required_device m_ieee; - required_device m_hdc; - - virtual void machine_start(); - virtual void device_reset_after_children(); - - // device_ieee488_interface overrides - virtual void ieee488_ifc(int state); - - DECLARE_WRITE8_MEMBER( dbrg_w ); - - DECLARE_READ8_MEMBER( ppi0_pa_r ); - DECLARE_WRITE8_MEMBER( ppi0_pb_w ); - - DECLARE_READ8_MEMBER( ppi1_pa_r ); - DECLARE_WRITE8_MEMBER( ppi1_pb_w ); - DECLARE_READ8_MEMBER( ppi1_pc_r ); - DECLARE_WRITE8_MEMBER( ppi1_pc_w ); - - enum - { - LED_A, - LED_B, - LED_READY - }; - - int m_ifc; // Tracks previous state of IEEE-488 IFC line -}; - -#endif diff --git a/src/mess/includes/sorcerer.h b/src/mess/includes/sorcerer.h deleted file mode 100644 index 3cff01cdc38..00000000000 --- a/src/mess/includes/sorcerer.h +++ /dev/null @@ -1,110 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker, Robbbert -/***************************************************************************** - * - * includes/sorcerer.h - * - ****************************************************************************/ - -#ifndef SORCERER_H_ -#define SORCERER_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/dac.h" -#include "sound/wave.h" -#include "machine/ay31015.h" -#include "bus/centronics/ctronics.h" -#include "machine/ram.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "imagedev/flopdrv.h" -#include "formats/sorc_dsk.h" -#include "formats/sorc_cas.h" -#include "machine/micropolis.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define SORCERER_USING_RS232 0 - -struct cass_data_t { - struct { - int length; /* time cassette level is at input.level */ - int level; /* cassette level */ - int bit; /* bit being read */ - } input; - struct { - int length; /* time cassette level is at output.level */ - int level; /* cassette level */ - int bit; /* bit to output */ - } output; -}; - - -class sorcerer_state : public driver_device -{ -public: - enum - { - TIMER_SERIAL, - TIMER_CASSETTE, - TIMER_RESET - }; - - sorcerer_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_cassette1(*this, "cassette") - , m_cassette2(*this, "cassette2") - , m_wave1(*this, WAVE_TAG) - , m_wave2(*this, WAVE2_TAG) - , m_uart(*this, "uart") - , m_centronics(*this, "centronics") - , m_cart(*this, "cartslot") - , m_ram(*this, RAM_TAG) - , m_iop_config(*this, "CONFIG") - , m_iop_vs(*this, "VS") - , m_iop_x(*this, "X") - { } - - DECLARE_READ8_MEMBER(sorcerer_fc_r); - DECLARE_READ8_MEMBER(sorcerer_fd_r); - DECLARE_READ8_MEMBER(sorcerer_fe_r); - DECLARE_WRITE8_MEMBER(sorcerer_fc_w); - DECLARE_WRITE8_MEMBER(sorcerer_fd_w); - DECLARE_WRITE8_MEMBER(sorcerer_fe_w); - DECLARE_WRITE8_MEMBER(sorcerer_ff_w); - DECLARE_MACHINE_START(sorcererd); - DECLARE_DRIVER_INIT(sorcerer); - TIMER_CALLBACK_MEMBER(sorcerer_serial_tc); - TIMER_CALLBACK_MEMBER(sorcerer_cassette_tc); - TIMER_CALLBACK_MEMBER(sorcerer_reset); - DECLARE_SNAPSHOT_LOAD_MEMBER( sorcerer ); - DECLARE_QUICKLOAD_LOAD_MEMBER( sorcerer); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -private: - UINT8 m_fe; - UINT8 m_keyboard_line; - const UINT8 *m_p_videoram; - emu_timer *m_serial_timer; - emu_timer *m_cassette_timer; - cass_data_t m_cass_data; - virtual void video_start(); - virtual void machine_start(); - virtual void machine_reset(); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - required_device m_maincpu; - required_device m_cassette1; - required_device m_cassette2; - required_device m_wave1; - required_device m_wave2; - required_device m_uart; - required_device m_centronics; - required_device m_cart; - required_device m_ram; - required_ioport m_iop_config; - required_ioport m_iop_vs; - required_ioport_array<16> m_iop_x; -}; - -#endif /* SORCERER_H_ */ diff --git a/src/mess/includes/special.h b/src/mess/includes/special.h deleted file mode 100644 index 56350a8bbc7..00000000000 --- a/src/mess/includes/special.h +++ /dev/null @@ -1,153 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/special.h - * - ****************************************************************************/ - -#ifndef SPECIAL_H_ -#define SPECIAL_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/i8085/i8085.h" -#include "audio/specimx_snd.h" -#include "sound/dac.h" -#include "sound/wave.h" -#include "machine/i8255.h" -#include "machine/pit8253.h" -#include "imagedev/cassette.h" -#include "formats/smx_dsk.h" -#include "formats/rk_cas.h" -#include "machine/wd_fdc.h" -#include "machine/ram.h" - - -class special_state : public driver_device -{ -public: - enum - { - TIMER_RESET, - TIMER_PIT8253_GATES - }; - - special_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ppi(*this, "ppi8255"), - m_fdc(*this, "fd1793"), - m_dac(*this, "dac"), - m_pit(*this, "pit8253"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_p_videoram(*this, "p_videoram"), - m_region_maincpu(*this, "maincpu"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_line8(*this, "LINE8"), - m_io_line9(*this, "LINE9"), - m_io_line10(*this, "LINE10"), - m_io_line11(*this, "LINE11"), - m_io_line12(*this, "LINE12"), - m_palette(*this, "palette") { } - - DECLARE_WRITE8_MEMBER(specimx_select_bank); - DECLARE_WRITE8_MEMBER(video_memory_w); - DECLARE_WRITE8_MEMBER(specimx_video_color_w); - DECLARE_READ8_MEMBER(specimx_video_color_r); - DECLARE_READ8_MEMBER(specimx_disk_ctrl_r); - DECLARE_WRITE8_MEMBER(specimx_disk_ctrl_w); - DECLARE_READ8_MEMBER(erik_rr_reg_r); - DECLARE_WRITE8_MEMBER(erik_rr_reg_w); - DECLARE_READ8_MEMBER(erik_rc_reg_r); - DECLARE_WRITE8_MEMBER(erik_rc_reg_w); - DECLARE_READ8_MEMBER(erik_disk_reg_r); - DECLARE_WRITE8_MEMBER(erik_disk_reg_w); - DECLARE_READ8_MEMBER(specialist_8255_porta_r); - DECLARE_READ8_MEMBER(specialist_8255_portb_r); - DECLARE_READ8_MEMBER(specimx_8255_portb_r); - DECLARE_READ8_MEMBER(specialist_8255_portc_r); - DECLARE_WRITE8_MEMBER(specialist_8255_porta_w); - DECLARE_WRITE8_MEMBER(specialist_8255_portb_w); - DECLARE_WRITE8_MEMBER(specialist_8255_portc_w); - void specimx_set_bank(offs_t i, UINT8 data); - void erik_set_bank(); - UINT8 *m_specimx_colorram; - UINT8 m_erik_color_1; - UINT8 m_erik_color_2; - UINT8 m_erik_background; - UINT8 m_specimx_color; - int m_specialist_8255_porta; - int m_specialist_8255_portb; - int m_specialist_8255_portc; - UINT8 m_RR_register; - UINT8 m_RC_register; - required_device m_maincpu; - optional_device m_ppi; - optional_device m_fdc; - optional_device m_dac; - optional_device m_pit; - optional_device m_cassette; - optional_device m_ram; - optional_shared_ptr m_p_videoram; - int m_drive; - DECLARE_DRIVER_INIT(erik); - DECLARE_DRIVER_INIT(special); - DECLARE_MACHINE_RESET(special); - DECLARE_VIDEO_START(special); - DECLARE_MACHINE_RESET(erik); - DECLARE_VIDEO_START(erik); - DECLARE_PALETTE_INIT(erik); - DECLARE_VIDEO_START(specialp); - DECLARE_MACHINE_START(specimx); - DECLARE_MACHINE_RESET(specimx); - DECLARE_VIDEO_START(specimx); - DECLARE_PALETTE_INIT(specimx); - UINT32 screen_update_special(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_erik(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_specialp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_specimx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(fdc_drq); - DECLARE_FLOPPY_FORMATS( specimx_floppy_formats ); - -protected: - required_memory_region m_region_maincpu; - required_memory_bank m_bank1; - optional_memory_bank m_bank2; - optional_memory_bank m_bank3; - optional_memory_bank m_bank4; - optional_memory_bank m_bank5; - optional_memory_bank m_bank6; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; - required_ioport m_io_line8; - required_ioport m_io_line9; - required_ioport m_io_line10; - required_ioport m_io_line11; - required_ioport m_io_line12; - - required_device m_palette; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* SPECIAL_H_ */ diff --git a/src/mess/includes/spectrum.h b/src/mess/includes/spectrum.h deleted file mode 100644 index 2706e8223c7..00000000000 --- a/src/mess/includes/spectrum.h +++ /dev/null @@ -1,262 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker -/***************************************************************************** - * - * includes/spectrum.h - * - ****************************************************************************/ - -#ifndef __SPECTRUM_H__ -#define __SPECTRUM_H__ - -#include "machine/upd765.h" -#include "sound/speaker.h" -#include "machine/ram.h" -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -/* Spectrum crystals */ - -#define X1 XTAL_14MHz // Main clock (48k Spectrum) -#define X1_128_AMSTRAD 35469000 // Main clock (Amstrad 128K model, +2A?) -#define X1_128_SINCLAIR 17734475 // Main clock (Sinclair 128K model) - -#define X2 XTAL_4_433619MHz // PAL color subcarrier - -/* Spectrum screen size in pixels */ -#define SPEC_UNSEEN_LINES 16 /* Non-visible scanlines before first border - line. Some of these may be vertical retrace. */ -#define SPEC_TOP_BORDER 48 /* Number of border lines before actual screen */ -#define SPEC_DISPLAY_YSIZE 192 /* Vertical screen resolution */ -#define SPEC_BOTTOM_BORDER 56 /* Number of border lines at bottom of screen */ -#define SPEC_SCREEN_HEIGHT (SPEC_TOP_BORDER + SPEC_DISPLAY_YSIZE + SPEC_BOTTOM_BORDER) - -#define SPEC_LEFT_BORDER 48 /* Number of left hand border pixels */ -#define SPEC_DISPLAY_XSIZE 256 /* Horizontal screen resolution */ -#define SPEC_RIGHT_BORDER 48 /* Number of right hand border pixels */ -#define SPEC_SCREEN_WIDTH (SPEC_LEFT_BORDER + SPEC_DISPLAY_XSIZE + SPEC_RIGHT_BORDER) - -#define SPEC_LEFT_BORDER_CYCLES 24 /* Cycles to display left hand border */ -#define SPEC_DISPLAY_XSIZE_CYCLES 128 /* Horizontal screen resolution */ -#define SPEC_RIGHT_BORDER_CYCLES 24 /* Cycles to display right hand border */ -#define SPEC_RETRACE_CYCLES 48 /* Cycles taken for horizonal retrace */ -#define SPEC_CYCLES_PER_LINE 224 /* Number of cycles to display a single line */ - -/* 128K machines take an extra 4 cycles per scan line - add this to retrace */ -#define SPEC128_UNSEEN_LINES 15 -#define SPEC128_RETRACE_CYCLES 52 -#define SPEC128_CYCLES_PER_LINE 228 - -/* Border sizes for TS2068. These are guesses based on the number of cycles - available per frame. */ -#define TS2068_TOP_BORDER 32 -#define TS2068_BOTTOM_BORDER 32 -#define TS2068_SCREEN_HEIGHT (TS2068_TOP_BORDER + SPEC_DISPLAY_YSIZE + TS2068_BOTTOM_BORDER) - -/* Double the border sizes to maintain ratio of screen to border */ -#define TS2068_LEFT_BORDER 96 /* Number of left hand border pixels */ -#define TS2068_DISPLAY_XSIZE 512 /* Horizontal screen resolution */ -#define TS2068_RIGHT_BORDER 96 /* Number of right hand border pixels */ -#define TS2068_SCREEN_WIDTH (TS2068_LEFT_BORDER + TS2068_DISPLAY_XSIZE + TS2068_RIGHT_BORDER) - -struct EVENT_LIST_ITEM -{ - /* driver defined ID for this write */ - int Event_ID; - /* driver defined data for this write */ - int Event_Data; - /* time at which this write occurred */ - int Event_Time; -}; - - -enum -{ - TIMEX_CART_NONE, - TIMEX_CART_DOCK, - TIMEX_CART_EXROM, - TIMEX_CART_HOME -}; - - -class spectrum_state : public driver_device -{ -public: - spectrum_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_ram(*this, RAM_TAG), - m_speaker(*this, "speaker"), - m_cart(*this, "cartslot"), - m_dock(*this, "dockslot"), - m_upd765(*this, "upd765"), - m_upd765_0(*this, "upd765:0"), - m_upd765_1(*this, "upd765:1"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_nmi(*this, "NMI"), - m_io_config(*this, "CONFIG"), - m_io_joy_intf(*this, "JOY_INTF"), - m_io_kempston(*this, "KEMPSTON"), - m_io_fuller(*this, "FULLER"), - m_io_mikrogen(*this, "MIKROGEN"), - m_io_plus0(*this, "PLUS0"), - m_io_plus1(*this, "PLUS1"), - m_io_plus2(*this, "PLUS2"), - m_io_plus3(*this, "PLUS3"), - m_io_plus4(*this, "PLUS4") { } - - int m_port_fe_data; - int m_port_7ffd_data; - int m_port_1ffd_data; /* scorpion and plus3 */ - int m_port_ff_data; /* Display enhancement control */ - int m_port_f4_data; /* Horizontal Select Register */ - - int m_floppy; - - /* video support */ - int m_frame_invert_count; - int m_frame_number; /* Used for handling FLASH 1 */ - int m_flash_invert; - optional_shared_ptr m_video_ram; - UINT8 *m_screen_location; - - int m_ROMSelection; - - - EVENT_LIST_ITEM *m_pCurrentItem; - int m_NumEvents; - int m_TotalEvents; - char *m_pEventListBuffer; - int m_LastFrameStartTime; - int m_CyclesPerFrame; - - UINT8 *m_ram_0000; - UINT8 m_ram_disabled_by_beta; - DECLARE_WRITE8_MEMBER(spectrum_port_fe_w); - DECLARE_READ8_MEMBER(spectrum_port_fe_r); - DECLARE_READ8_MEMBER(spectrum_port_1f_r); - DECLARE_READ8_MEMBER(spectrum_port_7f_r); - DECLARE_READ8_MEMBER(spectrum_port_df_r); - DECLARE_READ8_MEMBER(spectrum_port_ula_r); - - DECLARE_WRITE8_MEMBER(spectrum_128_port_7ffd_w); - DECLARE_READ8_MEMBER(spectrum_128_ula_r); - - DECLARE_WRITE8_MEMBER(spectrum_plus3_port_3ffd_w); - DECLARE_READ8_MEMBER(spectrum_plus3_port_3ffd_r); - DECLARE_READ8_MEMBER(spectrum_plus3_port_2ffd_r); - DECLARE_WRITE8_MEMBER(spectrum_plus3_port_7ffd_w); - DECLARE_WRITE8_MEMBER(spectrum_plus3_port_1ffd_w); - - DECLARE_READ8_MEMBER(ts2068_port_f4_r); - DECLARE_WRITE8_MEMBER(ts2068_port_f4_w); - DECLARE_READ8_MEMBER(ts2068_port_ff_r); - DECLARE_WRITE8_MEMBER(ts2068_port_ff_w); - DECLARE_WRITE8_MEMBER(tc2048_port_ff_w); - - DECLARE_DRIVER_INIT(spectrum); - DECLARE_DRIVER_INIT(plus2); - DECLARE_DRIVER_INIT(plus3); - DECLARE_MACHINE_RESET(spectrum); - DECLARE_VIDEO_START(spectrum); - DECLARE_PALETTE_INIT(spectrum); - DECLARE_MACHINE_RESET(tc2048); - DECLARE_VIDEO_START(spectrum_128); - DECLARE_MACHINE_RESET(spectrum_128); - DECLARE_MACHINE_RESET(spectrum_plus3); - DECLARE_MACHINE_RESET(ts2068); - DECLARE_VIDEO_START(ts2068); - UINT32 screen_update_spectrum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_tc2048(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_ts2068(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_spectrum(screen_device &screen, bool state); - void screen_eof_timex(screen_device &screen, bool state); - INTERRUPT_GEN_MEMBER(spec_interrupt); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( spectrum_cart ); - - // for timex cart only - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( timex_cart ); - int m_dock_cart_type, m_ram_chunks; - memory_region *m_dock_crt; - - unsigned int m_previous_border_x, m_previous_border_y; - bitmap_ind16 m_border_bitmap; - unsigned int m_previous_screen_x, m_previous_screen_y; - bitmap_ind16 m_screen_bitmap; - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - void spectrum_128_update_memory(); - void spectrum_plus3_update_memory(); - void ts2068_update_memory(); - - DECLARE_SNAPSHOT_LOAD_MEMBER( spectrum ); - DECLARE_QUICKLOAD_LOAD_MEMBER( spectrum ); - - required_device m_maincpu; - -protected: - required_device m_cassette; - required_device m_ram; - required_device m_speaker; - optional_device m_cart; - optional_device m_dock; - optional_device m_upd765; - optional_device m_upd765_0; - optional_device m_upd765_1; - - // Regular spectrum ports; marked as optional because of other subclasses - optional_ioport m_io_line0; - optional_ioport m_io_line1; - optional_ioport m_io_line2; - optional_ioport m_io_line3; - optional_ioport m_io_line4; - optional_ioport m_io_line5; - optional_ioport m_io_line6; - optional_ioport m_io_line7; - optional_ioport m_io_nmi; - optional_ioport m_io_config; - optional_ioport m_io_joy_intf; - optional_ioport m_io_kempston; - optional_ioport m_io_fuller; - optional_ioport m_io_mikrogen; - // Plus ports - optional_ioport m_io_plus0; - optional_ioport m_io_plus1; - optional_ioport m_io_plus2; - optional_ioport m_io_plus3; - optional_ioport m_io_plus4; - - void spectrum_UpdateBorderBitmap(); - void spectrum_UpdateScreenBitmap(bool eof = false); - inline unsigned char get_display_color(unsigned char color, int invert); - inline void spectrum_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void ts2068_hires_scanline(bitmap_ind16 &bitmap, int y, int borderlines); - void ts2068_64col_scanline(bitmap_ind16 &bitmap, int y, int borderlines, unsigned short inkcolor); - void ts2068_lores_scanline(bitmap_ind16 &bitmap, int y, int borderlines, int screen); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - - -/*----------- defined in drivers/spectrum.c -----------*/ - -INPUT_PORTS_EXTERN( spectrum ); -INPUT_PORTS_EXTERN( spec_plus ); - -MACHINE_CONFIG_EXTERN( spectrum ); - -/*----------- defined in drivers/spec128.c -----------*/ - -MACHINE_CONFIG_EXTERN( spectrum_128 ); - -#endif /* __SPECTRUM_H__ */ diff --git a/src/mess/includes/ssystem3.h b/src/mess/includes/ssystem3.h deleted file mode 100644 index 0367a8acb67..00000000000 --- a/src/mess/includes/ssystem3.h +++ /dev/null @@ -1,84 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/ssystem3.h - * - ****************************************************************************/ - -#ifndef SSYSTEM3_H_ -#define SSYSTEM3_H_ - -#include "machine/6522via.h" - - -struct playfield_t -{ - int signal; - // int on; - - int count, bit, started; - UINT8 data; - attotime time, high_time, low_time; - union { - struct { - UINT8 header[7]; - UINT8 field[8][8/2]; - UINT8 unknown[5]; - } s; - UINT8 data[7+8*8/2+5]; - } u; -}; - -struct lcd_t -{ - UINT8 data[5]; - int clock; - int count; -}; - - -class ssystem3_state : public driver_device -{ -public: - ssystem3_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_palette(*this, "palette") - , m_via6522_0(*this, "via6522_0") - , m_configuration(*this, "Configuration") - , m_matrix(*this, "matrix") - { } - - DECLARE_DRIVER_INIT(ssystem3); - virtual void video_start(); - DECLARE_PALETTE_INIT(ssystem3); - UINT32 screen_update_ssystem3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER(ssystem3_via_write_a); - DECLARE_READ8_MEMBER(ssystem3_via_read_a); - DECLARE_READ8_MEMBER(ssystem3_via_read_b); - DECLARE_WRITE8_MEMBER(ssystem3_via_write_b); - void ssystem3_lcd_reset(); - void ssystem3_lcd_write(int clock, int data); - void ssystem3_draw_7segment(bitmap_ind16 &bitmap,int value, int x, int y); - void ssystem3_draw_led(bitmap_ind16 &bitmap,INT16 color, int x, int y, int ch); - void ssystem3_playfield_getfigure(int x, int y, int *figure, int *black); - void ssystem3_playfield_reset(); - void ssystem3_playfield_write(int reset, int signal); - void ssystem3_playfield_read(int *on, int *ready); - -private: - UINT8 m_porta; - UINT8 *m_videoram; - playfield_t m_playfield; - lcd_t m_lcd; - - required_device m_maincpu; - required_device m_palette; - required_device m_via6522_0; - required_ioport m_configuration; - required_ioport_array<4> m_matrix; -}; - - -#endif /* SSYSTEM3_H_ */ diff --git a/src/mess/includes/super6.h b/src/mess/includes/super6.h deleted file mode 100644 index 9367decda25..00000000000 --- a/src/mess/includes/super6.h +++ /dev/null @@ -1,89 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __SUPER6__ -#define __SUPER6__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/com8116.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "machine/z80dma.h" -#include "machine/z80pio.h" - -#define Z80_TAG "u30" -#define Z80CTC_TAG "u20" -#define Z80DART_TAG "u38" -#define Z80DMA_TAG "u21" -#define Z80PIO_TAG "u7" -#define WD2793_TAG "u27" -#define BR1945_TAG "u31" -#define SCREEN_TAG "screen" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -class super6_state : public driver_device -{ -public: - super6_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_dart(*this, Z80DART_TAG), - m_dma(*this, Z80DMA_TAG), - m_pio(*this, Z80PIO_TAG), - m_fdc(*this, WD2793_TAG), - m_brg(*this, BR1945_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, WD2793_TAG":0"), - m_floppy1(*this, WD2793_TAG":1"), - m_rom(*this, Z80_TAG), - m_j7(*this, "J7") - { } - - required_device m_maincpu; - required_device m_ctc; - required_device m_dart; - required_device m_dma; - required_device m_pio; - required_device m_fdc; - required_device m_brg; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_region_ptr m_rom; - required_ioport m_j7; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_WRITE8_MEMBER( s100_w ); - DECLARE_WRITE8_MEMBER( bank0_w ); - DECLARE_WRITE8_MEMBER( bank1_w ); - DECLARE_WRITE8_MEMBER( baud_w ); - DECLARE_WRITE_LINE_MEMBER( fr_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - void bankswitch(); - - // memory state - UINT8 m_s100; - UINT8 m_bank0; - UINT8 m_bank1; - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - DECLARE_WRITE8_MEMBER(dummy_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); -}; - -#endif diff --git a/src/mess/includes/super80.h b/src/mess/includes/super80.h deleted file mode 100644 index 30813f31015..00000000000 --- a/src/mess/includes/super80.h +++ /dev/null @@ -1,123 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robbbert -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "sound/wave.h" -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "sound/speaker.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "video/mc6845.h" -#include "machine/z80pio.h" -#include "machine/z80dma.h" -#include "machine/wd_fdc.h" - - -/* Bits in m_portf0 variable: - d5 cassette LED - d4 super80v rom or pcg bankswitch (1=pcg ram, 0=char gen rom) - d2 super80v video or colour bankswitch (1=video ram, 0=colour ram) - d2 super80 screen off (=2mhz) or on (bursts of 2mhz at 50hz = 1mhz) */ - -class super80_state : public driver_device -{ -public: - super80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_palette(*this, "palette") - , m_maincpu(*this, "maincpu") - , m_pio(*this, "z80pio") - , m_cassette(*this, "cassette") - , m_wave(*this, WAVE_TAG) - , m_speaker(*this, "speaker") - , m_centronics(*this, "centronics") - , m_cent_data_out(*this, "cent_data_out") - , m_io_dsw(*this, "DSW") - , m_io_config(*this, "CONFIG") - , m_io_keyboard(*this, "KEY") - , m_crtc(*this, "crtc") - , m_dma(*this, "dma") - , m_fdc (*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") - { } - - DECLARE_READ8_MEMBER(super80v_low_r); - DECLARE_READ8_MEMBER(super80v_high_r); - DECLARE_WRITE8_MEMBER(super80v_low_w); - DECLARE_WRITE8_MEMBER(super80v_high_w); - DECLARE_WRITE8_MEMBER(super80v_10_w); - DECLARE_WRITE8_MEMBER(super80v_11_w); - DECLARE_READ8_MEMBER(port3e_r); - DECLARE_WRITE8_MEMBER(port3f_w); - DECLARE_WRITE8_MEMBER(super80_f1_w); - DECLARE_READ8_MEMBER(super80_dc_r); - DECLARE_READ8_MEMBER(super80_f2_r); - DECLARE_WRITE8_MEMBER(super80_dc_w); - DECLARE_WRITE8_MEMBER(super80_f0_w); - DECLARE_WRITE8_MEMBER(super80r_f0_w); - DECLARE_READ8_MEMBER(super80_read_ff); - DECLARE_WRITE_LINE_MEMBER(busreq_w); - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); - DECLARE_WRITE8_MEMBER(pio_port_a_w); - DECLARE_READ8_MEMBER(pio_port_b_r); - DECLARE_DRIVER_INIT(super80); - DECLARE_VIDEO_START(super80); - DECLARE_VIDEO_START(super80v); - DECLARE_PALETTE_INIT(super80m); - DECLARE_QUICKLOAD_LOAD_MEMBER(super80); - MC6845_UPDATE_ROW(crtc_update_row); - UINT32 screen_update_super80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_super80v(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - UINT32 screen_update_super80d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_super80e(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_super80m(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_super80m(screen_device &screen, bool state); - TIMER_CALLBACK_MEMBER(super80_reset); - TIMER_DEVICE_CALLBACK_MEMBER(timer_h); - TIMER_DEVICE_CALLBACK_MEMBER(timer_k); - TIMER_DEVICE_CALLBACK_MEMBER(timer_p); - UINT8 m_s_options; - UINT8 m_portf0; - UINT8 *m_p_videoram; - UINT8 *m_p_colorram; - UINT8 *m_p_pcgram; - UINT8 m_mc6845_cursor[16]; - UINT8 m_palette_index; - required_device m_palette; -private: - virtual void machine_reset(); - UINT8 m_keylatch; - UINT8 m_cass_data[4]; - UINT8 m_int_sw; - UINT8 m_last_data; - UINT8 m_key_pressed; - UINT16 m_vidpg; - UINT8 m_current_charset; - const UINT8 *m_p_chargen; - UINT8 m_mc6845_reg[32]; - UINT8 m_mc6845_ind; - UINT8 *m_p_ram; - void mc6845_cursor_configure(); - void super80_cassette_motor(UINT8 data); - required_device m_maincpu; - required_device m_pio; - required_device m_cassette; - required_device m_wave; - required_device m_speaker; - required_device m_centronics; - required_device m_cent_data_out; - required_ioport m_io_dsw; - required_ioport m_io_config; - required_ioport_array<8> m_io_keyboard; - optional_device m_crtc; - optional_device m_dma; - optional_device m_fdc; - optional_device m_floppy0; - optional_device m_floppy1; -}; diff --git a/src/mess/includes/superslave.h b/src/mess/includes/superslave.h deleted file mode 100644 index cfdc2f5d51d..00000000000 --- a/src/mess/includes/superslave.h +++ /dev/null @@ -1,75 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __SUPERSLAVE__ -#define __SUPERSLAVE__ - -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/com8116.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/z80dart.h" -#include "machine/z80pio.h" - -#define Z80_TAG "u45" -#define Z80DART_0_TAG "u14" -#define Z80DART_1_TAG "u30" -#define Z80PIO_TAG "u43" -#define AM9519_TAG "u13" -#define BR1941_TAG "u12" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define RS232_C_TAG "rs232c" -#define RS232_D_TAG "rs232d" - -class superslave_state : public driver_device -{ -public: - superslave_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_dart0(*this, Z80DART_0_TAG), - m_dart1(*this, Z80DART_1_TAG), - m_dbrg(*this, BR1941_TAG), - m_ram(*this, RAM_TAG), - m_rs232a(*this, RS232_A_TAG), - m_rs232b(*this, RS232_B_TAG), - m_rs232c(*this, RS232_C_TAG), - m_rs232d(*this, RS232_D_TAG), - m_rom(*this, Z80_TAG), - m_memctrl(0x01), - m_cmd(0x01) - { } - - required_device m_maincpu; - required_device m_dart0; - required_device m_dart1; - required_device m_dbrg; - required_device m_ram; - required_device m_rs232a; - required_device m_rs232b; - required_device m_rs232c; - required_device m_rs232d; - required_memory_region m_rom; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE8_MEMBER( baud_w ); - DECLARE_WRITE8_MEMBER( memctrl_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( cmd_w ); - - DECLARE_WRITE_LINE_MEMBER( fr_w ); - DECLARE_WRITE_LINE_MEMBER( ft_w ); - - UINT8 m_memctrl; - UINT8 m_cmd; -}; - -#endif diff --git a/src/mess/includes/svi318.h b/src/mess/includes/svi318.h deleted file mode 100644 index a699f6e9bfb..00000000000 --- a/src/mess/includes/svi318.h +++ /dev/null @@ -1,159 +0,0 @@ -// license:??? -// copyright-holders:Sean Young,Tomas Karlsson -/***************************************************************************** - * - * includes/svi318.h - * - * Spectravideo SVI-318 and SVI-328 - * - ****************************************************************************/ - -#ifndef SVI318_H_ -#define SVI318_H_ - -#include "cpu/z80/z80.h" -#include "machine/i8255.h" -#include "machine/ins8250.h" -#include "machine/wd_fdc.h" -#include "machine/ram.h" -#include "machine/buffer.h" -#include "imagedev/cassette.h" -#include "sound/dac.h" -#include "sound/ay8910.h" -#include "sound/wave.h" -#include "video/mc6845.h" -#include "video/tms9928a.h" -#include "bus/centronics/ctronics.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -class svi318_state : public driver_device -{ -public: - svi318_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_dac(*this, "dac"), - m_ppi(*this, "ppi8255"), - m_ram(*this, RAM_TAG), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_ins8250_0(*this, "ins8250_0"), - m_ins8250_1(*this, "ins8250_1"), - m_cart(*this, "cartslot"), - m_fd1793(*this, "wd179x"), - m_floppy0(*this, "wd179x:0"), - m_floppy1(*this, "wd179x:1"), - m_crtc(*this, "crtc"), - m_line(*this, "LINE"), - m_joysticks(*this, "JOYSTICKS"), - m_buttons(*this, "BUTTONS"), - m_palette(*this, "palette"), - m_floppy(NULL), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - // FDC - int m_drq; - int m_irq; - - DECLARE_WRITE8_MEMBER(ppi_w); - DECLARE_READ8_MEMBER(psg_port_a_r); - DECLARE_WRITE8_MEMBER(psg_port_b_w); - DECLARE_WRITE8_MEMBER(fdc_drive_motor_w); - DECLARE_WRITE8_MEMBER(fdc_density_side_w); - DECLARE_READ8_MEMBER(fdc_irqdrq_r); - DECLARE_WRITE8_MEMBER(svi806_ram_enable_w); - DECLARE_WRITE8_MEMBER(writemem1); - DECLARE_WRITE8_MEMBER(writemem2); - DECLARE_WRITE8_MEMBER(writemem3); - DECLARE_WRITE8_MEMBER(writemem4); - DECLARE_READ8_MEMBER(io_ext_r); - DECLARE_WRITE8_MEMBER(io_ext_w); - DECLARE_DRIVER_INIT(svi318); - DECLARE_DRIVER_INIT(svi328_806); - DECLARE_WRITE_LINE_MEMBER(vdp_interrupt); - DECLARE_WRITE_LINE_MEMBER(ins8250_interrupt); - DECLARE_READ8_MEMBER(ppi_port_a_r); - DECLARE_READ8_MEMBER(ppi_port_b_r); - DECLARE_WRITE8_MEMBER(ppi_port_c_w); - DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - bool cart_verify(UINT8 *ROM); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svi318_cart); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - - virtual void machine_start(); - virtual void machine_reset(); - - MC6845_UPDATE_ROW(crtc_update_row); - memory_region *m_cart_rom; - memory_region *m_bios_rom; - -protected: - required_device m_maincpu; - required_device m_cassette; - required_device m_dac; - required_device m_ppi; - required_device m_ram; - required_device m_centronics; - required_device m_cent_data_out; - required_device m_ins8250_0; - required_device m_ins8250_1; - required_device m_cart; - required_device m_fd1793; - required_device m_floppy0; - required_device m_floppy1; - optional_device m_crtc; - required_ioport_array<11> m_line; - required_ioport m_joysticks; - required_ioport m_buttons; - optional_device m_palette; - -private: - - void set_banks(); - void postload(); - - // memory banking - UINT8 m_bank_switch; - UINT8 m_bank_low; - UINT8 m_bank_high; - - UINT8 m_bank_low_read_only; - UINT8 m_bank_high1_read_only; - UINT8 m_bank_high2_read_only; - - UINT8 *m_empty_bank; - UINT8 *m_bank_low_ptr; - UINT8 *m_bank_high1_ptr; - UINT8 *m_bank_high2_ptr; - - // keyboard - UINT8 m_keyboard_row; - - floppy_image_device *m_floppy; - - // centronics - int m_centronics_busy; - - // SVI-806 80 column card - UINT8 m_svi806_present; - UINT8 m_svi806_ram_enabled; - dynamic_buffer m_svi806_ram; - UINT8 *m_svi806_gfx; - - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - optional_memory_bank m_bank4; -}; - -#endif /* SVI318_H_ */ diff --git a/src/mess/includes/svision.h b/src/mess/includes/svision.h deleted file mode 100644 index ab8ff9583e7..00000000000 --- a/src/mess/includes/svision.h +++ /dev/null @@ -1,92 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Peter Trauner -/***************************************************************************** - * - * includes/svision.h - * - ****************************************************************************/ - -#ifndef SVISION_H_ -#define SVISION_H_ - -#include "cpu/m6502/m65c02.h" -#include "audio/svis_snd.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -struct svision_t -{ - emu_timer *timer1; - int timer_shot; -}; - -struct svision_pet_t -{ - int state; - int on, clock, data; - UINT8 input; - emu_timer *timer; -}; - -struct tvlink_t -{ - UINT32 palette[4/*0x40?*/]; /* rgb8 */ - int palette_on; -}; - -class svision_state : public driver_device -{ -public: - svision_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_sound(*this, "custom"), - m_cart(*this, "cartslot"), - m_reg(*this, "reg"), - m_videoram(*this, "videoram"), - m_joy(*this, "JOY"), - m_joy2(*this, "JOY2"), - m_palette(*this, "palette") { } - - int *m_dma_finished; - svision_t m_svision; - svision_pet_t m_pet; - tvlink_t m_tvlink; - - DECLARE_READ8_MEMBER(svision_r); - DECLARE_WRITE8_MEMBER(svision_w); - DECLARE_READ8_MEMBER(tvlink_r); - DECLARE_WRITE8_MEMBER(tvlink_w); - DECLARE_DRIVER_INIT(svisions); - DECLARE_DRIVER_INIT(svision); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(svision); - DECLARE_PALETTE_INIT(svisionp); - DECLARE_PALETTE_INIT(svisionn); - DECLARE_MACHINE_RESET(tvlink); - UINT32 screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(svision_frame_int); - TIMER_CALLBACK_MEMBER(svision_pet_timer); - TIMER_CALLBACK_MEMBER(svision_timer); - TIMER_DEVICE_CALLBACK_MEMBER(svision_pet_timer_dev); - void svision_irq(); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svision_cart); - -protected: - required_device m_maincpu; - required_device m_sound; - required_device m_cart; - required_shared_ptr m_reg; - required_shared_ptr m_videoram; - required_ioport m_joy; - optional_ioport m_joy2; - required_device m_palette; - - memory_region *m_cart_rom; - memory_bank *m_bank1; - memory_bank *m_bank2; -}; - -#endif /* SVISION_H_ */ diff --git a/src/mess/includes/swtpc09.h b/src/mess/includes/swtpc09.h deleted file mode 100644 index 222ffe5c11a..00000000000 --- a/src/mess/includes/swtpc09.h +++ /dev/null @@ -1,150 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robert Justice -/*************************************************************************** - swtpc09 include file - Robert Justice ,2009-2014 - -****************************************************************************/ - -#ifndef swtpc09_H_ -#define swtpc09_H_ - -#include "emu.h" -#include "cpu/m6809/m6809.h" -#include "video/generic.h" -#include "machine/wd_fdc.h" -#include "imagedev/flopdrv.h" -#include "machine/6840ptm.h" -#include "machine/6821pia.h" -#include "machine/6850acia.h" -#include "machine/6522via.h" -#include "machine/terminal.h" -#include "imagedev/harddriv.h" -#include "machine/idectrl.h" -#include "machine/clock.h" -#include "bus/rs232/rs232.h" - - - -class swtpc09_state : public driver_device -{ -public: - swtpc09_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pia(*this, "pia"), - m_ptm(*this, "ptm"), - m_acia(*this, "acia"), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy2(*this, "fdc:2"), - m_floppy3(*this, "fdc:3"), - m_via(*this, "via"), - m_piaide(*this, "piaide"), - m_harddisk(*this, "harddisk"), - m_ide(*this, "ide") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device m_maincpu; - required_device m_pia; - required_device m_ptm; - required_device m_acia; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - optional_device m_via; - optional_device m_piaide; - optional_device m_harddisk; - optional_device m_ide; - - DECLARE_READ8_MEMBER(pia0_a_r); - DECLARE_READ8_MEMBER(pia0_ca1_r); - DECLARE_WRITE_LINE_MEMBER( pia0_irq_a ); - - DECLARE_WRITE8_MEMBER( ptm_o1_callback ); - DECLARE_WRITE8_MEMBER( ptm_o3_callback ); - DECLARE_WRITE_LINE_MEMBER( ptm_irq ); - - DECLARE_WRITE_LINE_MEMBER( acia_interrupt ); - DECLARE_WRITE_LINE_MEMBER( write_acia_clock ); - - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - DECLARE_READ8_MEMBER( dmf3_via_read_porta ); - DECLARE_READ8_MEMBER( dmf3_via_read_portb ); - DECLARE_WRITE8_MEMBER( dmf3_via_write_porta ); - DECLARE_WRITE_LINE_MEMBER( dmf3_via_write_ca1 ); - DECLARE_WRITE_LINE_MEMBER( dmf3_via_irq ); - - DECLARE_READ8_MEMBER(piaide_a_r); - DECLARE_READ8_MEMBER(piaide_b_r); - DECLARE_WRITE8_MEMBER(piaide_a_w); - DECLARE_WRITE8_MEMBER(piaide_b_w); - - DECLARE_WRITE8_MEMBER(swtpc09_kbd_put); - - DECLARE_READ8_MEMBER ( dmf2_dma_address_reg_r ); - DECLARE_WRITE8_MEMBER ( dmf2_dma_address_reg_w ); - DECLARE_READ8_MEMBER ( dmf2_control_reg_r ); - DECLARE_WRITE8_MEMBER ( dmf2_control_reg_w ); - - DECLARE_READ8_MEMBER ( dmf3_dma_address_reg_r ); - DECLARE_WRITE8_MEMBER ( dmf3_dma_address_reg_w ); - DECLARE_READ8_MEMBER ( dmf3_control_reg_r ); - DECLARE_WRITE8_MEMBER ( dmf3_control_reg_w ); - - DECLARE_WRITE8_MEMBER ( dc4_control_reg_w ); - - DECLARE_WRITE8_MEMBER(dat_w); - - DECLARE_DRIVER_INIT( swtpc09 ); - DECLARE_DRIVER_INIT( swtpc09i ); - DECLARE_DRIVER_INIT( swtpc09u ); - DECLARE_DRIVER_INIT( swtpc09d3 ); - - void swtpc09_fdc_dma_transfer(); - void swtpc09_irq_handler(UINT8 peripheral, UINT8 state); - - UINT8 m_term_data; // terminal keyboard value - UINT8 m_pia_counter; // this is the counter on pia porta - UINT8 m_fdc_dma_address_reg; // dmf2 or dmf3 dma extended address reg - UINT8 m_system_type; // flag to indicate hw and rom combination - UINT8 m_fdc_status; // for floppy controller - UINT8 m_via_ca1_input; // dmf3 fdc interupt is connected here - UINT8 m_dmf3_via_porta; - UINT8 m_piaide_porta; - UINT8 m_piaide_portb; - UINT8 m_active_interrupt; - UINT8 m_interrupt; - - - // TODO: move this in proper device - - /* channel_data structure holds info about each 6844 DMA channel */ - typedef struct m6844_channel_data - { - int active; - int address; - int counter; - UINT8 control; - int start_address; - int start_counter; - } m6844_channel_data; - - /* 6844 description */ - m6844_channel_data m_m6844_channel[4]; - UINT8 m_m6844_priority; - UINT8 m_m6844_interrupt; - UINT8 m_m6844_chain; - DECLARE_READ8_MEMBER ( m6844_r ); - DECLARE_WRITE8_MEMBER ( m6844_w ); - -}; - -#endif /* swtpc09_H_ */ diff --git a/src/mess/includes/tandy2k.h b/src/mess/includes/tandy2k.h deleted file mode 100644 index 761d2f0cb37..00000000000 --- a/src/mess/includes/tandy2k.h +++ /dev/null @@ -1,229 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __TANDY2K__ -#define __TANDY2K__ - -#include "emu.h" -#include "bus/centronics/ctronics.h" -#include "bus/rs232/rs232.h" -#include "cpu/i86/i186.h" -#include "cpu/mcs48/mcs48.h" -#include "formats/tandy2k_dsk.h" -#include "imagedev/harddriv.h" -#include "machine/i8255.h" -#include "machine/i8251.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/tandy2kb.h" -#include "machine/upd765.h" -#include "sound/speaker.h" -#include "video/crt9007.h" -#include "video/crt9021.h" -#include "video/crt9212.h" - -#define SCREEN_TAG "screen" -#define I80186_TAG "u76" -#define I8255A_TAG "u75" -#define I8251A_TAG "u41" -#define I8253_TAG "u40" -#define I8259A_0_TAG "u42" -#define I8259A_1_TAG "u43" -#define I8272A_TAG "u121" -#define CRT9007_TAG "u16" -#define CRT9212_0_TAG "u55" -#define CRT9212_1_TAG "u15" -#define CRT9021B_TAG "u14" -#define WD1010_TAG "u18" -#define WD1100_11_TAG "u12" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" - -class tandy2k_state : public driver_device -{ -public: - tandy2k_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, I80186_TAG), - m_uart(*this, I8251A_TAG), - m_i8255a(*this, I8255A_TAG), - m_pit(*this, I8253_TAG), - m_fdc(*this, I8272A_TAG), - m_pic0(*this, I8259A_0_TAG), - m_pic1(*this, I8259A_1_TAG), - m_vpac(*this, CRT9007_TAG), - m_drb0(*this, CRT9212_0_TAG), - m_drb1(*this, CRT9212_1_TAG), - m_vac(*this, CRT9021B_TAG), - m_palette(*this, "palette"), - m_timer_vidldsh(*this, "vidldsh"), - m_centronics(*this, CENTRONICS_TAG), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_floppy0(*this, I8272A_TAG ":0:525qd"), - m_floppy1(*this, I8272A_TAG ":1:525qd"), - m_rs232(*this, RS232_TAG), - m_kb(*this, TANDY2K_KEYBOARD_TAG), - m_hires_ram(*this, "hires_ram"), - m_char_ram(*this, "char_ram"), - m_dma_mux(0), - m_kbdclk(0), - m_kbddat(0), - m_kbdin(0), - m_extclk(0), - m_rxrdy(0), - m_txrdy(0), - m_pb_sel(0), - m_vram_base(0), - m_vidouts(0), - m_clkspd(-1), - m_clkcnt(-1), - m_blc(0), - m_bkc(0), - m_cblank(0), - m_dblc(0), - m_dbkc(0), - m_dblank(0), - m_slg(0), - m_sld(0), - m_cgra(0), - m_vidla(0), - m_outspkr(0), - m_spkrdata(0), - m_centronics_ack(0), - m_centronics_fault(0), - m_centronics_select(0), - m_centronics_perror(0), - m_centronics_busy(0) - { - for (int i = 0; i < 4; i++) - { - m_busdmarq[i] = CLEAR_LINE; - } - } - - required_device m_maincpu; - required_device m_uart; - required_device m_i8255a; - required_device m_pit; - required_device m_fdc; - required_device m_pic0; - required_device m_pic1; - required_device m_vpac; - required_device m_drb0; - required_device m_drb1; - required_device m_vac; - required_device m_palette; - required_device m_timer_vidldsh; - required_device m_centronics; - required_device m_speaker; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_rs232; - required_device m_kb; - required_shared_ptr m_hires_ram; - optional_shared_ptr m_char_ram; - - virtual void machine_start(); - virtual void device_reset_after_children(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void update_drq(); - void dma_request(int line, int state); - void speaker_update(); - - DECLARE_READ8_MEMBER( char_ram_r ); - DECLARE_WRITE8_MEMBER( char_ram_w ); - DECLARE_READ8_MEMBER( videoram_r ); - DECLARE_READ8_MEMBER( enable_r ); - DECLARE_WRITE8_MEMBER( enable_w ); - DECLARE_WRITE8_MEMBER( dma_mux_w ); - DECLARE_READ8_MEMBER( kbint_clr_r ); - DECLARE_READ16_MEMBER( vpac_r ); - DECLARE_WRITE16_MEMBER( vpac_w ); - DECLARE_READ8_MEMBER( fldtc_r ); - DECLARE_WRITE8_MEMBER( fldtc_w ); - DECLARE_WRITE8_MEMBER( addr_ctrl_w ); - DECLARE_WRITE_LINE_MEMBER( rxrdy_w ); - DECLARE_WRITE_LINE_MEMBER( txrdy_w ); - DECLARE_WRITE_LINE_MEMBER( outspkr_w ); - DECLARE_WRITE_LINE_MEMBER( intbrclk_w ); - DECLARE_WRITE_LINE_MEMBER( rfrqpulse_w ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_vlt_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_drb_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_wben_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_cblank_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_slg_w ); - DECLARE_WRITE_LINE_MEMBER( vpac_sld_w ); - DECLARE_WRITE8_MEMBER( vidla_w ); - DECLARE_WRITE8_MEMBER( drb_attr_w ); - DECLARE_WRITE_LINE_MEMBER( kbdclk_w ); - DECLARE_WRITE_LINE_MEMBER( kbddat_w ); - DECLARE_READ8_MEMBER( irq_callback ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_hdl_w ); - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - CRT9021_DRAW_CHARACTER_MEMBER( vac_draw_character ); - TIMER_DEVICE_CALLBACK_MEMBER( vidldsh_tick ); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - enum - { - LPINEN = 0, - KBDINEN, - PORTINEN - }; - - /* DMA state */ - UINT8 m_dma_mux; - int m_busdmarq[4]; - - /* keyboard state */ - int m_kbdclk; - int m_kbddat; - UINT8 m_kbdin; - - /* serial state */ - int m_extclk; - int m_rxrdy; - int m_txrdy; - - /* PPI state */ - int m_pb_sel; - - /* video state */ - UINT8 m_vram_base; - int m_vidouts; - int m_clkspd; - int m_clkcnt; - int m_blc; - int m_bkc; - int m_cblank; - UINT8 m_dblc; - UINT8 m_dbkc; - UINT8 m_dblank; - int m_slg; - int m_sld; - UINT8 m_cgra; - UINT8 m_vidla; - - /* sound state */ - int m_outspkr; - int m_spkrdata; - - int m_centronics_ack; - int m_centronics_fault; - int m_centronics_select; - int m_centronics_perror; - int m_centronics_busy; -}; - -#endif diff --git a/src/mess/includes/tdv2324.h b/src/mess/includes/tdv2324.h deleted file mode 100644 index 7a2aaf91a22..00000000000 --- a/src/mess/includes/tdv2324.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder,Jonathan Gevaryahu -#pragma once - -#ifndef __TDV2324__ -#define __TDV2324__ - - -#include "emu.h" -#include "cpu/i8085/i8085.h" -#include "cpu/m6800/m6800.h" -#include "imagedev/harddriv.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "machine/z80dart.h" -#include "video/tms9927.h" - - - -//************************************************************************** -// MACROS / CONSTANTS -//************************************************************************** - -#define P8085AH_0_TAG "17f" -#define P8259A_TAG "17d" -#define P8253_5_0_TAG "17c" -#define P8253_5_1_TAG "18c" -#define ER3400_TAG "12a" - -#define P8085AH_1_TAG "6c" -#define TMS9937NL_TAG "7e" -#define MK3887N4_TAG "15d" - -#define MC68B02P_TAG "12b" -#define FD1797PL02_TAG "fd1797" - -#define SCREEN_TAG "screen" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -class tdv2324_state : public driver_device -{ -public: - tdv2324_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, P8085AH_0_TAG), - m_subcpu(*this, P8085AH_1_TAG), - m_fdccpu(*this, MC68B02P_TAG), - m_sio(*this, MK3887N4_TAG), - m_pic(*this, P8259A_TAG), - m_pit0(*this, P8253_5_0_TAG), - m_pit1(*this, P8253_5_1_TAG), - m_tms(*this, TMS9937NL_TAG), - m_video_ram(*this, "video_ram") - { } - - required_device m_maincpu; - required_device m_subcpu; - required_device m_fdccpu; - required_device m_sio; - required_device m_pic; - required_device m_pit0; - required_device m_pit1; - required_device m_tms; - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( tdv2324_main_io_30 ); - DECLARE_READ8_MEMBER( tdv2324_main_io_e6 ); - DECLARE_WRITE8_MEMBER( tdv2324_main_io_e2 ); - - UINT8 m_sub_status; - UINT8 m_sub_data; - - // video state - required_shared_ptr m_video_ram; -}; - - -#endif diff --git a/src/mess/includes/tek405x.h b/src/mess/includes/tek405x.h deleted file mode 100644 index f2a70fbd86e..00000000000 --- a/src/mess/includes/tek405x.h +++ /dev/null @@ -1,162 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TEK405X__ -#define __TEK405X__ - -#include "emu.h" -#include "cpu/m6800/m6800.h" -#include "machine/ram.h" -#include "machine/6821pia.h" -#include "machine/6850acia.h" -#include "machine/clock.h" -#include "bus/ieee488/ieee488.h" -#include "machine/ram.h" -#include "sound/speaker.h" -#include "video/vector.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define MC6800_TAG "u61" -#define MC6820_Y_TAG "u561" -#define MC6820_X_TAG "u565" -#define MC6820_TAPE_TAG "u361" -#define MC6820_KB_TAG "u461" -#define MC6820_GPIB_TAG "u265" -#define MC6820_COM_TAG "u5" -#define MC6850_TAG "u25" -#define RS232_TAG "rs232" -#define SCREEN_TAG "screen" - -#define AM2901A_TAG "am2901a" - -class tek4051_state : public driver_device -{ -public: - tek4051_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, MC6800_TAG), - m_gpib_pia(*this, MC6820_GPIB_TAG), - m_com_pia(*this, MC6820_COM_TAG), - m_acia(*this, MC6850_TAG), - m_acia_clock(*this, "acia_clock"), - m_gpib(*this, IEEE488_TAG), - m_speaker(*this, "speaker"), - m_ram(*this, RAM_TAG), - m_rom(*this, MC6800_TAG), - m_bsofl_rom(*this, "020_0147_00"), - m_bscom_rom(*this, "021_0188_00"), - m_special(*this, "SPECIAL") - { - } - - required_device m_maincpu; - required_device m_gpib_pia; - required_device m_com_pia; - required_device m_acia; - required_device m_acia_clock; - required_device m_gpib; - required_device m_speaker; - required_device m_ram; - required_memory_region m_rom; - required_memory_region m_bsofl_rom; - required_memory_region m_bscom_rom; - required_ioport m_special; - - virtual void machine_start(); - - virtual void video_start(); - - void bankswitch(UINT8 data); - void update_irq(); - void update_nmi(); - void scan_keyboard(); - - DECLARE_WRITE8_MEMBER( lbs_w ); - - DECLARE_READ8_MEMBER( x_pia_pa_r ); - DECLARE_WRITE8_MEMBER( x_pia_pa_w ); - DECLARE_WRITE8_MEMBER( x_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( adot_w ); - DECLARE_WRITE_LINE_MEMBER( bufclk_w ); - DECLARE_WRITE_LINE_MEMBER( x_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( x_pia_irqb_w ); - - DECLARE_READ8_MEMBER( sa_r ); - DECLARE_WRITE8_MEMBER( y_pia_pa_w ); - DECLARE_WRITE8_MEMBER( sb_w ); - DECLARE_WRITE_LINE_MEMBER( sot_w ); - DECLARE_WRITE_LINE_MEMBER( y_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( y_pia_irqb_w ); - - DECLARE_READ8_MEMBER( kb_pia_pa_r ); - DECLARE_READ8_MEMBER( kb_pia_pb_r ); - DECLARE_WRITE8_MEMBER( kb_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( kb_halt_w ); - DECLARE_WRITE_LINE_MEMBER( kb_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( kb_pia_irqb_w ); - - DECLARE_READ8_MEMBER( tape_pia_pa_r ); - DECLARE_WRITE8_MEMBER( tape_pia_pa_w ); - DECLARE_WRITE8_MEMBER( tape_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( tape_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( tape_pia_irqb_w ); - - DECLARE_WRITE8_MEMBER( dio_w ); - DECLARE_READ8_MEMBER( gpib_pia_pb_r ); - DECLARE_WRITE8_MEMBER( gpib_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( talk_w ); - DECLARE_WRITE_LINE_MEMBER( gpib_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( gpib_pia_irqb_w ); - - DECLARE_WRITE8_MEMBER( com_pia_pa_w ); - DECLARE_READ8_MEMBER( com_pia_pb_r ); - DECLARE_WRITE8_MEMBER( com_pia_pb_w ); - DECLARE_WRITE_LINE_MEMBER( com_pia_irqa_w ); - DECLARE_WRITE_LINE_MEMBER( com_pia_irqb_w ); - DECLARE_WRITE_LINE_MEMBER( acia_irq_w ); - DECLARE_WRITE_LINE_MEMBER( write_acia_clock ); - - // interrupts - int m_x_pia_irqa; - int m_x_pia_irqb; - int m_y_pia_irqa; - int m_y_pia_irqb; - int m_tape_pia_irqa; - int m_tape_pia_irqb; - int m_kb_pia_irqa; - int m_kb_pia_irqb; - int m_gpib_pia_irqa; - int m_gpib_pia_irqb; - int m_com_pia_irqa; - int m_com_pia_irqb; - int m_acia_irq; - - // keyboard - int m_kbhalt; - int m_kc; - - // GPIB - int m_talk; - TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); -}; - -class tek4052_state : public driver_device -{ -public: - tek4052_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, AM2901A_TAG), - m_ram(*this, RAM_TAG) - { } - - required_device m_maincpu; - required_device m_ram; - - virtual void machine_start(); - - virtual void video_start(); -}; - -#endif diff --git a/src/mess/includes/thomson.h b/src/mess/includes/thomson.h deleted file mode 100644 index 19c07cf763f..00000000000 --- a/src/mess/includes/thomson.h +++ /dev/null @@ -1,713 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Antoine Mine -/********************************************************************** - - Copyright (C) Antoine Mine' 2006 - - Thomson 8-bit computers - -**********************************************************************/ - -#ifndef _THOMSON_H_ -#define _THOMSON_H_ - -#include "emu.h" -#include "bus/rs232/rs232.h" -#include "cpu/m6809/m6809.h" -#include "machine/6821pia.h" -#include "machine/mc6846.h" -#include "machine/6850acia.h" -#include "machine/mos6551.h" -#include "sound/dac.h" -#include "audio/mea8000.h" -#include "bus/centronics/ctronics.h" -#include "imagedev/cassette.h" -#include "machine/mc6843.h" -#include "machine/mc6846.h" -#include "machine/mc6854.h" -#include "formats/thom_cas.h" -#include "formats/thom_dsk.h" -#include "machine/thomflop.h" -#include "imagedev/floppy.h" -#include "machine/ram.h" - -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -/* 6821 PIAs */ -#define THOM_PIA_SYS "pia_0" /* system PIA */ -#define THOM_PIA_GAME "pia_1" /* music & game PIA (joypad + sound) */ -#define THOM_PIA_IO "pia_2" /* CC 90-232 I/O extension (parallel & RS-232) */ -#define THOM_PIA_MODEM "pia_3" /* MD 90-120 MODEM extension */ - -/* sound ports */ -#define THOM_SOUND_BUZ 0 /* 1-bit buzzer */ -#define THOM_SOUND_GAME 1 /* 6-bit game port DAC */ -#define THOM_SOUND_SPEECH 2 /* speech synthesis */ - -/* bank-switching */ -#define THOM_CART_BANK "bank2" /* cartridge ROM */ -#define THOM_RAM_BANK "bank3" /* data RAM */ -#define THOM_FLOP_BANK "bank4" /* external floppy controller ROM */ -#define THOM_BASE_BANK "bank5" /* system RAM */ - -/* bank-switching */ -#define TO8_SYS_LO "bank5" /* system RAM low 2 Kb */ -#define TO8_SYS_HI "bank6" /* system RAM hi 2 Kb */ -#define TO8_DATA_LO "bank7" /* data RAM low 2 Kb */ -#define TO8_DATA_HI "bank8" /* data RAM hi 2 Kb */ -#define TO8_BIOS_BANK "bank9" /* BIOS ROM */ -#define MO6_CART_LO "bank10" -#define MO6_CART_HI "bank11" - - -/* original screen dimension (may be different from emulated screen!) */ -#define THOM_ACTIVE_WIDTH 320 -#define THOM_BORDER_WIDTH 56 -#define THOM_ACTIVE_HEIGHT 200 -#define THOM_BORDER_HEIGHT 47 -#define THOM_TOTAL_WIDTH 432 -#define THOM_TOTAL_HEIGHT 294 - -/* Emulated screen dimension may be doubled to allow hi-res 640x200 mode. - Emulated screen can have smaller borders. - */ - -/* maximum number of video pages: - 1 for TO7 generation (including MO5) - 4 for TO8 generation (including TO9, MO6) - */ -#define THOM_NB_PAGES 4 - -/* page 0 is banked */ -#define THOM_VRAM_BANK "bank1" - - -struct thom_vsignal { - unsigned count; /* pixel counter */ - unsigned init; /* 1 -> active vertical windos, 0 -> border/VBLANK */ - unsigned inil; /* 1 -> active horizontal window, 0 -> border/HBLANK */ - unsigned lt3; /* bit 3 of us counter */ - unsigned line; /* line counter */ -}; - - -class thomson_state : public driver_device -{ -public: - thomson_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_mc6854(*this, "mc6854"), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_buzzer(*this, "buzzer"), - m_dac(*this, "dac"), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_pia_sys(*this, THOM_PIA_SYS), - m_pia_game(*this, THOM_PIA_GAME), - m_acia(*this, "acia6850"), - m_mea8000(*this, "mea8000"), - m_ram(*this, RAM_TAG), - m_mc6846(*this, "mc6846"), - m_mc6843(*this, "mc6843"), - m_acia6850(*this, "acia6850"), - m_screen(*this, "screen"), - m_io_game_port_directions(*this, "game_port_directions"), - m_io_game_port_buttons(*this, "game_port_buttons"), - m_io_mouse_x(*this, "mouse_x"), - m_io_mouse_y(*this, "mouse_y"), - m_io_mouse_button(*this, "mouse_button"), - m_io_lightpen_x(*this, "lightpen_x"), - m_io_lightpen_y(*this, "lightpen_y"), - m_io_lightpen_button(*this, "lightpen_button"), - m_io_config(*this, "config"), - m_io_vconfig(*this, "vconfig"), - m_io_mconfig(*this, "mconfig"), - m_io_fconfig(*this, "fconfig"), - m_io_keyboard(*this, "keyboard"), - m_vrambank(*this, THOM_VRAM_BANK), - m_cartbank(*this, THOM_CART_BANK), - m_rambank(*this, THOM_RAM_BANK), - m_flopbank(*this, THOM_FLOP_BANK), - m_basebank(*this, THOM_BASE_BANK), - m_syslobank(*this, TO8_SYS_LO), - m_syshibank(*this, TO8_SYS_HI), - m_datalobank(*this, TO8_DATA_LO), - m_datahibank(*this, TO8_DATA_HI), - m_biosbank(*this, TO8_BIOS_BANK), - m_cartlobank(*this, MO6_CART_LO), - m_carthibank(*this, MO6_CART_HI) - { - } - - DECLARE_FLOPPY_FORMATS(cd90_640_formats); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( to7_cartridge ); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mo5_cartridge ); - - DECLARE_WRITE_LINE_MEMBER( to7_set_cassette_motor ); - DECLARE_WRITE_LINE_MEMBER( mo5_set_cassette_motor ); - DECLARE_WRITE_LINE_MEMBER( thom_dev_irq_0 ); - DECLARE_WRITE_LINE_MEMBER( thom_irq_1 ); - DECLARE_WRITE_LINE_MEMBER( thom_firq_1 ); - DECLARE_WRITE8_MEMBER( to7_cartridge_w ); - DECLARE_READ8_MEMBER( to7_cartridge_r ); - DECLARE_WRITE8_MEMBER( to7_timer_port_out ); - DECLARE_WRITE8_MEMBER( to7_timer_cp2_out ); - DECLARE_READ8_MEMBER( to7_timer_port_in ); - DECLARE_WRITE8_MEMBER( to7_timer_tco_out ); - DECLARE_WRITE_LINE_MEMBER( to7_sys_cb2_out ); - DECLARE_WRITE8_MEMBER( to7_sys_portb_out ); - DECLARE_READ8_MEMBER( to7_sys_porta_in ); - DECLARE_READ8_MEMBER( to7_sys_portb_in ); - DECLARE_WRITE_LINE_MEMBER( to7_modem_cb ); - DECLARE_WRITE_LINE_MEMBER( to7_modem_tx_w ); - DECLARE_WRITE_LINE_MEMBER( write_acia_clock ); - DECLARE_READ8_MEMBER( to7_modem_mea8000_r ); - DECLARE_WRITE8_MEMBER( to7_modem_mea8000_w ); - DECLARE_READ8_MEMBER( to7_game_porta_in ); - DECLARE_READ8_MEMBER( to7_game_portb_in ); - DECLARE_WRITE8_MEMBER( to7_game_portb_out ); - DECLARE_WRITE_LINE_MEMBER( to7_game_cb2_out ); - TIMER_CALLBACK_MEMBER( to7_game_update_cb ); - DECLARE_READ8_MEMBER( to7_midi_r ); - DECLARE_WRITE8_MEMBER( to7_midi_w ); - DECLARE_MACHINE_RESET( to7 ); - DECLARE_MACHINE_START( to7 ); - DECLARE_WRITE_LINE_MEMBER( to770_sys_cb2_out ); - DECLARE_READ8_MEMBER( to770_sys_porta_in ); - void to7_update_cart_bank_postload(); - void to770_update_ram_bank_postload(); - DECLARE_WRITE8_MEMBER( to770_sys_portb_out ); - DECLARE_WRITE8_MEMBER( to770_timer_port_out ); - DECLARE_READ8_MEMBER( to770_gatearray_r ); - DECLARE_WRITE8_MEMBER( to770_gatearray_w ); - DECLARE_MACHINE_RESET( to770 ); - DECLARE_MACHINE_START( to770 ); - void to7_lightpen_cb( int step ); - void mo5_lightpen_cb( int step ); - TIMER_CALLBACK_MEMBER( mo5_periodic_cb ); - DECLARE_WRITE8_MEMBER( mo5_sys_porta_out ); - DECLARE_READ8_MEMBER( mo5_sys_porta_in ); - DECLARE_WRITE8_MEMBER( mo5_sys_portb_out ); - DECLARE_READ8_MEMBER( mo5_sys_portb_in ); - DECLARE_READ8_MEMBER( mo5_gatearray_r ); - DECLARE_WRITE8_MEMBER( mo5_gatearray_w ); - void mo5_update_cart_bank_postload(); - DECLARE_WRITE8_MEMBER( mo5_cartridge_w ); - DECLARE_READ8_MEMBER( mo5_cartridge_r ); - DECLARE_WRITE8_MEMBER( mo5_ext_w ); - DECLARE_MACHINE_RESET( mo5 ); - DECLARE_MACHINE_START( mo5 ); - DECLARE_WRITE8_MEMBER( to9_ieee_w ); - DECLARE_READ8_MEMBER( to9_ieee_r ); - DECLARE_READ8_MEMBER( to9_gatearray_r ); - DECLARE_WRITE8_MEMBER( to9_gatearray_w ); - DECLARE_READ8_MEMBER( to9_vreg_r ); - DECLARE_WRITE8_MEMBER( to9_vreg_w ); - void to9_update_cart_bank_postload(); - DECLARE_WRITE8_MEMBER( to9_cartridge_w ); - DECLARE_READ8_MEMBER( to9_cartridge_r ); - void to9_update_ram_bank_postload(); - DECLARE_READ8_MEMBER( to9_kbd_r ); - DECLARE_WRITE8_MEMBER( to9_kbd_w ); - TIMER_CALLBACK_MEMBER( to9_kbd_timer_cb ); - DECLARE_READ8_MEMBER( to9_sys_porta_in ); - DECLARE_WRITE8_MEMBER( to9_sys_porta_out ); - DECLARE_WRITE8_MEMBER( to9_sys_portb_out ); - DECLARE_WRITE8_MEMBER( to9_timer_port_out ); - DECLARE_MACHINE_RESET( to9 ); - DECLARE_MACHINE_START( to9 ); - TIMER_CALLBACK_MEMBER( to8_kbd_timer_cb ); - void to8_update_floppy_bank_postload(); - void to8_update_ram_bank_postload(); - void to8_update_cart_bank_postload(); - DECLARE_WRITE8_MEMBER( to8_cartridge_w ); - DECLARE_READ8_MEMBER( to8_cartridge_r ); - DECLARE_READ8_MEMBER( to8_floppy_r ); - DECLARE_WRITE8_MEMBER( to8_floppy_w ); - DECLARE_READ8_MEMBER( to8_gatearray_r ); - DECLARE_WRITE8_MEMBER( to8_gatearray_w ); - DECLARE_READ8_MEMBER( to8_vreg_r ); - DECLARE_WRITE8_MEMBER( to8_vreg_w ); - DECLARE_READ8_MEMBER( to8_sys_porta_in ); - DECLARE_WRITE8_MEMBER( to8_sys_portb_out ); - DECLARE_READ8_MEMBER( to8_timer_port_in ); - DECLARE_WRITE8_MEMBER( to8_timer_port_out ); - DECLARE_WRITE8_MEMBER( to8_timer_cp2_out ); - void to8_lightpen_cb( int step ); - DECLARE_MACHINE_RESET( to8 ); - DECLARE_MACHINE_START( to8 ); - DECLARE_READ8_MEMBER( to9p_timer_port_in ); - DECLARE_WRITE8_MEMBER( to9p_timer_port_out ); - DECLARE_MACHINE_RESET( to9p ); - DECLARE_MACHINE_START( to9p ); - void mo6_update_ram_bank_postload(); - void mo6_update_cart_bank_postload(); - DECLARE_WRITE8_MEMBER( mo6_cartridge_w ); - DECLARE_READ8_MEMBER( mo6_cartridge_r ); - DECLARE_WRITE8_MEMBER( mo6_ext_w ); - DECLARE_WRITE_LINE_MEMBER( mo6_centronics_busy ); - DECLARE_WRITE8_MEMBER( mo6_game_porta_out ); - DECLARE_WRITE_LINE_MEMBER( mo6_game_cb2_out ); - TIMER_CALLBACK_MEMBER( mo6_game_update_cb ); - DECLARE_READ8_MEMBER( mo6_sys_porta_in ); - DECLARE_READ8_MEMBER( mo6_sys_portb_in ); - DECLARE_WRITE8_MEMBER( mo6_sys_porta_out ); - DECLARE_WRITE8_MEMBER( mo6_sys_portb_out ); - DECLARE_WRITE_LINE_MEMBER( mo6_sys_cb2_out ); - DECLARE_READ8_MEMBER( mo6_gatearray_r ); - DECLARE_WRITE8_MEMBER( mo6_gatearray_w ); - DECLARE_READ8_MEMBER( mo6_vreg_r ); - DECLARE_WRITE8_MEMBER( mo6_vreg_w ); - DECLARE_MACHINE_RESET( mo6 ); - DECLARE_MACHINE_START( mo6 ); - DECLARE_READ8_MEMBER( mo5nr_net_r ); - DECLARE_WRITE8_MEMBER( mo5nr_net_w ); - DECLARE_READ8_MEMBER( mo5nr_prn_r ); - DECLARE_WRITE8_MEMBER( mo5nr_prn_w ); - DECLARE_READ8_MEMBER( mo5nr_sys_portb_in ); - DECLARE_WRITE8_MEMBER( mo5nr_sys_porta_out ); - DECLARE_MACHINE_RESET( mo5nr ); - DECLARE_MACHINE_START( mo5nr ); - - TIMER_CALLBACK_MEMBER( thom_lightpen_step ); - TIMER_CALLBACK_MEMBER( thom_scanline_start ); - UINT32 screen_update_thom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER( to7_vram_w ); - DECLARE_WRITE8_MEMBER( to770_vram_w ); - DECLARE_WRITE8_MEMBER( to8_sys_lo_w ); - DECLARE_WRITE8_MEMBER( to8_sys_hi_w ); - DECLARE_WRITE8_MEMBER( to8_data_lo_w ); - DECLARE_WRITE8_MEMBER( to8_data_hi_w ); - DECLARE_WRITE8_MEMBER( to8_vcart_w ); - DECLARE_WRITE8_MEMBER( mo6_vcart_lo_w ); - DECLARE_WRITE8_MEMBER( mo6_vcart_hi_w ); - TIMER_CALLBACK_MEMBER( thom_set_init ); - void to770_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mo5_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mo5alt_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void to9_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4alt_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4althalf_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap16_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mode80_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mode80_to9_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void page1_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void page2_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlay_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlayhalf_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlay3_scandraw_16( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void to770_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mo5_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mo5alt_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void to9_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4alt_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap4althalf_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void bitmap16_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mode80_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void mode80_to9_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void page1_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void page2_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlay_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlayhalf_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void overlay3_scandraw_8( UINT8* vram, UINT16* dst, UINT16* pal, int org, int len ); - void thom_vblank( screen_device &screen, bool state ); - DECLARE_VIDEO_START( thom ); - - DECLARE_READ8_MEMBER( to7_5p14_r ); - DECLARE_WRITE8_MEMBER( to7_5p14_w ); - DECLARE_READ8_MEMBER( to7_5p14sd_r ); - DECLARE_WRITE8_MEMBER( to7_5p14sd_w ); - DECLARE_READ8_MEMBER( to7_qdd_r ); - DECLARE_WRITE8_MEMBER( to7_qdd_w ); - TIMER_CALLBACK_MEMBER( thmfc_floppy_cmd_complete_cb ); - DECLARE_READ8_MEMBER( thmfc_floppy_r ); - DECLARE_WRITE8_MEMBER( thmfc_floppy_w ); - TIMER_CALLBACK_MEMBER( ans4 ); - TIMER_CALLBACK_MEMBER( ans3 ); - TIMER_CALLBACK_MEMBER( ans2 ); - TIMER_CALLBACK_MEMBER( ans ); - DECLARE_READ8_MEMBER( to7_network_r ); - DECLARE_WRITE8_MEMBER( to7_network_w ); - DECLARE_READ8_MEMBER( to7_floppy_r ); - DECLARE_WRITE8_MEMBER( to7_floppy_w ); - DECLARE_READ8_MEMBER( to9_floppy_r ); - DECLARE_WRITE8_MEMBER( to9_floppy_w ); - WRITE_LINE_MEMBER( fdc_index_0_w ); - WRITE_LINE_MEMBER( fdc_index_1_w ); - WRITE_LINE_MEMBER( fdc_index_2_w ); - WRITE_LINE_MEMBER( fdc_index_3_w ); - void thomson_index_callback(legacy_floppy_image_device *device, int state); - DECLARE_PALETTE_INIT(thom); - DECLARE_PALETTE_INIT(mo5); - - optional_device m_mc6854; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - - int m_centronics_busy; - int m_centronics_perror; - - MC6854_OUT_FRAME_CB(to7_network_got_frame); - -protected: - required_device m_maincpu; - required_device m_cassette; - required_device m_buzzer; - required_device m_dac; - optional_device m_centronics; - optional_device m_cent_data_out; - required_device m_pia_sys; - required_device m_pia_game; - required_device m_acia; - required_device m_mea8000; - required_device m_ram; - optional_device m_mc6846; - optional_device m_mc6843; - optional_device m_acia6850; - required_device m_screen; - required_ioport m_io_game_port_directions; - required_ioport m_io_game_port_buttons; - required_ioport m_io_mouse_x; - required_ioport m_io_mouse_y; - required_ioport m_io_mouse_button; - required_ioport m_io_lightpen_x; - required_ioport m_io_lightpen_y; - required_ioport m_io_lightpen_button; - required_ioport m_io_config; - required_ioport m_io_vconfig; - optional_ioport m_io_mconfig; - required_ioport m_io_fconfig; - required_ioport_array<10> m_io_keyboard; - required_memory_bank m_vrambank; - optional_memory_bank m_cartbank; - optional_memory_bank m_rambank; - required_memory_bank m_flopbank; - required_memory_bank m_basebank; - required_memory_bank m_syslobank; - optional_memory_bank m_syshibank; - optional_memory_bank m_datalobank; - optional_memory_bank m_datahibank; - optional_memory_bank m_biosbank; - optional_memory_bank m_cartlobank; - optional_memory_bank m_carthibank; - - /* bank logging and optimisations */ - int m_old_cart_bank; - int m_old_cart_bank_was_read_only; - int m_old_ram_bank; - int m_old_floppy_bank; - /* buffer storing demodulated bits, only for k7 and with speed hack */ - UINT32 m_to7_k7_bitsize; - UINT8* m_to7_k7_bits; - /* several devices on the same irqs */ - UINT8 m_thom_irq; - UINT8 m_thom_firq; - /* ------------ cartridge ------------ */ - UINT8 m_thom_cart_nb_banks; /* number of 16 KB banks (up to 4) */ - UINT8 m_thom_cart_bank; /* current bank */ - UINT8 m_to7_lightpen_step; - UINT8 m_to7_lightpen; - UINT8 m_to7_modem_tx; - /* calls to7_game_update_cb periodically */ - emu_timer* m_to7_game_timer; - UINT8 m_to7_game_sound; - UINT8 m_to7_game_mute; - emu_timer* m_mo5_periodic_timer; - UINT8 m_mo5_reg_cart; /* 0xa7cb bank switch */ - UINT8 m_to9_palette_data[32]; - UINT8 m_to9_palette_idx; - UINT8 m_to9_soft_bank; - UINT8 m_to9_kbd_parity; /* 0=even, 1=odd, 2=no parity */ - UINT8 m_to9_kbd_intr; /* interrupt mode */ - UINT8 m_to9_kbd_in; /* data from keyboard */ - UINT8 m_to9_kbd_status; /* status */ - UINT8 m_to9_kbd_overrun; /* character lost */ - UINT8 m_to9_kbd_periph; /* peripherial mode */ - UINT8 m_to9_kbd_byte_count; /* byte-count in peripherial mode */ - UINT16 m_to9_mouse_x; - UINT16 m_to9_mouse_y; - UINT8 m_to9_kbd_last_key; /* for key repetition */ - UINT16 m_to9_kbd_key_count; - UINT8 m_to9_kbd_caps; /* caps-lock */ - UINT8 m_to9_kbd_pad; /* keypad outputs special codes */ - emu_timer* m_to9_kbd_timer; - UINT8 m_to8_kbd_ack; /* 1 = cpu inits / accepts transfers */ - UINT16 m_to8_kbd_data; /* data to transmit */ - UINT16 m_to8_kbd_step; /* transmission automaton state */ - UINT8 m_to8_kbd_last_key; /* last key (for repetition) */ - UINT32 m_to8_kbd_key_count; /* keypress time (for repetition) */ - UINT8 m_to8_kbd_caps; /* caps lock */ - emu_timer* m_to8_kbd_timer; /* bit-send */ - emu_timer* m_to8_kbd_signal; /* signal from CPU */ - UINT8 m_to8_data_vpage; - UINT8 m_to8_cart_vpage; - UINT8 m_to8_reg_ram; - UINT8 m_to8_reg_cart; - UINT8 m_to8_reg_sys1; - UINT8 m_to8_reg_sys2; - UINT8 m_to8_lightpen_intr; - UINT8 m_to8_soft_select; - UINT8 m_to8_soft_bank; - UINT8 m_to8_bios_bank; - - /* We allow choosing dynamically: - - the border size - - whether we use 640 pixels or 320 pixels in an active row - (now this is automatically choosen by default for each frame) - */ - UINT16 m_thom_bwidth; - UINT16 m_thom_bheight; - /* border size */ - UINT8 m_thom_hires; - /* 0 = low res: 320x200 active area (faster) - 1 = hi res: 640x200 active area (can represent all video modes) - */ - UINT8 m_thom_hires_better; - /* 1 = a 640 mode was used in the last frame */ - /* we use our own video timing to precisely cope with VBLANK and HBLANK */ - emu_timer* m_thom_video_timer; /* time elapsed from beginning of frame */ - /* number of lightpen call-backs per frame */ - int m_thom_lightpen_nb; - /* called thom_lightpen_nb times */ - emu_timer *m_thom_lightpen_timer; - /* lightpen callback function to call from timer */ - void (thomson_state::*m_thom_lightpen_cb)(int step); - UINT8* m_thom_vram; /* pointer to video memory */ - emu_timer* m_thom_scanline_timer; /* scan-line udpate */ - UINT16 m_thom_last_pal[16]; /* palette at last scanline start */ - UINT16 m_thom_pal[16]; /* current palette */ - UINT8 m_thom_pal_changed; /* whether pal != old_pal */ - UINT8 m_thom_border_index; /* current border color index */ - /* the left and right border color for each row (including top and bottom - border rows); -1 means unchanged wrt last scanline - */ - INT16 m_thom_border_l[THOM_TOTAL_HEIGHT+1]; - INT16 m_thom_border_r[THOM_TOTAL_HEIGHT+1]; - /* active area, updated one scan-line at a time every 64us, - then blitted in screen_update - */ - UINT16 m_thom_vbody[640*200]; - UINT8 m_thom_vmode; /* current vide mode */ - UINT8 m_thom_vpage; /* current video page */ - /* this stores the video mode & page at each GPL in the current line - (-1 means unchanged) - */ - INT16 m_thom_vmodepage[41]; - UINT8 m_thom_vmodepage_changed; - /* one dirty flag for each video memory line */ - UINT8 m_thom_vmem_dirty[205]; - /* set to 1 if undirty scanlines need to be redrawn due to other video state - changes */ - UINT8 m_thom_vstate_dirty; - UINT8 m_thom_vstate_last_dirty; - UINT32 m_thom_mode_point; - UINT32 m_thom_floppy_wcount; - UINT32 m_thom_floppy_rcount; - emu_timer *m_thom_init_timer; - void (thomson_state::*m_thom_init_cb)( int init ); - - int to7_get_cassette(); - void to7_set_cassette( int data ); - int mo5_get_cassette(); - void mo5_set_cassette( int data ); - void thom_set_irq( int line, int state ); - void thom_set_firq( int line, int state ); - void thom_irq_reset(); - void thom_irq_init(); - void thom_irq_0( int state ); - void thom_irq_3( int state ); - void thom_firq_2( int state ); - void thom_irq_4( int state ); - void thom_set_caps_led( int led ); - void to7_update_cart_bank(); - void to7_set_init( int init ); - void to7_modem_reset(); - void to7_modem_init(); - UINT8 to7_get_mouse_signal(); - void to7_game_sound_update(); - void to7_game_init(); - void to7_game_reset(); - void to7_midi_reset(); - void to7_midi_init(); - void to770_update_ram_bank(); - void mo5_init_timer(); - void mo5_update_cart_bank(); - void to9_set_video_mode( UINT8 data, int style ); - void to9_palette_init(); - void to9_update_cart_bank(); - void to9_update_ram_bank(); - int to9_kbd_ktest(); - void to9_kbd_update_irq(); - void to9_kbd_send( UINT8 data, int parity ); - int to9_kbd_get_key(); - void to9_kbd_reset(); - void to9_kbd_init(); - int to8_kbd_ktest(); - int to8_kbd_get_key(); - void to8_kbd_timer_func(); - void to8_kbd_set_ack( int data ); - void to8_kbd_reset(); - void to8_kbd_init(); - void to8_update_floppy_bank(); - void to8_update_ram_bank(); - void to8_update_cart_bank(); - void to8_floppy_init(); - void to8_floppy_reset(); - void mo6_update_ram_bank(); - void mo6_update_cart_bank(); - void mo6_game_init(); - void mo6_game_reset(); - void mo5nr_game_init(); - void mo5nr_game_reset(); - - int thom_update_screen_size(); - unsigned thom_video_elapsed(); - struct thom_vsignal thom_get_vsignal(); - void thom_get_lightpen_pos( int*x, int* y ); - struct thom_vsignal thom_get_lightpen_vsignal( int xdec, int ydec, int xdec2 ); - void thom_set_lightpen_callback( int nb ); - int thom_mode_is_hires( int mode ); - void thom_border_changed(); - void thom_gplinfo_changed(); - void thom_set_border_color( unsigned index ); - void thom_set_palette( unsigned index, UINT16 color ); - void thom_set_video_mode( unsigned mode ); - void thom_set_video_page( unsigned page ); - void thom_set_mode_point( int point ); - void thom_floppy_active( int write ); - unsigned to7_lightpen_gpl( int decx, int decy ); - void thom_configure_palette( double gamma, const UINT16* pal, palette_device& palette ); - - int thom_floppy_make_addr( chrn_id id, UINT8* dst, int sector_size ); - int thom_floppy_make_sector( legacy_floppy_image_device* img, chrn_id id, UINT8* dst, int sector_size ); - int thom_floppy_make_track( legacy_floppy_image_device* img, UINT8* dst, int sector_size, int side ); - int thom_qdd_make_addr( int sector, UINT8* dst ); - int thom_qdd_make_sector( legacy_floppy_image_device* img, int sector, UINT8* dst ); - int thom_qdd_make_disk ( legacy_floppy_image_device* img, UINT8* dst ); - void to7_5p14_reset(); - void to7_5p14_init(); - void to7_5p14_index_pulse_callback( device_t *controller,legacy_floppy_image_device *image, int state ); - void to7_5p14sd_reset(); - void to7_5p14sd_init(); - void to7_qdd_index_pulse_cb( device_t *controller,legacy_floppy_image_device *image, int state ); - legacy_floppy_image_device * to7_qdd_image(); - void to7_qdd_stat_update(); - UINT8 to7_qdd_read_byte(); - void to7_qdd_write_byte( UINT8 data ); - void to7_qdd_reset(); - void to7_qdd_init(); - legacy_floppy_image_device * thmfc_floppy_image(); - int thmfc_floppy_is_qdd( legacy_floppy_image_device *image ); - void thmfc_floppy_index_pulse_cb( device_t *controller,legacy_floppy_image_device *image, int state ); - int thmfc_floppy_find_sector( chrn_id* dst ); - void thmfc_floppy_cmd_complete(); - UINT8 thmfc_floppy_read_byte(); - UINT8 thmfc_floppy_raw_read_byte(); - void thmfc_floppy_qdd_write_byte( UINT8 data ); - void thmfc_floppy_write_byte( UINT8 data ); - void thmfc_floppy_format_byte( UINT8 data ); - void thmfc_floppy_reset(); - void thmfc_floppy_init(); - void to7_network_init(); - void to7_network_reset(); - void to7_floppy_init( void* base ); - void to7_floppy_reset(); - void to9_floppy_init(void* int_base, void* ext_base); - void to9_floppy_reset(); - void to7_midi_update_irq ( ); - void to7_midi_ready_to_send_cb( ); -}; - -/*----------- defined in video/thomson.c -----------*/ - -/* - TO7 video: - one line (64 us) = - 56 left border pixels ( 7 us) - + 320 active pixels (40 us) - + 56 right border pixels ( 7 us) - + horizontal retrace (10 us) - - one image (20 ms) = - 47 top border lines (~3 ms) - + 200 active lines (12.8 ms) - + 47 bottom border lines (~3 ms) - + vertical retrace (~1 ms) - - TO9 and up introduced a half (160 pixels) and double (640 pixels) - horizontal mode, but still in 40 us (no change in refresh rate). -*/ - - -/***************************** dimensions **************************/ - - -/*********************** video signals *****************************/ - -/***************************** commons *****************************/ - - -/* video modes */ -#define THOM_VMODE_TO770 0 -#define THOM_VMODE_MO5 1 -#define THOM_VMODE_BITMAP4 2 -#define THOM_VMODE_BITMAP4_ALT 3 -#define THOM_VMODE_80 4 -#define THOM_VMODE_BITMAP16 5 -#define THOM_VMODE_PAGE1 6 -#define THOM_VMODE_PAGE2 7 -#define THOM_VMODE_OVERLAY 8 -#define THOM_VMODE_OVERLAY3 9 -#define THOM_VMODE_TO9 10 -#define THOM_VMODE_80_TO9 11 -#define THOM_VMODE_BITMAP4_ALT_HALF 12 -#define THOM_VMODE_MO5_ALT 13 -#define THOM_VMODE_OVERLAY_HALF 14 -#define THOM_VMODE_NB 15 - - -class to7_io_line_device : public device_t -{ -public: - // construction/destruction - to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - /* read data register */ - DECLARE_READ8_MEMBER(porta_in); - - /* write data register */ - DECLARE_WRITE8_MEMBER(porta_out); - - DECLARE_WRITE_LINE_MEMBER(write_rxd); - DECLARE_WRITE_LINE_MEMBER(write_cts); - DECLARE_WRITE_LINE_MEMBER(write_dsr); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - -protected: - // device-level overrides - virtual void device_start(); - machine_config_constructor device_mconfig_additions() const; - -private: - required_device m_pia_io; - required_device m_rs232; - int m_last_low; - int m_centronics_busy; - int m_rxd; - int m_cts; - int m_dsr; -}; - -extern const device_type TO7_IO_LINE; - -#define MCFG_TO7_IO_LINE_ADD(_tag) \ - MCFG_DEVICE_ADD((_tag), TO7_IO_LINE, 0) - -#endif /* _THOMSON_H_ */ diff --git a/src/mess/includes/ti85.h b/src/mess/includes/ti85.h deleted file mode 100644 index d77433eaf21..00000000000 --- a/src/mess/includes/ti85.h +++ /dev/null @@ -1,229 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Krzysztof Strzecha,Jon Sturm -/***************************************************************************** - * - * includes/ti85.h - * - ****************************************************************************/ - -#ifndef TI85_H_ -#define TI85_H_ - -#include "imagedev/snapquik.h" -#include "video/t6a04.h" -#include "machine/bankdev.h" -#include "sound/speaker.h" -#include "machine/nvram.h" -#include "machine/intelfsh.h" - - -/* model */ -enum ti85_model { - TI81, - TI81v2, - TI82, - TI83, - TI85, - TI86, - TI83P, - TI83PSE, - TI84P, - TI84PSE -}; - -typedef struct -{ - UINT8 loop; - UINT8 setup; - float divsor; - bool interrupt; - UINT8 max; - UINT8 count; -} ti83pse_timer; - -typedef enum TI83PSE_CTIMER -{ - CRYSTAL_TIMER1 = 0, - CRYSTAL_TIMER2, - CRYSTAL_TIMER3, - HW_TIMER1, - HW_TIMER2 -} ti83pse_ctimers; - -class ti85_state : public driver_device -{ -public: - ti85_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), -// m_serial(*this, "tiserial"), - m_nvram(*this, "nvram"), - m_flash(*this, "flash"), - m_membank1(*this, "membank1"), - m_membank2(*this, "membank2"), - m_membank3(*this, "membank3"), - m_membank4(*this, "membank4") - { } - - required_device m_maincpu; - optional_device m_speaker; - //optional_device<> m_serial; - optional_shared_ptr m_nvram; - optional_device m_flash; - optional_device m_membank1; - optional_device m_membank2; - optional_device m_membank3; - optional_device m_membank4; - - ti85_model m_model; - - UINT8 m_LCD_memory_base; - UINT8 m_LCD_contrast; - UINT8 m_LCD_status; - UINT8 m_timer_interrupt_mask; - UINT8 m_timer_interrupt_status; - UINT8 m_ctimer_interrupt_status; - UINT8 m_ON_interrupt_mask; - UINT8 m_ON_interrupt_status; - UINT8 m_ON_pressed; - UINT8 m_flash_unlocked; - UINT8 m_ti8x_memory_page_1; - UINT8 m_ti8x_memory_page_2; - UINT8 m_ti8x_memory_page_3; - bool m_booting; - UINT8 m_LCD_mask; - UINT8 m_power_mode; - UINT8 m_cpu_speed; - UINT8 m_keypad_mask; - UINT8 m_video_buffer_width; - UINT8 m_interrupt_speed; - UINT8 m_port4_bit0; - UINT8 m_ti81_port_7_data; - UINT8 *m_ti8x_ram; - UINT8 m_PCR; - UINT8 m_red_out; - UINT8 m_white_out; - UINT8 m_ti8x_port2; - UINT8 m_ti83p_port4; - UINT8 m_ti83pse_port21; - int m_ti_video_memory_size; - int m_ti_screen_x_size; - int m_ti_screen_y_size; - int m_ti_number_of_frames; - UINT8 * m_frames; - UINT8 * m_bios; - DECLARE_READ8_MEMBER(ti85_port_0000_r); - DECLARE_READ8_MEMBER(ti8x_keypad_r); - DECLARE_READ8_MEMBER(ti85_port_0006_r); - DECLARE_READ8_MEMBER(ti8x_serial_r); - DECLARE_READ8_MEMBER(ti86_port_0005_r); - DECLARE_READ8_MEMBER(ti83_port_0000_r); - DECLARE_READ8_MEMBER(ti8x_plus_serial_r); - DECLARE_WRITE8_MEMBER(ti81_port_0007_w); - DECLARE_WRITE8_MEMBER(ti85_port_0000_w); - DECLARE_WRITE8_MEMBER(ti8x_keypad_w); - DECLARE_WRITE8_MEMBER(ti85_port_0002_w); - DECLARE_WRITE8_MEMBER(ti85_port_0003_w); - DECLARE_WRITE8_MEMBER(ti85_port_0004_w); - DECLARE_WRITE8_MEMBER(ti85_port_0005_w); - DECLARE_WRITE8_MEMBER(ti85_port_0006_w); - DECLARE_WRITE8_MEMBER(ti8x_serial_w); - DECLARE_WRITE8_MEMBER(ti86_port_0005_w); - DECLARE_WRITE8_MEMBER(ti86_port_0006_w); - DECLARE_WRITE8_MEMBER(ti82_port_0002_w); - DECLARE_WRITE8_MEMBER(ti83_port_0000_w); - DECLARE_WRITE8_MEMBER(ti83_port_0002_w); - DECLARE_WRITE8_MEMBER(ti83_port_0003_w); - DECLARE_WRITE8_MEMBER(ti8x_plus_serial_w); - DECLARE_WRITE8_MEMBER(ti83p_int_mask_w); - DECLARE_WRITE8_MEMBER(ti83p_port_0004_w); - DECLARE_WRITE8_MEMBER(ti83p_port_0006_w); - DECLARE_WRITE8_MEMBER(ti83p_port_0007_w); - DECLARE_WRITE8_MEMBER(ti83pse_int_ack_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0004_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0005_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0006_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0007_w); - DECLARE_WRITE8_MEMBER(ti83p_port_0014_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0020_w); - DECLARE_WRITE8_MEMBER(ti83pse_port_0021_w); - DECLARE_READ8_MEMBER( ti85_port_0002_r ); - DECLARE_READ8_MEMBER( ti85_port_0003_r ); - DECLARE_READ8_MEMBER( ti85_port_0004_r ); - DECLARE_READ8_MEMBER( ti85_port_0005_r ); - DECLARE_READ8_MEMBER( ti86_port_0006_r ); - DECLARE_READ8_MEMBER( ti82_port_0002_r ); - DECLARE_READ8_MEMBER( ti83_port_0002_r ); - DECLARE_READ8_MEMBER( ti83_port_0003_r ); - DECLARE_READ8_MEMBER( ti83p_port_0002_r ); - DECLARE_READ8_MEMBER( ti83p_port_0004_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0002_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0005_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0009_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0015_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0020_r ); - DECLARE_READ8_MEMBER( ti83pse_port_0021_r ); - DECLARE_READ8_MEMBER( ti84pse_port_0055_r ); - DECLARE_READ8_MEMBER( ti84pse_port_0056_r ); - virtual void machine_start(); - virtual void video_start(); - DECLARE_PALETTE_INIT(ti85); - DECLARE_MACHINE_RESET(ti85); - DECLARE_MACHINE_RESET(ti83p); - DECLARE_PALETTE_INIT(ti82); - DECLARE_MACHINE_START(ti86); - DECLARE_MACHINE_START(ti83p); - DECLARE_MACHINE_START(ti83pse); - DECLARE_MACHINE_START(ti84pse); - DECLARE_MACHINE_START(ti84p); - void ti8xpse_init_common(); - - UINT32 screen_update_ti85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(ti85_timer_callback); - TIMER_CALLBACK_MEMBER(ti83_timer1_callback); - TIMER_CALLBACK_MEMBER(ti83_timer2_callback); - - //crystal timers - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - void ti83pse_count( UINT8 timer, UINT8 data); - - emu_timer *m_crystal_timer1; - emu_timer *m_crystal_timer2; - emu_timer *m_crystal_timer3; - DECLARE_READ8_MEMBER( ti83pse_ctimer1_setup_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer1_setup_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer1_loop_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer1_loop_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer1_count_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer1_count_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer2_setup_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer2_setup_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer2_loop_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer2_loop_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer2_count_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer2_count_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer3_setup_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_setup_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer3_loop_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_loop_w ); - DECLARE_READ8_MEMBER( ti83pse_ctimer3_count_r ); - DECLARE_WRITE8_MEMBER( ti83pse_ctimer3_count_w ); - - - void update_ti85_memory (); - void update_ti83p_memory (); - void update_ti83pse_memory (); - void update_ti86_memory (); - void ti8x_snapshot_setup_registers (UINT8 * data); - void ti85_setup_snapshot (UINT8 * data); - void ti86_setup_snapshot (UINT8 * data); - DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x ); - DECLARE_DIRECT_UPDATE_MEMBER( ti83p_direct_update_handler ); - - ti83pse_timer m_ctimer[3]; - - //address_space &asic; -}; - -#endif /* TI85_H_ */ diff --git a/src/mess/includes/ti89.h b/src/mess/includes/ti89.h deleted file mode 100644 index 83f83020513..00000000000 --- a/src/mess/includes/ti89.h +++ /dev/null @@ -1,89 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/***************************************************************************** - * - * includes/ti89.h - * - ****************************************************************************/ - -#ifndef TI89_H_ -#define TI89_H_ - -#include "machine/intelfsh.h" - -class ti68k_state : public driver_device -{ -public: - ti68k_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_flash(*this, "flash"), - m_rom_base(*this, "flash"), - m_io_bit0(*this, "BIT0"), - m_io_bit1(*this, "BIT1"), - m_io_bit2(*this, "BIT2"), - m_io_bit3(*this, "BIT3"), - m_io_bit4(*this, "BIT4"), - m_io_bit5(*this, "BIT5"), - m_io_bit6(*this, "BIT6"), - m_io_bit7(*this, "BIT7") - { } - - required_device m_maincpu; - required_device m_flash; - required_region_ptr m_rom_base; - required_ioport m_io_bit0; - required_ioport m_io_bit1; - required_ioport m_io_bit2; - required_ioport m_io_bit3; - required_ioport m_io_bit4; - required_ioport m_io_bit5; - required_ioport m_io_bit6; - required_ioport m_io_bit7; - - // hardware versions - enum { HW1=1, HW2, HW3, HW4 }; - - // HW specifications - UINT8 m_hw_version; - bool m_flash_mem; - UINT32 m_initial_pc; - - // keyboard - UINT16 m_kb_mask; - UINT8 m_on_key; - - // LCD - UINT8 m_lcd_on; - UINT32 m_lcd_base; - UINT16 m_lcd_width; - UINT16 m_lcd_height; - UINT16 m_lcd_contrast; - - // I/O - UINT16 m_io_hw1[0x10]; - UINT16 m_io_hw2[0x80]; - - // Timer - UINT8 m_timer_on; - UINT8 m_timer_val; - UINT16 m_timer_mask; - - virtual void machine_start(); - virtual void machine_reset(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - UINT8 keypad_r(); - DECLARE_WRITE16_MEMBER ( ti68k_io_w ); - DECLARE_READ16_MEMBER ( ti68k_io_r ); - DECLARE_WRITE16_MEMBER ( ti68k_io2_w ); - DECLARE_READ16_MEMBER ( ti68k_io2_r ); - DECLARE_WRITE16_MEMBER ( flash_w ); - DECLARE_READ16_MEMBER ( flash_r ); - UINT64 m_timer; - DECLARE_PALETTE_INIT(ti68k); - DECLARE_INPUT_CHANGED_MEMBER(ti68k_on_key); - TIMER_DEVICE_CALLBACK_MEMBER(ti68k_timer_callback); -}; - -#endif // TI89_H_ diff --git a/src/mess/includes/tiki100.h b/src/mess/includes/tiki100.h deleted file mode 100644 index e66d1a6ff65..00000000000 --- a/src/mess/includes/tiki100.h +++ /dev/null @@ -1,146 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TIKI100__ -#define __TIKI100__ - - -#include "emu.h" -#include "bus/centronics/ctronics.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "formats/tiki100_dsk.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "machine/z80pio.h" -#include "machine/wd_fdc.h" -#include "sound/ay8910.h" - -#define Z80_TAG "z80" -#define Z80DART_TAG "z80dart" -#define Z80PIO_TAG "z80pio" -#define Z80CTC_TAG "z80ctc" -#define FD1797_TAG "fd1797" -#define AY8912_TAG "ay8912" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define CASSETTE_TAG "cassette" -#define CENTRONICS_TAG "centronics" -#define SCREEN_TAG "screen" - -#define TIKI100_VIDEORAM_SIZE 0x8000 -#define TIKI100_VIDEORAM_MASK 0x7fff - -#define BANK_ROM 0 -#define BANK_RAM 1 -#define BANK_VIDEO_RAM 2 - -class tiki100_state : public driver_device -{ -public: - tiki100_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_fdc(*this, FD1797_TAG), - m_pio(*this, Z80PIO_TAG), - m_dart(*this, Z80DART_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, FD1797_TAG":0"), - m_floppy1(*this, FD1797_TAG":1"), - m_cassette(*this, CASSETTE_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_rom(*this, Z80_TAG), - m_video_ram(*this, "video_ram"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_y8(*this, "Y8"), - m_y9(*this, "Y9"), - m_y10(*this, "Y10"), - m_y11(*this, "Y11"), - m_y12(*this, "Y12"), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_ctc; - required_device m_fdc; - required_device m_pio; - required_device m_dart; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_cassette; - required_device m_centronics; - required_memory_region m_rom; - optional_shared_ptr m_video_ram; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_y8; - required_ioport m_y9; - required_ioport m_y10; - required_ioport m_y11; - required_ioport m_y12; - required_device m_palette; - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( gfxram_r ); - DECLARE_WRITE8_MEMBER( gfxram_w ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_WRITE8_MEMBER( keyboard_w ); - DECLARE_WRITE8_MEMBER( video_mode_w ); - DECLARE_WRITE8_MEMBER( palette_w ); - DECLARE_WRITE8_MEMBER( system_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z0_w ); - DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); - DECLARE_WRITE8_MEMBER( video_scroll_w ); - - DECLARE_READ8_MEMBER( pio_pb_r ); - DECLARE_WRITE8_MEMBER( pio_pb_w ); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - void bankswitch(); - - /* memory state */ - int m_rome; - int m_vire; - - /* video state */ - UINT8 m_scroll; - UINT8 m_mode; - UINT8 m_palette_val; - - /* keyboard state */ - int m_keylatch; - - TIMER_DEVICE_CALLBACK_MEMBER( ctc_tick ); - TIMER_DEVICE_CALLBACK_MEMBER( tape_tick ); - - DECLARE_WRITE_LINE_MEMBER(write_centronics_ack); - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - - int m_centronics_ack; - int m_centronics_busy; - int m_centronics_perror; -}; - -#endif diff --git a/src/mess/includes/tmc1800.h b/src/mess/includes/tmc1800.h deleted file mode 100644 index 43d9c98daca..00000000000 --- a/src/mess/includes/tmc1800.h +++ /dev/null @@ -1,209 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TMC1800__ -#define __TMC1800__ - - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "sound/cdp1864.h" -#include "video/cdp1861.h" -#include "sound/beep.h" - -#define TMC2000_COLORRAM_SIZE 0x200 - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "cdp1802" -#define CDP1861_TAG "cdp1861" -#define CDP1864_TAG "m3" - -class tmc1800_base_state : public driver_device -{ -public: - tmc1800_base_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_cassette(*this, "cassette"), - m_rom(*this, CDP1802_TAG), - m_run(*this, "RUN"), - m_ram(*this, RAM_TAG), - m_beeper(*this, "beeper") - { } - - - required_device m_maincpu; - required_device m_cassette; - required_memory_region m_rom; - required_ioport m_run; - required_device m_ram; - optional_device m_beeper; - - DECLARE_QUICKLOAD_LOAD_MEMBER( tmc1800 ); -}; - -class tmc1800_state : public tmc1800_base_state -{ -public: - enum - { - TIMER_SETUP_BEEP - }; - - tmc1800_state(const machine_config &mconfig, device_type type, const char *tag) - : tmc1800_base_state(mconfig, type, tag), - m_vdc(*this, CDP1861_TAG) - { } - - required_device m_vdc; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_READ8_MEMBER( dispon_r ); - DECLARE_WRITE8_MEMBER( dispoff_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - - /* keyboard state */ - int m_keylatch; /* key latch */ - DECLARE_DRIVER_INIT(tmc1800); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -class osc1000b_state : public tmc1800_base_state -{ -public: - osc1000b_state(const machine_config &mconfig, device_type type, const char *tag) - : tmc1800_base_state(mconfig, type, tag) - { } - - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - - /* keyboard state */ - int m_keylatch; -}; - -class tmc2000_state : public tmc1800_base_state -{ -public: - tmc2000_state(const machine_config &mconfig, device_type type, const char *tag) - : tmc1800_base_state(mconfig, type, tag), - m_cti(*this, CDP1864_TAG), - m_colorram(*this, "color_ram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7") - { } - - required_device m_cti; - optional_shared_ptr m_colorram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_WRITE8_MEMBER( bankswitch_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( dma_w ); - DECLARE_READ_LINE_MEMBER( rdata_r ); - DECLARE_READ_LINE_MEMBER( bdata_r ); - DECLARE_READ_LINE_MEMBER( gdata_r ); - DECLARE_INPUT_CHANGED_MEMBER( run_pressed ); - - void bankswitch(); - - // memory - int m_rac; - int m_roc; - - /* video state */ - UINT8 m_color; - - /* keyboard state */ - ioport_port* m_key_row[8]; - int m_keylatch; -}; - -class nano_state : public tmc1800_base_state -{ -public: - nano_state(const machine_config &mconfig, device_type type, const char *tag) - : tmc1800_base_state(mconfig, type, tag), - m_cti(*this, CDP1864_TAG), - m_ny0(*this, "NY0"), - m_ny1(*this, "NY1"), - m_monitor(*this, "MONITOR") - { } - - required_device m_cti; - required_ioport m_ny0; - required_ioport m_ny1; - required_ioport m_monitor; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void machine_reset(); - - enum - { - TIMER_ID_EF4 - }; - - DECLARE_WRITE8_MEMBER( keylatch_w ); - DECLARE_WRITE8_MEMBER( bankswitch_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_INPUT_CHANGED_MEMBER( run_pressed ); - DECLARE_INPUT_CHANGED_MEMBER( monitor_pressed ); - - /* keyboard state */ - int m_keylatch; /* key latch */ -}; - -/* ---------- defined in video/tmc1800.c ---------- */ - -MACHINE_CONFIG_EXTERN( tmc1800_video ); -MACHINE_CONFIG_EXTERN( osc1000b_video ); -MACHINE_CONFIG_EXTERN( tmc2000_video ); -MACHINE_CONFIG_EXTERN( nano_video ); - -#endif diff --git a/src/mess/includes/tmc2000e.h b/src/mess/includes/tmc2000e.h deleted file mode 100644 index e54fffa67ab..00000000000 --- a/src/mess/includes/tmc2000e.h +++ /dev/null @@ -1,87 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TMC2000E__ -#define __TMC2000E__ - - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" -#include "machine/rescap.h" -#include "sound/cdp1864.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "cdp1802" -#define CDP1864_TAG "cdp1864" - -#define TMC2000E_COLORRAM_SIZE 0x100 // ??? - -class tmc2000e_state : public driver_device -{ -public: - tmc2000e_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_cti(*this, CDP1864_TAG), - m_cassette(*this, "cassette"), - m_colorram(*this, "colorram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7"), - m_run(*this, "RUN") - { } - - required_device m_maincpu; - required_device m_cti; - required_device m_cassette; - required_shared_ptr m_colorram; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - required_ioport m_run; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( vismac_r ); - DECLARE_WRITE8_MEMBER( vismac_w ); - DECLARE_READ8_MEMBER( floppy_r ); - DECLARE_WRITE8_MEMBER( floppy_w ); - DECLARE_READ8_MEMBER( ascii_keyboard_r ); - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); - DECLARE_WRITE8_MEMBER( io_select_w ); - DECLARE_WRITE8_MEMBER( keyboard_latch_w ); - DECLARE_READ_LINE_MEMBER( rdata_r ); - DECLARE_READ_LINE_MEMBER( bdata_r ); - DECLARE_READ_LINE_MEMBER( gdata_r ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_WRITE8_MEMBER( dma_w ); - - /* video state */ - int m_cdp1864_efx; /* EFx */ - UINT8 m_color; - - /* keyboard state */ - ioport_port* m_key_row[8]; - int m_keylatch; /* key latch */ - int m_reset; /* reset activated */ -}; - -#endif diff --git a/src/mess/includes/tmc600.h b/src/mess/includes/tmc600.h deleted file mode 100644 index 67855119897..00000000000 --- a/src/mess/includes/tmc600.h +++ /dev/null @@ -1,101 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TMC600__ -#define __TMC600__ - - -#include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "bus/centronics/ctronics.h" -#include "machine/ram.h" -#include "sound/cdp1869.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "cdp1802" -#define CDP1869_TAG "cdp1869" -#define CENTRONICS_TAG "centronics" - -#define TMC600_PAGE_RAM_SIZE 0x400 -#define TMC600_PAGE_RAM_MASK 0x3ff - -class tmc600_state : public driver_device -{ -public: - tmc600_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_vis(*this, CDP1869_TAG), - m_cassette(*this, "cassette"), - m_centronics(*this, "centronics"), - m_ram(*this, RAM_TAG), - m_char_rom(*this, "chargen"), - m_page_ram(*this, "page_ram"), - m_color_ram(*this, "color_ram"), - m_run(*this, "RUN"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7") - { } - - required_device m_maincpu; - required_device m_vis; - required_device m_cassette; - required_device m_centronics; - required_device m_ram; - required_region_ptr m_char_rom; - required_shared_ptr m_page_ram; - optional_shared_ptr m_color_ram; - required_ioport m_run; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - required_ioport m_y3; - required_ioport m_y4; - required_ioport m_y5; - required_ioport m_y6; - required_ioport m_y7; - - virtual void machine_start(); - - virtual void video_start(); - - DECLARE_WRITE8_MEMBER( keyboard_latch_w ); - DECLARE_WRITE8_MEMBER( vismac_register_w ); - DECLARE_WRITE8_MEMBER( vismac_data_w ); - DECLARE_WRITE8_MEMBER( page_ram_w ); - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - - UINT8 get_color(UINT16 pma); - - // video state - int m_vismac_reg_latch; // video register latch - int m_vismac_color_latch; // color latch - int m_vismac_bkg_latch; // background color latch - int m_blink; // cursor blink - - // keyboard state - ioport_port* m_key_row[8]; - int m_keylatch; // key latch - - TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); - CDP1869_CHAR_RAM_READ_MEMBER(tmc600_char_ram_r); - CDP1869_PCB_READ_MEMBER(tmc600_pcb_r); -}; - -// ---------- defined in video/tmc600.c ---------- - -MACHINE_CONFIG_EXTERN( tmc600_video ); - -#endif diff --git a/src/mess/includes/trs80.h b/src/mess/includes/trs80.h deleted file mode 100644 index e4ced5999ab..00000000000 --- a/src/mess/includes/trs80.h +++ /dev/null @@ -1,206 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Robbbert and unknown others -/***************************************************************************** - * - * includes/trs80.h - * - ****************************************************************************/ - -#ifndef TRS80_H_ -#define TRS80_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/speaker.h" -#include "sound/wave.h" -#include "machine/ay31015.h" -#include "machine/buffer.h" -#include "bus/centronics/ctronics.h" -#include "machine/wd_fdc.h" -#include "imagedev/cassette.h" -#include "imagedev/flopdrv.h" -#include "imagedev/snapquik.h" -#include "formats/trs_cas.h" - - -class trs80_state : public driver_device -{ -public: - trs80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_centronics(*this, "centronics"), - m_cent_data_out(*this, "cent_data_out"), - m_cent_status_in(*this, "cent_status_in"), - m_ay31015(*this, "tr1602"), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy2(*this, "fdc:2"), - m_floppy3(*this, "fdc:3"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_p_videoram(*this, "p_videoram"), - m_region_maincpu(*this, "maincpu"), - m_io_config(*this, "CONFIG"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_bank1(NULL), - m_bank2(NULL), - m_bank3(NULL), - m_bank4(NULL), - m_bank5(NULL), - m_bank6(NULL), - m_bank7(NULL), - m_bank8(NULL), - m_bank9(NULL), - m_bank11(NULL), - m_bank12(NULL), - m_bank13(NULL), - m_bank14(NULL), - m_bank15(NULL), - m_bank16(NULL), - m_bank17(NULL), - m_bank18(NULL), - m_bank19(NULL) { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device m_maincpu; - optional_device m_centronics; - optional_device m_cent_data_out; - optional_device m_cent_status_in; - optional_device m_ay31015; - optional_device m_fdc; - optional_device m_floppy0; - optional_device m_floppy1; - optional_device m_floppy2; - optional_device m_floppy3; - required_device m_speaker; - required_device m_cassette; - DECLARE_WRITE8_MEMBER ( trs80_ff_w ); - DECLARE_WRITE8_MEMBER ( lnw80_fe_w ); - DECLARE_WRITE8_MEMBER ( sys80_fe_w ); - DECLARE_WRITE8_MEMBER ( sys80_f8_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_ff_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_f4_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_ec_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_eb_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_ea_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_e9_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_e8_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_e4_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_e0_w ); - DECLARE_WRITE8_MEMBER ( trs80m4p_9c_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_90_w ); - DECLARE_WRITE8_MEMBER ( trs80m4_84_w ); - DECLARE_READ8_MEMBER ( lnw80_fe_r ); - DECLARE_READ8_MEMBER ( trs80_ff_r ); - DECLARE_READ8_MEMBER ( sys80_f9_r ); - DECLARE_READ8_MEMBER ( trs80m4_ff_r ); - DECLARE_READ8_MEMBER ( trs80m4_ec_r ); - DECLARE_READ8_MEMBER ( trs80m4_eb_r ); - DECLARE_READ8_MEMBER ( trs80m4_ea_r ); - DECLARE_READ8_MEMBER ( trs80m4_e8_r ); - DECLARE_READ8_MEMBER ( trs80m4_e4_r ); - DECLARE_READ8_MEMBER ( trs80m4_e0_r ); - DECLARE_READ8_MEMBER( trs80_irq_status_r ); - DECLARE_READ8_MEMBER( trs80_printer_r ); - DECLARE_WRITE8_MEMBER( trs80_printer_w ); - DECLARE_WRITE8_MEMBER( trs80_cassunit_w ); - DECLARE_WRITE8_MEMBER( trs80_motor_w ); - DECLARE_READ8_MEMBER( trs80_keyboard_r ); - DECLARE_WRITE8_MEMBER ( trs80m4_88_w ); - DECLARE_READ8_MEMBER( trs80_videoram_r ); - DECLARE_WRITE8_MEMBER( trs80_videoram_w ); - DECLARE_READ8_MEMBER( trs80_gfxram_r ); - DECLARE_WRITE8_MEMBER( trs80_gfxram_w ); - DECLARE_READ8_MEMBER (trs80_wd179x_r); - const UINT8 *m_p_chargen; - optional_shared_ptr m_p_videoram; - UINT8 *m_p_gfxram; - UINT8 m_model4; - UINT8 m_mode; - UINT8 m_irq; - UINT8 m_mask; - UINT8 m_nmi_mask; - UINT8 m_port_ec; - UINT8 m_tape_unit; - UINT8 m_reg_load; - UINT8 m_nmi_data; -#ifdef USE_TRACK - UINT8 m_track[4]; -#endif - UINT8 m_head; -#ifdef USE_SECTOR - UINT8 m_sector[4]; -#endif - UINT8 m_cassette_data; - emu_timer *m_cassette_data_timer; - double m_old_cassette_val; - UINT16 m_start_address; - UINT8 m_crtc_reg; - UINT8 m_size_store; - DECLARE_DRIVER_INIT(trs80m4); - DECLARE_DRIVER_INIT(trs80l2); - DECLARE_DRIVER_INIT(trs80m4p); - DECLARE_DRIVER_INIT(lnw80); - DECLARE_DRIVER_INIT(trs80); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_MACHINE_RESET(trs80m4); - DECLARE_MACHINE_RESET(lnw80); - DECLARE_PALETTE_INIT(lnw80); - UINT32 screen_update_trs80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_trs80m4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_ht1080z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - UINT32 screen_update_meritum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(trs80_rtc_interrupt); - INTERRUPT_GEN_MEMBER(trs80_fdc_interrupt); - TIMER_CALLBACK_MEMBER(cassette_data_callback); - DECLARE_WRITE_LINE_MEMBER(trs80_fdc_intrq_w); - DECLARE_QUICKLOAD_LOAD_MEMBER( trs80_cmd ); - -protected: - required_memory_region m_region_maincpu; - required_ioport m_io_config; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - required_ioport m_io_line3; - required_ioport m_io_line4; - required_ioport m_io_line5; - required_ioport m_io_line6; - required_ioport m_io_line7; - memory_bank *m_bank1; - memory_bank *m_bank2; - memory_bank *m_bank3; - memory_bank *m_bank4; - memory_bank *m_bank5; - memory_bank *m_bank6; - memory_bank *m_bank7; - memory_bank *m_bank8; - memory_bank *m_bank9; - memory_bank *m_bank11; - memory_bank *m_bank12; - memory_bank *m_bank13; - memory_bank *m_bank14; - memory_bank *m_bank15; - memory_bank *m_bank16; - memory_bank *m_bank17; - memory_bank *m_bank18; - memory_bank *m_bank19; - - void trs80_fdc_interrupt_internal(); -}; - -#endif /* TRS80_H_ */ diff --git a/src/mess/includes/trs80m2.h b/src/mess/includes/trs80m2.h deleted file mode 100644 index 94a85e36038..00000000000 --- a/src/mess/includes/trs80m2.h +++ /dev/null @@ -1,168 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __TRS80M2__ -#define __TRS80M2__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "cpu/mcs48/mcs48.h" -#include "cpu/m68000/m68000.h" -#include "bus/centronics/ctronics.h" -#include "machine/keyboard.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/trs80m2kb.h" -#include "machine/wd_fdc.h" -#include "machine/z80ctc.h" -#include "machine/z80dma.h" -#include "machine/z80pio.h" -#include "machine/z80dart.h" -#include "video/mc6845.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "u12" -#define Z80CTC_TAG "u19" -#define Z80DMA_TAG "u20" -#define Z80PIO_TAG "u22" -#define Z80SIO_TAG "u18" -#define FD1791_TAG "u6" -#define MC6845_TAG "u11" -#define CENTRONICS_TAG "j2" -#define M68000_TAG "m16_u22" -#define AM9519A_TAG "m16_u11" - -class trs80m2_state : public driver_device -{ -public: - trs80m2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_ctc(*this, Z80CTC_TAG), - m_dmac(*this, Z80DMA_TAG), - m_pio(*this, Z80PIO_TAG), - m_crtc(*this, MC6845_TAG), - m_palette(*this, "palette"), - m_fdc(*this, FD1791_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_floppy0(*this, FD1791_TAG":0"), - m_floppy1(*this, FD1791_TAG":1"), - m_floppy2(*this, FD1791_TAG":2"), - m_floppy3(*this, FD1791_TAG":3"), - m_floppy(NULL), - m_ram(*this, RAM_TAG), - m_kb(*this, TRS80M2_KEYBOARD_TAG), - m_rom(*this, Z80_TAG), - m_char_rom(*this, MC6845_TAG), - m_video_ram(*this, "video_ram") - { - } - - required_device m_maincpu; - required_device m_ctc; - required_device m_dmac; - required_device m_pio; - required_device m_crtc; - required_device m_palette; - required_device m_fdc; - required_device m_centronics; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - floppy_image_device *m_floppy; - required_device m_ram; - required_device m_kb; - required_memory_region m_rom; - required_memory_region m_char_rom; - optional_shared_ptr m_video_ram; - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE8_MEMBER( drvslt_w ); - DECLARE_WRITE8_MEMBER( rom_enable_w ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_READ8_MEMBER( rtc_r ); - DECLARE_READ8_MEMBER( nmi_r ); - DECLARE_WRITE8_MEMBER( nmi_w ); - DECLARE_READ8_MEMBER( keyboard_busy_r ); - DECLARE_READ8_MEMBER( keyboard_data_r ); - DECLARE_WRITE8_MEMBER( keyboard_ctrl_w ); - DECLARE_WRITE8_MEMBER( keyboard_latch_w ); - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_WRITE_LINE_MEMBER( de_w ); - DECLARE_WRITE_LINE_MEMBER( vsync_w ); - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_WRITE8_MEMBER( pio_pa_w ); - DECLARE_WRITE_LINE_MEMBER( strobe_w ); - DECLARE_WRITE_LINE_MEMBER( kb_clock_w ); - DECLARE_WRITE8_MEMBER( kbd_w ); - - MC6845_UPDATE_ROW( crtc_update_row ); - - // memory state - int m_boot_rom; - int m_bank; - int m_msel; - - // keyboard state - UINT8 m_key_latch; - UINT8 m_key_data; - int m_key_bit; - int m_kbclk; - int m_kbdata; - int m_kbirq; - - // video state - int m_blnkvid; - int m_80_40_char_en; - int m_de; - int m_rtc_int; - int m_enable_rtc_int; - - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); - - int m_centronics_busy; - int m_centronics_fault; - int m_centronics_perror; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); -}; - -class trs80m16_state : public trs80m2_state -{ -public: - trs80m16_state(const machine_config &mconfig, device_type type, const char *tag) - : trs80m2_state(mconfig, type, tag), - m_subcpu(*this, M68000_TAG), - m_pic(*this, AM9519A_TAG) - { } - - required_device m_subcpu; - required_device m_pic; - - virtual void machine_start(); - - DECLARE_WRITE8_MEMBER( ual_w ); - DECLARE_WRITE8_MEMBER( tcl_w ); - - UINT16 m_ual; - UINT8 m_limit[2]; - UINT8 m_offset[2]; -}; - -#endif diff --git a/src/mess/includes/tsispch.h b/src/mess/includes/tsispch.h deleted file mode 100644 index 25c7b088da6..00000000000 --- a/src/mess/includes/tsispch.h +++ /dev/null @@ -1,58 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Jonathan Gevaryahu -/*************************************************************************** - - tsispch.h - -****************************************************************************/ - -#pragma once - -#ifndef _TSISPCH_H_ -#define _TSISPCH_H_ - -#include "machine/i8251.h" -#include "machine/pic8259.h" -#include "machine/terminal.h" - -#define TERMINAL_TAG "terminal" - -class tsispch_state : public driver_device -{ -public: - tsispch_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_dsp(*this, "dsp"), - m_terminal(*this, TERMINAL_TAG), - m_uart(*this, "i8251a_u15"), - m_pic(*this, "pic8259") - { - } - - required_device m_maincpu; - required_device m_dsp; - required_device m_terminal; - required_device m_uart; - required_device m_pic; - - UINT8 m_paramReg; // status leds and resets and etc - - virtual void machine_reset(); - DECLARE_WRITE8_MEMBER(i8251_rxd); - DECLARE_READ8_MEMBER(dsw_r); - DECLARE_WRITE8_MEMBER(peripheral_w); - DECLARE_READ16_MEMBER(dsp_data_r); - DECLARE_WRITE16_MEMBER(dsp_data_w); - DECLARE_READ16_MEMBER(dsp_status_r); - DECLARE_WRITE16_MEMBER(dsp_status_w); - DECLARE_DRIVER_INIT(prose2k); - DECLARE_WRITE_LINE_MEMBER(i8251_rxrdy_int); - DECLARE_WRITE_LINE_MEMBER(i8251_txempty_int); - DECLARE_WRITE_LINE_MEMBER(i8251_txrdy_int); - DECLARE_WRITE_LINE_MEMBER(dsp_to_8086_p0_w); - DECLARE_WRITE_LINE_MEMBER(dsp_to_8086_p1_w); -}; - - -#endif // _TSISPCH_H_ diff --git a/src/mess/includes/tx0.h b/src/mess/includes/tx0.h deleted file mode 100644 index 98d111d72ec..00000000000 --- a/src/mess/includes/tx0.h +++ /dev/null @@ -1,329 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Raphael Nabet -/***************************************************************************** - * - * includes/tx0.h - * - ****************************************************************************/ - -#ifndef TX0_H_ -#define TX0_H_ - -#include "video/crt.h" -#include "cpu/pdp1/tx0.h" - -enum state_t -{ - MTS_UNSELECTED, - MTS_SELECTING, - MTS_SELECTED, - MTS_UNSELECTING -}; - -enum backspace_state_t -{ - MTBSS_STATE0, - MTBSS_STATE1, - MTBSS_STATE2, - MTBSS_STATE3, - MTBSS_STATE4, - MTBSS_STATE5, - MTBSS_STATE6 -}; - -enum state_2_t -{ - MTRDS_STATE0, - MTRDS_STATE1, - MTRDS_STATE2, - MTRDS_STATE3, - MTRDS_STATE4, - MTRDS_STATE5, - MTRDS_STATE6 -}; - -enum state_3_t -{ - MTWTS_STATE0, - MTWTS_STATE1, - MTWTS_STATE2, - MTWTS_STATE3 -}; - -enum irg_pos_t -{ - MTIRGP_START, - MTIRGP_ENDMINUS1, - MTIRGP_END -}; - - - -/* tape reader registers */ -struct tx0_tape_reader_t -{ - device_image_interface *fd; /* file descriptor of tape image */ - - int motor_on; /* 1-bit reader motor on */ - - int rcl; /* 1-bit reader clutch */ - int rc; /* 2-bit reader counter */ - - emu_timer *timer; /* timer to simulate reader timing */ -}; - - - -/* tape puncher registers */ -struct tape_puncher_t -{ - device_image_interface *fd; /* file descriptor of tape image */ - - emu_timer *timer; /* timer to generate completion pulses */ -}; - - - -/* typewriter registers */ -struct tx0_typewriter_t -{ - device_image_interface *fd; /* file descriptor of output image */ - - emu_timer *prt_timer;/* timer to generate completion pulses */ -}; - - -/* magnetic tape unit registers */ -struct magtape_t -{ - device_image_interface *img; /* image descriptor */ - - state_t state; - - int command; - int binary_flag; - - union - { - backspace_state_t backspace_state; - struct - { - state_2_t state; - int space_flag; - } read; - struct - { - state_3_t state; - int counter; - } write; - } u; - - int sel_pending; - int cpy_pending; - - irg_pos_t irg_pos; /* position relative to inter-record gap */ - - int long_parity; - - emu_timer *timer; /* timer to simulate reader timing */ -}; - - -class tx0_state : public driver_device -{ -public: - tx0_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_crt(*this, "crt"), - m_csw(*this, "CSW"), - m_twr(*this, "TWR") - { } - - tx0_tape_reader_t m_tape_reader; - tape_puncher_t m_tape_puncher; - tx0_typewriter_t m_typewriter; - emu_timer *m_dis_timer; - magtape_t m_magtape; - int m_old_typewriter_keys[4]; - int m_old_control_keys; - int m_old_tsr_keys; - int m_tsr_index; - int m_typewriter_color; - bitmap_ind16 m_panel_bitmap; - bitmap_ind16 m_typewriter_bitmap; - int m_pos; - int m_case_shift; - DECLARE_DRIVER_INIT(tx0); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(tx0); - UINT32 screen_update_tx0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_tx0(screen_device &screen, bool state); - INTERRUPT_GEN_MEMBER(tx0_interrupt); - TIMER_CALLBACK_MEMBER(reader_callback); - TIMER_CALLBACK_MEMBER(puncher_callback); - TIMER_CALLBACK_MEMBER(prt_callback); - TIMER_CALLBACK_MEMBER(dis_callback); - void tx0_machine_stop(); - required_device m_maincpu; - inline void tx0_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); - void tx0_plot(int x, int y); - void tx0_draw_led(bitmap_ind16 &bitmap, int x, int y, int state); - void tx0_draw_multipleled(bitmap_ind16 &bitmap, int x, int y, int value, int nb_bits); - void tx0_draw_switch(bitmap_ind16 &bitmap, int x, int y, int state); - void tx0_draw_multipleswitch(bitmap_ind16 &bitmap, int x, int y, int value, int nb_bits); - void tx0_draw_char(bitmap_ind16 &bitmap, char character, int x, int y, int color); - void tx0_draw_string(bitmap_ind16 &bitmap, const char *buf, int x, int y, int color); - void tx0_draw_vline(bitmap_ind16 &bitmap, int x, int y, int height, int color); - void tx0_draw_hline(bitmap_ind16 &bitmap, int x, int y, int width, int color); - void tx0_draw_panel_backdrop(bitmap_ind16 &bitmap); - void tx0_draw_panel(bitmap_ind16 &bitmap); - void tx0_typewriter_linefeed(); - void tx0_typewriter_drawchar(int character); - int tape_read(UINT8 *reply); - void tape_write(UINT8 data); - void begin_tape_read(int binary); - void typewriter_out(UINT8 data); - void schedule_select(); - void schedule_unselect(); - void tx0_keyboard(); - DECLARE_WRITE_LINE_MEMBER(tx0_io_cpy); - DECLARE_WRITE_LINE_MEMBER(tx0_io_r1l); - DECLARE_WRITE_LINE_MEMBER(tx0_io_r3l); - DECLARE_WRITE_LINE_MEMBER(tx0_io_p6h); - DECLARE_WRITE_LINE_MEMBER(tx0_io_p7h); - DECLARE_WRITE_LINE_MEMBER(tx0_io_prt); - DECLARE_WRITE_LINE_MEMBER(tx0_io_dis); - DECLARE_WRITE_LINE_MEMBER(tx0_sel); - DECLARE_WRITE_LINE_MEMBER(tx0_io_reset_callback); - void magtape_callback(); - -private: - required_device m_gfxdecode; - required_device m_palette; - required_device m_crt; - required_ioport m_csw; - required_ioport_array<4> m_twr; -}; - -/* defines for each bit and mask in input port "CSW" */ -enum -{ - /* bit numbers */ - tx0_control_bit = 0, - - tx0_stop_c0_bit = 1, - tx0_stop_c1_bit = 2, - tx0_gbl_cm_sel_bit = 3, - tx0_stop_bit = 4, - tx0_restart_bit = 5, - tx0_read_in_bit = 6, - - tx0_toggle_dn_bit = 12, - tx0_toggle_up_bit = 13, - tx0_cm_sel_bit = 14, - tx0_lr_sel_bit = 15, - - /* masks */ - tx0_control = (1 << tx0_control_bit), - - tx0_stop_cyc0 = (1 << tx0_stop_c0_bit), - tx0_stop_cyc1 = (1 << tx0_stop_c1_bit), - tx0_gbl_cm_sel = (1 << tx0_gbl_cm_sel_bit), - tx0_stop = (1 << tx0_stop_bit), - tx0_restart = (1 << tx0_restart_bit), - tx0_read_in = (1 << tx0_read_in_bit), - - tx0_toggle_dn = (1 << tx0_toggle_dn_bit), - tx0_toggle_up = (1 << tx0_toggle_up_bit), - tx0_cm_sel = (1 << tx0_cm_sel_bit), - tx0_lr_sel = (1 << tx0_lr_sel_bit) -}; - -/* defines for our font */ -enum -{ - tx0_charnum = /*96*/128, /* ASCII set + xx special characters */ - /* for whatever reason, 96 breaks some characters */ - - tx0_fontdata_size = 8 * tx0_charnum -}; - -enum -{ - /* size and position of crt window */ - crt_window_width = /*511*/512, - crt_window_height = /*511*/512, - crt_window_offset_x = 0, - crt_window_offset_y = 0, - /* size and position of operator control panel window */ - panel_window_width = 272, - panel_window_height = 264, - panel_window_offset_x = crt_window_width, - panel_window_offset_y = 0, - /* size and position of typewriter window */ - typewriter_window_width = 640, - typewriter_window_height = 160, - typewriter_window_offset_x = 0, - typewriter_window_offset_y = crt_window_height -}; - -enum -{ - total_width = crt_window_width + panel_window_width, - total_height = crt_window_height + typewriter_window_height, - - /* respect 4:3 aspect ratio to keep pixels square */ - virtual_width_1 = ((total_width+3)/4)*4, - virtual_height_1 = ((total_height+2)/3)*3, - virtual_width_2 = virtual_height_1*4/3, - virtual_height_2 = virtual_width_1*3/4, - virtual_width = (virtual_width_1 > virtual_width_2) ? virtual_width_1 : virtual_width_2, - virtual_height = (virtual_height_1 > virtual_height_2) ? virtual_height_1 : virtual_height_2 -}; - -enum -{ /* refresh rate in Hz: can be changed at will */ - refresh_rate = 60 -}; - -/* Color codes */ -enum -{ - /* first pen_crt_num_levels colors used for CRT (with remanence) */ - pen_crt_num_levels = 69, - pen_crt_max_intensity = pen_crt_num_levels-1, - - /* next colors used for control panel and typewriter */ - pen_black = pen_crt_num_levels, - pen_white, - pen_green, - pen_dk_green, - pen_red, - pen_lt_gray, - - /* color constants for control panel */ - pen_panel_bg = pen_black, - pen_panel_caption = pen_white, - color_panel_caption = 0, - pen_switch_nut = pen_lt_gray, - pen_switch_button = pen_white, - pen_lit_lamp = pen_green, - pen_unlit_lamp = pen_dk_green, - - /* color constants for typewriter */ - pen_typewriter_bg = pen_white, - color_typewriter_black = 1, /* palette 1 = black on white */ - color_typewriter_red = 2, /* palette 2 = red on white */ - - /* color constants used for light pen */ - pen_lightpen_nonpressed = pen_red, - pen_lightpen_pressed = pen_green -}; - - -#endif /* TX0_H_ */ diff --git a/src/mess/includes/ut88.h b/src/mess/includes/ut88.h deleted file mode 100644 index 757d1f7a98c..00000000000 --- a/src/mess/includes/ut88.h +++ /dev/null @@ -1,100 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/ut88.h - * - ****************************************************************************/ - -#ifndef UT88_H_ -#define UT88_H_ - -#include "emu.h" -#include "cpu/i8085/i8085.h" -#include "sound/dac.h" -#include "sound/wave.h" -#include "machine/i8255.h" -#include "imagedev/cassette.h" - - -class ut88_state : public driver_device -{ -public: - enum - { - TIMER_RESET, - TIMER_UPDATE_DISPLAY - }; - - ut88_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_ppi(*this, "ppi8255"), - m_dac(*this, "dac"), - m_p_videoram(*this, "p_videoram"), - m_region_maincpu(*this, "maincpu"), - m_region_proms(*this, "proms"), - m_bank1(*this, "bank1"), - m_io_line0(*this, "LINE0"), - m_io_line1(*this, "LINE1"), - m_io_line2(*this, "LINE2"), - m_io_line3(*this, "LINE3"), - m_io_line4(*this, "LINE4"), - m_io_line5(*this, "LINE5"), - m_io_line6(*this, "LINE6"), - m_io_line7(*this, "LINE7"), - m_io_line8(*this, "LINE8") , - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - required_device m_cassette; - optional_device m_ppi; - optional_device m_dac; - DECLARE_READ8_MEMBER(ut88_keyboard_r); - DECLARE_WRITE8_MEMBER(ut88_keyboard_w); - DECLARE_WRITE8_MEMBER(ut88_sound_w); - DECLARE_READ8_MEMBER(ut88_tape_r); - DECLARE_READ8_MEMBER(ut88mini_keyboard_r); - DECLARE_WRITE8_MEMBER(ut88mini_write_led); - DECLARE_READ8_MEMBER(ut88_8255_portb_r); - DECLARE_READ8_MEMBER(ut88_8255_portc_r); - DECLARE_WRITE8_MEMBER(ut88_8255_porta_w); - optional_shared_ptr m_p_videoram; - int m_keyboard_mask; - int m_lcd_digit[6]; - DECLARE_DRIVER_INIT(ut88); - DECLARE_DRIVER_INIT(ut88mini); - DECLARE_MACHINE_RESET(ut88); - DECLARE_VIDEO_START(ut88); - DECLARE_MACHINE_START(ut88mini); - DECLARE_MACHINE_RESET(ut88mini); - UINT32 screen_update_ut88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(ut88_reset); - TIMER_CALLBACK_MEMBER(update_display); - -protected: - required_memory_region m_region_maincpu; - optional_memory_region m_region_proms; - optional_memory_bank m_bank1; - required_ioport m_io_line0; - required_ioport m_io_line1; - required_ioport m_io_line2; - optional_ioport m_io_line3; - optional_ioport m_io_line4; - optional_ioport m_io_line5; - optional_ioport m_io_line6; - optional_ioport m_io_line7; - optional_ioport m_io_line8; - required_device m_maincpu; - optional_device m_gfxdecode; - optional_device m_palette; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -/*----------- defined in video/ut88.c -----------*/ - -extern const gfx_layout ut88_charlayout; - - -#endif /* UT88_H_ */ diff --git a/src/mess/includes/v1050.h b/src/mess/includes/v1050.h deleted file mode 100644 index 429f032c38a..00000000000 --- a/src/mess/includes/v1050.h +++ /dev/null @@ -1,235 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __V1050__ -#define __V1050__ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/m6502/m6502.h" -#include "bus/centronics/ctronics.h" -#include "bus/scsi/s1410.h" -#include "machine/clock.h" -#include "machine/i8214.h" -#include "machine/i8251.h" -#include "machine/i8255.h" -#include "machine/msm58321.h" -#include "machine/ram.h" -#include "bus/scsi/scsi.h" -#include "bus/scsi/scsihd.h" -#include "machine/v1050kb.h" -#include "machine/wd_fdc.h" -#include "video/mc6845.h" - -#define SCREEN_TAG "screen" - -#define Z80_TAG "u80" -#define UPB8214_TAG "u38" -#define I8255A_DISP_TAG "u79" -#define I8255A_MISC_TAG "u10" -#define I8255A_RTC_TAG "u36" -#define I8251A_KB_TAG "u85" -#define I8251A_SIO_TAG "u8" -#define MSM58321RS_TAG "u26" -#define MB8877_TAG "u13" -#define FDC9216_TAG "u25" -#define M6502_TAG "u76" -#define I8255A_M6502_TAG "u101" -#define H46505_TAG "u75" -#define CENTRONICS_TAG "centronics" -#define CLOCK_KB_TAG "keyboard_clock" -#define CLOCK_SIO_TAG "sio_clock" -#define TIMER_ACK_TAG "timer_ack" -#define TIMER_RST_TAG "timer_rst" -#define SASIBUS_TAG "sasi" -#define RS232_TAG "rs232" -#define V1050_KEYBOARD_TAG "v1050kb" - -#define V1050_VIDEORAM_SIZE 0x8000 -#define V1050_VIDEORAM_MASK 0x7fff - -#define INT_RS_232 0x01 -#define INT_WINCHESTER 0x02 -#define INT_KEYBOARD 0x04 -#define INT_FLOPPY 0x08 -#define INT_VSYNC 0x10 -#define INT_DISPLAY 0x20 -#define INT_EXPANSION_B 0x40 -#define INT_EXPANSION_A 0x80 - -class v1050_state : public driver_device -{ -public: - v1050_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_subcpu(*this, M6502_TAG), - m_pic(*this, UPB8214_TAG), - m_ppi_disp(*this, I8255A_DISP_TAG), - m_ppi_6502(*this, I8255A_M6502_TAG), - m_rtc(*this, MSM58321RS_TAG), - m_uart_kb(*this, I8251A_KB_TAG), - m_uart_sio(*this, I8251A_SIO_TAG), - m_fdc(*this, MB8877_TAG), - m_crtc(*this, H46505_TAG), - m_palette(*this, "palette"), - m_centronics(*this, CENTRONICS_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, MB8877_TAG":0"), - m_floppy1(*this, MB8877_TAG":1"), - m_floppy2(*this, MB8877_TAG":2"), - m_floppy3(*this, MB8877_TAG":3"), - m_clock_sio(*this, CLOCK_SIO_TAG), - m_timer_ack(*this, TIMER_ACK_TAG), - m_timer_rst(*this, TIMER_RST_TAG), - m_sasibus(*this, SASIBUS_TAG), - m_sasi_data_out(*this, "scsi_data_out"), - m_sasi_data_in(*this, "scsi_data_in"), - m_sasi_ctrl_in(*this, "scsi_ctrl_in"), - m_rom(*this, Z80_TAG), - m_video_ram(*this, "video_ram"), - m_attr_ram(*this, "attr_ram"), - m_rtc_ppi_pa(0), - m_rtc_ppi_pc(0) - { - } - - DECLARE_READ8_MEMBER( kb_data_r ); - DECLARE_READ8_MEMBER( kb_status_r ); - DECLARE_WRITE8_MEMBER( v1050_i8214_w ); - DECLARE_READ8_MEMBER( vint_clr_r ); - DECLARE_WRITE8_MEMBER( vint_clr_w ); - DECLARE_READ8_MEMBER( dint_clr_r ); - DECLARE_WRITE8_MEMBER( dint_clr_w ); - DECLARE_WRITE8_MEMBER( bank_w ); - DECLARE_WRITE8_MEMBER( dint_w ); - DECLARE_WRITE8_MEMBER( dvint_clr_w ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_WRITE8_MEMBER( keyboard_w ); - DECLARE_WRITE8_MEMBER( p2_w ); - DECLARE_WRITE8_MEMBER( misc_ppi_pa_w ); - DECLARE_WRITE8_MEMBER( misc_ppi_pc_w ); - DECLARE_READ8_MEMBER( rtc_ppi_pa_r ); - DECLARE_WRITE8_MEMBER( rtc_ppi_pa_w ); - DECLARE_WRITE8_MEMBER( rtc_ppi_pb_w ); - DECLARE_READ8_MEMBER( rtc_ppi_pc_r ); - DECLARE_WRITE8_MEMBER( rtc_ppi_pc_w ); - DECLARE_WRITE_LINE_MEMBER( kb_rxrdy_w ); - DECLARE_WRITE_LINE_MEMBER( sio_rxrdy_w ); - DECLARE_WRITE_LINE_MEMBER( sio_txrdy_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - DECLARE_READ8_MEMBER( attr_r ); - DECLARE_WRITE8_MEMBER( attr_w ); - DECLARE_READ8_MEMBER( videoram_r ); - DECLARE_WRITE8_MEMBER( videoram_w ); - DECLARE_WRITE_LINE_MEMBER( crtc_vs_w ); - DECLARE_WRITE8_MEMBER(sasi_data_w); - DECLARE_WRITE_LINE_MEMBER(write_sasi_io); - DECLARE_READ8_MEMBER( sasi_status_r ); - DECLARE_WRITE8_MEMBER( sasi_ctrl_w ); - - WRITE_LINE_MEMBER( rtc_ppi_pa_0_w ){ m_rtc_ppi_pa = (m_rtc_ppi_pa & ~(1 << 0)) | ((state & 1) << 0); } - WRITE_LINE_MEMBER( rtc_ppi_pa_1_w ){ m_rtc_ppi_pa = (m_rtc_ppi_pa & ~(1 << 1)) | ((state & 1) << 1); } - WRITE_LINE_MEMBER( rtc_ppi_pa_2_w ){ m_rtc_ppi_pa = (m_rtc_ppi_pa & ~(1 << 2)) | ((state & 1) << 2); } - WRITE_LINE_MEMBER( rtc_ppi_pa_3_w ){ m_rtc_ppi_pa = (m_rtc_ppi_pa & ~(1 << 3)) | ((state & 1) << 3); } - WRITE_LINE_MEMBER( rtc_ppi_pc_3_w ){ m_rtc_ppi_pc = (m_rtc_ppi_pc & ~(1 << 3)) | ((state & 1) << 3); } - - TIMER_DEVICE_CALLBACK_MEMBER(v1050_keyboard_tick); - TIMER_DEVICE_CALLBACK_MEMBER(sasi_ack_tick); - TIMER_DEVICE_CALLBACK_MEMBER(sasi_rst_tick); - DECLARE_WRITE_LINE_MEMBER(write_keyboard_clock); - DECLARE_WRITE_LINE_MEMBER(write_sio_clock); - DECLARE_WRITE_LINE_MEMBER(pic_int_w); - DECLARE_WRITE8_MEMBER(disp_ppi_pc_w); - DECLARE_WRITE8_MEMBER(m6502_ppi_pc_w); - DECLARE_READ8_MEMBER(misc_ppi_pc_r); - IRQ_CALLBACK_MEMBER(v1050_int_ack); - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); - - MC6845_UPDATE_ROW(crtc_update_row); - -protected: - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - -private: - void bankswitch(); - void update_fdc(); - void set_interrupt(UINT8 mask, int state); - void scan_keyboard(); - void set_baud_sel(int sel); - -public: // HACK for MC6845 - required_device m_maincpu; - required_device m_subcpu; - required_device m_pic; - required_device m_ppi_disp; - required_device m_ppi_6502; - required_device m_rtc; - required_device m_uart_kb; - required_device m_uart_sio; - required_device m_fdc; - required_device m_crtc; - required_device m_palette; - required_device m_centronics; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_clock_sio; - required_device m_timer_ack; - required_device m_timer_rst; - required_device m_sasibus; - required_device m_sasi_data_out; - required_device m_sasi_data_in; - required_device m_sasi_ctrl_in; - required_memory_region m_rom; - required_shared_ptr m_video_ram; - optional_shared_ptr m_attr_ram; - - // interrupt state - UINT8 m_int_mask; // interrupt mask - UINT8 m_int_state; // interrupt status - int m_f_int_enb; // floppy interrupt enable - bool m_fdc_irq; - bool m_fdc_drq; - - // keyboard state - UINT8 m_keylatch; // keyboard row select - UINT8 m_keydata; - int m_keyavail; - - // serial state - int m_rxrdy; // receiver ready - int m_txrdy; // transmitter ready - int m_baud_sel; // baud select - - // memory state - UINT8 m_bank; // bank register - - // video state - UINT8 m_attr; // attribute latch - - // sasi state - UINT8 m_sasi_data; - int m_sasi_data_enable; - - UINT8 m_rtc_ppi_pa; - UINT8 m_rtc_ppi_pc; - - int m_centronics_busy; - int m_centronics_perror; -}; - -//----------- defined in video/v1050.c ----------- - -MACHINE_CONFIG_EXTERN( v1050_video ); - -#endif diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h deleted file mode 100644 index f0d0c95cab8..00000000000 --- a/src/mess/includes/vc4000.h +++ /dev/null @@ -1,157 +0,0 @@ -// license:??? -// copyright-holders:Peter Trauner, Manfred Schneider, Robbbert -/***************************************************************************** - * - * includes/vc4000.h - * - ****************************************************************************/ - -#ifndef VC4000_H_ -#define VC4000_H_ - -#include "emu.h" -#include "audio/vc4000snd.h" -#include "cpu/s2650/s2650.h" -#include "imagedev/snapquik.h" -#include "imagedev/cassette.h" -#include "sound/wave.h" - -#include "bus/vc4000/slot.h" -#include "bus/vc4000/rom.h" - -// define this to use digital inputs instead of the slow -// autocentering analog mame joys -#define ANALOG_HACK - - -struct SPRITE_HELPER -{ - UINT8 bitmap[10],x1,x2,y1,y2, res1, res2; -}; - -struct SPRITE -{ - const SPRITE_HELPER *data; - int mask; - int state; - int delay; - int size; - int y; - UINT8 scolor; - int finished; - int finished_now; -}; - -struct vc4000_video_t -{ - SPRITE sprites[4]; - int line; - UINT8 sprite_collision; - UINT8 background_collision; - union - { - UINT8 data[0x100]; - struct - { - SPRITE_HELPER sprites[3]; - UINT8 res[0x10]; - SPRITE_HELPER sprite4; - UINT8 res2[0x30]; - UINT8 grid[20][2]; - UINT8 grid_control[5]; - UINT8 res3[0x13]; - UINT8 sprite_sizes; - UINT8 sprite_colors[2]; - UINT8 score_control; - UINT8 res4[2]; - UINT8 background; - UINT8 sound; - UINT8 bcd[2]; - UINT8 background_collision; - UINT8 sprite_collision; - } d; - } reg; -} ; - -class vc4000_state : public driver_device -{ -public: - vc4000_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_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_custom(*this, "custom"), - m_keypad1_1(*this, "KEYPAD1_1"), - m_keypad1_2(*this, "KEYPAD1_2"), - m_keypad1_3(*this, "KEYPAD1_3"), - m_panel(*this, "PANEL"), - m_keypad2_1(*this, "KEYPAD2_1"), - m_keypad2_2(*this, "KEYPAD2_2"), - m_keypad2_3(*this, "KEYPAD2_3"), -#ifndef ANALOG_HACK - m_io_joy1_x(*this, "JOY1_X"), - m_io_joy1_y(*this, "JOY1_Y"), - m_io_joy2_x(*this, "JOY2_X"), - m_io_joy2_y(*this, "JOY2_Y") -#else - m_joys(*this, "JOYS"), - m_config(*this, "CONFIG") -#endif - { } - - DECLARE_WRITE8_MEMBER(vc4000_sound_ctl); - DECLARE_READ8_MEMBER(vc4000_key_r); - DECLARE_READ8_MEMBER(vc4000_video_r); - DECLARE_WRITE8_MEMBER(vc4000_video_w); - DECLARE_READ8_MEMBER(vc4000_vsync_r); - DECLARE_READ8_MEMBER(elektor_cass_r); - DECLARE_WRITE8_MEMBER(elektor_cass_w); - vc4000_video_t m_video; - UINT8 m_sprite_collision[0x20]; - UINT8 m_background_collision[0x20]; - UINT8 m_joy1_x; - UINT8 m_joy1_y; - UINT8 m_joy2_x; - UINT8 m_joy2_y; - UINT8 m_objects[512]; - UINT8 m_irq_pause; - bitmap_ind16 *m_bitmap; - virtual void machine_start(); - virtual void video_start(); - DECLARE_PALETTE_INIT(vc4000); - UINT32 screen_update_vc4000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vc4000_video_line); - DECLARE_QUICKLOAD_LOAD_MEMBER(vc4000); - -protected: - required_device m_maincpu; - required_device m_screen; - optional_device m_cassette; - required_device m_cart; - required_device m_custom; - required_ioport m_keypad1_1; - required_ioport m_keypad1_2; - required_ioport m_keypad1_3; - required_ioport m_panel; - required_ioport m_keypad2_1; - required_ioport m_keypad2_2; - required_ioport m_keypad2_3; -#ifndef ANALOG_HACK - required_ioport m_io_joy1_x; - required_ioport m_io_joy1_y; - required_ioport m_io_joy2_x; - required_ioport m_io_joy2_y; -#else - required_ioport m_joys; - required_ioport m_config; -#endif - inline UINT8 vc4000_joystick_return_to_centre(UINT8 joy); - void vc4000_draw_digit(bitmap_ind16 &bitmap, int x, int y, int d, int line); - inline void vc4000_collision_plot(UINT8 *collision, UINT8 data, UINT8 color, int scale); - void vc4000_sprite_update(bitmap_ind16 &bitmap, UINT8 *collision, SPRITE *This); - inline void vc4000_draw_grid(UINT8 *collision); -}; - -#endif /* VC4000_H_ */ diff --git a/src/mess/includes/vcs80.h b/src/mess/includes/vcs80.h deleted file mode 100644 index 7030bbc008d..00000000000 --- a/src/mess/includes/vcs80.h +++ /dev/null @@ -1,52 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic, Robbbert -#pragma once - -#ifndef __VCS80__ -#define __VCS80__ - - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80pio.h" -#include "machine/ram.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "z80" -#define Z80PIO_TAG "z80pio" - -class vcs80_state : public driver_device -{ -public: - vcs80_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_pio(*this, Z80PIO_TAG), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2") - { } - - required_device m_maincpu; - required_device m_pio; - required_ioport m_y0; - required_ioport m_y1; - required_ioport m_y2; - - virtual void machine_start(); - - DECLARE_READ8_MEMBER( pio_r ); - DECLARE_WRITE8_MEMBER( pio_w ); - DECLARE_READ8_MEMBER( pio_pa_r ); - DECLARE_WRITE8_MEMBER( pio_pb_w ); - - DECLARE_DIRECT_UPDATE_MEMBER(vcs80_direct_update_handler); - /* keyboard state */ - int m_keylatch; - int m_keyclk; - DECLARE_DRIVER_INIT(vcs80); - TIMER_DEVICE_CALLBACK_MEMBER(vcs80_keyboard_tick); -}; - -#endif diff --git a/src/mess/includes/vector06.h b/src/mess/includes/vector06.h deleted file mode 100644 index 959842aa3b6..00000000000 --- a/src/mess/includes/vector06.h +++ /dev/null @@ -1,102 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/***************************************************************************** - * - * includes/vector06.h - * - ****************************************************************************/ - -#ifndef VECTOR06_H_ -#define VECTOR06_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/i8085/i8085.h" -#include "sound/wave.h" -#include "machine/i8255.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "imagedev/cassette.h" -#include "imagedev/flopdrv.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -class vector06_state : public driver_device -{ -public: - vector06_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_fdc(*this, "wd1793"), - m_floppy0(*this, "wd1793:0"), - m_floppy1(*this, "wd1793:1"), - m_ppi(*this, "ppi8255"), - m_ppi2(*this, "ppi8255_2"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_region_maincpu(*this, "maincpu"), - m_line(*this, "LINE"), - m_reset(*this, "RESET") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - DECLARE_READ8_MEMBER(vector06_8255_portb_r); - DECLARE_READ8_MEMBER(vector06_8255_portc_r); - DECLARE_WRITE8_MEMBER(vector06_8255_porta_w); - DECLARE_WRITE8_MEMBER(vector06_8255_portb_w); - DECLARE_WRITE8_MEMBER(vector06_color_set); - DECLARE_READ8_MEMBER(vector06_romdisk_portb_r); - DECLARE_WRITE8_MEMBER(vector06_romdisk_porta_w); - DECLARE_WRITE8_MEMBER(vector06_romdisk_portc_w); - DECLARE_READ8_MEMBER(vector06_8255_1_r); - DECLARE_WRITE8_MEMBER(vector06_8255_1_w); - DECLARE_READ8_MEMBER(vector06_8255_2_r); - DECLARE_WRITE8_MEMBER(vector06_8255_2_w); - DECLARE_WRITE8_MEMBER(vector06_disc_w); - void vector06_set_video_mode(int width); - virtual void machine_start(); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(vector06); - UINT32 screen_update_vector06(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vector06_interrupt); - TIMER_CALLBACK_MEMBER(reset_check_callback); - IRQ_CALLBACK_MEMBER(vector06_irq_callback); - -private: - required_device m_maincpu; - required_device m_cassette; - required_device m_cart; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_ppi; - required_device m_ppi2; - required_device m_ram; - required_device m_palette; - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_region m_region_maincpu; - required_ioport_array<9> m_line; - required_ioport m_reset; - - UINT8 m_keyboard_mask; - UINT8 m_color_index; - UINT8 m_video_mode; - UINT8 m_romdisk_msb; - UINT8 m_romdisk_lsb; - UINT8 m_vblank_state; - -}; - -#endif /* VECTOR06_H_ */ diff --git a/src/mess/includes/vic10.h b/src/mess/includes/vic10.h deleted file mode 100644 index 5068bca4454..00000000000 --- a/src/mess/includes/vic10.h +++ /dev/null @@ -1,118 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __VIC10__ -#define __VIC10__ - -#include "emu.h" -#include "bus/pet/cass.h" -#include "bus/vic10/exp.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "cpu/m6502/m6510.h" -#include "machine/mos6526.h" -#include "machine/ram.h" -#include "sound/dac.h" -#include "sound/mos6581.h" -#include "video/mos6566.h" - -#define M6510_TAG "u3" -#define MOS6566_TAG "u2" -#define MOS6581_TAG "u6" -#define MOS6526_TAG "u9" -#define SCREEN_TAG "screen" -#define TIMER_C1531_TAG "c1531" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" - -class vic10_state : public driver_device -{ -public: - vic10_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M6510_TAG), - m_vic(*this, MOS6566_TAG), - m_sid(*this, MOS6581_TAG), - m_cia(*this, MOS6526_TAG), - m_joy1(*this, CONTROL1_TAG), - m_joy2(*this, CONTROL2_TAG), - m_exp(*this, VIC10_EXPANSION_SLOT_TAG), - m_ram(*this, RAM_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_color_ram(*this, "color_ram"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_restore(*this, "RESTORE"), - m_lock(*this, "LOCK"), - m_cia_irq(CLEAR_LINE), - m_vic_irq(CLEAR_LINE), - m_exp_irq(CLEAR_LINE) - { } - - required_device m_maincpu; - required_device m_vic; - required_device m_sid; - required_device m_cia; - required_device m_joy1; - required_device m_joy2; - required_device m_exp; - required_device m_ram; - optional_device m_cassette; - optional_shared_ptr m_color_ram; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_ioport m_restore; - required_ioport m_lock; - - virtual void machine_start(); - virtual void machine_reset(); - - void check_interrupts(); - UINT8 paddle_read(address_space &space, int which); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_WRITE_LINE_MEMBER( vic_irq_w ); - DECLARE_READ8_MEMBER( vic_videoram_r ); - DECLARE_READ8_MEMBER( vic_colorram_r ); - DECLARE_READ8_MEMBER( vic_lightpen_x_cb ); - DECLARE_READ8_MEMBER( vic_lightpen_y_cb ); - DECLARE_READ8_MEMBER( vic_lightpen_button_cb ); - DECLARE_READ8_MEMBER( vic_rdy_cb ); - - DECLARE_READ8_MEMBER( sid_potx_r ); - DECLARE_READ8_MEMBER( sid_poty_r ); - - DECLARE_WRITE_LINE_MEMBER( cia_irq_w ); - DECLARE_READ8_MEMBER( cia_pa_r ); - DECLARE_READ8_MEMBER( cia_pb_r ); - DECLARE_WRITE8_MEMBER( cia_pb_w ); - - DECLARE_READ8_MEMBER( cpu_r ); - DECLARE_WRITE8_MEMBER( cpu_w ); - - DECLARE_WRITE_LINE_MEMBER( exp_irq_w ); - DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); - - // interrupt state - int m_cia_irq; - int m_vic_irq; - int m_exp_irq; -}; - - - -#endif diff --git a/src/mess/includes/vic20.h b/src/mess/includes/vic20.h deleted file mode 100644 index 1c900d91acd..00000000000 --- a/src/mess/includes/vic20.h +++ /dev/null @@ -1,162 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __VIC20__ -#define __VIC20__ - -#include "emu.h" -#include "bus/cbmiec/cbmiec.h" -#include "bus/pet/cass.h" -#include "bus/vcs_ctrl/ctrl.h" -#include "bus/vic20/exp.h" -#include "bus/vic20/user.h" -#include "cpu/m6502/m6510.h" -#include "machine/6522via.h" -#include "machine/cbm_snqk.h" -#include "machine/ram.h" -#include "sound/dac.h" -#include "sound/mos6560.h" - -#define M6502_TAG "ue10" -#define M6522_1_TAG "uab3" -#define M6522_2_TAG "uab1" -#define M6560_TAG "ub7" -#define M6561_TAG "ub7" -#define IEC_TAG "iec" -#define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define PET_USER_PORT_TAG "user" - -class vic20_state : public driver_device -{ -public: - vic20_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, M6502_TAG), - m_via1(*this, M6522_1_TAG), - m_via2(*this, M6522_2_TAG), - m_vic(*this, M6560_TAG), - m_iec(*this, CBM_IEC_TAG), - m_joy(*this, CONTROL1_TAG), - m_exp(*this, VIC20_EXPANSION_SLOT_TAG), - m_user(*this, PET_USER_PORT_TAG), - m_cassette(*this, PET_DATASSETTE_PORT_TAG), - m_ram(*this, RAM_TAG), - m_basic(*this, "basic"), - m_kernal(*this, "kernal"), - m_charom(*this, "charom"), - m_color_ram(*this, "color_ram"), - m_row0(*this, "ROW0"), - m_row1(*this, "ROW1"), - m_row2(*this, "ROW2"), - m_row3(*this, "ROW3"), - m_row4(*this, "ROW4"), - m_row5(*this, "ROW5"), - m_row6(*this, "ROW6"), - m_row7(*this, "ROW7"), - m_restore(*this, "RESTORE"), - m_lock(*this, "LOCK") - { } - - required_device m_maincpu; - required_device m_via1; - required_device m_via2; - required_device m_vic; - required_device m_iec; - required_device m_joy; - required_device m_exp; - required_device m_user; - required_device m_cassette; - required_device m_ram; - required_region_ptr m_basic; - required_region_ptr m_kernal; - required_region_ptr m_charom; - required_shared_ptr m_color_ram; - required_ioport m_row0; - required_ioport m_row1; - required_ioport m_row2; - required_ioport m_row3; - required_ioport m_row4; - required_ioport m_row5; - required_ioport m_row6; - required_ioport m_row7; - required_ioport m_restore; - required_ioport m_lock; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - - DECLARE_READ8_MEMBER( vic_videoram_r ); - DECLARE_READ8_MEMBER( vic_lightx_cb ); - DECLARE_READ8_MEMBER( vic_lighty_cb ); - DECLARE_READ8_MEMBER( vic_lightbut_cb ); - - DECLARE_WRITE_LINE_MEMBER( write_light_pen ); - DECLARE_WRITE_LINE_MEMBER( write_user_joy0 ); - DECLARE_WRITE_LINE_MEMBER( write_user_joy1 ); - DECLARE_WRITE_LINE_MEMBER( write_user_joy2 ); - DECLARE_WRITE_LINE_MEMBER( write_user_light_pen ); - DECLARE_WRITE_LINE_MEMBER( write_user_cassette_switch ); - - DECLARE_READ8_MEMBER( via1_pa_r ); - DECLARE_WRITE8_MEMBER( via1_pa_w ); - DECLARE_WRITE8_MEMBER( via1_pb_w ); - - DECLARE_READ8_MEMBER( via2_pa_r ); - DECLARE_READ8_MEMBER( via2_pb_r ); - DECLARE_WRITE8_MEMBER( via2_pb_w ); - DECLARE_WRITE_LINE_MEMBER( via2_ca2_w ); - DECLARE_WRITE_LINE_MEMBER( via2_cb2_w ); - - DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_vc20 ); - // keyboard state - int m_key_col; - int m_light_pen; - int m_user_joy0; - int m_user_joy1; - int m_user_joy2; - int m_user_light_pen; - int m_user_cassette_switch; - - enum - { - BLK0 = 0, - BLK1, - BLK2, - BLK3, - BLK4, - BLK5, - BLK6, - BLK7 - }; - - - enum - { - RAM0 = 0, - RAM1, - RAM2, - RAM3, - RAM4, - RAM5, - RAM6, - RAM7 - }; - - - enum - { - IO0 = 4, - COLOR = 5, - IO2 = 6, - IO3 = 7 - }; -}; - -#endif diff --git a/src/mess/includes/victor9k.h b/src/mess/includes/victor9k.h deleted file mode 100644 index 89c5c0b1c4b..00000000000 --- a/src/mess/includes/victor9k.h +++ /dev/null @@ -1,156 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************** - - Victor 9000 / ACT Sirius 1 emulation - -**********************************************************************/ - -#pragma once - -#ifndef __VICTOR9K__ -#define __VICTOR9K__ - -#include "bus/rs232/rs232.h" -#include "bus/centronics/ctronics.h" -#include "cpu/i86/i86.h" -#include "formats/victor9k_dsk.h" -#include "imagedev/floppy.h" -#include "machine/ram.h" -#include "bus/centronics/ctronics.h" -#include "machine/6522via.h" -#include "bus/ieee488/ieee488.h" -#include "machine/mc6852.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/z80dart.h" -#include "machine/victor9kb.h" -#include "machine/victor9k_fdc.h" -#include "sound/hc55516.h" -#include "video/mc6845.h" - -#define I8088_TAG "8l" -#define I8253_TAG "13h" -#define I8259A_TAG "7l" -#define UPD7201_TAG "16e" -#define HD46505S_TAG "11a" -#define MC6852_TAG "11b" -#define HC55516_TAG "15c" -#define M6522_1_TAG "m6522_1" -#define M6522_2_TAG "m6522_2" -#define M6522_3_TAG "14l" -#define DAC0808_0_TAG "5b" -#define DAC0808_1_TAG "5c" -#define CENTRONICS_TAG "centronics" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define SCREEN_TAG "screen" -#define KB_TAG "kb" -#define FDC_TAG "fdc" - -class victor9k_state : public driver_device -{ -public: - victor9k_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, I8088_TAG), - m_ieee488(*this, IEEE488_TAG), - m_pic(*this, I8259A_TAG), - m_upd7201(*this, UPD7201_TAG), - m_ssda(*this, MC6852_TAG), - m_via1(*this, M6522_1_TAG), - m_via2(*this, M6522_2_TAG), - m_via3(*this, M6522_3_TAG), - m_cvsd(*this, HC55516_TAG), - m_crtc(*this, HD46505S_TAG), - m_ram(*this, RAM_TAG), - m_kb(*this, KB_TAG), - m_fdc(*this, FDC_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_rs232a(*this, RS232_A_TAG), - m_rs232b(*this, RS232_B_TAG), - m_palette(*this, "palette"), - m_rom(*this, I8088_TAG), - m_video_ram(*this, "video_ram"), - m_brt(0), - m_cont(0), - m_via1_irq(CLEAR_LINE), - m_via2_irq(CLEAR_LINE), - m_via3_irq(CLEAR_LINE), - m_fdc_irq(CLEAR_LINE), - m_ssda_irq(CLEAR_LINE), - m_kbrdy(1), - m_kbackctl(0) - { } - - required_device m_maincpu; - required_device m_ieee488; - required_device m_pic; - required_device m_upd7201; - required_device m_ssda; - required_device m_via1; - required_device m_via2; - required_device m_via3; - required_device m_cvsd; - required_device m_crtc; - required_device m_ram; - required_device m_kb; - required_device m_fdc; - required_device m_centronics; - required_device m_rs232a; - required_device m_rs232b; - required_device m_palette; - required_memory_region m_rom; - required_shared_ptr m_video_ram; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( via1_pa_w ); - DECLARE_WRITE_LINE_MEMBER( write_nfrd ); - DECLARE_WRITE_LINE_MEMBER( write_ndac ); - DECLARE_WRITE8_MEMBER( via1_pb_w ); - DECLARE_WRITE_LINE_MEMBER( via1_irq_w ); - DECLARE_WRITE_LINE_MEMBER( codec_vol_w ); - - DECLARE_WRITE8_MEMBER( via2_pa_w ); - DECLARE_WRITE8_MEMBER( via2_pb_w ); - DECLARE_WRITE_LINE_MEMBER( write_ria ); - DECLARE_WRITE_LINE_MEMBER( write_rib ); - DECLARE_WRITE_LINE_MEMBER( via2_irq_w ); - - DECLARE_WRITE8_MEMBER( via3_pb_w ); - DECLARE_WRITE_LINE_MEMBER( via3_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( fdc_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( ssda_irq_w ); - - DECLARE_WRITE_LINE_MEMBER( kbrdy_w ); - DECLARE_WRITE_LINE_MEMBER( kbdata_w ); - DECLARE_WRITE_LINE_MEMBER( vert_w ); - - MC6845_UPDATE_ROW( crtc_update_row ); - - DECLARE_WRITE_LINE_MEMBER( mux_serial_b_w ); - DECLARE_WRITE_LINE_MEMBER( mux_serial_a_w ); - - // video state - int m_brt; - int m_cont; - - // interrupts - int m_via1_irq; - int m_via2_irq; - int m_via3_irq; - int m_fdc_irq; - int m_ssda_irq; - - // keyboard - int m_kbrdy; - int m_kbackctl; - - void update_kback(); -}; - -#endif diff --git a/src/mess/includes/vidbrain.h b/src/mess/includes/vidbrain.h deleted file mode 100644 index 3bddb8542d7..00000000000 --- a/src/mess/includes/vidbrain.h +++ /dev/null @@ -1,126 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __VIDBRAIN__ -#define __VIDBRAIN__ - -#include "emu.h" -#include "bus/vidbrain/exp.h" -#include "cpu/f8/f8.h" -#include "machine/f3853.h" -#include "machine/ram.h" -#include "sound/dac.h" -#include "sound/discrete.h" -#include "video/uv201.h" - -#define F3850_TAG "cd34" -#define F3853_TAG "cd5" -#define F3870_TAG "f3870" -#define UV201_TAG "uv201" -#define SCREEN_TAG "screen" -#define DISCRETE_TAG "discrete" -#define DAC_TAG "dac" - -class vidbrain_state : public driver_device -{ -public: - vidbrain_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, F3850_TAG), - m_smi(*this, F3853_TAG), - m_uv(*this, UV201_TAG), - m_discrete(*this, DISCRETE_TAG), - m_dac(*this, DAC_TAG), - m_exp(*this, VIDEOBRAIN_EXPANSION_SLOT_TAG), - m_io00(*this, "IO00"), - m_io01(*this, "IO01"), - m_io02(*this, "IO02"), - m_io03(*this, "IO03"), - m_io04(*this, "IO04"), - m_io05(*this, "IO05"), - m_io06(*this, "IO06"), - m_io07(*this, "IO07"), - m_uv201_31(*this, "UV201-31"), - m_joy_r(*this, "JOY-R"), - m_joy1_x(*this, "JOY1-X"), - m_joy1_y(*this, "JOY1-Y"), - m_joy2_x(*this, "JOY2-X"), - m_joy2_y(*this, "JOY2-Y"), - m_joy3_x(*this, "JOY3-X"), - m_joy3_y(*this, "JOY3-Y"), - m_joy4_x(*this, "JOY4-X"), - m_joy4_y(*this, "JOY4-Y") - { } - - required_device m_maincpu; - required_device m_smi; - required_device m_uv; - required_device m_discrete; - required_device m_dac; - required_device m_exp; - required_ioport m_io00; - required_ioport m_io01; - required_ioport m_io02; - required_ioport m_io03; - required_ioport m_io04; - required_ioport m_io05; - required_ioport m_io06; - required_ioport m_io07; - required_ioport m_uv201_31; - required_ioport m_joy_r; - required_ioport m_joy1_x; - required_ioport m_joy1_y; - required_ioport m_joy2_x; - required_ioport m_joy2_y; - required_ioport m_joy3_x; - required_ioport m_joy3_y; - required_ioport m_joy4_x; - required_ioport m_joy4_y; - - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - virtual void machine_start(); - virtual void machine_reset(); - - enum - { - TIMER_JOYSTICK - }; - - DECLARE_WRITE8_MEMBER( keyboard_w ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_WRITE8_MEMBER( sound_w ); - DECLARE_WRITE8_MEMBER( f3853_w ); - DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); - DECLARE_WRITE_LINE_MEMBER( ext_int_w ); - DECLARE_WRITE_LINE_MEMBER( hblank_w ); - DECLARE_READ8_MEMBER(memory_read_byte); - - F3853_INTERRUPT_REQ_CB(f3853_int_req_w); - - IRQ_CALLBACK_MEMBER(vidbrain_int_ack); - - void interrupt_check(); - - // F3853 SMI state - UINT16 m_vector; - int m_int_enable; - int m_ext_int_latch; - int m_timer_int_latch; - - // keyboard state - UINT8 m_keylatch; - int m_joy_enable; - - // sound state - int m_sound_clk; - - // timers - emu_timer *m_timer_ne555; -}; - -//----------- defined in video/vidbrain.c ----------- - -MACHINE_CONFIG_EXTERN( vidbrain_video ); - -#endif diff --git a/src/mess/includes/vip.h b/src/mess/includes/vip.h deleted file mode 100644 index 9d2baf33491..00000000000 --- a/src/mess/includes/vip.h +++ /dev/null @@ -1,129 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __VIP__ -#define __VIP__ - -#include "emu.h" -#include "bus/vip/byteio.h" -#include "bus/vip/exp.h" -#include "cpu/cosmac/cosmac.h" -#include "imagedev/cassette.h" -#include "imagedev/snapquik.h" -#include "machine/ram.h" -#include "sound/discrete.h" -#include "video/cdp1861.h" - -#define SCREEN_TAG "screen" -#define CDP1802_TAG "u1" -#define CDP1861_TAG "u2" -#define DISCRETE_TAG "discrete" - - -class vip_state : public driver_device -{ -public: - vip_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_vdc(*this, CDP1861_TAG), - m_cassette(*this, "cassette"), - m_beeper(*this, DISCRETE_TAG), - m_byteio(*this, VIP_BYTEIO_PORT_TAG), - m_exp(*this, VIP_EXPANSION_SLOT_TAG), - m_ram(*this, RAM_TAG), - m_rom(*this, CDP1802_TAG), - m_chip8(*this, "chip8"), - m_chip8x(*this, "chip8x"), - m_run(*this, "RUN"), - m_keypad(*this, "KEYPAD"), - m_io_beeper(*this, "BEEPER"), - m_8000(1), - m_vdc_int(CLEAR_LINE), - m_vdc_dma_out(CLEAR_LINE), - m_vdc_ef1(CLEAR_LINE), - m_exp_int(CLEAR_LINE), - m_exp_dma_out(CLEAR_LINE), - m_exp_dma_in(CLEAR_LINE), - m_byteio_ef3(CLEAR_LINE), - m_byteio_ef4(CLEAR_LINE), - m_exp_ef1(CLEAR_LINE), - m_exp_ef3(CLEAR_LINE), - m_exp_ef4(CLEAR_LINE) - { } - - required_device m_maincpu; - required_device m_vdc; - required_device m_cassette; - required_device m_beeper; - required_device m_byteio; - required_device m_exp; - required_device m_ram; - required_memory_region m_rom; - required_memory_region m_chip8; - required_memory_region m_chip8x; - required_ioport m_run; - required_ioport m_keypad; - required_ioport m_io_beeper; - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void update_interrupts(); - - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); - - DECLARE_READ_LINE_MEMBER( clear_r ); - DECLARE_READ_LINE_MEMBER( ef1_r ); - DECLARE_READ_LINE_MEMBER( ef2_r ); - DECLARE_READ_LINE_MEMBER( ef3_r ); - DECLARE_READ_LINE_MEMBER( ef4_r ); - DECLARE_WRITE_LINE_MEMBER( q_w ); - DECLARE_READ8_MEMBER( dma_r ); - DECLARE_WRITE8_MEMBER( dma_w ); - DECLARE_WRITE8_MEMBER( sc_w ); - - DECLARE_WRITE_LINE_MEMBER( vdc_int_w ); - DECLARE_WRITE_LINE_MEMBER( vdc_dma_out_w ); - DECLARE_WRITE_LINE_MEMBER( vdc_ef1_w ); - - DECLARE_WRITE_LINE_MEMBER( byteio_inst_w ); - - DECLARE_WRITE_LINE_MEMBER( exp_int_w ); - DECLARE_WRITE_LINE_MEMBER( exp_dma_out_w ); - DECLARE_WRITE_LINE_MEMBER( exp_dma_in_w ); - - DECLARE_INPUT_CHANGED_MEMBER( reset_w ); - DECLARE_INPUT_CHANGED_MEMBER( beeper_w ); - - DECLARE_QUICKLOAD_LOAD_MEMBER( vip ); - // memory state - int m_8000; - - // interrupt state - int m_vdc_int; - int m_vdc_dma_out; - int m_vdc_ef1; - int m_exp_int; - int m_exp_dma_out; - int m_exp_dma_in; - int m_byteio_ef3; - int m_byteio_ef4; - int m_exp_ef1; - int m_exp_ef3; - int m_exp_ef4; - - // keyboard state - int m_keylatch; - - // expansion state - UINT8 m_byteio_data; -}; - -#endif diff --git a/src/mess/includes/vixen.h b/src/mess/includes/vixen.h deleted file mode 100644 index 73dc628b12d..00000000000 --- a/src/mess/includes/vixen.h +++ /dev/null @@ -1,133 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __VIXEN__ -#define __VIXEN__ - -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "machine/i8155.h" -#include "machine/i8251.h" -#include "bus/ieee488/ieee488.h" -#include "machine/ram.h" -#include "machine/wd_fdc.h" -#include "sound/discrete.h" - -#define Z8400A_TAG "5f" -#define FDC1797_TAG "5n" -#define P8155H_TAG "2n" -#define P8155H_IO_TAG "c7" -#define P8251A_TAG "c3" -#define DISCRETE_TAG "discrete" -#define SCREEN_TAG "screen" -#define RS232_TAG "rs232" - -class vixen_state : public driver_device -{ -public: - vixen_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z8400A_TAG), - m_fdc(*this, FDC1797_TAG), - m_io_i8155(*this, P8155H_IO_TAG), - m_usart(*this, P8251A_TAG), - m_discrete(*this, DISCRETE_TAG), - m_ieee488(*this, IEEE488_TAG), - m_palette(*this, "palette"), - m_ram(*this, RAM_TAG), - m_floppy0(*this, FDC1797_TAG":0"), - m_floppy1(*this, FDC1797_TAG":1"), - m_rs232(*this, RS232_TAG), - m_rom(*this, Z8400A_TAG), - m_sync_rom(*this, "video"), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_key(*this, "KEY"), - m_cmd_d1(0), - m_fdint(0), - m_vsync(0), - m_srq(1), - m_atn(1), - m_rxrdy(0), - m_txrdy(0) - { } - - required_device m_maincpu; - required_device m_fdc; - required_device m_io_i8155; - required_device m_usart; - required_device m_discrete; - required_device m_ieee488; - required_device m_palette; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_rs232; - required_region_ptr m_rom; - required_region_ptr m_sync_rom; - required_region_ptr m_char_rom; - required_shared_ptr m_video_ram; - required_ioport_array<8> m_key; - - virtual void machine_start(); - virtual void machine_reset(); - - virtual void video_start(); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - void update_interrupt(); - - DECLARE_WRITE8_MEMBER( ctl_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( cmd_w ); - DECLARE_READ8_MEMBER( ieee488_r ); - DECLARE_READ8_MEMBER( port3_r ); - DECLARE_READ8_MEMBER( i8155_pa_r ); - DECLARE_WRITE8_MEMBER( i8155_pb_w ); - DECLARE_WRITE8_MEMBER( i8155_pc_w ); - DECLARE_WRITE8_MEMBER( io_i8155_pb_w ); - DECLARE_WRITE8_MEMBER( io_i8155_pc_w ); - DECLARE_WRITE_LINE_MEMBER( io_i8155_to_w ); - DECLARE_WRITE_LINE_MEMBER( srq_w ); - DECLARE_WRITE_LINE_MEMBER( atn_w ); - DECLARE_WRITE_LINE_MEMBER( rxrdy_w ); - DECLARE_WRITE_LINE_MEMBER( txrdy_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DIRECT_UPDATE_MEMBER(vixen_direct_update_handler); - - // memory state - int m_reset; - - // keyboard state - UINT8 m_col; - - // interrupt state - int m_cmd_d0; - int m_cmd_d1; - - bool m_fdint; - int m_vsync; - - int m_srq; - int m_atn; - int m_enb_srq_int; - int m_enb_atn_int; - - int m_rxrdy; - int m_txrdy; - int m_int_clk; - int m_enb_xmt_int; - int m_enb_rcv_int; - int m_enb_ring_int; - - // video state - int m_alt; - int m_256; - - DECLARE_DRIVER_INIT(vixen); - TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick); - IRQ_CALLBACK_MEMBER(vixen_int_ack); -}; - -#endif diff --git a/src/mess/includes/vtech2.h b/src/mess/includes/vtech2.h deleted file mode 100644 index 9a7efd680b0..00000000000 --- a/src/mess/includes/vtech2.h +++ /dev/null @@ -1,96 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller -/***************************************************************************** - * - * includes/vtech2.h - * - ****************************************************************************/ - -#ifndef VTECH2_H_ -#define VTECH2_H_ -#include "sound/speaker.h" -#include "imagedev/cassette.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - -#define TRKSIZE_FM 3172 /* size of a standard FM mode track */ - -class vtech2_state : public driver_device -{ -public: - vtech2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } - - UINT8 *m_videoram; - int m_laser_latch; - char m_laser_frame_message[64+1]; - int m_laser_frame_time; - UINT8 *m_mem; - int m_laser_bank_mask; - int m_laser_bank[4]; - int m_laser_video_bank; - UINT8 m_laser_track_x2[2]; - UINT8 m_laser_fdc_status; - UINT8 m_laser_fdc_data[TRKSIZE_FM]; - int m_laser_data; - int m_laser_fdc_edge; - int m_laser_fdc_bits; - int m_laser_drive; - int m_laser_fdc_start; - int m_laser_fdc_write; - int m_laser_fdc_offs; - int m_laser_fdc_latch; - int m_level_old; - int m_cassette_bit; - int m_row_a; - int m_row_b; - int m_row_c; - int m_row_d; - int m_laser_bg_mode; - int m_laser_two_color; - DECLARE_WRITE8_MEMBER(laser_bank_select_w); - DECLARE_WRITE8_MEMBER(laser_fdc_w); - DECLARE_WRITE8_MEMBER(laser_bg_mode_w); - DECLARE_WRITE8_MEMBER(laser_two_color_w); - DECLARE_READ8_MEMBER(laser_fdc_r); - DECLARE_DRIVER_INIT(laser); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(vtech2); - DECLARE_MACHINE_RESET(laser500); - DECLARE_MACHINE_RESET(laser700); - UINT32 screen_update_laser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vtech2_interrupt); - - int mra_bank(int bank, int offs); - void mwa_bank(int bank, int offs, int data); - memory_region *m_cart_rom; - - DECLARE_WRITE8_MEMBER(mwa_bank1); - DECLARE_WRITE8_MEMBER(mwa_bank2); - DECLARE_WRITE8_MEMBER(mwa_bank3); - DECLARE_WRITE8_MEMBER(mwa_bank4); - DECLARE_READ8_MEMBER(mra_bank1); - DECLARE_READ8_MEMBER(mra_bank2); - DECLARE_READ8_MEMBER(mra_bank3); - DECLARE_READ8_MEMBER(mra_bank4); - required_device m_maincpu; - required_device m_speaker; - required_device m_cassette; - required_device m_cart; - void laser_machine_init(int bank_mask, int video_mask); - void laser_get_track(); - void laser_put_track(); - device_t *laser_file(); - required_device m_gfxdecode; - required_device m_palette; -}; - - -#endif /* VTECH2_H_ */ diff --git a/src/mess/includes/wangpc.h b/src/mess/includes/wangpc.h deleted file mode 100644 index 9a796d9524d..00000000000 --- a/src/mess/includes/wangpc.h +++ /dev/null @@ -1,205 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __WANGPC__ -#define __WANGPC__ - -#include "emu.h" -#include "bus/wangpc/wangpc.h" -#include "cpu/i86/i86.h" -#include "formats/pc_dsk.h" -#include "machine/am9517a.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8255.h" -#include "machine/im6402.h" -#include "machine/mc2661.h" -#include "machine/pit8253.h" -#include "machine/pic8259.h" -#include "machine/ram.h" -#include "machine/upd765.h" -#include "machine/wangpckb.h" - -#define I8086_TAG "i8086" -#define AM9517A_TAG "am9517a" -#define I8259A_TAG "i8259" -#define I8255A_TAG "i8255a" -#define I8253_TAG "i8253" -#define IM6402_TAG "im6402" -#define SCN2661_TAG "scn2661" -#define UPD765_TAG "upd765" -#define CENTRONICS_TAG "centronics" -#define RS232_TAG "rs232" -#define WANGPC_KEYBOARD_TAG "wangpckb" - -class wangpc_state : public driver_device -{ -public: - // constructor - wangpc_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, I8086_TAG), - m_dmac(*this, AM9517A_TAG), - m_pic(*this, I8259A_TAG), - m_ppi(*this, I8255A_TAG), - m_pit(*this, I8253_TAG), - m_uart(*this, IM6402_TAG), - m_epci(*this, SCN2661_TAG), - m_fdc(*this, UPD765_TAG), - m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG ":0:525dd"), - m_floppy1(*this, UPD765_TAG ":1:525dd"), - m_centronics(*this, CENTRONICS_TAG), - m_cent_data_in(*this, "cent_data_in"), - m_cent_data_out(*this, "cent_data_out"), - m_bus(*this, WANGPC_BUS_TAG), - m_sw(*this, "SW"), - m_timer2_irq(1), - m_centronics_ack(1), - m_dav(1), - m_dma_eop(1), - m_uart_dr(0), - m_uart_tbre(0), - m_fpu_irq(0), - m_bus_irq2(0), - m_enable_eop(0), - m_disable_dreq2(0), - m_fdc_drq(0), - m_fdc_dd0(0), - m_fdc_dd1(0), - m_fdc_tc(0), - m_ds1(false), - m_ds2(false) - { - } - - required_device m_maincpu; - required_device m_dmac; - required_device m_pic; - required_device m_ppi; - required_device m_pit; - required_device m_uart; - required_device m_epci; - required_device m_fdc; - required_device m_ram; - required_device m_floppy0; - required_device m_floppy1; - required_device m_centronics; - required_device m_cent_data_in; - required_device m_cent_data_out; - required_device m_bus; - required_ioport m_sw; - - virtual void machine_start(); - virtual void machine_reset(); - - void select_drive(); - void check_level1_interrupts(); - void check_level2_interrupts(); - void update_fdc_drq(); - void update_fdc_tc(); - - DECLARE_WRITE8_MEMBER( fdc_ctrl_w ); - DECLARE_READ8_MEMBER( deselect_drive1_r ); - DECLARE_WRITE8_MEMBER( deselect_drive1_w ); - DECLARE_READ8_MEMBER( select_drive1_r ); - DECLARE_WRITE8_MEMBER( select_drive1_w ); - DECLARE_READ8_MEMBER( deselect_drive2_r ); - DECLARE_WRITE8_MEMBER( deselect_drive2_w ); - DECLARE_READ8_MEMBER( select_drive2_r ); - DECLARE_WRITE8_MEMBER( select_drive2_w ); - DECLARE_READ8_MEMBER( motor1_off_r ); - DECLARE_WRITE8_MEMBER( motor1_off_w ); - DECLARE_READ8_MEMBER( motor1_on_r ); - DECLARE_WRITE8_MEMBER( motor1_on_w ); - DECLARE_READ8_MEMBER( motor2_off_r ); - DECLARE_WRITE8_MEMBER( motor2_off_w ); - DECLARE_READ8_MEMBER( motor2_on_r ); - DECLARE_WRITE8_MEMBER( motor2_on_w ); - DECLARE_READ8_MEMBER( fdc_reset_r ); - DECLARE_WRITE8_MEMBER( fdc_reset_w ); - DECLARE_READ8_MEMBER( fdc_tc_r ); - DECLARE_WRITE8_MEMBER( fdc_tc_w ); - DECLARE_WRITE8_MEMBER( dma_page_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( timer0_irq_clr_w ); - DECLARE_READ8_MEMBER( timer2_irq_clr_r ); - DECLARE_WRITE8_MEMBER( nmi_mask_w ); - DECLARE_READ8_MEMBER( led_on_r ); - DECLARE_WRITE8_MEMBER( fpu_mask_w ); - DECLARE_READ8_MEMBER( dma_eop_clr_r ); - DECLARE_WRITE8_MEMBER( uart_tbre_clr_w ); - DECLARE_READ8_MEMBER( uart_r ); - DECLARE_WRITE8_MEMBER( uart_w ); - DECLARE_READ8_MEMBER( centronics_r ); - DECLARE_WRITE8_MEMBER( centronics_w ); - DECLARE_READ8_MEMBER( busy_clr_r ); - DECLARE_WRITE8_MEMBER( acknlg_clr_w ); - DECLARE_READ8_MEMBER( led_off_r ); - DECLARE_WRITE8_MEMBER( parity_nmi_clr_w ); - DECLARE_READ8_MEMBER( option_id_r ); - - DECLARE_WRITE_LINE_MEMBER( hrq_w ); - DECLARE_WRITE_LINE_MEMBER( eop_w ); - DECLARE_READ8_MEMBER( memr_r ); - DECLARE_WRITE8_MEMBER( memw_w ); - DECLARE_READ8_MEMBER( ior2_r ); - DECLARE_WRITE8_MEMBER( iow2_w ); - DECLARE_WRITE_LINE_MEMBER( dack0_w ); - DECLARE_WRITE_LINE_MEMBER( dack1_w ); - DECLARE_WRITE_LINE_MEMBER( dack2_w ); - DECLARE_WRITE_LINE_MEMBER( dack3_w ); - DECLARE_READ8_MEMBER( ppi_pa_r ); - DECLARE_READ8_MEMBER( ppi_pb_r ); - DECLARE_READ8_MEMBER( ppi_pc_r ); - DECLARE_WRITE8_MEMBER( ppi_pc_w ); - DECLARE_WRITE_LINE_MEMBER( pit0_w ); - DECLARE_WRITE_LINE_MEMBER( pit2_w ); - DECLARE_WRITE_LINE_MEMBER( uart_dr_w ); - DECLARE_WRITE_LINE_MEMBER( uart_tbre_w ); - DECLARE_WRITE_LINE_MEMBER( epci_irq_w ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_ack ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_busy ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_fault ); - DECLARE_WRITE_LINE_MEMBER( write_centronics_perror ); - DECLARE_WRITE_LINE_MEMBER( bus_irq2_w ); - - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - DECLARE_WRITE_LINE_MEMBER( fdc_irq ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq ); - - int on_disk0_load(floppy_image_device *image); - void on_disk0_unload(floppy_image_device *image); - int on_disk1_load(floppy_image_device *image); - void on_disk1_unload(floppy_image_device *image); - - UINT8 m_dma_page[4]; - int m_dack; - - int m_timer2_irq; - int m_centronics_ack; - int m_centronics_busy; - int m_centronics_fault; - int m_centronics_perror; - int m_dav; - int m_dma_eop; - int m_uart_dr; - int m_uart_tbre; - int m_fpu_irq; - int m_bus_irq2; - - int m_enable_eop; - int m_disable_dreq2; - int m_fdc_drq; - int m_fdc_dd0; - int m_fdc_dd1; - int m_fdc_tc; - int m_ds1; - int m_ds2; - - int m_led[6]; -}; - - -#endif diff --git a/src/mess/includes/wswan.h b/src/mess/includes/wswan.h deleted file mode 100644 index 42f8b2b0fa8..00000000000 --- a/src/mess/includes/wswan.h +++ /dev/null @@ -1,104 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Wilbert Pol -/***************************************************************************** - * - * includes/wswan.h - * - ****************************************************************************/ - -#ifndef WSWAN_H_ -#define WSWAN_H_ - -#define WSWAN_TYPE_MONO 0 -#define WSWAN_TYPE_COLOR 1 - -#define INTERNAL_EEPROM_SIZE 1024 - -#include "emu.h" -#include "cpu/v30mz/v30mz.h" -#include "machine/nvram.h" -#include "audio/wswan_snd.h" -#include "video/wswan_video.h" -#include "bus/wswan/slot.h" -#include "bus/wswan/rom.h" - - -struct SoundDMA -{ - UINT32 source; /* Source address */ - UINT16 size; /* Size */ - UINT8 enable; /* Enabled */ -}; - - -class wswan_state : public driver_device -{ -public: - wswan_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_vdp(*this, "vdp"), - m_sound(*this, "custom"), - m_cart(*this, "cartslot"), - m_cursx(*this, "CURSX"), - m_cursy(*this, "CURSY"), - m_buttons(*this, "BUTTONS") - { } - - required_device m_maincpu; - required_device m_vdp; - required_device m_sound; - required_device m_cart; - DECLARE_READ8_MEMBER(bios_r); - DECLARE_READ8_MEMBER(port_r); - DECLARE_WRITE8_MEMBER(port_w); - - UINT8 m_ws_portram[256]; - UINT8 m_internal_eeprom[INTERNAL_EEPROM_SIZE]; - UINT8 m_system_type; - SoundDMA m_sound_dma; - UINT8 *m_ws_bios_bank; - UINT8 m_bios_disabled; - UINT8 m_rotate; - - void set_irq_line(int irq); - void dma_sound_cb(); - void common_start(); - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_PALETTE_INIT(wswan); - DECLARE_MACHINE_START(wscolor); - DECLARE_PALETTE_INIT(wscolor); - -protected: - /* Interrupt flags */ - static const UINT8 WSWAN_IFLAG_STX = 0x01; - static const UINT8 WSWAN_IFLAG_KEY = 0x02; - static const UINT8 WSWAN_IFLAG_RTC = 0x04; - static const UINT8 WSWAN_IFLAG_SRX = 0x08; - static const UINT8 WSWAN_IFLAG_LCMP = 0x10; - static const UINT8 WSWAN_IFLAG_VBLTMR = 0x20; - static const UINT8 WSWAN_IFLAG_VBL = 0x40; - static const UINT8 WSWAN_IFLAG_HBLTMR = 0x80; - - /* Interrupts */ - static const UINT8 WSWAN_INT_STX = 0; - static const UINT8 WSWAN_INT_KEY = 1; - static const UINT8 WSWAN_INT_RTC = 2; - static const UINT8 WSWAN_INT_SRX = 3; - static const UINT8 WSWAN_INT_LCMP = 4; - static const UINT8 WSWAN_INT_VBLTMR = 5; - static const UINT8 WSWAN_INT_VBL = 6; - static const UINT8 WSWAN_INT_HBLTMR = 7; - - required_ioport m_cursx; - required_ioport m_cursy; - required_ioport m_buttons; - - void register_save(); - void handle_irqs(); - void clear_irq_line(int irq); -}; - - -#endif /* WSWAN_H_ */ diff --git a/src/mess/includes/x07.h b/src/mess/includes/x07.h deleted file mode 100644 index 2a7cd1e40e6..00000000000 --- a/src/mess/includes/x07.h +++ /dev/null @@ -1,285 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/********************************************************************* - - includes/x07.h - -*********************************************************************/ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/beep.h" -#include "machine/nvram.h" -#include "machine/ram.h" -#include "sound/wave.h" -#include "imagedev/cassette.h" -#include "imagedev/printer.h" -#include "formats/x07_cas.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "rendlay.h" - -//default value for user defined keys, taken for official documentation -static const char *const udk_ini[12] = { - "tim?TIME$\r", - "cldCLOAD\"", - "locLOCATE ", - "lstLIST ", - "runRUN\r", - "", - "dat?DATE$\r", - "csvCSAVE\"", - "prtPRINT ", - "slpSLEEP", - "cntCONT\r", - "" -}; - -static const UINT16 udk_offset[12] = -{ - 0x0000, 0x002a, 0x0054, 0x007e, 0x00a8, 0x00d2, - 0x0100, 0x012a, 0x0154, 0x017e, 0x01a8, 0x01d2 -}; - -static const UINT8 printer_charcode[256] = -{ - 0xff, 0x7f, 0xbf, 0x3f, 0xdf, 0x5f, 0x9f, 0x1f, - 0xef, 0x6f, 0xaf, 0x2f, 0xcf, 0x4f, 0x8f, 0x0f, - 0xf7, 0x77, 0xb7, 0x37, 0xd7, 0x57, 0x97, 0x17, - 0xe7, 0x67, 0xa7, 0x27, 0xc7, 0x47, 0x87, 0x07, - 0xfb, 0x7b, 0xbb, 0x3b, 0xdb, 0x5b, 0x9b, 0x1b, - 0xeb, 0x6b, 0xab, 0x2b, 0xcb, 0x4b, 0x8b, 0x0b, - 0xf3, 0x73, 0xb3, 0x33, 0xd3, 0x53, 0x93, 0x13, - 0xe3, 0x63, 0xa3, 0x23, 0xc3, 0x43, 0x83, 0x03, - 0xfd, 0x7d, 0xbd, 0x3d, 0xdd, 0x5d, 0x9d, 0x1d, - 0xed, 0x6d, 0xad, 0x2d, 0xcd, 0x4d, 0x8d, 0x0d, - 0xf5, 0x75, 0xb5, 0x35, 0xd5, 0x55, 0x95, 0x15, - 0xe5, 0x65, 0xa5, 0x25, 0xc5, 0x45, 0x85, 0x05, - 0xf9, 0x79, 0xb9, 0x39, 0xd9, 0x59, 0x99, 0x19, - 0xe9, 0x69, 0xa9, 0x29, 0xc9, 0x49, 0x89, 0x09, - 0xf1, 0x71, 0xb1, 0x31, 0xd1, 0x51, 0x91, 0x11, - 0xe1, 0x61, 0xa1, 0x21, 0xc1, 0x41, 0x81, 0x01, - 0xfe, 0x7e, 0xbe, 0x3e, 0xde, 0x5e, 0x9e, 0x1e, - 0xee, 0x6e, 0xae, 0x2e, 0xce, 0x4e, 0x8e, 0x0e, - 0xf6, 0x76, 0xb6, 0x36, 0xd6, 0x56, 0x96, 0x16, - 0xe6, 0x66, 0xa6, 0x26, 0xc6, 0x46, 0x86, 0x06, - 0xfa, 0x7a, 0xba, 0x3a, 0xda, 0x5a, 0x9a, 0x1a, - 0xea, 0x6a, 0xaa, 0x2a, 0xca, 0x4a, 0x8a, 0x0a, - 0xf2, 0x72, 0xb2, 0x32, 0xd2, 0x52, 0x92, 0x12, - 0xe2, 0x62, 0xa2, 0x22, 0xc2, 0x42, 0x82, 0x02, - 0xfc, 0x7c, 0xbc, 0x3c, 0xdc, 0x5c, 0x9c, 0x1c, - 0xec, 0x6c, 0xac, 0x2c, 0xcc, 0x4c, 0x8c, 0x0c, - 0xf4, 0x74, 0xb4, 0x34, 0xd4, 0x54, 0x94, 0x14, - 0xe4, 0x64, 0xa4, 0x24, 0xc4, 0x44, 0x84, 0x04, - 0xf8, 0x78, 0xb8, 0x38, 0xd8, 0x58, 0x98, 0x18, - 0xe8, 0x68, 0xa8, 0x28, 0xc8, 0x48, 0x88, 0x08, - 0xf0, 0x70, 0xb0, 0x30, 0xd0, 0x50, 0x90, 0x10, - 0xe0, 0x60, 0xa0, 0x20, 0xc0, 0x40, 0x80, 0x00 -}; - -static const UINT8 t6834_cmd_len[0x47] = -{ - 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x04, 0x03, - 0x01, 0x02, 0x09, 0x01, 0x09, 0x01, 0x01, 0x02, - 0x03, 0x03, 0x03, 0x03, 0x05, 0x04, 0x82, 0x02, - 0x01, 0x01, 0x0a, 0x02, 0x01, 0x81, 0x81, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x03, - 0x02, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x82, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x09, 0x01, 0x03, 0x03, 0x01, 0x01 -}; - -struct x07_kb -{ - const char *tag; //input port tag - UINT8 mask; //bit mask - UINT8 codes[7]; //port codes -}; - -static const x07_kb x07_keycodes[56] = -{ - {"BZ", 0x01, {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b}}, - {"S1", 0x01, {0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12}}, - {"S1", 0x02, {0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16}}, - {"S1", 0x04, {0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}}, - {"S1", 0x08, {0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d}}, - {"S1", 0x10, {0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e}}, - {"S1", 0x20, {0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f}}, - {"S1", 0x40, {0x20, 0x20, 0x20, 0x00, 0x20, 0x20, 0x20}}, - {"S2", 0x01, {0x5a, 0x7a, 0x1a, 0x00, 0xc2, 0xaf, 0xe1}}, - {"S2", 0x02, {0x58, 0x78, 0x18, 0x00, 0xbb, 0x00, 0x98}}, - {"S2", 0x04, {0x43, 0x63, 0x03, 0x00, 0xbf, 0x00, 0xe4}}, - {"S2", 0x08, {0x56, 0x76, 0x16, 0x00, 0xcb, 0x00, 0x95}}, - {"S2", 0x10, {0x42, 0x62, 0x02, 0x00, 0xba, 0x00, 0xed}}, - {"S2", 0x20, {0x4e, 0x6e, 0x0e, 0x00, 0xd0, 0x00, 0x89}}, - {"S2", 0x40, {0x4d, 0x6d, 0x0d, 0x30, 0xd3, 0x00, 0xf5}}, - {"S2", 0x80, {0x2c, 0x3c, 0x00, 0x00, 0xc8, 0xa4, 0x9c}}, - {"S3", 0x01, {0x41, 0x61, 0x01, 0x00, 0xc1, 0x00, 0x88}}, - {"S3", 0x02, {0x53, 0x73, 0x13, 0x00, 0xc4, 0x00, 0x9f}}, - {"S3", 0x04, {0x44, 0x64, 0x04, 0x00, 0xbc, 0x00, 0xef}}, - {"S3", 0x08, {0x46, 0x66, 0x06, 0x00, 0xca, 0x00, 0xfd}}, - {"S3", 0x10, {0x47, 0x67, 0x07, 0x00, 0xb7, 0x00, 0x9d}}, - {"S3", 0x20, {0x48, 0x68, 0x08, 0x00, 0xb8, 0x00, 0xfe}}, - {"S3", 0x40, {0x4a, 0x6a, 0x0a, 0x31, 0xcf, 0x00, 0xe5}}, - {"S3", 0x80, {0x4b, 0x6b, 0x0b, 0x32, 0xc9, 0x00, 0x9b}}, - {"S4", 0x01, {0x51, 0x71, 0x11, 0x00, 0xc0, 0x00, 0x8b}}, - {"S4", 0x02, {0x57, 0x77, 0x17, 0x00, 0xc3, 0x00, 0xfb}}, - {"S4", 0x04, {0x45, 0x65, 0x05, 0x00, 0xb2, 0xa8, 0x99}}, - {"S4", 0x08, {0x52, 0x72, 0x12, 0x00, 0xbd, 0x00, 0xf6}}, - {"S4", 0x10, {0x54, 0x74, 0x14, 0x00, 0xb6, 0x00, 0x97}}, - {"S4", 0x20, {0x59, 0x79, 0x19, 0x35, 0xdd, 0x00, 0x96}}, - {"S4", 0x40, {0x55, 0x75, 0x15, 0x34, 0xc5, 0x00, 0x94}}, - {"S4", 0x80, {0x49, 0x69, 0x09, 0x00, 0xc6, 0x00, 0xf9}}, - {"S5", 0x01, {0x31, 0x21, 0x00, 0x00, 0xc7, 0x00, 0xe9}}, - {"S5", 0x02, {0x32, 0x22, 0x00, 0x00, 0xcc, 0x00, 0x90}}, - {"S5", 0x04, {0x33, 0x23, 0x00, 0x00, 0xb1, 0xa7, 0x91}}, - {"S5", 0x08, {0x34, 0x24, 0x00, 0x00, 0xb3, 0xa9, 0x92}}, - {"S5", 0x10, {0x35, 0x25, 0x00, 0x00, 0xb4, 0xaa, 0x93}}, - {"S5", 0x20, {0x36, 0x26, 0x00, 0x00, 0xb5, 0xab, 0xec}}, - {"S5", 0x40, {0x37, 0x27, 0x37, 0x00, 0xd4, 0xac, 0xe0}}, - {"S5", 0x80, {0x38, 0x28, 0x37, 0x00, 0xd5, 0xad, 0xf2}}, - {"S7", 0x01, {0x2e, 0x3e, 0x00, 0x2e, 0xd9, 0xa1, 0x9a}}, - {"S7", 0x02, {0x2f, 0x3f, 0x00, 0x00, 0xd2, 0xa5, 0x80}}, - {"S7", 0x04, {0x3f, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00}}, - {"S7", 0x08, {0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d}}, - {"S7", 0x10, {0x4f, 0x6f, 0x0f, 0x36, 0xd7, 0x00, 0x9e}}, - {"S7", 0x20, {0x50, 0x70, 0x10, 0x00, 0xbe, 0x00, 0xf7}}, - {"S7", 0x40, {0x40, 0x60, 0x00, 0x00, 0xde, 0x00, 0xe7}}, - {"S7", 0x80, {0x5b, 0x7b, 0x00, 0x00, 0xdf, 0xa2, 0x84}}, - {"S8", 0x01, {0x4c, 0x6c, 0x0c, 0x33, 0xd8, 0x00, 0xf4}}, - {"S8", 0x02, {0x3b, 0x2b, 0x00, 0x00, 0xda, 0x00, 0x82}}, - {"S8", 0x04, {0x3a, 0x2a, 0x00, 0x00, 0xb9, 0x00, 0x81}}, - {"S8", 0x08, {0x5d, 0x7d, 0x00, 0x00, 0xd1, 0xa3, 0x85}}, - {"S8", 0x10, {0x39, 0x29, 0x39, 0x00, 0xd6, 0xae, 0xf1}}, - {"S8", 0x20, {0x30, 0x7c, 0x00, 0x00, 0xdc, 0xa6, 0x8a}}, - {"S8", 0x40, {0x2d, 0x3d, 0x00, 0x00, 0xce, 0x00, 0xf0}}, - {"S8", 0x80, {0x3d, 0x7e, 0x00, 0x00, 0xcd, 0x00, 0xfc}} -}; - -class x07_state : public driver_device -{ -public: - x07_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_printer(*this, "printer"), - m_beep(*this, "beeper"), - m_ram(*this, RAM_TAG), - m_nvram1(*this, "nvram1"), - m_nvram2(*this, "nvram2"), - m_cassette(*this, "cassette"), - m_card(*this, "cardslot"), - m_warm_start(1) - { } - - required_device m_maincpu; - required_device m_printer; - required_device m_beep; - required_device m_ram; - required_device m_nvram1; - required_device m_nvram2; - required_device m_cassette; - required_device m_card; - - void machine_start(); - void machine_reset(); - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( x07_io_r ); - DECLARE_WRITE8_MEMBER( x07_io_w ); - - DECLARE_INPUT_CHANGED_MEMBER( kb_keys ); - DECLARE_INPUT_CHANGED_MEMBER( kb_func_keys ); - DECLARE_INPUT_CHANGED_MEMBER( kb_break ); - DECLARE_INPUT_CHANGED_MEMBER( kb_update_udk ); - - DECLARE_DRIVER_INIT(x07); - void nvram_init(nvram_device &nvram, void *data, size_t size); - - void t6834_cmd(UINT8 cmd); - void t6834_r(); - void t6834_w(); - void cassette_w(); - void cassette_r(); - void printer_w(); - void kb_irq(); - void cassette_load(); - void cassette_save(); - void receive_bit(int bit); - - inline UINT8 get_char(UINT16 pos); - inline UINT8 kb_get_index(UINT8 char_code); - inline void draw_char(UINT8 x, UINT8 y, UINT8 char_pos); - inline void draw_point(UINT8 x, UINT8 y, UINT8 color); - inline void draw_udk(); - - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( x07_card ); - - /* general */ - UINT8 m_sleep; - UINT8 m_warm_start; - UINT8 m_t6834_ram[0x800]; - UINT8 m_regs_r[8]; - UINT8 m_regs_w[8]; - UINT8 m_alarm[8]; - - struct fifo_buffer - { - UINT8 data[0x100]; - UINT8 read; - UINT8 write; - }; - fifo_buffer m_in; - fifo_buffer m_out; - - UINT8 m_udk_on; - UINT8 m_draw_udk; - UINT8 m_sp_on; - UINT8 m_font_code; - emu_timer *m_rsta_clear; - emu_timer *m_rstb_clear; - emu_timer *m_beep_stop; - - /* LCD */ - UINT8 m_lcd_on; - UINT8 m_lcd_map[32][120]; - UINT8 m_scroll_min; - UINT8 m_scroll_max; - UINT8 m_blink; - - struct lcd_position - { - UINT8 x; - UINT8 y; - UINT8 on; - }; - lcd_position m_locate; - lcd_position m_cursor; - - /* keyboard */ - UINT8 m_kb_on; - UINT8 m_repeat_key; //not supported - UINT8 m_kb_size; - - /* cassette */ - UINT8 m_cass_motor; - UINT8 m_cass_data; - UINT32 m_cass_clk; - UINT8 m_bit_count; - int m_cass_state; - emu_timer *m_cass_poll; - emu_timer *m_cass_tick; - - /* printer */ - UINT8 m_prn_sendbit; - UINT8 m_prn_char_code; - UINT8 m_prn_buffer[0x100]; - UINT8 m_prn_size; - DECLARE_PALETTE_INIT(x07); - TIMER_CALLBACK_MEMBER(cassette_tick); - TIMER_CALLBACK_MEMBER(cassette_poll); - TIMER_CALLBACK_MEMBER(rsta_clear); - TIMER_CALLBACK_MEMBER(rstb_clear); - TIMER_CALLBACK_MEMBER(beep_stop); - TIMER_DEVICE_CALLBACK_MEMBER(blink_timer); -}; diff --git a/src/mess/includes/x1.h b/src/mess/includes/x1.h deleted file mode 100644 index 13ab9b6ce2e..00000000000 --- a/src/mess/includes/x1.h +++ /dev/null @@ -1,303 +0,0 @@ -// license:LGPL-2.1+ -// copyright-holders:Angelo Salese, Barry Rodewald -/***************************************************************************** - * - * includes/x1.h - * - ****************************************************************************/ - -#ifndef X1_H_ -#define X1_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "machine/i8255.h" -#include "machine/wd_fdc.h" -#include "machine/z80dma.h" -#include "video/mc6845.h" -#include "sound/2151intf.h" -#include "sound/ay8910.h" -#include "sound/wave.h" -#include "imagedev/cassette.h" -#include "imagedev/flopdrv.h" -#include "formats/x1_tap.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" - - -// ======================> x1_keyboard_device - -class x1_keyboard_device : public device_t, - public device_z80daisy_interface -{ -public: - // construction/destruction - x1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - -private: - virtual void device_start(); - // z80daisy_interface overrides - virtual int z80daisy_irq_state(); - virtual int z80daisy_irq_ack(); - virtual void z80daisy_irq_reti(); -}; - -struct scrn_reg_t -{ - UINT8 gfx_bank; - UINT8 disp_bank; - UINT8 pcg_mode; - UINT8 v400_mode; - UINT8 ank_sel; - - UINT8 pri; - UINT8 blackclip; // x1 turbo specific -}; - -struct turbo_reg_t -{ - UINT8 pal; - UINT8 gfx_pal; - UINT8 txt_pal[8]; - UINT8 txt_disp; -}; - -struct x1_rtc_t -{ - UINT8 sec, min, hour, day, wday, month, year; -}; - - -class x1_state : public driver_device -{ -public: - x1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this,"x1_cpu"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy2(*this, "fdc:2"), - m_floppy3(*this, "fdc:3"), - m_crtc(*this, "crtc"), - m_ctc(*this, "ctc"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_dma(*this, "dma") - { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - required_device m_maincpu; - required_device m_cassette; - required_device m_cart; - required_device m_fdc; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_device m_crtc; - required_device m_ctc; - - UINT8 *m_tvram; /**< Pointer for Text Video RAM */ - UINT8 *m_avram; /**< Pointer for Attribute Video RAM */ - UINT8 *m_kvram; /**< Pointer for Extended Kanji Video RAM (X1 Turbo) */ - UINT8 *m_ipl_rom; /**< Pointer for IPL ROM */ - UINT8 *m_work_ram; /**< Pointer for base work RAM */ - UINT8 *m_emm_ram; /**< Pointer for EMM RAM */ - UINT8 *m_pcg_ram; /**< Pointer for PCG GFX RAM */ - UINT8 *m_cg_rom; /**< Pointer for GFX ROM */ - UINT8 *m_kanji_rom; /**< Pointer for Kanji ROMs */ - int m_xstart, /**< Start X offset for screen drawing. */ - m_ystart; /**< Start Y offset for screen drawing. */ - UINT8 m_hres_320; /**< Pixel clock divider setting: (1) 48 (0) 24 */ - UINT8 m_io_switch; /**< Enable access for special bitmap RMW phase in isolated i/o. */ - UINT8 m_io_sys; /**< Read-back for PPI port C */ - UINT8 m_vsync; /**< Screen V-Sync bit, active low */ - UINT8 m_vdisp; /**< Screen V-Disp bit, active high */ - UINT8 m_io_bank_mode; /**< Helper for special bitmap RMW phase. */ - UINT8 *m_gfx_bitmap_ram; /**< Pointer for bitmap layer RAM. */ - UINT8 m_pcg_reset; /**< @todo Unused variable. */ - UINT8 m_sub_obf; /**< MCU side: OBF flag active low, indicates that there are parameters in comm buffer. */ - UINT8 m_ctc_irq_flag; /**< @todo Unused variable. */ - scrn_reg_t m_scrn_reg; /**< Base Video Registers. */ - turbo_reg_t m_turbo_reg; /**< Turbo Z Video Registers. */ - x1_rtc_t m_rtc; /**< Struct for RTC related variables */ - emu_timer *m_rtc_timer; /**< Pointer for RTC timer. */ - UINT8 m_pcg_write_addr; /**< @todo Unused variable. */ - UINT8 m_sub_cmd; /**< MCU side: current command issued from Main to Sub. */ - UINT8 m_sub_cmd_length; /**< MCU side: number of parameters, in bytes. */ - UINT8 m_sub_val[8]; /**< MCU side: parameters buffer. */ - int m_sub_val_ptr; /**< MCU side: index for parameter read-back */ - int m_key_i; /**< MCU side: index for keyboard read-back during OBF phase. */ - UINT8 m_irq_vector; /**< @todo Unused variable. */ - UINT8 m_cmt_current_cmd; /**< MCU side: CMT command issued. */ - UINT8 m_cmt_test; /**< MCU side: Tape BREAK status bit. */ - UINT8 m_rom_index[3]; /**< Current ROM address. */ - UINT32 m_kanji_offset; /**< @todo Unused variable. */ - UINT8 m_bios_offset; /**< @todo Unused variable. */ - UINT8 m_x_b; /**< Palette Register for Blue Gun */ - UINT8 m_x_g; /**< Palette Register for Green Gun */ - UINT8 m_x_r; /**< Palette Register for Red Gun */ - UINT16 m_kanji_addr_latch; /**< Internal Kanji ROM address. */ - UINT32 m_kanji_addr; /**< Latched Kanji ROM address. */ - UINT8 m_kanji_eksel; /**< Kanji ROM register bit for latch phase. */ - UINT8 m_pcg_reset_occurred; /**< @todo Unused variable. */ - UINT32 m_old_key1; /**< Keyboard read buffer for i/o port "key1" */ - UINT32 m_old_key2; /**< Keyboard read buffer for i/o port "key2" */ - UINT32 m_old_key3; /**< Keyboard read buffer for i/o port "key3" */ - UINT32 m_old_key4; /**< Keyboard read buffer for i/o port "tenkey" */ - UINT32 m_old_fkey; /**< Keyboard read buffer for i/o port "f_keys" */ - UINT8 m_key_irq_flag; /**< Keyboard IRQ pending. */ - UINT8 m_key_irq_vector; /**< Keyboard IRQ vector. */ - UINT32 m_emm_addr; /**< EMM RAM current address */ - UINT8 *m_pal_4096; /**< X1 Turbo Z: pointer for 4096 palette entries */ - UINT8 m_crtc_vreg[0x100], /**< CRTC register buffer. */ - m_crtc_index; /**< CRTC register index. */ - UINT8 m_is_turbo; /**< Machine type: (0) X1 Vanilla, (1) X1 Turbo */ - UINT8 m_ex_bank; /**< X1 Turbo Z: RAM bank register */ - UINT8 m_ram_bank; /**< Regular RAM bank for 0x0000-0x7fff memory window: (0) ROM/IPL (1) RAM */ - /** - @brief Refresh current bitmap palette. - */ - void set_current_palette(); - /** - @brief Retrieves the current PCG address. - - @param width Number of currently setted up CRTC characters - @param y_char_size Number of scanlines per character. - @return Destination PCG address. - */ - UINT16 get_pcg_addr(UINT16 width, UINT8 y_char_size); - /** - @brief X1 Turbo: Retrieves the current CHR ROM address in Hi-Speed Mode. - - @return Destination CHR address. - */ - UINT16 check_chr_addr(); - /** - @brief X1 Turbo: Retrieves the current PCG ROM address in Hi-Speed Mode. - - @return Destination CHR address. - */ - UINT16 check_pcg_addr(); - /** - @brief MCU side: retrieve keycode to game key conversion. - - @param port Address to convert. - @return The converted game key buffer - */ - UINT8 get_game_key(UINT8 port); - /** - @brief MCU side: retrieve keyboard special key register. - - @return - x--- ---- TEN: Numpad, Function key, special input key - -x-- ---- KIN: Valid key - --x- ---- REP: Key repeat - ---x ---- GRAPH key ON - ---- x--- CAPS lock ON - ---- -x-- KANA lock ON - ---- --x- SHIFT ON - ---- ---x CTRL ON - */ - UINT8 check_keyboard_shift(); - /** - @brief convert MAME input to raw scancode for keyboard. - - @return the converted scancode - @todo Unoptimized. - */ - UINT16 check_keyboard_press(); - - DECLARE_READ8_MEMBER(x1_mem_r); - DECLARE_WRITE8_MEMBER(x1_mem_w); - DECLARE_READ8_MEMBER(x1_io_r); - DECLARE_WRITE8_MEMBER(x1_io_w); - DECLARE_READ8_MEMBER(x1_sub_io_r); - DECLARE_WRITE8_MEMBER(x1_sub_io_w); - DECLARE_READ8_MEMBER(x1_rom_r); - DECLARE_WRITE8_MEMBER(x1_rom_w); - DECLARE_WRITE8_MEMBER(x1_rom_bank_0_w); - DECLARE_WRITE8_MEMBER(x1_rom_bank_1_w); - DECLARE_READ8_MEMBER(x1_fdc_r); - DECLARE_WRITE8_MEMBER(x1_fdc_w); - DECLARE_READ8_MEMBER(x1_pcg_r); - DECLARE_WRITE8_MEMBER(x1_pcg_w); - DECLARE_WRITE8_MEMBER(x1_pal_r_w); - DECLARE_WRITE8_MEMBER(x1_pal_g_w); - DECLARE_WRITE8_MEMBER(x1_pal_b_w); - DECLARE_WRITE8_MEMBER(x1_ex_gfxram_w); - DECLARE_WRITE8_MEMBER(x1_scrn_w); - DECLARE_WRITE8_MEMBER(x1_pri_w); - DECLARE_WRITE8_MEMBER(x1_6845_w); - DECLARE_READ8_MEMBER(x1_kanji_r); - DECLARE_WRITE8_MEMBER(x1_kanji_w); - DECLARE_READ8_MEMBER(x1_emm_r); - DECLARE_WRITE8_MEMBER(x1_emm_w); - DECLARE_READ8_MEMBER(x1turbo_pal_r); - DECLARE_READ8_MEMBER(x1turbo_txpal_r); - DECLARE_READ8_MEMBER(x1turbo_txdisp_r); - DECLARE_READ8_MEMBER(x1turbo_gfxpal_r); - DECLARE_WRITE8_MEMBER(x1turbo_pal_w); - DECLARE_WRITE8_MEMBER(x1turbo_txpal_w); - DECLARE_WRITE8_MEMBER(x1turbo_txdisp_w); - DECLARE_WRITE8_MEMBER(x1turbo_gfxpal_w); - DECLARE_WRITE8_MEMBER(x1turbo_blackclip_w); - DECLARE_READ8_MEMBER(x1turbo_mem_r); - DECLARE_WRITE8_MEMBER(x1turbo_mem_w); - DECLARE_READ8_MEMBER(x1turbo_io_r); - DECLARE_WRITE8_MEMBER(x1turbo_io_w); - DECLARE_WRITE8_MEMBER(x1turboz_4096_palette_w); - DECLARE_READ8_MEMBER(x1turboz_blackclip_r); - DECLARE_READ8_MEMBER(x1turbo_bank_r); - DECLARE_WRITE8_MEMBER(x1turbo_bank_w); - DECLARE_READ8_MEMBER(x1_porta_r); - DECLARE_READ8_MEMBER(x1_portb_r); - DECLARE_READ8_MEMBER(x1_portc_r); - DECLARE_WRITE8_MEMBER(x1_porta_w); - DECLARE_WRITE8_MEMBER(x1_portb_w); - DECLARE_WRITE8_MEMBER(x1_portc_w); - DECLARE_DRIVER_INIT(x1_kanji); - DECLARE_MACHINE_START(x1); - DECLARE_MACHINE_RESET(x1); - DECLARE_VIDEO_START(x1); - DECLARE_PALETTE_INIT(x1); - DECLARE_MACHINE_RESET(x1turbo); - UINT32 screen_update_x1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_INPUT_CHANGED_MEMBER(ipl_reset); - DECLARE_INPUT_CHANGED_MEMBER(nmi_reset); - TIMER_CALLBACK_MEMBER(x1_rtc_increment); - TIMER_DEVICE_CALLBACK_MEMBER(x1_cmt_wind_timer); - TIMER_DEVICE_CALLBACK_MEMBER(x1_keyboard_callback); - DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - - void x1_draw_pixel(bitmap_rgb32 &bitmap,int y,int x,UINT16 pen,UINT8 width,UINT8 height); - void draw_fgtilemap(bitmap_rgb32 &bitmap,const rectangle &cliprect); - void draw_gfxbitmap(bitmap_rgb32 &bitmap,const rectangle &cliprect, int plane,int pri); - UINT8 check_prev_height(int x,int y,int x_size); - UINT8 check_line_valid_height(int y,int x_size,int height); - - int priority_mixer_pri(int color); - void cmt_command( UINT8 cmd ); - UINT16 jis_convert(int kanji_addr); - - DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); - DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); - required_device m_gfxdecode; - required_device m_palette; - optional_device m_dma; -}; - -/*----------- defined in machine/x1.c -----------*/ - -extern const device_type X1_KEYBOARD; - -#endif /* X1_H_ */ diff --git a/src/mess/includes/x68k.h b/src/mess/includes/x68k.h deleted file mode 100644 index b9d34c61d91..00000000000 --- a/src/mess/includes/x68k.h +++ /dev/null @@ -1,362 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Barry Rodewald,Carl -/***************************************************************************** - * - * includes/x68k.h - * - * Sharp X68000 - * - ****************************************************************************/ - -#ifndef X68K_H_ -#define X68K_H_ - -#include "cpu/m68000/m68000.h" -#include "machine/hd63450.h" -#include "machine/rp5c15.h" -#include "machine/upd765.h" -#include "sound/okim6258.h" -#include "machine/ram.h" -#include "machine/8530scc.h" -#include "sound/2151intf.h" -#include "machine/i8255.h" - -#define MC68901_TAG "mc68901" -#define RP5C15_TAG "rp5c15" - -#define GFX16 0 -#define GFX256 1 -#define GFX65536 2 - -class x68k_state : public driver_device -{ -public: - enum - { - TIMER_X68K_LED, - TIMER_X68K_SCC_ACK, - TIMER_MD_6BUTTON_PORT1_TIMEOUT, - TIMER_MD_6BUTTON_PORT2_TIMEOUT, - TIMER_X68K_BUS_ERROR, - TIMER_X68K_NET_IRQ, - TIMER_X68K_CRTC_OPERATION_END, - TIMER_X68K_HSYNC, - TIMER_X68K_CRTC_RASTER_END, - TIMER_X68K_CRTC_RASTER_IRQ, - TIMER_X68K_CRTC_VBLANK_IRQ, - TIMER_X68K_FDC_TC, - TIMER_X68K_ADPCM - }; - - x68k_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_okim6258(*this, "okim6258"), - m_hd63450(*this, "hd63450"), - m_ram(*this, RAM_TAG), - m_gfxdecode(*this, "gfxdecode"), - m_gfxpalette(*this, "gfxpalette"), - m_pcgpalette(*this, "pcgpalette"), - m_mfpdev(*this, MC68901_TAG), - m_rtc(*this, RP5C15_TAG), - m_scc(*this, "scc"), - m_ym2151(*this, "ym2151"), - m_ppi(*this, "ppi8255"), - m_screen(*this, "screen"), - m_upd72065(*this, "upd72065"), - m_options(*this, "options"), - m_mouse1(*this, "mouse1"), - m_mouse2(*this, "mouse2"), - m_mouse3(*this, "mouse3"), - m_xpd1lr(*this, "xpd1lr"), - m_ctrltype(*this, "ctrltype"), - m_joy1(*this, "joy1"), - m_joy2(*this, "joy2"), - m_md3b(*this, "md3b"), - m_md6b(*this, "md6b"), - m_md6b_extra(*this, "md6b_extra"), - m_nvram(0x4000/sizeof(UINT16)), - m_tvram(0x80000/sizeof(UINT16)), - m_gvram(0x80000/sizeof(UINT16)), - m_spritereg(0x8000/sizeof(UINT16), 0) - { } - - required_device m_maincpu; - required_device m_okim6258; - required_device m_hd63450; - required_device m_ram; - required_device m_gfxdecode; - required_device m_gfxpalette; - required_device m_pcgpalette; - required_device m_mfpdev; - required_device m_rtc; - required_device m_scc; - required_device m_ym2151; - required_device m_ppi; - required_device m_screen; - required_device m_upd72065; - - required_ioport m_options; - required_ioport m_mouse1; - required_ioport m_mouse2; - required_ioport m_mouse3; - required_ioport m_xpd1lr; - required_ioport m_ctrltype; - required_ioport m_joy1; - required_ioport m_joy2; - required_ioport m_md3b; - required_ioport m_md6b; - required_ioport m_md6b_extra; - - std::vector m_nvram; - std::vector m_tvram; - std::vector m_gvram; - std::vector m_spritereg; - - bitmap_ind16 *m_pcgbitmap; - bitmap_ind16 *m_gfxbitmap; - - void floppy_load_unload(bool load, floppy_image_device *dev); - int floppy_load(floppy_image_device *dev); - void floppy_unload(floppy_image_device *dev); - DECLARE_FLOPPY_FORMATS( floppy_formats ); - - struct - { - int sram_writeprotect; - int monitor; - int contrast; - int keyctrl; - UINT16 cputype; - } m_sysport; - struct - { - floppy_image_device *floppy[4]; - int led_ctrl[4]; - int led_eject[4]; - int eject[4]; - int motor; - int control_drives; - int select_drive; - } m_fdc; - struct - { - int ioc7; // "Function B operation of joystick # one option" - int ioc6; // "Function A operation of joystick # one option" - int joy1_enable; // IOC4 - int joy2_enable; // IOC5 - } m_joy; - struct - { - int rate; // ADPCM sample rate - int pan; // ADPCM output switch - int clock; // ADPCM clock speed - } m_adpcm; - struct - { - unsigned short reg[24]; // registers - int operation; // operation port (0xe80481) - int vblank; // 1 if in VBlank - int hblank; // 1 if in HBlank - int htotal; // Horizontal Total (in characters) - int vtotal; // Vertical Total - int hbegin; // Horizontal Begin - int vbegin; // Vertical Begin - int hend; // Horizontal End - int vend; // Vertical End - int hsync_end; // Horizontal Sync End - int vsync_end; // Vertical Sync End - int hsyncadjust; // Horizontal Sync Adjustment - float hmultiple; // Horizontal pixel multiplier - float vmultiple; // Vertical scanline multiplier (x2 for doublescan modes) - int height; - int width; - int visible_height; - int visible_width; - int hshift; - int vshift; - int video_width; // horizontal total (in pixels) - int video_height; // vertical total - int bg_visible_height; - int bg_visible_width; - int bg_hshift; - int bg_vshift; - int bg_hvres; // bits 0,1 = H-Res, bits 2,3 = V-Res, bit 4 = L/H Freq (0=15.98kHz, 1=31.5kHz) - int bg_double; // 1 if PCG is to be doubled. - int interlace; // 1024 vertical resolution is interlaced - } m_crtc; // CRTC - struct - { // video controller at 0xe82000 - unsigned short reg[3]; - int text_pri; - int sprite_pri; - int gfx_pri; - int gfxlayer_pri[4]; // block displayed for each priority level - int tile8_dirty[1024]; - int tile16_dirty[256]; - } m_video; - struct - { - int irqstatus; - int fdcvector; - int fddvector; - int hdcvector; - int prnvector; - } m_ioc; - struct - { - int inputtype; // determines which input is to be received - int irqactive; // non-zero if IRQ is being serviced - char last_mouse_x; // previous mouse x-axis value - char last_mouse_y; // previous mouse y-axis value - int bufferempty; // non-zero if buffer is empty - } m_mouse; - struct - { - // port A - int mux1; // multiplexer value - int seq1; // part of 6-button input sequence. - emu_timer* io_timeout1; - // port B - int mux2; // multiplexer value - int seq2; // part of 6-button input sequence. - emu_timer* io_timeout2; - } m_mdctrl; - UINT8 m_ppi_port[3]; - int m_current_vector[8]; - UINT8 m_current_irq_line; - unsigned int m_scanline; - int m_led_state; - emu_timer* m_mouse_timer; - emu_timer* m_led_timer; - emu_timer* m_net_timer; - unsigned char m_scc_prev; - UINT16 m_ppi_prev; - int m_mfp_prev; - emu_timer* m_scanline_timer; - emu_timer* m_raster_irq; - emu_timer* m_vblank_irq; - emu_timer* m_fdc_tc; - emu_timer* m_adpcm_timer; - emu_timer* m_bus_error_timer; - UINT16* m_spriteram; - tilemap_t* m_bg0_8; - tilemap_t* m_bg1_8; - tilemap_t* m_bg0_16; - tilemap_t* m_bg1_16; - int m_sprite_shift; - int m_oddscanline; - bool m_is_32bit; - DECLARE_DRIVER_INIT(x68kxvi); - DECLARE_DRIVER_INIT(x68030); - DECLARE_DRIVER_INIT(x68000); - TILE_GET_INFO_MEMBER(x68k_get_bg0_tile); - TILE_GET_INFO_MEMBER(x68k_get_bg1_tile); - TILE_GET_INFO_MEMBER(x68k_get_bg0_tile_16); - TILE_GET_INFO_MEMBER(x68k_get_bg1_tile_16); - DECLARE_MACHINE_START(x68030); - DECLARE_MACHINE_RESET(x68000); - DECLARE_MACHINE_START(x68000); - DECLARE_VIDEO_START(x68000); - DECLARE_PALETTE_INIT(x68000); - UINT32 screen_update_x68000(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(x68k_led_callback); - TIMER_CALLBACK_MEMBER(x68k_scc_ack); - TIMER_CALLBACK_MEMBER(md_6button_port1_timeout); - TIMER_CALLBACK_MEMBER(md_6button_port2_timeout); - TIMER_CALLBACK_MEMBER(x68k_bus_error); - TIMER_CALLBACK_MEMBER(x68k_net_irq); - TIMER_CALLBACK_MEMBER(x68k_crtc_operation_end); - TIMER_CALLBACK_MEMBER(x68k_hsync); - TIMER_CALLBACK_MEMBER(x68k_crtc_raster_end); - TIMER_CALLBACK_MEMBER(x68k_crtc_raster_irq); - TIMER_CALLBACK_MEMBER(x68k_crtc_vblank_irq); - DECLARE_READ8_MEMBER(ppi_port_a_r); - DECLARE_READ8_MEMBER(ppi_port_b_r); - DECLARE_READ8_MEMBER(ppi_port_c_r); - DECLARE_WRITE8_MEMBER(ppi_port_c_w); - DECLARE_WRITE_LINE_MEMBER(fdc_irq); - DECLARE_WRITE8_MEMBER(x68k_ct_w); - DECLARE_WRITE_LINE_MEMBER(x68k_rtc_alarm_irq); - DECLARE_WRITE8_MEMBER(x68030_adpcm_w); - DECLARE_WRITE_LINE_MEMBER(mfp_irq_callback); - DECLARE_WRITE_LINE_MEMBER(x68k_scsi_irq); - DECLARE_WRITE_LINE_MEMBER(x68k_scsi_drq); - - //dmac - void dma_irq(int channel); - DECLARE_WRITE8_MEMBER(dma_end); - DECLARE_WRITE8_MEMBER(dma_error); - - int x68k_read_mouse(); - void x68k_set_adpcm(); - UINT8 md_3button_r(int port); - void md_6button_init(); - UINT8 md_6button_r(int port); - UINT8 xpd1lr_r(int port); - - DECLARE_WRITE_LINE_MEMBER(x68k_fm_irq); - DECLARE_WRITE_LINE_MEMBER(x68k_irq2_line); - - DECLARE_WRITE16_MEMBER(x68k_scc_w); - DECLARE_WRITE16_MEMBER(x68k_fdc_w); - DECLARE_READ16_MEMBER(x68k_fdc_r); - DECLARE_WRITE16_MEMBER(x68k_ioc_w); - DECLARE_READ16_MEMBER(x68k_ioc_r); - DECLARE_WRITE16_MEMBER(x68k_sysport_w); - DECLARE_READ16_MEMBER(x68k_sysport_r); - DECLARE_WRITE16_MEMBER(x68k_ppi_w); - DECLARE_READ16_MEMBER(x68k_ppi_r); - DECLARE_WRITE16_MEMBER(x68k_sram_w); - DECLARE_READ16_MEMBER(x68k_sram_r); - DECLARE_WRITE16_MEMBER(x68k_vid_w); - DECLARE_READ16_MEMBER(x68k_vid_r); - DECLARE_READ16_MEMBER(x68k_areaset_r); - DECLARE_WRITE16_MEMBER(x68k_areaset_w); - DECLARE_WRITE16_MEMBER(x68k_enh_areaset_w); - DECLARE_READ16_MEMBER(x68k_rom0_r); - DECLARE_WRITE16_MEMBER(x68k_rom0_w); - DECLARE_READ16_MEMBER(x68k_emptyram_r); - DECLARE_WRITE16_MEMBER(x68k_emptyram_w); - DECLARE_READ16_MEMBER(x68k_exp_r); - DECLARE_WRITE16_MEMBER(x68k_exp_w); - DECLARE_READ16_MEMBER(x68k_scc_r); - - DECLARE_READ16_MEMBER(x68k_spritereg_r); - DECLARE_WRITE16_MEMBER(x68k_spritereg_w); - DECLARE_READ16_MEMBER(x68k_spriteram_r); - DECLARE_WRITE16_MEMBER(x68k_spriteram_w); - DECLARE_WRITE16_MEMBER(x68k_crtc_w); - DECLARE_READ16_MEMBER(x68k_crtc_r); - DECLARE_WRITE16_MEMBER(x68k_gvram_w); - DECLARE_READ16_MEMBER(x68k_gvram_r); - DECLARE_WRITE16_MEMBER(x68k_tvram_w); - DECLARE_READ16_MEMBER(x68k_tvram_r); - IRQ_CALLBACK_MEMBER(x68k_int_ack); - -private: - inline void x68k_plot_pixel(bitmap_rgb32 &bitmap, int x, int y, UINT32 color); - void x68k_crtc_text_copy(int src, int dest, UINT8 planes); - void x68k_crtc_refresh_mode(); - void x68k_draw_text(bitmap_rgb32 &bitmap, int xscr, int yscr, rectangle rect); - bool x68k_draw_gfx_scanline(bitmap_ind16 &bitmap, rectangle cliprect, UINT8 priority); - void x68k_draw_gfx(bitmap_rgb32 &bitmap,rectangle cliprect); - void x68k_draw_sprites(bitmap_ind16 &bitmap, int priority, rectangle cliprect); - -public: - bitmap_rgb32* x68k_get_gfx_page(int pri,int type); - attotime prescale(int val); - void mfp_trigger_irq(int irq); - void mfp_set_timer(int timer, unsigned char data); - void mfp_recv_data(int data); - DECLARE_PALETTE_DECODER(GGGGGRRRRRBBBBBI); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - void set_bus_error(UINT32 address, bool write, UINT16 mem_mask); - bool m_bus_error; -}; - - - -#endif /* X68K_H_ */ diff --git a/src/mess/includes/xerox820.h b/src/mess/includes/xerox820.h deleted file mode 100644 index 797e5689b6e..00000000000 --- a/src/mess/includes/xerox820.h +++ /dev/null @@ -1,166 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#ifndef __XEROX820__ -#define __XEROX820__ - -#include "emu.h" -#include "bus/scsi/sa1403d.h" -#include "bus/rs232/rs232.h" -#include "cpu/z80/z80.h" -#include "cpu/z80/z80daisy.h" -#include "cpu/i86/i86.h" -#include "machine/com8116.h" -#include "machine/ram.h" -#include "bus/scsi/scsi.h" -#include "bus/scsi/scsihd.h" -#include "machine/wd_fdc.h" -#include "machine/x820kb.h" -#include "machine/z80pio.h" -#include "machine/z80ctc.h" -#include "machine/z80dart.h" -#include "sound/speaker.h" -#include "sound/beep.h" - -#define SCREEN_TAG "screen" - -#define Z80_TAG "u46" -#define Z80PIO_KB_TAG "u105" -#define Z80PIO_GP_TAG "u101" -#define Z80PIO_RD_TAG "u8" -#define Z80SIO_TAG "u96" -#define Z80CTC_TAG "u99" -#define FD1771_TAG "u109" -#define FD1797_TAG "u109" -#define COM8116_TAG "u76" -#define I8086_TAG "i8086" -#define SASIBUS_TAG "sasi" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define KEYBOARD_TAG "kb" - -#define XEROX820_VIDEORAM_SIZE 0x1000 -#define XEROX820_VIDEORAM_MASK 0x0fff - -class xerox820_state : public driver_device -{ -public: - xerox820_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_kbpio(*this, Z80PIO_KB_TAG), - m_ctc(*this, Z80CTC_TAG), - m_sio(*this, Z80SIO_TAG), - m_fdc(*this, FD1771_TAG), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette"), - m_floppy0(*this, FD1771_TAG":0"), - m_floppy1(*this, FD1771_TAG":1"), - m_kb(*this, KEYBOARD_TAG), - m_rom(*this, Z80_TAG), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_fdc_irq(0), - m_fdc_drq(0), - m_8n5(0), - m_400_460(0) - { } - - virtual void machine_start(); - virtual void machine_reset(); - - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - required_device m_maincpu; - required_device m_kbpio; - required_device m_ctc; - required_device m_sio; - required_device m_fdc; - required_device m_ram; - required_device m_palette; - required_device m_floppy0; - required_device m_floppy1; - required_device m_kb; - required_memory_region m_rom; - required_memory_region m_char_rom; - required_shared_ptr m_video_ram; - - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_WRITE8_MEMBER( scroll_w ); - //DECLARE_WRITE8_MEMBER( x120_system_w ); - DECLARE_READ8_MEMBER( kbpio_pa_r ); - DECLARE_WRITE8_MEMBER( kbpio_pa_w ); - DECLARE_READ8_MEMBER( kbpio_pb_r ); - DECLARE_WRITE_LINE_MEMBER( intrq_w ); - DECLARE_WRITE_LINE_MEMBER( drq_w ); - DECLARE_WRITE_LINE_MEMBER( fr_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); - DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); - - virtual void bankswitch(int bank); - void update_nmi(); - - /* video state */ - UINT8 m_scroll; /* vertical scroll */ - UINT8 m_framecnt; - int m_ncset2; /* national character set */ - int m_vatt; /* X120 video attribute */ - int m_lowlite; /* low light attribute */ - int m_chrom; /* character ROM index */ - - /* floppy state */ - bool m_fdc_irq; /* interrupt request */ - bool m_fdc_drq; /* data request */ - int m_8n5; /* 5.25" / 8" drive select */ - int m_400_460; /* double sided disk detect */ - - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); -}; - -class bigboard_state : public xerox820_state -{ -public: - bigboard_state(const machine_config &mconfig, device_type type, const char *tag) - : xerox820_state(mconfig, type, tag), - m_beeper(*this, "beeper") - { } - - required_device m_beeper; - - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( kbpio_pa_w ); - - bool m_bit5; - - TIMER_CALLBACK_MEMBER(bigboard_beepoff); -}; - -class xerox820ii_state : public xerox820_state -{ -public: - xerox820ii_state(const machine_config &mconfig, device_type type, const char *tag) : - xerox820_state(mconfig, type, tag), - m_speaker(*this, "speaker"), - m_sasibus(*this, SASIBUS_TAG) - { - } - - required_device m_speaker; - required_device m_sasibus; - - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( bell_w ); - DECLARE_WRITE8_MEMBER( slden_w ); - DECLARE_WRITE8_MEMBER( chrom_w ); - DECLARE_WRITE8_MEMBER( lowlite_w ); - DECLARE_WRITE8_MEMBER( sync_w ); - - DECLARE_WRITE8_MEMBER( rdpio_pb_w ); - DECLARE_WRITE_LINE_MEMBER( rdpio_pardy_w ); - - void bankswitch(int bank); -}; - -#endif diff --git a/src/mess/includes/xor100.h b/src/mess/includes/xor100.h deleted file mode 100644 index 63a63a21ea3..00000000000 --- a/src/mess/includes/xor100.h +++ /dev/null @@ -1,107 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -#pragma once - -#ifndef __XOR100__ -#define __XOR100__ - -#include "emu.h" -#include "bus/s100/s100.h" -#include "cpu/z80/z80.h" -#include "machine/ram.h" -#include "machine/com8116.h" -#include "bus/centronics/ctronics.h" -#include "machine/i8255.h" -#include "machine/i8251.h" -#include "machine/wd_fdc.h" -#include "machine/z80ctc.h" - -#define SCREEN_TAG "screen" -#define Z80_TAG "5b" -#define I8251_A_TAG "12b" -#define I8251_B_TAG "14b" -#define I8255A_TAG "8a" -#define COM5016_TAG "15c" -#define Z80CTC_TAG "11b" -#define WD1795_TAG "wd1795" -#define CENTRONICS_TAG "centronics" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" - -class xor100_state : public driver_device -{ -public: - xor100_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_dbrg(*this, COM5016_TAG), - m_uart_a(*this, I8251_A_TAG), - m_uart_b(*this, I8251_B_TAG), - m_fdc(*this, WD1795_TAG), - m_ctc(*this, Z80CTC_TAG), - m_ram(*this, RAM_TAG), - m_centronics(*this, CENTRONICS_TAG), - m_s100(*this, S100_TAG), - m_floppy0(*this, WD1795_TAG":0"), - m_floppy1(*this, WD1795_TAG":1"), - m_floppy2(*this, WD1795_TAG":2"), - m_floppy3(*this, WD1795_TAG":3"), - m_rom(*this, Z80_TAG) - { } - - required_device m_maincpu; - required_device m_dbrg; - required_device m_uart_a; - required_device m_uart_b; - required_device m_fdc; - required_device m_ctc; - required_device m_ram; - required_device m_centronics; - required_device m_s100; - required_device m_floppy0; - required_device m_floppy1; - required_device m_floppy2; - required_device m_floppy3; - required_memory_region m_rom; - - virtual void machine_start(); - virtual void machine_reset(); - - DECLARE_WRITE8_MEMBER( mmu_w ); - DECLARE_WRITE8_MEMBER( prom_toggle_w ); - DECLARE_READ8_MEMBER( prom_disable_r ); - DECLARE_WRITE8_MEMBER( baud_w ); - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_READ8_MEMBER( fdc_wait_r ); - DECLARE_WRITE8_MEMBER( fdc_dcont_w ); - DECLARE_WRITE8_MEMBER( fdc_dsel_w ); - void fdc_intrq_w(bool state); - void fdc_drq_w(bool state); - - void bankswitch(); - void post_load(); - - // memory state - int m_mode; - int m_bank; - - // floppy state - bool m_fdc_irq; - bool m_fdc_drq; - int m_fdc_dden; - DECLARE_WRITE_LINE_MEMBER(com5016_fr_w); - DECLARE_WRITE_LINE_MEMBER(com5016_ft_w); - DECLARE_READ8_MEMBER(i8255_pc_r); - DECLARE_WRITE_LINE_MEMBER(ctc_z0_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z1_w); - DECLARE_WRITE_LINE_MEMBER(ctc_z2_w); - DECLARE_WRITE8_MEMBER(xor100_kbd_put); - - int m_centronics_busy; - int m_centronics_select; - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - DECLARE_WRITE_LINE_MEMBER(write_centronics_select); -}; - -#endif diff --git a/src/mess/includes/z80ne.h b/src/mess/includes/z80ne.h deleted file mode 100644 index b6d77971981..00000000000 --- a/src/mess/includes/z80ne.h +++ /dev/null @@ -1,192 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Roberto Lavarone -/***************************************************************************** - * - * includes/z80ne.h - * - * Nuova Elettronica Z80NE - * - * http://www.z80ne.com/ - * - ****************************************************************************/ - -#ifndef Z80NE_H_ -#define Z80NE_H_ - -#include "video/mc6847.h" -#include "imagedev/cassette.h" -#include "machine/ay31015.h" -#include "machine/kr2376.h" -#include "machine/wd_fdc.h" - -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define Z80NE_CPU_SPEED_HZ 1920000 /* 1.92 MHz */ - -#define LX383_KEYS 16 -#define LX383_DOWNSAMPLING 16 - -#define LX385_TAPE_SAMPLE_FREQ 38400 - -/* wave duration threshold */ -enum z80netape_speed -{ - TAPE_300BPS = 300, /* 300 bps */ - TAPE_600BPS = 600, /* 600 bps */ - TAPE_1200BPS = 1200 /* 1200 bps */ -}; - -struct z80ne_cass_data_t { - struct { - int length; /* time cassette level is at input.level */ - int level; /* cassette level */ - int bit; /* bit being read */ - } input; - struct { - int length; /* time cassette level is at output.level */ - int level; /* cassette level */ - int bit; /* bit to output */ - } output; - z80netape_speed speed; /* 300 - 600 - 1200 */ - int wave_filter; - int wave_length; - int wave_short; - int wave_long; -}; - -struct wd17xx_state_t { - int drq; - int intrq; - UINT8 drive; /* current drive */ - UINT8 head; /* current head */ -}; - - -class z80ne_state : public driver_device -{ -public: - z80ne_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_vdg(*this, "mc6847"), - m_videoram(*this, "videoram"), - m_ay31015(*this, "ay_3_1015"), - m_lx388_kr2376(*this, "lx388_kr2376"), - m_maincpu(*this, "z80ne"), - m_floppy0(*this, "wd1771:0"), - m_floppy1(*this, "wd1771:1"), - m_floppy2(*this, "wd1771:2"), - m_floppy3(*this, "wd1771:3"), - m_cassette1(*this, "cassette"), - m_cassette2(*this, "cassette2"), - m_wd1771(*this, "wd1771"), - m_region_z80ne(*this, "z80ne"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_io_row0(*this, "ROW0"), - m_io_row1(*this, "ROW1"), - m_io_ctrl(*this, "CTRL"), - m_io_rst(*this, "RST"), - m_io_lx_385(*this, "LX.385"), - m_io_lx388_brk(*this, "LX388_BRK"), - m_io_x0(*this, "X0"), - m_io_x1(*this, "X1"), - m_io_x2(*this, "X2"), - m_io_x3(*this, "X3"), - m_io_x4(*this, "X4"), - m_io_x5(*this, "X5"), - m_io_x6(*this, "X6"), - m_io_x7(*this, "X7"), - m_io_modifiers(*this, "MODIFIERS"), - m_io_config(*this, "CONFIG") { } - - DECLARE_FLOPPY_FORMATS(floppy_formats); - - optional_device m_vdg; - optional_shared_ptr m_videoram; - required_device m_ay31015; - optional_device m_lx388_kr2376; - UINT8 m_lx383_scan_counter; - UINT8 m_lx383_key[LX383_KEYS]; - int m_lx383_downsampler; - int m_nmi_delay_counter; - int m_reset_delay_counter; - UINT8 m_lx385_ctrl; - emu_timer *m_cassette_timer; - z80ne_cass_data_t m_cass_data; - wd17xx_state_t m_wd17xx_state; - DECLARE_READ8_MEMBER(lx383_r); - DECLARE_WRITE8_MEMBER(lx383_w); - DECLARE_READ8_MEMBER(lx385_data_r); - DECLARE_READ8_MEMBER(lx385_ctrl_r); - DECLARE_WRITE8_MEMBER(lx385_data_w); - DECLARE_WRITE8_MEMBER(lx385_ctrl_w); - DECLARE_READ8_MEMBER(lx388_data_r); - DECLARE_READ8_MEMBER(lx388_read_field_sync); - DECLARE_DIRECT_UPDATE_MEMBER(z80ne_default); - DECLARE_DIRECT_UPDATE_MEMBER(z80ne_nmi_delay_count); - DECLARE_DIRECT_UPDATE_MEMBER(z80ne_reset_delay_count); - DECLARE_DRIVER_INIT(z80netf); - DECLARE_DRIVER_INIT(z80net); - DECLARE_DRIVER_INIT(z80netb); - DECLARE_DRIVER_INIT(z80ne); - DECLARE_MACHINE_START(z80ne); - DECLARE_MACHINE_RESET(z80ne); - DECLARE_MACHINE_START(z80netb); - DECLARE_MACHINE_RESET(z80netb); - DECLARE_MACHINE_START(z80netf); - DECLARE_MACHINE_RESET(z80netf); - DECLARE_MACHINE_START(z80net); - DECLARE_MACHINE_RESET(z80net); - DECLARE_MACHINE_RESET(z80ne_base); - DECLARE_INPUT_CHANGED_MEMBER(z80ne_reset); - DECLARE_INPUT_CHANGED_MEMBER(z80ne_nmi); - TIMER_CALLBACK_MEMBER(z80ne_cassette_tc); - TIMER_CALLBACK_MEMBER(z80ne_kbd_scan); - DECLARE_READ8_MEMBER(lx388_mc6847_videoram_r); - DECLARE_WRITE8_MEMBER(lx390_motor_w); - DECLARE_READ8_MEMBER(lx390_reset_bank); - DECLARE_READ8_MEMBER(lx390_fdc_r); - DECLARE_WRITE8_MEMBER(lx390_fdc_w); - -protected: - required_device m_maincpu; - optional_device m_floppy0; - optional_device m_floppy1; - optional_device m_floppy2; - optional_device m_floppy3; - required_device m_cassette1; - required_device m_cassette2; - optional_device m_wd1771; - required_memory_region m_region_z80ne; - optional_memory_bank m_bank1; - optional_memory_bank m_bank2; - optional_memory_bank m_bank3; - optional_memory_bank m_bank4; - required_ioport m_io_row0; - required_ioport m_io_row1; - required_ioport m_io_ctrl; - required_ioport m_io_rst; - required_ioport m_io_lx_385; - optional_ioport m_io_lx388_brk; - optional_ioport m_io_x0; - optional_ioport m_io_x1; - optional_ioport m_io_x2; - optional_ioport m_io_x3; - optional_ioport m_io_x4; - optional_ioport m_io_x5; - optional_ioport m_io_x6; - optional_ioport m_io_x7; - optional_ioport m_io_modifiers; - optional_ioport m_io_config; - - cassette_image_device *cassette_device_image(); - void reset_lx388(); - void reset_lx382_banking(); - void reset_lx390_banking(); -}; - -#endif /* Z80NE_H_ */ diff --git a/src/mess/includes/z88.h b/src/mess/includes/z88.h deleted file mode 100644 index 99a26354f5a..00000000000 --- a/src/mess/includes/z88.h +++ /dev/null @@ -1,95 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Kevin Thacker,Sandro Ronco -/***************************************************************************** - * - * includes/z88.h - * - ****************************************************************************/ - -#ifndef Z88_H_ -#define Z88_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/upd65031.h" -#include "machine/ram.h" -#include "bus/z88/z88.h" -#include "bus/z88/flash.h" -#include "bus/z88/ram.h" -#include "bus/z88/rom.h" -#include "sound/speaker.h" -#include "rendlay.h" - -#define Z88_NUM_COLOURS 3 - -#define Z88_SCREEN_WIDTH 640 -#define Z88_SCREEN_HEIGHT 64 - -#define Z88_SCR_HW_REV (1<<4) -#define Z88_SCR_HW_HRS (1<<5) -#define Z88_SCR_HW_UND (1<<1) -#define Z88_SCR_HW_FLS (1<<3) -#define Z88_SCR_HW_GRY (1<<2) -#define Z88_SCR_HW_CURS (Z88_SCR_HW_HRS|Z88_SCR_HW_FLS|Z88_SCR_HW_REV) -#define Z88_SCR_HW_NULL (Z88_SCR_HW_HRS|Z88_SCR_HW_GRY|Z88_SCR_HW_REV) - -enum -{ - Z88_BANK_ROM = 1, - Z88_BANK_RAM, - Z88_BANK_CART, - Z88_BANK_UNMAP -}; - - -class z88_state : public driver_device -{ -public: - z88_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_palette(*this, "palette") - { } - - required_device m_maincpu; - required_device m_ram; - required_device m_palette; - - virtual void machine_start(); - virtual void machine_reset(); - DECLARE_READ8_MEMBER(kb_r); - UPD65031_MEMORY_UPDATE(bankswitch_update); - UPD65031_SCREEN_UPDATE(lcd_update); - - // cartridges read/write - DECLARE_READ8_MEMBER(bank0_cart_r); - DECLARE_READ8_MEMBER(bank1_cart_r); - DECLARE_READ8_MEMBER(bank2_cart_r); - DECLARE_READ8_MEMBER(bank3_cart_r); - DECLARE_WRITE8_MEMBER(bank0_cart_w); - DECLARE_WRITE8_MEMBER(bank1_cart_w); - DECLARE_WRITE8_MEMBER(bank2_cart_w); - DECLARE_WRITE8_MEMBER(bank3_cart_w); - - // defined in video/z88.c - inline void plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT16 color); - inline UINT8* convert_address(UINT32 offset); - void vh_render_8x8(bitmap_ind16 &bitmap, int x, int y, UINT16 pen0, UINT16 pen1, UINT8 *gfx); - void vh_render_6x8(bitmap_ind16 &bitmap, int x, int y, UINT16 pen0, UINT16 pen1, UINT8 *gfx); - void vh_render_line(bitmap_ind16 &bitmap, int x, int y, UINT16 pen); - - struct - { - UINT8 slot; - UINT8 page; - } m_bank[4]; - - int m_bank_type[4]; - UINT8 * m_bios; - UINT8 * m_ram_base; - z88cart_slot_device * m_carts[4]; - DECLARE_PALETTE_INIT(z88); -}; - -#endif /* Z88_H_ */ diff --git a/src/mess/includes/zapcomputer.h b/src/mess/includes/zapcomputer.h deleted file mode 100644 index e86ae010da3..00000000000 --- a/src/mess/includes/zapcomputer.h +++ /dev/null @@ -1,30 +0,0 @@ -// license:GPL2+ -// copyright-holders:FelipeSanches -/***************************************************************************** - * - * includes/zapcomputer.h - * - ****************************************************************************/ - -#ifndef __ZAPCOMPUTER__ -#define __ZAPCOMPUTER__ - -#include "emu.h" -#include "cpu/z80/z80.h" - -class zapcomp_state : public driver_device -{ -public: - zapcomp_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") - { } - - required_device m_maincpu; - DECLARE_READ8_MEMBER(keyboard_r); - DECLARE_WRITE8_MEMBER(display_7seg_w); - - virtual void machine_start(); -}; - -#endif // __ZAPCOMPUTER__ diff --git a/src/mess/includes/zx.h b/src/mess/includes/zx.h deleted file mode 100644 index c6165fd30d3..00000000000 --- a/src/mess/includes/zx.h +++ /dev/null @@ -1,112 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Juergen Buchmueller, Krzysztof Strzecha, Robbbert -/***************************************************************************** - * - * includes/zx.h - * - ****************************************************************************/ - -#ifndef ZX_H_ -#define ZX_H_ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "sound/speaker.h" -#include "sound/wave.h" -#include "imagedev/cassette.h" -#include "formats/zx81_p.h" -#include "machine/ram.h" - - -class zx_state : public driver_device -{ -public: - enum - { - TIMER_TAPE_PULSE, - TIMER_ULA_NMI, - TIMER_ULA_IRQ - }; - - zx_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_cassette(*this, "cassette"), - m_speaker(*this, "speaker"), - m_region_maincpu(*this, "maincpu"), - m_region_gfx1(*this, "gfx1"), - m_io_row0(*this, "ROW0"), - m_io_row1(*this, "ROW1"), - m_io_row2(*this, "ROW2"), - m_io_row3(*this, "ROW3"), - m_io_row4(*this, "ROW4"), - m_io_row5(*this, "ROW5"), - m_io_row6(*this, "ROW6"), - m_io_row7(*this, "ROW7"), - m_io_config(*this, "CONFIG"), - m_screen(*this, "screen") { } - - UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - bitmap_ind16 m_bitmap; - - DECLARE_READ8_MEMBER(zx_ram_r); - DECLARE_READ8_MEMBER(zx80_io_r); - DECLARE_READ8_MEMBER(zx81_io_r); - DECLARE_READ8_MEMBER(pc8300_io_r); - DECLARE_READ8_MEMBER(pow3000_io_r); - DECLARE_WRITE8_MEMBER(zx80_io_w); - DECLARE_WRITE8_MEMBER(zx81_io_w); - emu_timer *m_ula_nmi; - int m_ula_irq_active; - int m_ula_frame_vsync; - int m_ula_scanline_count; - UINT8 m_tape_bit; - UINT8 m_speaker_state; - int m_old_x; - int m_old_y; - UINT8 m_old_c; - UINT8 m_charline[32]; - UINT8 m_charline_ptr; - int m_offs1; - void zx_ula_bkgnd(UINT8 color); - DECLARE_WRITE8_MEMBER(zx_ram_w); - DECLARE_DIRECT_UPDATE_MEMBER(zx_setdirect); - DECLARE_DIRECT_UPDATE_MEMBER(pc8300_setdirect); - DECLARE_DIRECT_UPDATE_MEMBER(pow3000_setdirect); - DECLARE_DRIVER_INIT(zx); - virtual void machine_reset(); - virtual void video_start(); - DECLARE_PALETTE_INIT(zx); - DECLARE_PALETTE_INIT(ts1000); - DECLARE_MACHINE_RESET(pc8300); - DECLARE_MACHINE_RESET(pow3000); - void screen_eof_zx(screen_device &screen, bool state); - TIMER_CALLBACK_MEMBER(zx_tape_pulse); - TIMER_CALLBACK_MEMBER(zx_ula_nmi); - TIMER_CALLBACK_MEMBER(zx_ula_irq); - -protected: - required_device m_maincpu; - required_device m_ram; - required_device m_cassette; - required_device m_speaker; - required_memory_region m_region_maincpu; - optional_memory_region m_region_gfx1; - required_ioport m_io_row0; - required_ioport m_io_row1; - required_ioport m_io_row2; - required_ioport m_io_row3; - required_ioport m_io_row4; - required_ioport m_io_row5; - required_ioport m_io_row6; - required_ioport m_io_row7; - optional_ioport m_io_config; - required_device m_screen; - - void zx_ula_r(int offs, memory_region *region, const UINT8 param); - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); -}; - -#endif /* ZX_H_ */ -- cgit v1.2.3