mirror of
https://github.com/holub/mame
synced 2025-05-28 08:33:05 +03:00
deprecat.h
This commit is contained in:
parent
5f944dfed3
commit
ae41450561
@ -84,7 +84,6 @@ driver modified by Eisuke Watanabe
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
@ -252,20 +251,31 @@ static TIMER_DEVICE_CALLBACK( msgogo_interrupt )
|
||||
|
||||
|
||||
/* lev 2-7 (lev 1 seems sound related) */
|
||||
/* TODO: fix this arrangement (various things still doesn't work with this) */
|
||||
static TIMER_DEVICE_CALLBACK( karatour_interrupt )
|
||||
{
|
||||
metro_state *state = timer.machine().driver_data<metro_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240)
|
||||
if(scanline == 224)
|
||||
{
|
||||
state->m_requested_int[0] = 1;
|
||||
//state->m_requested_int[5] = 1; // write the scroll registers (TODO: where to put this without making the game to hang???)
|
||||
state->m_requested_int[4] = 0;
|
||||
//state->m_requested_int[5] = 0;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
else if(scanline == 240)
|
||||
{
|
||||
state->m_requested_int[0] = 1;
|
||||
state->m_requested_int[4] = 0;
|
||||
state->m_requested_int[5] = 1;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
else if(scanline == 0)
|
||||
{
|
||||
//state->m_requested_int[0] = 0;
|
||||
state->m_requested_int[4] = 1;
|
||||
state->m_requested_int[5] = 0;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
}
|
||||
@ -3858,7 +3868,7 @@ static MACHINE_CONFIG_START( lastforg, metro_state )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, VBSTART) // was 58fps?
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART + 40, VTOTAL, VBEND, 224) // was 58fps?
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_UPDATE(metro)
|
||||
|
||||
@ -4268,7 +4278,7 @@ static MACHINE_CONFIG_START( blzntrnd, metro_state )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224) // was 58fps?
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_UPDATE(metro)
|
||||
|
||||
@ -4313,7 +4323,7 @@ static MACHINE_CONFIG_START( gstrik2, metro_state )
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) // was 58fps?
|
||||
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, 224) // was 58fps?
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_UPDATE(metro)
|
||||
|
||||
@ -4335,41 +4345,40 @@ static MACHINE_CONFIG_START( gstrik2, metro_state )
|
||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static INTERRUPT_GEN( puzzlet_interrupt )
|
||||
//1770e
|
||||
static TIMER_DEVICE_CALLBACK( puzzlet_interrupt )
|
||||
{
|
||||
metro_state *state = device->machine().driver_data<metro_state>();
|
||||
metro_state *state = timer.machine().driver_data<metro_state>();
|
||||
int scanline = param;
|
||||
|
||||
switch (cpu_getiloops(device))
|
||||
if(scanline == 224)
|
||||
{
|
||||
case 0:
|
||||
state->m_requested_int[1] = 1;
|
||||
update_irq_state(device->machine());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
state->m_requested_int[3] = 1;
|
||||
update_irq_state(device->machine());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
state->m_requested_int[5] = 1;
|
||||
update_irq_state(device->machine());
|
||||
break;
|
||||
|
||||
case 3:
|
||||
state->m_requested_int[2] = 1;
|
||||
update_irq_state(device->machine());
|
||||
break;
|
||||
state->m_requested_int[1] = 1;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
|
||||
if(scanline == 0)
|
||||
{
|
||||
state->m_requested_int[2] = 1;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
|
||||
if(scanline == 64)
|
||||
{
|
||||
state->m_requested_int[5] = 1;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
|
||||
if(scanline == 128)
|
||||
{
|
||||
state->m_requested_int[3] = 1;
|
||||
update_irq_state(timer.machine());
|
||||
}
|
||||
|
||||
if(scanline == 0)
|
||||
device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( unknown_interrupt )
|
||||
{
|
||||
metro_state *state = device->machine().driver_data<metro_state>();
|
||||
|
||||
device_set_input_line(state->m_maincpu, H8_METRO_TIMER_HACK, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( puzzlet, metro_state )
|
||||
|
||||
@ -4377,8 +4386,7 @@ static MACHINE_CONFIG_START( puzzlet, metro_state )
|
||||
MCFG_CPU_ADD("maincpu", H83007, XTAL_20MHz) // H8/3007 - Hitachi HD6413007F20 CPU. Clock 20MHz
|
||||
MCFG_CPU_PROGRAM_MAP(puzzlet_map)
|
||||
MCFG_CPU_IO_MAP(puzzlet_io_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(puzzlet_interrupt, 5)
|
||||
MCFG_CPU_PERIODIC_INT(unknown_interrupt,60)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", puzzlet_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_MACHINE_START(metro)
|
||||
MCFG_MACHINE_RESET(metro)
|
||||
|
@ -51,7 +51,6 @@ PS4 J8635 PS4 J8541 PS4 J8648
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/m6805/m6805.h"
|
||||
#include "sound/2203intf.h"
|
||||
@ -483,7 +482,7 @@ static MACHINE_CONFIG_START( mexico86, mexico86_state )
|
||||
|
||||
MCFG_CPU_ADD("mcu", M68705, 4000000) /* xtal is 4MHz, divided by 4 internally */
|
||||
MCFG_CPU_PROGRAM_MAP(mexico86_m68705_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(mexico86_m68705_interrupt,2)
|
||||
MCFG_CPU_VBLANK_INT("screen",mexico86_m68705_interrupt)
|
||||
|
||||
MCFG_CPU_ADD("sub", Z80, 8000000/2) /* 4 MHz, Uses 8Mhz OSC */
|
||||
MCFG_CPU_PROGRAM_MAP(mexico86_sub_cpu_map)
|
||||
@ -558,7 +557,7 @@ ROM_START( kikikai )
|
||||
ROM_LOAD( "a85-17.h16", 0x00000, 0x08000, CRC(c141d5ab) SHA1(fe3622ba283e514416c43a44f83f922a958b27cd) ) /* 1st half, main code */
|
||||
ROM_CONTINUE( 0x20000, 0x08000 ) /* 2nd half, banked at 0x8000 */
|
||||
ROM_LOAD( "a85-16.h18", 0x10000, 0x10000, CRC(4094d750) SHA1(05e0ad177a3eb144b203784ecb6242a0fc5c4d4d) ) /* banked at 0x8000 */
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //AT: set as default to avoid banking problems
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) // set as default to avoid banking problems
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "a85-11.f6", 0x0000, 0x8000, CRC(cc3539db) SHA1(4239a40fdee65cba613e4b4ec54cf7899480e366) )
|
||||
@ -584,7 +583,7 @@ ROM_START( knightb )
|
||||
ROM_LOAD( "a85-17.h16", 0x00000, 0x08000, CRC(c141d5ab) SHA1(fe3622ba283e514416c43a44f83f922a958b27cd) ) /* 1st half, main code */
|
||||
ROM_CONTINUE( 0x20000, 0x08000 ) /* 2nd half, banked at 0x8000 */
|
||||
ROM_LOAD( "a85-16.h18", 0x10000, 0x10000, CRC(4094d750) SHA1(05e0ad177a3eb144b203784ecb6242a0fc5c4d4d) ) /* banked at 0x8000 */
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //AT: set as default to avoid banking problems
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) // set as default to avoid banking problems
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "a85-11.f6", 0x0000, 0x8000, CRC(cc3539db) SHA1(4239a40fdee65cba613e4b4ec54cf7899480e366) )
|
||||
@ -609,7 +608,7 @@ ROM_START( kicknrun )
|
||||
ROM_LOAD( "a87-08.h16", 0x00000, 0x08000, CRC(715e1b04) SHA1(60b7259758ec73f1cc945556e9c2b25766b745a8) ) /* 1st half, main code */
|
||||
ROM_CONTINUE( 0x20000, 0x08000 ) /* 2nd half, banked at 0x8000 */
|
||||
ROM_LOAD( "a87-07.h18", 0x10000, 0x10000, CRC(6cb6ebfe) SHA1(fca61fc2ad8fadc1e15b9ff84c7469b68d16e885) ) /* banked at 0x8000 */
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //AT: set as default to avoid banking problems
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) // set as default to avoid banking problems
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "a87-06.f6", 0x0000, 0x8000, CRC(1625b587) SHA1(7336384e13c114915de5e439df5731ce3fc2054a) )
|
||||
@ -642,7 +641,7 @@ ROM_START( kicknrunu )
|
||||
ROM_LOAD( "a87-23.h16", 0x00000, 0x08000, CRC(37182560) SHA1(8db393131f50af88b2e7489d6aae65bad0a5a65b) ) /* 1st half, main code */
|
||||
ROM_CONTINUE( 0x20000, 0x08000 ) /* 2nd half, banked at 0x8000 */
|
||||
ROM_LOAD( "a87-22.h18", 0x10000, 0x10000, CRC(3b5a8354) SHA1(e0db4cb0657989d5a21f9a8d4e8f842adba636ad) ) /* banked at 0x8000 */
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //AT: set as default to avoid banking problems
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) // set as default to avoid banking problems
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "a87-06.f6", 0x0000, 0x8000, CRC(1625b587) SHA1(7336384e13c114915de5e439df5731ce3fc2054a) )
|
||||
@ -675,7 +674,7 @@ ROM_START( mexico86 )
|
||||
ROM_LOAD( "2_g.bin", 0x00000, 0x08000, CRC(2bbfe0fb) SHA1(8f047e001ea8e49d28f73e546c82812af1c2533c) ) /* 1st half, main code */
|
||||
ROM_CONTINUE( 0x20000, 0x08000 ) /* 2nd half, banked at 0x8000 */
|
||||
ROM_LOAD( "1_f.bin", 0x10000, 0x10000, CRC(0b93e68e) SHA1(c6fbcce83103e3e71a7a1ef9f18a10622ed6b951) ) /* banked at 0x8000 */
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //AT: set as default to avoid banking problems
|
||||
ROM_COPY( "maincpu", 0x10000, 0x08000, 0x04000 ) //set as default to avoid banking problems
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "a87-06.f6", 0x0000, 0x8000, CRC(1625b587) SHA1(7336384e13c114915de5e439df5731ce3fc2054a) )
|
||||
|
@ -626,7 +626,6 @@ Notes:
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/v60/v60.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/segaic24.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/mb86233/mb86233.h"
|
||||
@ -714,21 +713,23 @@ static void irq_init(running_machine &machine)
|
||||
device_set_irq_callback(machine.device("maincpu"), irq_callback);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN(model1_interrupt)
|
||||
static TIMER_DEVICE_CALLBACK( model1_interrupt )
|
||||
{
|
||||
model1_state *state = device->machine().driver_data<model1_state>();
|
||||
if (cpu_getiloops(device))
|
||||
model1_state *state = timer.machine().driver_data<model1_state>();
|
||||
int scanline = param;
|
||||
|
||||
if (scanline == 384)
|
||||
{
|
||||
irq_raise(device->machine(), 1);
|
||||
irq_raise(timer.machine(), 1);
|
||||
}
|
||||
else
|
||||
else if(scanline == 384/2)
|
||||
{
|
||||
irq_raise(device->machine(), state->m_sound_irq);
|
||||
irq_raise(timer.machine(), state->m_sound_irq);
|
||||
|
||||
// if the FIFO has something in it, signal the 68k too
|
||||
if (state->m_fifo_rptr != state->m_fifo_wptr)
|
||||
{
|
||||
cputag_set_input_line(device->machine(), "audiocpu", 2, HOLD_LINE);
|
||||
cputag_set_input_line(timer.machine(), "audiocpu", 2, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1080,7 +1081,7 @@ INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( wingwar )
|
||||
PORT_START("AN0") /* X */
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
|
||||
PORT_START("AN1") /* Y */
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
@ -1094,19 +1095,19 @@ static INPUT_PORTS_START( wingwar )
|
||||
PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_LOW)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("View 1")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("View 2")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("View 3")
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("View 4")
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("Machine Gun")
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME("Missile")
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME("Smoke")
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
@ -1505,7 +1506,7 @@ static MACHINE_CONFIG_START( model1, model1_state )
|
||||
MCFG_CPU_ADD("maincpu", V60, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_mem)
|
||||
MCFG_CPU_IO_MAP(model1_io)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model1_interrupt, 2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
@ -1547,7 +1548,7 @@ static MACHINE_CONFIG_START( model1_vr, model1_state )
|
||||
MCFG_CPU_ADD("maincpu", V60, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_vr_mem)
|
||||
MCFG_CPU_IO_MAP(model1_vr_io)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model1_interrupt, 2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
|
@ -87,7 +87,6 @@
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "video/segaic24.h"
|
||||
@ -1785,49 +1784,50 @@ static INPUT_PORTS_START( rchase2 )
|
||||
PORT_BIT( 0x00ff, 0x0000, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INTERRUPT_GEN(model2_interrupt)
|
||||
static TIMER_DEVICE_CALLBACK(model2_interrupt)
|
||||
{
|
||||
model2_state *state = device->machine().driver_data<model2_state>();
|
||||
switch (cpu_getiloops(device))
|
||||
model2_state *state = timer.machine().driver_data<model2_state>();
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 0) // 384
|
||||
{
|
||||
case 0:
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
{
|
||||
device_set_input_line(device, I960_IRQ3, ASSERT_LINE);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
{
|
||||
device_set_input_line(device, I960_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
break;
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
device_set_input_line(state->m_maincpu, I960_IRQ3, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 384/2)
|
||||
{
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
device_set_input_line(state->m_maincpu, I960_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN(model2c_interrupt)
|
||||
static TIMER_DEVICE_CALLBACK(model2c_interrupt)
|
||||
{
|
||||
model2_state *state = device->machine().driver_data<model2_state>();
|
||||
switch (cpu_getiloops(device))
|
||||
{
|
||||
case 0:
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
device_set_input_line(device, I960_IRQ3, ASSERT_LINE);
|
||||
break;
|
||||
case 1:
|
||||
state->m_intreq |= (1<<2);
|
||||
if (state->m_intena & (1<<2))
|
||||
device_set_input_line(device, I960_IRQ2, ASSERT_LINE);
|
||||
model2_state *state = timer.machine().driver_data<model2_state>();
|
||||
int scanline = param;
|
||||
|
||||
break;
|
||||
case 2:
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
device_set_input_line(device, I960_IRQ0, ASSERT_LINE);
|
||||
break;
|
||||
if(scanline == 0) // 384
|
||||
{
|
||||
state->m_intreq |= (1<<10);
|
||||
if (state->m_intena & (1<<10))
|
||||
device_set_input_line(state->m_maincpu, I960_IRQ3, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 256)
|
||||
{
|
||||
state->m_intreq |= (1<<2);
|
||||
if (state->m_intena & (1<<2))
|
||||
device_set_input_line(state->m_maincpu, I960_IRQ2, ASSERT_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 128)
|
||||
{
|
||||
state->m_intreq |= (1<<0);
|
||||
if (state->m_intena & (1<<0))
|
||||
device_set_input_line(state->m_maincpu, I960_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2003,7 +2003,7 @@ static const mb86233_cpu_core tgp_config =
|
||||
static MACHINE_CONFIG_START( model2o, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2o_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model2_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 10000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model1_snd)
|
||||
@ -2063,7 +2063,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_START( model2a, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2a_crx_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model2_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
@ -2162,7 +2162,7 @@ static const sharc_config sharc_cfg =
|
||||
static MACHINE_CONFIG_START( model2b, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2b_crx_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model2_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
@ -2220,7 +2220,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_START( model2c, model2_state )
|
||||
MCFG_CPU_ADD("maincpu", I960, 25000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2c_crx_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model2c_interrupt,3)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model2c_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model2_snd)
|
||||
|
@ -646,7 +646,6 @@ ALL VROM ROMs are 16M MASK
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/powerpc/ppc.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/53c810.h"
|
||||
@ -5133,17 +5132,15 @@ static const scsp_interface scsp2_interface =
|
||||
0x02: Video (VBLANK start?)
|
||||
0x01: Video (unused?)
|
||||
*/
|
||||
static INTERRUPT_GEN(model3_interrupt)
|
||||
static TIMER_DEVICE_CALLBACK(model3_interrupt)
|
||||
{
|
||||
model3_state *state = device->machine().driver_data<model3_state>();
|
||||
if (state->m_vblank == 0) {
|
||||
model3_set_irq_line(device->machine(), 0x02, ASSERT_LINE);
|
||||
} else {
|
||||
model3_set_irq_line(device->machine(), 0x0d, ASSERT_LINE);
|
||||
}
|
||||
// model3_state *state = timer.machine().driver_data<model3_state>();
|
||||
int scanline = param;
|
||||
|
||||
state->m_vblank++;
|
||||
state->m_vblank &= 1;
|
||||
if (scanline == 384)
|
||||
model3_set_irq_line(timer.machine(), 0x02, ASSERT_LINE);
|
||||
else if(scanline == 0)
|
||||
model3_set_irq_line(timer.machine(), 0x0d, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const powerpc_config model3_10 =
|
||||
@ -5168,7 +5165,7 @@ static MACHINE_CONFIG_START( model3_10, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603E, 66000000)
|
||||
MCFG_CPU_CONFIG(model3_10)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model3_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5210,7 +5207,7 @@ static MACHINE_CONFIG_START( model3_15, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603E, 100000000)
|
||||
MCFG_CPU_CONFIG(model3_15)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model3_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5250,7 +5247,7 @@ static MACHINE_CONFIG_START( model3_20, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603R, 166000000)
|
||||
MCFG_CPU_CONFIG(model3_2x)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model3_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
@ -5290,7 +5287,7 @@ static MACHINE_CONFIG_START( model3_21, model3_state )
|
||||
MCFG_CPU_ADD("maincpu", PPC603R, 166000000)
|
||||
MCFG_CPU_CONFIG(model3_2x)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_mem)
|
||||
MCFG_CPU_VBLANK_INT_HACK(model3_interrupt,2)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 12000000)
|
||||
MCFG_CPU_PROGRAM_MAP(model3_snd)
|
||||
|
@ -9,7 +9,9 @@ class model2_state : public driver_device
|
||||
{
|
||||
public:
|
||||
model2_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")
|
||||
{ }
|
||||
|
||||
UINT32 *m_workram;
|
||||
UINT32 m_intreq;
|
||||
@ -65,6 +67,8 @@ public:
|
||||
raster_state *m_raster;
|
||||
geo_state *m_geo;
|
||||
bitmap_t *m_sys24_bitmap;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -14,7 +14,9 @@ class model3_state : public driver_device
|
||||
{
|
||||
public:
|
||||
model3_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")
|
||||
{ }
|
||||
|
||||
int m_sound_irq_enable;
|
||||
emu_timer *m_sound_timer;
|
||||
@ -50,7 +52,6 @@ public:
|
||||
UINT64 *m_network_ram;
|
||||
int m_prot_data_ptr;
|
||||
int m_scsp_last_line;
|
||||
int m_vblank;
|
||||
UINT32 *m_vrom;
|
||||
int m_step;
|
||||
UINT64 *m_paletteram64;
|
||||
@ -100,6 +101,8 @@ public:
|
||||
PLANE m_clip_plane[5];
|
||||
UINT32 m_matrix_base_address;
|
||||
cached_texture *m_texcache[2][1024/32][2048/32];
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/mexico86.h"
|
||||
|
||||
/*
|
||||
@ -166,7 +165,6 @@ INTERRUPT_GEN( kikikai_interrupt )
|
||||
|
||||
|
||||
#if 0
|
||||
//AT
|
||||
/***************************************************************************
|
||||
|
||||
Collision logic used by Kiki Kaikai (theoretical)
|
||||
@ -210,7 +208,6 @@ static void kiki_clogic(running_machine &machine, int address, int latch)
|
||||
}
|
||||
}
|
||||
}
|
||||
//ZT
|
||||
#endif
|
||||
|
||||
|
||||
@ -224,11 +221,7 @@ static void kiki_clogic(running_machine &machine, int address, int latch)
|
||||
|
||||
INTERRUPT_GEN( mexico86_m68705_interrupt )
|
||||
{
|
||||
/* I don't know how to handle the interrupt line so I just toggle it every time. */
|
||||
if (cpu_getiloops(device) & 1)
|
||||
device_set_input_line(device, 0, CLEAR_LINE);
|
||||
else
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -319,7 +312,8 @@ WRITE8_HANDLER( mexico86_68705_port_b_w )
|
||||
if (BIT(state->m_ddr_b, 5) && BIT(data, 5) && BIT(~state->m_port_b_out, 5))
|
||||
{
|
||||
device_set_input_line_vector(state->m_maincpu, 0, state->m_protection_ram[0]);
|
||||
device_set_input_line(state->m_maincpu, 0, HOLD_LINE); //AT: HOLD_LINE works better in Z80 interrupt mode 1.
|
||||
device_set_input_line(state->m_maincpu, 0, HOLD_LINE); // HOLD_LINE works better in Z80 interrupt mode 1.
|
||||
device_set_input_line(state->m_mcu, 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
if (BIT(state->m_ddr_b, 6) && BIT(~data, 6) && BIT(state->m_port_b_out, 6))
|
||||
|
Loading…
Reference in New Issue
Block a user