diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2011-06-26 14:02:40 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2011-06-26 14:02:40 +0000 |
commit | 38b0acc302f40d49e6dc5df9ba06c446bc3e4c88 (patch) | |
tree | ae7f3e3bb1027ce68fabdc56b0daf54cb3c31573 | |
parent | f36676e5d85222922d677832123f7217b88cdcd9 (diff) |
Port from MESS, nw
-rw-r--r-- | src/mame/drivers/saturn.c | 9 | ||||
-rw-r--r-- | src/mame/includes/stv.h | 4 | ||||
-rw-r--r-- | src/mame/machine/stvcd.c | 3 | ||||
-rw-r--r-- | src/mame/video/stvvdp1.c | 4 | ||||
-rw-r--r-- | src/mame/video/stvvdp2.c | 8 |
5 files changed, 15 insertions, 13 deletions
diff --git a/src/mame/drivers/saturn.c b/src/mame/drivers/saturn.c index 4ec05b4fdc9..438296d35d5 100644 --- a/src/mame/drivers/saturn.c +++ b/src/mame/drivers/saturn.c @@ -437,7 +437,6 @@ static void smpc_change_clock(running_machine &machine, UINT8 cmd) machine.device("maincpu")->set_unscaled_clock(xtal/2); machine.device("slave")->set_unscaled_clock(xtal/2); - machine.device("audiocpu")->set_unscaled_clock(xtal/5); state->m_vdp2.dotsel = cmd ^ 1; stv_vdp2_dynamic_res_change(machine); @@ -542,7 +541,7 @@ static TIMER_CALLBACK( smpc_intback ) state->m_smpc.smpcSR = 0x60; // peripheral data ready, no reset, etc. state->m_smpc.pmode = state->m_smpc_ram[1]>>4; - state->m_smpc.intback_stage = 1; + state->m_smpc.intback_stage = 2; smpc_intbackhelper(machine); } @@ -1465,7 +1464,7 @@ static TIMER_CALLBACK( dma_lv2_ended ) { saturn_state *state = machine.driver_data<saturn_state>(); - if(stv_irq.dma_end[2]) device_set_input_line_and_vector(state->m_maincpu, 6, HOLD_LINE, 0x49); + if(stv_irq.dma_end[2]) device_set_input_line_and_vector(state->m_maincpu, 6, HOLD_LINE, 0x49); DnMV_0(2); } @@ -2776,7 +2775,7 @@ static MACHINE_CONFIG_START( saturn, saturn_state ) MCFG_CPU_PROGRAM_MAP(saturn_mem) MCFG_CPU_CONFIG(sh2_conf_slave) - MCFG_CPU_ADD("audiocpu", M68000, MASTER_CLOCK_352/5) //11.46 MHz + MCFG_CPU_ADD("audiocpu", M68000, 11289600) //11.2896 MHz MCFG_CPU_PROGRAM_MAP(sound_mem) MCFG_MACHINE_START(saturn) @@ -2825,7 +2824,7 @@ static MACHINE_CONFIG_START( stv, saturn_state ) MCFG_CPU_PROGRAM_MAP(stv_mem) MCFG_CPU_CONFIG(sh2_conf_slave) - MCFG_CPU_ADD("audiocpu", M68000, MASTER_CLOCK_352/5) //11.46 MHz + MCFG_CPU_ADD("audiocpu", M68000, 11289600) //11.2896 MHz MCFG_CPU_PROGRAM_MAP(sound_mem) MCFG_MACHINE_START(stv) diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 2028b81b84d..861cf6789ce 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -98,8 +98,8 @@ public: legacy_cpu_device* m_audiocpu; }; -#define MASTER_CLOCK_352 57272800 -#define MASTER_CLOCK_320 53748200 +#define MASTER_CLOCK_352 57272720 +#define MASTER_CLOCK_320 53693174 #define CEF_1 state->m_vdp1_regs[0x010/2]|=0x0002 #define CEF_0 state->m_vdp1_regs[0x010/2]&=~0x0002 #define BEF_1 state->m_vdp1_regs[0x010/2]|=0x0001 diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index 60a196280c0..192ee0a3d66 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -803,6 +803,9 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data) cdda_pause_audio( machine.device( "cdda" ), 0 ); cdda_start_audio( machine.device( "cdda" ), cd_curfad, fadstoplay ); } + else + cdda_stop_audio( machine.device( "cdda" ) ); //stop any pending CD-DA + //else //{ // sector_timer->reset(); diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 5fa29d1d25b..170c33a5f16 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -956,7 +956,6 @@ static void drawpixel_generic(running_machine &machine, int x, int y, int patter pix = pix+(stv2_current_sprite.CMDCOLR&0xff80); transmask = 0x7f; mode = 3; - // pix = machine.rand(); break; case 0x0020: // mode 4 256 colour bank mode (8bits) (hanagumi title) pix = gfxdata[(patterndata+offsetcnt) & 0xfffff]; @@ -967,12 +966,13 @@ static void drawpixel_generic(running_machine &machine, int x, int y, int patter case 0x0028: // mode 5 32,768 colour RGB mode (16bits) pix = gfxdata[(patterndata+offsetcnt*2+1) & 0xfffff] | (gfxdata[(patterndata+offsetcnt*2) & 0xfffff]<<8) ; mode = 5; - transmask = 0xffff; + transmask = -1; /* TODO: check me */ break; default: // other settings illegal pix = machine.rand(); mode = 0; transmask = 0xff; + popmessage("Illegal Sprite Mode, contact MAMEdev"); } diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 5f9c9d6f176..260de3c9f93 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -5621,8 +5621,8 @@ static void stv_vdp2_get_window0_coordinates(running_machine &machine,UINT16 *s_ *e_y = ((STV_VDP2_W0EY & 0x3ff) >> 0); break; case 3: - *s_y = ((STV_VDP2_W1SY & 0x7ff) >> 0) << 1; - *e_y = ((STV_VDP2_W1EY & 0x7ff) >> 0) << 1; + *s_y = ((STV_VDP2_W0SY & 0x7ff) >> 0); + *e_y = ((STV_VDP2_W0EY & 0x7ff) >> 0); break; } switch(STV_VDP2_HRES & 6) @@ -5668,8 +5668,8 @@ static void stv_vdp2_get_window1_coordinates(running_machine &machine,UINT16 *s_ *e_y = ((STV_VDP2_W1EY & 0x3ff) >> 0); break; case 3: - *s_y = ((STV_VDP2_W1SY & 0x3ff) >> 0) << 1; - *e_y = ((STV_VDP2_W1EY & 0x3ff) >> 0) << 1; + *s_y = ((STV_VDP2_W1SY & 0x7ff) >> 0); + *e_y = ((STV_VDP2_W1EY & 0x7ff) >> 0); break; } switch(STV_VDP2_HRES & 6) |