mirror of
https://github.com/holub/mame
synced 2025-05-18 19:49:35 +03:00
deprecat.h, also fixed 3d trails when frameskipping
This commit is contained in:
parent
4b42839acd
commit
5e088af77c
@ -448,7 +448,16 @@ or Fatal Fury for example).
|
|||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
#include "includes/hng64.h"
|
#include "includes/hng64.h"
|
||||||
|
|
||||||
|
/* TODO: NOT measured! */
|
||||||
|
#define PIXEL_CLOCK ((MASTER_CLOCK*2)/4) // x 2 is due of the interlaced screen ...
|
||||||
|
|
||||||
|
#define HTOTAL (0x200+0x100)
|
||||||
|
#define HBEND (0)
|
||||||
|
#define HBSTART (0x200)
|
||||||
|
|
||||||
|
#define VTOTAL (264*2)
|
||||||
|
#define VBEND (0)
|
||||||
|
#define VBSTART (224*2)
|
||||||
|
|
||||||
|
|
||||||
#ifdef UNUSED_FUNCTION
|
#ifdef UNUSED_FUNCTION
|
||||||
@ -931,7 +940,7 @@ static WRITE32_HANDLER( tcram_w )
|
|||||||
visarea.max_x = min_x + max_x - 1;
|
visarea.max_x = min_x + max_x - 1;
|
||||||
visarea.min_y = min_y;
|
visarea.min_y = min_y;
|
||||||
visarea.max_y = min_y + max_y - 1;
|
visarea.max_y = min_y + max_y - 1;
|
||||||
space->machine().primary_screen->configure(0x200, 0x1c0, visarea, space->machine().primary_screen->frame_period().attoseconds );
|
space->machine().primary_screen->configure(HTOTAL, VTOTAL, visarea, space->machine().primary_screen->frame_period().attoseconds );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1632,36 +1641,31 @@ static const mips3_config vr4300_config =
|
|||||||
16384 /* data cache size */
|
16384 /* data cache size */
|
||||||
};
|
};
|
||||||
|
|
||||||
static TIMER_CALLBACK( irq_stop )
|
|
||||||
{
|
|
||||||
cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static INTERRUPT_GEN( irq_start )
|
static TIMER_DEVICE_CALLBACK( hng64_irq )
|
||||||
{
|
{
|
||||||
hng64_state *state = device->machine().driver_data<hng64_state>();
|
hng64_state *state = timer.machine().driver_data<hng64_state>();
|
||||||
|
int scanline = param;
|
||||||
|
int irq_fired,irq_type;
|
||||||
|
|
||||||
logerror("HNG64 interrupt level %x\n", cpu_getiloops(device));
|
irq_fired = irq_type = 0;
|
||||||
|
|
||||||
/* there are more, the sources are unknown at the moment */
|
/* there are more, the sources are unknown at the moment */
|
||||||
switch (cpu_getiloops(device))
|
switch(scanline)
|
||||||
{
|
{
|
||||||
case 0x00: state->m_interrupt_level_request = 0;
|
case 224*2: state->m_interrupt_level_request = 0; irq_fired = 1; irq_type = 1; break;
|
||||||
break;
|
case 0*2: state->m_interrupt_level_request = 1; irq_fired = 1; irq_type = 1; break;
|
||||||
case 0x01: state->m_interrupt_level_request = 1;
|
case 64*2: state->m_interrupt_level_request = 2; irq_fired = 1; irq_type = 1; break;
|
||||||
break;
|
case 128*2: state->m_interrupt_level_request = 11; irq_fired = 1; irq_type = 1; break;
|
||||||
case 0x02: state->m_interrupt_level_request = 2;
|
case (0+1)*2:
|
||||||
break;
|
case (224+1)*2:
|
||||||
case 0x03:
|
case (64+1)*2:
|
||||||
if (state->m_mcu_type == RACING_MCU)
|
case (128+1)*2:
|
||||||
state->m_interrupt_level_request = 11; //network irq
|
irq_fired = 1; irq_type = 0; break;
|
||||||
else
|
|
||||||
return;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
device_set_input_line(device, 0, ASSERT_LINE);
|
if(irq_fired)
|
||||||
device->machine().scheduler().timer_set(attotime::from_usec(50), FUNC(irq_stop));
|
device_set_input_line(state->m_maincpu, 0, (irq_type) ? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1721,7 +1725,7 @@ static MACHINE_CONFIG_START( hng64, hng64_state )
|
|||||||
MCFG_CPU_ADD("maincpu", VR4300BE, MASTER_CLOCK) // actually R4300
|
MCFG_CPU_ADD("maincpu", VR4300BE, MASTER_CLOCK) // actually R4300
|
||||||
MCFG_CPU_CONFIG(vr4300_config)
|
MCFG_CPU_CONFIG(vr4300_config)
|
||||||
MCFG_CPU_PROGRAM_MAP(hng_map)
|
MCFG_CPU_PROGRAM_MAP(hng_map)
|
||||||
MCFG_CPU_VBLANK_INT_HACK(irq_start,4)
|
MCFG_TIMER_ADD_SCANLINE("scantimer", hng64_irq, "screen", 0, 1)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", V33, 8000000) // v53, 16? mhz!
|
MCFG_CPU_ADD("audiocpu", V33, 8000000) // v53, 16? mhz!
|
||||||
MCFG_CPU_PROGRAM_MAP(hng_sound_map)
|
MCFG_CPU_PROGRAM_MAP(hng_sound_map)
|
||||||
@ -1737,16 +1741,14 @@ static MACHINE_CONFIG_START( hng64, hng64_state )
|
|||||||
MCFG_MACHINE_RESET(hyperneo)
|
MCFG_MACHINE_RESET(hyperneo)
|
||||||
|
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) //not accurate
|
|
||||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||||
MCFG_SCREEN_SIZE(1024, 1024)
|
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0, 0x200-1, 0, 0x1c0-1)
|
|
||||||
MCFG_SCREEN_UPDATE(hng64)
|
MCFG_SCREEN_UPDATE(hng64)
|
||||||
|
|
||||||
MCFG_PALETTE_LENGTH(0x1000)
|
MCFG_PALETTE_LENGTH(0x1000)
|
||||||
|
|
||||||
MCFG_VIDEO_START(hng64)
|
MCFG_VIDEO_START(hng64)
|
||||||
|
MCFG_SCREEN_EOF(hng64)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@ class hng64_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
hng64_state(const machine_config &mconfig, device_type type, const char *tag)
|
hng64_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_mcu_type;
|
int m_mcu_type;
|
||||||
UINT32 *m_mainram;
|
UINT32 *m_mainram;
|
||||||
@ -94,6 +96,8 @@ public:
|
|||||||
float m_lightStrength;
|
float m_lightStrength;
|
||||||
float m_lightVector[3];
|
float m_lightVector[3];
|
||||||
|
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -104,3 +108,4 @@ void hng64_command3d(running_machine& machine, const UINT16* packet);
|
|||||||
|
|
||||||
VIDEO_START( hng64 );
|
VIDEO_START( hng64 );
|
||||||
SCREEN_UPDATE( hng64 );
|
SCREEN_UPDATE( hng64 );
|
||||||
|
SCREEN_EOF( hng64 );
|
||||||
|
@ -1544,8 +1544,6 @@ SCREEN_UPDATE( hng64 )
|
|||||||
hng64_drawtilemap(screen->machine(),bitmap,cliprect, 1);
|
hng64_drawtilemap(screen->machine(),bitmap,cliprect, 1);
|
||||||
hng64_drawtilemap(screen->machine(),bitmap,cliprect, 0);
|
hng64_drawtilemap(screen->machine(),bitmap,cliprect, 0);
|
||||||
|
|
||||||
draw_sprites(screen->machine(), bitmap,cliprect);
|
|
||||||
|
|
||||||
// 3d really shouldn't be last, but you don't see some cool stuff right now if it's put before sprites.
|
// 3d really shouldn't be last, but you don't see some cool stuff right now if it's put before sprites.
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
@ -1566,9 +1564,10 @@ SCREEN_UPDATE( hng64 )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//printf("NEW FRAME!\n"); /* Debug - ajg */
|
//printf("NEW FRAME!\n"); /* Debug - ajg */
|
||||||
clear3d(screen->machine());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_sprites(screen->machine(), bitmap,cliprect);
|
||||||
|
|
||||||
if(0)
|
if(0)
|
||||||
transition_control(screen->machine(), bitmap, cliprect);
|
transition_control(screen->machine(), bitmap, cliprect);
|
||||||
|
|
||||||
@ -1654,6 +1653,11 @@ SCREEN_UPDATE( hng64 )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SCREEN_EOF( hng64 )
|
||||||
|
{
|
||||||
|
clear3d(screen->machine());
|
||||||
|
}
|
||||||
|
|
||||||
VIDEO_START( hng64 )
|
VIDEO_START( hng64 )
|
||||||
{
|
{
|
||||||
hng64_state *state = machine.driver_data<hng64_state>();
|
hng64_state *state = machine.driver_data<hng64_state>();
|
||||||
|
Loading…
Reference in New Issue
Block a user