fix spectrum based drivers (nw)

This commit is contained in:
Miodrag Milanovic 2016-05-01 14:30:57 +02:00
parent 77b6c7e3c5
commit 6a730f5c07
13 changed files with 89 additions and 30 deletions

View File

@ -2535,8 +2535,11 @@ files {
MAME_DIR .. "src/mame/drivers/spectrum.cpp",
MAME_DIR .. "src/mame/includes/spectrum.h",
MAME_DIR .. "src/mame/drivers/spec128.cpp",
MAME_DIR .. "src/mame/includes/spec128.h",
MAME_DIR .. "src/mame/drivers/timex.cpp",
MAME_DIR .. "src/mame/includes/timex.h",
MAME_DIR .. "src/mame/drivers/specpls3.cpp",
MAME_DIR .. "src/mame/includes/specpls3.h",
MAME_DIR .. "src/mame/drivers/scorpion.cpp",
MAME_DIR .. "src/mame/drivers/atm.cpp",
MAME_DIR .. "src/mame/drivers/pentagon.cpp",

View File

@ -13,12 +13,15 @@ computer to boot up (with keyboard problems).
#include "emu.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "includes/specpls3.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/ay8910.h"
#include "sound/speaker.h"
#include "machine/beta.h"
#include "machine/ram.h"
#include "machine/spec_snqk.h"
class atm_state : public spectrum_state

View File

@ -2,6 +2,7 @@
// copyright-holders:Miodrag Milanovic, MetalliC
#include "emu.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/ay8910.h"
@ -10,6 +11,7 @@
#include "machine/beta.h"
#include "machine/ram.h"
#include "softlist.h"
#include "machine/spec_snqk.h"
class pentagon_state : public spectrum_state
{

View File

@ -3,6 +3,7 @@
#include "emu.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/ay8910.h"
@ -10,6 +11,8 @@
#include "formats/tzx_cas.h"
#include "machine/beta.h"
#include "machine/ram.h"
#include "machine/spec_snqk.h"
class scorpion_state : public spectrum_state
{

View File

@ -153,6 +153,7 @@ resulting mess can be seen in the F4 viewer display.
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/ay8910.h"

View File

@ -148,6 +148,8 @@ http://www.z88forever.org.uk/zxplus3e/
#include "emu.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "includes/specpls3.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/ay8910.h"

View File

@ -149,6 +149,8 @@ http://www.z88forever.org.uk/zxplus3e/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "includes/timex.h"
#include "imagedev/snapquik.h"
#include "imagedev/cassette.h"
#include "sound/speaker.h"
@ -158,6 +160,7 @@ http://www.z88forever.org.uk/zxplus3e/
#include "machine/beta.h"
#include "machine/ram.h"
#include "softlist.h"
#include "machine/spec_snqk.h"
/****************************************************************************************************/
/* TS2048 specific functions */

View File

@ -0,0 +1,19 @@
// license:GPL-2.0+
// copyright-holders:Kevin Thacker
/*****************************************************************************
*
* includes/spec128.h
*
****************************************************************************/
#ifndef __SPEC128H__
#define __SPEC128H__
/* 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
MACHINE_CONFIG_EXTERN( spectrum_128 );
#endif /* __SPEC128H__ */

View File

@ -0,0 +1,14 @@
// license:GPL-2.0+
// copyright-holders:Kevin Thacker
/*****************************************************************************
*
* includes/specpls3.h
*
****************************************************************************/
#ifndef __SPECPLS3_H__
#define __SPECPLS3_H__
INPUT_PORTS_EXTERN( spec_plus );
#endif /* __SPECPLS3_H__ */

View File

@ -16,6 +16,7 @@
#include "imagedev/cassette.h"
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
#include "machine/spec_snqk.h"
/* Spectrum crystals */
@ -44,23 +45,6 @@
#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 */
@ -72,15 +56,6 @@ struct EVENT_LIST_ITEM
};
enum
{
TIMEX_CART_NONE,
TIMEX_CART_DOCK,
TIMEX_CART_EXROM,
TIMEX_CART_HOME
};
class spectrum_state : public driver_device
{
public:
@ -255,8 +230,4 @@ INPUT_PORTS_EXTERN( spec_plus );
MACHINE_CONFIG_EXTERN( spectrum );
/*----------- defined in drivers/spec128.c -----------*/
MACHINE_CONFIG_EXTERN( spectrum_128 );
#endif /* __SPECTRUM_H__ */

34
src/mame/includes/timex.h Normal file
View File

@ -0,0 +1,34 @@
// license:GPL-2.0+
// copyright-holders:Kevin Thacker
/*****************************************************************************
*
* includes/timex.h
*
****************************************************************************/
#ifndef __TIMEX_H__
#define __TIMEX_H__
/* 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)
enum
{
TIMEX_CART_NONE,
TIMEX_CART_DOCK,
TIMEX_CART_EXROM,
TIMEX_CART_HOME
};
#endif /* __TIMEX_H__ */

View File

@ -31,6 +31,9 @@
#include "ui/uimain.h"
#include "cpu/z80/z80.h"
#include "includes/spectrum.h"
#include "includes/spec128.h"
#include "includes/timex.h"
#include "includes/specpls3.h"
#include "sound/ay8910.h"
#include "machine/spec_snqk.h"

View File

@ -17,6 +17,7 @@
#include "emu.h"
#include "includes/spectrum.h"
#include "includes/timex.h"
#include "machine/ram.h"
inline void spectrum_state::spectrum_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color)