deprecat.h

This commit is contained in:
Angelo Salese 2011-12-05 18:30:08 +00:00
parent ad21c64690
commit dc2e0c0636

View File

@ -8,7 +8,7 @@
TODO: TODO:
- finish 8275 CRT emulation, split off as device - convert driver to use i8275 CRT device emulation
- fix gfx glitches and banking - fix gfx glitches and banking
- correct colors - correct colors
- DIPs - DIPs
@ -297,7 +297,6 @@ uPC1352C @ N3
*/ */
#include "emu.h" #include "emu.h"
#include "deprecat.h"
#include "cpu/i8085/i8085.h" #include "cpu/i8085/i8085.h"
#include "sound/ay8910.h" #include "sound/ay8910.h"
@ -305,7 +304,9 @@ class dwarfd_state : public driver_device
{ {
public: public:
dwarfd_state(const machine_config &mconfig, device_type type, const char *tag) dwarfd_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) { } : driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu")
{ }
/* video-related */ /* video-related */
int m_bank; int m_bank;
@ -330,6 +331,8 @@ public:
/* memory */ /* memory */
UINT8 m_dw_ram[0x1000]; UINT8 m_dw_ram[0x1000];
UINT8 m_videobuf[0x8000]; UINT8 m_videobuf[0x8000];
required_device<cpu_device> m_maincpu;
}; };
@ -855,22 +858,25 @@ static I8085_CONFIG( dwarfd_i8085_config )
}; };
#define NUM_LINES 25 static TIMER_DEVICE_CALLBACK( dwarfd_interrupt )
static INTERRUPT_GEN( dwarfd_interrupt )
{ {
dwarfd_state *state = device->machine().driver_data<dwarfd_state>(); dwarfd_state *state = timer.machine().driver_data<dwarfd_state>();
int scanline = param;
if (cpu_getiloops(device) < NUM_LINES) if((scanline % 8) != 0)
return;
if (scanline < 25*8)
{ {
device_set_input_line(device, I8085_RST65_LINE, HOLD_LINE); // 34 - every 8th line device_set_input_line(state->m_maincpu, I8085_RST65_LINE, HOLD_LINE); // 34 - every 8th line
state->m_line = cpu_getiloops(device); state->m_line = scanline/8;
state->m_idx = 0; state->m_idx = 0;
} }
else else
{ {
if (cpu_getiloops(device) == NUM_LINES) if (scanline == 25*8)
{ {
device_set_input_line(device, I8085_RST55_LINE, HOLD_LINE);//2c - generated by crt - end of frame device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE);//2c - generated by crt - end of frame
} }
} }
} }
@ -1056,8 +1062,7 @@ static MACHINE_CONFIG_START( dwarfd, dwarfd_state )
MCFG_CPU_CONFIG(dwarfd_i8085_config) MCFG_CPU_CONFIG(dwarfd_i8085_config)
MCFG_CPU_PROGRAM_MAP(mem_map) MCFG_CPU_PROGRAM_MAP(mem_map)
MCFG_CPU_IO_MAP(io_map) MCFG_CPU_IO_MAP(io_map)
MCFG_TIMER_ADD_SCANLINE("scantimer", dwarfd_interrupt, "screen", 0, 1)
MCFG_CPU_VBLANK_INT_HACK(dwarfd_interrupt,NUM_LINES+4) //16 +vblank + 1 unused
MCFG_MACHINE_START(dwarfd) MCFG_MACHINE_START(dwarfd)
MCFG_MACHINE_RESET(dwarfd) MCFG_MACHINE_RESET(dwarfd)
@ -1067,7 +1072,7 @@ static MACHINE_CONFIG_START( dwarfd, dwarfd_state )
MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MCFG_SCREEN_SIZE(272*2, 200) MCFG_SCREEN_SIZE(272*2, 200+4*8)
MCFG_SCREEN_VISIBLE_AREA(0, 272*2-1, 0, 200-1) MCFG_SCREEN_VISIBLE_AREA(0, 272*2-1, 0, 200-1)
MCFG_SCREEN_UPDATE(dwarfd) MCFG_SCREEN_UPDATE(dwarfd)