Previous 199869 Revisions Next

r21107 Friday 15th February, 2013 at 23:31:30 UTC by Angelo Salese
Fixed Out Run booting, it triggers the RESET opcode and the only good theory so far is that the SMPC can read the RESET/HALT states on it in some way.
[src/emu/machine]smpc.c
[src/emu/video]stvvdp1.c stvvdp2.c
[src/mame/drivers]saturn.c
[src/mame/includes]stv.h

trunk/src/mame/drivers/saturn.c
r21106r21107
13811381   //if((m_smpc.rtc_data[0] & 0xf0) >= 0xa0)               { m_smpc.rtc_data[0] = 0; } //roll over
13821382}
13831383
1384/* Official documentation says that the "RESET/TAS opcodes aren't supported", but Out Run definitely contradicts with it.
1385   Since that m68k can't reset itself via the RESET opcode I suppose that the SMPC actually do it by reading an i/o
1386   connected to this opcode. */
1387static void m68k_reset_callback(device_t *device)
1388{
1389   saturn_state *state = device->machine().driver_data<saturn_state>();
1390   device->machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(saturn_state::smpc_audio_reset_line_pulse), state));
1391   printf("m68k RESET opcode triggered\n");
1392}
1393
13841394MACHINE_START_MEMBER(saturn_state,stv)
13851395{
13861396   system_time systime;
r21106r21107
14211431   m_smpc.rtc_data[6] = DectoBCD(systime.local_time.second);
14221432
14231433   m_stv_rtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(saturn_state::stv_rtc_increment),this));
1434
1435   m68k_set_reset_callback(m_audiocpu, m68k_reset_callback);
14241436}
14251437
14261438
r21106r21107
14661478   m_smpc.rtc_data[6] = DectoBCD(systime.local_time.second);
14671479
14681480   m_stv_rtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(saturn_state::stv_rtc_increment),this));
1481
1482   m68k_set_reset_callback(m_audiocpu, m68k_reset_callback);
14691483}
14701484
14711485
trunk/src/mame/includes/stv.h
r21106r21107
249249
250250   UINT8 smpc_direct_mode(UINT8 pad_n);
251251   UINT8 smpc_th_control_mode(UINT8 pad_n);
252   TIMER_CALLBACK_MEMBER( smpc_audio_reset_line_pulse );
252253   DECLARE_READ8_MEMBER( saturn_SMPC_r );
253254   DECLARE_WRITE8_MEMBER( saturn_SMPC_w );
254255
r21106r21107
695696   int numfiles;            // # of entries in current directory
696697   int firstfile;           // first non-directory file
697698
698
699699   // ST-V specific
700700   void install_stvbios_speedups( void );
701701};
trunk/src/emu/video/stvvdp2.c
r21106r21107
47704770      /* Assault Suit Leynos 2 0x0200*/
47714771      /* Bug! 0x8800 */
47724772      /* Wonder 3 0x0018 */
4773      if(STV_VDP2_SFPRMD & ~0xff7d)
4773      if(STV_VDP2_SFPRMD & ~0xff7f)
47744774         popmessage("Special Priority Mode enabled %04x, contact MAMEdev",STV_VDP2_SFPRMD);
47754775   }
47764776}
trunk/src/emu/video/stvvdp1.c
r21106r21107
294294         if ( VDP1_LOG ) logerror( "VDP1: Erase lower-right coord set: %08X\n", data );
295295         break;
296296      case 0x0c/2:
297         if ( VDP1_LOG ) logerror( "VDP1: Draw forced termination register write: %08X\n", data );
297      case 0x0e/2: // After Burner 2 / Out Run / Fantasy Zone writes here with a dword ...
298         if ( VDP1_LOG ) logerror( "VDP1: Draw forced termination register write: %08X %08X\n", offset*2, data );
298299         break;
299300      default:
300301         printf("Warning: write to unknown VDP1 reg %08x %08x\n",offset*2,data);
trunk/src/emu/machine/smpc.c
r21106r21107
661661}
662662
663663
664TIMER_CALLBACK_MEMBER( saturn_state::smpc_audio_reset_line_pulse )
665{
666   m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
667}
668
664669/********************************************
665670 *
666671 * COMREG sub-routine

Previous 199869 Revisions Next


© 1997-2024 The MAME Team